From 03134fa5f6f25d92724ce4c183f9bbe12a9e37dc Mon Sep 17 00:00:00 2001 From: "Roberto C. Sanchez" Date: Sat, 29 Mar 2014 10:53:59 -0400 Subject: Imported Upstream version 1.5.11 --- AUTHORS | 2 + CODINGSTYLE | 81 + COPYING | 2 + ChangeLog | 1130 + INSTALL | 151 + LICENSE | 350 + Makefile.am | 152 + Makefile.cvs | 13 + Makefile.in | 974 + NEWS | 1 + README | 65 + README.svn | 7 + aclocal.m4 | 7473 ++++++ arminst.sh | 12 + autogen.sh | 23 + bindings/Makefile | 9 + bindings/Makefile.am | 7 + bindings/README | 9 + bindings/autogen.sh | 23 + bindings/bcppmake/MainCLXTest.cpp | 16 + bindings/bcppmake/MainCLXTest.dfm | 16 + bindings/bcppmake/MainCLXTest.h | 21 + bindings/bcppmake/MainTest.cpp | 37 + bindings/bcppmake/MainTest.dfm | 36 + bindings/bcppmake/MainTest.h | 25 + bindings/bcppmake/Makefile.am | 16 + bindings/bcppmake/clxtest.bpr | 93 + bindings/bcppmake/clxtest.cpp | 24 + bindings/bcppmake/sword.bpf | 11 + bindings/bcppmake/sword.bpr | 111 + bindings/bcppmake/sword.c | 31 + bindings/bcppmake/sworddll.bpg | 33 + bindings/bcppmake/test.cpp | 23 + bindings/clx/Sword.pas | 213 + bindings/clx/test1/MainFrm.pas | 116 + bindings/clx/test1/MainFrm.xfm | 90 + bindings/clx/test1/test1.conf | 36 + bindings/clx/test1/test1.dpr | 14 + bindings/clx/test1/test1.kof | 61 + bindings/clx/test1/test1.res | Bin 0 -> 32 bytes bindings/clx/test1/test1g.bpg | 15 + bindings/clx/test2/MainFrm.pas | 417 + bindings/clx/test2/MainFrm.xfm | 753 + bindings/clx/test2/test2.conf | 38 + bindings/clx/test2/test2.dpr | 14 + bindings/clx/test2/test2.kof | 61 + bindings/clx/test2/test2.res | Bin 0 -> 32 bytes bindings/configure.ac | 127 + bindings/corba/Makefile.am | 3 + bindings/corba/java/Makefile | 24 + bindings/corba/java/Makefile.in | 43 + .../java/src/org/crosswire/sword/orb/SwordOrb.java | 248 + .../corba/java/src/org/crosswire/util/Base64.java | 1238 + .../crosswire/web/i18n/ContextStart.java.notyet | 10 + .../src/org/crosswire/web/i18n/TranslateTag.java | 87 + bindings/corba/java/swordorb.jpx | 41 + bindings/corba/java/swordorb.jpx.local | 10 + bindings/corba/java/testclient | 6 + bindings/corba/orbitcpp/Makefile | 66 + bindings/corba/orbitcpp/Makefile.am | 40 + bindings/corba/orbitcpp/server.cpp | 71 + bindings/corba/orbitcpp/swordorb-impl.cpp | 357 + bindings/corba/orbitcpp/swordorb-impl.hpp | 79 + bindings/corba/orbitcpp/testclient.cpp | 87 + bindings/corba/orbitcpp/webmgr.hpp | 97 + bindings/corba/swordorb.idl | 92 + bindings/flatapi.cpp | 379 + bindings/gsoap/Makefile | 12 + bindings/gsoap/Makefile.am | 8 + bindings/gsoap/gsoapsword.cpp | 142 + bindings/gsoap/gsoapsword.h | 65 + bindings/gsoap/include/stdsoap.h | 493 + bindings/gsoap/soapcpp | Bin 0 -> 534312 bytes bindings/gsoap/stdsoap.o | Bin 0 -> 79640 bytes bindings/gsoap/testclient.cpp | 76 + bindings/swig/README | 33 + bindings/swig/bases.i | 35 + bindings/swig/defs.i | 6 + bindings/swig/directors.i | 32 + bindings/swig/encfiltmgr.i | 11 + bindings/swig/examples/mod2zmod.pl | 84 + bindings/swig/extras.i | 13 + bindings/swig/filemgr.i | 6 + bindings/swig/ftptrans.i | 6 + bindings/swig/installmgr.i | 8 + bindings/swig/listkey.i | 21 + bindings/swig/localemgr.i | 13 + bindings/swig/lzsscomprs.i | 11 + bindings/swig/markupcallback.h | 47 + bindings/swig/markupfiltmgr.i | 13 + bindings/swig/oldmake/Makefile.am | 95 + bindings/swig/oldmake/Makefile.oth | 22 + bindings/swig/oldmake/Makefile.swig | 578 + bindings/swig/osishtmlhref.i | 16 + bindings/swig/package/Makefile.am | 113 + bindings/swig/package/Makefile.in | 722 + bindings/swig/package/README.cvs | 10 + bindings/swig/package/aclocal.m4 | 7466 ++++++ bindings/swig/package/autogen.sh | 24 + bindings/swig/package/bases.i | 35 + bindings/swig/package/config.guess | 1516 ++ bindings/swig/package/config.sub | 1626 ++ bindings/swig/package/configure | 21960 ++++++++++++++++++ bindings/swig/package/configure.ac | 44 + bindings/swig/package/defs.i | 6 + bindings/swig/package/depcomp | 584 + bindings/swig/package/directors.i | 32 + bindings/swig/package/encfiltmgr.i | 11 + bindings/swig/package/extras.i | 13 + bindings/swig/package/filemgr.i | 6 + bindings/swig/package/ftptrans.i | 6 + bindings/swig/package/install-sh | 507 + bindings/swig/package/installmgr.i | 8 + bindings/swig/package/listkey.i | 21 + bindings/swig/package/localemgr.i | 13 + bindings/swig/package/ltmain.sh | 6930 ++++++ bindings/swig/package/lzsscomprs.i | 11 + bindings/swig/package/markupcallback.h | 47 + bindings/swig/package/markupfiltmgr.i | 13 + bindings/swig/package/missing | 367 + bindings/swig/package/osishtmlhref.i | 16 + bindings/swig/package/perl.m4 | 71 + bindings/swig/package/php4.m4 | 33 + bindings/swig/package/python.m4 | 117 + bindings/swig/package/rawcom.i | 14 + bindings/swig/package/rawgenbook.i | 12 + bindings/swig/package/rawld.i | 12 + bindings/swig/package/rawld4.i | 12 + bindings/swig/package/rawtext.i | 12 + bindings/swig/package/rendercallback.h | 223 + bindings/swig/package/searcher.h | 39 + bindings/swig/package/stringmgr.i | 26 + bindings/swig/package/swbuf.i | 37 + bindings/swig/package/swcacher.i | 6 + bindings/swig/package/swcom.i | 14 + bindings/swig/package/swcomprs.i | 10 + bindings/swig/package/swconfig.i | 25 + bindings/swig/package/swdisp.i | 5 + bindings/swig/package/swfilter.i | 7 + bindings/swig/package/swfiltermgr.i | 12 + bindings/swig/package/swgenbook.i | 11 + bindings/swig/package/swig.m4 | 29 + bindings/swig/package/swkey.i | 9 + bindings/swig/package/swld.i | 13 + bindings/swig/package/swlocale.i | 31 + bindings/swig/package/swlog.i | 6 + bindings/swig/package/swmgr.i | 40 + bindings/swig/package/swmodule.i | 35 + bindings/swig/package/swobject.i | 7 + bindings/swig/package/swoptfilter.i | 13 + bindings/swig/package/sword.i | 94 + bindings/swig/package/sword.m4 | 174 + bindings/swig/package/swsearchable.i | 25 + bindings/swig/package/swtext.i | 13 + bindings/swig/package/swversion.i | 5 + bindings/swig/package/tcl.m4 | 114 + bindings/swig/package/templates.i | 64 + bindings/swig/package/treekey.i | 38 + bindings/swig/package/treekeyidx.i | 11 + bindings/swig/package/url.i | 5 + bindings/swig/package/utilxml.i | 5 + bindings/swig/package/versekey.i | 115 + bindings/swig/package/versetreekey.i | 12 + bindings/swig/package/zcom.i | 12 + bindings/swig/package/zipcomprs.i | 11 + bindings/swig/package/zld.i | 11 + bindings/swig/package/zlib.m4 | 111 + bindings/swig/package/ztext.i | 11 + bindings/swig/rawcom.i | 14 + bindings/swig/rawgenbook.i | 12 + bindings/swig/rawld.i | 12 + bindings/swig/rawld4.i | 12 + bindings/swig/rawtext.i | 12 + bindings/swig/rendercallback.h | 223 + bindings/swig/searcher.h | 39 + bindings/swig/stringmgr.i | 26 + bindings/swig/swbuf.i | 37 + bindings/swig/swcacher.i | 6 + bindings/swig/swcom.i | 14 + bindings/swig/swcomprs.i | 10 + bindings/swig/swconfig.i | 25 + bindings/swig/swdisp.i | 5 + bindings/swig/swfilter.i | 7 + bindings/swig/swfiltermgr.i | 12 + bindings/swig/swgenbook.i | 11 + bindings/swig/swig-perl.doxygen | 177 + bindings/swig/swkey.i | 9 + bindings/swig/swld.i | 13 + bindings/swig/swlocale.i | 31 + bindings/swig/swlog.i | 6 + bindings/swig/swmgr.i | 40 + bindings/swig/swmodule.i | 35 + bindings/swig/swobject.i | 7 + bindings/swig/swoptfilter.i | 13 + bindings/swig/sword.i | 94 + bindings/swig/sword.pl | 104 + bindings/swig/swsearchable.i | 25 + bindings/swig/swtext.i | 13 + bindings/swig/swversion.i | 5 + bindings/swig/templates.i | 64 + bindings/swig/treekey.i | 38 + bindings/swig/treekeyidx.i | 11 + bindings/swig/url.i | 5 + bindings/swig/utilxml.i | 5 + bindings/swig/versekey.i | 115 + bindings/swig/versetreekey.i | 12 + bindings/swig/vstudio/SwigSword.csproj | 99 + bindings/swig/vstudio/libsword-csharpbindings.sln | 36 + bindings/swig/vstudio/libsword_csharpsword.vcproj | 974 + bindings/swig/zcom.i | 12 + bindings/swig/zipcomprs.i | 11 + bindings/swig/zld.i | 11 + bindings/swig/ztext.i | 11 + bindings/usrinst.sh | 7 + buildtest.cpp | 59 + config.guess | 1516 ++ config.h.in | 62 + config.sub | 1626 ++ configure | 22844 +++++++++++++++++++ configure.ac | 299 + depcomp | 584 + distignore | 5 + doc/Makefile.am | 5 + doc/README | 10 + doc/greektrans.txt | 81 + doc/translation-template.conf | 334 + examples/.cvsignore | 3 + examples/Makefile.am | 3 + examples/Makefile.in | 518 + examples/classes/Makefile | 10 + examples/classes/ciphercng.cpp | 50 + examples/classes/swmgrex.cpp | 58 + examples/cmdline/.cvsignore | 7 + examples/cmdline/Makefile.am | 12 + examples/cmdline/Makefile.in | 512 + examples/cmdline/listoptions.cpp | 21 + examples/cmdline/lookup.cpp | 75 + examples/cmdline/search.cpp | 97 + examples/cmdline/threaded_search.cpp | 134 + examples/cmdline/verserangeparse.cpp | 69 + examples/simple.cpp | 33 + icu/.cvsignore | 3 + icu/Makefile.am | 67 + icu/Makefile.in | 436 + icu/translit_Any_Latex.txt | 78 + icu/translit_Any_Latin1.txt | 89 + icu/translit_BETA_Greek.txt | 119 + icu/translit_BGreek_Greek.txt | 155 + icu/translit_CCAT_Hebrew.txt | 200 + icu/translit_CCAT_Syriac.txt | 87 + icu/translit_Latin_Arabic.txt | 198 + icu/translit_Latin_Armenian.txt | 151 + icu/translit_Latin_Coptic.txt | 129 + icu/translit_Latin_Ethiopic.txt | 407 + icu/translit_Latin_Georgian.txt | 137 + icu/translit_Latin_Gothic.txt | 57 + icu/translit_Latin_Hebrew.txt | 223 + icu/translit_Latin_Syriac.txt | 169 + icu/translit_Latin_Thai.txt | 162 + icu/translit_Latin_Ugaritic.txt | 63 + icu/translit_swordindex.txt | 108 + include/.cvsignore | 2 + include/Greek2Greek.h | 117 + include/GreekChars.h | 154 + include/Makefile | 5 + include/Makefile.am | 158 + include/SwordAPI.pas | 69 + include/apocrypha.h | 219 + include/canon.h | 697 + include/cipherfil.h | 40 + include/config.h | 66 + include/config.h.in | 65 + include/curlftpt.h | 32 + include/defs.h | 109 + include/echomod.h | 41 + include/encfiltmgr.h | 86 + include/entriesblk.h | 34 + include/femain.h | 32 + include/filemgr.h | 190 + include/flatapi.h | 106 + include/ftplib.h | 124 + include/ftplibftpt.h | 34 + include/ftpparse.h | 53 + include/ftptrans.h | 64 + include/gbffootnotes.h | 38 + include/gbfheadings.h | 38 + include/gbfhtml.h | 46 + include/gbfhtmlhref.h | 47 + include/gbfmorph.h | 38 + include/gbfosis.h | 68 + include/gbfplain.h | 37 + include/gbfredletterwords.h | 40 + include/gbfrtf.h | 37 + include/gbfstrongs.h | 38 + include/gbfthml.h | 37 + include/gbfwebif.h | 41 + include/gbfwordjs.h | 52 + include/greeklexattribs.h | 37 + include/hebrewmcim.h | 32 + include/hrefcom.h | 52 + include/installmgr.h | 105 + include/latin1utf16.h | 37 + include/latin1utf8.h | 37 + include/listkey.h | 144 + include/localemgr.h | 118 + include/lzsscomprs.h | 82 + include/markupfiltmgr.h | 76 + include/multimapwdef.h | 39 + include/nullim.h | 16 + include/osisbook.h | 640 + include/osisfootnotes.h | 38 + include/osisheadings.h | 38 + include/osishtmlhref.h | 63 + include/osislemma.h | 38 + include/osismorph.h | 38 + include/osismorphsegmentation.h | 42 + include/osisosis.h | 54 + include/osisplain.h | 49 + include/osisredletterwords.h | 38 + include/osisrtf.h | 42 + include/osisscripref.h | 38 + include/osisstrongs.h | 38 + include/osisvariants.h | 54 + include/osiswebif.h | 44 + include/osiswordjs.h | 52 + include/papyriplain.h | 37 + include/plainfootnotes.h | 41 + include/plainhtml.h | 38 + include/rawcom.h | 63 + include/rawcom4.h | 63 + include/rawfiles.h | 86 + include/rawgenbook.h | 65 + include/rawld.h | 67 + include/rawld4.h | 67 + include/rawstr.h | 58 + include/rawstr4.h | 59 + include/rawtext.h | 66 + include/rawtext4.h | 67 + include/rawverse.h | 42 + include/rawverse4.h | 42 + include/regex.h | 545 + include/roman.h | 36 + include/rtfhtml.h | 37 + include/sapphire.h | 59 + include/scsuutf8.h | 40 + include/stringmgr.h | 120 + include/strkey.h | 55 + include/swbasicfilter.h | 204 + include/swbuf.h | 430 + include/swcacher.h | 43 + include/swcipher.h | 52 + include/swcom.h | 69 + include/swcomprs.h | 48 + include/swconfig.h | 87 + include/swdisp.h | 53 + include/swfilter.h | 55 + include/swfiltermgr.h | 87 + include/swgenbook.h | 57 + include/swinputmeth.h | 34 + include/swkey.h | 214 + include/swld.h | 66 + include/swlocale.h | 76 + include/swlog.h | 63 + include/swmacs.h | 32 + include/swmgr.h | 353 + include/swmodule.h | 673 + include/swobject.h | 65 + include/swoptfilter.h | 84 + include/swsearchable.h | 101 + include/swtext.h | 69 + include/swunicod.h | 43 + include/swversion.h | 65 + include/sysdata.h | 77 + include/teihtmlhref.h | 51 + include/teiplain.h | 49 + include/teirtf.h | 50 + include/thmlfootnotes.h | 38 + include/thmlgbf.h | 38 + include/thmlheadings.h | 38 + include/thmlhtml.h | 46 + include/thmlhtmlhref.h | 53 + include/thmllemma.h | 38 + include/thmlmorph.h | 38 + include/thmlosis.h | 38 + include/thmlplain.h | 37 + include/thmlrtf.h | 51 + include/thmlscripref.h | 38 + include/thmlstrongs.h | 38 + include/thmlvariants.h | 53 + include/thmlwebif.h | 40 + include/thmlwordjs.h | 52 + include/treekey.h | 122 + include/treekeyidx.h | 122 + include/unicodertf.h | 37 + include/untgz.h | 10 + include/url.h | 93 + include/utf16utf8.h | 37 + include/utf8arshaping.h | 49 + include/utf8bidireorder.h | 47 + include/utf8cantillation.h | 38 + include/utf8greekaccents.h | 38 + include/utf8hebrewpoints.h | 38 + include/utf8html.h | 37 + include/utf8latin1.h | 38 + include/utf8nfc.h | 45 + include/utf8nfkd.h | 45 + include/utf8transliterator.h | 87 + include/utf8utf16.h | 37 + include/utilstr.h | 46 + include/utilxml.h | 88 + include/versekey.h | 444 + include/versetreekey.h | 102 + include/zcom.h | 73 + include/zconf.h | 279 + include/zipcomprs.h | 43 + include/zld.h | 74 + include/zlib.h | 893 + include/zstr.h | 76 + include/ztext.h | 88 + include/zverse.h | 59 + install-sh | 507 + lib/.cvsignore | 6 + lib/Makefile.am | 51 + lib/Makefile.in | 2006 ++ lib/README | 2 + lib/bcppmake/libsword.bdsproj | 690 + lib/bcppmake/libsword.bpf | 156 + lib/bcppmake/libsword.bpr | 301 + lib/bcppmake/libsword6icu.bpf | 124 + lib/bcppmake/libsword6icu.bpr | 350 + lib/vcppmake/vc7.1/libsword.vcproj | 5614 +++++ lib/vcppmake/vc8/libsword.vcproj | 6934 ++++++ locales.d/Makefile.am | 59 + locales.d/abbr.conf | 258 + locales.d/af-utf8.conf | 325 + locales.d/af.conf | 602 + locales.d/ar_EG-cp1256.conf | 325 + locales.d/ar_EG-utf8.conf | 326 + locales.d/bg_BG-cp1251.conf | 404 + locales.d/bg_BG-utf8.conf | 404 + locales.d/cs-utf8.conf | 462 + locales.d/cs.conf | 462 + locales.d/da-utf8.conf | 571 + locales.d/da.conf | 571 + locales.d/de-utf8.conf | 421 + locales.d/de.conf | 420 + locales.d/de_abbrev-utf8.conf | 331 + locales.d/de_abbrev.conf | 331 + locales.d/en_GB.conf | 258 + locales.d/es-utf8.conf | 391 + locales.d/es.conf | 391 + locales.d/et-utf8.conf | 494 + locales.d/et.conf | 494 + locales.d/et_abbr-utf8.conf | 495 + locales.d/et_abbr.conf | 492 + locales.d/fa-utf8.conf | 329 + locales.d/fi-utf8.conf | 514 + locales.d/fi.conf | 514 + locales.d/fr-utf8.conf | 692 + locales.d/fr.conf | 690 + locales.d/fr_abbrev-utf8.conf | 333 + locales.d/fr_abbrev.conf | 333 + locales.d/he-utf8.conf | 422 + locales.d/hu-utf8.conf | 395 + locales.d/hu.conf | 395 + locales.d/id.conf | 465 + locales.d/it-utf8.conf | 674 + locales.d/it.conf | 674 + locales.d/ja.conf | 401 + locales.d/ko-utf8.conf | 456 + locales.d/ko.conf | 456 + locales.d/ko_abbrev-utf8.conf | 271 + locales.d/ko_abbrev.conf | 271 + locales.d/la.conf | 332 + locales.d/lt-utf8.conf | 581 + locales.d/nl.conf | 447 + locales.d/no-utf8.conf | 479 + locales.d/no.conf | 479 + locales.d/pl-utf8.conf | 337 + locales.d/pl.conf | 337 + locales.d/pt-utf8.conf | 392 + locales.d/pt.conf | 392 + locales.d/pt_BR-utf8.conf | 392 + locales.d/pt_BR.conf | 392 + locales.d/ro.conf | 330 + locales.d/ru_RU-cp1251.conf | 741 + locales.d/ru_RU-koi8-r.conf | 741 + locales.d/ru_RU-utf8.conf | 743 + locales.d/sk-utf8.conf | 432 + locales.d/sk.conf | 435 + locales.d/sl.conf | 438 + locales.d/sv-utf8.conf | 529 + locales.d/sv.conf | 527 + locales.d/th-utf8.conf | 357 + locales.d/uk_UA-cp1251.conf | 739 + locales.d/uk_UA-koi8-u.conf | 739 + locales.d/uk_UA-utf8.conf | 739 + locales.d/vi-utf8.conf | 390 + ltmain.sh | 6930 ++++++ m4/acx_clucene.m4 | 88 + m4/cppunit.m4 | 80 + missing | 367 + obj/Makefile | 8 + olb/Convert.bpr | 116 + olb/Convert.cpp | 27 + olb/Doinit.c | 132 + olb/Getstrng.c | 26 + olb/Getvrsn.c | 50 + olb/Mainfrm.cpp | 310 + olb/Mainfrm.dfm | Bin 0 -> 897 bytes olb/Mainfrm.h | 52 + olb/Online.c | 97 + olb/addstrongs.cpp | 101 + olb/dumpav.cpp | 29 + olb/olb.bpg | 26 + olb/olb2sword.bpr | 112 + olb/olb2sword.cpp | 295 + olb/online.ide | Bin 0 -> 40902 bytes olb/online.prj | 1 + olb/prn2sword.bpr | 123 + olb/prn2sword.cpp | 32 + olb/prn2swordfrm.cpp | 484 + olb/prn2swordfrm.dfm | Bin 0 -> 2540 bytes olb/prn2swordfrm.h | 37 + pix/sword.gif | Bin 0 -> 681 bytes samples/Makefile.am | 33 + samples/mods.conf.large | 466 + samples/mods.conf.small | 144 + samples/mods.d/globals.conf | 2 + samples/mods.d/rwp.conf | 23 + samples/mods.d/strongsnt.conf | 6 + samples/mods.d/strongsot.conf | 6 + samples/mods.d/vines.conf | 18 + samples/mods.d/web.conf | 17 + samples/mods.d/websters.conf | 61 + samples/recommended/README | 24 + samples/recommended/sword.conf | 2 + scripts/backupmake.sh | 5 + scripts/burncd | 1 + scripts/demotar | 1 + scripts/disttar | 7 + scripts/dlltar | 1 + scripts/eastonstar | 1 + scripts/mhctar | 1 + scripts/mkcd | 6 + scripts/mkswordbase | 14 + scripts/mkswordbase2 | 42 + scripts/mkswordtar | 28 + scripts/restoremake.sh | 5 + scripts/sapphire.cpp | 65 + scripts/svetar | 1 + scripts/swordenv | 1 + scripts/swtxtdsp.bat | 2 + scripts/vinestar | 1 + scripts/webtar | 1 + src/Makefile | 5 + src/frontend/Makefile | 5 + src/frontend/Makefile.am | 6 + src/frontend/X11/Makefile | 5 + src/frontend/framework/Makefile | 4 + src/frontend/framework/femain.cpp | 12 + src/frontend/im/Makefile | 5 + src/frontend/im/hebrewmcim.cpp | 653 + src/frontend/im/nullim.cpp | 11 + src/frontend/im/swinputmeth.cpp | 26 + src/frontend/swdisp.cpp | 35 + src/frontend/swlog.cpp | 114 + src/frontend/windoze/Makefile | 5 + src/keys/Makefile | 4 + src/keys/Makefile.am | 10 + src/keys/genarray.c | 33 + src/keys/listkey.cpp | 332 + src/keys/nt.bks | Bin 0 -> 112 bytes src/keys/nt.cps | Bin 0 -> 1152 bytes src/keys/ot.bks | Bin 0 -> 160 bytes src/keys/ot.cps | Bin 0 -> 3876 bytes src/keys/strkey.cpp | 42 + src/keys/swkey.cpp | 216 + src/keys/treekey.cpp | 96 + src/keys/treekeyidx.cpp | 643 + src/keys/versekey.cpp | 1664 ++ src/keys/versetreekey.cpp | 72 + src/mgr/Makefile | 4 + src/mgr/Makefile.am | 33 + src/mgr/curlftpt.cpp | 159 + src/mgr/encfiltmgr.cpp | 154 + src/mgr/filemgr.cpp | 566 + src/mgr/ftplibftpt.cpp | 108 + src/mgr/ftptrans.cpp | 170 + src/mgr/installmgr.cpp | 579 + src/mgr/localemgr.cpp | 257 + src/mgr/markupfiltmgr.cpp | 295 + src/mgr/stringmgr.cpp | 280 + src/mgr/swcacher.cpp | 47 + src/mgr/swconfig.cpp | 155 + src/mgr/swfiltermgr.cpp | 93 + src/mgr/swlocale.cpp | 204 + src/mgr/swmgr.cpp | 1275 ++ src/mgr/swsearchable.cpp | 53 + src/modules/Makefile | 5 + src/modules/Makefile.am | 10 + src/modules/comments/Makefile | 5 + src/modules/comments/Makefile.am | 9 + src/modules/comments/hrefcom/Makefile | 5 + src/modules/comments/hrefcom/Makefile.am | 2 + src/modules/comments/hrefcom/hrefcom.cpp | 82 + src/modules/comments/rawcom/Makefile | 5 + src/modules/comments/rawcom/Makefile.am | 2 + src/modules/comments/rawcom/rawcom.cpp | 153 + src/modules/comments/rawcom4/Makefile.am | 2 + src/modules/comments/rawcom4/rawcom4.cpp | 153 + src/modules/comments/rawfiles/Makefile | 5 + src/modules/comments/rawfiles/Makefile.am | 2 + src/modules/comments/rawfiles/rawfiles.cpp | 257 + src/modules/comments/swcom.cpp | 105 + src/modules/comments/zcom/Makefile | 5 + src/modules/comments/zcom/Makefile.am | 2 + src/modules/comments/zcom/zcom.cpp | 188 + src/modules/common/Makefile | 4 + src/modules/common/Makefile.am | 21 + src/modules/common/compress.cpp.txt | 767 + src/modules/common/entriesblk.cpp | 172 + src/modules/common/lzsscomprs.cpp | 668 + src/modules/common/rawstr.cpp | 565 + src/modules/common/rawstr4.cpp | 572 + src/modules/common/rawverse.cpp | 350 + src/modules/common/rawverse4.cpp | 350 + src/modules/common/sapphire.cpp | 216 + src/modules/common/swcipher.cpp | 128 + src/modules/common/swcomprs.cpp | 193 + src/modules/common/swcomprs.doc | 802 + src/modules/common/zipcomprs.cpp | 164 + src/modules/common/zstr.cpp | 731 + src/modules/common/zverse.cpp | 538 + src/modules/filters/Makefile | 5 + src/modules/filters/Makefile.am | 105 + src/modules/filters/cipherfil.cpp | 46 + src/modules/filters/gbffootnotes.cpp | 193 + src/modules/filters/gbfheadings.cpp | 87 + src/modules/filters/gbfhtml.cpp | 181 + src/modules/filters/gbfhtmlhref.cpp | 288 + src/modules/filters/gbfmorph.cpp | 77 + src/modules/filters/gbfosis.cpp | 420 + src/modules/filters/gbfplain.cpp | 97 + src/modules/filters/gbfredletterwords.cpp | 93 + src/modules/filters/gbfrtf.cpp | 311 + src/modules/filters/gbfstrongs.cpp | 126 + src/modules/filters/gbfthml.cpp | 216 + src/modules/filters/gbfwebif.cpp | 191 + src/modules/filters/gbfwordjs.cpp | 282 + src/modules/filters/greeklexattribs.cpp | 101 + src/modules/filters/latin1utf16.cpp | 119 + src/modules/filters/latin1utf8.cpp | 173 + src/modules/filters/osisfootnotes.cpp | 157 + src/modules/filters/osisheadings.cpp | 144 + src/modules/filters/osishtmlhref.cpp | 561 + src/modules/filters/osislemma.cpp | 85 + src/modules/filters/osismorph.cpp | 85 + src/modules/filters/osismorphsegmentation.cpp | 106 + src/modules/filters/osisosis.cpp | 173 + src/modules/filters/osisplain.cpp | 192 + src/modules/filters/osisredletterwords.cpp | 85 + src/modules/filters/osisrtf.cpp | 520 + src/modules/filters/osisscripref.cpp | 100 + src/modules/filters/osisstrongs.cpp | 257 + src/modules/filters/osisvariants.cpp | 118 + src/modules/filters/osiswebif.cpp | 198 + src/modules/filters/osiswordjs.cpp | 178 + src/modules/filters/papyriplain.cpp | 71 + src/modules/filters/plainfootnotes.cpp | 79 + src/modules/filters/plainhtml.cpp | 83 + src/modules/filters/rtfhtml.cpp | 81 + src/modules/filters/scsuutf8.cpp | 226 + src/modules/filters/swbasicfilter.cpp | 406 + src/modules/filters/swoptfilter.cpp | 47 + src/modules/filters/teihtmlhref.cpp | 205 + src/modules/filters/teiplain.cpp | 116 + src/modules/filters/teirtf.cpp | 182 + src/modules/filters/thmlfootnotes.cpp | 124 + src/modules/filters/thmlgbf.cpp | 291 + src/modules/filters/thmlheadings.cpp | 153 + src/modules/filters/thmlhtml.cpp | 236 + src/modules/filters/thmlhtmlhref.cpp | 357 + src/modules/filters/thmllemma.cpp | 65 + src/modules/filters/thmlmorph.cpp | 65 + src/modules/filters/thmlosis.cpp | 575 + src/modules/filters/thmlplain.cpp | 219 + src/modules/filters/thmlrtf.cpp | 346 + src/modules/filters/thmlscripref.cpp | 123 + src/modules/filters/thmlstrongs.cpp | 146 + src/modules/filters/thmlvariants.cpp | 118 + src/modules/filters/thmlwebif.cpp | 103 + src/modules/filters/thmlwordjs.cpp | 296 + src/modules/filters/unicodertf.cpp | 87 + src/modules/filters/utf16utf8.cpp | 90 + src/modules/filters/utf8arshaping.cpp | 51 + src/modules/filters/utf8bidireorder.cpp | 60 + src/modules/filters/utf8cantillation.cpp | 55 + src/modules/filters/utf8greekaccents.cpp | 261 + src/modules/filters/utf8hebrewpoints.cpp | 44 + src/modules/filters/utf8html.cpp | 70 + src/modules/filters/utf8latin1.cpp | 75 + src/modules/filters/utf8nfc.cpp | 50 + src/modules/filters/utf8nfkd.cpp | 52 + src/modules/filters/utf8transliterator.cpp | 888 + src/modules/filters/utf8utf16.cpp | 78 + src/modules/genbook/Makefile | 5 + src/modules/genbook/Makefile.am | 5 + src/modules/genbook/rawgenbook/Makefile | 4 + src/modules/genbook/rawgenbook/Makefile.am | 4 + src/modules/genbook/rawgenbook/rawgenbook.cpp | 219 + src/modules/genbook/swgenbook.cpp | 29 + src/modules/lexdict/Makefile | 5 + src/modules/lexdict/Makefile.am | 7 + src/modules/lexdict/rawld/Makefile | 5 + src/modules/lexdict/rawld/Makefile.am | 4 + src/modules/lexdict/rawld/rawld.cpp | 194 + src/modules/lexdict/rawld4/Makefile | 5 + src/modules/lexdict/rawld4/Makefile.am | 4 + src/modules/lexdict/rawld4/rawld4.cpp | 192 + src/modules/lexdict/swld.cpp | 82 + src/modules/lexdict/zld/Makefile | 5 + src/modules/lexdict/zld/Makefile.am | 4 + src/modules/lexdict/zld/zld.cpp | 189 + src/modules/readme | 9 + src/modules/swmodule.cpp | 1285 ++ src/modules/tests/Makefile | 4 + src/modules/tests/echomod.cpp | 27 + src/modules/texts/Makefile | 5 + src/modules/texts/Makefile.am | 7 + src/modules/texts/rawtext/Makefile | 5 + src/modules/texts/rawtext/Makefile.am | 2 + src/modules/texts/rawtext/rawtext.cpp | 548 + src/modules/texts/rawtext4/Makefile.am | 2 + src/modules/texts/rawtext4/rawtext4.cpp | 548 + src/modules/texts/swtext.cpp | 113 + src/modules/texts/ztext/Makefile | 5 + src/modules/texts/ztext/Makefile.am | 3 + src/modules/texts/ztext/ztext.cpp | 195 + src/utilfuns/Makefile | 4 + src/utilfuns/Makefile.am | 40 + src/utilfuns/ftplib.c | 1355 ++ src/utilfuns/ftpparse.c | 447 + src/utilfuns/regex.c | 5721 +++++ src/utilfuns/roman.cpp | 87 + src/utilfuns/sub.c | 36 + src/utilfuns/swbuf.cpp | 167 + src/utilfuns/swobject.cpp | 46 + src/utilfuns/swunicod.cpp | 138 + src/utilfuns/swversion.cpp | 83 + src/utilfuns/url.cpp | 269 + src/utilfuns/utilstr.cpp | 241 + src/utilfuns/utilxml.cpp | 296 + src/utilfuns/win32/dirent.cpp | 131 + src/utilfuns/win32/dirent.h | 32 + src/utilfuns/zlib/adler32.c | 48 + src/utilfuns/zlib/compress.c | 68 + src/utilfuns/zlib/crc32.c | 162 + src/utilfuns/zlib/deflate.c | 1350 ++ src/utilfuns/zlib/deflate.h | 318 + src/utilfuns/zlib/gzio.c | 875 + src/utilfuns/zlib/infblock.c | 403 + src/utilfuns/zlib/infblock.h | 39 + src/utilfuns/zlib/infcodes.c | 251 + src/utilfuns/zlib/infcodes.h | 27 + src/utilfuns/zlib/inffast.c | 183 + src/utilfuns/zlib/inffast.h | 17 + src/utilfuns/zlib/inffixed.h | 151 + src/utilfuns/zlib/inflate.c | 366 + src/utilfuns/zlib/inftrees.c | 454 + src/utilfuns/zlib/inftrees.h | 58 + src/utilfuns/zlib/infutil.c | 87 + src/utilfuns/zlib/infutil.h | 98 + src/utilfuns/zlib/maketree.c | 85 + src/utilfuns/zlib/trees.c | 1214 + src/utilfuns/zlib/trees.h | 128 + src/utilfuns/zlib/uncompr.c | 58 + src/utilfuns/zlib/untgz.c | 436 + src/utilfuns/zlib/zutil.c | 225 + src/utilfuns/zlib/zutil.h | 220 + stamp-h.in | 0 sword-1.5.9.tar.gz | Bin 1816315 -> 0 bytes sword.bmp | Bin 0 -> 8950 bytes sword.kdevprj | 1989 ++ sword.pc.in | 14 + sword.spec.in | 90 + tests/.cvsignore | 34 + tests/Makefile.am | 68 + tests/Makefile.in | 882 + tests/bcppmake/Makefile.am | 11 + tests/bcppmake/filtertest.bpf | 10 + tests/bcppmake/filtertest.bpr | 116 + tests/bcppmake/libsword.bpf | 116 + tests/bcppmake/libsword.bpr | 196 + tests/bcppmake/mgrtest.bpf | 10 + tests/bcppmake/mgrtest.bpr | 116 + tests/bcppmake/parsekey.bpf | 10 + tests/bcppmake/parsekey.bpr | 116 + tests/bcppmake/tests.bpg | 33 + tests/casttest.cpp | 30 + tests/ciphertest.cpp | 32 + tests/complzss.cpp | 110 + tests/compnone.cpp | 110 + tests/compzip.cpp | 109 + tests/configtest.cpp | 16 + tests/cppunit/Makefile.am | 16 + tests/cppunit/Makefile.in | 630 + tests/cppunit/main.cpp | 25 + tests/cppunit/stringmgr_test.cpp | 43 + tests/cppunit/swbuf_test.cpp | 113 + tests/cppunit/url_test.cpp | 108 + tests/cppunit/versekey_test.cpp | 280 + tests/filtertest.cpp | 23 + tests/icutest.cpp | 37 + tests/indextest.cpp | 23 + tests/installmgrtest.cpp | 12 + tests/introtest.cpp | 110 + tests/keycast.cpp | 33 + tests/keytest.cpp | 173 + tests/lextest.cpp | 26 + tests/listtest.cpp | 73 + tests/localetest.cpp | 33 + tests/mgrtest.cpp | 44 + tests/modtest.cpp | 21 + tests/outputcps.cpp | 59 + tests/parsekey.cpp | 43 + tests/rawldidxtest.cpp | 49 + tests/refsystest.cpp | 29 + tests/romantest.cpp | 26 + tests/swaptest.cpp | 9 + tests/swbuftest.cpp | 159 + tests/testblocks.cpp | 89 + tests/testsuite/.cvsignore | 1 + tests/testsuite/Makefile.am | 6 + tests/testsuite/runall.sh | 21 + tests/testsuite/runtest.sh | 25 + tests/testsuite/versekey.good | 5 + tests/testsuite/versekey.sh | 3 + tests/testsuite/verseparsing-utf8.good | 16 + tests/testsuite/verseparsing-utf8.sh | 12 + tests/testsuite/verseparsing.good | 65 + tests/testsuite/verseparsing.sh | 64 + tests/testsuite/xmltag.good | 136 + tests/testsuite/xmltag.sh | 12 + tests/tlitmgrtest.cpp | 715 + tests/tmp/.cvsignore | 2 + tests/tmp/Makefile.am | 3 + tests/tmp/README | 2 + tests/translittest.cpp | 142 + tests/versekeytest.cpp | 58 + tests/webiftest.cpp | 56 + tests/xmltest.cpp | 52 + usrinst.sh | 37 + utilities/.cvsignore | 31 + utilities/Makefile.am | 76 + utilities/Makefile.in | 949 + utilities/addcomment.cpp | 39 + utilities/addgb.cpp | 117 + utilities/addld.cpp | 200 + utilities/addvs.cpp | 186 + utilities/bcpp6make/cipherraw.bpf | 3 + utilities/bcpp6make/cipherraw.bpr | 145 + utilities/bcpp6make/diatheke.bpf | 6 + utilities/bcpp6make/diatheke.bpr | 159 + utilities/bcpp6make/imp2gbs.bpf | 3 + utilities/bcpp6make/imp2gbs.bpr | 145 + utilities/bcpp6make/imp2ld.bpf | 3 + utilities/bcpp6make/imp2ld.bpr | 145 + utilities/bcpp6make/imp2vs.bpf | 3 + utilities/bcpp6make/imp2vs.bpr | 145 + utilities/bcpp6make/mkfastmod.bpf | 3 + utilities/bcpp6make/mkfastmod.bpr | 145 + utilities/bcpp6make/mod2imp.bpf | 3 + utilities/bcpp6make/mod2imp.bpr | 145 + utilities/bcpp6make/mod2osis.bpf | 3 + utilities/bcpp6make/mod2osis.bpr | 145 + utilities/bcpp6make/mod2vpl.bpf | 3 + utilities/bcpp6make/mod2vpl.bpr | 145 + utilities/bcpp6make/mod2zmod.bpf | 6 + utilities/bcpp6make/mod2zmod.bpr | 145 + utilities/bcpp6make/obj/dummy | 0 utilities/bcpp6make/osis2mod.bpf | 6 + utilities/bcpp6make/osis2mod.bpr | 146 + utilities/bcpp6make/stage/dummy | 0 utilities/bcpp6make/step2vpl.bpf | 6 + utilities/bcpp6make/step2vpl.bpr | 145 + utilities/bcpp6make/stepdump.bpf | 6 + utilities/bcpp6make/stepdump.bpr | 145 + utilities/bcpp6make/utils.bpg | 89 + utilities/bcpp6make/vpl2mod.bpf | 6 + utilities/bcpp6make/vpl2mod.bpr | 145 + utilities/bcpp6make/vs2osisref.bpf | 6 + utilities/bcpp6make/vs2osisref.bpr | 145 + utilities/bcpp6make/xml2gbs.bpf | 6 + utilities/bcpp6make/xml2gbs.bpr | 145 + utilities/bcppmake/Makefile.am | 37 + utilities/bcppmake/cipherraw.bdsproj | 322 + utilities/bcppmake/cipherraw.bpf | 11 + utilities/bcppmake/cipherraw.bpr | 124 + utilities/bcppmake/diatheke.bdsproj | 306 + utilities/bcppmake/diatheke.bpf | 17 + utilities/bcppmake/diatheke.bpr | 120 + utilities/bcppmake/imp2gbs.bdsproj | 323 + utilities/bcppmake/imp2gbs.bpf | 11 + utilities/bcppmake/imp2gbs.bpr | 130 + utilities/bcppmake/imp2ld.bdsproj | 314 + utilities/bcppmake/imp2ld.bpf | 11 + utilities/bcppmake/imp2ld.bpr | 128 + utilities/bcppmake/imp2vs.bdsproj | 314 + utilities/bcppmake/imp2vs.bpf | 11 + utilities/bcppmake/imp2vs.bpr | 128 + utilities/bcppmake/installmgr.bdsproj | 327 + utilities/bcppmake/installmgr.bpf | 12 + utilities/bcppmake/installmgr.bpr | 124 + utilities/bcppmake/libsword.bpf | 118 + utilities/bcppmake/libsword.bpr | 204 + utilities/bcppmake/mkfastmod.bdsproj | 320 + utilities/bcppmake/mkfastmod.bpf | 11 + utilities/bcppmake/mkfastmod.bpr | 125 + utilities/bcppmake/mod2imp.bdsproj | 311 + utilities/bcppmake/mod2imp.bpf | 11 + utilities/bcppmake/mod2imp.bpr | 123 + utilities/bcppmake/mod2osis.bdsproj | 296 + utilities/bcppmake/mod2osis.bpf | 11 + utilities/bcppmake/mod2osis.bpr | 122 + utilities/bcppmake/mod2vpl.bdsproj | 311 + utilities/bcppmake/mod2vpl.bpf | 11 + utilities/bcppmake/mod2vpl.bpr | 123 + utilities/bcppmake/mod2zmod.bdsproj | 318 + utilities/bcppmake/mod2zmod.bpf | 11 + utilities/bcppmake/mod2zmod.bpr | 126 + utilities/bcppmake/osis2mod.bdsproj | 306 + utilities/bcppmake/osis2mod.bpf | 11 + utilities/bcppmake/osis2mod.bpr | 123 + utilities/bcppmake/step2vpl.bdsproj | 311 + utilities/bcppmake/step2vpl.bpf | 11 + utilities/bcppmake/step2vpl.bpr | 123 + utilities/bcppmake/stepdump.bdsproj | 311 + utilities/bcppmake/stepdump.bpf | 11 + utilities/bcppmake/stepdump.bpr | 123 + utilities/bcppmake/tei2mod.bpf | 11 + utilities/bcppmake/tei2mod.bpr | 123 + utilities/bcppmake/utilities.bdsgroup | 40 + utilities/bcppmake/utilities.bpg | 113 + utilities/bcppmake/vpl2mod.bdsproj | 311 + utilities/bcppmake/vpl2mod.bpf | 11 + utilities/bcppmake/vpl2mod.bpr | 123 + utilities/bcppmake/vs2osisref.bdsproj | 296 + utilities/bcppmake/vs2osisref.bpf | 11 + utilities/bcppmake/vs2osisref.bpr | 122 + utilities/bcppmake/xml2gbs.bdsproj | 319 + utilities/bcppmake/xml2gbs.bpf | 11 + utilities/bcppmake/xml2gbs.bpr | 124 + utilities/cipherraw.cpp | 104 + utilities/diatheke/.cvsignore | 5 + utilities/diatheke/Makefile.am | 24 + utilities/diatheke/Makefile.in | 521 + utilities/diatheke/README | 76 + utilities/diatheke/cgi/Makefile.am | 6 + utilities/diatheke/cgi/dia-def.pl | 41 + utilities/diatheke/cgi/diatheke.pl | 509 + utilities/diatheke/cgi/index-private.html | 1264 + utilities/diatheke/cgi/index-public.html | 883 + utilities/diatheke/corediatheke.cpp | 449 + utilities/diatheke/corediatheke.h | 43 + utilities/diatheke/diafiltmgr.cpp | 228 + utilities/diatheke/diafiltmgr.h | 47 + utilities/diatheke/diatheke.cpp | 225 + utilities/diatheke/diatheke.dsp | 204 + utilities/diatheke/diatheke.dsw | 44 + utilities/diatheke/diathekemgr.cpp | 109 + utilities/diatheke/diathekemgr.h | 35 + utilities/diatheke/gbfcgi.cpp | 138 + utilities/diatheke/gbfcgi.h | 38 + utilities/diatheke/osiscgi.cpp | 325 + utilities/diatheke/osiscgi.h | 48 + utilities/diatheke/pqa/Diatheke.pqa | Bin 0 -> 662 bytes utilities/diatheke/pqa/src/README | 1 + utilities/diatheke/pqa/src/all.html | 170 + utilities/diatheke/pqa/src/ancient.html | 32 + utilities/diatheke/pqa/src/dict.html | 32 + utilities/diatheke/pqa/src/english.html | 68 + utilities/diatheke/pqa/src/french.html | 26 + utilities/diatheke/pqa/src/german.html | 35 + utilities/diatheke/pqa/src/index.html | 43 + utilities/diatheke/pqa/src/lex.html | 29 + utilities/diatheke/pqa/src/other.html | 57 + utilities/diatheke/pqa/src/spanish.html | 29 + utilities/diatheke/soap/sapouni.cgi | 97 + utilities/diatheke/soap/soapatheke.pl | 16 + utilities/diatheke/tcl/biblebot-diatheke.tcl | 2131 ++ utilities/diatheke/thmlcgi.cpp | 193 + utilities/diatheke/thmlcgi.h | 38 + utilities/emptyvss.cpp | 54 + utilities/gbfidx.cpp | 288 + utilities/genbookutil.cpp | 201 + utilities/imp2gbs.cpp | 254 + utilities/imp2ld.cpp | 175 + utilities/imp2vs.cpp | 182 + utilities/installmgr.cpp | 287 + utilities/kylixmake/Makefile.am | 8 + utilities/kylixmake/libsword.bpf | 8 + utilities/kylixmake/libsword.bpr | 238 + utilities/kylixmake/mod2zmod.bpf | 5 + utilities/kylixmake/mod2zmod.bpr | 84 + utilities/kylixmake/mod2zmod.res | Bin 0 -> 32 bytes utilities/kylixmake/utilities.bpg | 24 + utilities/lexdump.c | 52 + utilities/mkfastmod.cpp | 72 + utilities/mod2imp.cpp | 75 + utilities/mod2osis.cpp | 200 + utilities/mod2vpl.cpp | 85 + utilities/mod2zmod.cpp | 189 + utilities/mod2zmod2.cpp | 205 + utilities/modwrite.cpp | 63 + utilities/no13.c | 34 + utilities/osis2mod.cpp | 1090 + utilities/perl/Makefile.am | 6 + utilities/perl/cipherkeygen.pl | 24 + utilities/perl/linkvers.pl | 44 + utilities/perl/localecap.pl | 23 + utilities/perl/mkvsmod.pl | 21 + utilities/step2vpl.cpp | 429 + utilities/stepdump.cpp | 253 + utilities/tei2mod.cpp | 531 + utilities/treeidxutil.cpp | 145 + utilities/vpl2mod.cpp | 263 + utilities/vpl2zmod2.cpp | 293 + utilities/vs2osisref.cpp | 57 + utilities/xml2gbs.cpp | 363 + 1030 files changed, 250852 insertions(+) create mode 100644 AUTHORS create mode 100644 CODINGSTYLE create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 INSTALL create mode 100644 LICENSE create mode 100644 Makefile.am create mode 100644 Makefile.cvs create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100644 README.svn create mode 100644 aclocal.m4 create mode 100755 arminst.sh create mode 100755 autogen.sh create mode 100644 bindings/Makefile create mode 100644 bindings/Makefile.am create mode 100644 bindings/README create mode 100755 bindings/autogen.sh create mode 100644 bindings/bcppmake/MainCLXTest.cpp create mode 100644 bindings/bcppmake/MainCLXTest.dfm create mode 100644 bindings/bcppmake/MainCLXTest.h create mode 100644 bindings/bcppmake/MainTest.cpp create mode 100644 bindings/bcppmake/MainTest.dfm create mode 100644 bindings/bcppmake/MainTest.h create mode 100644 bindings/bcppmake/Makefile.am create mode 100644 bindings/bcppmake/clxtest.bpr create mode 100644 bindings/bcppmake/clxtest.cpp create mode 100644 bindings/bcppmake/sword.bpf create mode 100644 bindings/bcppmake/sword.bpr create mode 100644 bindings/bcppmake/sword.c create mode 100644 bindings/bcppmake/sworddll.bpg create mode 100644 bindings/bcppmake/test.cpp create mode 100644 bindings/clx/Sword.pas create mode 100644 bindings/clx/test1/MainFrm.pas create mode 100644 bindings/clx/test1/MainFrm.xfm create mode 100644 bindings/clx/test1/test1.conf create mode 100644 bindings/clx/test1/test1.dpr create mode 100644 bindings/clx/test1/test1.kof create mode 100644 bindings/clx/test1/test1.res create mode 100644 bindings/clx/test1/test1g.bpg create mode 100644 bindings/clx/test2/MainFrm.pas create mode 100644 bindings/clx/test2/MainFrm.xfm create mode 100644 bindings/clx/test2/test2.conf create mode 100644 bindings/clx/test2/test2.dpr create mode 100644 bindings/clx/test2/test2.kof create mode 100644 bindings/clx/test2/test2.res create mode 100644 bindings/configure.ac create mode 100644 bindings/corba/Makefile.am create mode 100644 bindings/corba/java/Makefile create mode 100644 bindings/corba/java/Makefile.in create mode 100644 bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java create mode 100644 bindings/corba/java/src/org/crosswire/util/Base64.java create mode 100644 bindings/corba/java/src/org/crosswire/web/i18n/ContextStart.java.notyet create mode 100644 bindings/corba/java/src/org/crosswire/web/i18n/TranslateTag.java create mode 100644 bindings/corba/java/swordorb.jpx create mode 100644 bindings/corba/java/swordorb.jpx.local create mode 100755 bindings/corba/java/testclient create mode 100644 bindings/corba/orbitcpp/Makefile create mode 100644 bindings/corba/orbitcpp/Makefile.am create mode 100644 bindings/corba/orbitcpp/server.cpp create mode 100644 bindings/corba/orbitcpp/swordorb-impl.cpp create mode 100644 bindings/corba/orbitcpp/swordorb-impl.hpp create mode 100644 bindings/corba/orbitcpp/testclient.cpp create mode 100644 bindings/corba/orbitcpp/webmgr.hpp create mode 100644 bindings/corba/swordorb.idl create mode 100644 bindings/flatapi.cpp create mode 100644 bindings/gsoap/Makefile create mode 100644 bindings/gsoap/Makefile.am create mode 100644 bindings/gsoap/gsoapsword.cpp create mode 100644 bindings/gsoap/gsoapsword.h create mode 100644 bindings/gsoap/include/stdsoap.h create mode 100755 bindings/gsoap/soapcpp create mode 100644 bindings/gsoap/stdsoap.o create mode 100644 bindings/gsoap/testclient.cpp create mode 100644 bindings/swig/README create mode 100755 bindings/swig/bases.i create mode 100644 bindings/swig/defs.i create mode 100644 bindings/swig/directors.i create mode 100644 bindings/swig/encfiltmgr.i create mode 100755 bindings/swig/examples/mod2zmod.pl create mode 100755 bindings/swig/extras.i create mode 100644 bindings/swig/filemgr.i create mode 100644 bindings/swig/ftptrans.i create mode 100644 bindings/swig/installmgr.i create mode 100644 bindings/swig/listkey.i create mode 100644 bindings/swig/localemgr.i create mode 100644 bindings/swig/lzsscomprs.i create mode 100755 bindings/swig/markupcallback.h create mode 100644 bindings/swig/markupfiltmgr.i create mode 100644 bindings/swig/oldmake/Makefile.am create mode 100644 bindings/swig/oldmake/Makefile.oth create mode 100644 bindings/swig/oldmake/Makefile.swig create mode 100755 bindings/swig/osishtmlhref.i create mode 100644 bindings/swig/package/Makefile.am create mode 100644 bindings/swig/package/Makefile.in create mode 100644 bindings/swig/package/README.cvs create mode 100644 bindings/swig/package/aclocal.m4 create mode 100755 bindings/swig/package/autogen.sh create mode 100755 bindings/swig/package/bases.i create mode 100755 bindings/swig/package/config.guess create mode 100755 bindings/swig/package/config.sub create mode 100755 bindings/swig/package/configure create mode 100644 bindings/swig/package/configure.ac create mode 100644 bindings/swig/package/defs.i create mode 100755 bindings/swig/package/depcomp create mode 100644 bindings/swig/package/directors.i create mode 100644 bindings/swig/package/encfiltmgr.i create mode 100755 bindings/swig/package/extras.i create mode 100644 bindings/swig/package/filemgr.i create mode 100644 bindings/swig/package/ftptrans.i create mode 100755 bindings/swig/package/install-sh create mode 100644 bindings/swig/package/installmgr.i create mode 100644 bindings/swig/package/listkey.i create mode 100644 bindings/swig/package/localemgr.i create mode 100644 bindings/swig/package/ltmain.sh create mode 100644 bindings/swig/package/lzsscomprs.i create mode 100755 bindings/swig/package/markupcallback.h create mode 100644 bindings/swig/package/markupfiltmgr.i create mode 100755 bindings/swig/package/missing create mode 100755 bindings/swig/package/osishtmlhref.i create mode 100644 bindings/swig/package/perl.m4 create mode 100644 bindings/swig/package/php4.m4 create mode 100644 bindings/swig/package/python.m4 create mode 100644 bindings/swig/package/rawcom.i create mode 100644 bindings/swig/package/rawgenbook.i create mode 100644 bindings/swig/package/rawld.i create mode 100644 bindings/swig/package/rawld4.i create mode 100644 bindings/swig/package/rawtext.i create mode 100755 bindings/swig/package/rendercallback.h create mode 100755 bindings/swig/package/searcher.h create mode 100644 bindings/swig/package/stringmgr.i create mode 100644 bindings/swig/package/swbuf.i create mode 100644 bindings/swig/package/swcacher.i create mode 100644 bindings/swig/package/swcom.i create mode 100644 bindings/swig/package/swcomprs.i create mode 100644 bindings/swig/package/swconfig.i create mode 100644 bindings/swig/package/swdisp.i create mode 100644 bindings/swig/package/swfilter.i create mode 100644 bindings/swig/package/swfiltermgr.i create mode 100644 bindings/swig/package/swgenbook.i create mode 100644 bindings/swig/package/swig.m4 create mode 100644 bindings/swig/package/swkey.i create mode 100644 bindings/swig/package/swld.i create mode 100644 bindings/swig/package/swlocale.i create mode 100644 bindings/swig/package/swlog.i create mode 100644 bindings/swig/package/swmgr.i create mode 100644 bindings/swig/package/swmodule.i create mode 100644 bindings/swig/package/swobject.i create mode 100644 bindings/swig/package/swoptfilter.i create mode 100644 bindings/swig/package/sword.i create mode 100644 bindings/swig/package/sword.m4 create mode 100644 bindings/swig/package/swsearchable.i create mode 100644 bindings/swig/package/swtext.i create mode 100644 bindings/swig/package/swversion.i create mode 100644 bindings/swig/package/tcl.m4 create mode 100644 bindings/swig/package/templates.i create mode 100644 bindings/swig/package/treekey.i create mode 100644 bindings/swig/package/treekeyidx.i create mode 100644 bindings/swig/package/url.i create mode 100644 bindings/swig/package/utilxml.i create mode 100644 bindings/swig/package/versekey.i create mode 100644 bindings/swig/package/versetreekey.i create mode 100644 bindings/swig/package/zcom.i create mode 100644 bindings/swig/package/zipcomprs.i create mode 100644 bindings/swig/package/zld.i create mode 100644 bindings/swig/package/zlib.m4 create mode 100644 bindings/swig/package/ztext.i create mode 100644 bindings/swig/rawcom.i create mode 100644 bindings/swig/rawgenbook.i create mode 100644 bindings/swig/rawld.i create mode 100644 bindings/swig/rawld4.i create mode 100644 bindings/swig/rawtext.i create mode 100755 bindings/swig/rendercallback.h create mode 100755 bindings/swig/searcher.h create mode 100644 bindings/swig/stringmgr.i create mode 100644 bindings/swig/swbuf.i create mode 100644 bindings/swig/swcacher.i create mode 100644 bindings/swig/swcom.i create mode 100644 bindings/swig/swcomprs.i create mode 100644 bindings/swig/swconfig.i create mode 100644 bindings/swig/swdisp.i create mode 100644 bindings/swig/swfilter.i create mode 100644 bindings/swig/swfiltermgr.i create mode 100644 bindings/swig/swgenbook.i create mode 100644 bindings/swig/swig-perl.doxygen create mode 100644 bindings/swig/swkey.i create mode 100644 bindings/swig/swld.i create mode 100644 bindings/swig/swlocale.i create mode 100644 bindings/swig/swlog.i create mode 100644 bindings/swig/swmgr.i create mode 100644 bindings/swig/swmodule.i create mode 100644 bindings/swig/swobject.i create mode 100644 bindings/swig/swoptfilter.i create mode 100644 bindings/swig/sword.i create mode 100644 bindings/swig/sword.pl create mode 100644 bindings/swig/swsearchable.i create mode 100644 bindings/swig/swtext.i create mode 100644 bindings/swig/swversion.i create mode 100644 bindings/swig/templates.i create mode 100644 bindings/swig/treekey.i create mode 100644 bindings/swig/treekeyidx.i create mode 100644 bindings/swig/url.i create mode 100644 bindings/swig/utilxml.i create mode 100644 bindings/swig/versekey.i create mode 100644 bindings/swig/versetreekey.i create mode 100644 bindings/swig/vstudio/SwigSword.csproj create mode 100644 bindings/swig/vstudio/libsword-csharpbindings.sln create mode 100644 bindings/swig/vstudio/libsword_csharpsword.vcproj create mode 100644 bindings/swig/zcom.i create mode 100644 bindings/swig/zipcomprs.i create mode 100644 bindings/swig/zld.i create mode 100644 bindings/swig/ztext.i create mode 100755 bindings/usrinst.sh create mode 100644 buildtest.cpp create mode 100755 config.guess create mode 100644 config.h.in create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.ac create mode 100755 depcomp create mode 100644 distignore create mode 100644 doc/Makefile.am create mode 100644 doc/README create mode 100644 doc/greektrans.txt create mode 100644 doc/translation-template.conf create mode 100644 examples/.cvsignore create mode 100644 examples/Makefile.am create mode 100644 examples/Makefile.in create mode 100644 examples/classes/Makefile create mode 100644 examples/classes/ciphercng.cpp create mode 100644 examples/classes/swmgrex.cpp create mode 100644 examples/cmdline/.cvsignore create mode 100644 examples/cmdline/Makefile.am create mode 100644 examples/cmdline/Makefile.in create mode 100644 examples/cmdline/listoptions.cpp create mode 100644 examples/cmdline/lookup.cpp create mode 100644 examples/cmdline/search.cpp create mode 100755 examples/cmdline/threaded_search.cpp create mode 100644 examples/cmdline/verserangeparse.cpp create mode 100644 examples/simple.cpp create mode 100644 icu/.cvsignore create mode 100644 icu/Makefile.am create mode 100644 icu/Makefile.in create mode 100644 icu/translit_Any_Latex.txt create mode 100644 icu/translit_Any_Latin1.txt create mode 100644 icu/translit_BETA_Greek.txt create mode 100644 icu/translit_BGreek_Greek.txt create mode 100644 icu/translit_CCAT_Hebrew.txt create mode 100644 icu/translit_CCAT_Syriac.txt create mode 100644 icu/translit_Latin_Arabic.txt create mode 100644 icu/translit_Latin_Armenian.txt create mode 100644 icu/translit_Latin_Coptic.txt create mode 100644 icu/translit_Latin_Ethiopic.txt create mode 100644 icu/translit_Latin_Georgian.txt create mode 100644 icu/translit_Latin_Gothic.txt create mode 100644 icu/translit_Latin_Hebrew.txt create mode 100644 icu/translit_Latin_Syriac.txt create mode 100644 icu/translit_Latin_Thai.txt create mode 100644 icu/translit_Latin_Ugaritic.txt create mode 100644 icu/translit_swordindex.txt create mode 100644 include/.cvsignore create mode 100644 include/Greek2Greek.h create mode 100644 include/GreekChars.h create mode 100644 include/Makefile create mode 100644 include/Makefile.am create mode 100644 include/SwordAPI.pas create mode 100644 include/apocrypha.h create mode 100644 include/canon.h create mode 100644 include/cipherfil.h create mode 100644 include/config.h create mode 100644 include/config.h.in create mode 100644 include/curlftpt.h create mode 100644 include/defs.h create mode 100644 include/echomod.h create mode 100644 include/encfiltmgr.h create mode 100644 include/entriesblk.h create mode 100644 include/femain.h create mode 100644 include/filemgr.h create mode 100644 include/flatapi.h create mode 100644 include/ftplib.h create mode 100644 include/ftplibftpt.h create mode 100644 include/ftpparse.h create mode 100644 include/ftptrans.h create mode 100644 include/gbffootnotes.h create mode 100644 include/gbfheadings.h create mode 100644 include/gbfhtml.h create mode 100644 include/gbfhtmlhref.h create mode 100644 include/gbfmorph.h create mode 100644 include/gbfosis.h create mode 100644 include/gbfplain.h create mode 100644 include/gbfredletterwords.h create mode 100644 include/gbfrtf.h create mode 100644 include/gbfstrongs.h create mode 100644 include/gbfthml.h create mode 100644 include/gbfwebif.h create mode 100644 include/gbfwordjs.h create mode 100644 include/greeklexattribs.h create mode 100644 include/hebrewmcim.h create mode 100644 include/hrefcom.h create mode 100644 include/installmgr.h create mode 100644 include/latin1utf16.h create mode 100644 include/latin1utf8.h create mode 100644 include/listkey.h create mode 100644 include/localemgr.h create mode 100644 include/lzsscomprs.h create mode 100644 include/markupfiltmgr.h create mode 100644 include/multimapwdef.h create mode 100644 include/nullim.h create mode 100644 include/osisbook.h create mode 100644 include/osisfootnotes.h create mode 100644 include/osisheadings.h create mode 100644 include/osishtmlhref.h create mode 100644 include/osislemma.h create mode 100644 include/osismorph.h create mode 100644 include/osismorphsegmentation.h create mode 100644 include/osisosis.h create mode 100644 include/osisplain.h create mode 100644 include/osisredletterwords.h create mode 100644 include/osisrtf.h create mode 100644 include/osisscripref.h create mode 100644 include/osisstrongs.h create mode 100644 include/osisvariants.h create mode 100644 include/osiswebif.h create mode 100644 include/osiswordjs.h create mode 100644 include/papyriplain.h create mode 100644 include/plainfootnotes.h create mode 100644 include/plainhtml.h create mode 100644 include/rawcom.h create mode 100644 include/rawcom4.h create mode 100644 include/rawfiles.h create mode 100644 include/rawgenbook.h create mode 100644 include/rawld.h create mode 100644 include/rawld4.h create mode 100644 include/rawstr.h create mode 100644 include/rawstr4.h create mode 100644 include/rawtext.h create mode 100644 include/rawtext4.h create mode 100644 include/rawverse.h create mode 100644 include/rawverse4.h create mode 100644 include/regex.h create mode 100644 include/roman.h create mode 100644 include/rtfhtml.h create mode 100644 include/sapphire.h create mode 100644 include/scsuutf8.h create mode 100644 include/stringmgr.h create mode 100644 include/strkey.h create mode 100644 include/swbasicfilter.h create mode 100644 include/swbuf.h create mode 100644 include/swcacher.h create mode 100644 include/swcipher.h create mode 100644 include/swcom.h create mode 100644 include/swcomprs.h create mode 100644 include/swconfig.h create mode 100644 include/swdisp.h create mode 100644 include/swfilter.h create mode 100644 include/swfiltermgr.h create mode 100644 include/swgenbook.h create mode 100644 include/swinputmeth.h create mode 100644 include/swkey.h create mode 100644 include/swld.h create mode 100644 include/swlocale.h create mode 100644 include/swlog.h create mode 100644 include/swmacs.h create mode 100644 include/swmgr.h create mode 100644 include/swmodule.h create mode 100644 include/swobject.h create mode 100644 include/swoptfilter.h create mode 100644 include/swsearchable.h create mode 100644 include/swtext.h create mode 100644 include/swunicod.h create mode 100644 include/swversion.h create mode 100644 include/sysdata.h create mode 100644 include/teihtmlhref.h create mode 100644 include/teiplain.h create mode 100644 include/teirtf.h create mode 100644 include/thmlfootnotes.h create mode 100644 include/thmlgbf.h create mode 100644 include/thmlheadings.h create mode 100644 include/thmlhtml.h create mode 100644 include/thmlhtmlhref.h create mode 100644 include/thmllemma.h create mode 100644 include/thmlmorph.h create mode 100644 include/thmlosis.h create mode 100644 include/thmlplain.h create mode 100644 include/thmlrtf.h create mode 100644 include/thmlscripref.h create mode 100644 include/thmlstrongs.h create mode 100644 include/thmlvariants.h create mode 100644 include/thmlwebif.h create mode 100644 include/thmlwordjs.h create mode 100644 include/treekey.h create mode 100644 include/treekeyidx.h create mode 100644 include/unicodertf.h create mode 100644 include/untgz.h create mode 100644 include/url.h create mode 100644 include/utf16utf8.h create mode 100644 include/utf8arshaping.h create mode 100644 include/utf8bidireorder.h create mode 100644 include/utf8cantillation.h create mode 100644 include/utf8greekaccents.h create mode 100644 include/utf8hebrewpoints.h create mode 100644 include/utf8html.h create mode 100644 include/utf8latin1.h create mode 100644 include/utf8nfc.h create mode 100644 include/utf8nfkd.h create mode 100644 include/utf8transliterator.h create mode 100644 include/utf8utf16.h create mode 100644 include/utilstr.h create mode 100644 include/utilxml.h create mode 100644 include/versekey.h create mode 100644 include/versetreekey.h create mode 100644 include/zcom.h create mode 100644 include/zconf.h create mode 100644 include/zipcomprs.h create mode 100644 include/zld.h create mode 100644 include/zlib.h create mode 100644 include/zstr.h create mode 100644 include/ztext.h create mode 100644 include/zverse.h create mode 100755 install-sh create mode 100644 lib/.cvsignore create mode 100644 lib/Makefile.am create mode 100644 lib/Makefile.in create mode 100644 lib/README create mode 100644 lib/bcppmake/libsword.bdsproj create mode 100644 lib/bcppmake/libsword.bpf create mode 100644 lib/bcppmake/libsword.bpr create mode 100644 lib/bcppmake/libsword6icu.bpf create mode 100644 lib/bcppmake/libsword6icu.bpr create mode 100644 lib/vcppmake/vc7.1/libsword.vcproj create mode 100644 lib/vcppmake/vc8/libsword.vcproj create mode 100644 locales.d/Makefile.am create mode 100644 locales.d/abbr.conf create mode 100644 locales.d/af-utf8.conf create mode 100644 locales.d/af.conf create mode 100644 locales.d/ar_EG-cp1256.conf create mode 100644 locales.d/ar_EG-utf8.conf create mode 100644 locales.d/bg_BG-cp1251.conf create mode 100644 locales.d/bg_BG-utf8.conf create mode 100644 locales.d/cs-utf8.conf create mode 100644 locales.d/cs.conf create mode 100644 locales.d/da-utf8.conf create mode 100644 locales.d/da.conf create mode 100644 locales.d/de-utf8.conf create mode 100644 locales.d/de.conf create mode 100644 locales.d/de_abbrev-utf8.conf create mode 100644 locales.d/de_abbrev.conf create mode 100644 locales.d/en_GB.conf create mode 100644 locales.d/es-utf8.conf create mode 100644 locales.d/es.conf create mode 100644 locales.d/et-utf8.conf create mode 100644 locales.d/et.conf create mode 100644 locales.d/et_abbr-utf8.conf create mode 100644 locales.d/et_abbr.conf create mode 100644 locales.d/fa-utf8.conf create mode 100644 locales.d/fi-utf8.conf create mode 100755 locales.d/fi.conf create mode 100644 locales.d/fr-utf8.conf create mode 100644 locales.d/fr.conf create mode 100644 locales.d/fr_abbrev-utf8.conf create mode 100644 locales.d/fr_abbrev.conf create mode 100644 locales.d/he-utf8.conf create mode 100644 locales.d/hu-utf8.conf create mode 100644 locales.d/hu.conf create mode 100644 locales.d/id.conf create mode 100644 locales.d/it-utf8.conf create mode 100644 locales.d/it.conf create mode 100644 locales.d/ja.conf create mode 100644 locales.d/ko-utf8.conf create mode 100644 locales.d/ko.conf create mode 100644 locales.d/ko_abbrev-utf8.conf create mode 100644 locales.d/ko_abbrev.conf create mode 100644 locales.d/la.conf create mode 100644 locales.d/lt-utf8.conf create mode 100644 locales.d/nl.conf create mode 100644 locales.d/no-utf8.conf create mode 100644 locales.d/no.conf create mode 100644 locales.d/pl-utf8.conf create mode 100644 locales.d/pl.conf create mode 100644 locales.d/pt-utf8.conf create mode 100644 locales.d/pt.conf create mode 100644 locales.d/pt_BR-utf8.conf create mode 100644 locales.d/pt_BR.conf create mode 100644 locales.d/ro.conf create mode 100755 locales.d/ru_RU-cp1251.conf create mode 100755 locales.d/ru_RU-koi8-r.conf create mode 100644 locales.d/ru_RU-utf8.conf create mode 100644 locales.d/sk-utf8.conf create mode 100644 locales.d/sk.conf create mode 100644 locales.d/sl.conf create mode 100644 locales.d/sv-utf8.conf create mode 100644 locales.d/sv.conf create mode 100644 locales.d/th-utf8.conf create mode 100755 locales.d/uk_UA-cp1251.conf create mode 100755 locales.d/uk_UA-koi8-u.conf create mode 100644 locales.d/uk_UA-utf8.conf create mode 100644 locales.d/vi-utf8.conf create mode 100644 ltmain.sh create mode 100644 m4/acx_clucene.m4 create mode 100644 m4/cppunit.m4 create mode 100755 missing create mode 100644 obj/Makefile create mode 100644 olb/Convert.bpr create mode 100644 olb/Convert.cpp create mode 100644 olb/Doinit.c create mode 100644 olb/Getstrng.c create mode 100644 olb/Getvrsn.c create mode 100644 olb/Mainfrm.cpp create mode 100644 olb/Mainfrm.dfm create mode 100644 olb/Mainfrm.h create mode 100644 olb/Online.c create mode 100644 olb/addstrongs.cpp create mode 100644 olb/dumpav.cpp create mode 100644 olb/olb.bpg create mode 100644 olb/olb2sword.bpr create mode 100644 olb/olb2sword.cpp create mode 100644 olb/online.ide create mode 100644 olb/online.prj create mode 100644 olb/prn2sword.bpr create mode 100644 olb/prn2sword.cpp create mode 100644 olb/prn2swordfrm.cpp create mode 100644 olb/prn2swordfrm.dfm create mode 100644 olb/prn2swordfrm.h create mode 100644 pix/sword.gif create mode 100644 samples/Makefile.am create mode 100644 samples/mods.conf.large create mode 100644 samples/mods.conf.small create mode 100644 samples/mods.d/globals.conf create mode 100644 samples/mods.d/rwp.conf create mode 100644 samples/mods.d/strongsnt.conf create mode 100644 samples/mods.d/strongsot.conf create mode 100644 samples/mods.d/vines.conf create mode 100644 samples/mods.d/web.conf create mode 100644 samples/mods.d/websters.conf create mode 100644 samples/recommended/README create mode 100644 samples/recommended/sword.conf create mode 100755 scripts/backupmake.sh create mode 100755 scripts/burncd create mode 100755 scripts/demotar create mode 100755 scripts/disttar create mode 100755 scripts/dlltar create mode 100755 scripts/eastonstar create mode 100755 scripts/mhctar create mode 100755 scripts/mkcd create mode 100755 scripts/mkswordbase create mode 100755 scripts/mkswordbase2 create mode 100755 scripts/mkswordtar create mode 100755 scripts/restoremake.sh create mode 100755 scripts/sapphire.cpp create mode 100755 scripts/svetar create mode 100755 scripts/swordenv create mode 100755 scripts/swtxtdsp.bat create mode 100755 scripts/vinestar create mode 100755 scripts/webtar create mode 100644 src/Makefile create mode 100644 src/frontend/Makefile create mode 100644 src/frontend/Makefile.am create mode 100644 src/frontend/X11/Makefile create mode 100644 src/frontend/framework/Makefile create mode 100644 src/frontend/framework/femain.cpp create mode 100644 src/frontend/im/Makefile create mode 100644 src/frontend/im/hebrewmcim.cpp create mode 100644 src/frontend/im/nullim.cpp create mode 100644 src/frontend/im/swinputmeth.cpp create mode 100644 src/frontend/swdisp.cpp create mode 100644 src/frontend/swlog.cpp create mode 100644 src/frontend/windoze/Makefile create mode 100644 src/keys/Makefile create mode 100644 src/keys/Makefile.am create mode 100644 src/keys/genarray.c create mode 100644 src/keys/listkey.cpp create mode 100644 src/keys/nt.bks create mode 100644 src/keys/nt.cps create mode 100644 src/keys/ot.bks create mode 100644 src/keys/ot.cps create mode 100644 src/keys/strkey.cpp create mode 100644 src/keys/swkey.cpp create mode 100644 src/keys/treekey.cpp create mode 100644 src/keys/treekeyidx.cpp create mode 100644 src/keys/versekey.cpp create mode 100644 src/keys/versetreekey.cpp create mode 100644 src/mgr/Makefile create mode 100644 src/mgr/Makefile.am create mode 100644 src/mgr/curlftpt.cpp create mode 100644 src/mgr/encfiltmgr.cpp create mode 100644 src/mgr/filemgr.cpp create mode 100644 src/mgr/ftplibftpt.cpp create mode 100644 src/mgr/ftptrans.cpp create mode 100644 src/mgr/installmgr.cpp create mode 100644 src/mgr/localemgr.cpp create mode 100644 src/mgr/markupfiltmgr.cpp create mode 100644 src/mgr/stringmgr.cpp create mode 100644 src/mgr/swcacher.cpp create mode 100644 src/mgr/swconfig.cpp create mode 100644 src/mgr/swfiltermgr.cpp create mode 100644 src/mgr/swlocale.cpp create mode 100644 src/mgr/swmgr.cpp create mode 100644 src/mgr/swsearchable.cpp create mode 100644 src/modules/Makefile create mode 100644 src/modules/Makefile.am create mode 100644 src/modules/comments/Makefile create mode 100644 src/modules/comments/Makefile.am create mode 100644 src/modules/comments/hrefcom/Makefile create mode 100644 src/modules/comments/hrefcom/Makefile.am create mode 100644 src/modules/comments/hrefcom/hrefcom.cpp create mode 100644 src/modules/comments/rawcom/Makefile create mode 100644 src/modules/comments/rawcom/Makefile.am create mode 100644 src/modules/comments/rawcom/rawcom.cpp create mode 100644 src/modules/comments/rawcom4/Makefile.am create mode 100644 src/modules/comments/rawcom4/rawcom4.cpp create mode 100644 src/modules/comments/rawfiles/Makefile create mode 100644 src/modules/comments/rawfiles/Makefile.am create mode 100644 src/modules/comments/rawfiles/rawfiles.cpp create mode 100644 src/modules/comments/swcom.cpp create mode 100644 src/modules/comments/zcom/Makefile create mode 100644 src/modules/comments/zcom/Makefile.am create mode 100644 src/modules/comments/zcom/zcom.cpp create mode 100644 src/modules/common/Makefile create mode 100644 src/modules/common/Makefile.am create mode 100644 src/modules/common/compress.cpp.txt create mode 100644 src/modules/common/entriesblk.cpp create mode 100644 src/modules/common/lzsscomprs.cpp create mode 100644 src/modules/common/rawstr.cpp create mode 100644 src/modules/common/rawstr4.cpp create mode 100644 src/modules/common/rawverse.cpp create mode 100644 src/modules/common/rawverse4.cpp create mode 100644 src/modules/common/sapphire.cpp create mode 100644 src/modules/common/swcipher.cpp create mode 100644 src/modules/common/swcomprs.cpp create mode 100644 src/modules/common/swcomprs.doc create mode 100644 src/modules/common/zipcomprs.cpp create mode 100644 src/modules/common/zstr.cpp create mode 100644 src/modules/common/zverse.cpp create mode 100644 src/modules/filters/Makefile create mode 100644 src/modules/filters/Makefile.am create mode 100644 src/modules/filters/cipherfil.cpp create mode 100644 src/modules/filters/gbffootnotes.cpp create mode 100644 src/modules/filters/gbfheadings.cpp create mode 100644 src/modules/filters/gbfhtml.cpp create mode 100644 src/modules/filters/gbfhtmlhref.cpp create mode 100644 src/modules/filters/gbfmorph.cpp create mode 100644 src/modules/filters/gbfosis.cpp create mode 100644 src/modules/filters/gbfplain.cpp create mode 100644 src/modules/filters/gbfredletterwords.cpp create mode 100644 src/modules/filters/gbfrtf.cpp create mode 100644 src/modules/filters/gbfstrongs.cpp create mode 100644 src/modules/filters/gbfthml.cpp create mode 100644 src/modules/filters/gbfwebif.cpp create mode 100644 src/modules/filters/gbfwordjs.cpp create mode 100644 src/modules/filters/greeklexattribs.cpp create mode 100644 src/modules/filters/latin1utf16.cpp create mode 100644 src/modules/filters/latin1utf8.cpp create mode 100644 src/modules/filters/osisfootnotes.cpp create mode 100644 src/modules/filters/osisheadings.cpp create mode 100644 src/modules/filters/osishtmlhref.cpp create mode 100644 src/modules/filters/osislemma.cpp create mode 100644 src/modules/filters/osismorph.cpp create mode 100644 src/modules/filters/osismorphsegmentation.cpp create mode 100644 src/modules/filters/osisosis.cpp create mode 100644 src/modules/filters/osisplain.cpp create mode 100644 src/modules/filters/osisredletterwords.cpp create mode 100644 src/modules/filters/osisrtf.cpp create mode 100644 src/modules/filters/osisscripref.cpp create mode 100644 src/modules/filters/osisstrongs.cpp create mode 100644 src/modules/filters/osisvariants.cpp create mode 100644 src/modules/filters/osiswebif.cpp create mode 100644 src/modules/filters/osiswordjs.cpp create mode 100644 src/modules/filters/papyriplain.cpp create mode 100644 src/modules/filters/plainfootnotes.cpp create mode 100644 src/modules/filters/plainhtml.cpp create mode 100644 src/modules/filters/rtfhtml.cpp create mode 100644 src/modules/filters/scsuutf8.cpp create mode 100644 src/modules/filters/swbasicfilter.cpp create mode 100644 src/modules/filters/swoptfilter.cpp create mode 100644 src/modules/filters/teihtmlhref.cpp create mode 100644 src/modules/filters/teiplain.cpp create mode 100644 src/modules/filters/teirtf.cpp create mode 100644 src/modules/filters/thmlfootnotes.cpp create mode 100644 src/modules/filters/thmlgbf.cpp create mode 100644 src/modules/filters/thmlheadings.cpp create mode 100644 src/modules/filters/thmlhtml.cpp create mode 100644 src/modules/filters/thmlhtmlhref.cpp create mode 100644 src/modules/filters/thmllemma.cpp create mode 100644 src/modules/filters/thmlmorph.cpp create mode 100644 src/modules/filters/thmlosis.cpp create mode 100644 src/modules/filters/thmlplain.cpp create mode 100644 src/modules/filters/thmlrtf.cpp create mode 100644 src/modules/filters/thmlscripref.cpp create mode 100644 src/modules/filters/thmlstrongs.cpp create mode 100644 src/modules/filters/thmlvariants.cpp create mode 100644 src/modules/filters/thmlwebif.cpp create mode 100644 src/modules/filters/thmlwordjs.cpp create mode 100644 src/modules/filters/unicodertf.cpp create mode 100644 src/modules/filters/utf16utf8.cpp create mode 100644 src/modules/filters/utf8arshaping.cpp create mode 100644 src/modules/filters/utf8bidireorder.cpp create mode 100644 src/modules/filters/utf8cantillation.cpp create mode 100644 src/modules/filters/utf8greekaccents.cpp create mode 100644 src/modules/filters/utf8hebrewpoints.cpp create mode 100644 src/modules/filters/utf8html.cpp create mode 100644 src/modules/filters/utf8latin1.cpp create mode 100644 src/modules/filters/utf8nfc.cpp create mode 100644 src/modules/filters/utf8nfkd.cpp create mode 100644 src/modules/filters/utf8transliterator.cpp create mode 100644 src/modules/filters/utf8utf16.cpp create mode 100644 src/modules/genbook/Makefile create mode 100644 src/modules/genbook/Makefile.am create mode 100644 src/modules/genbook/rawgenbook/Makefile create mode 100644 src/modules/genbook/rawgenbook/Makefile.am create mode 100644 src/modules/genbook/rawgenbook/rawgenbook.cpp create mode 100644 src/modules/genbook/swgenbook.cpp create mode 100644 src/modules/lexdict/Makefile create mode 100644 src/modules/lexdict/Makefile.am create mode 100644 src/modules/lexdict/rawld/Makefile create mode 100644 src/modules/lexdict/rawld/Makefile.am create mode 100644 src/modules/lexdict/rawld/rawld.cpp create mode 100644 src/modules/lexdict/rawld4/Makefile create mode 100644 src/modules/lexdict/rawld4/Makefile.am create mode 100644 src/modules/lexdict/rawld4/rawld4.cpp create mode 100644 src/modules/lexdict/swld.cpp create mode 100644 src/modules/lexdict/zld/Makefile create mode 100644 src/modules/lexdict/zld/Makefile.am create mode 100644 src/modules/lexdict/zld/zld.cpp create mode 100644 src/modules/readme create mode 100644 src/modules/swmodule.cpp create mode 100644 src/modules/tests/Makefile create mode 100644 src/modules/tests/echomod.cpp create mode 100644 src/modules/texts/Makefile create mode 100644 src/modules/texts/Makefile.am create mode 100644 src/modules/texts/rawtext/Makefile create mode 100644 src/modules/texts/rawtext/Makefile.am create mode 100644 src/modules/texts/rawtext/rawtext.cpp create mode 100644 src/modules/texts/rawtext4/Makefile.am create mode 100644 src/modules/texts/rawtext4/rawtext4.cpp create mode 100644 src/modules/texts/swtext.cpp create mode 100644 src/modules/texts/ztext/Makefile create mode 100644 src/modules/texts/ztext/Makefile.am create mode 100644 src/modules/texts/ztext/ztext.cpp create mode 100644 src/utilfuns/Makefile create mode 100644 src/utilfuns/Makefile.am create mode 100644 src/utilfuns/ftplib.c create mode 100644 src/utilfuns/ftpparse.c create mode 100644 src/utilfuns/regex.c create mode 100644 src/utilfuns/roman.cpp create mode 100644 src/utilfuns/sub.c create mode 100644 src/utilfuns/swbuf.cpp create mode 100644 src/utilfuns/swobject.cpp create mode 100644 src/utilfuns/swunicod.cpp create mode 100644 src/utilfuns/swversion.cpp create mode 100644 src/utilfuns/url.cpp create mode 100644 src/utilfuns/utilstr.cpp create mode 100644 src/utilfuns/utilxml.cpp create mode 100644 src/utilfuns/win32/dirent.cpp create mode 100644 src/utilfuns/win32/dirent.h create mode 100644 src/utilfuns/zlib/adler32.c create mode 100644 src/utilfuns/zlib/compress.c create mode 100644 src/utilfuns/zlib/crc32.c create mode 100644 src/utilfuns/zlib/deflate.c create mode 100644 src/utilfuns/zlib/deflate.h create mode 100644 src/utilfuns/zlib/gzio.c create mode 100644 src/utilfuns/zlib/infblock.c create mode 100644 src/utilfuns/zlib/infblock.h create mode 100644 src/utilfuns/zlib/infcodes.c create mode 100644 src/utilfuns/zlib/infcodes.h create mode 100644 src/utilfuns/zlib/inffast.c create mode 100644 src/utilfuns/zlib/inffast.h create mode 100644 src/utilfuns/zlib/inffixed.h create mode 100644 src/utilfuns/zlib/inflate.c create mode 100644 src/utilfuns/zlib/inftrees.c create mode 100644 src/utilfuns/zlib/inftrees.h create mode 100644 src/utilfuns/zlib/infutil.c create mode 100644 src/utilfuns/zlib/infutil.h create mode 100644 src/utilfuns/zlib/maketree.c create mode 100644 src/utilfuns/zlib/trees.c create mode 100644 src/utilfuns/zlib/trees.h create mode 100644 src/utilfuns/zlib/uncompr.c create mode 100644 src/utilfuns/zlib/untgz.c create mode 100644 src/utilfuns/zlib/zutil.c create mode 100644 src/utilfuns/zlib/zutil.h create mode 100644 stamp-h.in delete mode 100644 sword-1.5.9.tar.gz create mode 100644 sword.bmp create mode 100644 sword.kdevprj create mode 100644 sword.pc.in create mode 100644 sword.spec.in create mode 100644 tests/.cvsignore create mode 100644 tests/Makefile.am create mode 100644 tests/Makefile.in create mode 100644 tests/bcppmake/Makefile.am create mode 100644 tests/bcppmake/filtertest.bpf create mode 100644 tests/bcppmake/filtertest.bpr create mode 100644 tests/bcppmake/libsword.bpf create mode 100644 tests/bcppmake/libsword.bpr create mode 100644 tests/bcppmake/mgrtest.bpf create mode 100644 tests/bcppmake/mgrtest.bpr create mode 100644 tests/bcppmake/parsekey.bpf create mode 100644 tests/bcppmake/parsekey.bpr create mode 100644 tests/bcppmake/tests.bpg create mode 100644 tests/casttest.cpp create mode 100644 tests/ciphertest.cpp create mode 100644 tests/complzss.cpp create mode 100644 tests/compnone.cpp create mode 100644 tests/compzip.cpp create mode 100644 tests/configtest.cpp create mode 100644 tests/cppunit/Makefile.am create mode 100644 tests/cppunit/Makefile.in create mode 100644 tests/cppunit/main.cpp create mode 100644 tests/cppunit/stringmgr_test.cpp create mode 100644 tests/cppunit/swbuf_test.cpp create mode 100644 tests/cppunit/url_test.cpp create mode 100644 tests/cppunit/versekey_test.cpp create mode 100644 tests/filtertest.cpp create mode 100644 tests/icutest.cpp create mode 100644 tests/indextest.cpp create mode 100644 tests/installmgrtest.cpp create mode 100644 tests/introtest.cpp create mode 100644 tests/keycast.cpp create mode 100644 tests/keytest.cpp create mode 100644 tests/lextest.cpp create mode 100644 tests/listtest.cpp create mode 100644 tests/localetest.cpp create mode 100644 tests/mgrtest.cpp create mode 100644 tests/modtest.cpp create mode 100644 tests/outputcps.cpp create mode 100644 tests/parsekey.cpp create mode 100644 tests/rawldidxtest.cpp create mode 100644 tests/refsystest.cpp create mode 100644 tests/romantest.cpp create mode 100644 tests/swaptest.cpp create mode 100644 tests/swbuftest.cpp create mode 100644 tests/testblocks.cpp create mode 100644 tests/testsuite/.cvsignore create mode 100644 tests/testsuite/Makefile.am create mode 100755 tests/testsuite/runall.sh create mode 100755 tests/testsuite/runtest.sh create mode 100644 tests/testsuite/versekey.good create mode 100755 tests/testsuite/versekey.sh create mode 100644 tests/testsuite/verseparsing-utf8.good create mode 100755 tests/testsuite/verseparsing-utf8.sh create mode 100644 tests/testsuite/verseparsing.good create mode 100755 tests/testsuite/verseparsing.sh create mode 100644 tests/testsuite/xmltag.good create mode 100755 tests/testsuite/xmltag.sh create mode 100644 tests/tlitmgrtest.cpp create mode 100644 tests/tmp/.cvsignore create mode 100644 tests/tmp/Makefile.am create mode 100644 tests/tmp/README create mode 100644 tests/translittest.cpp create mode 100644 tests/versekeytest.cpp create mode 100644 tests/webiftest.cpp create mode 100644 tests/xmltest.cpp create mode 100755 usrinst.sh create mode 100644 utilities/.cvsignore create mode 100644 utilities/Makefile.am create mode 100644 utilities/Makefile.in create mode 100644 utilities/addcomment.cpp create mode 100644 utilities/addgb.cpp create mode 100644 utilities/addld.cpp create mode 100644 utilities/addvs.cpp create mode 100644 utilities/bcpp6make/cipherraw.bpf create mode 100644 utilities/bcpp6make/cipherraw.bpr create mode 100644 utilities/bcpp6make/diatheke.bpf create mode 100644 utilities/bcpp6make/diatheke.bpr create mode 100644 utilities/bcpp6make/imp2gbs.bpf create mode 100644 utilities/bcpp6make/imp2gbs.bpr create mode 100644 utilities/bcpp6make/imp2ld.bpf create mode 100644 utilities/bcpp6make/imp2ld.bpr create mode 100644 utilities/bcpp6make/imp2vs.bpf create mode 100644 utilities/bcpp6make/imp2vs.bpr create mode 100644 utilities/bcpp6make/mkfastmod.bpf create mode 100644 utilities/bcpp6make/mkfastmod.bpr create mode 100644 utilities/bcpp6make/mod2imp.bpf create mode 100644 utilities/bcpp6make/mod2imp.bpr create mode 100644 utilities/bcpp6make/mod2osis.bpf create mode 100644 utilities/bcpp6make/mod2osis.bpr create mode 100644 utilities/bcpp6make/mod2vpl.bpf create mode 100644 utilities/bcpp6make/mod2vpl.bpr create mode 100644 utilities/bcpp6make/mod2zmod.bpf create mode 100644 utilities/bcpp6make/mod2zmod.bpr create mode 100644 utilities/bcpp6make/obj/dummy create mode 100644 utilities/bcpp6make/osis2mod.bpf create mode 100644 utilities/bcpp6make/osis2mod.bpr create mode 100644 utilities/bcpp6make/stage/dummy create mode 100644 utilities/bcpp6make/step2vpl.bpf create mode 100644 utilities/bcpp6make/step2vpl.bpr create mode 100644 utilities/bcpp6make/stepdump.bpf create mode 100644 utilities/bcpp6make/stepdump.bpr create mode 100644 utilities/bcpp6make/utils.bpg create mode 100644 utilities/bcpp6make/vpl2mod.bpf create mode 100644 utilities/bcpp6make/vpl2mod.bpr create mode 100644 utilities/bcpp6make/vs2osisref.bpf create mode 100644 utilities/bcpp6make/vs2osisref.bpr create mode 100644 utilities/bcpp6make/xml2gbs.bpf create mode 100644 utilities/bcpp6make/xml2gbs.bpr create mode 100644 utilities/bcppmake/Makefile.am create mode 100644 utilities/bcppmake/cipherraw.bdsproj create mode 100644 utilities/bcppmake/cipherraw.bpf create mode 100644 utilities/bcppmake/cipherraw.bpr create mode 100644 utilities/bcppmake/diatheke.bdsproj create mode 100644 utilities/bcppmake/diatheke.bpf create mode 100644 utilities/bcppmake/diatheke.bpr create mode 100644 utilities/bcppmake/imp2gbs.bdsproj create mode 100644 utilities/bcppmake/imp2gbs.bpf create mode 100644 utilities/bcppmake/imp2gbs.bpr create mode 100644 utilities/bcppmake/imp2ld.bdsproj create mode 100644 utilities/bcppmake/imp2ld.bpf create mode 100644 utilities/bcppmake/imp2ld.bpr create mode 100644 utilities/bcppmake/imp2vs.bdsproj create mode 100644 utilities/bcppmake/imp2vs.bpf create mode 100644 utilities/bcppmake/imp2vs.bpr create mode 100644 utilities/bcppmake/installmgr.bdsproj create mode 100644 utilities/bcppmake/installmgr.bpf create mode 100644 utilities/bcppmake/installmgr.bpr create mode 100644 utilities/bcppmake/libsword.bpf create mode 100644 utilities/bcppmake/libsword.bpr create mode 100644 utilities/bcppmake/mkfastmod.bdsproj create mode 100644 utilities/bcppmake/mkfastmod.bpf create mode 100644 utilities/bcppmake/mkfastmod.bpr create mode 100644 utilities/bcppmake/mod2imp.bdsproj create mode 100644 utilities/bcppmake/mod2imp.bpf create mode 100644 utilities/bcppmake/mod2imp.bpr create mode 100644 utilities/bcppmake/mod2osis.bdsproj create mode 100644 utilities/bcppmake/mod2osis.bpf create mode 100644 utilities/bcppmake/mod2osis.bpr create mode 100644 utilities/bcppmake/mod2vpl.bdsproj create mode 100644 utilities/bcppmake/mod2vpl.bpf create mode 100644 utilities/bcppmake/mod2vpl.bpr create mode 100644 utilities/bcppmake/mod2zmod.bdsproj create mode 100644 utilities/bcppmake/mod2zmod.bpf create mode 100644 utilities/bcppmake/mod2zmod.bpr create mode 100644 utilities/bcppmake/osis2mod.bdsproj create mode 100644 utilities/bcppmake/osis2mod.bpf create mode 100644 utilities/bcppmake/osis2mod.bpr create mode 100644 utilities/bcppmake/step2vpl.bdsproj create mode 100644 utilities/bcppmake/step2vpl.bpf create mode 100644 utilities/bcppmake/step2vpl.bpr create mode 100644 utilities/bcppmake/stepdump.bdsproj create mode 100644 utilities/bcppmake/stepdump.bpf create mode 100644 utilities/bcppmake/stepdump.bpr create mode 100644 utilities/bcppmake/tei2mod.bpf create mode 100644 utilities/bcppmake/tei2mod.bpr create mode 100644 utilities/bcppmake/utilities.bdsgroup create mode 100644 utilities/bcppmake/utilities.bpg create mode 100644 utilities/bcppmake/vpl2mod.bdsproj create mode 100644 utilities/bcppmake/vpl2mod.bpf create mode 100644 utilities/bcppmake/vpl2mod.bpr create mode 100644 utilities/bcppmake/vs2osisref.bdsproj create mode 100644 utilities/bcppmake/vs2osisref.bpf create mode 100644 utilities/bcppmake/vs2osisref.bpr create mode 100644 utilities/bcppmake/xml2gbs.bdsproj create mode 100644 utilities/bcppmake/xml2gbs.bpf create mode 100644 utilities/bcppmake/xml2gbs.bpr create mode 100644 utilities/cipherraw.cpp create mode 100644 utilities/diatheke/.cvsignore create mode 100644 utilities/diatheke/Makefile.am create mode 100644 utilities/diatheke/Makefile.in create mode 100644 utilities/diatheke/README create mode 100644 utilities/diatheke/cgi/Makefile.am create mode 100755 utilities/diatheke/cgi/dia-def.pl create mode 100755 utilities/diatheke/cgi/diatheke.pl create mode 100644 utilities/diatheke/cgi/index-private.html create mode 100644 utilities/diatheke/cgi/index-public.html create mode 100644 utilities/diatheke/corediatheke.cpp create mode 100644 utilities/diatheke/corediatheke.h create mode 100644 utilities/diatheke/diafiltmgr.cpp create mode 100644 utilities/diatheke/diafiltmgr.h create mode 100644 utilities/diatheke/diatheke.cpp create mode 100644 utilities/diatheke/diatheke.dsp create mode 100644 utilities/diatheke/diatheke.dsw create mode 100644 utilities/diatheke/diathekemgr.cpp create mode 100644 utilities/diatheke/diathekemgr.h create mode 100644 utilities/diatheke/gbfcgi.cpp create mode 100644 utilities/diatheke/gbfcgi.h create mode 100644 utilities/diatheke/osiscgi.cpp create mode 100644 utilities/diatheke/osiscgi.h create mode 100644 utilities/diatheke/pqa/Diatheke.pqa create mode 100644 utilities/diatheke/pqa/src/README create mode 100644 utilities/diatheke/pqa/src/all.html create mode 100644 utilities/diatheke/pqa/src/ancient.html create mode 100644 utilities/diatheke/pqa/src/dict.html create mode 100644 utilities/diatheke/pqa/src/english.html create mode 100644 utilities/diatheke/pqa/src/french.html create mode 100644 utilities/diatheke/pqa/src/german.html create mode 100644 utilities/diatheke/pqa/src/index.html create mode 100644 utilities/diatheke/pqa/src/lex.html create mode 100644 utilities/diatheke/pqa/src/other.html create mode 100644 utilities/diatheke/pqa/src/spanish.html create mode 100755 utilities/diatheke/soap/sapouni.cgi create mode 100755 utilities/diatheke/soap/soapatheke.pl create mode 100644 utilities/diatheke/tcl/biblebot-diatheke.tcl create mode 100644 utilities/diatheke/thmlcgi.cpp create mode 100644 utilities/diatheke/thmlcgi.h create mode 100644 utilities/emptyvss.cpp create mode 100644 utilities/gbfidx.cpp create mode 100644 utilities/genbookutil.cpp create mode 100644 utilities/imp2gbs.cpp create mode 100644 utilities/imp2ld.cpp create mode 100644 utilities/imp2vs.cpp create mode 100644 utilities/installmgr.cpp create mode 100644 utilities/kylixmake/Makefile.am create mode 100644 utilities/kylixmake/libsword.bpf create mode 100644 utilities/kylixmake/libsword.bpr create mode 100644 utilities/kylixmake/mod2zmod.bpf create mode 100644 utilities/kylixmake/mod2zmod.bpr create mode 100644 utilities/kylixmake/mod2zmod.res create mode 100644 utilities/kylixmake/utilities.bpg create mode 100644 utilities/lexdump.c create mode 100644 utilities/mkfastmod.cpp create mode 100644 utilities/mod2imp.cpp create mode 100644 utilities/mod2osis.cpp create mode 100644 utilities/mod2vpl.cpp create mode 100644 utilities/mod2zmod.cpp create mode 100644 utilities/mod2zmod2.cpp create mode 100644 utilities/modwrite.cpp create mode 100644 utilities/no13.c create mode 100644 utilities/osis2mod.cpp create mode 100644 utilities/perl/Makefile.am create mode 100755 utilities/perl/cipherkeygen.pl create mode 100755 utilities/perl/linkvers.pl create mode 100755 utilities/perl/localecap.pl create mode 100755 utilities/perl/mkvsmod.pl create mode 100644 utilities/step2vpl.cpp create mode 100644 utilities/stepdump.cpp create mode 100644 utilities/tei2mod.cpp create mode 100644 utilities/treeidxutil.cpp create mode 100644 utilities/vpl2mod.cpp create mode 100644 utilities/vpl2zmod2.cpp create mode 100644 utilities/vs2osisref.cpp create mode 100644 utilities/xml2gbs.cpp diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..4d960cb --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Many individuals have contributed so much time and effort, but may God +receive all the credit and glory. diff --git a/CODINGSTYLE b/CODINGSTYLE new file mode 100644 index 0000000..95adacc --- /dev/null +++ b/CODINGSTYLE @@ -0,0 +1,81 @@ +recommended: + tab = 5 + shiftwidth = 5 + +required: + use tab character for indents + + for (init; condition; increment) { + statement; + } + + switch (variable) { + case 1: + statement; + statement; + break; + case 2: statement; break; + case 3: statement; break; + case 4: + statement; + break; + default: + statement; + break; + } + + if (condition) + statement; + else statement; + + if (condition) { + statement; + statement; + } + else { + statement; + statement; + } + + class ClassDef { + private: + protected: + + /** This method does something + * @param paramName1 the first parameter name + * @param param2 the second parameter name + * @return error status + */ + char methodName(int paramName1, char param2 = -1); + + /** This method does something too + */ + void anotherMethodName() { someShortExpression; } + + public: + ClassDef(); + }; + + char ClassDef::methodName(int paramName1, char param2) { + char retVal = 0; + // do something; + return retVal; + } + + ClassDef classDef; + classDef.methodName(1, '2'); + + if (((reallyLongCondition) && (moreLogic)) || + (otherCondition)) { + expression; + } + + int varName1 = 1; + char *variable2 = "2"; + int &var3 = varName1; + int variable4, variable5, var6, var7; + + variable4 = 4; + variable5 = 5; + var6 = 6; + var7 = 7; diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..82a7111 --- /dev/null +++ b/COPYING @@ -0,0 +1,2 @@ +Copy and use freely under the terms of the GNU General Public License +as stated in the LICENSE file in this same directory diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..65e7190 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,1130 @@ +API ChangeLog + +* Release 1.5.11 * + +14-May-2008 Troy A. Griffitts + Added ability for lexicon drivers to accept + ####![a-z] as strong number. + +13-May-2008 Chris Little + Added basic TEIRTF filters + Added tei2mod utility + Added Japanese locale from http://bible.50webs.org/en/ + Applied Ben Morgan's TEIHTMLHREF filter + Added TEIHTMLHREF filter to BCB5 project + +11-May-2008 Troy A. Griffitts + Applied patch to better handle x-refs in notes + -Ben Morgan + Applied patch to better output OSIS in plaintext + -Ben Morgan + Updated rawstr and rawstr4 to work consistently + with buffer sizes + Updated French locales and added french abbrev + locales from Dominique Corbex + + Updated Farsi locales from Peter von Kaehne + + +16-Oct-2007 Troy A. Griffitts + Implemented a basic TreeKeyIdx::remove() method + +* Release 1.5.10 * + +16-Oct-2007 Troy A. Griffitts + Added new vi-utf8.conf Vietnamese locale submitted + by Daniel Owens + +11-Oct-2007 Troy A. Griffitts + Added new FileMgr::openFileReadOnly to help centralize + all file io details + +11-Oct-2007 Troy A. Griffitts + Added new RawText4 and RawCom4 drivers which allow + for a 4 byte record size. Patch submitted by + Doug Rintoul + +6-Oct-2007 Troy A. Griffitts + Added SWBuf::stripPrefix method which works nice + for returning and stripping stuff like + 'lemma' from "lemma:G1234" + Added part params to XMLTag::setAttribute + Changed OSISStrongs to only strip lemma parts with + strong prefix + Applied fix for newer version of gcc which errors if + create perms are not passed to ::open + (Deji Akingunola ) + Modified OSISLemma to only strip lemma parts with + lemma.* prefix or no prefix + Added UTF-8 processing for case insensitive unindexed + searching + +13-Sep-2007 Troy A. Griffitts + Added InstallMgr::getModuleStatus to return a list + of differences between the modules of two SWMgr + objects + +03-Mar-2007 Joachim Ansorg + Added osis morph segments filter include file to the dist + Fixed wrong stricmp in SWObject + +10-Dec-2006 Troy A. Griffitts + Added example: examples/cmdline/verserangeparse.cpp + +2-Dec-2006 Troy A. Griffitts + Added example: examples/cmdline/listoptions.cpp + Added entryAttributes processing for morph segs + +23-Nov-2006 Daniel Glassey + Use acx_clucene.m4 from CLucene contribs to detect CLucene + apply Debian patch for flatapi for 64-bit portability + +20-Nov-2006 Troy A. Griffitts + Moved treekey and genbook tests to utilities + Finished first stable version of rewrite of imp2gbs + Fixed bug in treekey where didn't break on found sibling + Added .trim to localName segments of genbook path, + e.g. /this / is/a/test/ - all spaces will be removed + Added recognition of additional greek accent ~ + in UTF8GreekAccents filter + Fixed bug in RawGenBook::setText where default size + is < 0, not false + Changed lucene indexing to actually index the key field. This + allows searching within key field (e.g. key:word) + Fixed divineName logic + Fixed & handling + +* Release 1.5.9 * + +21-Sep-2006 Troy A. Griffitts + Clean up and package for 1.5.9 + Added Thai Unicode locale coutesy of + Adrian Korten + +29-Aug-2006 Troy A. Griffitts + Added recognition for the sysConfig parameter in SWMgr c-tor + (allow passing path to sword.conf to use for config) + Updated CORBA server to allow option -sysConf /path/sword.conf + +16-Aug-2006 Troy A. Griffitts + Added new module lookup options: + ./sword.conf + ../library/mods.d + Added fix to preserve markup in headings (charcoal) + Fixed non-UTF8 builds (thanks berkana) + +1-Aug-2006 DM Smith + Fixed divineName bug + Updated q handling to use quote stack + Update to fix RLT + Fixed a bug in osis2mod that duplicated a chapter title in the verse + Normalize whitespace in xml tags + Updated support for more OSIS markup, including q marker + +21-May-2006 Troy A. Griffitts + Added SWBuf::startsWith, endsWith + Added entry attribute exposure of multipart words + Added beginnings of VerseKey subclass which uses TreeKey + +25-Apr-2006 Troy A. Griffitts + Changed SWModule::search to fill result set up with more + specialized SWKey objects, instead of always SWKey + Changed SWModule::search to use CLucene better for + non-VerseKey modules + Added basic proximity searching with CLucene searches + Added ListKey::sort() + +14-Apr-2006 Troy A. Griffitts + Added EntryAttribute support to SWIG bindings (from mreimer) + +29-Mar-2006 Joachim Ansorg + Fixed lucene code to work with 0.9.x (tested with 0.9.10) + +31-Jan-2006 Troy A. Griffitts + Added support for OSIS variants + Added .NET support and update to swig bindings (from lefticus) + +28-Nov-2005 Troy A. Griffitts + Fixed ICUStringMgr toUpper method + +19-Nov-2005 Troy A. Griffitts + Cleaned up headers to remove unnecessary includes + +26-Oct-2005 Martin Gruner + Added Arabic locale (from Mina Magdy). + +17-Oct-2005 Joachim Ansorg + Fixed the dutch locale file + +21-Sep-2005 Martin Gruner + Added Hebrew locale for both Tanach (OT) and + Berit Chadashah (NT). + +* Release 1.5.8 * + +27-May-2005 Troy A. Griffitts + Clean up and package for 1.5.8 + +16-May-2005 Troy A. Griffitts + Changed Strongs to Lemma and added LemmaClass for + EntryAttributes + Made OSIS, GBF, and ThML filters parse lemma and + morph + +2-May-2005 Troy A. Griffitts + Removed many tools files and added them to + the sword-tools repository + Removed the need for many #if's throughout the code + Added seek, read, write, O_*, S_* to filemgr.cpp + +11-Apr-2005 Troy A. Griffitts + Cleaned up unused files in preparation for release + Updated pkg-config to report proper required libs + +1-Jan-2005 Troy A. Griffitts + Extended InstallMgr routines to recurse directories + Cleaned up InstallMgr code + Created FTPTransport base class used by InstallMgr + to allow for any FTP routines to be plugged + into InstallMgr by overriding a new + createFTPTransport method to return subclass + (Joachim's good idea) + Moved all CURL and FTPLib code into FTPTransport + subclasses CURLFTPTransport and FTPLibFTPTransport + classes respectively + Moved status reporting methods from InstallMgr to + StatusReporter in FTPTransport ftptrans.(h|cpp) + Added CopyDir, removeDir, and isDirectory methods + to FileMgr + Added SWMgr::deleteModule to allow deleting a + loaded module from an SWMgr class-- needed + before InstallMgr deletes files involved + so after destruction of SWModule, all files + will be closes (mostly for Windows, but good + on any platform). + +13-Aug-2004 Troy A. Griffitts + Migrated to SVN + +11-May-2004 Troy A. Griffitts + Updated to support ARM cross-compile, and that + without errors + +03-Apr-2004 Will Thimbleby + Added SWBuf method setFormatted() + Altered all remaining uses of char[127] + for file names to use SWBufs. + +06-Jan-2003 Troy A. Griffitts + Changed system[Log|File|Locale]Mgr to + *Mgr *[get|set]System*Mgr() per Daniel Glassey's + discovery of potential problems from order of + initializing statics. + + Added new prefix recognition for OSIS lemma prefix + "strong:" + +* Release 1.5.7 * + +28-Dec-2003 Troy A. Griffitts + Updated many filters + Split cvs, removing apps + Updated OSIS importer + +28-Aug-2003 Troy A. Griffitts + Abstracted the search interface from SWModule + Added experimental implementation of fast + search framework to zText using + clucene + +* Release 1.5.6 * + +26-Aug-2003 Troy A. Griffitts + Packaged up 1.5.6 + Updated CORBA services to expose a little more + functionality for the OSIS webapp + +12-Aug-2003 Troy A. Griffitts + Added Enciphering code that works with SWBuf + Fixed appendFormatted to re-init var_args + Other small fixes to build on Opteron 64-bit + +07-Jul-2003 Troy A. Griffitts + Added enough functionality to remotely install + into installmgr, but Daniel Glassey needs + to fix the linux autobuild stuff :) + Added SWOptionFilter and made most option filters + extent this class. + +26-Jun-2003 Troy A. Griffitts + Removed all std::string references from API and + mostly replaced with SWBuf + Added int max param to SWBuf::append + Added some file copy functions to FileMgr + Moved some more install stuff to installmgr + +18-Jun-2003 Troy A. Griffitts + Joachim added OSISFootnotes. Added entryAttributes + parsing in OSISFootnotes + Added = operator and empty constructor to XMLTag + Fixed OSISHeadings to passthru non x-preverse note + bodies + +10-Jun-2003 Troy A. Griffitts + Added tests/testsuite for building a good set + of regression tests + Fixed VerseKey parsing of "1. book" and osisRefs + +06-Jun-2003 Joachim Ansorg + Implemented encodeURL() function in utilweb.cpp + Converted ThMLHTML filter to XMLTag, removed handling + of scripRefs because this shouldn't be done + in FMT_HTML + Converted ThMLHTMLHREF to XMLTag. Fixed some things. + Simplified some small things in filters, nothing big. + +01-Jun-2003 Joachim Ansorg + Added WEBIF filters, based on HTMLHREF filters. + Added new utilweb stuff for working with urls etc. + Fixed SWORD_NAMESPACE_START and SWORD_NAMESPACE_END + in defs.h if NO_SWORD_NAMESPACE was defined + +30-May-2003 Troy A. Griffitts + Added utilities/installmgr to call some of the + basic functionality from engine install + routines. + Added removeModule to installmgr.cpp, copied from + Windows InstallMgr. + +26-May-2003 Troy A. Griffitts + Added first cut of osis2mod using the ESV as a + basic template. Works with VerseKey mods + only and doesn't capture all data. + Improved verse reference parsing to include proper + parsing of osisRef attributes and other + misc. anomalies. + Returned canon.h back to previous state to + avoid locale key mismatches + +25-May-2003 Troy A. Griffitts + Added utilfuns/utilxml.cpp and test/xmltest which + include basic xml utility classes + Added comparison operators to SWBuf so it plays + nicely with stl containers + +19-Feb-2003 Troy A. Griffitts + Added utilfuns/swbuf.cpp and tests/swbuftest + Fixed make system to include osisrtf and osisplain + Started HUGE task of moving all char **buf over + to SWBuf &buf + +06-Feb-2003 Joachim Ansorg + Added ro.conf (Romanian) in locales.d + +14-Jan-2003 Joachim Ansorg + Added strip filter for the red letter words so users can + turn it off + Worked a bit on locales.d/de.conf to include some abbrevs + +10-Jan-2003 Terry Biggs + Added new osisstrongs and osismorph support to gbfhtml*. + +08-Jan-2003 Troy A. Griffitts + Added new osisstrongs and osismorph option filters. + Hacked gbfrtf to support, for now: + the osis tag, + Removed OSIS ..., + Removed any empty strongs tags for the article. + +19-Dec-2002 Joachim Ansorg + Removed old russian book locale file, because it wasn't + working in Linux AND Windows + Added book locale files (cp1251 and koi8-r) submitted by + Pavlo Bohmat bohm@ukr.net to support Windows + and Linux. + +30-Nov-2002 Troy A. Griffitts + Added Finnish locale files contributed by Tero + Favorin + +27-Nov-2002 Joachim Ansorg + Worked on Swig bindings. They work now with latest CVS. + +25-Nov-2002 Troy A. Griffitts + Added Chris' ThMLVariants option filter to SWMgr + +21-Nov-2002 Troy A. Griffitts + Added support to ListKey to test for inclusion in + set. eg. listKey.setText("mat 2:2") will set + listKey.Error() to true if Matthew 2:2 is not + in the listkey set. listKey will also be set + to the correct subKey and position if it IS + in the set. + +09-Nov-2002 Troy A. Griffitts + Updated ICU headers and Thai transliterator per + Steven Loomis' recommendations. + +29-Oct-2002 Troy A. Griffitts + Added SWModule *SWMgr::getModule(const char *modName); + Added Terry Biggs' patch to htmlref filters to + more consistently deal with strongs numbers + +23-Oct-2002 Daniel Glassey + Some base work for installmgr on classes to + manage mods.d + + +* Release 1.5.5 * + +22-Oct-2002 Troy A. Griffitts + Updated hu locale submitted from Mentler Gyula + Fixed bug in Book parsing that took first matching + book, not best matching book. + Added VCL autoconf/automake files and updated to + compile on gcc 3.2 + +21-Oct-2002 Troy A. Griffitts + Fixed ListKey bugs dealing with TOP and BOTTOM and + added at least an attempt to position the + current element key on ListKey::setText + +20-Oct-2002 Troy A. Griffitts + Added optimizations for ListKey persistent keys + in VerseKey drivers + +09-Oct-2002 Daniel Glassey + Add debian directory so you can build debs from cvs + +* Release 1.5.4a * + +07-Oct-2002 Troy A. Griffitts + Fixed rawFilter bug where entrySize was being passed + instead of maxBufferSize. This problem caused + a number of problems with the engine. + Applied a few of Franklin Bratcher's critical patches + to diatheke. + +01-Oct-2002 Daniel Glassey + Work on sword swig perl binding + Change sword to use a sword namespace + Fix to build with gcc3.2 again after yesterday + +30-Sep-2002 Daniel Glassey + Remove using namespace std from all headers + +28-Sep-2002 Troy A. Griffitts + Added SWModule::Index and SWCom and SWText impls + + +* Release 1.5.4 * + +25-Sep-2002 Troy A. Griffitts + Fixed zverse zstr zcom ztext zld to work with cipher + Added cipher key to mod2zmod + +27-Aug-2002 Troy A. Griffitts + Added Nikolay Igotti's logic for improved non-western + locale functionality + Fixed mod2zmod to work properly with headings + Fixed cheatah to allow heading texts like 'Mat 0:0' + +08-Aug-2002 Troy A. Griffitts + Added support for new entry in /etc/sword.conf + [Install] + AugmentPath=/where/ever + multiple entries can exist. + +31-Jul-2002 Daniel Glassey + Minor change to use iostream not iostream.h (more gcc3) + +31-Jul-2002 Troy A. Griffitts + Fixed FileMgr::trunc if trunc should be empty was + leaving a 1 byte (null) file, instead of empty. + +30-Jul-2002 Troy A. Griffitts + Fixed zLD link bug where resolving incorrectly + skipped IDXENTRYSIZE instead of 6 ("@LINK "). + Fixed RawLD link errors. + Allocate buffer for RawStr* drivers in readtext + to allow realloc if link + +29-Jul-2002 Victor Porton + Fixed RawLD and RawLD4 drivers not reporting errors in + getRawEntry() + +28-Jul-2002 Troy A. Griffitts + Added Gregor Anzelj's Slovenian (sl.conf) locale. + +27-Jul-2002 Troy A. Griffitts + lex/dict drivers use new toupperstr_utf8 to allow + keys to be encoded in utf8 (hopefully will + allow cedict to be built/work correctly. + Added toupperstr_utf8 to utilstr.cpp + Make all operators have real name methods + Isolated SWModule operators in define + Fixed RawLD and RawLD4 drivers where there was + a blank entry created at the beginning + Added test lextest + Consolidated setPosition for lexicons in SWLD + +16-Jul-2002 Daniel Glassey + utf8transliterator now loads translators from local + sword ICU data on demand + SWMgr loads a UTF8Transliterator filter along with + other filters on Load + +11-Jul-2002 Daniel Glassey + simple fixes to allow compiling with gcc 3.1 + rename gettext to readtext as unobtrusively as + possible. + fix BGreek_Greek trans to work with icu2.1 + add SWMgr::isICU for apps to check if ICU stuff is + available + +10-Jul-2002 Daniel Glassey + Initial support for using sword transliterators + with offical ICU + +24-Jun-2002 Troy A. Griffitts + Added a few english abbrevs to better parse BW exported + texts. + Added Error() raised on improperly parsed VerseKey + text. + +22-Jun-2002 Daniel Glassey + Fixes to allow compiling with gcc3 + add configure support to libVCL and change X!/installmgr + to build it automatically + remove --enable-vcl from core sword + +13-Jun-2002 Troy A. Griffitts + Fixed Module heading bug + Fixed SWConfig += bug again + Fixed SWModule size logic when getEntrySize returns -1 + +06-Jun-2002 Troy A. Griffitts + Fixed SWConfig += bug + Added Efata's Indonesian locale + +09-Jun-2002 Joachim Ansorg + Added Perl bindings by J. Kaiser to the CVS + +06-Jun-2002 Troy A. Griffitts + Added Dominique Corbex' fr locale updates + Added new resultBuffer protected member to SWBasicFilter + +04-Apr-2002 Troy A. Griffitts + Added VerseKey::getOSISRef() + Added the beginnings of ThMLOSIS filter + +02-Apr-2002 Troy A. Griffitts + Added gsoap bindings and test client. + Added gbfstrongs parsing of entry attributes + +30-Mar-2002 Troy A. Griffitts + Added mod2imp to export a sword module in 'imp' + format + Better entry attribute parsing in greekdef* and + thmlstrongs* + +22-Mar-2002 Troy A. Griffitts + Added Saulo Rodrigues e Silva's + locale for pt_BR + Added entry attributes for Thayer and ThMLStrongs + (which includes morph also) + + +* Release 1.5.3 * + +22-Mar-2002 Troy A. Griffitts + Updated make system to display better user output + Updated 'readme'-type files + Added make install_config + +21-Mar-2002 Troy A. Griffitts + Changed SWMgr::Load ONE MORE TIME (blame Osk) to return + signed char for mac ppc to work correctly + +19-Mar-2002 Troy A. Griffitts + Changed SWMgr::Load to return char status to be more + consistent with rest of api. Sorry guys. + Added Daniel Glassey's patch to build diatheke + Added new entryAttributes mechanism to SWModule + Added new LocalOptionFilter GreekLexAttribs + +18-Mar-2002 Troy A. Griffitts + Added ChrisLit's Diatheke, BibleCS, and InstallMgr updates + Fixed Joachim's bug report about TreeKeyIdx segfaulting + if no data at DataPath + Added Joachim's patch to remove throw in SWMgr::Load + +16-Mar-2002 Troy A. Griffitts + Added Martin Gruner's suggestion to swmgr to look + for global configuration in multiple location. + Set default to: /etc/sword.conf:/usr/local/etc/sword.conf + Added ChrisLit's msvc and diatheke patches + +15-Mar-2002 Troy A. Griffitts + Added SWCacher to lib and made SWModule impl it + Added SWModule::setSkipConsecutiveLinks + Fixed mod2zmod to catch links + Fixed TOP to position to first entry, not say Gen1:1 + Fixed bug in rawverse in logic when index is out of bnds. + Added DTrotz' fix for CBuilder6 + +14-Mar-2002 Troy A. Griffitts + Changed all make system files to dglassey's ./configure + autotool system + Applied ChrisLit's patch for macosx + +12-Mar-2002 Troy A. Griffitts + Added new option to filemgr open to allow downgrade + of access from rdwr to rdonly. + Removed code that actually opens files from most + driver's constructors. + Changed isWritable to actually return true only if the user + has write permission to the files. + +11-Mar-2002 Troy A. Griffitts + Added David White's recommendation to cache strlen + in stdstr to improve performance. + Added Helmer Krämer's fix for case insensitive code + in SWBasicFilter + +04-Mar-2002 Troy A. Griffitts + Added new multimapwithdefault::has(K, V) method to allow + a call like module->getConfig().has("Feature", "HebrewDefs") + Fixed VerseKey parse bug that didn't work with a locale + other than the sysLocaleMgr locale. + Added VerseKey::getLocale() + Changed SWText subclasses to work like SWCom subclasses, + in that they increment to next valid entry on ++ + +03-Mar-2002 Troy A. Griffitts + Added image support to thmlhtml and thmlhtmlhref + filters + Added dynamic entry "AbsoluteDataPath" to module config + information + Fixed an error in the new SWModule::getConfig* + methods that tbiggs pointed out with .sword + +01-Mar-2002 Troy A. Griffitts + Added Helmer Krämer's speed improvements to SWModule for + multiword searches + Fixed RawGenBook memory bugs + Isolated all byte swapping logic to sysdata.h + Changed BIGENDIAN to SWBIGENDIAN + +27-Feb-2002 Troy A. Griffitts + Commited tbiggs' update to thmlhtmlhref.cpp + Commited dglassey's update to make system + Fixed SWModule to allow setting it's own key back to + itself + +26-Feb-2002 Troy A. Griffitts + Added chrislit's update imp2gbs and new imp2vs + and new imp2ld + Make mod2zmod work with modules other than verse + keyed modules + Fixed zLD + Added SWModule::getConfig and + SWModule::getConfigEntry and made SWMgr + call new SWModlue::setConfig + +25-Feb-2002 Troy A. Griffitts + Added chrislit's new gbs tools: + utilities/thml2gbs + utilities/imp2gbs + +18-Feb-2002 Troy A. Griffitts + Added dglassey's conditional reallocation of entrybuf to drivers + Added dglassey's update to makesystem for icu + Added other optimizations for prep of 1.5.3 + +16-Feb-2002 Troy A. Griffitts + Added getBookName and getBookAbbrev to VerseKey along + with struct book :: prefAbbrev member and data + +24-Jan-2002 Troy A. Griffitts + Added TreeKey and TreeKeyIdx decendants + Added SWGenBook, and RawGenBook general book support + and test programs + +04-Jan-2002 Troy A. Griffitts + Happy B-Day MOM! + Added new property in Makefile.cfg: globalconfdir + defaulted to /etc + +20-Dec-2001 Troy A. Griffitts + Added first cut of zLD + +13-Dec-2001 Troy A. Griffitts + Added __u16, __u32, and __u64 raw data types + Added byte swapping macros + Added standard swordtoarch and archtosword macros + in 16, 32, and 64 bit versions + Added remove to entriesblk + Added tests for byte swapping + +08-Dec-2001 Troy A. Griffitts + Added new SWInputMethod class for keyboard mapping support. + Added null input method which returns what it gets + Added Hebrew Michigan-Claremont input method + +02-Sep-2001 Troy A. Griffitts + Added new swbasicfilter.cpp that provides many common method needed + to make an swfilter implementation. + Changed ThMLHTML filter to extend SWBasicFilter to take advantage of + the new class. + Added new utilstr.cpp method toupperstr to convert a c_str to all + uppercase. + Added new methods to the key classes to provide non-operator methods + to access features to which there were non previously. Makes + other language bindings much easier to produce. + + +* Release 1.5.2 * + +26-Jul-2001 Troy A. Griffitts + Applied Tom Wildsmith's patches to cheatah: cleaned up + displaying of marked up texts; added nice about + box with module about info; handled errors better + on startup + +27-Jun-2001 Troy A. Griffitts + Added roman numeral support in VerseKey parsing + Fixed a number of memory bugs + +20-Jun-2001 Troy A. Griffitts + Packaging up for 1.5.2 + Fixed mod2zmod linking bug + +11-Jun-2001 Troy A. Griffitts + Added limited unicode support + Added French locale from Dominique Corbex + +02-Jun-2001 Chris Little + Added GBFMorph OptionFilter to handle tags and adjusted + GBFStrongs & other filters to not handle as a + Strong's number + +20-May-2001 Joachim Ansorg + Updated the Czech translation of booknames (cs.conf) + +18-May-2001 Joachim Ansorg + Added polish translation of the booknames. It was created by Robert +Kolatzek. + +06-May-2001 Chris Little + Added GBFHeadings OptionFilter & support for tags to + all GBF filters + Added emptyvss utility to list empty verses in a module + Added warning to vpl2mod for cases where a verse is being + overwritten + +23-Mar-2001 Joachim Ansorg + Made some changes to the API documentation in the headers + (documented new classes). + +11-Mar-2001 Troy A. Griffitts + Added multimapwithdefault template and changed swconfig to use + Added operator [] to SWConfig + Added configtest + +25-Feb-2001 Chris Little + Added roman.c for Roman Numeral conversion and made GBF to ThML + filter produce XML compliant text + +09-Feb-2001 Joachim Ansorg + Added beginnings of API documentation in doc/api-documemtation. + Formats are HTML and man + +08-Feb-2001 Chris Little + Added embedded Visual C++ project to build DLL in + apps/windoze/wince/sword but it requires undistributable + libraries to build it currently. MIPS, SH3, and ARM processors + are supported. + +08-Feb-2001 Chris Little + Added Visual C++ 6.0 project to build DLL in apps/windoze/vc/Sword + +18-Jan-2001 Joachim Ansorg + RawText::Search: Do not check for a valid key if we don't use a + scope, this speeds up the normal search of indexed modules + (IMHO a lot for large result sets) + Updated examples/cmdline/threaded_search.cpp + +14-Jan-2001 Joachim Ansorg + Updated sk.conf + +13-Jan-2001 Chris Little + Added arg to vpl2mod to work with NT-only translations + +30-Dec-2000 Chris Little + Fixed prn2sword so that it should work with new OLBs + +22-Dec-2000 Troy A. Griffitts + Added 'micros' a mini GUI for PDAs + +20-Dec-2000 Troy A. Griffitts + Added new compile target architecture: arm + Changed the simple lookup cmdline example to work with any + module. Tested on iPaq SA1110. Need to optimize + size/speed! + +15-Dec-2000 Troy A. Griffitts + zText compess driver working + Fixed ZipCompress + Optimized SWCompress + mod2zmod conversion utility working + Added support for zText modules in SWMgr with 2 new + parameters: BlockType=[VERSE|CHAPTER|BOOK] + CompressType=[LZSS|ZIP] + +10-Dec-2000 Chris Little + Added addld utility for adding single entries to LD modules + +09-Dec-2000 Chris Little + Added addvs utility for adding single verses to modules + Added Diatheke (and CGI/Tcl/PQA frontends to it) to source + tree + ThML filters (all) fixed to support longer tag lengths and + decode HTML ampersand codes (e.g.  ) + ThMLRTF filter fixed to avoid printing extra '>'s + +02-Dec-2000 Troy A. Griffitts + Added write support for RawLD + Added new utility modwrite to call a write interface + +30-Nov-2000 Troy A. Griffitts + Fixed memory leak in write methods of RawText + Added some initial support for writing to zText + Added a 'not working yet' mod2zmod utility + + +20-Nov-2000 Troy A. Griffitts + Added new utility, step2vpl, for dumping BSISG STEP module in + vpl format. + Added new make target: install_config to put a basic install on + a box. + Added a QUICKSTART section to INSTALL file + +17-Nov-2000 Troy A. Griffitts + Added new utility, stepdump, for dumping BSISG STEP modules. + +11-Nov-2000 Joachim Ansorg + Commited new version of the sk locale file. + + +* Release 1.5.1a * + + +06-Nov-2000 Troy A. Griffitts + Added more debug for tests/mgrtest.cpp + Hardcoded VerseKey::NewIndex to KJV max index + +01-Nov-2000 Joachim Ansorg + Added test program for indexes using VerseKey::NewIndex() + +31-Oct-2000 Joachim Ansorg + Fixed vpl2mod to work correctly with headers and files without + references. + +30-Oct-2000 Troy A. Griffitts + Hacked SWModule::Search to hardcode high index always to + 32300 for now until we get NewIndex working properly. + This will be inaccurate for range searches but will + always return a value between 0-100 + Made rawverse.cpp utility functions to not be so picky + about trailing '/' or '\' on path names. + Made vpl2mod work better when 'prepend verse ref' option + is turned on. There seems to be no sense in outputting + blank entries in this scenerio. + +29-Oct-2000 Joachim Ansorg + Reverted the patch from 23-Oct-2000 + gbfhtml.cpp: Changed the HTML tag for new paragraph from

to
+ because it's bad HTML without a closing

tag. + +23-Oct-2000 Joachim Ansorg + Changed the private section of versekey.h into a protected one + because we need the change for current BibleTime! + +15-Oct-2000 Troy A. Griffitts + Normalized Writable interface to SWModule. + Fixed RawVerse settext to correctly append a dos nl. + Fixed vpl2mod to correctly strip 10s and 13s from input. + Added verse ref parsing functionality to vpl2mod. + Added new 'getRawEntry()' pure virtual to each driver. + Changed from operator char *(). Moved operator char * + to SWModule. + Created define FILTERPAD to replace hard coded padding in + each driver. + Added write link support in RawText. + Added new test introtest to test module intros. + Fixed abbrev parsing to see Phil as Php. + +05-Sep-2000 Joachim Ansorg + Fixed a problem in Makefile.cfg with profiler support and + non-debugging lib (-s removes the profiler support, + changed it) + +30-Aug-2000 Troy A. Griffitts + Fixed mod2vpl to strip any existing \n's from data before + writing the data. + Added new utility which reads a verse per line (vpl) file + and creates a new module. + Fixed RawVerse::CreateModule. + Implimented write functionality in RawText with a call to + RawVerse::settext. + Changed write functionality in RawVerse driver which appends + the new entry to the end of the data file and resets + the index to this new location. + +28-Aug-2000 Troy A. Griffitts + Added new utility to output a verse module one line per + verse (utilities/mod2vpl) + +22-Aug-2000 Joachim Ansorg + Added Slovak translation of booknames made by Zdeno + +16-Aug-2000 Joachim Ansorg + Fixed utilities/mkfastmod.cpp + Added a template for translations of international booknames + (doc/translation-template.conf). + +14-Aug-2000 Troy A. Griffitts + Added beginnings of search framework support. + Added some optimized searches for RawText driver + +07-Apr-2000 Joachim Ansorg + Added the THML filters (thmlrtf,thmlplain,thmlhtml and thmlgbf) + to the Makefile. + +15-Mar-2000 + Added buildvcl option to Makefile.cfg to allow exclusion of + the VCL libraries from the build. + Changed the install for the include directory to OBTAIN the + file list instead of specifying each include file + Included cs Czech locale submitted by Kri¹tof Petr + Included da Dutch locale submitted by Birger Langkjer + +13-Mar-2000 + Added SWLocale and LocaleMgr classes to support localization + Made GBFPlain filter support plain text parsing of strongs + numbers to allow searching for such. + Added VCL library port to support porting of InstallMgr to gtk + Added basic InstallMgr gtk port. + Included Chris Little's initial cut of ThML filters + Added Torsten's Uhlmann's plainfootnotes, an option filter for + footnotes in plain format Biblical texts. + Added Torsten's rtfhtml filter (at the moment only usable for + the About comment) + +19-Jan-2000 + Added zText, zVerse, etc. code utilizing Daniel Glassey's comp + drivers + Fixed alloc bug in RawLD + +25-Nov-1999 + Fixed double // bug in swmgr + Fixed /./ bug in swmgr + Applied Joachim's patch to fix UpperBound bug + Fixed Makefile bugs + +17-Oct-1999 + Fixed bug in rawstr.cpp that would overwrite buffer size if + idxkey info was larger than buffer size + Added sparc support + Enhanced and debugged build and install system + added spec file for building RPMs + Added updated GBFHTML and PLAINHTML filters from bibletime team + Fixed bug in SWMgr on exit when can't find any config info + +15-Oct-1999 + Changed sig of ProcessText to include SWKey *, and calls approp. + Changed SWMgr::optionFilters security to protected + +05-Sep-1999 + Why is it always the 5th? + Added RawFilters to facilitate on-the-fly deciphering of entries + Added SWCipher which uses Michael Paul Johnson's SapphireII cipher + Added CipherFilter which uses SWCipher and .conf CipherKey= entry + +05-Jul-1999 + Added MAXCHAPTER and MAXVERSE as POSITIONs in VerseKey + Added Key() method for setting / getting key on SWModule + Added kludge to UpperBound for setting verse and chapter to max + values if not specified + Fixed bugs where error was not being set correctly for some + traversals of SWModule + +05-Jun-1999 + Sorry for not keeping the ChangeLog current + Lots of other stuff I'm sure I forgot + New mods.d configuration + Begin phase out of RawGBF. Move to RawText with SourceType=GBF + Added OptionFilters + Added scoped searches + More bug fixes, as always + Profiling to speed up some sections of code + +09-Jan-1999 + Various API bug fixes. + Added navigation support for all module types + Added search support for all module types + Added standard mods.conf location lookups to SWMgr + +15-Dec-1999 + Added cheatah, a simple lookup and search gtk GUI + +12-Nov-1998 + 1.3.1 release. + Started making entries in ChangeLog again! :) + Moved directory structure. + Added Luis Cortes' wxSword frontend to apps tree. GREAT START! + Fixed bug in canon.h that incorrectly assumed static structures were + allocated on the heap sequential if they were in the source + sequentially. + Changed SWModule::Search(char *... to SWModule::Search(const char * + Removed -Werror from Makefile.cfg to avoid problems with different + warnings that get displayed with different versions of egcs + +12-Dec-1997 + Fixed typo in about box of BibleCS + Changed font copyright notice in n27u4 + +09-Dec-1997 + Fixed Search window in BibleCS to search currently focused Bible Text module + and report such in the title bar. + Added ALPHA website to the CD Loader + Added a full report of the About section of a module when installing. (BibleCS) + Renamed module n26u4 to n27u4. + +04-Dec-1997 + Added DDE to BibleCS frontend. Thanx to Franklin Bratcher for the idea. + Service = sword; Topic = Bible; + Item = [Lookup|Search]; Data = " ". E.g.: + sword Bible Lookup MHC "Matthew 1:1" + sword Bible Search WEB knee[ls] + WARNING: case sensitive module names + See ddetest program under BibleCS directory + +29-Nov-1997 + Added SWFilter and modified appropriate modules to use these. + Added RawGBF class that automatically adds a GBFPlain filter to + strip GBF tags before searching. + Added sword/frontend/windoze/cbuilder/biblecs frontend. To build, use cmdline + compiler: make -fsword DO NOT OPEN sword.mak WITH C++BUILDER + Added sword/frontend/windoze/cbuilder/biblecs/cdstartup for autorun + CDROMs. + Made some functions const. + Added sword/install/complete for install. + Added module 'rwp' (Robertson's Word Pictures) + Added module 'kjv' (King James 1611 with some RTF) + Added module 'n26u4' (Nestle Aland 26th ed. / UBS 4th. ed. Greek NT) + Added module 'orthjbc' (Orthodox Jewish Brit Chadasha) + Added module 'sve' (Swedish Bible 1917 New Testament) + Added module 'vnt' (Valera 1858 Spanish New Testament Text) + Added module 'web' (The World English Bible) + Added swmgr class for module management. + Added swconfig class for .conf file manipulation. + +05-Oct-1997 + Added regular expression functionality to SWModule.Search() Used GNU + regex.h and regex.c with slight modifications to #define's +13-Jul-1996 + Added .Search() method to SWModule + Added SWListKey key type to facilitate lists of verses (used by .Search) + Added .Headings() boolean method to VerseKey to allow incrementor to + work including or excluding headers (e.g. chapter/book/testm/mod) + Started z series of modules for compression access using the compression + algorithms in the STEP specs. (These are either not done or + extremely unstable, be warned ;) + Added .Index() method to VerseKey + Changed VerseKey incrementors to use Index(Index() [+-] val) instead of + counting on Normalize(); + Added checks and output appropriate in VerseKey.freshtext() for headings. + This also fixed some bugs when trying to display VerseKey when + indexed to a heading. + Added frontend/widoze/Delphi20/swtxtdsp: the beginings of a Delphi RTF + control. + Changed Makefiles slightly for more logical compiles. + Added search test program (currently at ./) + Added keytest test program (currently ./tests) + Various Delphi component changes. + + once again.. probably many other things I forgot to list, but I'm + getting better! ;) Sorry for the time lapse. + + +8-Apr-1996 + + Fixed bug in VerseKey for old testament references! + Fixed VerseKey from crashing when set with text that it cannot parse. + Removed the need for Keys data files. Added information instead to canon.h + Added procedural API (frontend/windoze/bcowl25/swordapi) and 16 & 32 + bit DLLs for windoze (sword16.dll; sword32.dll). + Added Delphi components (frontend/windoze/delphi20/swordvc) and + examples (examples/windoze/delphi/multimo[1-3]) + + +14-Mar-1996 + + Renamed RawDrv to RawVerse + Moved RawVerse common index files and Index() to VerseKey + Added StrKey, a VerseKey counterpart that accepts a string for its + key information (for words, cities, people, etc.) + Added RawStr, a RawVerse counterpart that operates on a StrKey + Added SWLD- a lexicon/dictionary base class + Added raw lexicon/dictionary support with class RawLD and utilities + (modules/lexdict/rawld/rawld.cpp) + Added module 'eastons' (Easton's Bible Dictionary) + Added module 'vines' (Vine's Bible Dictionary) + Added executable demo 'lookup' that used RawLD and the 'eastons'and + 'vines' modules to lookup argv[1] (module decided by argv[2]) + Moved sword/frontend/windows/bcowl25 to examples/windoze/bcowl25/multimod + and added lexicon/dictionary support to demo. (Highligh a word and + right-click for menu) + Fixed VerseKey post-increment bug (operator ++(int)) + ... once again: probably more that I forgot ... + + +15-Feb-1996 + + Many small changes. + Moved raw file support to RawDrv class (modules/common/rawdrv.cpp) + Added Module/Testament/Book/Chapter intro entries in RawDrv index + files. This means that YOU WILL NEED TO DOWNLOAD NEW VERSIONS + OF THE RAW MODULES (or at least run the new 'makeidx' programs + against your old texts to re-index them (new versions save + some space so ideally the new copies are recommended). + Added size field into .vss RawDrv index files + Added logical comparison operators to VerseKey + Added Error() method to SWKey and return value KEYERR_OUTOFBOUNDS + This is set when VerseKey tries to increment or decrement + past valid canonical bounds (when Normalize() is attempted). + Added raw commentary support with class RawCom and utilities + (modules/comments/rawcom/rawcom.cpp) + Added module 'mhc' (Matthew Henry's Commentary on the Entire Bible) + Added AutoNormalize() method for toggling the automatic normalization + feature and moved normalize() to Normalize() (public). + Modified existing 'makeidx' utilities to support new format. + Removed ^M (0x0d) from RawDrv text files (sorry DOS users if this is + an inconvenience but it saves bandwidth for download time. + If you really feel the need to have them in your files, you + can always resave with most nonprogramming editors and it will + replace them, but be sure to run makeidx on 'ot' and 'nt' again + or your index files will be off. + Almost useful .exe in frontend/windoze/bcowl25/ (at least it shows an + example of coding direction for use of the API) + ... probably more that I forgot ... + + +22-Jan-1996 + + Added chapmax and versemax information (canon.h) + Made sword.cpp test program accept parameters: + usage: sword ["Book CH:VS"] [number of verses to display] + Enabled normalize function (try sword "Matthew 1:-7" 12) diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..d70ba81 --- /dev/null +++ b/INSTALL @@ -0,0 +1,151 @@ + INSTALLATION NOTES + + +QUICKSTART + +Try: + + ./usrinst.sh + make + su + make install + +If you have never installed sword before and/or are happy with a default +configuration, you may wish to type: + + make install_config + +for a basic configuration. WARNING: THIS WILL OVERWRITE AN EXISTING +CONFIGURATION. It is OK to rerun this if you have not changed any +parameters in /etc/sword.conf + +If the above steps do not work, or if you're particular about your +configuration, please read on. + + +BUILD CONFIGURATION + +What most people consider 'normal' user install options are saved in +a script 'usrinst.sh', which you may run with the command './usrinst.sh'. +You may want to have a look at the configuration options by typing +./configure --help and also looking at what we consider 'normal' +usage parameters by looking inside usrinst.sh +to be sure everything is being built the way that you would like. + + +BUILDING + +A 'make' at the top level directory of the SWORD package should build the +libraries necessary for building any of the frontends. The libraries will +be built in the ./lib directory. + +After the libraries are built, one will probably wish to 'su' to root and +'make install' to install the libraries systemwide. One then may proceed to +write and compile SWORD applications. + + +MODULES + +To be useful the software needs to find SWORD 'modules' installed somewhere +accessible. These module plugins consist of Bible texts, commentaries, +dictionaries, and the like. New plugins are constantly being added. They +may be obtained from: +http://www.crosswire.org or various mirrors. + +In a default SWORD configuration, the module install process may look like this: + +[download a module with your favourite client] +su +cd /usr/share/sword +unzip ~/KJV.zip + +There is also an over-the-net install utility located at utilities/installmgr + +After modules are installed, you can create fast search indecies (if you have +compiled with clucene support), with utilities/mkfastmod + +NOTE: sometimes clucene forgets to install some header files. You might need to +manually copy clucene-core-X/src/CLucene/clucene-config.h to your install prefix +(e.g. /usr/local/include/CLucene/) + +If you want module configuration/installation details, read on... + + +A directory named 'mods.d' contains all configuration information regarding +the installed modules available to the API. The format of a config file is +fairly straight-forward, and most modules come with their own .conf file, +of which the contents may be placed in the mods.d directory. + + +MODULE INSTALLATION SCHEME + +For a recommended module configuration scheme +On UN*X: create /etc/sword.conf with contents: +[Install] +DataPath=/usr/share/sword + +and unzip your modules to /usr/share/sword +(or type: make install_config which should do the same) + +Windows users can simply unzip their modules where they installed their frontend. + +Otherwise, read on: + + +DETAILS + + +The API attempts to hunts down its primary module configuration in the +following sequence, stopping at the first successful step: + + o) ./sword.conf in the format: + + [Install] + DataPath=/where/your/modules/are/installed + + then the API will look for /mods.d/ + + o) ./mods.d + o) ../library/mods.d (don't ask) + o) $SWORD_PATH/mods.d + o) $HOME/.sword/sword.conf in the format: + + [Install] + DataPath=/where/your/modules/are/installed + + then the API will look for /mods.d/ + + o) /etc/sword.conf in the format: + + [Install] + DataPath=/where/your/modules/are/installed + + then the API will look for /mods.d/ + + o) $HOME/.sword/mods.d/ + + +In addition to the 'primary module configuration', SWORD will also +include modules found in $HOME/.sword/mods.d/ + +Also, when a sword.conf file is used, any number of: + +AugmentDataPath=/where/more/modules/are/installed + +entries may be included. These are useful to tell sword to scan, +for example, CDROM, MMC, or other removable media locations. + + + +LOCALE + +If you would like to include support for localization, you may copy the +locales.d directory and any of the locale files contained therein into +the directory where your mods.d exists +(eg. to /usr/share/sword/locales.d/) +but this is done with a 'normal' sword install. + + +ENJOY!!! + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c1bc4e5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,350 @@ +The SWORD Project is (c) 1994-2006 The CrossWire Bible Society, under the +terms of the GNU GPL, as stated below. + +NOTE: The text of the GNU GPL license is copyrighted by the Free Software +Foundation, Inc., but The SWORD Project is copyrighted Corporately under: + + CrossWire Bible Society + P. O. Box 2528 + Tempe, AZ 85280-2528 + +_________________________________________________________________ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, 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 + + Appendix: 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., 675 Mass Ave, Cambridge, MA 02139, 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. diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..fa0baca --- /dev/null +++ b/Makefile.am @@ -0,0 +1,152 @@ +AUTOMAKE_OPTIONS = 1.6 + +# this WILL NOT WORK for you. only inhouse patched version of +# sapphire will omit enciphering code when set to yes, so leave +# as no, unless you really know what you're doing + +legalexport := no + +##### Customizable stuff. Set it how you like it ##### + +# if building dll with gcc on windoze (www.mingw.org) +# note you must set need_local_regex and buildshare to yes +if MINGW +mingw = yes +need_local_regex := yes +else + +# need regular expression stuff? +need_local_regex := no + +# shared library - set to yes if you would like to build +#buildshare := @enable_shared@ + +endif + +# Debugging options etc... +debug := @enable_debug@ +profile := @enable_profile@ + + +# endian, etc. support for other hardware + +system := @target_system@ + +#system := intel +#system := sparc_solaris +#system := macosx +#system := arm +#system := gnu_bigendian +#system := beos + +# SPARC Solaris users should define system as sparc_solaris; SPARC users running Linux or other OSes with glibc, like Debian GNU/Linux should use gnu_bigendian instead + +# to build on FreeBSD, simply use gmake instead of make + +# to build for Darwin on PPC, set system to macosx + + +# zLib support +zlib := @with_zlib@ + +# icu support +icu := @with_icu@ + +# Global config directory +globalconfdir := @sysconfdir@ + +SUBDIRS = lib . icu +if BUILDTESTS +TESTSDIR = tests +else +TESTSDIR = +endif +if BUILDUTILS +UTILSDIR = utilities +else +UTILSDIR = +endif +if BUILDEXAMPLES +EXAMPLESDIR = examples +else +EXAMPLESDIR = +endif + +SUBDIRS += $(TESTSDIR) $(UTILSDIR) $(EXAMPLESDIR) + +AM_CPPFLAGS = -I $(top_srcdir)/include +EXTRA_DIST = sword.spec sword.kdevprj sword.bmp usrinst.sh autogen.sh sword.pc.in + +if USE_PKGCONF +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = sword.pc + +$(pkgconfig_DATA): config.status +endif + +if INSTCONF +sysconf_DATA = sword.conf +sword.conf: + @echo "[Install]" > sword.conf + @echo "DataPath=$(pkgdatadir)/" >> sword.conf + +clean-generic: + -rm -f sword.conf +endif + +noinst_PROGRAMS = buildtest +buildtest_SOURCES = buildtest.cpp + +if ICU +iculibs = -licui18n -licuuc +endif + +buildtest_LDADD = $(top_builddir)/lib/libsword.la + +include locales.d/Makefile.am +include samples/Makefile.am +include doc/Makefile.am + +restore: + cd $(top_srcdir) && ./scripts/restoremake.sh + +install: install-recursive + @echo "" + @echo "sword is installed." + @echo "" + @echo "if this is your first time, you may need a basic global" + @echo "configuration file. one can be generated to $(DESTDIR)$(sysconfdir)/sword.conf" + @echo "by typing: \"make install_config\"" + @echo "" + @echo "modules (Bibles, etc.), may then be unzipped to $(pkgdatadir)/" + @echo "" + @echo "type \"make register\" to help us keep track of how many" + @echo "people are using sword." + @echo "(you may consider exiting from 'root', first, to make this" + @echo "a little more personal)" + @echo "" + + + +install-data-am: installlocaleDATA installmodsDATA install-pkgconfigDATA + +uninstall-am: uninstall-info-am uninstalllocaleDATA \ + uninstallmodsDATA uninstall-sysconfDATA uninstall-pkgconfigDATA + + +register: + @echo "" + echo "(***) $$USER@$$HOSTNAME, $$(date), $$(uname -m -r -s), SWORD @VERSION@, ${pkgdatadir}" | mail sword.users@crosswire.org + @echo "" + @echo "The output of this command has been sent to CrossWire-- thank you. Enjoy!" + @echo "" + +install_config: + @echo "[Install]" > $(DESTDIR)$(sysconfdir)/sword.conf + @echo "DataPath=$(pkgdatadir)/" >> $(DESTDIR)$(sysconfdir)/sword.conf + @echo "sword.conf generated" + + +dist-hook: + (cd $(distdir) && ./autogen.sh) + rm -r $(distdir)/autom4te.cache diff --git a/Makefile.cvs b/Makefile.cvs new file mode 100644 index 0000000..c875706 --- /dev/null +++ b/Makefile.cvs @@ -0,0 +1,13 @@ +all: aclocal automake autoheader autoconf + +aclocal: + ./autotools/bin/aclocal --acdir=./autotools/share/aclocal + +automake: + -./autotools/bin/automake --libdir=./autotools/share/automake + +autoheader: + ./autotools/bin/autoheader -A ./autotools/share/autoconf + +autoconf: + ./autotools/bin/autoconf -A ./autotools/share/autoconf diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..faad9fc --- /dev/null +++ b/Makefile.in @@ -0,0 +1,974 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +noinst_PROGRAMS = buildtest$(EXEEXT) +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/doc/Makefile.am \ + $(srcdir)/locales.d/Makefile.am $(srcdir)/samples/Makefile.am \ + $(srcdir)/sword.pc.in $(srcdir)/sword.spec.in \ + $(top_srcdir)/configure $(top_srcdir)/include/config.h.in \ + AUTHORS COPYING ChangeLog INSTALL NEWS config.guess config.sub \ + depcomp install-sh ltmain.sh missing +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ + $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = sword.pc sword.spec +PROGRAMS = $(noinst_PROGRAMS) +am_buildtest_OBJECTS = buildtest.$(OBJEXT) +buildtest_OBJECTS = $(am_buildtest_OBJECTS) +buildtest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(buildtest_SOURCES) +DIST_SOURCES = $(buildtest_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(sysconfdir)" +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +sysconfDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) $(sysconf_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = lib . icu tests utilities examples +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_CONFIG = @CPPUNIT_CONFIG@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CURL_AM_CFLAGS = @CURL_AM_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +GREP = @GREP@ +ICU_CONFIG = @ICU_CONFIG@ +ICU_IOLIBS = @ICU_IOLIBS@ +ICU_LIBS = @ICU_LIBS@ +ICU_VER = @ICU_VER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGDATA = @PKGDATA@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dir_confdef = @dir_confdef@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 + +# this WILL NOT WORK for you. only inhouse patched version of +# sapphire will omit enciphering code when set to yes, so leave +# as no, unless you really know what you're doing +legalexport := no + +##### Customizable stuff. Set it how you like it ##### + +# if building dll with gcc on windoze (www.mingw.org) +# note you must set need_local_regex and buildshare to yes +@MINGW_TRUE@mingw = yes + +# need regular expression stuff? +@MINGW_FALSE@need_local_regex := no +@MINGW_TRUE@need_local_regex := yes + +# shared library - set to yes if you would like to build +#buildshare := @enable_shared@ + +# Debugging options etc... +debug := @enable_debug@ +profile := @enable_profile@ + +# endian, etc. support for other hardware +system := @target_system@ + +#system := intel +#system := sparc_solaris +#system := macosx +#system := arm +#system := gnu_bigendian +#system := beos + +# SPARC Solaris users should define system as sparc_solaris; SPARC users running Linux or other OSes with glibc, like Debian GNU/Linux should use gnu_bigendian instead + +# to build on FreeBSD, simply use gmake instead of make + +# to build for Darwin on PPC, set system to macosx + +# zLib support +zlib := @with_zlib@ + +# icu support +icu := @with_icu@ + +# Global config directory +globalconfdir := @sysconfdir@ +SUBDIRS = lib . icu $(TESTSDIR) $(UTILSDIR) $(EXAMPLESDIR) +@BUILDTESTS_FALSE@TESTSDIR = +@BUILDTESTS_TRUE@TESTSDIR = tests +@BUILDUTILS_FALSE@UTILSDIR = +@BUILDUTILS_TRUE@UTILSDIR = utilities +@BUILDEXAMPLES_FALSE@EXAMPLESDIR = +@BUILDEXAMPLES_TRUE@EXAMPLESDIR = examples +AM_CPPFLAGS = -I $(top_srcdir)/include + +# This is too messy, not sure if it really is necessary. +# +#localeDATA = $(swlocaledir)/abbr.conf +#localeDATA += $(swlocaledir)/af.conf +#localeDATA += $(swlocaledir)/bg_BG-cp1251.conf +#localeDATA += $(swlocaledir)/cs.conf +#localeDATA += $(swlocaledir)/da.conf +#localeDATA += $(swlocaledir)/de-utf8.conf +#localeDATA += $(swlocaledir)/de.conf +#localeDATA += $(swlocaledir)/de_abbrev.conf +#localeDATA += $(swlocaledir)/en_GB.conf +#localeDATA += $(swlocaledir)/es.conf +#localeDATA += $(swlocaledir)/et.conf +#localeDATA += $(swlocaledir)/et_abbr.conf +#localeDATA += $(swlocaledir)/fi.conf +#localeDATA += $(swlocaledir)/fr.conf +#localeDATA += $(swlocaledir)/hu.conf +#localeDATA += $(swlocaledir)/id.conf +#localeDATA += $(swlocaledir)/it.conf +#localeDATA += $(swlocaledir)/la.conf +#localeDATA += $(swlocaledir)/nl.conf +#localeDATA += $(swlocaledir)/no.conf +#localeDATA += $(swlocaledir)/pl.conf +#localeDATA += $(swlocaledir)/pt.conf +#localeDATA += $(swlocaledir)/pt_BR.conf +#localeDATA += $(swlocaledir)/ro.conf +#localeDATA += $(swlocaledir)/ru_RU-cp1251.conf +#localeDATA += $(swlocaledir)/ru_RU-koi8-r.conf +#localeDATA += $(swlocaledir)/sk.conf +#localeDATA += $(swlocaledir)/sl.conf +#localeDATA += $(swlocaledir)/uk_UA-cp1251.conf +#localeDATA += $(swlocaledir)/uk_UA-koi8-u.conf +EXTRA_DIST = sword.spec sword.kdevprj sword.bmp usrinst.sh autogen.sh \ + sword.pc.in $(localeDATA) samples/mods.d/globals.conf \ + $(swdocdir)/greektrans.txt \ + $(swdocdir)/translation-template.conf +@USE_PKGCONF_TRUE@pkgconfigdir = $(libdir)/pkgconfig +@USE_PKGCONF_TRUE@pkgconfig_DATA = sword.pc +@INSTCONF_TRUE@sysconf_DATA = sword.conf +buildtest_SOURCES = buildtest.cpp +@ICU_TRUE@iculibs = -licui18n -licuuc +buildtest_LDADD = $(top_builddir)/lib/libsword.la +swlocaledir = $(top_srcdir)/locales.d +localeDATA = $(swlocaledir)/*.conf +localedatadir = $(pkgdatadir)/locales.d +modsdatadir = $(pkgdatadir)/mods.d +@INSTCONF_TRUE@modsDATA = samples/mods.d/globals.conf +swdocdir = $(top_srcdir)/doc +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/locales.d/Makefile.am $(srcdir)/samples/Makefile.am $(srcdir)/doc/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +include/config.h: include/stamp-h1 + @if test ! -f $@; then \ + rm -f include/stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1; \ + else :; fi + +include/stamp-h1: $(top_srcdir)/include/config.h.in $(top_builddir)/config.status + @rm -f include/stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status include/config.h +$(top_srcdir)/include/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f include/stamp-h1 + touch $@ + +distclean-hdr: + -rm -f include/config.h include/stamp-h1 +sword.pc: $(top_builddir)/config.status $(srcdir)/sword.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +sword.spec: $(top_builddir)/config.status $(srcdir)/sword.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +buildtest$(EXEEXT): $(buildtest_OBJECTS) $(buildtest_DEPENDENCIES) + @rm -f buildtest$(EXEEXT) + $(CXXLINK) $(buildtest_OBJECTS) $(buildtest_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildtest.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +install-sysconfDATA: $(sysconf_DATA) + @$(NORMAL_INSTALL) + test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" + @list='$(sysconf_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ + $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ + done + +uninstall-sysconfDATA: + @$(NORMAL_UNINSTALL) + @list='$(sysconf_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(sysconfdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +@INSTCONF_FALSE@clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-dvi: install-dvi-recursive + +install-exec-am: install-sysconfDATA + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags ctags-recursive dist \ + dist-all dist-bzip2 dist-gzip dist-hook dist-shar dist-tarZ \ + dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip install-sysconfDATA installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-pkgconfigDATA uninstall-sysconfDATA + + +@USE_PKGCONF_TRUE@$(pkgconfig_DATA): config.status +@INSTCONF_TRUE@sword.conf: +@INSTCONF_TRUE@ @echo "[Install]" > sword.conf +@INSTCONF_TRUE@ @echo "DataPath=$(pkgdatadir)/" >> sword.conf + +@INSTCONF_TRUE@clean-generic: +@INSTCONF_TRUE@ -rm -f sword.conf + +installlocaleDATA: $(localeDATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(localedatadir) + @list='$(localeDATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(localedatadir)/$$f"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(localedatadir)/$$f; \ + done + +uninstalllocaleDATA: + @$(NORMAL_UNINSTALL) + @list='$(localeDATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(localedatadir)/$$f"; \ + rm -f $(DESTDIR)$(localedatadir)/$$f; \ + done + +@INSTCONF_TRUE@installmodsDATA: $(modsDATA) +@INSTCONF_TRUE@ @$(NORMAL_INSTALL) +@INSTCONF_TRUE@ $(mkinstalldirs) $(DESTDIR)$(modsdatadir) +@INSTCONF_TRUE@ @list='$(modsDATA)'; for p in $$list; do \ +@INSTCONF_TRUE@ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +@INSTCONF_TRUE@ f="`echo $$p | sed -e 's|^.*/||'`"; \ +@INSTCONF_TRUE@ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(modsdatadir)/$$f"; \ +@INSTCONF_TRUE@ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(modsdatadir)/$$f; \ +@INSTCONF_TRUE@ done + +@INSTCONF_TRUE@uninstallmodsDATA: +@INSTCONF_TRUE@ @$(NORMAL_UNINSTALL) +@INSTCONF_TRUE@ @list='$(modsDATA)'; for p in $$list; do \ +@INSTCONF_TRUE@ f="`echo $$p | sed -e 's|^.*/||'`"; \ +@INSTCONF_TRUE@ echo " rm -f $(DESTDIR)$(modsdatadir)/$$f"; \ +@INSTCONF_TRUE@ rm -f $(DESTDIR)$(modsdatadir)/$$f; \ +@INSTCONF_TRUE@ done +@INSTCONF_FALSE@installmodsDATA: +@INSTCONF_FALSE@ @$(NORMAL_INSTALL) +@INSTCONF_FALSE@ $(mkinstalldirs) $(DESTDIR)$(modsdatadir) \ +@INSTCONF_FALSE@ done + +@INSTCONF_FALSE@uninstallmodsDATA: + +restore: + cd $(top_srcdir) && ./scripts/restoremake.sh + +install: install-recursive + @echo "" + @echo "sword is installed." + @echo "" + @echo "if this is your first time, you may need a basic global" + @echo "configuration file. one can be generated to $(DESTDIR)$(sysconfdir)/sword.conf" + @echo "by typing: \"make install_config\"" + @echo "" + @echo "modules (Bibles, etc.), may then be unzipped to $(pkgdatadir)/" + @echo "" + @echo "type \"make register\" to help us keep track of how many" + @echo "people are using sword." + @echo "(you may consider exiting from 'root', first, to make this" + @echo "a little more personal)" + @echo "" + +install-data-am: installlocaleDATA installmodsDATA install-pkgconfigDATA + +uninstall-am: uninstall-info-am uninstalllocaleDATA \ + uninstallmodsDATA uninstall-sysconfDATA uninstall-pkgconfigDATA + +register: + @echo "" + echo "(***) $$USER@$$HOSTNAME, $$(date), $$(uname -m -r -s), SWORD @VERSION@, ${pkgdatadir}" | mail sword.users@crosswire.org + @echo "" + @echo "The output of this command has been sent to CrossWire-- thank you. Enjoy!" + @echo "" + +install_config: + @echo "[Install]" > $(DESTDIR)$(sysconfdir)/sword.conf + @echo "DataPath=$(pkgdatadir)/" >> $(DESTDIR)$(sysconfdir)/sword.conf + @echo "sword.conf generated" + +dist-hook: + (cd $(distdir) && ./autogen.sh) + rm -r $(distdir)/autom4te.cache +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..58378c1 --- /dev/null +++ b/NEWS @@ -0,0 +1 @@ +See ChangeLog diff --git a/README b/README new file mode 100644 index 0000000..8ad227a --- /dev/null +++ b/README @@ -0,0 +1,65 @@ +Be sure to read INSTALL for information on how to get the software +built, configured, and running properly. +___________________________________________________________________ +Get the latest source and info at: + http://www.crosswire.org + +UNIX DEVELOPERS + You can try a './configure' (or optionally './usrinst.sh' + for normal user configure options), then 'make' from this directory. + This should compile everthing needed. You may type + './configure --help' to see a list of options. + If all compiles fine, a 'make install' (as root, probably) will + install libs to your system and you may begin using the library. + There are a few basic tests (tests/), start of a test suite + (tests/testsuite/), utilities (utilities/), and examples + (examples/), in the tree. + + To install modules, have a look at utilities/installmgr + + For some basic lookup and search utilities, see + examples/cmdline/search + examples/cmdline/lookup + utilities/diatheke/ + + If you are an end user looking for a nice SWORD, graphical Bible study + software suite, then you'll probably want to download one of the + many nice frontends found at http://crosswire.org + + ./buildtest.cpp compiles to the executable 'buildtest' as a test to + see if the libs have compiled and can be linked against successfully. + This is NOT the final target of the build, nor does anything useful. + :) + + +LANGUAGE BINDINGS + Other language bindings can be found in the ./bindings directory: + flatapi.cpp is a useful extern "C" interface for making bindings easier. + Kylix bindings (and maybe Delphi bindings) may be found in sword/bindings/clx + CORBA (orbit-c++) bindings with Java example classes in /bindings/corba + Perl stuff in bindings/perl + SWIG stuff (Python, .NET, many others) in bindings/swig + + +C++BUILDER DEVELOPERS + You may find project files under lib/bcppmake + +VC DEVELOPERS + You may find project files under lib/vcppmake + +DELPHI DEVELOPERS + You will need to place sword32.dll in your winsys + directory or elsewhere in your path. You can find source to + build the dll using ./bindings/flatapi.cpp + or a binary at: ftp://crosswire.org/pub/sword/utils/win32/bcdlls.zip + header file is include/SwordAPI.pas + CLX components can be found under bindings/clx/ + +.NET DEVELOPERS + Have a look in bindings/swig/vstudio/ + Binaries may be found at: ftp://crosswire.org/pub/sword/utils/win32/vcdlls.zip + +Enjoy! + +Please email any questions or comments to: sword-feedback@crosswire.org + diff --git a/README.svn b/README.svn new file mode 100644 index 0000000..f2a7d66 --- /dev/null +++ b/README.svn @@ -0,0 +1,7 @@ +SVN trunk repository URL: + +https://crosswire.org/svn/sword/trunk/ + +To generate the configure script you must run + +./autogen.sh diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..7d24aca --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,7473 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 51 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_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. +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'] + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# 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_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_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=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_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_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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 conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_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. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_REQUIRE([LT_AC_PROG_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_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_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. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${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 </dev/null 2>&1 && unset CDPATH + +if test -z "$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 && + echo_test_string=`eval $cmd` && + (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. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_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*|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*) + libsuff=64 + 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*) + 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_TRY_LINK([],[],[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" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$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 + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_REQUIRE([LT_AC_PROG_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 conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# 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*) + # 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 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_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 < +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#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 ()); + + exit (status); +}] +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_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_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*) + 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="-dld"], + [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="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + 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_AC_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_AC_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 +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_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_AC_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 .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_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 +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_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 +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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 +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[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 +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +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" +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]) +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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + 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_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognize shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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 + +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 +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognize a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_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 + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_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]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])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 + ;; + +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) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + 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=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + 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 +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible 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 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[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_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([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 +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[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_AC_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_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# 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 + ;; + +aix4* | aix5*) + 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]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_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(int, char *[[]]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_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_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + 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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_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' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_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 $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux* | k*bsd*-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_AC_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_AC_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 $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_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' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_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 $templist | $SED "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 $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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' + + # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + osf3*) + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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 $templist | $SED "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 $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_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 $templist | $SED "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 $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([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. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +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... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_AC_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac +])# AC_LIBTOOL_POSTDEP_PREDEP + +# AC_LIBTOOL_LANG_F77_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +[AC_REQUIRE([AC_PROG_F77]) +AC_LANG_PUSH(Fortran 77) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_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_AC_TAGVAR(objext, $1)=$objext + +# 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_AC_SYS_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" +CC=${F77-"f77"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +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 + ;; +aix4* | aix5*) + 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_AC_TAGVAR(GCC, $1)="$G77" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_F77_CONFIG + + +# AC_LIBTOOL_LANG_GCJ_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +[AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${GCJ-"gcj"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_GCJ_CONFIG + + +# AC_LIBTOOL_LANG_RC_CONFIG +# ------------------------- +# Ensure that the configuration vars for the Windows resource compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +[AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${RC-"windres"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_RC_CONFIG + + +# AC_LIBTOOL_CONFIG([TAGNAME]) +# ---------------------------- +# If TAGNAME is not passed, then 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 +# TAGNAME from the matching tagged config vars. +AC_DEFUN([AC_LIBTOOL_CONFIG], +[# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case $var in + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\[$]0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` + ;; + esac + +ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile"]) + + cat <<__EOF__ >> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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 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. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $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. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# 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 + +# 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=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# 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]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $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 < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +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_AC_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 -f 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 +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # 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*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # 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_AC_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_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_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' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # 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 + ;; + esac + + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&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. + +EOF + fi + ;; + + amigaos*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_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_AC_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' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_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 + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_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_AC_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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + 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_AC_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_AC_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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_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' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + +# 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. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_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]) +]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# 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. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# 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. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# 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 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# 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 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# 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 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# 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 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# +# 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 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# 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. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# 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 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# 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 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# 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 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# 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 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# 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. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# 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 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# 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 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# 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. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# 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. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# 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 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/acx_clucene.m4]) +m4_include([m4/cppunit.m4]) diff --git a/arminst.sh b/arminst.sh new file mode 100755 index 0000000..b57cf75 --- /dev/null +++ b/arminst.sh @@ -0,0 +1,12 @@ +#!/bin/sh + + +OPTIONS="--host=arm-linux $OPTIONS" +OPTIONS="--without-curl $OPTIONS" +OPTIONS="--disable-shared $OPTIONS" +OPTIONS="--without-lucene $OPTIONS" + +export PATH=$PATH:/usr/local/arm/2.95.3/bin/ + +. ./usrinst.sh + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..0666417 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,23 @@ +#!/bin/sh +echo "*** Sword build system generation" +echo "*** Recreating libtool" +if test -z "$LTIZE"; then +LTIZE="$AUTODIR""libtoolize" +fi +echo "$LTIZE" + $LTIZE --force --copy; + +ACLOCAL="$AUTODIR""aclocal" +echo "*** Recreating aclocal.m4" +echo "$ACLOCAL" + $ACLOCAL -I m4; + +echo "*** Recreating configure" +AUTOCONF="$AUTODIR""autoconf" +AUTOHEAD="$AUTODIR""autoheader" + $AUTOHEAD ; + $AUTOCONF; + +echo "*** Recreating the Makefile.in files" +AUTOMAKE="$AUTODIR""automake" + $AUTOMAKE -a -c --foreign; diff --git a/bindings/Makefile b/bindings/Makefile new file mode 100644 index 0000000..2ea344d --- /dev/null +++ b/bindings/Makefile @@ -0,0 +1,9 @@ + +root := .. +targets := ${root}/lib/libsword.a +clean-targets := none +include ${root}/Makefile.cfg + +cpp += flatapi.cpp + +include ${root}/Makefile.post diff --git a/bindings/Makefile.am b/bindings/Makefile.am new file mode 100644 index 0000000..7d6c0d2 --- /dev/null +++ b/bindings/Makefile.am @@ -0,0 +1,7 @@ +if CORBA +corbadir = corba +else +corbadir = +endif + +SUBDIRS = $(corbadir) diff --git a/bindings/README b/bindings/README new file mode 100644 index 0000000..3cc3735 --- /dev/null +++ b/bindings/README @@ -0,0 +1,9 @@ +Building java +------------- + +The source can be built with sun java (javac) or with GNU Classpath (jikes-classpath) +GJC does not yet work, corba is expected to work with gcj 4.1 + +set the JAVAC environment variable to whichever you wish to build with + +e.g. JAVAC=javac ./configure diff --git a/bindings/autogen.sh b/bindings/autogen.sh new file mode 100755 index 0000000..fd02786 --- /dev/null +++ b/bindings/autogen.sh @@ -0,0 +1,23 @@ +#!/bin/sh +echo "*** Sword build system generation" +#echo "*** Recreating libtool" +#if test -z "$LTIZE"; then +#LTIZE="$AUTODIR""libtoolize" +#fi +#echo "$LTIZE" +# $LTIZE --force --copy; + +ACLOCAL="$AUTODIR""aclocal" +echo "*** Recreating aclocal.m4" +echo "$ACLOCAL" + $ACLOCAL -I m4; + +echo "*** Recreating configure" +AUTOCONF="$AUTODIR""autoconf" +#AUTOHEAD="$AUTODIR""autoheader" +# $AUTOHEAD ; + $AUTOCONF; + +echo "*** Recreating the Makefile.in files" +AUTOMAKE="$AUTODIR""automake" + $AUTOMAKE -a -c --foreign; diff --git a/bindings/bcppmake/MainCLXTest.cpp b/bindings/bcppmake/MainCLXTest.cpp new file mode 100644 index 0000000..b82658a --- /dev/null +++ b/bindings/bcppmake/MainCLXTest.cpp @@ -0,0 +1,16 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop + +#include "MainCLXTest.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TForm2 *Form2; +//--------------------------------------------------------------------------- +__fastcall TForm2::TForm2(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- diff --git a/bindings/bcppmake/MainCLXTest.dfm b/bindings/bcppmake/MainCLXTest.dfm new file mode 100644 index 0000000..3d5e63c --- /dev/null +++ b/bindings/bcppmake/MainCLXTest.dfm @@ -0,0 +1,16 @@ +object Form2: TForm2 + Left = 346 + Top = 107 + Width = 870 + Height = 600 + Caption = 'Form2' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 +end diff --git a/bindings/bcppmake/MainCLXTest.h b/bindings/bcppmake/MainCLXTest.h new file mode 100644 index 0000000..fbb0f72 --- /dev/null +++ b/bindings/bcppmake/MainCLXTest.h @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- + +#ifndef MainCLXTestH +#define MainCLXTestH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm2 : public TForm +{ +__published: // IDE-managed Components +private: // User declarations +public: // User declarations + __fastcall TForm2(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm2 *Form2; +//--------------------------------------------------------------------------- +#endif diff --git a/bindings/bcppmake/MainTest.cpp b/bindings/bcppmake/MainTest.cpp new file mode 100644 index 0000000..46c0b65 --- /dev/null +++ b/bindings/bcppmake/MainTest.cpp @@ -0,0 +1,37 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop + +#include "MainTest.h" +extern "C" { +#include +} +//using namespace sword; +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TForm1 *Form1; +//--------------------------------------------------------------------------- +__fastcall TForm1::TForm1(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TForm1::FormShow(TObject *Sender) +{ + SWHANDLE mgr = SWMgr_new(); + SWHANDLE it = SWMgr_getModulesIterator(mgr); + SWHANDLE module = 0; + String modlist; + do { + module = ModList_iterator_val(it); + if (module) { + modlist += SWModule_getName(module) + (String)"\r\n"; + ModList_iterator_next(it); + } + } while (module); + Memo1->Text = modlist; + SWMgr_delete(mgr); +} +//--------------------------------------------------------------------------- diff --git a/bindings/bcppmake/MainTest.dfm b/bindings/bcppmake/MainTest.dfm new file mode 100644 index 0000000..ffb3c5a --- /dev/null +++ b/bindings/bcppmake/MainTest.dfm @@ -0,0 +1,36 @@ +object Form1: TForm1 + Left = 346 + Top = 234 + Width = 446 + Height = 265 + Caption = 'Form1' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object Memo1: TMemo + Left = 0 + Top = 0 + Width = 438 + Height = 197 + Align = alClient + Lines.Strings = ( + 'Memo1') + TabOrder = 0 + end + object Panel1: TPanel + Left = 0 + Top = 197 + Width = 438 + Height = 41 + Align = alBottom + Caption = 'Panel1' + TabOrder = 1 + end +end diff --git a/bindings/bcppmake/MainTest.h b/bindings/bcppmake/MainTest.h new file mode 100644 index 0000000..99802c8 --- /dev/null +++ b/bindings/bcppmake/MainTest.h @@ -0,0 +1,25 @@ +//--------------------------------------------------------------------------- + +#ifndef MainTestH +#define MainTestH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm1 : public TForm +{ +__published: // IDE-managed Components + TMemo *Memo1; + TPanel *Panel1; + void __fastcall FormShow(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TForm1(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm1 *Form1; +//--------------------------------------------------------------------------- +#endif diff --git a/bindings/bcppmake/Makefile.am b/bindings/bcppmake/Makefile.am new file mode 100644 index 0000000..0e34fea --- /dev/null +++ b/bindings/bcppmake/Makefile.am @@ -0,0 +1,16 @@ +swbcppmakedir = $(top_srcdir)/bindings/bcppmake + +EXTRA_DIST += $(swbcppmakedir)/MainCLXTest.dfm +EXTRA_DIST += $(swbcppmakedir)/MainTest.cpp +EXTRA_DIST += $(swbcppmakedir)/MainTest.h +EXTRA_DIST += $(swbcppmakedir)/clxtest.bpr +EXTRA_DIST += $(swbcppmakedir)/sword.bpf +EXTRA_DIST += $(swbcppmakedir)/sword.c +EXTRA_DIST += $(swbcppmakedir)/test.cpp +EXTRA_DIST += $(swbcppmakedir)/MainCLXTest.cpp +EXTRA_DIST += $(swbcppmakedir)/MainCLXTest.h +EXTRA_DIST += $(swbcppmakedir)/MainTest.dfm +EXTRA_DIST += $(swbcppmakedir)/Makefile.am +EXTRA_DIST += $(swbcppmakedir)/clxtest.cpp +EXTRA_DIST += $(swbcppmakedir)/sword.bpr +EXTRA_DIST += $(swbcppmakedir)/sworddll.bpg diff --git a/bindings/bcppmake/clxtest.bpr b/bindings/bcppmake/clxtest.bpr new file mode 100644 index 0000000..0231ee9 --- /dev/null +++ b/bindings/bcppmake/clxtest.bpr @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/bindings/bcppmake/clxtest.cpp b/bindings/bcppmake/clxtest.cpp new file mode 100644 index 0000000..9c481eb --- /dev/null +++ b/bindings/bcppmake/clxtest.cpp @@ -0,0 +1,24 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USERES("clxtest.res"); +USEFORM("MainCLXTest.cpp", Form2); +USEUNIT("..\clx\Sword.pas"); +USELIB("sword.lib"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TForm2), &Form2); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/bindings/bcppmake/sword.bpf b/bindings/bcppmake/sword.bpf new file mode 100644 index 0000000..b3caae1 --- /dev/null +++ b/bindings/bcppmake/sword.bpf @@ -0,0 +1,11 @@ +USEUNIT("sword.c"); +USEUNIT("..\flatapi.cpp"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icui18n.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icucommon.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +DllEntryPoint \ No newline at end of file diff --git a/bindings/bcppmake/sword.bpr b/bindings/bcppmake/sword.bpr new file mode 100644 index 0000000..092cb6f --- /dev/null +++ b/bindings/bcppmake/sword.bpr @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_DEBUG;SWMAKINGDLL +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + + \ No newline at end of file diff --git a/bindings/bcppmake/sword.c b/bindings/bcppmake/sword.c new file mode 100644 index 0000000..4c1c100 --- /dev/null +++ b/bindings/bcppmake/sword.c @@ -0,0 +1,31 @@ +//--------------------------------------------------------------------------- + +#include +//--------------------------------------------------------------------------- +// Important note about DLL memory management when your DLL uses the +// static version of the RunTime Library: +// +// If your DLL exports any functions that pass String objects (or structs/ +// classes containing nested Strings) as parameter or function results, +// you will need to add the library MEMMGR.LIB to both the DLL project and +// any other projects that use the DLL. You will also need to use MEMMGR.LIB +// if any other projects which use the DLL will be performing new or delete +// operations on any non-TObject-derived classes which are exported from the +// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling +// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases, +// the file BORLNDMM.DLL should be deployed along with your DLL. +// +// To avoid using BORLNDMM.DLL, pass string information using "char *" or +// ShortString parameters. +// +// If your DLL uses the dynamic version of the RTL, you do not need to +// explicitly add MEMMGR.LIB as this will be done implicitly for you +//--------------------------------------------------------------------------- + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved) +{ + return 1; +} +//--------------------------------------------------------------------------- + \ No newline at end of file diff --git a/bindings/bcppmake/sworddll.bpg b/bindings/bcppmake/sworddll.bpg new file mode 100644 index 0000000..7f3c269 --- /dev/null +++ b/bindings/bcppmake/sworddll.bpg @@ -0,0 +1,33 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = libsword.lib sword.dll test.exe clxtest.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +libsword.lib: ..\..\lib\bcppmake\libsword.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +sword.dll: sword.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +test.exe: test.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +clxtest.exe: clxtest.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + + diff --git a/bindings/bcppmake/test.cpp b/bindings/bcppmake/test.cpp new file mode 100644 index 0000000..1d02c50 --- /dev/null +++ b/bindings/bcppmake/test.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USERES("test.res"); +USEFORM("MainTest.cpp", Form1); +USELIB("sword.lib"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TForm1), &Form1); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/bindings/clx/Sword.pas b/bindings/clx/Sword.pas new file mode 100644 index 0000000..9fecc17 --- /dev/null +++ b/bindings/clx/Sword.pas @@ -0,0 +1,213 @@ +unit Sword; + + +interface + const LIBNAME = 'sword.dll'; + function SWMgr_getPrefixPath(h: integer): PChar; cdecl; external libname; + function SWMgr_new: integer; cdecl; external LIBNAME; + procedure SWMgr_delete(h: integer); cdecl; external LIBNAME; + function SWMgr_getModulesIterator(h: integer) : integer; cdecl; external LIBNAME; + function SWMgr_getModuleByName(h: integer; name: PChar) : integer; cdecl; external LIBNAME; + + procedure ModList_iterator_next(h: integer); cdecl; external LIBNAME; + function ModList_iterator_val(h: integer) : integer; cdecl; external LIBNAME; + + function SWModule_getType(h: integer) : PChar; cdecl; external LIBNAME; + function SWModule_getName(h: integer) : PChar; cdecl; external LIBNAME; + function SWModule_getDescription(h: integer) : PChar; cdecl; external LIBNAME; + function SWModule_getStripText(h: integer) : PChar; cdecl; external LIBNAME; + function SWModule_getRenderText(h: integer) : PChar; cdecl; external LIBNAME; + function SWModule_getKeyText(h: integer) : PChar; cdecl; external LIBNAME; + procedure SWModule_setKeyText(h: integer; key: PChar); cdecl; external LIBNAME; + procedure SWModule_begin(h: integer); cdecl; external LIBNAME; + procedure SWModule_next(h: integer); cdecl; external LIBNAME; + procedure SWModule_previous(h: integer); cdecl; external LIBNAME; +type + + SWModule = class(TObject) + private + handle : integer; + public + constructor Create(handle : integer); + function getType : String; + function getName : String; + function getDescription : String; + function getStripText : String; + function getRenderText : WideString; + function getKeyText : String; + procedure setKeyText(keyText : String); + procedure modBegin; + procedure modNext; + procedure modPrevious; + end; + + + ModIterator = class(TObject) + private + handle : integer; + public + constructor Create(handle : integer); + procedure next; + function getValue : SWModule; + end; + + + SWMgr = class(TObject) + private + handle : integer; + public + constructor Create; + destructor Destroy; override; + function getPrefixPath : String; + function getModulesIterator : ModIterator; + function getModuleByName(name: String) : SWModule; + end; + +implementation + +constructor SWMgr.Create; +var + yohan : integer; +begin + yohan := SWMgr_new; + handle := yohan; +end; + + +destructor SWMgr.Destroy; +begin + SWMgr_delete(handle); +end; + + +function SWMgr.getPrefixPath() : String; +var + stuff : String; + pstuff : PChar; +begin + pstuff := SWMgr_getPrefixPath(handle); + stuff := String(pstuff); + Result := stuff; +end; + + +function SWMgr.getModulesIterator : ModIterator; +begin + Result := ModIterator.Create(SWMgr_getModulesIterator(handle)); +end; + +function SWMgr.getModuleByName(name: String) : SWModule; +var + modHandle : Integer; + +begin + modHandle := SWMgr_getModuleByName(handle, PChar(name)); + if (modHandle <> 0) then + Result := SWModule.Create(modHandle) + else Result := nil; +end; + + + + +{ ModIterator methods --------------------------------------------- } + + +constructor ModIterator.Create(handle : integer); +begin + Self.handle := handle; +end; + + +procedure ModIterator.next; +begin + ModList_iterator_next(handle); +end; + + +function ModIterator.getValue : SWModule; +var + modHandle : Integer; + +begin + modHandle := ModList_iterator_val(handle); + if (modHandle <> 0) then + Result := SWModule.Create(modHandle) + else Result := nil; +end; + + + + + +{ SWModule methods --------------------------------------------- } + + +constructor SWModule.Create(handle : integer); +begin + Self.handle := handle; +end; + + +function SWModule.getType : String; +begin + Result := String(SWModule_getType(handle)); +end; + + +function SWModule.getName : String; +begin + Result := String(SWModule_getName(handle)); +end; + + +function SWModule.getDescription : String; +begin + Result := String(SWModule_getDescription(handle)); +end; + + +function SWModule.getStripText : String; +begin + Result := String(SWModule_getStripText(handle)); +end; + + +function SWModule.getRenderText : WideString; +begin + Result := WideString(SWModule_getRenderText(handle)); +end; + + +function SWModule.getKeyText : String; +begin + Result := String(SWModule_getKeyText(handle)); +end; + + +procedure SWModule.setKeyText(keyText: String); +begin + SWModule_setKeyText(handle, PChar(keyText)); +end; + + +procedure SWModule.modBegin; +begin + SWModule_begin(handle); +end; + + +procedure SWModule.modNext; +begin + SWModule_next(handle); +end; + + +procedure SWModule.modPrevious; +begin + SWModule_previous(handle); +end; + +end. + + diff --git a/bindings/clx/test1/MainFrm.pas b/bindings/clx/test1/MainFrm.pas new file mode 100644 index 0000000..2d28a7f --- /dev/null +++ b/bindings/clx/test1/MainFrm.pas @@ -0,0 +1,116 @@ +unit MainFrm; + +interface + +uses + SysUtils, Types, Classes, Variants, QGraphics, QControls, QForms, QDialogs, + QStdCtrls, QComCtrls, QExtCtrls, Sword; + +type + TForm1 = class(TForm) + Panel1: TPanel; + Panel2: TPanel; + Panel3: TPanel; + TreeView1: TTreeView; + Button1: TButton; + Edit1: TEdit; + Label1: TLabel; + TextBrowser1: TTextBrowser; + procedure Edit1Change(Sender: TObject); + procedure TreeView1Change(Sender: TObject; Node: TTreeNode); + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + private + procedure lookup(); + public + { Public declarations } + end; + +var + Form1: TForm1; + mgr : SWMgr; + +implementation + +{$R *.xfm} + +procedure TForm1.Edit1Change(Sender: TObject); +begin + lookup(); +end; + +procedure TForm1.lookup(); +var + module : SWModule; + node : TTreeNode; + +begin + node := TreeView1.Selected; + if (node <> nil) then + begin + module := mgr.getModuleByName(node.Text); + if (module <> nil) then + begin + module.setKeyText(Edit1.Text); + + TextBrowser1.Text := + '' + + '' + module.getKeyText() + ' ' + + module.getRenderText() + + ''; + + Label1.Caption := ': ' + module.getKeyText(); + end; + end; +end; + +procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode); +begin + lookup(); +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + Application.Terminate; +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + mgr := SWMgr.Create; +end; + +procedure TForm1.FormShow(Sender: TObject); +var + root, node : TTreeNode; + module : SWModule; + modIt : ModIterator; + found : Boolean; + +begin +// root := TreeView1.TopItem; +// root := TreeView1.Items.AddChild(TreeView1.TopItem, 'Modules'); + + modIt := mgr.getModulesIterator; + module := modIt.getValue; + while (module <> nil) do + begin + node := TreeView1.Items.GetFirstNode; + found := false; + while ((node <> nil) AND (NOT found)) do + begin + if (node.Text = module.getType) then + found := true + else node := node.getNextSibling; + end; + if (node = nil) then + node := TreeView1.Items.AddChild(TreeView1.TopItem, module.GetType()); + + TreeView1.Items.AddChild(node, module.GetName()); + + modIt.Next; + module := modIt.getValue; + end; +end; + +end. diff --git a/bindings/clx/test1/MainFrm.xfm b/bindings/clx/test1/MainFrm.xfm new file mode 100644 index 0000000..ce77f46 --- /dev/null +++ b/bindings/clx/test1/MainFrm.xfm @@ -0,0 +1,90 @@ +object Form1: TForm1 + Left = 260 + Top = 148 + Width = 592 + Height = 487 + HorzScrollBar.Range = 185 + VertScrollBar.Range = 41 + Caption = 'Form1' + Color = clBackground + OnCreate = FormCreate + OnShow = FormShow + PixelsPerInch = 108 + TextHeight = 20 + TextWidth = 8 + object Panel1: TPanel + Left = 0 + Top = 41 + Width = 185 + Height = 446 + Align = alLeft + Caption = 'Panel1' + TabOrder = 0 + object TreeView1: TTreeView + Left = 1 + Top = 1 + Width = 183 + Height = 444 + Align = alClient + Columns = <> + TabOrder = 0 + OnChange = TreeView1Change + end + end + object Panel2: TPanel + Left = 185 + Top = 41 + Width = 407 + Height = 446 + Align = alClient + Caption = 'Panel2' + TabOrder = 1 + object TextBrowser1: TTextBrowser + Left = 1 + Top = 1 + Width = 405 + Height = 444 + Align = alClient + TabOrder = 0 + TextFormat = tfText + end + end + object Panel3: TPanel + Left = 0 + Top = 0 + Width = 592 + Height = 41 + Align = alTop + TabOrder = 2 + object Button1: TButton + Left = 509 + Top = 8 + Width = 75 + Height = 25 + Anchors = [akTop, akRight] + Caption = 'Exit' + TabOrder = 0 + OnClick = Button1Click + end + object Edit1: TEdit + Left = 136 + Top = 8 + Width = 177 + Height = 28 + TabOrder = 1 + OnChange = Edit1Change + end + object Label1: TLabel + Left = 328 + Top = 12 + Width = 1 + Height = 20 + Font.Color = clBlack + Font.Height = 17 + Font.Name = 'Helvetica' + Font.Pitch = fpVariable + Font.Style = [fsBold] + ParentFont = False + end + end +end diff --git a/bindings/clx/test1/test1.conf b/bindings/clx/test1/test1.conf new file mode 100644 index 0000000..b6fb6e7 --- /dev/null +++ b/bindings/clx/test1/test1.conf @@ -0,0 +1,36 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J- +-$K- +-$L+ +-$M- +-$N+ +-$O+ +-$P+ +-$Q- +-$R- +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-U"../" +-O"../" +-I"../" +-R"../" diff --git a/bindings/clx/test1/test1.dpr b/bindings/clx/test1/test1.dpr new file mode 100644 index 0000000..7b18af9 --- /dev/null +++ b/bindings/clx/test1/test1.dpr @@ -0,0 +1,14 @@ +program test1; + +uses + QForms, + MainFrm in 'MainFrm.pas' {Form1}, + Sword in '../Sword.pas'; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/bindings/clx/test1/test1.kof b/bindings/clx/test1/test1.kof new file mode 100644 index 0000000..99b034e --- /dev/null +++ b/bindings/clx/test1/test1.kof @@ -0,0 +1,61 @@ +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=0 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases= + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +DynamicLoader=/lib/ld-linux.so.2 + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath=../ +Packages=baseclx:visualclx +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= +Launcher=/usr/X11R6/bin/xterm -T KylixDebuggerOutput -e bash -i -c %debuggee% +UseLauncher=0 +DebugCWD= + diff --git a/bindings/clx/test1/test1.res b/bindings/clx/test1/test1.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/bindings/clx/test1/test1.res differ diff --git a/bindings/clx/test1/test1g.bpg b/bindings/clx/test1/test1g.bpg new file mode 100644 index 0000000..db19a61 --- /dev/null +++ b/bindings/clx/test1/test1g.bpg @@ -0,0 +1,15 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.02.5 +#------------------------------------------------------------------------------ +MAKE = make -$(MAKEFLAGS) -f$** +DCC =dcc $< +#------------------------------------------------------------------------------ +PROJECTS = test1 +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +test1: test1.dpr + $(DCC) + + diff --git a/bindings/clx/test2/MainFrm.pas b/bindings/clx/test2/MainFrm.pas new file mode 100644 index 0000000..a60385e --- /dev/null +++ b/bindings/clx/test2/MainFrm.pas @@ -0,0 +1,417 @@ +unit MainFrm; + +interface + +uses + SysUtils, StrUtils, Types, Classes, Variants, QGraphics, QControls, QForms, QDialogs, + QStdCtrls, QComCtrls, QExtCtrls, Sword, QButtons, QImgList, QMenus, + QTypes; + +type + TForm1 = class(TForm) + Panel1: TPanel; + TreeView1: TTreeView; + ImageList1: TImageList; + Splitter1: TSplitter; + Panel3: TPanel; + Splitter2: TSplitter; + Panel4: TPanel; + TextBrowser2: TTextBrowser; + Panel5: TPanel; + ListView: TListView; + Splitter3: TSplitter; + Panel6: TPanel; + Edit2: TEdit; + StatusBar1: TStatusBar; + ColorDialog1: TColorDialog; + FontDialog1: TFontDialog; + Panel8: TPanel; + Splitter4: TSplitter; + Panel7: TPanel; + TextBrowser3: TTextBrowser; + Panel2: TPanel; + TextBrowser1: TTextBrowser; + ToolBar2: TToolBar; + Edit1: TEdit; + ComboBox1: TComboBox; + SpinEdit1: TSpinEdit; + SpinEdit2: TSpinEdit; + ToolButton4: TToolButton; + Label2: TLabel; + btnBTFollow: TToolButton; + btnCMFollow: TToolButton; + ImageList2: TImageList; + MainMenu1: TMainMenu; + File1: TMenuItem; + Exit1: TMenuItem; + Options1: TMenuItem; + Strongs1: TMenuItem; + MorphTags1: TMenuItem; + Footnotes1: TMenuItem; + ChangeTextFont1: TMenuItem; + CurrentVerseColor1: TMenuItem; + procedure Edit1Change(Sender: TObject); + procedure TreeView1Change(Sender: TObject; Node: TTreeNode); + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure ToolButton1Click(Sender: TObject); + procedure Edit2Change(Sender: TObject); + procedure ListViewItemClick(Sender: TObject; Button: TMouseButton; + Item: TListItem; const Pt: TPoint; ColIndex: Integer); + procedure SpinEdit2Changed(Sender: TObject; NewValue: Integer); + procedure SpinEdit1Changed(Sender: TObject; NewValue: Integer); + procedure ComboBox1Change(Sender: TObject); + procedure CurrentVerseColor1Click(Sender: TObject); + private + fontName: string; + fontSize: integer; + doOnChange: boolean; + procedure setBookCombo(ref: String); + procedure lookup(); + procedure lookupLD(); + function getChapter(key: String): integer; + function getVerse(key: String): integer; + procedure FillDictKeys(key: String); + public + { Public declarations } + curModBT: String; + curModCM: String; + curModLD: String; + end; + +var + Form1: TForm1; + mgr : SWMgr; + +implementation + +{$R *.xfm} + +procedure TForm1.Edit1Change(Sender: TObject); +begin + if (doOnChange) then + lookup(); +end; + +procedure TForm1.setBookCombo(ref: string); +var + pos: integer; + bookname: string; + +begin + pos := LastDelimiter(' ',ref); + bookname := LeftStr(ref,pos); + ComboBox1.Text := bookname; +end; + +function TForm1.getChapter(key: String): integer; +var + len: integer; + pos: integer; + j: integer; + tmpbuf: String; +begin + //len := Length(key); + pos := LastDelimiter(':',key); + tmpbuf := '000'; + j := 3; + for len := pos-1 downto 0 do + begin + if(key[len] <> ' ') then + begin + tmpbuf[j] := key[len]; + j := j -1; + end + else break; + end; + Result := StrToInt(tmpbuf); +end; + + +function TForm1.getVerse(key: String): integer; +var + len: integer; + pos: integer; + j: integer; + i: integer; + tmpbuf: String; +begin + len := Length(key); + pos := LastDelimiter(':',key); + tmpbuf := ' '; + j := 1; + for i := pos+1 to len do + begin + if(key[i] <> '') then + begin + tmpbuf[j] := key[i]; + j := j + 1; + end + else break; + end; + tmpbuf := TrimRight(tmpbuf); + Result := StrToInt(tmpbuf); +end; + + +procedure TForm1.lookup(); +var + module : SWModule; + chapter : integer; + buf : string; + currentVerse : string; + text : string; + key : string; + verse : integer; + j : integer; +begin + module := mgr.getModuleByName(curModBT); + if (module <> nil) then + begin + module.setKeyText(Edit1.Text); + currentVerse := module.getKeyText; + chapter := getChapter(currentVerse); + verse := getVerse(currentVerse); + + doOnChange := false; + setBookCombo(currentVerse); + SpinEdit1.Value := chapter; + SpinEdit2.Value := verse; + doOnChange := true; + + buf := ' '; + key := module.getKeyText; + j := 1; + if(AnsiContainsText(key,':')) then + begin + while key[j] <> ':' do + begin + buf[j] := key[j]; + j := j + 1; + end; + end; + buf := TrimRight(buf); + buf := buf + ':1'; + module.setKeyText(buf); + text := ''; + while(chapter = getChapter(module.getKeyText)) do + begin + if(currentVerse = module.getKeyText) then + text := text + '' + + module.getKeyText() + + ' ' + + '' + + module.getRenderText() + '
' + else + text := text + '' + + module.getKeyText() + + ' ' + '' + + module.getRenderText() + '
'; + //buf := IntToStr(chapter); + //Label1.Caption := IntToStr(chapter) + ':' + IntToStr(verse); + module.modNext; + end; + text := text + ''; + TextBrowser1.Text := text; + TextBrowser1.ScrollToAnchor('cv'); + StatusBar1.SimpleText := currentVerse; + end; + //end; + + + if(btnCMFollow.Down) then + begin + module := mgr.getModuleByName(curModCM); + if (module <> nil) then + begin + module.setKeyText(Edit1.Text); + TextBrowser3.Text := + '' + + '[' + + module.getName + '] ' + + module.getKeyText() + + ' ' + + module.getRenderText() + + ''; + + //Label1.Caption := ': ' + module.getKeyText(); + end; + end; +end; + +procedure TForm1.lookupLD(); +var + module : SWModule; +begin + module := mgr.getModuleByName(curModLD); + if (module <> nil) then + begin + module.setKeyText(Edit2.Text); + TextBrowser2.Text := + '' + + '[' + + module.getName + '] ' + module.getKeyText() + + ' ' + + module.getRenderText() + + ''; + end; + FillDictKeys(module.getKeyText); + + +end; + +procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode); +var + module : SWModule; + +begin + module := mgr.getModuleByName(Node.Text); + if (module <> nil) then + begin + if(module.getType = 'Biblical Texts') then + begin + curModBT := Node.Text; + lookup(); + end; + + if(module.getType = 'Commentaries') then + begin + curModCM := Node.Text; + lookup(); + end; + + if(module.getType = 'Lexicons / Dictionaries') then + begin + curModLD := Node.Text; + lookupLD; + end; + end; +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + Application.Terminate; +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + mgr := SWMgr.Create; +end; + +procedure TForm1.FormShow(Sender: TObject); +var + node : TTreeNode; + module : SWModule; + modIt : ModIterator; + found : Boolean; + +begin + doOnChange := true; + fontName := ''; + fontSize := 3; // html font size + + modIt := mgr.getModulesIterator; + module := modIt.getValue; + while (module <> nil) do + begin + node := TreeView1.Items.GetFirstNode; + found := false; + while ((node <> nil) AND (NOT found)) do + begin + if (node.Text = module.getType) then + found := true + else node := node.getNextSibling; + end; + if (node = nil) then + node := TreeView1.Items.AddChild(TreeView1.TopItem, module.GetType()); + + TreeView1.Items.AddChild(node, module.GetName()); + + modIt.Next; + module := modIt.getValue; + end; +end; + +procedure TForm1.ToolButton1Click(Sender: TObject); +begin + FontDialog1.Execute; + fontName := FontDialog1.Font.Name; + fontSize := FontDialog1.Font.Size; + if (fontSize > 18) then fontSize := 7 + else if (fontSize < 8) then fontSize := 1 + else if (fontSize = 8) then fontSize := 1 + else if (fontSize = 9) then fontSize := 1 + else if (fontSize = 10) then fontSize := 2 + else if (fontSize = 11) then fontSize := 3 + else if (fontSize = 12) then fontSize := 3 + else if (fontSize = 13) then fontSize := 4 + else if (fontSize = 14) then fontSize := 5 + else if (fontSize = 15) then fontSize := 5 + else if (fontSize = 16) then fontSize := 6 + else if (fontSize = 17) then fontSize := 6 + else if (fontSize = 18) then fontSize := 7; + + lookup; +end; + +procedure TForm1.Edit2Change(Sender: TObject); +begin + lookupLD(); +end; + + +procedure TForm1.FillDictKeys(key: string); +var + module : SWModule; + count : integer; + i : integer; + ListItem: TListItem; +begin + module := mgr.getModuleByName(curModLD); + count := (ListView.Height div (ListView.Font.Height + 8)); + ListView.Items.Clear; + for i := 0 to (count div 2) do + module.modNext; //-- get equal number of keys before and after our starting key(saveKey) + for i := 0 to count - 1 do + module.modPrevious; + for i := 0 to count do + begin + ListItem := ListView.Items.Add; + ListItem.Caption := module.getKeyText; + module.modNext; + end; + module.setKeyText(key); +end; + +procedure TForm1.ListViewItemClick(Sender: TObject; Button: TMouseButton; + Item: TListItem; const Pt: TPoint; ColIndex: Integer); +begin + Edit2.Text := Item.Caption; +end; + +procedure TForm1.SpinEdit2Changed(Sender: TObject; NewValue: Integer); +begin + Edit1.Text := ComboBox1.Text + ' ' + SpinEdit1.Text + ':' + SpinEdit2.Text; +end; + +procedure TForm1.SpinEdit1Changed(Sender: TObject; NewValue: Integer); +begin + Edit1.Text := ComboBox1.Text + ' ' + SpinEdit1.Text + ':1'; +end; + +procedure TForm1.ComboBox1Change(Sender: TObject); +begin + Edit1.Text := ComboBox1.Text + ' ' + '1:1'; +end; + +procedure TForm1.CurrentVerseColor1Click(Sender: TObject); +begin + ColorDialog1.Execute + //ColorDialog1.Color +end; + +end. diff --git a/bindings/clx/test2/MainFrm.xfm b/bindings/clx/test2/MainFrm.xfm new file mode 100644 index 0000000..180fac1 --- /dev/null +++ b/bindings/clx/test2/MainFrm.xfm @@ -0,0 +1,753 @@ +object Form1: TForm1 + Left = 331 + Top = 273 + Width = 608 + Height = 407 + HorzScrollBar.Range = 118 + VertScrollBar.Range = 19 + ActiveControl = TreeView1 + Caption = 'KylixSWORD' + Color = clBackground + Menu = MainMenu1 + OnCreate = FormCreate + OnShow = FormShow + PixelsPerInch = 108 + TextHeight = 15 + TextWidth = 7 + object Splitter1: TSplitter + Left = 113 + Top = 0 + Width = 5 + Height = 363 + Beveled = True + end + object Panel1: TPanel + Left = 0 + Top = 0 + Width = 113 + Height = 363 + Align = alLeft + Caption = 'Panel1' + TabOrder = 0 + object TreeView1: TTreeView + Left = 1 + Top = 1 + Width = 111 + Height = 361 + Align = alClient + Color = clLight + Columns = <> + TabOrder = 0 + OnChange = TreeView1Change + end + end + object Panel3: TPanel + Left = 118 + Top = 0 + Width = 490 + Height = 363 + Align = alClient + Caption = 'Panel3' + TabOrder = 1 + object Splitter2: TSplitter + Left = 1 + Top = 231 + Width = 488 + Height = 5 + Cursor = crVSplit + Align = alBottom + end + object Panel4: TPanel + Left = 1 + Top = 236 + Width = 488 + Height = 126 + Align = alBottom + TabOrder = 0 + object Splitter3: TSplitter + Left = 283 + Top = 1 + Width = 5 + Height = 124 + Align = alRight + end + object TextBrowser2: TTextBrowser + Left = 1 + Top = 1 + Width = 282 + Height = 124 + Align = alClient + TabOrder = 0 + end + object Panel5: TPanel + Left = 288 + Top = 1 + Width = 199 + Height = 124 + Align = alRight + TabOrder = 1 + object ListView: TListView + Left = 1 + Top = 25 + Width = 197 + Height = 98 + Align = alClient + Columns = <> + TabOrder = 0 + OnItemClick = ListViewItemClick + end + object Panel6: TPanel + Left = 1 + Top = 1 + Width = 197 + Height = 24 + Align = alTop + Caption = 'Panel6' + TabOrder = 1 + object Edit2: TEdit + Left = 2 + Top = 1 + Width = 193 + Height = 22 + AutoSize = False + Font.CharSet = fcsUnicode + Font.Color = clBlack + Font.Height = 13 + Font.Name = 'arial unicode ms' + Font.Pitch = fpVariable + Font.Style = [] + ParentFont = False + TabOrder = 0 + Text = 'GRACE' + OnChange = Edit2Change + end + end + end + end + object Panel8: TPanel + Left = 1 + Top = 28 + Width = 488 + Height = 203 + Align = alClient + Caption = 'Panel8' + TabOrder = 1 + object Splitter4: TSplitter + Left = 249 + Top = 1 + Width = 5 + Height = 201 + Align = alRight + end + object Panel7: TPanel + Left = 254 + Top = 1 + Width = 233 + Height = 201 + Align = alRight + Caption = 'Panel7' + TabOrder = 0 + object TextBrowser3: TTextBrowser + Left = 1 + Top = 1 + Width = 231 + Height = 199 + Align = alClient + TabOrder = 0 + end + end + object Panel2: TPanel + Left = 1 + Top = 1 + Width = 248 + Height = 201 + Align = alClient + Caption = 'Panel2' + TabOrder = 1 + object TextBrowser1: TTextBrowser + Left = 1 + Top = 1 + Width = 246 + Height = 199 + Align = alClient + TabOrder = 0 + end + end + end + object ToolBar2: TToolBar + Left = 1 + Top = 1 + Width = 488 + Height = 27 + ButtonHeight = 23 + Caption = 'ToolBar2' + Images = ImageList2 + TabOrder = 2 + object Edit1: TEdit + Left = 51 + Top = 4 + Width = 166 + Height = 23 + AutoSize = False + Font.CharSet = fcsUnicode + Font.Color = clBlack + Font.Height = 13 + Font.Name = 'arial unicode ms' + Font.Pitch = fpVariable + Font.Style = [] + ParentFont = False + TabOrder = 0 + Text = 'Genesis 1:1' + OnChange = Edit1Change + end + object ComboBox1: TComboBox + Left = 225 + Top = 4 + Width = 120 + Height = 23 + ItemHeight = 17 + Items.Strings = ( + 'Genesis' + 'Exodus' + 'Leviticus' + 'Numbers' + 'Deuteronomy' + 'Joshua' + 'Judges' + 'Ruth' + 'I Samuel' + 'II Samuel' + 'I Kings' + 'II Kings' + 'I Chronicles' + 'II Chronicles' + 'Ezra' + 'Nehemiah' + 'Esther' + 'Job' + 'Psalms' + 'Proverbs' + 'Ecclesiastes' + 'Song of Solomon' + 'Isaiah' + 'Jeremiah' + 'Lamentations' + 'Ezekiel' + 'Daniel' + 'Hosea' + 'Joel' + 'Amos' + 'Obadiah' + 'Jonah' + 'Micah' + 'Nahum' + 'Habakkuk' + 'Zephaniah' + 'Haggai' + 'Zechariah' + 'Malachi' + 'Matthew' + 'Mark' + 'Luke' + 'John' + 'Acts' + 'Romans' + 'I Corinthians' + 'II Corinthians' + 'Galatians' + 'Ephesians' + 'Philippians' + 'Colossians' + 'I Thessalonians' + 'II Thessalonians' + 'I Timothy' + 'II Timothy' + 'Titus' + 'Philemon' + 'Hebrews' + 'James' + 'I Peter' + 'II Peter' + 'I John' + 'II John' + 'III John' + 'Jude' + 'Revelation of John') + ItemIndex = 0 + TabOrder = 1 + Text = 'Genesis' + OnChange = ComboBox1Change + end + object SpinEdit1: TSpinEdit + Left = 345 + Top = 4 + Width = 45 + Height = 23 + Align = alCustom + TabOrder = 2 + OnChanged = SpinEdit1Changed + end + object SpinEdit2: TSpinEdit + Left = 390 + Top = 4 + Width = 45 + Height = 23 + Align = alCustom + TabOrder = 3 + OnChanged = SpinEdit2Changed + end + object ToolButton4: TToolButton + Left = 217 + Top = 4 + Width = 8 + Height = 23 + Style = tbsSeparator + Caption = 'ToolButton4' + end + object Label2: TLabel + Left = 1 + Top = 4 + Width = 50 + Height = 20 + Align = alLeft + Alignment = taCenter + AutoSize = False + Caption = 'KJV' + Layout = tlCenter + end + object btnBTFollow: TToolButton + Tag = 2 + Left = 435 + Top = 4 + Height = 23 + Style = tbsCheck + Caption = 'btnBTFollow' + Down = True + ImageIndex = 1 + end + object btnCMFollow: TToolButton + Tag = 2 + Left = 458 + Top = 4 + Height = 23 + Style = tbsCheck + Caption = 'CM' + Down = True + ImageIndex = 0 + end + end + end + object StatusBar1: TStatusBar + Left = 0 + Top = 363 + Width = 608 + Height = 19 + Panels = <> + SimplePanel = True + SimpleText = 'Genesis 1:1' + end + object ImageList1: TImageList + Height = 24 + Width = 24 + Left = 472 + Top = 72 + Bitmap = { + 494D474C01000100180000001800000004000000424D361B0000000000003600 + 00002800000030000000300000000100180000000000001B0000120B0000120B + 00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFF89B7DB88B6DB6E97B91E2C38FFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF97BFDF88B6DB77A2C5 + 54779510181FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5445495445495445495445492B1918 + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFF9CC2E188B6DB88B6DB6C95B74C6B863F586E0E161CFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF4F3D3F737482432B2A3516103516103516106158607A7E + 8FA2BBD8A2BBD8A2BBD87E8597281A1A11090AFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFF698EABB0CEE785B3D7 + 8DB9DC7FACD05779924F6F8716232DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF35161097AAC4A2BBD895 + A7C092A3BB92A3BB92A3BB9BB1CCA2BBD8A2BBD8A2BBD8A2BBD890A0B772798A + 09070BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFF + FFFFFFFFFFFFFF2D4A53B6D2E9A3C7E291BCDAB7D3E584B1D66D95B548667F43 + 565CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFF351610A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BB + D8A2BBD8A2BBD8A2BBD87E85975A5259110A0BFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFF9595959EC0DCCADDEE + BAD4E988B6DBB5D0E76A8FAD83AFD245627B1F241FFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6A6772A2BBD8A2 + BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD87678864E3E41 + 160B0BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 + 00000000000000FFFFFF7F97ABB7D3E8ACCCE6B3D0E7729DBD88B5DA5C809E0C + 101225271FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFF737482A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BB + D8A2BBD8A2BBD8A2BBD890A0B7838C9F515460040509FFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFF0000000000005C748787A7C0 + BBD3E877A1C389AFCF678EAF495252536E81FFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF737482A2 + BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD88793A7737482 + 73748221232AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000 + 00000000000000000000FFFFFF9FB6C7AFCDE5688FAE7FA0B65D73843850631D + 211FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFF737482A2BBD8A2BBD8A2BBD8A2BBD899AEC88CA1 + BA8BA1BA8BA1BA8BA1BA8BA1BA8BA1BA8BA1BA28303AFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF608198 + 607C8E8CB8DC48657D5050503C3C3C324A5BFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF737482A2 + BBD8A2BBD8A2BBD8A2BBD8645D660C0709000307000307000307000307000307 + 000307000307FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5E5E5E8EABC16C95B54B5C5B4242420F + 0F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF33354495A7C0A2BBD8A2BBD8A2BBD8A2BBD8645D66FFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFF5656568DB4D45C809AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF33394AA2BBD8A2 + BBD8A2BBD8A2BBD8A2BBD8A2BBD8202332FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000 + 00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56565688B1D148627600 + 0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF33394AA2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD82023 + 32FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF7F9DB3678DAD2A2A2AFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF33394AA2BBD8A2 + BBD8A2BBD8A2BBD8A2BBD8A2BBD8202332FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 + 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6788A348 + 6783FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF33394AA2BBD8A2BBD8A2BBD8A2BBD8A2BBD8A2BBD82023 + 32FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000FFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFF2D2F1B678AA42E2E2E000000000000FFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF33394AA2BBD8A2 + BBD8A2BBD8FFFFFFA2BBD8A2BBD8202332FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 + 00000000FFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF42 + 4242000000FFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFF000000FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000FFFFFFFFFFFF000000FFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 + 00000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 + 0000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12 + E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E + 12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E5 + 4E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12 + E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFF + FFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFF + FFFFFFFFFF4E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFF4E12E5FFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFF4E12E54E12E5FFFFFFFFFFFFE014 + 1BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFFE0141BE0141BFF + FFFFFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFFFFFFF4E12E5FFFFFF4E12E5 + 4E12E5FFFFFFE0141BE0141BE0141BE0141BFFFFFFFFFFFFFFFFFFFFFFFFE014 + 1BFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFE0141BFFFFFF4E12E54E + 12E54E12E54E12E5FFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + E0141BFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFE0141BFFFFFFFFFFFFE014 + 1BFFFFFFFFFFFF4E12E5FFFFFF4E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFE0141BFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFE0141BFFFFFF + FFFFFFFFFFFFE0141BFFFFFFFFFFFF4E12E54E12E54E12E5FFFFFFFFFFFFE014 + 1BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0141BFFFFFFE0141BFFFFFFFFFFFFE0 + 141BFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFFFFFFF4E12E54E12E54E12E5 + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFE014 + 1BFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFF4E + 12E54E12E54E12E5FFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + E0141BFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFE0141BFFFFFFFFFFFFE014 + 1BFFFFFFFFFFFF4E12E54E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFE0141BFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFE0141BFFFFFF + FFFFFFFFFFFFE0141BFFFFFFFFFFFF4E12E54E12E54E12E5FFFFFFFFFFFFE014 + 1BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0141BFFFFFFE0141BFFFFFFFFFFFFE0 + 141BFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFFFFFFF4E12E54E12E54E12E5 + FFFFFFFFFFFFFFFFFFE0141BE0141BE0141BE0141BFFFFFFFFFFFFFFFFFFE014 + 1BFFFFFFFFFFFFFFFFFFE0141BE0141BE0141BE0141BFFFFFFFFFFFFFFFFFF4E + 12E54E12E54E12E5FFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + E0141BFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFE0141BE0141BE0141BFFFF + FFFFFFFFFFFFFF4E12E54E12E54E12E5FFFFFFFFFFFFE0141BFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFE0141BFFFFFF + FFFFFFFFFFFFE0141BFFFFFFFFFFFF4E12E54E12E54E12E5FFFFFFFFFFFFE014 + 1BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0141BFFFFFFE0141BFFFFFFFFFFFFE0 + 141BFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFFFFFFF4E12E54E12E54E12E5 + FFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE014 + 1BFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFF4E + 12E54E12E54E12E5FFFFFFFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFFFFFFF + E0141BFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFE0141BFFFFFFFFFFFFE014 + 1BFFFFFFFFFFFF4E12E5FFFFFF4E12E5FFFFFFFFFFFFE0141BFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFE0141BFFFFFFFFFFFFFFFFFFE0141BFFFFFF + FFFFFFFFFFFFE0141BFFFFFFFFFFFF4E12E54E12E54E12E5FFFFFFFFFFFFE014 + 1BFFFFFFE0141BFFFFFFE0141BFFFFFFE0141BFFFFFFE0141BFFFFFFFFFFFFE0 + 141BFFFFFFE0141BFFFFFFFFFFFFE0141BFFFFFFFFFFFF4E12E5FFFFFF4E12E5 + 4E12E5FFFFFFFFFFFFE0141BE0141BE0141BE0141BFFFFFFE0141BE0141BE014 + 1BE0141BE0141BFFFFFFE0141BE0141BE0141BE0141BFFFFFFFFFFFF4E12E54E + 12E54E12E54E12E5FFFFFFFFFFFFE0141BE0141BFFFFFFFFFFFFFFFFFFE0141B + E0141BFFFFFFFFFFFFE0141BE0141BFFFFFFFFFFFFE0141BE0141BE0141BFFFF + FFFFFFFFFFFFFF4E12E5FFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFF4E12E54E12E5FFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E5FFFFFFFFFFFF + FFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFF + FFFFFFFFFF4E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFF4E12E5FFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E + 12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E5 + 4E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12 + E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12E5FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E12E54E12 + E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFF424DBE010000000000003E0000002800000030000000 + 30000000010001000000000080010000120B0000120B00000200000002000000 + FFFFFF0000000000000000000000FF00000000000000FF00000000000000D010 + 0000000000000000000000000000FF00000000000000FF00000000000000FF00 + 000000000000FF00000000000000FF00000000000000FF00000000000000FF00 + 000000000000FF00000000000000FF00000000000000FF00000000000000FF00 + 000000000000FF00000000000000FF00000000000000FF00000000000000FF00 + 000000000000FF00000000000000FF00000000000000FF00000000000000FF00 + 000000000000FF00000000000000FF00000000000000FF00000000000000FF00 + 000000000000FF00000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00000000000000FF00000000000000FF00 + 000000000000FF00000000000000FF00000000000000FF00000000000000FF00 + 000000000000FF00000000000000FF00000000000000FF00000000000000FF00 + 000000000000FF00000000000000000000000000000000000000000000000000 + 0000000000000000} + end + object ColorDialog1: TColorDialog + Color = clTeal + Left = 440 + Top = 72 + end + object FontDialog1: TFontDialog + Font.CharSet = fcsUnicode + Font.Color = clBlack + Font.Height = 15 + Font.Name = 'arial unicode ms' + Font.Pitch = fpVariable + Font.Style = [] + Left = 408 + Top = 72 + end + object ImageList2: TImageList + Left = 504 + Top = 72 + Bitmap = { + 494D474C01000100100000001000000003000000424D360C0000000000003600 + 00002800000020000000200000000100180000000000000C0000120B0000120B + 00000000000000000000FFFFFFFFFFFF00000000000000000000000000000000 + 0000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000FFFF00 + 000000FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000008000008000008000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000080FFFF0000008000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000080FFFF00FFFF0000000000 + FFFF00FFFF00FFFF00FFFF00FFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 + 0000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000 + 0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF000000000000000000000000000000FFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000BFBFBFBFBFBF7F + 7F7F7F7F7F7F7F7F000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFF000000000000BFBFBFBFBFBF7F7F7F7F7F7F7F7F7F000000000000FFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000BFBFBFBFBFBF7F7F7F00000000 + 00000000007F7F7F7F7F7F7F7F7F000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + 000000BFBFBFBFBFBF7F7F7F0000000000000000007F7F7F7F7F7F7F7F7F0000 + 00FFFFFFFFFFFFFFFFFFFFFFFF000000BFBFBFBFBFBF000000FFFFFF0000FFFF + FFFF0000FFFFFFFF0000007F7F7F7F7F7F000000FFFFFFFFFFFFFFFFFF000000 + BFBFBFBFBFBF000000FFFFFF00FF00FFFFFF00FF00FFFFFF0000007F7F7F7F7F + 7F000000FFFFFFFFFFFFFFFFFF000000BFBFBF000000FFFFFF00000000000000 + 0000000000000000FFFFFF0000007F7F7F000000FFFFFFFFFFFFFFFFFF000000 + BFBFBF000000FFFFFF000000000000000000000000000000FFFFFF0000007F7F + 7F000000FFFFFFFFFFFF000000BFBFBF7F7F7FFFFFFF0000000000000000FF00 + 0080000080000000000000FFFFFF7F7F7F7F7F7F000000FFFFFF000000BFBFBF + 7F7F7FFFFFFF00000000000000FF00008000008000000000000000FFFFFF7F7F + 7F7F7F7F000000FFFFFF000000BFBFBF0000000000FF0000000000FF00008000 + 00FF0000800000800000000000FF0000007F7F7F000000FFFFFF000000BFBFBF + 00000000FF0000000000FF0000800000FF0000800000800000000000FF000000 + 007F7F7F000000FFFFFF000000FFFFFF000000FFFFFF0000000000FF0000FF00 + 00FF0000FF000080000000FFFFFF0000007F7F7F000000FFFFFF000000FFFFFF + 000000FFFFFF00000000FF0000FF0000FF0000FF00008000000000FFFFFF0000 + 007F7F7F000000FFFFFF000000FFFFFF0000000000FF000000FFFFFF0000FF00 + 00FF0000800000FF0000000000FF000000BFBFBF000000FFFFFF000000FFFFFF + 00000000FF00000000FFFFFF00FF0000FF0000800000FF0000000000FF000000 + 00BFBFBF000000FFFFFF000000FFFFFF7F7F7FFFFFFF000000000000FFFFFFFF + FFFF0000FF000000000000FFFFFF7F7F7FBFBFBF000000FFFFFF000000FFFFFF + 7F7F7FFFFFFF000000000000FFFFFFFFFFFF00FF00000000000000FFFFFF7F7F + 7FBFBFBF000000FFFFFFFFFFFF000000BFBFBF000000FFFFFF00000000000000 + 0000000000000000FFFFFF000000BFBFBF000000FFFFFFFFFFFFFFFFFF000000 + BFBFBF000000FFFFFF000000000000000000000000000000FFFFFF000000BFBF + BF000000FFFFFFFFFFFFFFFFFF000000FFFFFFBFBFBF000000FFFFFF0000FFFF + FFFF0000FFFFFFFF000000BFBFBFBFBFBF000000FFFFFFFFFFFFFFFFFF000000 + FFFFFFBFBFBF000000FFFFFF00FF00FFFFFF00FF00FFFFFF000000BFBFBFBFBF + BF000000FFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFBFBFBF7F7F7F00000000 + 00000000007F7F7FBFBFBFBFBFBF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + 000000FFFFFFBFBFBF7F7F7F0000000000000000007F7F7FBFBFBFBFBFBF0000 + 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000FFFFFFFFFFFFFF + FFFFBFBFBFBFBFBF000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFF000000000000FFFFFFFFFFFFFFFFFFBFBFBFBFBFBF000000000000FFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000 + 0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF000000000000000000000000000000FFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFF424DBE000000000000003E0000002800000020000000 + 20000000010001000000000080000000120B0000120B00000200000002000000 + FFFFFF00000000000000FFFD0000DFBF0000FFF700007D7A0000A75D0000DBFF + 0000FFFD0000D7A700007ADB0000BFFB0000BF9F0000FAF500004DBD0000FFBF + 0000F57B0000AFAD000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000} + end + object MainMenu1: TMainMenu + Images = ImageList1 + Left = 536 + Top = 72 + object File1: TMenuItem + Caption = 'File' + object Exit1: TMenuItem + Caption = 'Exit' + OnClick = Button1Click + end + end + object Options1: TMenuItem + Caption = 'Options' + object Strongs1: TMenuItem + Caption = 'Strongs Numbers' + Enabled = False + ImageIndex = 0 + end + object MorphTags1: TMenuItem + Caption = 'Morph Tags' + Enabled = False + ImageIndex = 1 + end + object Footnotes1: TMenuItem + Caption = 'Footnotes' + Enabled = False + ImageIndex = 2 + end + object ChangeTextFont1: TMenuItem + Caption = 'Change Text Font' + ImageIndex = 3 + OnClick = ToolButton1Click + end + object CurrentVerseColor1: TMenuItem + Caption = 'Current Verse Color' + OnClick = CurrentVerseColor1Click + end + end + end +end diff --git a/bindings/clx/test2/test2.conf b/bindings/clx/test2/test2.conf new file mode 100644 index 0000000..6b9045c --- /dev/null +++ b/bindings/clx/test2/test2.conf @@ -0,0 +1,38 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J- +-$K- +-$L+ +-$M- +-$N+ +-$O- +-$P+ +-$Q+ +-$R+ +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-vn +-vr +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-U"/home/tbiggs/kylix2/lib/debug:../" +-O"/home/tbiggs/kylix2/lib/debug:../" +-I"/home/tbiggs/kylix2/lib/debug:../" +-R"/home/tbiggs/kylix2/lib/debug:../" diff --git a/bindings/clx/test2/test2.dpr b/bindings/clx/test2/test2.dpr new file mode 100644 index 0000000..ec160ef --- /dev/null +++ b/bindings/clx/test2/test2.dpr @@ -0,0 +1,14 @@ +program test2; + +uses + QForms, + MainFrm in 'MainFrm.pas' {Form1}, + Sword in '../Sword.pas'; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/bindings/clx/test2/test2.kof b/bindings/clx/test2/test2.kof new file mode 100644 index 0000000..b5fdd24 --- /dev/null +++ b/bindings/clx/test2/test2.kof @@ -0,0 +1,61 @@ +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=0 +K=0 +L=1 +M=0 +N=1 +O=0 +P=1 +Q=1 +R=1 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases= + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=1 +RemoteSymbols=1 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +DynamicLoader=/lib/ld-linux.so.2 + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath=/home/tbiggs/kylix2/lib/debug:../ +Packages=baseclx:visualclx +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= +Launcher=/usr/X11R6/bin/xterm -T KylixDebuggerOutput -e bash -i -c %debuggee% +UseLauncher=0 +DebugCWD= + diff --git a/bindings/clx/test2/test2.res b/bindings/clx/test2/test2.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/bindings/clx/test2/test2.res differ diff --git a/bindings/configure.ac b/bindings/configure.ac new file mode 100644 index 0000000..7b0d786 --- /dev/null +++ b/bindings/configure.ac @@ -0,0 +1,127 @@ +# --------------------------------------------------------------------- +# Initialisation +# --------------------------------------------------------------------- + +# Version change: Change line 8 only ! +# Change it immediately after a release + +AC_INIT(swordbindings, 1.5.9, sword-bugs@crosswire.org) +AC_CONFIG_SRCDIR([flatapi.cpp]) +AC_PREREQ(2.52) +AC_REVISION($Revision$) + +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE + +#AM_CONFIG_HEADER(include/config.h) + + +# --------------------------------------------------------------------- +# Check Programs +# --------------------------------------------------------------------- +AC_LANG(C++) +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL + +AC_C_BIGENDIAN + +# --------------------------------------------------------------------- +# Java +# --------------------------------------------------------------------- +AC_CHECK_CLASSPATH +AC_PROG_JAVAC +AC_PROG_JAVA +AC_PROG_JAR + +# --------------------------------------------------------------------- +# With options +# --------------------------------------------------------------------- +AC_ARG_WITH(tomcathome, + AC_HELP_STRING([--with-tomcathome], + [tomcat home directory (default=[/usr/local/tomcat])]),, + with_tomcathome=[/usr/local/tomcat]) + + +# --------------------------------------------------------------------- +# Enable options +# --------------------------------------------------------------------- +AC_ARG_ENABLE(corba, + AC_HELP_STRING([--enable-corba],[build swordorbserver (default=no)]),,enable_corba=no) + +AM_MAINTAINER_MODE + +# --------------------------------------------------------------------- +# Check libraries +# --------------------------------------------------------------------- + +# --------------------------------------------------------------------- +# Find pkg-config +# --------------------------------------------------------------------- +use_pkgconfig=yes +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +if test x$PKG_CONFIG = xno ; then + AC_MSG_WARN([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/]) + AC_MSG_ERROR([not using pkg-config]) + use_pkgconfig=no +fi + +if $PKG_CONFIG --atleast-pkgconfig-version 0.14 ; then + : +else + AC_MSG_WARN([*** pkg-config too old; version 0.14 or better required.]) + AC_MSG_ERROR([not using pkg-config]) + use_pkgconfig=no +fi + +# --------------------------------------------------------------------- +# Find sword +# --------------------------------------------------------------------- +SWORD_CFLAGS= +SWORD_LIBS= +if test x$use_pkgconfig = xyes ; then + SWORD_LIBS=`$PKG_CONFIG --libs sword` + SWORD_CFLAGS=`$PKG_CONFIG --cflags sword` +fi + +# --------------------------------------------------------------------- +# Tomcat install directories +# --------------------------------------------------------------------- +TOMCAT_HOME=$with_tomcathome + +# --------------------------------------------------------------------- +# Find orbit-config +# --------------------------------------------------------------------- +ORBIT_LIBS= +ORBIT_CFLAGS= +if test x$enable_corba = xyes ; then + if test x$use_pkgconfig = xyes ; then + ORBIT_LIBS+=`$PKG_CONFIG --libs ORBit-2.0-cpp` + ORBIT_CFLAGS+=`$PKG_CONFIG --cflags ORBit-2.0` + ORBIT_CXXFLAGS+=`$PKG_CONFIG --cflags ORBit-2.0-cpp` + fi +fi + +# --------------------------------------------------------------------- +# Substitute variables into makefiles +# --------------------------------------------------------------------- +AC_SUBST(SWORD_LIBS) +AC_SUBST(SWORD_CFLAGS) +AC_SUBST(ORBIT_LIBS) +AC_SUBST(ORBIT_CFLAGS) +AC_SUBST(ORBIT_CXXFLAGS) +AC_SUBST(TOMCAT_HOME) + +# --------------------------------------------------------------------- +# Conditional variables +# --------------------------------------------------------------------- +AM_CONDITIONAL(CORBA, test x$enable_corba = xyes) + +# --------------------------------------------------------------------- +# Final output +# --------------------------------------------------------------------- +AC_CONFIG_FILES(Makefile corba/Makefile corba/orbitcpp/Makefile corba/java/Makefile) +AC_OUTPUT + diff --git a/bindings/corba/Makefile.am b/bindings/corba/Makefile.am new file mode 100644 index 0000000..b626afd --- /dev/null +++ b/bindings/corba/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST = swordorb.idl + +SUBDIRS = orbitcpp java diff --git a/bindings/corba/java/Makefile b/bindings/corba/java/Makefile new file mode 100644 index 0000000..9f0ce39 --- /dev/null +++ b/bindings/corba/java/Makefile @@ -0,0 +1,24 @@ +TOMCAT_HOME=/opt/tomcat +#SERVLET_LIB=${TOMCAT_HOME}/common/lib/servlet-api.jar +SERVLET_LIB=${TOMCAT_HOME}/lib/servlet-api.jar +#instdir=/home/scribe/public_html/ +instdir=/home/scribe/src/swordweb/webapp +all: src/org/crosswire/sword/orb/SWMgr.java classes/org/crosswire/sword/orb/SwordOrb.class + +src/org/crosswire/sword/orb/SWMgr.java: ../swordorb.idl + idlj -pkgTranslate swordorb org.crosswire.sword.orb -td src ../swordorb.idl + +classes/org/crosswire/sword/orb/SwordOrb.class: src/org/crosswire/sword/orb/SwordOrb.java + javac -classpath ${SERVLET_LIB} -d classes -sourcepath src src/org/crosswire/sword/orb/*.java src/org/crosswire/util/*.java + + +clean: + rm -f src/org/crosswire/sword/orb/SW*.java + rm -f src/org/crosswire/sword/orb/_SW*.java + rm -f src/org/crosswire/sword/orb/Mod*.java + rm -f src/org/crosswire/sword/orb/Search*.java + rm -f src/org/crosswire/sword/orb/String*.java + rm -rf classes/* + +install: + cp -a classes/org/ ${instdir}/WEB-INF/classes/ diff --git a/bindings/corba/java/Makefile.in b/bindings/corba/java/Makefile.in new file mode 100644 index 0000000..320afcc --- /dev/null +++ b/bindings/corba/java/Makefile.in @@ -0,0 +1,43 @@ + +TOMCAT_HOME = @TOMCAT_HOME@ +VERSION = @VERSION@ +JAVAC = @JAVAC@ +top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ +INSTALL = @INSTALL@ +JAR = @JAR@ + +#SWORDORBJAR=sword-orb-$(VERSION).jar +SWORDORBJAR=sword-orb.jar + +all: $(SWORDORBJAR) + +src/org/crosswire/sword/orb/SWMgr.java: $(top_builddir)/corba/java/src/org/crosswire/util/Base64.java + idlj -pkgTranslate swordorb org.crosswire.sword.orb -td src $(top_srcdir)/corba/swordorb.idl + +classes/org/crosswire/sword/orb/SwordOrb.class: src/org/crosswire/sword/orb/SWMgr.java + mkdir -p $(top_builddir)/corba/java/classes + $(JAVAC) -classpath ${TOMCAT_HOME}/common/lib/servlet-api.jar -d $(top_builddir)/corba/java/classes -sourcepath src src/org/crosswire/sword/orb/*.java src/org/crosswire/util/*.java + +$(top_builddir)/corba/java/src/org/crosswire/util/Base64.java: + cp -a $(top_srcdir)/corba/java/src . + find . -name .svn|xargs rm -r + +clean: + -rm src/org/crosswire/sword/orb/SW*.java + -rm src/org/crosswire/sword/orb/_SW*.java + -rm src/org/crosswire/sword/orb/Mod*.java + -rm src/org/crosswire/sword/orb/Search*.java + -rm src/org/crosswire/sword/orb/String*.java + -rm -rf classes/* + -rmdir -p src/org/crosswire/sword/orb + -rm $(SWORDORBJAR) + +$(SWORDORBJAR): classes/org/crosswire/sword/orb/SwordOrb.class + $(JAR) cf $(SWORDORBJAR) -C $(top_builddir)/corba/java/classes org + +install: + @INSTALL@ $(SWORDORBJAR) $(TOMCAT_HOME)/common/lib + +uninstall: + -rm $(TOMCAT_HOME)/common/lib/$(SWORDORBJAR) diff --git a/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java b/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java new file mode 100644 index 0000000..3597b4b --- /dev/null +++ b/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java @@ -0,0 +1,248 @@ +package org.crosswire.sword.orb; + +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.BufferedReader; +import java.io.StringWriter; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSessionBindingListener; +import javax.servlet.http.HttpSessionBindingEvent; +import java.util.Vector; +import java.util.Hashtable; +import java.util.Date; +import java.util.Properties; + +public class SwordOrb extends Object implements HttpSessionBindingListener { + public static Properties config = null; + public static String ORBEXE = "swordorbserver"; + public static final int MAX_REMOTE_ADDR_CONNECTIONS = 20; + public static final int MAX_ACCESS_COUNT_PER_INTERVAL = 10; + public static final long MAX_ACCESS_COUNT_INTERVAL = 10 * 1000; // milliseconds + public static final long BLACKLIST_DURATION = 10 * 60 * 1000; // milliseconds + public static final String BIBLES = "Biblical Texts"; + public static final String COMMENTARIES = "Commentaries"; + public static final String LEXDICTS = "Lexicons / Dictionaries"; + public static final String GENBOOKS = "Generic Books"; + public static final String DAILYDEVOS = "Daily Devotional"; + + static org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(new String[]{}, null); + static Hashtable clients = new Hashtable(); + String ior = null; + String remoteAddr = null; + String localeName = null; + long lastAccessed = 0; + int intervalCount = 0; + long intervalStamp = 0; + long blacklistTill = 0; + + private SWMgr attach() { + + // assert IOR has been set + if (ior == null) + return null; + + SWMgr retVal = null; + try { +System.out.println("attaching..."); + org.omg.CORBA.Object obj = orb.string_to_object(ior); + retVal = SWMgrHelper.narrow(obj); +System.out.println("calling testConnection"); + retVal.testConnection(); +System.out.println("testConnection successful"); + } + catch(Throwable e) { +// e.printStackTrace(); + retVal = null; +System.out.println("failed in attach"); + } + return retVal; + } + + public SwordOrb(String remoteAddr) { + this.remoteAddr = remoteAddr; + } + + +// this doesn't seem to work. Never seems to get called for me + public void finalize () throws Throwable { + // shut down external process + try { +System.out.println("calling finalize."); + getSWMgrInstance().terminate(); + } + catch (Exception e) {} // we know this doesn't return property cuz we killed the orb! :) + + } + + + public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {} + + public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) { + try { +// throw new Exception("value unbound; showing stacktrace"); + Vector orbs = (Vector)clients.get(remoteAddr); +int size = -1; + if (orbs != null) { +size = orbs.size(); + orbs.remove(this); + } +System.out.println("calling valueUnbound. size before: " + size + "; size after: "+orbs.size()); + getSWMgrInstance().terminate(); + } + catch (Exception e) {} // we know this doesn't return properly cuz we killed the orb! :) +// catch (Exception e) {e.printStackTrace();} // we know this doesn't return properly cuz we killed the orb! :) + } + + private static void loadConfig(HttpServletRequest request) { + try { + config = new Properties(); + File propName = new File(request.getSession().getServletContext().getRealPath("/WEB-INF/swordweb.properties")); + if (propName.exists()) { + FileInputStream propFile = new FileInputStream(propName); + config.load(propFile); + propFile.close(); + } + } + catch (Exception e) { e.printStackTrace(); } + ORBEXE = config.getProperty("orbexe", "swordorbserver"); + } + + private void startOrb() { + try { + // start external process + java.lang.Process p = Runtime.getRuntime().exec(ORBEXE); + InputStream is = p.getInputStream(); + InputStreamReader isr = new InputStreamReader(is); + BufferedReader input = new BufferedReader(isr); + + String line; + line = input.readLine(); +// retVal = p.waitFor(); + ior = line; +System.out.println("Launched ORB, IOR: " + ior); + } + catch (Exception e) {e.printStackTrace();} + } + + void checkAccessAbuse() throws Exception { + if ((blacklistTill > 0) && (System.currentTimeMillis() < blacklistTill)) { + throw new Exception("You're an abuser and have been blacklisted till " + new Date(blacklistTill)); + } + if (++intervalCount > MAX_ACCESS_COUNT_PER_INTERVAL) { + if (System.currentTimeMillis() < intervalStamp + MAX_ACCESS_COUNT_INTERVAL) { + // abuser + blacklistTill = System.currentTimeMillis() + BLACKLIST_DURATION; + } + intervalStamp = System.currentTimeMillis(); + intervalCount = 0; + } + } + + public SWMgr getSWMgrInstance() throws Exception { + lastAccessed = System.currentTimeMillis(); + checkAccessAbuse(); + SWMgr retVal = null; + try { +System.out.println("trying to attach to running ORB"); + retVal = attach(); + } + catch(Exception e) { +// e.printStackTrace(); + retVal = null; + } + if (retVal == null) { + try { +System.out.println("no ORB running; trying to launch"); + startOrb(); +System.out.println("trying to attach to newly launched ORB"); + retVal = attach(); + if (retVal != null) { + if (localeName != null) { + retVal.setDefaultLocale(localeName); + } + } + } + catch(org.omg.CORBA.SystemException e) { + e.printStackTrace(); + } + } + return retVal; + } + + public static void setSessionLocale(String localeName, HttpServletRequest request) throws Exception { + request.getSession().setAttribute("SwordOrbLocale", localeName); + SWMgr mgr = getSWMgrInstance(request); + if (mgr != null) { + mgr.setDefaultLocale(localeName); + } + } + + public static SwordOrb getSessionOrb(HttpServletRequest request) throws Exception { + if (config == null) loadConfig(request); + HttpSession session = request.getSession(); + SwordOrb orb = (SwordOrb)session.getAttribute("SwordOrb"); + String remoteAddr = request.getRemoteAddr(); + if (orb == null) { +System.out.println("No ORB found in session; constructing a new instance"); + + Vector orbs = (Vector)clients.get(remoteAddr); + if (orbs == null) { + orbs = new Vector(); + clients.put(remoteAddr, orbs); + } + if (orbs.size() < MAX_REMOTE_ADDR_CONNECTIONS) { + orb = new SwordOrb(remoteAddr); + orbs.add(orb); + + String locName = (String)session.getAttribute("SwordOrbLocale"); + if (locName != null) + orb.localeName = locName; + + session.setAttribute("SwordOrb", orb); + } + else throw new Exception("Max Remote Addr Connections from: ["+remoteAddr+"]"); + } + else { +System.out.println("ORB found in session"); + } + return orb; + } + + public static SWMgr getSWMgrInstance(HttpServletRequest request) throws Exception { + SwordOrb orb = getSessionOrb(request); + SWMgr mgr = orb.getSWMgrInstance(); + return mgr; + } + + + public static void main(String args[]) throws Exception { + SWMgr mgr = new SwordOrb("127.0.0.1").getSWMgrInstance(); + + System.out.println("PrefixPath: " + mgr.getPrefixPath()); + System.out.println("ConfigPath: " + mgr.getConfigPath()); + ModInfo[] modInfoList = mgr.getModInfoList(); + System.out.println("sequence size: " + modInfoList.length); + SWModule module; +/* + for (int i = 0; i < modInfoList.length; i++) { + System.out.println(modInfoList[i].name + ": " + modInfoList[i].category + ": " + modInfoList[i].language); + module = mgr.getModuleByName(modInfoList[i].name); + module.setKeyText("jas1:19"); + System.out.println(module.getRenderText()); + } +*/ + module = mgr.getModuleByName("WHNU"); + module.setKeyText("rev.22.21"); + System.out.println(new String(module.getRawEntry().getBytes("iso8859-1"), "UTF-8")); +/* + boolean lucene = module.hasSearchFramework(); + SearchHit[] searchResults = module.search("God love world", (lucene)?SearchType.LUCENE:SearchType.MULTIWORD, 0, ""); + for (int i = 0; i < searchResults.length; i++) + System.out.println(searchResults[i].key); + +*/ + } +} diff --git a/bindings/corba/java/src/org/crosswire/util/Base64.java b/bindings/corba/java/src/org/crosswire/util/Base64.java new file mode 100644 index 0000000..984dc7b --- /dev/null +++ b/bindings/corba/java/src/org/crosswire/util/Base64.java @@ -0,0 +1,1238 @@ +package org.crosswire.util; + +/** + * Changed last char from '/' to '-' because cookies can't use '/' so we're not really a BASE64 + * standard encoder anymore + * Changed package name. --crosswire. + * Thanks to Robert Harder for placing this code into the public domain + * + * Encodes and decodes to and from Base64 notation. + * + *

+ * Change Log: + *

+ *
    + *
  • v1.3.5 - Added flag to turn on and off line breaks. Fixed bug in input stream + * where last buffer being read, if not completely full, was not returned.
  • + *
  • v1.3.4 - Fixed when "improperly padded stream" error was thrown at the wrong time.
  • + *
  • v1.3.3 - Fixed I/O streams which were totally messed up.
  • + *
+ * + *

+ * I am placing this code in the Public Domain. Do with it as you will. + * This software comes with no guarantees or warranties but with + * plenty of well-wishing instead! + * Please visit http://iharder.net/xmlizable + * periodically to check for updates or to contribute improvements. + *

+ * + * @author Robert Harder + * @author rob@iharder.net + * @version 1.3.4 + */ +public class Base64 +{ + + /** Specify encoding (value is true). */ + public final static boolean ENCODE = true; + + + /** Specify decoding (value is false). */ + public final static boolean DECODE = false; + + + /** Maximum line length (76) of Base64 output. */ + private final static int MAX_LINE_LENGTH = java.lang.Integer.MAX_VALUE; + + + /** The equals sign (=) as a byte. */ + private final static byte EQUALS_SIGN = (byte)'='; + + + /** The new line character (\n) as a byte. */ + private final static byte NEW_LINE = (byte)'\n'; + + + /** The 64 valid Base64 values. */ + private final static byte[] ALPHABET = + { + (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G', + (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N', + (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', + (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z', + (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g', + (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n', + (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', + (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z', + (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', + (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'-' // changed last char from '/' to '-' because cookies can't use '/' + }; + + /** + * Translates a Base64 value to either its 6-bit reconstruction value + * or a negative number indicating some other meaning. + **/ + private final static byte[] DECODABET = + { + -9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 0 - 8 + -5,-5, // Whitespace: Tab and Linefeed + -9,-9, // Decimal 11 - 12 + -5, // Whitespace: Carriage Return + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 14 - 26 + -9,-9,-9,-9,-9, // Decimal 27 - 31 + -5, // Whitespace: Space + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 33 - 42 + 62, // Plus sign at decimal 43 + -9,-9,-9, // Decimal 44 - 46 + 63, // Slash at decimal 47 + 52,53,54,55,56,57,58,59,60,61, // Numbers zero through nine + -9,-9,-9, // Decimal 58 - 60 + -1, // Equals sign at decimal 61 + -9,-9,-9, // Decimal 62 - 64 + 0,1,2,3,4,5,6,7,8,9,10,11,12,13, // Letters 'A' through 'N' + 14,15,16,17,18,19,20,21,22,23,24,25, // Letters 'O' through 'Z' + -9,-9,-9,-9,-9,-9, // Decimal 91 - 96 + 26,27,28,29,30,31,32,33,34,35,36,37,38, // Letters 'a' through 'm' + 39,40,41,42,43,44,45,46,47,48,49,50,51, // Letters 'n' through 'z' + -9,-9,-9,-9 // Decimal 123 - 126 + /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 127 - 139 + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 140 - 152 + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 153 - 165 + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 166 - 178 + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 179 - 191 + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 192 - 204 + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 205 - 217 + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 218 - 230 + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 231 - 243 + -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 // Decimal 244 - 255 */ + }; + + private final static byte BAD_ENCODING = -9; // Indicates error in encoding + private final static byte WHITE_SPACE_ENC = -5; // Indicates white space in encoding + private final static byte EQUALS_SIGN_ENC = -1; // Indicates equals sign in encoding + + + /** Defeats instantiation. */ + private Base64(){} + + + + /** + * Testing. Feel free--in fact I encourage you--to throw out + * this entire "main" method when you actually deploy this code. + */ + public static void main( String[] args ) + { + try + { + // Test encoding/decoding byte arrays + { + byte[] bytes1 = { (byte)2,(byte)2,(byte)3,(byte)0,(byte)9 }; // My zip code + byte[] bytes2 = { (byte)99,(byte)2,(byte)2,(byte)3,(byte)0,(byte)9 }; + System.out.println( "Bytes 2,2,3,0,9 as Base64: " + encodeBytes( bytes1 ) ); + System.out.println( "Bytes 2,2,3,0,9 w/ offset: " + encodeBytes( bytes2, 1, bytes2.length-1 ) ); + byte[] dbytes = decode( encodeBytes( bytes1 ) ); + System.out.print( encodeBytes( bytes1 ) + " decoded: " ); + for( int i = 0; i < dbytes.length; i++ ) + System.out.print( dbytes[i] + (i= 0 ){ + byte[] temp = new byte[ bytes.length + 1 ]; + System.arraycopy( bytes,0, temp,0,bytes.length ); + temp[bytes.length] = (byte)b; + bytes = temp; + } // end while: terribly inefficient way to read data + b64is.close(); + javax.swing.ImageIcon iicon = new javax.swing.ImageIcon( bytes ); + javax.swing.JLabel jlabel = new javax.swing.JLabel( "Read from test.gif.b64", iicon,0 ); + javax.swing.JFrame jframe = new javax.swing.JFrame(); + jframe.getContentPane().add( jlabel ); + jframe.pack(); + jframe.show(); + + // Write raw bytes to file + java.io.FileOutputStream fos = new java.io.FileOutputStream( "test.gif_out" ); + fos.write( bytes ); + fos.close(); + + // Read raw bytes and encode + fis = new java.io.FileInputStream( "test.gif_out" ); + b64is = new Base64.InputStream( fis, ENCODE ); + byte[] ebytes = new byte[0]; + b = -1; + while( (b = b64is.read()) >= 0 ){ + byte[] temp = new byte[ ebytes.length + 1 ]; + System.arraycopy( ebytes,0, temp,0,ebytes.length ); + temp[ebytes.length] = (byte)b; + ebytes = temp; + } // end while: terribly inefficient way to read data + b64is.close(); + String s = new String( ebytes ); + javax.swing.JTextArea jta = new javax.swing.JTextArea( s ); + javax.swing.JScrollPane jsp = new javax.swing.JScrollPane( jta ); + jframe = new javax.swing.JFrame(); + jframe.setTitle( "Read from test.gif_out" ); + jframe.getContentPane().add( jsp ); + jframe.pack(); + jframe.show(); + + // Write encoded bytes to file + fos = new java.io.FileOutputStream( "test.gif.b64_out" ); + fos.write( ebytes ); + + // Read GIF stored in base64 form. + fis = new java.io.FileInputStream( "test.gif.b64_out" ); + b64is = new Base64.InputStream( fis, DECODE ); + byte[] edbytes = new byte[0]; + b = -1; + while( (b = b64is.read()) >= 0 ){ + byte[] temp = new byte[ edbytes.length + 1 ]; + System.arraycopy( edbytes,0, temp,0,edbytes.length ); + temp[edbytes.length] = (byte)b; + edbytes = temp; + } // end while: terribly inefficient way to read data + b64is.close(); + iicon = new javax.swing.ImageIcon( edbytes ); + jlabel = new javax.swing.JLabel( "Read from test.gif.b64_out", iicon,0 ); + jframe = new javax.swing.JFrame(); + jframe.getContentPane().add( jlabel ); + jframe.pack(); + jframe.show(); + } // end: Test Input Stream + + + // Test Output Stream + { + // Read raw bytes + java.io.FileInputStream fis = new java.io.FileInputStream( "test.gif_out" ); + byte[] rbytes = new byte[0]; + int b = -1; + while( (b = fis.read()) >= 0 ){ + byte[] temp = new byte[ rbytes.length + 1 ]; + System.arraycopy( rbytes,0, temp,0,rbytes.length ); + temp[rbytes.length] = (byte)b; + rbytes = temp; + } // end while: terribly inefficient way to read data + fis.close(); + + // Write raw bytes to encoded file + java.io.FileOutputStream fos = new java.io.FileOutputStream("test.gif.b64_out2"); + Base64.OutputStream b64os = new Base64.OutputStream( fos, ENCODE ); + b64os.write( rbytes ); + b64os.close(); + + + // Read raw bytes that are actually encoded (but we'll ignore that) + fis = new java.io.FileInputStream( "test.gif.b64_out2" ); + byte[] rebytes = new byte[0]; + b = -1; + while( (b = fis.read()) >= 0 ){ + byte[] temp = new byte[ rebytes.length + 1 ]; + System.arraycopy( rebytes,0, temp,0,rebytes.length ); + temp[rebytes.length] = (byte)b; + rebytes = temp; + } // end while: terribly inefficient way to read data + fis.close(); + String s = new String( rebytes ); + javax.swing.JTextArea jta = new javax.swing.JTextArea( s ); + javax.swing.JScrollPane jsp = new javax.swing.JScrollPane( jta ); + javax.swing.JFrame jframe = new javax.swing.JFrame(); + jframe.setTitle( "Read from test.gif.b64_out2" ); + jframe.getContentPane().add( jsp ); + jframe.pack(); + jframe.show(); + + // Write encoded bytes to decoded raw file + fos = new java.io.FileOutputStream("test.gif_out2"); + b64os = new Base64.OutputStream( fos, DECODE ); + b64os.write( rebytes ); + b64os.close(); + javax.swing.ImageIcon iicon = new javax.swing.ImageIcon( "test.gif_out2" ); + javax.swing.JLabel jlabel = new javax.swing.JLabel( "Read from test.gif_out2", iicon,0 ); + jframe = new javax.swing.JFrame(); + jframe.getContentPane().add( jlabel ); + jframe.pack(); + jframe.show(); + + } // end: Test Output Stream + + + // Test wagner's files + { + java.io.FileInputStream fis = new java.io.FileInputStream("D:\\temp\\testencoding.txt"); + Base64.InputStream b64is = new Base64.InputStream( fis, DECODE ); + java.io.FileOutputStream fos = new java.io.FileOutputStream("D:\\temp\\file.zip"); + int b; + while( (b=b64is.read()) >= 0 ) + fos.write( b ); + fos.close(); + b64is.close(); + + } // end test wagner's file + + } // end try + catch( Exception e) + { e.printStackTrace(); + } + } // end main + + +/* ******** E N C O D I N G M E T H O D S ******** */ + + + /** + * Encodes the first three bytes of array threeBytes + * and returns a four-byte array in Base64 notation. + * + * @param threeBytes the array to convert + * @return four byte array in Base64 notation. + * @since 1.3 + */ + private static byte[] encode3to4( byte[] threeBytes ) + { return encode3to4( threeBytes, 3 ); + } // end encodeToBytes + + + + /** + * Encodes up to the first three bytes of array threeBytes + * and returns a four-byte array in Base64 notation. + * The actual number of significant bytes in your array is + * given by numSigBytes. + * The array threeBytes needs only be as big as + * numSigBytes. + * + * @param threeBytes the array to convert + * @param numSigBytes the number of significant bytes in your array + * @return four byte array in Base64 notation. + * @since 1.3 + */ + private static byte[] encode3to4( byte[] threeBytes, int numSigBytes ) + { byte[] dest = new byte[4]; + encode3to4( threeBytes, 0, numSigBytes, dest, 0 ); + return dest; + } + + + + /** + * Encodes up to three bytes of the array source + * and writes the resulting four Base64 bytes to destination. + * The source and destination arrays can be manipulated + * anywhere along their length by specifying + * srcOffset and destOffset. + * This method does not check to make sure your arrays + * are large enough to accomodate srcOffset + 3 for + * the source array or destOffset + 4 for + * the destination array. + * The actual number of significant bytes in your array is + * given by numSigBytes. + * + * @param source the array to convert + * @param srcOffset the index where conversion begins + * @param numSigBytes the number of significant bytes in your array + * @param destination the array to hold the conversion + * @param destOffset the index where output will be put + * @return the destination array + * @since 1.3 + */ + private static byte[] encode3to4( + byte[] source, int srcOffset, int numSigBytes, + byte[] destination, int destOffset ) + { + // 1 2 3 + // 01234567890123456789012345678901 Bit position + // --------000000001111111122222222 Array position from threeBytes + // --------| || || || | Six bit groups to index ALPHABET + // >>18 >>12 >> 6 >> 0 Right shift necessary + // 0x3f 0x3f 0x3f Additional AND + + // Create buffer with zero-padding if there are only one or two + // significant bytes passed in the array. + // We have to shift left 24 in order to flush out the 1's that appear + // when Java treats a value as negative that is cast from a byte to an int. + int inBuff = ( numSigBytes > 0 ? ((source[ srcOffset ] << 24) >>> 8) : 0 ) + | ( numSigBytes > 1 ? ((source[ srcOffset + 1 ] << 24) >>> 16) : 0 ) + | ( numSigBytes > 2 ? ((source[ srcOffset + 2 ] << 24) >>> 24) : 0 ); + + switch( numSigBytes ) + { + case 3: + destination[ destOffset ] = ALPHABET[ (inBuff >>> 18) ]; + destination[ destOffset + 1 ] = ALPHABET[ (inBuff >>> 12) & 0x3f ]; + destination[ destOffset + 2 ] = ALPHABET[ (inBuff >>> 6) & 0x3f ]; + destination[ destOffset + 3 ] = ALPHABET[ (inBuff ) & 0x3f ]; + return destination; + + case 2: + destination[ destOffset ] = ALPHABET[ (inBuff >>> 18) ]; + destination[ destOffset + 1 ] = ALPHABET[ (inBuff >>> 12) & 0x3f ]; + destination[ destOffset + 2 ] = ALPHABET[ (inBuff >>> 6) & 0x3f ]; + destination[ destOffset + 3 ] = EQUALS_SIGN; + return destination; + + case 1: + destination[ destOffset ] = ALPHABET[ (inBuff >>> 18) ]; + destination[ destOffset + 1 ] = ALPHABET[ (inBuff >>> 12) & 0x3f ]; + destination[ destOffset + 2 ] = EQUALS_SIGN; + destination[ destOffset + 3 ] = EQUALS_SIGN; + return destination; + + default: + return destination; + } // end switch + } // end encode3to4 + + /** + * Serializes an object and returns the Base64-encoded + * version of that serialized object. If the object + * cannot be serialized or there is another error, + * the method will return null. + * + * @param serializableObject The object to encode + * @return The Base64-encoded object + * @since 1.4 + */ + public static String encodeObject( java.io.Serializable serializableObject ) + { + return encodeObject( serializableObject, true ); + } // end encodeObject + + /** + * Serializes an object and returns the Base64-encoded + * version of that serialized object. If the object + * cannot be serialized or there is another error, + * the method will return null. + * + * @param serializableObject The object to encode + * @param breakLines Break lines at 80 characters or less. + * @return The Base64-encoded object + * @since 1.4 + */ + public static String encodeObject( java.io.Serializable serializableObject, boolean breakLines ) + { + java.io.ByteArrayOutputStream baos = null; + java.io.OutputStream b64os = null; + java.io.ObjectOutputStream oos = null; + + try + { + baos = new java.io.ByteArrayOutputStream(); + b64os = new Base64.OutputStream( baos, Base64.ENCODE, breakLines ); + oos = new java.io.ObjectOutputStream( b64os ); + + oos.writeObject( serializableObject ); + } // end try + catch( java.io.IOException e ) + { + e.printStackTrace(); + return null; + } // end catch + finally + { + try{ oos.close(); } catch( Exception e ){} + try{ b64os.close(); } catch( Exception e ){} + try{ baos.close(); } catch( Exception e ){} + } // end finally + + return new String( baos.toByteArray() ); + } // end encode + + + /** + * Encodes a byte array into Base64 notation. + * Equivalen to calling + * encodeBytes( source, 0, source.length ) + * + * @param source The data to convert + * @since 1.4 + */ + public static String encodeBytes( byte[] source ) + { + return encodeBytes( source, true ); + } // end encodeBytes + + /** + * Encodes a byte array into Base64 notation. + * Equivalen to calling + * encodeBytes( source, 0, source.length ) + * + * @param source The data to convert + * @param breakLines Break lines at 80 characters or less. + * @since 1.4 + */ + public static String encodeBytes( byte[] source, boolean breakLines ) + { + return encodeBytes( source, 0, source.length, breakLines ); + } // end encodeBytes + + + /** + * Encodes a byte array into Base64 notation. + * + * @param source The data to convert + * @param off Offset in array where conversion should begin + * @param len Length of data to convert + * @since 1.4 + */ + public static String encodeBytes( byte[] source, int off, int len ) + { + return encodeBytes( source, off, len, true ); + } // end encodeBytes + + + /** + * Encodes a byte array into Base64 notation. + * + * @param source The data to convert + * @param off Offset in array where conversion should begin + * @param len Length of data to convert + * @param breakLines Break lines at 80 characters or less. + * @since 1.4 + */ + public static String encodeBytes( byte[] source, int off, int len, boolean breakLines ) + { + int len43 = len * 4 / 3; + byte[] outBuff = new byte[ ( len43 ) // Main 4:3 + + ( (len % 3) > 0 ? 4 : 0 ) // Account for padding + + (breakLines ? ( len43 / MAX_LINE_LENGTH ) : 0) ]; // New lines + int d = 0; + int e = 0; + int len2 = len - 2; + int lineLength = 0; + for( ; d < len2; d+=3, e+=4 ) + { + encode3to4( source, d+off, 3, outBuff, e ); + + lineLength += 4; + if( breakLines && lineLength == MAX_LINE_LENGTH ) + { + outBuff[e+4] = NEW_LINE; + e++; + lineLength = 0; + } // end if: end of line + } // en dfor: each piece of array + + if( d < len ) + { + encode3to4( source, d+off, len - d, outBuff, e ); + e += 4; + } // end if: some padding needed + + return new String( outBuff, 0, e ); + } // end encodeBytes + + + /** + * Encodes a string in Base64 notation with line breaks + * after every 75 Base64 characters. + * + * @param s the string to encode + * @return the encoded string + * @since 1.3 + */ + public static String encodeString( String s ) + { + return encodeString( s, true ); + } // end encodeString + + /** + * Encodes a string in Base64 notation with line breaks + * after every 75 Base64 characters. + * + * @param s the string to encode + * @param breakLines Break lines at 80 characters or less. + * @return the encoded string + * @since 1.3 + */ + public static String encodeString( String s, boolean breakLines ) + { + return encodeBytes( s.getBytes(), breakLines ); + } // end encodeString + + + + +/* ******** D E C O D I N G M E T H O D S ******** */ + + + /** + * Decodes the first four bytes of array fourBytes + * and returns an array up to three bytes long with the + * decoded values. + * + * @param fourBytes the array with Base64 content + * @return array with decoded values + * @since 1.3 + */ + private static byte[] decode4to3( byte[] fourBytes ) + { + byte[] outBuff1 = new byte[3]; + int count = decode4to3( fourBytes, 0, outBuff1, 0 ); + byte[] outBuff2 = new byte[ count ]; + + for( int i = 0; i < count; i++ ) + outBuff2[i] = outBuff1[i]; + + return outBuff2; + } + + + + + /** + * Decodes four bytes from array source + * and writes the resulting bytes (up to three of them) + * to destination. + * The source and destination arrays can be manipulated + * anywhere along their length by specifying + * srcOffset and destOffset. + * This method does not check to make sure your arrays + * are large enough to accomodate srcOffset + 4 for + * the source array or destOffset + 3 for + * the destination array. + * This method returns the actual number of bytes that + * were converted from the Base64 encoding. + * + * + * @param source the array to convert + * @param srcOffset the index where conversion begins + * @param destination the array to hold the conversion + * @param destOffset the index where output will be put + * @return the number of decoded bytes converted + * @since 1.3 + */ + private static int decode4to3( byte[] source, int srcOffset, byte[] destination, int destOffset ) + { + // Example: Dk== + if( source[ srcOffset + 2] == EQUALS_SIGN ) + { + // Two ways to do the same thing. Don't know which way I like best. + //int outBuff = ( ( DECODABET[ source[ srcOffset ] ] << 24 ) >>> 6 ) + // | ( ( DECODABET[ source[ srcOffset + 1] ] << 24 ) >>> 12 ); + int outBuff = ( ( DECODABET[ source[ srcOffset ] ] & 0xFF ) << 18 ) + | ( ( DECODABET[ source[ srcOffset + 1] ] & 0xFF ) << 12 ); + + destination[ destOffset ] = (byte)( outBuff >>> 16 ); + return 1; + } + + // Example: DkL= + else if( source[ srcOffset + 3 ] == EQUALS_SIGN ) + { + // Two ways to do the same thing. Don't know which way I like best. + //int outBuff = ( ( DECODABET[ source[ srcOffset ] ] << 24 ) >>> 6 ) + // | ( ( DECODABET[ source[ srcOffset + 1 ] ] << 24 ) >>> 12 ) + // | ( ( DECODABET[ source[ srcOffset + 2 ] ] << 24 ) >>> 18 ); + int outBuff = ( ( DECODABET[ source[ srcOffset ] ] & 0xFF ) << 18 ) + | ( ( DECODABET[ source[ srcOffset + 1 ] ] & 0xFF ) << 12 ) + | ( ( DECODABET[ source[ srcOffset + 2 ] ] & 0xFF ) << 6 ); + + destination[ destOffset ] = (byte)( outBuff >>> 16 ); + destination[ destOffset + 1 ] = (byte)( outBuff >>> 8 ); + return 2; + } + + // Example: DkLE + else + { + try{ + // Two ways to do the same thing. Don't know which way I like best. + //int outBuff = ( ( DECODABET[ source[ srcOffset ] ] << 24 ) >>> 6 ) + // | ( ( DECODABET[ source[ srcOffset + 1 ] ] << 24 ) >>> 12 ) + // | ( ( DECODABET[ source[ srcOffset + 2 ] ] << 24 ) >>> 18 ) + // | ( ( DECODABET[ source[ srcOffset + 3 ] ] << 24 ) >>> 24 ); + int outBuff = ( ( DECODABET[ source[ srcOffset ] ] & 0xFF ) << 18 ) + | ( ( DECODABET[ source[ srcOffset + 1 ] ] & 0xFF ) << 12 ) + | ( ( DECODABET[ source[ srcOffset + 2 ] ] & 0xFF ) << 6) + | ( ( DECODABET[ source[ srcOffset + 3 ] ] & 0xFF ) ); + + + destination[ destOffset ] = (byte)( outBuff >> 16 ); + destination[ destOffset + 1 ] = (byte)( outBuff >> 8 ); + destination[ destOffset + 2 ] = (byte)( outBuff ); + + return 3; + }catch( Exception e){ + System.out.println(""+source[srcOffset]+ ": " + ( DECODABET[ source[ srcOffset ] ] ) ); + System.out.println(""+source[srcOffset+1]+ ": " + ( DECODABET[ source[ srcOffset + 1 ] ] ) ); + System.out.println(""+source[srcOffset+2]+ ": " + ( DECODABET[ source[ srcOffset + 2 ] ] ) ); + System.out.println(""+source[srcOffset+3]+ ": " + ( DECODABET[ source[ srcOffset + 3 ] ] ) ); + return -1; + } //e nd catch + } + } // end decodeToBytes + + + + /** + * Decodes data from Base64 notation. + * + * @param s the string to decode + * @return the decoded data + * @since 1.4 + */ + public static byte[] decode( String s ) + { + byte[] bytes = s.getBytes(); + return decode( bytes, 0, bytes.length ); + } // end decode + + + /** + * Decodes data from Base64 notation and + * returns it as a string. + * Equivlaent to calling + * new String( decode( s ) ) + * + * @param s the strind to decode + * @return The data as a string + * @since 1.4 + */ + public static String decodeToString( String s ) + { return new String( decode( s ) ); + } // end decodeToString + + + /** + * Attempts to decode Base64 data and deserialize a Java + * Object within. Returns null if there was an error. + * + * @param encodedObject The Base64 data to decode + * @return The decoded and deserialized object + * @since 1.4 + */ + public static Object decodeToObject( String encodedObject ) + { + byte[] objBytes = decode( encodedObject ); + + java.io.ByteArrayInputStream bais = null; + java.io.ObjectInputStream ois = null; + + try + { + bais = new java.io.ByteArrayInputStream( objBytes ); + ois = new java.io.ObjectInputStream( bais ); + + return ois.readObject(); + } // end try + catch( java.io.IOException e ) + { + e.printStackTrace(); + return null; + } // end catch + catch( java.lang.ClassNotFoundException e ) + { + e.printStackTrace(); + return null; + } // end catch + finally + { + try{ bais.close(); } catch( Exception e ){} + try{ ois.close(); } catch( Exception e ){} + } // end finally + } // end decodeObject + + + /** + * Decodes Base64 content in byte array format and returns + * the decoded byte array. + * + * @param source The Base64 encoded data + * @param off The offset of where to begin decoding + * @param len The length of characters to decode + * @return decoded data + * @since 1.3 + */ + public static byte[] decode( byte[] source, int off, int len ) + { + int len34 = len * 3 / 4; + byte[] outBuff = new byte[ len34 ]; // Upper limit on size of output + int outBuffPosn = 0; + + byte[] b4 = new byte[4]; + int b4Posn = 0; + int i = 0; + byte sbiCrop = 0; + byte sbiDecode = 0; + for( i = 0; i < len; i++ ) + { + sbiCrop = (byte)(source[i] & 0x7f); // Only the low seven bits + sbiDecode = DECODABET[ sbiCrop ]; + + if( sbiDecode >= WHITE_SPACE_ENC ) // White space, Equals sign or better + { + if( sbiDecode >= EQUALS_SIGN_ENC ) + { + b4[ b4Posn++ ] = sbiCrop; + if( b4Posn > 3 ) + { + outBuffPosn += decode4to3( b4, 0, outBuff, outBuffPosn ); + b4Posn = 0; + + // If that was the equals sign, break out of 'for' loop + if( sbiCrop == EQUALS_SIGN ) + break; + } // end if: quartet built + + } // end if: equals sign or better + + } // end if: white space, equals sign or better + else + { + System.err.println( "Bad Base64 input character at " + i + ": " + source[i] + "(decimal)" ); + return null; + } // end else: + } // each input character + + byte[] out = new byte[ outBuffPosn ]; + System.arraycopy( outBuff, 0, out, 0, outBuffPosn ); + return out; + } // end decode + + + + + /* ******** I N N E R C L A S S I N P U T S T R E A M ******** */ + + + + /** + * A {@link Base64#InputStream} will read data from another + * {@link java.io.InputStream}, given in the constructor, + * and encode/decode to/from Base64 notation on the fly. + * + * @see Base64 + * @see java.io.FilterInputStream + * @since 1.3 + */ + public static class InputStream extends java.io.FilterInputStream + { + private boolean encode; // Encoding or decoding + private int position; // Current position in the buffer + private byte[] buffer; // Small buffer holding converted data + private int bufferLength; // Length of buffer (3 or 4) + private int numSigBytes; // Number of meaningful bytes in the buffer + private int lineLength; + private boolean breakLines; // Break lines at less than 80 characters + + + /** + * Constructs a {@link Base64#InputStream} in DECODE mode. + * + * @param in the {@link java.io.InputStream} from which to read data. + * @since 1.3 + */ + public InputStream( java.io.InputStream in ) + { + this( in, Base64.DECODE ); + } // end constructor + + + /** + * Constructs a {@link Base64#InputStream} in + * either ENCODE or DECODE mode. + * + * @param in the {@link java.io.InputStream} from which to read data. + * @param encode Conversion direction + * @see Base64#ENCODE + * @see Base64#DECODE + * @since 1.3 + */ + public InputStream( java.io.InputStream in, boolean encode ) + { + this( in, encode, true ); + } // end constructor + + + /** + * Constructs a {@link Base64#InputStream} in + * either ENCODE or DECODE mode. + * + * @param in the {@link java.io.InputStream} from which to read data. + * @param encode Conversion direction + * @param breakLines Break lines at less than 80 characters. + * @see Base64#ENCODE + * @see Base64#DECODE + * @since 1.3 + */ + public InputStream( java.io.InputStream in, boolean encode, boolean breakLines ) + { + super( in ); + this.breakLines = breakLines; + this.encode = encode; + this.bufferLength = encode ? 4 : 3; + this.buffer = new byte[ bufferLength ]; + this.position = -1; + this.lineLength = 0; + } // end constructor + + /** + * Reads enough of the input stream to convert + * to/from Base64 and returns the next byte. + * + * @return next byte + * @since 1.3 + */ + public int read() throws java.io.IOException + { + // Do we need to get data? + if( position < 0 ) + { + if( encode ) + { + byte[] b3 = new byte[3]; + int numBinaryBytes = 0; + for( int i = 0; i < 3; i++ ) + { + try + { + int b = in.read(); + + // If end of stream, b is -1. + if( b >= 0 ) + { + b3[i] = (byte)b; + numBinaryBytes++; + } // end if: not end of stream + + } // end try: read + catch( java.io.IOException e ) + { + // Only a problem if we got no data at all. + if( i == 0 ) + throw e; + + } // end catch + } // end for: each needed input byte + + if( numBinaryBytes > 0 ) + { + encode3to4( b3, 0, numBinaryBytes, buffer, 0 ); + position = 0; + numSigBytes = 4; + } // end if: got data + else + { + return -1; + } // end else + } // end if: encoding + + // Else decoding + else + { + byte[] b4 = new byte[4]; + int i = 0; + for( i = 0; i < 4; i++ ) + { + // Read four "meaningful" bytes: + int b = 0; + do{ b = in.read(); } + while( b >= 0 && DECODABET[ b & 0x7f ] <= WHITE_SPACE_ENC ); + + if( b < 0 ) + break; // Reads a -1 if end of stream + + b4[i] = (byte)b; + } // end for: each needed input byte + + if( i == 4 ) + { + numSigBytes = decode4to3( b4, 0, buffer, 0 ); + position = 0; + } // end if: got four characters + else if( i == 0 ){ + return -1; + } // end else if: also padded correctly + else + { + // Must have broken out from above. + throw new java.io.IOException( "Improperly padded Base64 input." ); + } // end + + } // end else: decode + } // end else: get data + + // Got data? + if( position >= 0 ) + { + // End of relevant data? + if( /*!encode &&*/ position >= numSigBytes ) + return -1; + + if( encode && breakLines && lineLength >= MAX_LINE_LENGTH ) + { + lineLength = 0; + return '\n'; + } // end if + else + { + lineLength++; // This isn't important when decoding + // but throwing an extra "if" seems + // just as wasteful. + + int b = buffer[ position++ ]; + + if( position >= bufferLength ) + position = -1; + + return b & 0xFF; // This is how you "cast" a byte that's + // intended to be unsigned. + } // end else + } // end if: position >= 0 + + // Else error + else + { + // When JDK1.4 is more accepted, use an assertion here. + throw new java.io.IOException( "Error in Base64 code reading stream." ); + } // end else + } // end read + + + /** + * Calls {@link #read} repeatedly until the end of stream + * is reached or len bytes are read. + * Returns number of bytes read into array or -1 if + * end of stream is encountered. + * + * @param dest array to hold values + * @param off offset for array + * @param len max number of bytes to read into array + * @return bytes read into array or -1 if end of stream is encountered. + * @since 1.3 + */ + public int read( byte[] dest, int off, int len ) throws java.io.IOException + { + int i; + int b; + for( i = 0; i < len; i++ ) + { + b = read(); + + //if( b < 0 && i == 0 ) + // return -1; + + if( b >= 0 ) + dest[off + i] = (byte)b; + else if( i == 0 ) + return -1; + else + break; // Out of 'for' loop + } // end for: each byte read + return i; + } // end read + + } // end inner class InputStream + + + + + + + /* ******** I N N E R C L A S S O U T P U T S T R E A M ******** */ + + + + /** + * A {@link Base64#OutputStream} will write data to another + * {@link java.io.OutputStream}, given in the constructor, + * and encode/decode to/from Base64 notation on the fly. + * + * @see Base64 + * @see java.io.FilterOutputStream + * @since 1.3 + */ + public static class OutputStream extends java.io.FilterOutputStream + { + private boolean encode; + private int position; + private byte[] buffer; + private int bufferLength; + private int lineLength; + private boolean breakLines; + + + /** + * Constructs a {@link Base64#OutputStream} in ENCODE mode. + * + * @param out the {@link java.io.OutputStream} to which data will be written. + * @since 1.3 + */ + public OutputStream( java.io.OutputStream out ) + { + this( out, Base64.ENCODE ); + } // end constructor + + + /** + * Constructs a {@link Base64#OutputStream} in + * either ENCODE or DECODE mode. + * + * @param out the {@link java.io.OutputStream} to which data will be written. + * @param encode Conversion direction + * @see Base64#ENCODE + * @see Base64#DECODE + * @since 1.3 + */ + public OutputStream( java.io.OutputStream out, boolean encode ) + { + this( out, encode, true ); + } // end constructor + + + /** + * Constructs a {@link Base64#OutputStream} in + * either ENCODE or DECODE mode. + * + * @param out the {@link java.io.OutputStream} to which data will be written. + * @param encode Conversion direction + * @param breakLines Break lines to be less than 80 characters. + * @see Base64#ENCODE + * @see Base64#DECODE + * @since 1.3 + */ + public OutputStream( java.io.OutputStream out, boolean encode, boolean breakLines ) + { + super( out ); + this.breakLines = breakLines; + this.encode = encode; + this.bufferLength = encode ? 3 : 4; + this.buffer = new byte[ bufferLength ]; + this.position = 0; + this.lineLength = 0; + } // end constructor + + + /** + * Writes the byte to the output stream after + * converting to/from Base64 notation. + * When encoding, bytes are buffered three + * at a time before the output stream actually + * gets a write() call. + * When decoding, bytes are buffered four + * at a time. + * + * @param theByte the byte to write + * @since 1.3 + */ + public void write(int theByte) throws java.io.IOException + { + if( encode ) + { + buffer[ position++ ] = (byte)theByte; + if( position >= bufferLength ) // Enough to encode. + { + out.write( Base64.encode3to4( buffer, bufferLength ) ); + + lineLength += 4; + if( breakLines && lineLength >= MAX_LINE_LENGTH ) + { + out.write( NEW_LINE ); + lineLength = 0; + } // end if: end of line + + position = 0; + } // end if: enough to output + } // end if: encoding + + // Else, Decoding + else + { + // Meaningful Base64 character? + if( DECODABET[ theByte & 0x7f ] > WHITE_SPACE_ENC ) + { + buffer[ position++ ] = (byte)theByte; + if( position >= bufferLength ) // Enough to output. + { + out.write( Base64.decode4to3( buffer ) ); + position = 0; + } // end if: enough to output + } // end if: meaningful base64 character + else if( DECODABET[ theByte & 0x7f ] != WHITE_SPACE_ENC ) + { + throw new java.io.IOException( "Invalid character in Base64 data." ); + } // end else: not white space either + } // end else: decoding + } // end write + + + + /** + * Calls {@link #write} repeatedly until len + * bytes are written. + * + * @param theBytes array from which to read bytes + * @param off offset for array + * @param len max number of bytes to read into array + * @since 1.3 + */ + public void write( byte[] theBytes, int off, int len ) throws java.io.IOException + { + for( int i = 0; i < len; i++ ) + { + write( theBytes[ off + i ] ); + } // end for: each byte written + + } // end write + + + /** + * Appropriately pads Base64 notation when encoding + * or throws an exception if Base64 input is not + * properly padded when decoding. + * + * @since 1.3 + */ + public void flush() throws java.io.IOException + { + super.flush(); + + if( position > 0 ) + { + if( encode ) + { + out.write( Base64.encode3to4( buffer, position ) ); + } // end if: encoding + else + { + throw new java.io.IOException( "Base64 input not properly padded." ); + } // end else: decoding + } // end if: buffer partially full + + out.flush(); + } // end flush + + + /** + * Flushes and closes stream. + * + * @since 1.3 + */ + public void close() throws java.io.IOException + { + super.close(); + //this.flush(); + + out.close(); + + buffer = null; + out = null; + } // end close + + } // end inner class OutputStream + + +} // end class Base64 diff --git a/bindings/corba/java/src/org/crosswire/web/i18n/ContextStart.java.notyet b/bindings/corba/java/src/org/crosswire/web/i18n/ContextStart.java.notyet new file mode 100644 index 0000000..f6823e2 --- /dev/null +++ b/bindings/corba/java/src/org/crosswire/web/i18n/ContextStart.java.notyet @@ -0,0 +1,10 @@ +package org.crosswire.web.i18n; + +import javax.servlet.jsp.tagext.*; + +public class ContextStart extends TagSupport { + + public ContextStart() { + } + +} diff --git a/bindings/corba/java/src/org/crosswire/web/i18n/TranslateTag.java b/bindings/corba/java/src/org/crosswire/web/i18n/TranslateTag.java new file mode 100644 index 0000000..1ed20a5 --- /dev/null +++ b/bindings/corba/java/src/org/crosswire/web/i18n/TranslateTag.java @@ -0,0 +1,87 @@ +package org.crosswire.web.i18n; + +import javax.servlet.jsp.tagext.BodyTagSupport; +import javax.servlet.jsp.tagext.BodyContent; +import javax.servlet.jsp.JspException; +import javax.servlet.jsp.JspTagException; +//import javax.servlet.jsp.JspWriter; +import javax.servlet.http.HttpSession; +//import java.util.HashMap; +//import java.io.StringWriter; +import java.util.Locale; +import java.util.ResourceBundle; +import java.util.MissingResourceException; +import java.util.Properties; +import java.io.FileInputStream; +import java.io.FileOutputStream; + + +public class TranslateTag extends BodyTagSupport { + + private String _key=null; + private ResourceBundle _bundle=null; + private String _lang=null; + + /* Uses code from GNU gettext for translation */ + /* which is covered by the LGPL */ + public String doTranslate(ResourceBundle catalog, String msgid) throws JspTagException { + String hashkey = "" + msgid.hashCode(); + try { + if (catalog != null) { + String result = (String)catalog.getObject(hashkey); + if (result != null) + return result; + } + } catch (MissingResourceException e) { + // want to add the msgid to the properties file + Properties props = new Properties(); + + try { + FileInputStream tbtin = new FileInputStream(pageContext.getServletContext().getRealPath("/WEB-INF/classes/tbt.properties")); + props.load(tbtin); + tbtin.close(); + + props.put(hashkey, msgid); + + FileOutputStream tbtout = new FileOutputStream(pageContext.getServletContext().getRealPath("/WEB-INF/classes/tbt.properties")); + props.store(tbtout, null); + tbtout.close(); + + } + catch(java.io.IOException e2) + { + throw new JspTagException("IO Error: " + e2.getMessage()); + } + + } + return msgid; + } + + public int doAfterBody() throws JspTagException { + BodyContent bc = getBodyContent(); + _key = bc.getString(); + HttpSession session = pageContext.getSession(); + Locale locale = (Locale) session.getAttribute("TranslateLocale"); + + if ((_bundle == null) || (_lang != locale.toString())) { + _lang = locale.toString(); + _bundle = ResourceBundle.getBundle("tbt", locale); + } + + return 0; + } + + public int doEndTag() throws JspException { + try + { + pageContext.getOut().write(doTranslate(_bundle, _key)); + } + catch(java.io.IOException e) + { + throw new JspTagException("IO Error: " + e.getMessage()); + } + return EVAL_PAGE; + } + + +} diff --git a/bindings/corba/java/swordorb.jpx b/bindings/corba/java/swordorb.jpx new file mode 100644 index 0000000..34642c6 --- /dev/null +++ b/bindings/corba/java/swordorb.jpx @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/corba/java/swordorb.jpx.local b/bindings/corba/java/swordorb.jpx.local new file mode 100644 index 0000000..3303b21 --- /dev/null +++ b/bindings/corba/java/swordorb.jpx.local @@ -0,0 +1,10 @@ +debug.Breakpoints.1[0]=1 023 hellomodule.HelloClient32 src/hellomodule/HelloClient.java1 81 10 1 10 1 10 1 0 -1 +debug.Breakpoints.2[0]=1 032 org.crosswire.sword.orb.SwordOrb41 src/org/crosswire/sword/orb/SwordOrb.java2 991 10 1 10 1 10 1 0 -1 +debug.NoTracingClasses.1[0]=16 java.lang.Object1 1 -1 +debug.NoTracingClasses.2[0]=21 java.lang.ClassLoader1 1 -1 +debug.NoTracingClasses.3[0]=16 java.lang.String1 1 -1 +debug.SplitThreadsAndDataView[0]=0 +import.optimize.legacyPropertiesRead[0]=1 +sys.Author[0]= +sys.DefaultPackage[0]=org.crosswire.sword.orb +wizard.package.package_history.1[0]=helloworld diff --git a/bindings/corba/java/testclient b/bindings/corba/java/testclient new file mode 100755 index 0000000..c7a623f --- /dev/null +++ b/bindings/corba/java/testclient @@ -0,0 +1,6 @@ +#!/bin/sh +TOMCAT_HOME=/opt/tomcat +#SERVLET_LIB=${TOMCAT_HOME}/common/lib/servlet-api.jar +SERVLET_LIB=${TOMCAT_HOME}/lib/servlet-api.jar +TOMCAT_HOME=/usr/local/tomcat +java -cp $SERVLET_LIB:classes org.crosswire.sword.orb.SwordOrb $* diff --git a/bindings/corba/orbitcpp/Makefile b/bindings/corba/orbitcpp/Makefile new file mode 100644 index 0000000..c7a48a7 --- /dev/null +++ b/bindings/corba/orbitcpp/Makefile @@ -0,0 +1,66 @@ +all: server testclient + +PREFIX = $(shell grep ^prefix ../../../Makefile|cut -f3 -d' ') + +#sword stuff +CXXFLAGS += $(shell PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig pkg-config --cflags sword) +CFLAGS += $(shell PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig pkg-config --cflags sword) +LIBS += $(shell PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig pkg-config --libs sword) + +#orbit stuff +CFLAGS += $(shell orbit2-config --cflags) +CXXFLAGS += $(shell orbit2-config --cflags) +LIBS += $(shell orbit2-config --libs) + +#orbitcpp stuff-- this is silly. Is there really NOT a way to derive this? +CFLAGS += -I/usr/include/orbitcpp-2.0 +CXXFLAGS += -I/usr/include/orbitcpp-2.0 +LIBS += -L/usr/lib64 -lORBit-2-cpp + +#comment out for release +#CXXFLAGS += -g -O0 +#CFLAGS += -g -O0 +#LDFLAGS += -g -O0 +#----------------------------------------------------------------------------- + + +server: swordorb-common.o server.cpp swordorb-impl.o swordorb-cpp.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-cpp-skels.o swordorb-skels.o swordorb-cpp.o + $(CXX) $(CXXFLAGS) -I. -o server server.cpp swordorb-impl.o swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-cpp-skels.o swordorb-skels.o $(LIBS) + +testclient: testclient.cpp swordorb-impl.cpp swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-skels.o swordorb-cpp-skels.o + $(CXX) $(CXXFLAGS) -I. -o testclient testclient.cpp swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-skels.o swordorb-cpp-skels.o $(LIBS) + +swordorb-cpp.o: swordorb-cpp.cc + $(CXX) $(CXXFLAGS) -I. -c swordorb-cpp.cc + +swordorb-impl.o: swordorb-impl.cpp + $(CXX) $(CXXFLAGS) -I. -c swordorb-impl.cpp + +swordorb-common.o: swordorb-common.c + $(CC) $(CFLAGS) -I. -c swordorb-common.c + +swordorb-common.c: ./../swordorb.idl + orbit-idl-2 -l c ./../swordorb.idl + orbit-idl-2 -l cpp ./../swordorb.idl + +swordorb-cpp-common.o: swordorb-cpp-common.cc + $(CXX) $(CXXFLAGS) -I. -c swordorb-cpp-common.cc + +swordorb-stubs.o: swordorb-stubs.c + $(CC) $(CFLAGS) -I. -c swordorb-stubs.c + +swordorb-cpp-stubs.o: swordorb-cpp-stubs.cc + $(CXX) $(CXXFLAGS) -I. -c swordorb-cpp-stubs.cc + +swordorb-skels.o: swordorb-skels.c + $(CC) $(CFLAGS) -I. -c swordorb-skels.c + +swordorb-cpp-skels.o: swordorb-cpp-skels.cc + $(CXX) $(CXXFLAGS) -I. -c swordorb-cpp-skels.cc + +clean: + rm -f *.h *.cc *.o *.c server testclient + +install: + mkdir -p $(PREFIX)/bin + cp -f server $(PREFIX)/bin/swordorbserver diff --git a/bindings/corba/orbitcpp/Makefile.am b/bindings/corba/orbitcpp/Makefile.am new file mode 100644 index 0000000..2d36ddf --- /dev/null +++ b/bindings/corba/orbitcpp/Makefile.am @@ -0,0 +1,40 @@ +bin_PROGRAMS = swordorbserver + +noinst_PROGRAMS = testclient + +swordorbserver_SOURCES = server.cpp +swordorbserver_SOURCES += swordorb-common.c +swordorbserver_SOURCES += swordorb-impl.cpp +swordorbserver_SOURCES += swordorb-cpp-common.cc +swordorbserver_SOURCES += swordorb-stubs.c +swordorbserver_SOURCES += swordorb-cpp-stubs.cc +swordorbserver_SOURCES += swordorb-skels.c +swordorbserver_SOURCES += swordorb-cpp-skels.cc + +swordorbserver_CFLAGS = $(SWORD_CFLAGS) $(ORBIT_CFLAGS) +swordorbserver_CXXFLAGS = $(SWORD_CFLAGS) $(ORBIT_CXXFLAGS) +swordorbserver_LDADD = $(SWORD_LIBS) $(ORBIT_LIBS) + +testclient_SOURCES = testclient.cpp +testclient_SOURCES += swordorb-common.c +testclient_SOURCES += swordorb-impl.cpp +testclient_SOURCES += swordorb-cpp-common.cc +testclient_SOURCES += swordorb-stubs.c +testclient_SOURCES += swordorb-cpp-stubs.cc +testclient_SOURCES += swordorb-skels.c +testclient_SOURCES += swordorb-cpp-skels.cc + +testclient_CFLAGS = $(SWORD_CFLAGS) $(ORBIT_CFLAGS) +testclient_CXXFLAGS = $(SWORD_CFLAGS) $(ORBIT_CXXFLAGS) +testclient_LDADD = $(SWORD_LIBS) $(ORBIT_LIBS) + +BUILT_SOURCES = swordorb-common.c + +swordorb-common.c: $(top_srcdir)/corba/swordorb.idl + orbit-idl-2 -l c $(top_srcdir)/corba/swordorb.idl + orbit-idl-2 -l cpp $(top_srcdir)/corba/swordorb.idl + +clean: + rm -f *.h *.cc *.o *.c server testclient + + diff --git a/bindings/corba/orbitcpp/server.cpp b/bindings/corba/orbitcpp/server.cpp new file mode 100644 index 0000000..83b1864 --- /dev/null +++ b/bindings/corba/orbitcpp/server.cpp @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ + +#include "swordorb-impl.hpp" +#include +#include +#include "webmgr.hpp" + +SWConfig *sysConf = 0; +WebMgr *swordMgr = 0; + +class CleanStatics { +public: + CleanStatics() {} + ~CleanStatics() { + if (swordMgr) + delete swordMgr; + + if (sysConf) + delete sysConf; + } +} cleanStatics; + + + + +int main (int argc, char* argv[]) { + try { + + for (int i = 1; i < argc; i++) { + if (!strcmp(argv[i], "-sysConf")) { + if ((i+1) < argc) + sysConf = new SWConfig(argv[i+1]); + } + } + + swordMgr = new WebMgr(sysConf); + + // Initialize the CORBA orb + CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv); + + // Get the root POA + CORBA::Object_var pfobj = orb->resolve_initial_references("RootPOA"); + + PortableServer::POA_var rootPOA = + PortableServer::POA::_narrow(pfobj); + + // Activate the root POA's manager + PortableServer::POAManager_var mgr = rootPOA->the_POAManager(); + + mgr->activate(); + + // Create a Servant and explicitly create a CORBA object + swordorb::SWMgr_impl servant(swordMgr); + CORBA::Object_var object = servant._this(); + + // Here we get the IOR for the Hello server object. + // Our "client" will use the IOR to find the object to connect to + CORBA::String_var ref = orb->object_to_string( object ); + + // print out the IOR + std::cout << ref << std::endl; + + // run the server event loop + orb->run(); + } + catch(const CORBA::Exception& ex) + { + std::cout << "Exception caught." << std::endl; + } + +} diff --git a/bindings/corba/orbitcpp/swordorb-impl.cpp b/bindings/corba/orbitcpp/swordorb-impl.cpp new file mode 100644 index 0000000..29b5b5e --- /dev/null +++ b/bindings/corba/orbitcpp/swordorb-impl.cpp @@ -0,0 +1,357 @@ +#include "swordorb-impl.hpp" +#include +#include +#include +#include +#include +#include +#include + +/* +char* swordorb::SWModule_impl::helloWorld(const char* greeting) throw(CORBA::SystemException) { + std::cout << "Server: Greeting was \"" << greeting << "\"" << std::endl; + return CORBA::string_dup("Hello client, from server!"); +} +*/ + +using sword::VerseKey; +using sword::SWBuf; +using sword::TreeKeyIdx; + +namespace swordorb { + +sword::RawText NULLMod("/dev/null", SWNULL, SWNULL); + +ModInfoList *SWMgr_impl::getModInfoList() throw(CORBA::SystemException) { + + ModInfoList *milist = new ModInfoList; + sword::SWModule *module = 0; + int size = 0; + for (sword::ModMap::iterator it = delegate->Modules.begin(); it != delegate->Modules.end(); it++) { + if ((!(it->second->getConfigEntry("CipherKey"))) || (*(it->second->getConfigEntry("CipherKey")))) + size++; + } + milist->length(size); + int i = 0; + for (sword::ModMap::iterator it = delegate->Modules.begin(); it != delegate->Modules.end(); it++) { + module = it->second; + if ((!(module->getConfigEntry("CipherKey"))) || (*(module->getConfigEntry("CipherKey")))) { + SWBuf type = module->Type(); + SWBuf cat = module->getConfigEntry("Category"); + if (cat.length() > 0) + type = cat; + (*milist)[i].name = CORBA::string_dup(module->Name()); + (*milist)[i].description = CORBA::string_dup(module->Description()); + (*milist)[i].category = CORBA::string_dup(type.c_str()); + (*milist)[i++].language = CORBA::string_dup(module->Lang()); + } + } + return milist; +} + + + +SWModule_ptr SWMgr_impl::getModuleByName(const char *name) throw(CORBA::SystemException) { + SWModuleMap::iterator it; + SWModule_ptr retVal; + sword::SWModule *mod = delegate->Modules[name]; + it = moduleImpls.find((mod)?name:SWNULL); + if (it == moduleImpls.end()) { + moduleImpls[(mod)?name:SWNULL] = new SWModule_impl((mod)?mod:&NULLMod); + it = moduleImpls.find((mod)?name:SWNULL); + } + if (it != moduleImpls.end()) { + retVal = it->second->_this(); + } + return ::swordorb::SWModule::_duplicate(retVal); +} + + +StringList *SWMgr_impl::getGlobalOptions() throw(CORBA::SystemException) { + sword::StringList options = delegate->getGlobalOptions(); + StringList *retVal = new StringList; + int count = 0; + for (sword::StringList::iterator it = options.begin(); it != options.end(); it++) { + count++; + } + retVal->length(count); + count = 0; + for (sword::StringList::iterator it = options.begin(); it != options.end(); it++) { + (*retVal)[count++] = CORBA::string_dup(it->c_str()); + } + return retVal; +} + + +StringList *SWMgr_impl::getGlobalOptionValues(const char *option) throw(CORBA::SystemException) { + sword::StringList options = delegate->getGlobalOptionValues(option); + StringList *retVal = new StringList; + int count = 0; + for (sword::StringList::iterator it = options.begin(); it != options.end(); it++) { + count++; + } + retVal->length(count); + count = 0; + for (sword::StringList::iterator it = options.begin(); it != options.end(); it++) { + (*retVal)[count++] = CORBA::string_dup(it->c_str()); + } + return retVal; +} + +void SWMgr_impl::terminate() throw(CORBA::SystemException) { + exit(0); +} + + +CORBA::Boolean SWMgr_impl::testConnection() throw(CORBA::SystemException) { + return true; +} + +void SWMgr_impl::setJavascript(CORBA::Boolean val) throw(CORBA::SystemException) { + delegate->setJavascript(val); +} + +char *SWMgr_impl::filterText(const char *filterName, const char *text) throw(CORBA::SystemException) { + SWBuf buf = text; + delegate->setGlobalOption("Greek Accents", "Off"); + char errStatus = delegate->filterText(filterName, buf); + return CORBA::string_dup((char *)buf.c_str()); +} + +char *SWModule_impl::getCategory() throw(CORBA::SystemException) { + SWBuf type = delegate->Type(); + SWBuf cat = delegate->getConfigEntry("Category"); + if (cat.length() > 0) + type = cat; + return CORBA::string_dup((char *)type.c_str()); +} + + +StringList *SWModule_impl::parseKeyList(const char *keyText) throw(CORBA::SystemException) { + sword::VerseKey *parser = dynamic_cast(delegate->getKey()); + StringList *retVal = new StringList; + if (parser) { + sword::ListKey result; + result = parser->ParseVerseList(keyText, *parser, true); + int count = 0; + for (result = sword::TOP; !result.Error(); result++) { + count++; + } + retVal->length(count); + count = 0; + for (result = sword::TOP; !result.Error(); result++) { + (*retVal)[count++] = CORBA::string_dup((const char *)result); + } + } + else { + retVal->length(1); + (*retVal)[0] = CORBA::string_dup(keyText); + } + + return retVal; +} + + +SearchHitList *SWModule_impl::search(const char *istr, SearchType searchType, CORBA::Long flags, const char *scope) throw(CORBA::SystemException) { + int stype = 2; + sword::ListKey lscope; + sword::VerseKey parser; + if (searchType == REGEX) stype = 0; + if (searchType == PHRASE) stype = -1; + if (searchType == MULTIWORD) stype = -2; + if (searchType == ENTRYATTR) stype = -3; + if (searchType == LUCENE) stype = -4; + sword::ListKey result; + + if ((scope) && (strlen(scope)) > 0) { + lscope = parser.ParseVerseList(scope, parser, true); + result = delegate->Search(istr, stype, flags, &lscope); + } + else result = delegate->Search(istr, stype, flags); + + SearchHitList *retVal = new SearchHitList; + int count = 0; + for (result = sword::TOP; !result.Error(); result++) count++; + retVal->length(count); + int i = 0; + + // if we're sorted by score, let's re-sort by verse, because Java can always re-sort by score + result = sword::TOP; + if ((count) && (long)result.getElement()->userData) + result.sort(); + + for (result = sword::TOP; !result.Error(); result++) { + (*retVal)[i].modName = CORBA::string_dup(delegate->Name()); + (*retVal)[i].key = CORBA::string_dup((const char *)result); + (*retVal)[i++].score = (long)result.getElement()->userData; + } + + return retVal; +} + + +StringList *SWModule_impl::getEntryAttribute(const char *level1, const char *level2, const char *level3, CORBA::Boolean filtered) throw(CORBA::SystemException) { + delegate->RenderText(); // force parse + std::vector results; + StringList *retVal = new StringList; + int count = 0; + + sword::AttributeTypeList &entryAttribs = delegate->getEntryAttributes(); + sword::AttributeTypeList::iterator i1Start, i1End; + sword::AttributeList::iterator i2Start, i2End; + sword::AttributeValue::iterator i3Start, i3End; + + if ((level1) && (*level1)) { + i1Start = entryAttribs.find(level1); + i1End = i1Start; + if (i1End != entryAttribs.end()) + i1End++; + } + else { + i1Start = entryAttribs.begin(); + i1End = entryAttribs.end(); + } + for (;i1Start != i1End; i1Start++) { + if ((level2) && (*level2)) { + i2Start = i1Start->second.find(level2); + i2End = i2Start; + if (i2End != i1Start->second.end()) + i2End++; + } + else { + i2Start = i1Start->second.begin(); + i2End = i1Start->second.end(); + } + for (;i2Start != i2End; i2Start++) { + if ((level3) && (*level3)) { + i3Start = i2Start->second.find(level3); + i3End = i3Start; + if (i3End != i2Start->second.end()) + i3End++; + } + else { + i3Start = i2Start->second.begin(); + i3End = i2Start->second.end(); + } + for (;i3Start != i3End; i3Start++) { + results.push_back(i3Start->second); + } + if (i3Start != i3End) + break; + } + if (i2Start != i2End) + break; + } + + retVal->length(results.size()); + for (int i = 0; i < results.size(); i++) { + if (filtered) { + (*retVal)[i] = CORBA::string_dup(delegate->RenderText(results[i].c_str())); + } + else { + (*retVal)[count++] = CORBA::string_dup(results[i].c_str()); + } + } + + return retVal; +} + + +StringList *SWModule_impl::getKeyChildren() throw(CORBA::SystemException) { + sword::SWKey *key = delegate->getKey(); + StringList *retVal = new StringList; + int count = 0; + + sword::VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, key); + if (vkey) { + retVal->length(6); + SWBuf num; + num.appendFormatted("%d", vkey->Testament()); + (*retVal)[0] = CORBA::string_dup(num.c_str()); + num = ""; + num.appendFormatted("%d", vkey->Book()); + (*retVal)[1] = CORBA::string_dup(num.c_str()); + num = ""; + num.appendFormatted("%d", vkey->Chapter()); + (*retVal)[2] = CORBA::string_dup(num.c_str()); + num = ""; + num.appendFormatted("%d", vkey->Verse()); + (*retVal)[3] = CORBA::string_dup(num.c_str()); + num = ""; + num.appendFormatted("%d", vkey->books[vkey->Testament()-1][vkey->Book()-1].chapmax); + (*retVal)[4] = CORBA::string_dup(num.c_str()); + num = ""; + num.appendFormatted("%d", vkey->books[vkey->Testament()-1][vkey->Book()-1].versemax[vkey->Chapter()-1]); + (*retVal)[5] = CORBA::string_dup(num.c_str()); + } + else { + TreeKeyIdx *tkey = SWDYNAMIC_CAST(TreeKeyIdx, key); + if (tkey) { + if (tkey->firstChild()) { + do { + count++; + } + while (tkey->nextSibling()); + tkey->parent(); + } + retVal->length(count); + count = 0; + if (tkey->firstChild()) { + do { + (*retVal)[count++] = CORBA::string_dup(tkey->getLocalName()); + } + while (tkey->nextSibling()); + tkey->parent(); + } + } + } + return retVal; +} + +CORBA::Boolean SWModule_impl::hasKeyChildren() throw(CORBA::SystemException) { + sword::SWKey *key = delegate->getKey(); + bool retVal = ""; + + TreeKeyIdx *tkey = SWDYNAMIC_CAST(TreeKeyIdx, key); + if (tkey) { + retVal = tkey->hasChildren(); + } + return retVal; +} + + +char *SWModule_impl::getKeyParent() throw(CORBA::SystemException) { + sword::SWKey *key = delegate->getKey(); + SWBuf retVal = ""; + + TreeKeyIdx *tkey = SWDYNAMIC_CAST(TreeKeyIdx, key); + if (tkey) { + if (tkey->parent()) { + retVal = tkey->getText(); + } + } + return CORBA::string_dup((const char *)retVal); +} + + +StringList *SWMgr_impl::getAvailableLocales() throw(CORBA::SystemException) { + sword::StringList localeNames = LocaleMgr::getSystemLocaleMgr()->getAvailableLocales(); + StringList *retVal = new StringList; + int count = 0; + for (sword::StringList::iterator it = localeNames.begin(); it != localeNames.end(); it++) { + count++; + } + retVal->length(count); + count = 0; + for (sword::StringList::iterator it = localeNames.begin(); it != localeNames.end(); it++) { + (*retVal)[count++] = CORBA::string_dup(it->c_str()); + } + return retVal; +} + + +void SWMgr_impl::setDefaultLocale(const char *name) throw(CORBA::SystemException) { + LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(name); +} + +} diff --git a/bindings/corba/orbitcpp/swordorb-impl.hpp b/bindings/corba/orbitcpp/swordorb-impl.hpp new file mode 100644 index 0000000..f9a88b1 --- /dev/null +++ b/bindings/corba/orbitcpp/swordorb-impl.hpp @@ -0,0 +1,79 @@ +#ifndef _ORBIT_CPP_IDL_sword_IMPL_HH +#define _ORBIT_CPP_IDL_sword_IMPL_HH + +#include "swordorb-cpp-skels.h" +#include "webmgr.hpp" +#include +#include +#include +#include + + +namespace swordorb { + +static const char *SWNULL = ""; +extern sword::RawText NULLMod; + +//Inherit from abstract Skeleton: +class SWModule_impl : public POA_swordorb::SWModule { + sword::SWModule *delegate; +public: + SWModule_impl(sword::SWModule *delegate) { this->delegate = delegate; } + + SearchHitList *search(const char *istr, SearchType searchType, CORBA::Long flags, const char *scope) throw(CORBA::SystemException); + StringList *parseKeyList(const char *keyText) throw(CORBA::SystemException); + void terminateSearch() throw(CORBA::SystemException) { delegate->terminateSearch = true; } + char error() throw(CORBA::SystemException) { return delegate->Error(); } + CORBA::Long getEntrySize() throw(CORBA::SystemException) { return delegate->getEntrySize(); } + void setKeyText(const char *key) throw(CORBA::SystemException) { delegate->KeyText(key); } + char *getKeyText() throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->KeyText()); } + StringList *getKeyChildren() throw(CORBA::SystemException); + char *getKeyParent() throw(CORBA::SystemException); + CORBA::Boolean hasKeyChildren() throw(CORBA::SystemException); + char *getName() throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->Name()); } + char *getDescription() throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->Description()); } + char *getCategory() throw(CORBA::SystemException); + void previous() throw(CORBA::SystemException) { delegate->decrement(); } + void next() throw(CORBA::SystemException) { delegate->increment(); } + void begin() throw(CORBA::SystemException) { delegate->setPosition(sword::TOP); } + char *getStripText() throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->StripText()); } + StringList *getEntryAttribute(const char *level1, const char *level2, const char *level3, CORBA::Boolean filtered) throw(CORBA::SystemException); + char *getRenderText() throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->RenderText()); } + char *getRawEntry() throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->getRawEntry()); } + void setRawEntry(const char *entryBuffer) throw(CORBA::SystemException) { delegate->setEntry(entryBuffer); } + char *getConfigEntry(const char *key) throw(CORBA::SystemException) { return CORBA::string_dup(((char *)delegate->getConfigEntry(key)) ? (char *)delegate->getConfigEntry(key):SWNULL); } + void deleteSearchFramework() throw(CORBA::SystemException) { return delegate->deleteSearchFramework(); } + CORBA::Boolean hasSearchFramework() throw(CORBA::SystemException) { return (delegate->hasSearchFramework() && delegate->isSearchOptimallySupported("God", -4, 0, 0)); } + +}; + +typedef std::map SWModuleMap; + +class SWMgr_impl : public POA_swordorb::SWMgr { + WebMgr *delegate; + SWModuleMap moduleImpls; +public: + SWMgr_impl(WebMgr *delegate) { this->delegate = delegate; } + + ModInfoList *getModInfoList() throw(CORBA::SystemException); + SWModule_ptr getModuleByName(const char *name) throw(CORBA::SystemException); + char *filterText(const char *filterName, const char *text) throw(CORBA::SystemException); + char *getPrefixPath() throw(CORBA::SystemException) { return CORBA::string_dup(delegate->prefixPath); } + char *getConfigPath() throw(CORBA::SystemException) { return CORBA::string_dup(delegate->configPath); } + void setGlobalOption(const char *option, const char *value) throw(CORBA::SystemException) { delegate->setGlobalOption(option, value); } + char *getGlobalOption(const char *option) throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->getGlobalOption(option)); } + char *getGlobalOptionTip(const char *option) throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->getGlobalOptionTip(option)); } + StringList *getGlobalOptions() throw(CORBA::SystemException); + StringList *getGlobalOptionValues(const char *option) throw(CORBA::SystemException); + void setCipherKey(const char *modName, const char *key) throw(CORBA::SystemException) { delegate->setCipherKey(modName, key); } + void terminate() throw(CORBA::SystemException); + CORBA::Boolean testConnection() throw(CORBA::SystemException); + void setJavascript(CORBA::Boolean) throw(CORBA::SystemException); + StringList *getAvailableLocales() throw(CORBA::SystemException); + void setDefaultLocale(const char *name) throw(CORBA::SystemException); + +}; +}; // namespace hellomodule + + +#endif //_ORBIT_CPP_IDL_helloworld_IMPL_HH diff --git a/bindings/corba/orbitcpp/testclient.cpp b/bindings/corba/orbitcpp/testclient.cpp new file mode 100644 index 0000000..8477d18 --- /dev/null +++ b/bindings/corba/orbitcpp/testclient.cpp @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: f; c-basic-offset: 4 -*- */ + +#include "swordorb-cpp-stubs.h" +#include "swordorb-cpp-common.h" +#include +#include + +int main (int argc, char *argv[]) +{ + if (argc != 2) + { + std::cerr << "Usage:" << std::endl + << " " << argv[0] << " IOR" << std::endl + << std::endl; + return -1; + } + + try + { + // Initialize ORBit + CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv, "orbit-local-orb"); + + // Get a reference to the server from the IOR passed on the + // command line + CORBA::Object_var obj = orb->string_to_object(argv[1]); + swordorb::SWMgr_var mgr = swordorb::SWMgr::_narrow(obj); + + swordorb::SWModule_ptr module; + swordorb::ModInfoList *modInfoList; + + std::cout << "Connected: " << mgr->testConnection() << "\n"; + std::cout << "PrefixPath: " << mgr->getPrefixPath() << "\n"; + std::cout << "ConfigPath: " << mgr->getConfigPath() << "\n"; +// modInfoList = mgr->getModInfoList(); +// std::cout << "sequence length: " << modInfoList->length() << "\n"; +/* + for (int i = 0; i < modInfoList->length(); i++) { + std::cout << (*modInfoList)[i].name << ": " << (*modInfoList)[i].category << ": " << (*modInfoList)[i].language << "\n"; + if (!strncmp((*modInfoList)[i].category, "Bibl", 4)) { + module = mgr->getModuleByName((*modInfoList)[i].name); + module->setKeyText("jas1:19"); + std::cout << module->getRenderText() << "\n"; + } + std::cout << "\n"; + } + swordorb::StringList *localeNames = mgr->getAvailableLocales(); + for (int i = 0; i < localeNames->length(); i++) { + std::cout << (*localeNames)[i] << "\n"; + } + mgr->setDefaultLocale("de"); +*/ + mgr->setJavascript(true); + mgr->setGlobalOption("Textual Variants", "Secondary Reading"); + mgr->setGlobalOption("Footnotes", "On"); + module = mgr->getModuleByName("NASB"); +/* + module->setKeyText("jas.1.19"); + swordorb::StringList *attr = module->getEntryAttribute("Footnote", "", "body", true); + std::cout << "length: " << attr->length() << "\n"; + for (int i = 0; i < attr->length(); i++) { + std::cout << (*attr)[i] << "\n"; + } +*/ + int i = 0; + for (module->setKeyText("gen.2.8"); !module->error() && i < 3; module->next(), i++) { + std::cout << "KeyText: " << module->getKeyText() << "\n"; + std::cout << "Text: " << module->getRenderText() << "\n"; + } +/* + swordorb::SearchHitList *searchResults; + bool lucene = module->hasSearchFramework(); + searchResults = module->search("David", (lucene)?swordorb::LUCENE:swordorb::MULTIWORD, 0, ""); + for (int i = 0; i < searchResults->length(); i++) { + std::cout << (*searchResults)[i].key << "\n"; + } + + mgr->setGlobalOption("Greek Accents", "Off"); + std::cout << "\nFiltered text: " << mgr->filterText("Greek Accents", "ὠθεὸς") << "\n"; +*/ + + + } catch(const CORBA::Exception& ex) { + std::cout << "Exception caught. Maybe the server is not running, or the IOR is wrong." << std::endl; + } + + return 0; +} diff --git a/bindings/corba/orbitcpp/webmgr.hpp b/bindings/corba/orbitcpp/webmgr.hpp new file mode 100644 index 0000000..2fba2c3 --- /dev/null +++ b/bindings/corba/orbitcpp/webmgr.hpp @@ -0,0 +1,97 @@ +#ifndef WEBMGR_HPP +#define WEBMGR_HPP + +#include +#include +#include +#include +#include +#include +#include + +using namespace sword; + +class WebMgr : public SWMgr { + OSISWordJS *osisWordJS; + ThMLWordJS *thmlWordJS; + GBFWordJS *gbfWordJS; + SWModule *defaultGreekLex; + SWModule *defaultHebLex; + SWModule *defaultGreekParse; + SWModule *defaultHebParse; + +public: + WebMgr(SWConfig *sysConf) : SWMgr(0, sysConf, false, new MarkupFilterMgr(FMT_WEBIF)) { + defaultGreekLex = 0; + defaultHebLex = 0; + defaultGreekParse = 0; + defaultHebParse = 0; + + osisWordJS = new OSISWordJS(); + thmlWordJS = new ThMLWordJS(); + gbfWordJS = new GBFWordJS(); + Load(); + osisWordJS->setDefaultModules(defaultGreekLex, defaultHebLex, defaultGreekParse, defaultHebParse); + thmlWordJS->setDefaultModules(defaultGreekLex, defaultHebLex, defaultGreekParse, defaultHebParse); + gbfWordJS->setDefaultModules(defaultGreekLex, defaultHebLex, defaultGreekParse, defaultHebParse); + osisWordJS->setMgr(this); + thmlWordJS->setMgr(this); + gbfWordJS->setMgr(this); + setGlobalOption("Textual Variants", "Primary Reading"); + } + + ~WebMgr() { + delete osisWordJS; + delete thmlWordJS; + delete gbfWordJS; + } + + + void AddGlobalOptions(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, ConfigEntMap::iterator end) { + + // ThML word stuff needs to process before strongs strip + if (module->Markup() == FMT_THML) { + module->AddOptionFilter(thmlWordJS); + } + + if (module->Markup() == FMT_GBF) { + module->AddOptionFilter(gbfWordJS); + } + + // add other module filters + SWMgr::AddGlobalOptions(module, section, start, end); + + // add our special filters + if (module->getConfig().has("Feature", "GreekDef")) { + defaultGreekLex = module; + } + if (module->getConfig().has("Feature", "HebrewDef")) { + defaultHebLex = module; + } + if (module->getConfig().has("Feature", "GreekParse")) { + defaultGreekParse = module; + } + if (module->getConfig().has("Feature", "HebrewParse")) { + defaultHebParse = module; + } + if (module->getConfig().has("GlobalOptionFilter", "ThMLVariants")) { + OptionFilterMap::iterator it = optionFilters.find("ThMLVariants"); + if (it != optionFilters.end()) { + module->AddOptionFilter((*it).second); // add filter to module and option as a valid option + } + } + + if (module->Markup() == FMT_OSIS) { + module->AddOptionFilter(osisWordJS); + } + } + + + void setJavascript(bool val) { + osisWordJS->setOptionValue((val)?"On":"Off"); + thmlWordJS->setOptionValue((val)?"On":"Off"); + gbfWordJS->setOptionValue((val)?"On":"Off"); + } +}; + +#endif diff --git a/bindings/corba/swordorb.idl b/bindings/corba/swordorb.idl new file mode 100644 index 0000000..53c5aba --- /dev/null +++ b/bindings/corba/swordorb.idl @@ -0,0 +1,92 @@ +/****************************************************************************** + * sword.idl - This file contains a simple idl for accessing sword + */ + +#ifndef SWORDORB_IDL +#define SWORDORB_IDL + +module swordorb { + +typedef sequence StringList; + +struct ModInfo { + string name; + string description; + string category; + string language; +}; + +typedef sequence ModInfoList; + +struct SearchHit { + string modName; + string key; + long score; +}; + +typedef sequence SearchHitList; +//----------------------------------------------------------------- +// SWModule methods + + enum SearchType { + REGEX, + PHRASE, + MULTIWORD, + ENTRYATTR, + LUCENE + }; + + +interface SWModule { + void terminateSearch(); + SearchHitList search(in string istr, in SearchType searchType, in long flags, in string scope); + char error(); + long getEntrySize(); + StringList getEntryAttribute(in string level1, in string level2, in string level3, in boolean filtered); + StringList parseKeyList(in string keyText); + void setKeyText(in string key); + string getKeyText(); + boolean hasKeyChildren(); + StringList getKeyChildren(); + string getKeyParent(); + string getName(); + string getDescription(); + string getCategory(); + void previous(); + void next(); + void begin(); + string getStripText(); + string getRenderText(); + string getRawEntry(); + void setRawEntry(in string entryBuffer); + string getConfigEntry(in string key); + void deleteSearchFramework(); + boolean hasSearchFramework(); +}; + + +//----------------------------------------------------------------- +// SWMgr methods +// +interface SWMgr { + ModInfoList getModInfoList(); + SWModule getModuleByName(in string name); + string getPrefixPath(); + string getConfigPath(); + void setGlobalOption(in string option, in string value); + string getGlobalOption(in string option); + string getGlobalOptionTip(in string option); + string filterText(in string filterName, in string text); + StringList getGlobalOptions(); + StringList getGlobalOptionValues(in string option); + void setCipherKey(in string modName, in string key); + void terminate(); + boolean testConnection(); + void setJavascript(in boolean val); + StringList getAvailableLocales(); + void setDefaultLocale(in string name); +}; + +}; + +#endif diff --git a/bindings/flatapi.cpp b/bindings/flatapi.cpp new file mode 100644 index 0000000..728f863 --- /dev/null +++ b/bindings/flatapi.cpp @@ -0,0 +1,379 @@ +/****************************************************************************** + * swordapi.cpp - This file contains an api usable by non-C++ + * environments + * + * $Id: flatapi.cpp 1685 2004-12-22 07:05:49Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif +extern "C" { +#include "flatapi.h" +} + +typedef struct { + ModMap::iterator it; +// void *it; + ModMap::iterator end; +// void *end; +} ModItType; + + +//----------------------------------------------------------------- +// SWMgr methods +// +extern "C" SWHANDLE SWMgr_new(char filterType) { + return (SWHANDLE) new SWMgr(new MarkupFilterMgr(filterType)); +} + + +// SWConfig *, SWConfig *, bool, SWFilterMgr * +SWHANDLE SWMgr_newEx(SWHANDLE hiconfig, SWHANDLE hisysconfig, char autoload, SWHANDLE hfilterMgr) { + SWConfig *iconfig = (SWConfig *)hiconfig; + SWConfig *isysconfig = (SWConfig *)hisysconfig; + SWFilterMgr *filterMgr = (SWFilterMgr *)hfilterMgr; + + return (SWHANDLE) new SWMgr(iconfig, isysconfig, autoload, filterMgr); +} + + +void SWMgr_delete(SWHANDLE hmgr) { + SWMgr *mgr = (SWMgr *)hmgr; + if (mgr) + delete mgr; +} + + +SWHANDLE SWMgr_getConfig(SWHANDLE hmgr) { + SWMgr *mgr = (SWMgr *)hmgr; + return (mgr) ? (SWHANDLE)mgr->config : 0; +} + + +SWHANDLE SWMgr_getModulesIterator(SWHANDLE hmgr) { + static ModItType it; + + SWMgr *mgr = (SWMgr *)hmgr; + if (mgr) { + it.it = mgr->Modules.begin(); + it.end = mgr->Modules.end(); + } + return (SWHANDLE)⁢ +} + + +SWHANDLE SWMgr_getModuleByName(SWHANDLE hmgr, const char *name) { + SWMgr *mgr = (SWMgr *)hmgr; + return (mgr) ? (SWHANDLE) mgr->Modules[name] : 0; +} + + +const char *SWMgr_getPrefixPath(SWHANDLE hmgr) { + SWMgr *mgr = (SWMgr *)hmgr; + return (mgr) ? mgr->prefixPath : 0; +} + + +const char *SWMgr_getConfigPath(SWHANDLE hmgr) { + SWMgr *mgr = (SWMgr *)hmgr; + return (mgr) ? mgr->configPath : 0; +} + + +void SWMgr_setGlobalOption(SWHANDLE hmgr, const char *option, const char *value) { + SWMgr *mgr = (SWMgr *)hmgr; + if (mgr) + mgr->setGlobalOption(option, value); +} + + +const char *SWMgr_getGlobalOption(SWHANDLE hmgr, const char *option) { + SWMgr *mgr = (SWMgr *)hmgr; + return (mgr) ? (const char *)mgr->getGlobalOption(option) : 0; +} + + +const char *SWMgr_getGlobalOptionTip(SWHANDLE hmgr, const char *option) { + SWMgr *mgr = (SWMgr *)hmgr; + return (mgr) ? (const char *)mgr->getGlobalOptionTip(option) : 0; +} + + +// ret: forward_iterator +SWHANDLE SWMgr_getGlobalOptionsIterator(SWHANDLE hmgr) { + SWMgr *mgr = (SWMgr *)hmgr; + static StringList::iterator it; + static StringList optionslist; + if (mgr) { + optionslist = mgr->getGlobalOptions(); + it = optionslist.begin(); + } + return (SWHANDLE)⁢ +} + + +// ret: forward_iterator +SWHANDLE SWMgr_getGlobalOptionValuesIterator(SWHANDLE hmgr, const char *option) { + SWMgr *mgr = (SWMgr *)hmgr; + static StringList::iterator it; + + if (mgr) + it = mgr->getGlobalOptionValues(option).begin(); + return (SWHANDLE)⁢ +} + + +void SWMgr_setCipherKey(SWHANDLE hmgr, const char *modName, const char *key) { + SWMgr *mgr = (SWMgr *)hmgr; + if (mgr) + mgr->setCipherKey(modName, key); +} + + +//----------------------------------------------------------------- +// SWModule methods + +// static void nullPercent (char percent, void *userData); +void SWModule_terminateSearch(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + if (module) + module->terminateSearch = true; +} + +// SWModule (const const char *imodname = 0, const const char *imoddesc = 0, SWDisplay * idisp = 0, const char *imodtype = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* modlang = 0); +// virtual ~ SWModule (); + +SWHANDLE SWModule_doSearch(SWHANDLE hmodule, const char *searchString, int type, int params ,void (*percent) (char, void *), void *percentUserData) { + + static ListKey results; + SWKey * scope = 0; + SWModule *module = (SWModule *)hmodule; + if (!module) + return -1; + + results.ClearList(); + results = module->Search(searchString, type, params, scope, 0, percent, (void *) &percentUserData); + + return (SWHANDLE)&results; +} + /** Gets and clears error status + * + * @return error status + */ +char SWModule_error(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + return (module) ? module->Error() : 0; +} + + +int SWModule_getEntrySize(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + return (module) ? module->getEntrySize() : 0; +} + + +void SWModule_setKeyText(SWHANDLE hmodule, const char *key) { + SWModule *module = (SWModule *)hmodule; + if (module) + module->setKey(key); +} + +// virtual char setKey (const SWKey &ikey); +// virtual SWKey & Key () const { + +const char *SWModule_getKeyText(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + return (const char *)((module) ? module->KeyText() : 0); +} + + +// virtual char Display (); +// virtual SWDisplay *Disp (SWDisplay * idisp = 0); + +const char *SWModule_getName(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + return (const char *)((module) ? module->Name() : 0); +} + + +const char *SWModule_getDescription(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + return (const char *)((module) ? module->Description() : 0); +} + + +const char *SWModule_getType(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + return (const char *)((module) ? module->Type() : 0); +} + + +void SWModule_previous(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + if (module) + (*module)--; +} + + +void SWModule_next(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + if (module) + (*module)++; +} + + +void SWModule_begin(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + if (module) + (*module) = TOP; +} + + +const char *SWModule_getStripText(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + return (const char *)((module) ? module->StripText() : 0); +} + + +const char *SWModule_getRenderText(SWHANDLE hmodule) { + SWModule *module = (SWModule *)hmodule; + return (const char *)((module) ? module->RenderText() : 0); +} + +const char *SWModule_getEntryAttributes(SWHANDLE hmodule, const char *level1, const char *level2, const char *level3) { + SWModule *module = (SWModule *)hmodule; + static SWBuf retval; + module->RenderText(); + retval = module->getEntryAttributes()[level1][level2][level3].c_str(); + return (retval.length()) ? (const char*)retval.c_str() : NULL; +} + +const char *SWModule_getPreverseHeader(SWHANDLE hmodule, const char *key, int pvHeading) { + SWModule *module = (SWModule *)hmodule; + static SWBuf preverseHeading; + char buf[12]; + sprintf(buf, "%i", pvHeading); + module->SetKey(key); + module->RenderText(); + preverseHeading = module->getEntryAttributes()["Heading"]["Preverse"][buf].c_str(); + return (preverseHeading.length()) ? (const char*)preverseHeading.c_str() : NULL; +} + +const char *SWModule_getFootnoteType(SWHANDLE hmodule, const char *key, const char *note) { + SWModule *module = (SWModule *)hmodule; + static SWBuf type; + module->Error(); + module->SetKey(key); + module->RenderText(); + type = module->getEntryAttributes()["Footnote"][note]["type"].c_str(); + return (type) ? (const char*)type.c_str() : NULL; +} + +const char *SWModule_getFootnoteBody(SWHANDLE hmodule, const char *key, const char *note) { + SWModule *module = (SWModule *)hmodule; + static SWBuf body; + module->Error(); + module->setKey(key); + module->RenderText(); + body = module->getEntryAttributes()["Footnote"][note]["body"].c_str(); + SWKey *keybuf = module->getKey();; + module->renderFilter(body, keybuf); + return (body) ? (const char*)body.c_str() : NULL; +} + +const char *SWModule_getFootnoteRefList(SWHANDLE hmodule, const char *key, const char *note) { + SWModule *module = (SWModule *)hmodule; + static SWBuf refList; + module->Error(); + module->SetKey(key); + module->RenderText(); + refList = module->getEntryAttributes()["Footnote"][note]["refList"].c_str(); + return (refList) ? (const char*)refList.c_str() : NULL; +} + + + +SWHANDLE listkey_getVerselistIterator(const char * list, const char * key) { + VerseKey versekey; + static ListKey verses; + + versekey.setText(key); + verses.ClearList(); + verses = versekey.ParseVerseList(list, versekey); + return (SWHANDLE)&verses; +} + +//----------------------------------------------------------------- +// stringlist_iterator methods + +void stringlist_iterator_next(SWHANDLE hsli) { + StringList::iterator *sli = (StringList::iterator *)hsli; + (*sli)++; +} + + +const char *stringlist_iterator_val(SWHANDLE hsli) { + StringList::iterator *sli = (StringList::iterator *)hsli; + return (const char *)(*sli)->c_str(); +} + + + +//----------------------------------------------------------------- +// listkey_iterator methods + +void listkey_iterator_next(SWHANDLE lki) { + ListKey *lk = (ListKey*)lki; + (*lk)++; +} + + +const char *listkey_iterator_val(SWHANDLE lki) { + ListKey *lk = (ListKey*)lki; + if(!lk->Error()) + return (const char *) lk->getText(); + return NULL; +} + + + +//----------------------------------------------------------------- +// modmap methods + +void ModList_iterator_next(SWHANDLE hmmi) { + ModItType *it = (ModItType *)hmmi; + if (it->it != it->end) + it->it++; +} + + +SWHANDLE ModList_iterator_val(SWHANDLE hmmi) { + ModItType *it = (ModItType *)hmmi; + return (it->it != it->end) ? (SWHANDLE)it->it->second : 0; +} diff --git a/bindings/gsoap/Makefile b/bindings/gsoap/Makefile new file mode 100644 index 0000000..639634a --- /dev/null +++ b/bindings/gsoap/Makefile @@ -0,0 +1,12 @@ +all: gsoapsword testclient + +gsoapsword: gsoapsword.h gsoapsword.cpp stdsoap.o + ./soapcpp gsoapsword.h + g++ -g -ggdb -I/usr/include/sword -I./include -o gsoapsword gsoapsword.cpp yoyo.cpp stdsoap.o soapC.cpp soapServer.cpp -lsword -lz + +testclient: gsoapsword.h testclient.cpp stdsoap.o + ./soapcpp gsoapsword.h + g++ -I./include -o testclient testclient.cpp stdsoap.o soapC.cpp soapClient.cpp + +clean: + rm gsoapsword testclient soapC.cpp soapServer.cpp soapClient.cpp soapH.h soapStub.h sword.xsd sword.nsmap sword.wsdl diff --git a/bindings/gsoap/Makefile.am b/bindings/gsoap/Makefile.am new file mode 100644 index 0000000..0d05ed6 --- /dev/null +++ b/bindings/gsoap/Makefile.am @@ -0,0 +1,8 @@ +swgsoapdir = $(top_srcdir)/bindings/gsoap + +EXTRA_DIST += $(swgsoapdir)/gsoapsword.cpp +EXTRA_DIST += $(swgsoapdir)/gsoapsword.h +EXTRA_DIST += $(swgsoapdir)/include/stdsoap.h +EXTRA_DIST += $(swgsoapdir)/testclient.cpp +EXTRA_DIST += $(swgsoapdir)/Makefile.am + diff --git a/bindings/gsoap/gsoapsword.cpp b/bindings/gsoap/gsoapsword.cpp new file mode 100644 index 0000000..cb3a58d --- /dev/null +++ b/bindings/gsoap/gsoapsword.cpp @@ -0,0 +1,142 @@ +#include "soapH.h" +#include +#include +#include + + +SWMgr *mgr; + +int sword__ModList_iterator_next(xsd__int hmmi, xsd__int &noop) { + ModList_iterator_next(hmmi); + return SOAP_OK; +} + +int sword__ModList_iterator_val(xsd__int hmmi, xsd__int &hmodule) { + hmodule = ModList_iterator_val(hmmi); + return SOAP_OK; +} + +int sword__SWMgr_new(xsd__int &retVal) { + retVal = SWMgr_new(); + return SOAP_OK; +} + +int sword__SWMgr_delete(xsd__int hmgr, xsd__int &noop) { + SWMgr_delete(hmgr); + return SOAP_OK; +} + +int sword__SWMgr_getModulesIterator(xsd__int hmgr, xsd__int &hmodIterator) { + hmodIterator = SWMgr_getModulesIterator(hmgr); + return SOAP_OK; +} + +int sword__SWMgr_getModuleByName(xsd__int hmgr, xsd__string name, xsd__int &hmodule) { + hmodule = SWMgr_getModuleByName(hmodule, name); + return SOAP_OK; +} + + + +int sword__SWModule_getName(xsd__int hmodule, xsd__string &name) { + name = (char *)SWModule_getName(hmodule); + return SOAP_OK; +} + +int sword__SWModule_getDescription(xsd__int hmodule, xsd__string &description) { + description = (char *)SWModule_getDescription(hmodule); + return SOAP_OK; +} + + +int sword__Quick_getModuleRawEntry(xsd__string modName, xsd__string modKey, xsd__string &modText) { + SWModule *mod = mgr->Modules[modName]; + if (mod) { + mod->setKey(modKey); + modText = mod->getRawEntry(); + } + return SOAP_OK; +} + + +int sword__Quick_setModuleRawEntry(xsd__string modName, xsd__string modKey, xsd__string modText, xsd__int &noop) { + SWModule *mod = mgr->Modules[modName]; + if (mod) { + mod->setKey(modKey); + (*mod) << modText; + } + return SOAP_OK; +} + + +int sword__Quick_getModuleRenderText(xsd__string modName, xsd__string modKey, xsd__string &modText) { + SWModule *mod = mgr->Modules[modName]; + if (mod) { + mod->setKey(modKey); + modText = (char *)mod->RenderText(); + } + return SOAP_OK; +} + + +int sword__Quick_getJScriptAttribArray(xsd__string modName, xsd__string modKey, xsd__string &arrayText) { + SWModule *mod = mgr->Modules[modName]; + if (mod) { + mod->setKey(modKey); + AttributeTypeList::iterator i1; + AttributeList::iterator i2; + AttributeValue::iterator i3; + int l1, l2, l3; + char lbuf1[20], lbuf2[20], lbuf3[20]; + static string retVal = ""; + retVal = "var entryAttribs = new Array();\n"; + string l1keys = "entryAttribs[0] = new Array("; + for (l1=0,i1 = target->getEntryAttributes().begin(); i1 != target->getEntryAttributes().end(); i1++,l1++) { + sprintf(lbuf1, "%d", l1+1); + retVal += "entryAttribs["+lbuf1+"] = new Array();\n"; + string l2keys = "entryAttribs["+lbuf1+"][0] = new Array("; + cout << "[ " << i1->first << " ]\n"; + for (l2=0,i2 = i1->second.begin(); i2 != i1->second.end(); i2++,l2++) { + sprintf(lbuf2, "%d", l2+1); + retVal += "entryAttribs["+lbuf1+"]["+lbuf2+"][0] = new Array();\n"; + string l3keys = "entryAttribs["+lbuf1+"]["+lbuf2+"][0] = new Array("; + cout << "\t[ " << i2->first << " ]\n"; + for (l3=0,i3 = i2->second.begin(); i3 != i2->second.end(); i3++,l3++) { + cout << "\t\t" << i3->first << " = " << i3->second << "\n"; + } + } + } + } + return SOAP_OK; +} + + + + +main() { + + + int m, s; + mgr = new SWMgr(new MarkupFilterMgr()); + m = soap_bind("localhost", 18083, 100); + if (m < 0) { + soap_print_fault(stderr); + exit(-1); + } + fprintf(stderr, "Socket connection successful: master socket = %d\n", m); + for (int i = 1; ; i++) { + s = soap_accept(); + if (s < 0) { + soap_print_fault(stderr); + exit(-1); + } + fprintf(stderr, "%d: accepted connection from IP = %d.%d.%d.%d socket = %d", i, (soap_ip<<24)&0xFF, (soap_ip<<16)&0xFF, (soap_ip<<8)&0xFF, soap_ip&0xFF, s); + soap_serve(); // process RPC skeletons + fprintf(stderr, "request served\n"); + soap_end(); // clean up everything and close socket + } + delete mgr; +} + +#include "sword.nsmap" + diff --git a/bindings/gsoap/gsoapsword.h b/bindings/gsoap/gsoapsword.h new file mode 100644 index 0000000..1a712a5 --- /dev/null +++ b/bindings/gsoap/gsoapsword.h @@ -0,0 +1,65 @@ +#ifndef GSOAPAPI_H +#define GSOAPAPI_H + +typedef long xsd__int; +typedef char * xsd__string; + +//----------------------------------------------------------------- +// stringlist_iterator methods + +//int sword__stringlist_iterator_next(xsd__int hsli char **); +//int sword__stringlist_iterator_val(xsd__int hsli, char **); + + +//----------------------------------------------------------------- +// modmap methods +// +int sword__ModList_iterator_next(xsd__int hmmi, xsd__int &noop); +int sword__ModList_iterator_val(xsd__int hmmi, xsd__int &hmodule); + + +//----------------------------------------------------------------- +// SWMgr methods +// +int sword__SWMgr_new(xsd__int &retVal); +// SWConfig *, SWConfig *, bool, SWFilterMgr * +//xsd__int sword__SWMgr_newEx(xsd__int hiconfig, xsd__int hisysconfig, char autoload, xsd__int hfilterMgr); +int sword__SWMgr_delete(xsd__int hmgr, xsd__int &noop); +//xsd__int sword__SWMgr_getConfig(xsd__int hmgr); +int sword__SWMgr_getModulesIterator(xsd__int hmgr, xsd__int &hmodIterator); +int sword__SWMgr_getModuleByName(xsd__int hmgr, xsd__string name, xsd__int &hmodule); +//char * sword__SWMgr_getPrefixPath(xsd__int hmgr); +//char * sword__SWMgr_getConfigPath(xsd__int hmgr); +//void sword__SWMgr_setGlobalOption(xsd__int hmgr, char *option, char *value); +//char * sword__SWMgr_getGlobalOption(xsd__int hmgr, char *option); +//char * sword__SWMgr_getGlobalOptionTip(xsd__int hmgr, char *option); +// ret: forward_iterator +//xsd__int sword__SWMgr_getGlobalOptionsIterator(xsd__int hmgr); +// ret: forward_iterator +//xsd__int sword__SWMgr_getGlobalOptionValuesIterator(xsd__int hmgr, char *option); +//void sword__SWMgr_setCipherKey(xsd__int hmgr, char *modName, char *key); + + +//----------------------------------------------------------------- +// SWModule methods + +//void sword__SWModule_terminateSearch(xsd__int hmodule); +//char sword__SWModule_error(xsd__int hmodule); +//int sword__SWModule_getEntrySize(xsd__int hmodule); +//void sword__SWModule_setKeyText(xsd__int hmodule, char *key); +//char *sword__SWModule_getKeyText(xsd__int hmodule); +int sword__SWModule_getName(xsd__int hmodule, xsd__string &name); +int sword__SWModule_getDescription(xsd__int hmodule, xsd__string &description); +//char *sword__SWModule_getType(xsd__int hmodule); +//void sword__SWModule_previous(xsd__int hmodule); +//void sword__SWModule_next(xsd__int hmodule); +//void sword__SWModule_begin(xsd__int hmodule); +//char *sword__SWModule_getStripText(xsd__int hmodule); +//char *sword__SWModule_getRenderText(xsd__int hmodule); + + +int sword__Quick_getModuleRawEntry(xsd__string modName, xsd__string modKey, xsd__string &modText); +int sword__Quick_setModuleRawEntry(xsd__string modName, xsd__string modKey, xsd__string modText, xsd__int &noop); +int sword__Quick_getModuleRenderText(xsd__string modName, xsd__string modKey, xsd__string &modText); +int sword__Quick_getJScriptAttribArray(xsd__string modName, xsd__string modKey, xsd__string &arrayText); +#endif diff --git a/bindings/gsoap/include/stdsoap.h b/bindings/gsoap/include/stdsoap.h new file mode 100644 index 0000000..462483a --- /dev/null +++ b/bindings/gsoap/include/stdsoap.h @@ -0,0 +1,493 @@ +/* stdsoap.h + + Copyright (C) 2001 Robert A. van Engelen, Florida State University. + All rights reserved. +*/ + +#include +#include +#include +#include +#include +#include +#include +#ifndef WIN32 +#include /* for TCP_NODELAY */ +#include +#endif + +#ifdef WITH_OPENSSL +#include +#include +#ifndef ALLOW_OLD_VERSIONS +#if (OPENSSL_VERSION_NUMBER < 0x00905100L) +#error "Must use OpenSSL 0.9.6 or later" +#endif +#endif +#endif + +#include /* for isnan(): remove if NAN and INF support is not required */ +#include /* for time_t (xsd:dateTime) support, remove if not required */ + +#ifndef _MATH_H +#define isnan(_) (0) +#else +extern struct soap_double_nan { int n1, n2; } soap_double_nan; +#endif + +#ifndef STDSOAP +#define STDSOAP + +#ifndef WIN32 +#define LONG64 long long +#define ULONG64 unsigned long long +#endif + +/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ + +#define SOAP_BUFLEN 8192 /* buffer length for socket packets */ +#define SOAP_MAXLEN 256 /* maximum length of buffer to hold XML number representations */ +#define SOAP_PTRHASH 1024 /* size of pointer analysis hash table (must be power of 2) */ +#define SOAP_IDHASH 16 /* size of hash table for element id's */ +#define SOAP_BLKLEN 256 /* size of blocks to collect long strings */ +#define SOAP_TAGLEN 256 /* maximum length of XML tag/element names + 1 */ + +typedef long wchar; /* for compatibility */ + +#ifndef FLT_NAN +#ifdef _MATH_H +#define FLT_NAN (*(float*)&soap_double_nan) +#else +#define FLT_NAN (0.0) +#endif +#endif +#ifndef FLT_PINFTY +#ifdef HUGE_VAL +#define FLT_PINFTY (float)HUGE_VAL +#else +#ifdef FLT_MAX +#define FLT_PINFTY FLT_MAX +#else +#ifdef FLOAT_MAX +#define FLT_PINFTY FLOAT_MAX +#else +#define FLT_PINFTY (3.40282347e+38) +#endif +#endif +#endif +#endif +#ifndef FLT_NINFTY +#define FLT_NINFTY (-FLT_PINFTY) +#endif + +#ifndef DBL_NAN +#ifdef _MATH_H +#define DBL_NAN (*(double*)&soap_double_nan) +#else +#define DBL_NAN (0.0) +#endif +#endif +#ifndef DBL_PINFTY +#ifdef HUGE_VAL +#define DBL_PINFTY (double)HUGE_VAL +#else +#ifdef DBL_MAX +#define DBL_PINFTY DBL_MAX +#else +#ifdef DOUBLE_MAX +#define DBL_PINFTY DOUBLE_MAX +#else +#define DBL_PINFTY (1.7976931348623157e+308) +#endif +#endif +#endif +#endif +#ifndef DBL_NINFTY +#define DBL_NINFTY (-DBL_PINFTY) +#endif + +extern int (*soap_fpost)(const char*, const char*, const char*, const char*, size_t); +extern int (*soap_fresponse)(int, size_t); +extern int (*soap_fparse)(); +extern int (*soap_fopen)(const char*, const char*, int); +extern int (*soap_fclose)(); +extern int (*soap_fsend)(const char*, size_t); +extern size_t (*soap_frecv)(char*, size_t); +extern int (*soap_fignore)(const char*); + +extern const char *soap_float_format; /* points to user-definable format string */ +extern const char *soap_double_format; /* points to user-definable format string */ + +extern const char *soap_http_version; /* default = "1.0" */ +extern const char *soap_encodingStyle; /* default = NULL which means that SOAP encoding is used for marshalling */ +extern const char *soap_defaultNamespace; /* default = NULL which means that no default namespace is used */ +extern int soap_disable_href; /* when !=0, disables hrefs so objects are duplicated on the output */ +extern int soap_enable_embedding; /* when !=0, enable hrefs within embedded elements */ +extern int soap_enable_null; /* when !=0, always sends null elements */ +extern int soap_enable_utf_string; /* when !=0, assume strings are UTF8/16 encoded and just emit them */ +extern int soap_disable_request_count; /* when !=0, do not include HTTP Content-Length in request */ +extern int soap_disable_response_count; /* when !=0, do not include HTTP Content-Length in service response (normally calculated by the Web server in case CGI is used so disabling saves time) */ +extern int soap_enable_array_overflow; /* when !=0, allows ignoring remaining elements that do not fit in a fixed-size array */ +extern int soap_keep_alive; /* when !=0, set SO_KEEPALIVE socket and do not close sockets, unless new host/port is accessed */ + +extern const char *soap_proxy_host; +extern int soap_proxy_port; + +#ifdef WITH_OPENSSL +extern SSL_CTX *soap_ssl_ctx; +extern BIO *soap_bio; +extern SSL *soap_ssl; +extern int soap_require_server_auth; +extern const char *soap_keyfile; +extern const char *soap_password; +extern const char *soap_dhfile; +extern const char *soap_cafile; +#endif + +#ifdef WIN32 +#include +#include +#else +#include +#include +#include +#include +#define closesocket(n) close(n) +#endif + +int soap_serve(); + +extern void soap_serializeheader(); +extern void soap_putheader(); +extern int soap_getheader(); +extern void soap_serializefault(); +extern void soap_putfault(); +extern int soap_getfault(); +extern void soap_putindependent(); +extern int soap_getindependent(); + +int soap_bind(const char *hostname, int port, int backlog); +int soap_accept(); +int soap_ssl_accept(); + +struct Namespace {const char *id, *ns, *in;}; +extern struct Namespace namespaces[]; + +static FILE * fdebug; + +struct soap_entry +{ int id; + void *entry; + int type; + short marked1; + short marked2; + struct soap_entry *next; +}; + +extern char soap_tag[SOAP_TAGLEN]; /* used by soap_element_begin_in */ +extern char soap_id[SOAP_TAGLEN]; /* set by soap_element_begin_in */ +extern char soap_href[SOAP_TAGLEN]; /* set by soap_element_begin_in */ +extern char soap_type[SOAP_TAGLEN]; +extern char soap_arrayType[SOAP_TAGLEN]; +extern char soap_arraySize[SOAP_TAGLEN]; +extern char soap_xmlns_name[SOAP_TAGLEN]; +extern char soap_xmlns_value[SOAP_TAGLEN]; +extern char soap_offset[SOAP_TAGLEN]; /* ditto */ +extern int soap_position; /* ditto */ +extern int soap_positions[32]; /* ditto */ +extern int soap_null; /* ditto */ +extern int soap_counting; +extern int soap_level; +extern int soap_is_in_header; + +/* Defining the std soap error codes */ + +#define SOAP_OK 0 +#define SOAP_CLI_FAULT 1 +#define SOAP_SVR_FAULT 2 +#define SOAP_TAG_MISMATCH 3 +#define SOAP_TYPE_MISMATCH 4 +#define SOAP_SYNTAX_ERROR 5 +#define SOAP_NO_TAG 6 +#define SOAP_IOB 7 +#define SOAP_MUSTUNDERSTAND 8 +#define SOAP_NAMESPACE 9 +#define SOAP_OBJ_MISMATCH 10 +#define SOAP_FATAL_ERROR 11 +#define SOAP_FAULT 12 +#define SOAP_NO_METHOD 13 +#define SOAP_EOM 14 +#define SOAP_NULL 15 +#define SOAP_MULTI_ID 16 +#define SOAP_MISSING_ID 17 +#define SOAP_HREF 18 +#define SOAP_TCP_ERROR 19 +#define SOAP_HTTP_ERROR 20 +#define SOAP_SSL_ERROR 21 +#define SOAP_EOF EOF + +extern int soap_error ; + +/* DEBUG macros */ + +#ifdef DEBUG +#define DBGLOG(DBGFILE, DBGCMD) \ +{\ + fdebug = fopen(#DBGFILE".log", "a");\ + DBGCMD;\ + fclose(fdebug);\ +} +#else +#define DBGLOG(DBGFILE, DBGCMD) +#endif + +struct soap_class +{ void *ptr; + int type; + int size; + struct soap_class *next; +}; + +extern struct soap_class *soap_class_chain; + +struct soap_stack +{ struct soap_stack *next; + char *id; + int i; + int level; +}; + +/* Hash table (temporarily replaced by array indexing) */ + +extern struct soap_entry *soap_ptr[SOAP_PTRHASH]; + +/*int sock;*/ +extern int soap_socket; +extern int soap_recvfd; +extern int soap_sendfd; +extern int soap_buffering; +extern unsigned long soap_ip; /* IP address of connecting party after soap_accept() */ + +/* send routine */ +int soap_send(const char *buf); + +int soap_send_hex(int); +int soap_send_base64(const unsigned char *, size_t); + +int soap_gethex(); +unsigned char *soap_getbase64(int *, int); + +extern int errmode ; + +int soap_pointer_lookup(const void *p, int t,struct soap_entry **np1); +int soap_array_pointer_lookup(const void *p, int n, int t, struct soap_entry **np1); +int soap_pointer_lookup_id(void *p, int t,struct soap_entry **np1); +int soap_pointer_enter(const void *p, int t,struct soap_entry **np1); +int soap_array_pointer_enter(const void *p, int t, struct soap_entry **np1); +void soap_pointer_dump(); +void soap_begin_count(); +void soap_begin_send(); +int soap_end_send(); + +void soap_embedded(const void *p, int t); +int soap_reference(const void *p, int t); +int soap_array_reference(const void *p, int n, int t); +int soap_embedded_id(int id, const void *p, int t); +int soap_is_embedded(struct soap_entry *); +int soap_is_single(struct soap_entry *); +int soap_is_multi(struct soap_entry *); +void soap_set_embedded(struct soap_entry *); + +int soap_begin_recv(); +int soap_end_recv(); +int soap_getline(char *, int); + +void soap_send_namespaces(); + +#ifdef WIN32 +#define atoll atoi +#else +extern void itoa(int, char*); +#endif + +/* The hash table to hold IDs needs entries of the form: */ +struct soap_hash_entry +{ int type; + size_t size; + void *link; + void *copy; + void *ptr; + int level; + struct soap_hash_entry *next; + char s[4]; +}; + +extern struct soap_hash_entry *soap_hash[SOAP_IDHASH]; + +extern int soap_alloced ; /* keep this info so we know that object must be init'ed */ +extern void *soap_malloc_chain ; + +void * soap_malloc(size_t n); +void soap_dealloc(void *p); + +int soap_lookup_type(const char *id); + +void * soap_id_lookup(const char *id, void **p, int t, size_t n, int k); + +void * soap_id_forward(const char *id, void *p, int t, size_t n); + +void * soap_id_enter(const char *id, void *p, int t, size_t n, int k); +void * soap_class_id_enter(const char *id, void *p, int t, const char *type); + +extern int soap_size(const int *, int); +extern int soap_getoffsets(const char *, const int *, int *, int); +extern int soap_getsize(const char *, const char *, int *); +extern int soap_getsizes(const char *, int *, int); +extern int soap_getposition(const char *, int *); +extern char * soap_putsize(const char *, int); +extern char * soap_putsizesoffsets(const char *, const int *, const int *, int); +extern char * soap_putsizes(const char *, const int *, int); +extern char * soap_putoffset(int); +extern char * soap_putoffsets(const int *, int); +extern char * soap_putposition(); + +extern int soap_peeked ; +extern int soap_body; + +/* Support routines (library) */ +int soap_ignore_element(); + +int soap_closesock(); + +void soap_init(); +void soap_begin(); + +int soap_match_tag(const char*, const char *); + +int soap_match_array(const char*); + +void soap_end(); +void soap_free(); +void soap_destroy(); + +void soap_element_begin_out(const char *tag, int id, const char *type); +void soap_array_begin_out(const char *tag, int id, const char *type, const char *offset); + +void soap_element_end_out(const char *tag); + +void soap_element_ref(const char *tag, int id, int href); + +void soap_element_null(const char *tag, int id, const char *type); + +int soap_element_begin_in(const char *tag); + +int soap_element_end_in(const char *tag); + +int soap_peek_element(); +void soap_revert(); + +int soap_ignore_element(); + +void soap_convert_string_out(const char *s); + +int soap_match_namespace(const char*, const char*, int, int); + +void soap_pop_namespace(); +int soap_push_namespace(const char *,const char *); + +extern int soap_block_size; +extern int soap_new_block(); +extern void *soap_push_block(size_t); +extern void soap_pop_block(); +extern void soap_store_block(char *); + +void *soap_instantiate(int t, const char *); +void soap_delete(void *, int, int); + +void soap_outint(const char *tag, int id, const int *p, const char *, int); +int * soap_inint(const char *tag, int *p, const char *, int); + +void soap_outbyte(const char *tag, int id, const char *p, const char *, int); +char * soap_inbyte(const char *tag, char *p, const char *, int); + +void soap_outlong(const char *tag, int id, const long *p, const char *, int); +long * soap_inlong(const char *tag, long *p, const char *, int); + +void soap_outLONG64(const char *tag, int id, const LONG64 *p, const char *, int); +LONG64 * soap_inLONG64(const char *tag, LONG64 *p, const char *, int); + +void soap_outshort(const char *tag, int id, const short *p, const char *, int); +short * soap_inshort(const char *tag, short *p, const char *, int); + +void soap_outfloat(const char *tag, int id, const float *p, const char *, int); +float * soap_infloat(const char *tag, float *p, const char *, int); + +void soap_outdouble(const char *tag, int id, const double *p, const char *, int); +double * soap_indouble(const char *tag, double *p, const char *, int); + +void soap_outunsignedByte(const char *tag, int id, const unsigned char *p, const char *, int); +unsigned char * soap_inunsignedByte(const char *tag, unsigned char *p, const char *, int); + +void soap_outunsignedShort(const char *tag, int id, const unsigned short *p, const char *, int); +unsigned short * soap_inunsignedShort(const char *tag, unsigned short *p, const char *, int); + +void soap_outunsignedInt(const char *tag, int id, const unsigned int *p, const char *, int); +unsigned int * soap_inunsignedInt(const char *tag, unsigned int *p, const char *, int); + +void soap_outunsignedLong(const char *tag, int id, const unsigned long *p, const char *, int); +unsigned long * soap_inunsignedLong(const char *tag, unsigned long *p, const char *, int); + +void soap_outunsignedLONG64(const char *tag, int id, const ULONG64 *p, const char *, int); +ULONG64 * soap_inunsignedLONG64(const char *tag, ULONG64 *p, const char *, int); + +void soap_outstring(const char *tag, int id, char *const*p, const char *, int); +char ** soap_instring(const char *tag, char **p, const char *, int); + +void soap_outwstring(const char *tag, int id, wchar_t *const*p, const char *, int); +wchar_t **soap_inwstring(const char *tag, wchar_t **p, const char *, int); + +void soap_outliteral(const char *tag, char *const*p); +char **soap_inliteral(const char *tag, char **p); + +void soap_outwliteral(const char *tag, wchar_t *const*p); +wchar_t **soap_inwliteral(const char *tag, wchar_t **p); + +#ifdef _TIME_H +void soap_outdateTime(const char *tag, int id, const time_t *p, const char *, int); +time_t *soap_indateTime(const char *tag, time_t *p, const char *, int); +#endif + +char *soap_value(); + +wchar soap_skip(); + +/* 1. generate the prototypes and encode all types (base types are defined above) */ + +void soap_envelope_begin_out(); +void soap_envelope_end_out(); + +int soap_envelope_begin_in(); +int soap_envelope_end_in(); + +void soap_body_begin_out(); +void soap_body_end_out(); + +int soap_body_begin_in(); +int soap_body_end_in(); + +int soap_recv_header(); + +int soap_connect(const char *URL, const char *action); + +int soap_response(); + +/* Methods dealing with the fault struct*/ + +int soap_send_fault(); + +int soap_recv_fault(); + +extern void soap_print_fault(FILE*); +extern void soap_print_fault_location(FILE*); + +#endif diff --git a/bindings/gsoap/soapcpp b/bindings/gsoap/soapcpp new file mode 100755 index 0000000..462b1b5 Binary files /dev/null and b/bindings/gsoap/soapcpp differ diff --git a/bindings/gsoap/stdsoap.o b/bindings/gsoap/stdsoap.o new file mode 100644 index 0000000..2e4bae8 Binary files /dev/null and b/bindings/gsoap/stdsoap.o differ diff --git a/bindings/gsoap/testclient.cpp b/bindings/gsoap/testclient.cpp new file mode 100644 index 0000000..b0d4d94 --- /dev/null +++ b/bindings/gsoap/testclient.cpp @@ -0,0 +1,76 @@ +#include "soapH.h" +#include + +char server[] = "http://localhost:18083"; + +int main(int argc, char **argv) { + xsd__int mgr; + xsd__int noop; + + if (soap_call_sword__SWMgr_new(server, NULL, mgr)) { + soap_print_fault(stderr); + soap_print_fault_location(stderr); + exit(-1); + } + + xsd__int modIt; + if (soap_call_sword__SWMgr_getModulesIterator(server, NULL, mgr, modIt)) { + soap_print_fault(stderr); + soap_print_fault_location(stderr); + exit(-1); + } + + xsd__int module; + do { + if (soap_call_sword__ModList_iterator_val(server, NULL, modIt, module)) { + soap_print_fault(stderr); + soap_print_fault_location(stderr); + exit(-1); + } + + + if (module) { + char *name; + char *desc; + if (soap_call_sword__SWModule_getName(server, NULL, module, name)) { + soap_print_fault(stderr); + soap_print_fault_location(stderr); + exit(-1); + } + if (soap_call_sword__SWModule_getDescription(server, NULL, module, desc)) { + soap_print_fault(stderr); + soap_print_fault_location(stderr); + exit(-1); + } + + cout << "[" << name << "] " << desc << endl; + + if (soap_call_sword__ModList_iterator_next(server, NULL, modIt, noop)) { + soap_print_fault(stderr); + soap_print_fault_location(stderr); + exit(-1); + } + } + + + } while (module); + + if (soap_call_sword__SWMgr_delete(server, NULL, mgr, noop)) { + soap_print_fault(stderr); + soap_print_fault_location(stderr); + exit(-1); + } + char *text; + if (soap_call_sword__Quick_getModuleRenderText(server, NULL, "KJV", "jas1:19", text)) { + soap_print_fault(stderr); + soap_print_fault_location(stderr); + exit(-1); + } + cout << text << endl; + + printf("success: %d\n", mgr); + soap_free(); + return 0; +} + +#include "sword.nsmap" diff --git a/bindings/swig/README b/bindings/swig/README new file mode 100644 index 0000000..9b41f6d --- /dev/null +++ b/bindings/swig/README @@ -0,0 +1,33 @@ +Building the SWIG Bindings +========================== + +You may need to do the following to get this to work. From this directory: + +cd package + +# Special step for BSD-liks (e.g. Mac OS X): +# edit autogen.sh to remove the "-a" option from cp + +libtoolize --force + +./autogen.sh +./configure +make + +# Rather than make, you probably only care about one of the languages bindings. +# So you might try one of these pairs of commands instead: +# +# make perl_swig +# make perl_make +# +# make python_swig +# make python_make +# + +# Install the perl bindings +cd perl +sudo make install + +# Install the python bindings - you may need to run this with sudo +cd python +python setup.py install diff --git a/bindings/swig/bases.i b/bindings/swig/bases.i new file mode 100755 index 0000000..91b5152 --- /dev/null +++ b/bindings/swig/bases.i @@ -0,0 +1,35 @@ +%{ +#include "rawverse.h" +#include "zverse.h" +#include "rawstr.h" +#include "rawstr4.h" +#include "zstr.h" +#include "swgenbook.h" +#include "lzsscomprs.h" +#include "zipcomprs.h" +#include "versekey.h" +#include "versetreekey.h" +#include "treekey.h" +#include "rawgenbook.h" +#include "swtext.h" +#include "swcom.h" +#include "rawcom.h" +#include "swld.h" +#include "zld.h" +#include "zcom.h" +#include "ztext.h" +#include "rawld.h" +#include "rawld4.h" +#include "treekeyidx.h" +#include "rawtext.h" + + +%} + +%immutable sword::RawVerse::nl; + +%include "rawverse.h" +%include "zverse.h" +%include "rawstr.h" +%include "rawstr4.h" +%include "zstr.h" diff --git a/bindings/swig/defs.i b/bindings/swig/defs.i new file mode 100644 index 0000000..4d94cb6 --- /dev/null +++ b/bindings/swig/defs.i @@ -0,0 +1,6 @@ +%{ +#include "defs.h" +%} + +%include "defs.h" + diff --git a/bindings/swig/directors.i b/bindings/swig/directors.i new file mode 100644 index 0000000..ec5e42c --- /dev/null +++ b/bindings/swig/directors.i @@ -0,0 +1,32 @@ +/* +This is a list of all the classes which have directors enabled. + +Directors allow virtual methods of classes to be overridden in a subclass in +the target language. This may have performance implications, and is not +available for all target languages, though it should be for the main ones +*/ +%feature("director") sword::SWLog::logMessage; +%feature("director") PyStringMgr; +%feature("nodirector") PyStringMgr::upperUTF8; +%feature("nodirector") PyStringMgr::upperLatin1; + +%feature("director") RenderCallback; +%feature("director") MarkupCallback; + +%feature("director") SWSearcher; + +%feature("director") sword::StatusReporter; +%feature("director") sword::FTPTransport; +%feature("nodirector") sword::FTPTransport::getDirList; + +%feature("director:except") { + if ($error != NULL) { + throw Swig::DirectorMethodException(); + } +} + +%exception { + try { $action } + catch (Swig::DirectorException &e) { SWIG_fail; } +} + diff --git a/bindings/swig/encfiltmgr.i b/bindings/swig/encfiltmgr.i new file mode 100644 index 0000000..1e52fb8 --- /dev/null +++ b/bindings/swig/encfiltmgr.i @@ -0,0 +1,11 @@ +%{ +#include "encfiltmgr.h" +%} + +%include "encfiltmgr.h" + +%extend sword::EncodingFilterMgr { + static sword::EncodingFilterMgr *castTo(sword::SWFilterMgr *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/examples/mod2zmod.pl b/bindings/swig/examples/mod2zmod.pl new file mode 100755 index 0000000..2cc205c --- /dev/null +++ b/bindings/swig/examples/mod2zmod.pl @@ -0,0 +1,84 @@ +#!/usr/bin/perl + +# This program converts a given module into a compressed module of the same type. +# This is just an example to demomstrate the power of the Perl Sword bindings. +# The code is almost written the same way the C++ of mod2zmod.cpp code was written + +use Sword; +use strict; + +my $appname = "mod2zmod.pl"; + +sub printUsage() +{ + print "\n$appname - Convert a module into a compressed module of the same type.\n"; + print "Usage: $appname [blocktype [compresstype]]\n"; + print("datapath: the directory in which to write the zModule\n"); + print("blockType : (default 4)\n\t2 - verses\n\t3 - chapters\n\t4 - books\n"); + print("compressType: (default 1):\n\t1 - LZSS\n\t2 - Zip\n\n"); + + exit(-1); +} + +#main part of the program +if (scalar(@ARGV) < 2 || scalar(@ARGV) > 4) { + printUsage; +} + +#initialization stuff +my $datapath = $ARGV[1]; +my $blockType = defined $ARGV[2] ? $ARGV[2] : 4; +my $compressType = defined $ARGV[3] ? $ARGV[3] : 1; +my $mgr = new Sword::SWMgr(); +my $module = $mgr->module($ARGV[0]); +my $compressor = ($compressType == 1) ? new Sword::LZSSCompress() : new Sword::ZipCompress(); + +my $newmod; + +if ($module->Type() eq "Biblical Texts") { + if (!Sword::zText::createModule( $datapath, $blockType )) { + print "$appname: Couldn't create module in $datapath"; + exit(-1); + } + $newmod = new Sword::zText( $datapath, 0, 0, $blockType, $compressor ); + +} elsif ($module->Type() eq "Lexicons / Dictionaries") { + if (!Sword::zLD::createModule( $datapath )){ + print "$appname: Couldn't create module in $datapath"; + exit(-1); + } + $newmod = new Sword::zLD( $datapath, 0, 0, $blockType, $compressor) +} elsif ($module->Type() eq "Commentaries") { + if (!Sword::zCom::createModule( $datapath, $blockType )){ + print "$appname: Couldn't create module in $datapath"; + exit(-1); + } + $newmod = new Sword::zCom( $datapath, 0, 0, $blockType, $compressor) +} + +# now copy the content of the module! + +my $buffer; + +$module->top(); +$module->setSkipConsecutiveLinks(0); +do { + my $key = $module->Key(); + if (($buffer eq $module->getRawEntry()) &&($buffer ne "")) { + print "Adding [", $key->getText(), "] link to: \n"; + $newmod->writeLink($key); + } + else { + $buffer = $module->getRawEntry(); + if ($buffer ne "") { + $newmod->SetKey($key); + $newmod->write($buffer); + # print "Added ", $key->getText(), "\n"; + } + else { + print "Skipping empty ", $key->getText(), "\n"; + } + } +} while($module->next()); + +print "The new module is now available in $datapath!\n"; diff --git a/bindings/swig/extras.i b/bindings/swig/extras.i new file mode 100755 index 0000000..6422578 --- /dev/null +++ b/bindings/swig/extras.i @@ -0,0 +1,13 @@ +%{ +#include "markupcallback.h" +#include "rendercallback.h" +#include "searcher.h" +%} + +%include "markupcallback.h" +%include "rendercallback.h" +%include "searcher.h" + + + + diff --git a/bindings/swig/filemgr.i b/bindings/swig/filemgr.i new file mode 100644 index 0000000..365ff5b --- /dev/null +++ b/bindings/swig/filemgr.i @@ -0,0 +1,6 @@ +%{ +#include "filemgr.h" +%} + +%include "filemgr.h" + diff --git a/bindings/swig/ftptrans.i b/bindings/swig/ftptrans.i new file mode 100644 index 0000000..923cebc --- /dev/null +++ b/bindings/swig/ftptrans.i @@ -0,0 +1,6 @@ +%{ +#include "ftptrans.h" +%} + +%include "ftptrans.h" + diff --git a/bindings/swig/installmgr.i b/bindings/swig/installmgr.i new file mode 100644 index 0000000..2849520 --- /dev/null +++ b/bindings/swig/installmgr.i @@ -0,0 +1,8 @@ +%ignore sword::InstallSource::userData; + +%{ +#include "installmgr.h" +%} + +%include "installmgr.h" + diff --git a/bindings/swig/listkey.i b/bindings/swig/listkey.i new file mode 100644 index 0000000..3c91343 --- /dev/null +++ b/bindings/swig/listkey.i @@ -0,0 +1,21 @@ +%{ +#include "listkey.h" +%} + +%ignore sword::ListKey::operator<<; + +%include "listkey.h" + +/* +%extend { + virtual char SetToElement(int element) { + return self->SetToElement(element, TOP); + }; +} +*/ + +%extend sword::ListKey { + static sword::ListKey *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/localemgr.i b/bindings/swig/localemgr.i new file mode 100644 index 0000000..05d8a4e --- /dev/null +++ b/bindings/swig/localemgr.i @@ -0,0 +1,13 @@ +%{ +#include +%} + +%include "localemgr.h" + +%extend sword::LocaleMgr { + std::vector < sword::SWBuf > getAvailableLocalesVector() { + std::list l(self->getAvailableLocales()); + return std::vector< sword::SWBuf >(l.begin(), l.end()); + } +} + diff --git a/bindings/swig/lzsscomprs.i b/bindings/swig/lzsscomprs.i new file mode 100644 index 0000000..f2ed093 --- /dev/null +++ b/bindings/swig/lzsscomprs.i @@ -0,0 +1,11 @@ +%{ +#include +%} + +%include "lzsscomprs.h" + +%extend sword::LZSSCompress { + static sword::LZSSCompress *castTo(sword::SWCompress *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/markupcallback.h b/bindings/swig/markupcallback.h new file mode 100755 index 0000000..cef01b7 --- /dev/null +++ b/bindings/swig/markupcallback.h @@ -0,0 +1,47 @@ +#include +#include +#include +using namespace sword; + +class MarkupCallback { +public: + virtual ~MarkupCallback() { ;} + virtual bool run(SWModule* x) {return false;} +}; + + class MyMarkup : public MarkupFilterMgr + { + + private: + MarkupCallback* _callback; + + public: + + MyMarkup(MarkupCallback* callback, char markup = FMT_THML, char encoding = ENC_UTF8): MarkupFilterMgr(markup, encoding), _callback(callback) + {} + virtual ~MyMarkup() { + delCallback(); + } + void delCallback() { + delete _callback; _callback = 0; + } + void setCallback(MarkupCallback *cb) + { + delCallback(); + _callback = cb; + } + bool call(SWModule* x) { + if (_callback) + return _callback->run(x); + return false; + } + protected: + virtual void AddRenderFilters(SWModule *module, ConfigEntMap + §ion) { + if(!call(module)) { + MarkupFilterMgr::AddRenderFilters(module, section); + } + } + }; + + diff --git a/bindings/swig/markupfiltmgr.i b/bindings/swig/markupfiltmgr.i new file mode 100644 index 0000000..d675d64 --- /dev/null +++ b/bindings/swig/markupfiltmgr.i @@ -0,0 +1,13 @@ +%{ +#include +using namespace sword; +%} + +%include "markupfiltmgr.h" + + +%extend sword::MarkupFilterMgr { + static sword::MarkupFilterMgr *castTo(sword::SWFilterMgr *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/oldmake/Makefile.am b/bindings/swig/oldmake/Makefile.am new file mode 100644 index 0000000..45a37ef --- /dev/null +++ b/bindings/swig/oldmake/Makefile.am @@ -0,0 +1,95 @@ + +if RUNSWIG +PERLSWIG=perlswig +TCLSWIG=tclswig +PYTHONSWIG=pythonswig +PHPSWIG=phpswig +else +PERLSWIG= +TCLSWIG= +PYTHONSWIG= +PHPSWIG= +endif + +all: $(PERLBUILD) $(TCLBUILD) $(PYTHONBUILD) $(PHPBUILD) + echo "built" + +perl_make: perl_makebuild + cd perl && make + +perlswig: sword.i + mkdir -p perl + $(SWIG) -perl -c++ -shadow -o perl/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +perl_makebuild: $(PERLSWIG) + mkdir -p perl + echo "writing perl/Makefile.PL" + @echo "#! /usr/bin/perl" > perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "use ExtUtils::MakeMaker;" >> perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "# See lib/ExtUtils/MakeMaker.pm for details of how to influence" >> perl/Makefile.PL + @echo "# the contents of the Makefile that is written." >> perl/Makefile.PL + @echo "WriteMakefile(" >> perl/Makefile.PL + @echo " 'NAME' => 'Sword'," >> perl/Makefile.PL + @echo " 'VERSION' => '$(VERSION)'," >> perl/Makefile.PL + @echo " 'INC' => '$(SWORD_INCLUDES)'," >> perl/Makefile.PL + @echo " 'DEFINE' => '-DSWIG'," >> perl/Makefile.PL + @echo " 'LIBS' => '$(LIB_SWORD) -lz'," >> perl/Makefile.PL + @echo " 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1" >> perl/Makefile.PL + @echo " ($$] >= 5.005 ? ## Add these new keywords supported since 5.005" >> perl/Makefile.PL + @echo " (ABSTRACT => 'Sword Project perl bindings', # retrieve abstract from module" >> perl/Makefile.PL + @echo " AUTHOR => 'Sword Project ') : ())," >> perl/Makefile.PL + @echo ");" >> perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "rename 'Makefile', 'Makefile.old' or die \"can't rename Makefile\";" >> perl/Makefile.PL + @echo "open(INPUT, '> perl/Makefile.PL + @echo "open(OUTPUT, '>Makefile') or die \"can't open output Makefile\";" >> perl/Makefile.PL + @echo "while () {" >> perl/Makefile.PL + @echo " s/\-lsword/\-lsword \-lstdc\+\+/;" >> perl/Makefile.PL + @echo " print OUTPUT \"$$""_\";" >> perl/Makefile.PL + @echo "}" >> perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "close INPUT;" >> perl/Makefile.PL + @echo "close OUTPUT;" >> perl/Makefile.PL + cd perl && $(PERL) Makefile.PL && make clean + @echo "\.old" > perl/MANIFEST.SKIP + @echo "~$$" >> perl/MANIFEST.SKIP + @echo "\.bak" >> perl/MANIFEST.SKIP + @echo "^CVS" >> perl/MANIFEST.SKIP + @echo "Makefile$$" >> perl/MANIFEST.SKIP + cd perl && $(PERL) Makefile.PL && make manifest + +tclswig: sword.i + mkdir -p tcl + $(SWIG) -tcl -c++ -namespace -pkgversion $(VERSION) -o tcl/Sword.cxx -I$(top_srcdir) $(top_srcdir)/sword.i + +python_make: python_makebuild + cd python && $(PYTHON) setup.py build_ext $(SWORD_INCLUDES) $(LIB_SWORD) + +pythonswig: sword.i + mkdir -p python + $(SWIG) -python -c++ -shadow -o python/Sword.cxx -I$(top_srcdir) $(top_srcdir)/sword.i + +python_makebuild: $(PYTHONSWIG) + mkdir -p python + echo "writing python/setup.py" + @echo "#! /usr/bin/python" > python/setup.py + @echo "" >> python/setup.py + @echo "from distutils.core import setup, Extension" >> python/setup.py + @echo "setup (name = \"sword\"," >> python/setup.py + @echo " version = \"$(VERSION)\"," >> python/setup.py + @echo " maintainer = \"Sword Developers\"," >> python/setup.py + @echo " maintainer_email = \"sword-devel@crosswire.org\"," >> python/setup.py + @echo " url = \"http://www.crosswire.org/sword\"," >> python/setup.py + @echo " py_modules = [\"Sword\"]," >> python/setup.py + @echo " ext_modules = [Extension(\"sword\", [\"Sword.cxx\"]," >> python/setup.py + @echo " define_macros=[('SWIG',1)])], " >> python/setup.py + @echo ")" >> python/setup.py + + + +phpswig: sword.i + mkdir -p php + $(SWIG) -php4 -c++ -fullmake -o php/Sword.cxx -I$(top_srcdir) $(top_srcdir)/sword.i + diff --git a/bindings/swig/oldmake/Makefile.oth b/bindings/swig/oldmake/Makefile.oth new file mode 100644 index 0000000..44f00ce --- /dev/null +++ b/bindings/swig/oldmake/Makefile.oth @@ -0,0 +1,22 @@ +TOP = $(PWD) +SWIG = swig +#SWIGOPT = -Wall -proxy +SWIGOPT = -shadow +CXXSRCS = +TARGET = sword +INTERFACE = sword.i +LIBS = -lm -lz -lsword +INCLUDE = -I$(TOP)/../../include/ + +all:: + $(MAKE) -f $(TOP)/Makefile.swig CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ + TARGET='$(TARGET)' SWIGOPT='$(SWIGOPT)' INTERFACE='$(INTERFACE)' LIBS='$(LIBS)' INCLUDE='$(INCLUDE)' perl5_cpp + +static:: + $(MAKE) -f $(TOP)/Makefile.swig CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ + TARGET='myperl' INTERFACE='$(INTERFACE)' INCLUDE='$INCLUDE' perl5_cpp_static + +clean:: + rm -f *_wrap* *.o *~ *.so myperl *.pyc .~* core + +check: all diff --git a/bindings/swig/oldmake/Makefile.swig b/bindings/swig/oldmake/Makefile.swig new file mode 100644 index 0000000..9b8271a --- /dev/null +++ b/bindings/swig/oldmake/Makefile.swig @@ -0,0 +1,578 @@ +# Generated automatically from Makefile.in by configure. +# ------------------------------------------------------------ +# SWIG Examples Makefile +# +# This file is used by the examples to build modules. Assuming +# you ran configure, this file will probably work. However, +# it's not perfect so you might need to do some hand tweaking. +# +# Other notes: +# +# 1. Take a look at the prefixes below. Since SWIG works with +# multiple target languages, you may need to find out where +# certain packages have been installed. Set the prefixes +# accordingly. +# +# 2. To use this makefile, simply set SRCS, INTERFACE, INCLUDE, LIBS, +# TARGET, and do a +# $(MAKE) -f Makefile.template.in SRCS='$(SRCS)' \ +# INCLUDE='$(INCLUDE) LIBS='$(LIBS)' INTERFACE='$(INTERFACE)' \ +# TARGET='$(TARGET)' method +# +# 'method' describes what is being built. +#--------------------------------------------------------------- + +TARGET = +CC = gcc +CXX = c++ +CFLAGS = +prefix = /usr/local +exec_prefix= ${prefix} +SRCS = +INCLUDE = +LIBS = +INTERFACE = +SWIGOPT = +SWIG = swig +RUNTIMEDIR = $(exec_prefix)/lib + +LIBM = -lieee -lm +LIBC = +LIBCRYPT = -lcrypt +SYSLIBS = $(LIBM) $(LIBC) $(LIBCRYPT) + +libtool_comp = $(TOP)/../Tools/libtool --mode compile +libtool_link = $(TOP)/../Tools/libtool --mode link + +# X11 options + +XLIB = -L/usr/X11R6/lib -lX11 +XINCLUDE = -I/usr/X11R6/include + +IWRAP = $(INTERFACE:.i=_wrap.i) +ISRCS = $(IWRAP:.i=.c) +ICXXSRCS = $(IWRAP:.i=.cxx) +IOBJS = $(IWRAP:.i=.o) + +################################################################## +# Dynamic loading for C++ +# If you are going to be building dynamic loadable modules in C++, +# you may need to edit this line appropriately. +# +# This line works for g++, but I'm not sure what it might be +# for other C++ compilers +################################################################## + +CPP_DLLIBS = #-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \ + -L/usr/local/lib -lg++ -lstdc++ -lgcc + +# Solaris workshop 5.0 +# CPP_DLLIBS = -L/opt/SUNWspro/lib -lCrun + +# Symbols used for using shared libraries +SO= .so +LDSHARED= gcc -shared +CCSHARED= -fpic +CXXSHARED= gcc -shared + +# This is used for building shared libraries with a number of C++ +# compilers. If it doesn't work, comment it out. +CXXSHARED= c++ -shared + +OBJS = $(SRCS:.c=.o) $(CXXSRCS:.cxx=.o) + +################################################################## +##### Tcl/Tk ###### +################################################################## + +# Set these to your local copy of Tcl/Tk. + +TCL_INCLUDE = +TCL_LIB = +TCL_OPTS = -ldl +TK_OPTS = -ltk -ltcl -ldl + +# Extra Tcl specific dynamic linking options +TCL_DLNK = + +# ----------------------------------------------------------- +# Build a new version of the tclsh shell +# ----------------------------------------------------------- + + +tclsh: $(SRCS) + $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACE) + $(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(TCL_INCLUDE) \ + $(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET) + +tclsh_cpp: $(SRCS) + $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACE) + $(CXX) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(TCL_INCLUDE) \ + $(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET) + +# ----------------------------------------------------------- +# Build a new copy of wish +# ----------------------------------------------------------- + +wish: $(SRCS) + $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -lwish.i $(INTERFACE) + $(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(TCL_INCLUDE) \ + $(XINCLUDE) $(TCL_LIB) $(TK_OPTS) $(XLIB) $(LIBS) $(SYSLIBS) -o $(TARGET) + + +wish_cpp: $(SRCS) + $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -lwish.i $(INTERFACE) + $(CXX) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(TCL_INCLUDE) \ + $(XINCLUDE) $(TCL_LIB) $(TK_OPTS) $(XLIB) $(LIBS) $(SYSLIBS) -o $(TARGET) + +# ----------------------------------------------------------- +# Build a Tcl dynamic loadable module (you might need to tweak this) +# ----------------------------------------------------------- + +tcl: $(SRCS) + $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(TCL_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) -o $(TARGET)$(SO) + +# ----------------------------------------------------------- +# Build a Tcl7.5 dynamic loadable module for C++ +# ----------------------------------------------------------- + +tcl_cpp: $(SRCS) + $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(TCL_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO) + +# ----------------------------------------------------------- +# Build a Tcl7.5 dynamic loadable module, linked against SWIG runtime lib +# ----------------------------------------------------------- + +TCL_RUNTIME=-L$(RUNTIMEDIR) -lswigtcl8 + +tcl_multi: $(SRCS) + $(SWIG) -c -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(TCL_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_DLNK) $(LIBS) -o $(TARGET)$(SO) + +tcl_multi_cpp: $(SRCS) + $(SWIG) -c -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(TCL_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO) + +################################################################## +##### PERL 5 ###### +################################################################## + +# You need to set this variable to the Perl5 directory containing the +# files "perl.h", "EXTERN.h" and "XSUB.h". With Perl5.003, it's +# usually something like /usr/local/lib/perl5/arch-osname/5.003/CORE. + +PERL5_INCLUDE= /usr/lib/perl5/5.6.1/i386-linux/CORE + +# Extra Perl specific dynamic linking options +PERL5_DLNK = + +# ---------------------------------------------------------------- +# Build a Perl5 dynamically loadable module (C) +# ---------------------------------------------------------------- + +perl5: $(SRCS) + $(SWIG) -perl5 $(SWIGOPT) $(INTERFACE) + $(CC) -c -Dbool=char $(CCSHARED) $(CFLAGS) -DSWIG $(SRCS) $(ISRCS) $(INCLUDE) -I$(PERL5_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(PERL5_DLNK) $(LIBS) -o $(TARGET)$(SO) + +# ---------------------------------------------------------------- +# Build a Perl5 dynamically loadable module (C++) +# ---------------------------------------------------------------- + +perl5_cpp: $(SRCS) + $(SWIG) -perl5 -c++ $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) -DSWIG -Dexplicit= $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) -I$(PERL5_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(PERL5_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO) + +# ---------------------------------------------------------------- +# Build a Perl5 dynamically loadable module, linked against SWIG runtime lib +# ---------------------------------------------------------------- + +PERL5_RUNTIME=-L$(RUNTIMEDIR) -lswigpl + +perl5_multi: $(SRCS) + $(SWIG) -c -perl5 $(SWIGOPT) $(INTERFACE) + $(CC) -c -DSWIG -Dbool=char $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) -I$(PERL5_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(PERL5_RUNTIME) $(PERL5_DLNK) $(LIBS) -o $(TARGET)$(SO) + +perl5_multi_cpp: $(SRCS) + $(SWIG) -c -perl5 -c++ $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) -DSWIG -Dexplicit= $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) -I$(PERL5_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(PERL5_RUNTIME) $(PERL5_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO) + +# ---------------------------------------------------------------- +# Build a module from existing XS C source code. (ie. from xsubpp). +# ---------------------------------------------------------------- +perl5_xs: $(SRCS) + $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(INCLUDE) -I$(PERL5_INCLUDE) + $(LDSHARED) $(OBJS) $(LIBS) -o $(TARGET)$(SO) + +# ---------------------------------------------------------------- +# Build a statically linked Perl5 executable +# ---------------------------------------------------------------- + +PERL5_LIB = -L$(PERL5_INCLUDE) -lperl.so -ldl $(SYSLIBS) + +perl5_static: $(SRCS) + $(SWIG) -perl5 -static -lperlmain.i $(SWIGOPT) $(INTERFACE) + $(CC) $(CFLAGS) -Dbool=char $(SRCS) $(ISRCS) $(INCLUDE) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET) + +perl5_static_cpp: $(SRCS) + $(SWIG) -perl5 -c++ -static -lperlmain.i $(SWIGOPT) $(INTERFACE) + $(CXX) $(CFLAGS) -Dexplicit= $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET) + + +################################################################## +##### PYTHON ###### +################################################################## + +# Make sure these locate your Python installation +PYTHON_INCLUDE= -DHAVE_CONFIG_H +PYTHON_LIB = + +# Extra Python specific dynamic linking options +PYTHON_DLNK = + +# ---------------------------------------------------------------- +# Build a C dynamically loadable module +# ---------------------------------------------------------------- + +python: $(SRCS) + $(SWIG) -python $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(PYTHON_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) -o $(TARGET)module$(SO) + +# ----------------------------------------------------------------- +# Build a C++ dynamically loadable module +# ----------------------------------------------------------------- + +python_cpp: $(SRCS) + $(SWIG) -c++ -python $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(PYTHON_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)module$(SO) + +# ----------------------------------------------------------------- +# Build a dynamically loadable module, linked against SWIG Runtime lib +# ----------------------------------------------------------------- + +PYTHON_RUNTIME=-L$(RUNTIMEDIR) -lswigpy + +python_multi: $(SRCS) + $(SWIG) -c -python $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(PYTHON_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(PYTHON_RUNTIME) $(PYTHON_DLNK) $(LIBS) -o $(TARGET)module$(SO) + +python_multi_cpp: $(SRCS) + $(SWIG) -c -c++ -python $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(PYTHON_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(PYTHON_RUNTIME) $(PYTHON_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)module$(SO) + + +# ----------------------------------------------------------------- +# Build statically linked Python interpreter +# +# These should only be used in conjunction with the %include embed.i +# library file +# ----------------------------------------------------------------- + +#TKINTER = -L/usr/X11R6.3/lib -L/usr/local/compat/lib -ltk4.0 -ltcl7.4 -lX11 +TKINTER = +PYTHON_LIBOPTS = -lpython2.2 -ldl $(TKINTER) $(SYSLIBS) + +python_static: $(SRCS) + $(SWIG) -python -lembed.i $(SWIGOPT) $(INTERFACE) + $(CC) $(CFLAGS) -Xlinker -export-dynamic $(ISRCS) $(SRCS) $(INCLUDE) \ + $(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET) + +python_static_cpp: $(SRCS) + $(SWIG) -c++ -python -lembed.i $(SWIGOPT) $(INTERFACE) + $(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) \ + $(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET) + +# ----------------------------------------------------------------- +# Cleaning the python examples +# ----------------------------------------------------------------- + +python_clean: + rm -f *_wrap* *.o *~ *$(SO) mypython *.pyc .~* core + +################################################################## +##### GUILE ###### +################################################################## + +# Make sure these locate your Guile installation +GUILE_INCLUDE = +GUILE_LIB = + +# ---------------------------------------------------------------- +# Build a C dynamically loadable module +# ---------------------------------------------------------------- + +guile: $(SRCS) + $(SWIG) -guile -Linkage ltdlmod $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ISRCS) $(SRCS) + $(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) -o lib$(TARGET)$(SO) + +# ----------------------------------------------------------------- +# Build a C++ dynamically loadable module +# ----------------------------------------------------------------- + +guile_cpp: $(SRCS) + $(SWIG) -c++ -guile -Linkage ltdlmod $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS) + $(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o lib$(TARGET)$(SO) + +# ----------------------------------------------------------------- +# Build a dynamically loadable module with passive linkage +# ----------------------------------------------------------------- + +guile_passive: $(SRCS) + $(SWIG) -guile -Linkage passive $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ISRCS) $(SRCS) + $(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) -o lib$(TARGET)$(SO) + +guile_passive_cpp: $(SRCS) + $(SWIG) -c++ -guile -Linkage passive $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS) + $(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o lib$(TARGET)$(SO) + +# ----------------------------------------------------------------- +# Build a dynamically loadable module with passive linkage, +# linked against SWIG runtime lib +# ----------------------------------------------------------------- + +GUILE_RUNTIME=-L$(RUNTIMEDIR) -lswigguile + +guile_passive_multi: $(SRCS) + $(SWIG) -c -guile -Linkage passive $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ISRCS) $(SRCS) + $(LDSHARED) $(OBJS) $(IOBJS) $(GUILE_RUNTIME) $(LIBS) -o lib$(TARGET)$(SO) + +guile_passive_multi_cpp: $(SRCS) + $(SWIG) -c -c++ -guile -Linkage passive $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(GUILE_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS) + $(CXXSHARED) $(OBJS) $(IOBJS) $(GUILE_RUNTIME) $(LIBS) $(CPP_DLLIBS) -o lib$(TARGET)$(SO) + +# ----------------------------------------------------------------- +# Build statically linked Guile interpreter +# ----------------------------------------------------------------- + +GUILE_LIBOPTS = -ldl $(SYSLIBS) + +guile_static: $(SRCS) + $(SWIG) -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACE) + $(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) \ + -DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \ + $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile + +guile_static_cpp: $(SRCS) + $(SWIG) -c++ -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACE) + $(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) \ + -DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \ + $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile + +guile_simple: $(SRCS) + $(SWIG) -guile -lguilemain.i -Linkage simple $(SWIGOPT) $(INTERFACE) + $(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) \ + $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile + +guile_simple_cpp: $(SRCS) + $(SWIG) -c++ -guile -lguilemain.i -Linkage simple $(SWIGOPT) $(INTERFACE) + $(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) \ + $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile + +################################################################## +##### JAVA ###### +################################################################## + +# You need to set this variable to the java directories containing the +# files "jni.h" and "md.h" +# usually something like /usr/java/include and /usr/java/include/. +JAVA_INCLUDE= + +# Extra Java specific dynamic linking options +JAVA_DLNK = +JAVALIBPREFIX = lib + +# ---------------------------------------------------------------- +# Build a java dynamically loadable module (C) +# ---------------------------------------------------------------- + +java: $(SRCS) + $(SWIG) -java $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(JAVA_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO) + +# ---------------------------------------------------------------- +# Build a java dynamically loadable module (C++) +# ---------------------------------------------------------------- + +java_cpp: $(SRCS) + $(SWIG) -java -c++ $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(JAVA_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO) + +# ---------------------------------------------------------------- +# Build a java dynamically loadable module +# ---------------------------------------------------------------- + +java_multi: $(SRCS) + $(SWIG) -java $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(JAVA_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO) + +java_multi_cpp: $(SRCS) + $(SWIG) -java -c++ $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(JAVA_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO) + +# ----------------------------------------------------------------- +# Cleaning the java examples +# ----------------------------------------------------------------- + +java_clean: + mv main.java main.java.tmp + rm -f *_wrap* *.o core *~ *$(SO) *.class *.java + mv main.java.tmp main.java + +################################################################## +##### MZSCHEME ###### +################################################################## + +MZC = test -n "" && + +# ---------------------------------------------------------------- +# Build a C/C++ dynamically loadable module +# ---------------------------------------------------------------- + +mzscheme: $(SRCS) + $(SWIG) -mzscheme $(SWIGOPT) $(INTERFACE) + $(MZC) ++ccf "$(INCLUDE)" --cc $(ISRCS) $(SRCS) + $(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) + +mzscheme_cpp: $(SRCS) + $(SWIG) -mzscheme -c++ $(SWIGOPT) $(INTERFACE) + $(MZC) ++ccf "$(INCLUDE)" --cc $(ICXXSRCS) $(SRCS) $(CXXSRCS) + $(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) $(CPP_DLLIBS) + +# ---------------------------------------------------------------- +# Build a dynamically loadable module, linked against SWIG runtime +# ---------------------------------------------------------------- + +MZSCHEME_RUNTIME=-L$(RUNTIMEDIR) -lswigmz + +mzscheme_multi: $(SRCS) + $(SWIG) -c -mzscheme $(SWIGOPT) $(INTERFACE) + $(MZC) ++ccf "$(INCLUDE)" --cc $(ISRCS) $(SRCS) + $(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) $(MZSCHEME_RUNTIME) + +mzscheme_multi_cpp: $(SRCS) + $(SWIG) -c -mzscheme -c++ $(SWIGOPT) $(INTERFACE) + $(MZC) ++ccf "$(INCLUDE)" --cc $(ICXXSRCS) $(SRCS) $(CXXSRCS) + $(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) $(MZSCHEME_RUNTIME) $(CPP_DLLIBS) + +################################################################## +##### RUBY ###### +################################################################## + +# Make sure these locate your Ruby installation +RUBY_CFLAGS= -DHAVE_CONFIG_H +RUBY_INCLUDE= -I/usr/local/lib/ruby/1.4/arch +RUBY_LIB = /usr/local/lib/ruby/1.4/arch +RUBY_DLNK = + +# ---------------------------------------------------------------- +# Build a C dynamically loadable module +# ---------------------------------------------------------------- + +ruby: $(SRCS) + $(SWIG) -ruby $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(RUBY_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) -o $(TARGET)$(SO) + +# ----------------------------------------------------------------- +# Build a C++ dynamically loadable module +# ----------------------------------------------------------------- + +ruby_cpp: $(SRCS) + $(SWIG) -c++ -ruby $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(RUBY_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO) + +# ----------------------------------------------------------------- +# Build a dynamically loadable module, linked against SWIG runtime lib +# ----------------------------------------------------------------- + +RUBY_RUNTIME=-L$(RUNTIMEDIR) -lswigrb + +ruby_multi: $(SRCS) + $(SWIG) -c -ruby $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(RUBY_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(RUBY_RUNTIME) $(RUBY_DLNK) $(LIBS) -o $(TARGET)$(SO) + +ruby_multi_cpp: $(SRCS) + $(SWIG) -c -c++ -ruby $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(RUBY_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(RUBY_RUNTIME) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO) + +# ----------------------------------------------------------------- +# Build statically linked Ruby interpreter +# +# These should only be used in conjunction with the %include embed.i +# library file +# ----------------------------------------------------------------- + +RUBY_LIBOPTS = -lruby -lm -ldl $(SYSLIBS) + +ruby_static: $(SRCS) + $(SWIG) -ruby -lembed.i $(SWIGOPT) $(INTERFACE) + $(CC) $(CFLAGS) $(RUBY_CFLAGS) -Xlinker -export-dynamic $(ISRCS) $(SRCS) $(INCLUDE) \ + $(RUBY_INCLUDE) $(LIBS) -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET) + +ruby_cpp_static: $(SRCS) + $(SWIG) -c++ -ruby -lembed.i $(SWIGOPT) $(INTERFACE) + $(CXX) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) \ + $(RUBY_INCLUDE) $(LIBS) -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET) + + +# ------------------------------------------------------------------- +# Build a PHP4 dynamically loadable module (C) +# ------------------------------------------------------------------- + +PHP4_INCLUDE = + +php4: $(SRCS) + $(SWIG) -php4 $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDE) $(PHP4_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) -o $(TARGET)$(SO) + +# -------------------------------------------------------------------- +# Build a PHP4 dynamically loadable module (C++) +# -------------------------------------------------------------------- + +php4_cpp: $(SRCS) + $(SWIG) -php4 -c++ $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDE) $(PHP4_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO) + +# --------------------------------------------------------------------- +# Build a dynamically loadable module, linked against SWIG Runtime lib +# --------------------------------------------------------------------- + +PHP4_RUNTIME=-L$(RUNTIMEDIR) -lswigphp4 + +php4_multi: $(SRCS) + $(SWIG) -c -php4 $(SWIGOPT) $(INTERFACE) + $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) $(PHP4_INCLUDE) + $(LDSHARED) $(OBJS) $(IOBJS) $(PHP4_RUNTIME) $(PHP4_DLNK) $(LIBS) -o $(TARGET)module$(SO) + +php4_multi_cpp: $(SRCS) + $(SWIG) -c -c++ -php4 $(SWIGOPT) $(INTERFACE) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDE) $(PHP4_INCLUDE) + $(CXXSHARED) $(OBJS) $(IOBJS) $(PHP4_RUNTIME) $(PHP4_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)module$(SO) diff --git a/bindings/swig/osishtmlhref.i b/bindings/swig/osishtmlhref.i new file mode 100755 index 0000000..d721b0c --- /dev/null +++ b/bindings/swig/osishtmlhref.i @@ -0,0 +1,16 @@ +%{ +#include +#include +#include +#include +#include +#include "utf8html.h" +%} + +%include +%include "osishtmlhref.h" +%include "plainhtml.h" +%include "thmlhtmlhref.h" +%include "gbfhtmlhref.h" +%include "utf8html.h" + diff --git a/bindings/swig/package/Makefile.am b/bindings/swig/package/Makefile.am new file mode 100644 index 0000000..5d05360 --- /dev/null +++ b/bindings/swig/package/Makefile.am @@ -0,0 +1,113 @@ +INCLUDES = $(SWORD_INCLUDES) +lib_LTLIBRARIES = libsword_csharpsword.la +libsword_csharpsword_la_LIBADD = $(SWORD_LIBS) +libsword_csharpsword_la_SOURCES = csharp/Sword.cxx + +EXTRA_DIST = *.i + + +if RUNSWIG +PERLSWIG=perlswig +TCLSWIG=tclswig +PYTHONSWIG=pythonswig +PHPSWIG=phpswig +else +PERLSWIG= +TCLSWIG= +PYTHONSWIG= +PHPSWIG= +endif + +all: $(PERLBUILD) $(TCLBUILD) $(PYTHONBUILD) $(PHPBUILD) + echo "built" + +perl_make: perl_makebuild + cd perl && make + +perlswig: sword.i + mkdir -p perl + $(SWIG) -perl -c++ -shadow -o perl/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +perl_makebuild: $(PERLSWIG) + mkdir -p perl + echo "writing perl/Makefile.PL" + @echo "#! /usr/bin/perl" > perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "use ExtUtils::MakeMaker;" >> perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "# See lib/ExtUtils/MakeMaker.pm for details of how to influence" >> perl/Makefile.PL + @echo "# the contents of the Makefile that is written." >> perl/Makefile.PL + @echo "WriteMakefile(" >> perl/Makefile.PL + @echo " 'NAME' => 'Sword'," >> perl/Makefile.PL + @echo " 'VERSION' => '$(VERSION)'," >> perl/Makefile.PL + @echo " 'INC' => '$(SWORD_INCLUDES) -I..'," >> perl/Makefile.PL + @echo " 'DEFINE' => '-DSWIG'," >> perl/Makefile.PL + @echo " 'LIBS' => '$(LIB_SWORD) -lz'," >> perl/Makefile.PL + @echo " 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1" >> perl/Makefile.PL + @echo " ($$] >= 5.005 ? ## Add these new keywords supported since 5.005" >> perl/Makefile.PL + @echo " (ABSTRACT => 'Sword Project perl bindings', # retrieve abstract from module" >> perl/Makefile.PL + @echo " AUTHOR => 'Sword Project ') : ())," >> perl/Makefile.PL + @echo ");" >> perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "rename 'Makefile', 'Makefile.old' or die \"can't rename Makefile\";" >> perl/Makefile.PL + @echo "open(INPUT, '> perl/Makefile.PL + @echo "open(OUTPUT, '>Makefile') or die \"can't open output Makefile\";" >> perl/Makefile.PL + @echo "while () {" >> perl/Makefile.PL + @echo " s/\-lsword/\-lsword \-lstdc\+\+/;" >> perl/Makefile.PL + @echo " print OUTPUT \"$$""_\";" >> perl/Makefile.PL + @echo "}" >> perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "close INPUT;" >> perl/Makefile.PL + @echo "close OUTPUT;" >> perl/Makefile.PL + cd perl && $(PERL) Makefile.PL && make clean + @echo "\.old" > perl/MANIFEST.SKIP + @echo "~$$" >> perl/MANIFEST.SKIP + @echo "\.bak" >> perl/MANIFEST.SKIP + @echo "^CVS" >> perl/MANIFEST.SKIP + @echo "Makefile$$" >> perl/MANIFEST.SKIP + cd perl && $(PERL) Makefile.PL && make manifest + +tclswig: sword.i + mkdir -p tcl + $(SWIG) -tcl -c++ -namespace -pkgversion $(VERSION) -o tcl/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +python_make: python_makebuild + cd python && $(PYTHON) setup.py build_ext $(LIB_SWORD) + +pythonswig: sword.i + mkdir -p python + $(SWIG) -python -c++ -shadow -o python/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +python_makebuild: $(PYTHONSWIG) + mkdir -p python + echo "writing python/setup.py" + @echo "#! /usr/bin/python" > python/setup.py + @echo "" >> python/setup.py + @echo "from distutils.core import setup, Extension" >> python/setup.py + @echo "setup (name = \"sword\"," >> python/setup.py + @echo " version = \"$(VERSION)\"," >> python/setup.py + @echo " maintainer = \"Sword Developers\"," >> python/setup.py + @echo " maintainer_email = \"sword-devel@crosswire.org\"," >> python/setup.py + @echo " url = \"http://www.crosswire.org/sword\"," >> python/setup.py + @echo " py_modules = [\"Sword\"]," >> python/setup.py + @echo " include_dirs=['$(SWORD_INCLUDE_DIR)', '..', '../..']," >> python/setup.py + @echo " ext_modules = [Extension(\"_Sword\", [\"Sword.cxx\"]," >> python/setup.py + @echo " libraries=[('sword')], " >> python/setup.py + @echo " define_macros=[('SWIG',1)])], " >> python/setup.py + @echo ")" >> python/setup.py + + + +phpswig: sword.i + mkdir -p php + $(SWIG) -php4 -c++ -phpfull -o php/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + + +csharp/Sword.cxx: csharpswig + +csharpswig: sword.i + mkdir -p csharp + $(SWIG) -csharp -c++ -nodefaultctor -dllimport libsword_csharpwrap.dll -o csharp/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +csharpmake: + mcs -out:csharp/Sword.dll -target:library csharp/*.cs diff --git a/bindings/swig/package/Makefile.in b/bindings/swig/package/Makefile.in new file mode 100644 index 0000000..339679a --- /dev/null +++ b/bindings/swig/package/Makefile.in @@ -0,0 +1,722 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure config.guess \ + config.sub depcomp install-sh ltmain.sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/perl.m4 $(top_srcdir)/php4.m4 \ + $(top_srcdir)/python.m4 $(top_srcdir)/swig.m4 \ + $(top_srcdir)/sword.m4 $(top_srcdir)/tcl.m4 \ + $(top_srcdir)/zlib.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libsword_csharpsword_la_DEPENDENCIES = +am_libsword_csharpsword_la_OBJECTS = Sword.lo +libsword_csharpsword_la_OBJECTS = \ + $(am_libsword_csharpsword_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libsword_csharpsword_la_SOURCES) +DIST_SOURCES = $(libsword_csharpsword_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBZ = @LIBZ@ +LIB_SWORD = @LIB_SWORD@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL5DYNAMICLINKING = @PERL5DYNAMICLINKING@ +PERL5EXT = @PERL5EXT@ +PERL5LIB = @PERL5LIB@ +PERLBUILD = @PERLBUILD@ +PHP4 = @PHP4@ +PHP4INC = @PHP4INC@ +PYINCLUDE = @PYINCLUDE@ +PYLIB = @PYLIB@ +PYLINK = @PYLINK@ +PYTHON = @PYTHON@ +PYTHONBUILD = @PYTHONBUILD@ +PYTHONDYNAMICLINKING = @PYTHONDYNAMICLINKING@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SWORD_INCLUDES = @SWORD_INCLUDES@ +SWORD_INCLUDE_DIR = @SWORD_INCLUDE_DIR@ +TCLDYNAMICLINKING = @TCLDYNAMICLINKING@ +TCLINCLUDE = @TCLINCLUDE@ +TCLLIB = @TCLLIB@ +USER_INCLUDES = @USER_INCLUDES@ +USER_LDFLAGS = @USER_LDFLAGS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = $(SWORD_INCLUDES) +lib_LTLIBRARIES = libsword_csharpsword.la +libsword_csharpsword_la_LIBADD = $(SWORD_LIBS) +libsword_csharpsword_la_SOURCES = csharp/Sword.cxx +EXTRA_DIST = *.i +@RUNSWIG_FALSE@PERLSWIG = +@RUNSWIG_TRUE@PERLSWIG = perlswig +@RUNSWIG_FALSE@TCLSWIG = +@RUNSWIG_TRUE@TCLSWIG = tclswig +@RUNSWIG_FALSE@PYTHONSWIG = +@RUNSWIG_TRUE@PYTHONSWIG = pythonswig +@RUNSWIG_FALSE@PHPSWIG = +@RUNSWIG_TRUE@PHPSWIG = phpswig +all: all-am + +.SUFFIXES: +.SUFFIXES: .cxx .lo .o .obj +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libsword_csharpsword.la: $(libsword_csharpsword_la_OBJECTS) $(libsword_csharpsword_la_DEPENDENCIES) + $(CXXLINK) -rpath $(libdir) $(libsword_csharpsword_la_OBJECTS) $(libsword_csharpsword_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sword.Plo@am__quote@ + +.cxx.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cxx.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cxx.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +Sword.lo: csharp/Sword.cxx +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Sword.lo -MD -MP -MF $(DEPDIR)/Sword.Tpo -c -o Sword.lo `test -f 'csharp/Sword.cxx' || echo '$(srcdir)/'`csharp/Sword.cxx +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/Sword.Tpo $(DEPDIR)/Sword.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='csharp/Sword.cxx' object='Sword.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Sword.lo `test -f 'csharp/Sword.cxx' || echo '$(srcdir)/'`csharp/Sword.cxx + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \ + dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-libLTLIBRARIES + + +all: $(PERLBUILD) $(TCLBUILD) $(PYTHONBUILD) $(PHPBUILD) + echo "built" + +perl_make: perl_makebuild + cd perl && make + +perlswig: sword.i + mkdir -p perl + $(SWIG) -perl -c++ -shadow -o perl/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +perl_makebuild: $(PERLSWIG) + mkdir -p perl + echo "writing perl/Makefile.PL" + @echo "#! /usr/bin/perl" > perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "use ExtUtils::MakeMaker;" >> perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "# See lib/ExtUtils/MakeMaker.pm for details of how to influence" >> perl/Makefile.PL + @echo "# the contents of the Makefile that is written." >> perl/Makefile.PL + @echo "WriteMakefile(" >> perl/Makefile.PL + @echo " 'NAME' => 'Sword'," >> perl/Makefile.PL + @echo " 'VERSION' => '$(VERSION)'," >> perl/Makefile.PL + @echo " 'INC' => '$(SWORD_INCLUDES) -I..'," >> perl/Makefile.PL + @echo " 'DEFINE' => '-DSWIG'," >> perl/Makefile.PL + @echo " 'LIBS' => '$(LIB_SWORD) -lz'," >> perl/Makefile.PL + @echo " 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1" >> perl/Makefile.PL + @echo " ($$] >= 5.005 ? ## Add these new keywords supported since 5.005" >> perl/Makefile.PL + @echo " (ABSTRACT => 'Sword Project perl bindings', # retrieve abstract from module" >> perl/Makefile.PL + @echo " AUTHOR => 'Sword Project ') : ())," >> perl/Makefile.PL + @echo ");" >> perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "rename 'Makefile', 'Makefile.old' or die \"can't rename Makefile\";" >> perl/Makefile.PL + @echo "open(INPUT, '> perl/Makefile.PL + @echo "open(OUTPUT, '>Makefile') or die \"can't open output Makefile\";" >> perl/Makefile.PL + @echo "while () {" >> perl/Makefile.PL + @echo " s/\-lsword/\-lsword \-lstdc\+\+/;" >> perl/Makefile.PL + @echo " print OUTPUT \"$$""_\";" >> perl/Makefile.PL + @echo "}" >> perl/Makefile.PL + @echo "" >> perl/Makefile.PL + @echo "close INPUT;" >> perl/Makefile.PL + @echo "close OUTPUT;" >> perl/Makefile.PL + cd perl && $(PERL) Makefile.PL && make clean + @echo "\.old" > perl/MANIFEST.SKIP + @echo "~$$" >> perl/MANIFEST.SKIP + @echo "\.bak" >> perl/MANIFEST.SKIP + @echo "^CVS" >> perl/MANIFEST.SKIP + @echo "Makefile$$" >> perl/MANIFEST.SKIP + cd perl && $(PERL) Makefile.PL && make manifest + +tclswig: sword.i + mkdir -p tcl + $(SWIG) -tcl -c++ -namespace -pkgversion $(VERSION) -o tcl/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +python_make: python_makebuild + cd python && $(PYTHON) setup.py build_ext $(LIB_SWORD) + +pythonswig: sword.i + mkdir -p python + $(SWIG) -python -c++ -shadow -o python/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +python_makebuild: $(PYTHONSWIG) + mkdir -p python + echo "writing python/setup.py" + @echo "#! /usr/bin/python" > python/setup.py + @echo "" >> python/setup.py + @echo "from distutils.core import setup, Extension" >> python/setup.py + @echo "setup (name = \"sword\"," >> python/setup.py + @echo " version = \"$(VERSION)\"," >> python/setup.py + @echo " maintainer = \"Sword Developers\"," >> python/setup.py + @echo " maintainer_email = \"sword-devel@crosswire.org\"," >> python/setup.py + @echo " url = \"http://www.crosswire.org/sword\"," >> python/setup.py + @echo " py_modules = [\"Sword\"]," >> python/setup.py + @echo " include_dirs=['$(SWORD_INCLUDE_DIR)', '..', '../..']," >> python/setup.py + @echo " ext_modules = [Extension(\"_Sword\", [\"Sword.cxx\"]," >> python/setup.py + @echo " libraries=[('sword')], " >> python/setup.py + @echo " define_macros=[('SWIG',1)])], " >> python/setup.py + @echo ")" >> python/setup.py + +phpswig: sword.i + mkdir -p php + $(SWIG) -php4 -c++ -phpfull -o php/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +csharp/Sword.cxx: csharpswig + +csharpswig: sword.i + mkdir -p csharp + $(SWIG) -csharp -c++ -nodefaultctor -dllimport libsword_csharpwrap.dll -o csharp/Sword.cxx -I$(top_srcdir) $(SWORD_INCLUDES) $(top_srcdir)/sword.i + +csharpmake: + mcs -out:csharp/Sword.dll -target:library csharp/*.cs +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/bindings/swig/package/README.cvs b/bindings/swig/package/README.cvs new file mode 100644 index 0000000..72aaaaa --- /dev/null +++ b/bindings/swig/package/README.cvs @@ -0,0 +1,10 @@ +README +------ + +To build the sword bindings for Sword you require + +SWIG 1.3 (see http://www.swig.org) +one of perl, python, tcl, php +Sword 1.5.8 + +First run ./autogen.sh to generate this directory diff --git a/bindings/swig/package/aclocal.m4 b/bindings/swig/package/aclocal.m4 new file mode 100644 index 0000000..fcced8e --- /dev/null +++ b/bindings/swig/package/aclocal.m4 @@ -0,0 +1,7466 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 51 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_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. +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'] + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# 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_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_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=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_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_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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 conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_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. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_REQUIRE([LT_AC_PROG_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_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_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. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${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 </dev/null 2>&1 && unset CDPATH + +if test -z "$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 && + echo_test_string=`eval $cmd` && + (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. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_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*|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*) + libsuff=64 + 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*) + 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_TRY_LINK([],[],[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" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$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 + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_REQUIRE([LT_AC_PROG_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 conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# 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*) + # 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 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_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 < +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#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 ()); + + exit (status); +}] +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_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_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*) + 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="-dld"], + [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="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + 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_AC_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_AC_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 +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_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_AC_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 .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_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 +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_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 +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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 +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[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 +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +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" +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]) +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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + 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_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognize shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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 + +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 +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognize a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_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 + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_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]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])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 + ;; + +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) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + 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=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + 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 +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible 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 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[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_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([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 +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[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_AC_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_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# 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 + ;; + +aix4* | aix5*) + 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]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_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(int, char *[[]]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_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_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + 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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_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' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_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 $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux* | k*bsd*-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_AC_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_AC_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 $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_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' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_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 $templist | $SED "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 $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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' + + # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + osf3*) + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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 $templist | $SED "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 $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_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 $templist | $SED "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 $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([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. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +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... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_AC_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac +])# AC_LIBTOOL_POSTDEP_PREDEP + +# AC_LIBTOOL_LANG_F77_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +[AC_REQUIRE([AC_PROG_F77]) +AC_LANG_PUSH(Fortran 77) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_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_AC_TAGVAR(objext, $1)=$objext + +# 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_AC_SYS_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" +CC=${F77-"f77"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +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 + ;; +aix4* | aix5*) + 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_AC_TAGVAR(GCC, $1)="$G77" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_F77_CONFIG + + +# AC_LIBTOOL_LANG_GCJ_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +[AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${GCJ-"gcj"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_GCJ_CONFIG + + +# AC_LIBTOOL_LANG_RC_CONFIG +# ------------------------- +# Ensure that the configuration vars for the Windows resource compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +[AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_AC_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_AC_SYS_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" +CC=${RC-"windres"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_RC_CONFIG + + +# AC_LIBTOOL_CONFIG([TAGNAME]) +# ---------------------------- +# If TAGNAME is not passed, then 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 +# TAGNAME from the matching tagged config vars. +AC_DEFUN([AC_LIBTOOL_CONFIG], +[# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case $var in + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\[$]0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` + ;; + esac + +ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile"]) + + cat <<__EOF__ >> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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 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. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $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. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# 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 + +# 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=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# 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]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $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 < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +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_AC_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 -f 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 +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # 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*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # 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_AC_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_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_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' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # 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 + ;; + esac + + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&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. + +EOF + fi + ;; + + amigaos*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_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_AC_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' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_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 + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_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_AC_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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + 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_AC_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_AC_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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_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' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + +# 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. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_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]) +]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# 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. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# 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. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# 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 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# 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 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# 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 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# +# 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 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# 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. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# 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 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# 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 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# 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 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# 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 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# 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. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# 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 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# 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 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# 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. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# 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. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# 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 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([perl.m4]) +m4_include([php4.m4]) +m4_include([python.m4]) +m4_include([swig.m4]) +m4_include([sword.m4]) +m4_include([tcl.m4]) +m4_include([zlib.m4]) diff --git a/bindings/swig/package/autogen.sh b/bindings/swig/package/autogen.sh new file mode 100755 index 0000000..716a37d --- /dev/null +++ b/bindings/swig/package/autogen.sh @@ -0,0 +1,24 @@ +#!/bin/sh +echo "*** copying swig files" +cp -a ../*.i . +cp -a ../*.h . + +echo "*** Recreating libtool" +if test -z "$LTIZE"; then +LTIZE="$AUTODIR""libtoolize" +fi +echo "$LTIZE" + $LTIZE --force --copy; + +ACLOCAL="$AUTODIR""aclocal" +echo "*** Recreating aclocal.m4" +echo "$ACLOCAL" + $ACLOCAL -I .; + +echo "*** Recreating configure" +AUTOCONF="$AUTODIR""autoconf" + $AUTOCONF; + +echo "*** Recreating the Makefile.in files" +AUTOMAKE="$AUTODIR""automake" + $AUTOMAKE -ac --foreign; diff --git a/bindings/swig/package/bases.i b/bindings/swig/package/bases.i new file mode 100755 index 0000000..91b5152 --- /dev/null +++ b/bindings/swig/package/bases.i @@ -0,0 +1,35 @@ +%{ +#include "rawverse.h" +#include "zverse.h" +#include "rawstr.h" +#include "rawstr4.h" +#include "zstr.h" +#include "swgenbook.h" +#include "lzsscomprs.h" +#include "zipcomprs.h" +#include "versekey.h" +#include "versetreekey.h" +#include "treekey.h" +#include "rawgenbook.h" +#include "swtext.h" +#include "swcom.h" +#include "rawcom.h" +#include "swld.h" +#include "zld.h" +#include "zcom.h" +#include "ztext.h" +#include "rawld.h" +#include "rawld4.h" +#include "treekeyidx.h" +#include "rawtext.h" + + +%} + +%immutable sword::RawVerse::nl; + +%include "rawverse.h" +%include "zverse.h" +%include "rawstr.h" +%include "rawstr4.h" +%include "zstr.h" diff --git a/bindings/swig/package/config.guess b/bindings/swig/package/config.guess new file mode 100755 index 0000000..951383e --- /dev/null +++ b/bindings/swig/package/config.guess @@ -0,0 +1,1516 @@ +#! /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 Free Software Foundation, +# Inc. + +timestamp='2007-05-17' + +# 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 to . Submit a context +# diff and a properly formatted 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. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +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 +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 __ELF__ >/dev/null + 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'` + exit ;; + 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 ;; + 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:SunOS:5.*:* | ix86xen:SunOS:5.*:*) + echo i386-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:*:[45]) + 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 __LP64__ >/dev/null + 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*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-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 ;; + 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 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + 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 ;; + 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:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + 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 ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + 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 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-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 ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*) + 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 i386. + echo i386-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; } ;; + 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.0*:*) + 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 ;; + 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 + 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 ;; + 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 ;; +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: diff --git a/bindings/swig/package/config.sub b/bindings/swig/package/config.sub new file mode 100755 index 0000000..c060f44 --- /dev/null +++ b/bindings/swig/package/config.sub @@ -0,0 +1,1626 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-04-29' + +# 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 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. + +# 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 +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-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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) + os= + basic_machine=$1 + ;; + -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 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | 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 | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # 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 + ;; + + # 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-* | c54x-* | c55x-* | c6x-* \ + | 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-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | 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-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | 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-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # 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 + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + 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 + ;; + cr16c) + basic_machine=cr16c-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 + ;; + 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 + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + 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 + ;; + 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 + ;; + 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) basic_machine=powerpc-unknown + ;; + ppc-*) 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 + ;; + 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 + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + 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 + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-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[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. + -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* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -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* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -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*) + # 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 + ;; + -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 + ;; + # 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 + ;; + -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: diff --git a/bindings/swig/package/configure b/bindings/swig/package/configure new file mode 100755 index 0000000..40fb86d --- /dev/null +++ b/bindings/swig/package/configure @@ -0,0 +1,21960 @@ +#! /bin/sh +# From configure.ac Revision: 1.2 . +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for swordbindings 1.5.11. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 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=: + # 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 + + + + +# PATH needs CR +# 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 + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +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.) +as_nl=' +' +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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +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 + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +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 + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); 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 +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +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 +fi +echo >conf$$.file +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 +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=: +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$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${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 </dev/null 2>&1 && unset CDPATH + +if test -z "$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 && + echo_test_string=`eval $cmd` && + (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. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, 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= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='swordbindings' +PACKAGE_TARNAME='swordbindings' +PACKAGE_VERSION='1.5.11' +PACKAGE_STRING='swordbindings 1.5.11' +PACKAGE_BUGREPORT='sword-bugs@crosswire.org' + +ac_unique_file="sword.i" +# 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='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +SED +GREP +EGREP +LN_S +ECHO +AR +RANLIB +CPP +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +SWIG +RUNSWIG_TRUE +RUNSWIG_FALSE +USER_INCLUDES +USER_LDFLAGS +LIBZ +LIB_SWORD +SWORD_INCLUDES +SWORD_INCLUDE_DIR +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT +PERL +PERL5EXT +PERL5DYNAMICLINKING +PERL5LIB +PERLBUILD +PYTHON +PYINCLUDE +PYLIB +PYLINK +PYTHONBUILD +PYTHONDYNAMICLINKING +PHP4 +PHP4INC +TCLINCLUDE +TCLLIB +TCLDYNAMICLINKING +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CXX +CXXFLAGS +CCC +CPP +CXXCPP +F77 +FFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# 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=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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=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 ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + 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'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +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 + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +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 + 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 .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# 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 -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + 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 .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + 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 swordbindings 1.5.11 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/swordbindings] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +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 swordbindings 1.5.11:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-swig=path Run swig to generate new source default=no + --enable-static-sword Link to the static Sword library + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer +--disable-swig do not run swig to generate input files + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] include additional configurations [automatic] + --with-swigbin=path Set location of swig executable + --with-sword-dir=DIR Path where Sword is being installed (default=/usr) + --with-extra-includes=DIR + adds non standard include paths + --with-extra-libs=DIR adds non standard library paths + --with-perl=path Set location of Perl5 executable + --with-python=path Set location of Python executable + --with-php4=path Set location of PHP4 executable + --with-tclconfig=path Set location of tclConfig.sh + --with-tcl=path Set location of Tcl package + --with-tclincl=path Set location of Tcl include directory + --with-tcllib=path Set location of Tcl library directory + +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 C/C++/Objective 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 + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +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 . +_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" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`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 + 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 +swordbindings configure 1.5.11 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 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 +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 swordbindings $as_me 1.5.11, which was +generated by GNU Autoconf 2.61. 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=. + 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$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 + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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 + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_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 + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + 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'; { (exit 1); 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 + +# 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 + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + 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. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +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,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +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 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`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. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +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 + + + + + +am__api_version='1.10' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; 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 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +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. + + +# 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. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +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 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$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' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P 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. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=swordbindings + VERSION=1.5.11 + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +# --------------------------------------------------------------------- +# Check Programs +# --------------------------------------------------------------------- +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_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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out 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. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 | *.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 + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$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 +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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" + 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +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 +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +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 -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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$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 + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +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. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +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 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$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' + +# 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 --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=yes +fi + + +# 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 + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +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 + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +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 + + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # 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 { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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 + +fi + +SED=$lt_cv_path_SED + +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + 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 + ac_count=`expr $ac_count + 1` + 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 + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + 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 + ac_count=`expr $ac_count + 1` + 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 + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +# 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. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +aix4* | aix5*) + 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 + ;; + +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) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + 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=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$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 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 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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 4924 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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*) + libsuff=64 + 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*) + 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" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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 +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + + +esac + +need_locks="$enable_libtool_lock" + + +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 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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 + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f 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 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +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 + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## --------------------------------------- ## +## Report this to sword-bugs@crosswire.org ## +## --------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +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 +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f 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 +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +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 + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # 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_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo 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 + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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*) + # 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 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi + + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +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:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 -f 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 + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +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. +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' + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# 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 + +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 +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <&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 + +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 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <&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 + +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 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=no + +# 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 + + +# 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 + +# Use C for the default configuration in the libtool script +tagname= +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 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 conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:7195: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7199: \$? = $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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$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= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) + # 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' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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' + ;; + + 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 + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # 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='-fPIC' + ;; + esac + ;; + + *) + 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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + 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' + ;; + *) + 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 + ;; + + 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 + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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:7485: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7489: \$? = $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_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } + +if test x"$lt_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 +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 + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:7589: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7593: \$? = $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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$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 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # 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_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + 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-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # 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 + ;; + 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>/dev/null` in + *\ [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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&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. + +EOF + fi + ;; + + amigaos*) + 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 + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + 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*) + # _LT_AC_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/'\'' -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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + 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' ;; + 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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; 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 + else + ld_shlibs=no + fi + ;; + + netbsd*) + 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 <&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. + +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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$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 + ;; + + aix4* | aix5*) + 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].*|aix5*) + 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_libdir_separator=':' + link_all_deplibs=yes + + 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 + 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 + + # 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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 "${wl}${allow_undefined_flag}"; 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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*) + 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 + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # 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 "$deplibs" | $SED -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*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = 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' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + 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_separator=: + + hardcode_direct=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 ${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_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + 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 + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + 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 ${wl}-set_version ${wl}$verstring` ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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 + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + 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' + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 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:$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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + 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* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" + +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 +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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant 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_AC_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 +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; 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 + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}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" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +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*) + 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 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = 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 + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* 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 (); +/* 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_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* 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 (); +/* 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_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +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" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 < +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#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 ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$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\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 < +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#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 ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$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 + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + fix_srcfile_path \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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 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. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# 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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +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 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# 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 + +# 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 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_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 + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + 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_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= +export_dynamic_flag_spec_CXX= +hardcode_direct_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 +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 + +# 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= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$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(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 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-%%"` + + +# We don't want -fno-exception wen 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. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$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 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + 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].*|aix5*) + 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_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + 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 + + # 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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 "${wl}${allow_undefined_flag}"; 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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*) + # _LT_AC_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*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + 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 + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + 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' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + 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) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + 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_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 $list' + ;; + *) + 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 -set_version $verstring` -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 ${wl}-set_version ${wl}$verstring` ${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 ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux* | k*bsd*-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 $list' + + 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*) + # 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*) + # Portland Group C++ compiler + 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' + + 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 $templist | $SED "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 $list' + ;; + *) + 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' + + # 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::"' + ;; + 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 + 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*) + 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 + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + 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 ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + 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. + # + # 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 $templist | $SED "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 $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + 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 + ;; + 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. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + 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 -set_version $verstring` -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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + 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" | grep -v "ld:"`; templist=`echo $templist | $SED "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 $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + 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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + 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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + 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 + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) + # 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' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # 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 IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # 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_AC_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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + 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) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # 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' + ;; + *) + 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*) + ;; + 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 + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + 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 + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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:12460: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:12464: \$? = $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_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_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 +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 + +# +# 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\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:12564: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:12568: \$? = $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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$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 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # 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*) + 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' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 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:$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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + 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* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&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-existant 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_AC_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 +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +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 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# 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 + +# 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_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# 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 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# 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. + +# 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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$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-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-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_F77='-Bstatic' + fi + ;; + + amigaos*) + # 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_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + 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_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # 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_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-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_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # 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:14128: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:14132: \$? = $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_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=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_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=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:14232: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14236: \$? = $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_F77=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # 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_F77="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + 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-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # 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 + ;; + esac + + ld_shlibs_F77=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_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&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. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$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_F77='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_F77=no + fi + ;; + + interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${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_F77='$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_F77='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${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_F77='${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' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$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 + else + ld_shlibs_F77=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$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_F77=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$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_F77=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_F77=unsupported + fi + ;; + + aix4* | aix5*) + 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_F77='$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_F77='$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].*|aix5*) + 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_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + 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_F77=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_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + 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 + + # 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_F77=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_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$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 >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$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*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # 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_F77=' ' + allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$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_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$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_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_F77=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=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_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$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_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_F77 + +# 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_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# 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_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# 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 + +# 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_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$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. + +# 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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$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-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:16421: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:16425: \$? = $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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # 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_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + 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_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # 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_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # 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:16711: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:16715: \$? = $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_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=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_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=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:16815: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:16819: \$? = $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_GCJ=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # 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_GCJ="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + 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-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # 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 + ;; + esac + + ld_shlibs_GCJ=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_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&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. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$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_GCJ='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_GCJ=no + fi + ;; + + interix[3-9]*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${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_GCJ='${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' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$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 + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$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_GCJ=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + 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_GCJ='$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_GCJ='$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].*|aix5*) + 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_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + 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_GCJ=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_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + 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 + + # 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_GCJ=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_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$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*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # 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_GCJ=' ' + allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$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_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$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_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_GCJ=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$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' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=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_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + +if test "$hardcode_action_GCJ" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_GCJ + +# 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_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# 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_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# 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 + +# 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_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$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. + +# 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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$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-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_RC + +# 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_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# 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_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# 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 + +# 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_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + + + +# Check whether --with-swigbin was given. +if test "${with_swigbin+set}" = set; then + withval=$with_swigbin; SWIGBIN="$withval" +else + SWIGBIN= +fi + +# Check whether --enable-swig was given. +if test "${enable_swig+set}" = set; then + enableval=$enable_swig; +else + enable_swig=no +fi + + +if test -z "$SWIGBIN"; then +# Extract the first word of "swig", so it can be a program name with args. +set dummy swig; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_SWIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SWIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SWIG="$SWIG" # 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_SWIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +SWIG=$ac_cv_path_SWIG +if test -n "$SWIG"; then + { echo "$as_me:$LINENO: result: $SWIG" >&5 +echo "${ECHO_T}$SWIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +else +# Extract the first word of "swig", so it can be a program name with args. +set dummy swig; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_SWIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SWIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $SWIGBIN +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_SWIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_SWIG" && ac_cv_path_SWIG=""not found"" + ;; +esac +fi +SWIG=$ac_cv_path_SWIG +if test -n "$SWIG"; then + { echo "$as_me:$LINENO: result: $SWIG" >&5 +echo "${ECHO_T}$SWIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi + +runswig=true +if test x"$SWIG"="xnot found"; then + runswig=false +fi +if test x"$enable_swig"="xno"; then + runswig=false +fi + + if test x$runswig = xtrue; then + RUNSWIG_TRUE= + RUNSWIG_FALSE='#' +else + RUNSWIG_TRUE='#' + RUNSWIG_FALSE= +fi + + +#ac_cv_swigversion=`` + + + +# --------------------------------------------------------------------- +# Check libraries +# --------------------------------------------------------------------- + +{ echo "$as_me:$LINENO: checking for extra includes" >&5 +echo $ECHO_N "checking for extra includes... $ECHO_C" >&6; } + +# Check whether --with-extra-includes was given. +if test "${with_extra_includes+set}" = set; then + withval=$with_extra_includes; kde_use_extra_includes="$withval" +else + kde_use_extra_includes=NONE + +fi + +kde_extra_includes= +if test -n "$kde_use_extra_includes" && \ + test "$kde_use_extra_includes" != "NONE"; then + + ac_save_ifs=$IFS + IFS=':' + for dir in $kde_use_extra_includes; do + kde_extra_includes="$kde_extra_includes $dir" + USER_INCLUDES="$USER_INCLUDES -I$dir" + done + IFS=$ac_save_ifs + kde_use_extra_includes="added" +else + kde_use_extra_includes="no" +fi + + +{ echo "$as_me:$LINENO: result: $kde_use_extra_includes" >&5 +echo "${ECHO_T}$kde_use_extra_includes" >&6; } + +kde_extra_libs= +{ echo "$as_me:$LINENO: checking for extra libs" >&5 +echo $ECHO_N "checking for extra libs... $ECHO_C" >&6; } + +# Check whether --with-extra-libs was given. +if test "${with_extra_libs+set}" = set; then + withval=$with_extra_libs; kde_use_extra_libs=$withval +else + kde_use_extra_libs=NONE + +fi + +if test -n "$kde_use_extra_libs" && \ + test "$kde_use_extra_libs" != "NONE"; then + + ac_save_ifs=$IFS + IFS=':' + for dir in $kde_use_extra_libs; do + kde_extra_libs="$kde_extra_libs $dir" + KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir" + USER_LDFLAGS="$USER_LDFLAGS -L$dir" + done + IFS=$ac_save_ifs + kde_use_extra_libs="added" +else + kde_use_extra_libs="no" +fi + + + +{ echo "$as_me:$LINENO: result: $kde_use_extra_libs" >&5 +echo "${ECHO_T}$kde_use_extra_libs" >&6; } + + + + +{ echo "$as_me:$LINENO: checking for libz" >&5 +echo $ECHO_N "checking for libz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + +kde_save_LIBS="$LIBS" +LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET" +kde_save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include + +int +main () +{ +return (zlibVersion() == ZLIB_VERSION); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "ac_cv_lib_z='-lz'" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "ac_cv_lib_z=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS="$kde_save_LIBS" +CFLAGS="$kde_save_CFLAGS" + +fi +if test ! "$ac_cv_lib_z" = no; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBZ="$ac_cv_lib_z" + + { echo "$as_me:$LINENO: result: $ac_cv_lib_z" >&5 +echo "${ECHO_T}$ac_cv_lib_z" >&6; } +else + { { echo "$as_me:$LINENO: error: not found. Check your installation and look into config.log" >&5 +echo "$as_me: error: not found. Check your installation and look into config.log" >&2;} + { (exit 1); exit 1; }; } + LIBZ="" + +fi + + + + +# Check whether --with-sword-dir was given. +if test "${with_sword_dir+set}" = set; then + withval=$with_sword_dir; + ac_sword_dir=$withval + +else + ac_sword_dir=/usr + +fi + + +# Check whether --enable-static-sword was given. +if test "${enable_static_sword+set}" = set; then + enableval=$enable_static_sword; ac_static_sword="YES" +else + ac_static_sword="" + +fi + + +{ echo "$as_me:$LINENO: checking for Sword library files" >&5 +echo $ECHO_N "checking for Sword library files... $ECHO_C" >&6; } + +ac_sword_library_dirs="$ac_sword_dir/lib /usr/lib /usr/lib/sword /usr/local/lib /usr/local/lib/sword /usr/local/sword/lib" + +if test "$ac_static_sword" = "YES"; then + SEARCH_LIBS="libsword.a"; +else + SEARCH_LIBS="libsword.a libsword.so"; +fi + + +if test "${ac_cv_sword_libdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +ac_cv_sword_libdir=NO +for i in $ac_sword_library_dirs; +do + for j in $SEARCH_LIBS; + do + echo "configure: 19791: $i/$j" >&5 + if test -r "$i/$j"; then + echo "taking that" >&5 + ac_cv_sword_libdir=$i + break 2 + fi + done +done + +fi + + +if test "$ac_cv_sword_libdir" = "NO"; then + { { echo "$as_me:$LINENO: error: SWORD library not found. Try to use configure with --with-sword-dir=/your/SWORD/path!" >&5 +echo "$as_me: error: SWORD library not found. Try to use configure with --with-sword-dir=/your/SWORD/path!" >&2;} + { (exit 1); exit 1; }; }; +fi + +if test "$ac_static_sword" = "YES"; then + LIB_SWORD="$ac_cv_sword_libdir/libsword.a"; +else + LIB_SWORD="-L$ac_cv_sword_libdir -lsword"; +fi + +#AC_SUBST(SWORD_LIBRARY_PATH) + +all_libraries="$all_libraries -L$ac_cv_sword_libdir" + +if test "$ac_static_sword" = "YES"; then + MESSAGE="static library $ac_cv_sword_libdir/libsword.a"; +else + MESSAGE="$ac_cv_sword_libdir"; +fi +{ echo "$as_me:$LINENO: result: $MESSAGE" >&5 +echo "${ECHO_T}$MESSAGE" >&6; } + + + +{ echo "$as_me:$LINENO: checking for Sword include files" >&5 +echo $ECHO_N "checking for Sword include files... $ECHO_C" >&6; } +ac_sword_include_dirs="$ac_sword_dir/include/sword $ac_sword_dir/include /usr/include/sword /usr/include /usr/local/include/sword /usr/local/include /usr/local/sword/include /usr/local/sword/include/sword" + +if test "${ac_cv_sword_incdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +ac_cv_sword_incdir=NO +for i in $ac_sword_include_dirs; +do + for j in swmgr.h; + do + echo "configure: 19842: $i/$j" >&5 + if test -r "$i/$j"; then + echo "taking that" >&5 + ac_cv_sword_incdir=$i + break 2 + fi + done +done + +fi + + +if test "$ac_cv_sword_incdir" = "NO"; then + { { echo "$as_me:$LINENO: error: The Sword include file files were not found. +Please try to use configure with --with-sword-dir=/your/SWORD/path ! +" >&5 +echo "$as_me: error: The Sword include file files were not found. +Please try to use configure with --with-sword-dir=/your/SWORD/path ! +" >&2;} + { (exit 1); exit 1; }; } +fi + +SWORD_INCLUDES="-I$ac_cv_sword_incdir" +SWORD_INCLUDE_DIR="$ac_cv_sword_incdir" + + +all_includes="$all_includes -I$ac_cv_sword_incdir" + +{ echo "$as_me:$LINENO: result: $ac_cv_sword_incdir" >&5 +echo "${ECHO_T}$ac_cv_sword_incdir" >&6; } + + + +{ echo "$as_me:$LINENO: checking if you have Sword 1.5.7 or later" >&5 +echo $ECHO_N "checking if you have Sword 1.5.7 or later... $ECHO_C" >&6; } + +if test "${ac_cv_installed_sword_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + +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_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH +ac_LIBRARY_PATH="$LIBRARY_PATH" +ac_cxxflags_safe="$CXXFLAGS" +ac_ldflags_safe="$LDFLAGS" +ac_libs_safe="$LIBS" + +CXXFLAGS="$CXXFLAGS -I$" +LDFLAGS="$LDFLAGS -L$ac_cv_sword_libdir" +LIBS="$LIB_SWORD -lz" +LD_LIBRARY_PATH="$ac_cv_sword_libdir" +export LD_LIBRARY_PATH +LIBRARY_PATH= +export LIBRARY_PATH + +cat > conftest.$ac_ext < +#include +using std::cout; +using std::endl; +using sword::SWVersion; + +int main(int argc, char* argv) { + if (argc != 2) { + cout << SWVersion::currentVersion << endl; + } + else if (argc == 2) + { + if (SWVersion(&argv[1]) < SWVersion::currentVersion || SWVersion(&argv[1]) == SWVersion::currentVersion) + { + cout << 0 << endl; + return 0; + } + else + { + cout << 1 << endl; + return 1; //version not recent enough + } + } + return 0; +} +EOF + +ac_link='${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest; then + if test -x conftest; then + eval ac_cv_installed_sword_version=`./conftest 2>&5` + echo "configure: ac_cv_installed_sword_version=$ac_cv_installed_sword_version" >&5 + eval sword_test_returncode=`./conftest 1.5.7 2>&5`; + echo "configure: sword_test_returncode=$sword_test_returncode" >&5 + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi + +rm -f conftest* +CXXFLAGS="$ac_cxxflags_safe" +LDFLAGS="$ac_ldflags_safe" +LIBS="$ac_libs_safe" + +LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe" +export LD_LIBRARY_PATH +LIBRARY_PATH="$ac_LIBRARY_PATH" +export LIBRARY_PATH +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 + + +right_version="ok"; +if test "x$sword_test_returncode" = "x1"; then + echo "configure: changing right_version" >&5 + right_version="wrong version"; +fi; + +{ echo "$as_me:$LINENO: result: $ac_cv_installed_sword_version" >&5 +echo "${ECHO_T}$ac_cv_installed_sword_version" >&6; } +echo "configure: right_version=$right_version" >&5 +if test "x$right_version" != "xok"; then + { { echo "$as_me:$LINENO: error: Your Sword installation is not recent enough! $sword_test_returncode Please +upgrade to version 1.5.7!" >&5 +echo "$as_me: error: Your Sword installation is not recent enough! $sword_test_returncode Please +upgrade to version 1.5.7!" >&2;} + { (exit 1); exit 1; }; }; +fi; + + + +# --------------------------------------------------------------------- +# Misc +# --------------------------------------------------------------------- +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# Check whether --enable-swig was given. +if test "${enable_swig+set}" = set; then + enableval=$enable_swig; enable_swig=$enableval +else + enable_swig=no +fi + + if test x$enable_swig = xyes; then + RUNSWIG_TRUE= + RUNSWIG_FALSE='#' +else + RUNSWIG_TRUE='#' + RUNSWIG_FALSE= +fi + + +# --------------------------------------------------------------------- +# Check Scripting languages +# --------------------------------------------------------------------- + + + +PERLBIN= +PERLSWIG= + + +# Check whether --with-perl was given. +if test "${with_perl+set}" = set; then + withval=$with_perl; PERLBIN="$withval" +else + PERLBIN= +fi + + +# First figure out what the name of Perl5 is + +if test -z "$PERLBIN"; then +for ac_prog in perl perl5.6.1 perl5.6.0 perl5.004 perl5.003 perl5.002 perl5.001 perl5 perl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # 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_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$PERL" && break +done + +else +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PERLBIN +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_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +#PERL="$PERLBIN" +fi + + +{ echo "$as_me:$LINENO: checking for Perl5 header files" >&5 +echo $ECHO_N "checking for Perl5 header files... $ECHO_C" >&6; } +if test -n "$PERL"; then + PERL5DIR=`($PERL -e 'use Config; print $Config{archlib};') 2>/dev/null` + if test "$PERL5DIR" != ""; then + dirs="$PERL5DIR $PERL5DIR/CORE" + PERL5EXT=none + PERLBUILD=perl_make + for i in $dirs; do + if test -r $i/perl.h; then + { echo "$as_me:$LINENO: result: $i" >&5 +echo "${ECHO_T}$i" >&6; } + PERL5EXT="$i" + break; + fi + done + if test "$PERL5EXT" = none; then + PERL5EXT="$PERL5DIR/CORE" + { echo "$as_me:$LINENO: result: could not locate perl.h...using $PERL5EXT" >&5 +echo "${ECHO_T}could not locate perl.h...using $PERL5EXT" >&6; } + fi + + { echo "$as_me:$LINENO: checking for Perl5 library" >&5 +echo $ECHO_N "checking for Perl5 library... $ECHO_C" >&6; } + PERL5LIB=`($PERL -e 'use Config; $_=$Config{libperl}; s/^lib//; s/$Config{_a}$//; print $_') 2>/dev/null` + if test "$PERL5LIB" = "" ; then + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } + else + { echo "$as_me:$LINENO: result: $PERL5LIB" >&5 +echo "${ECHO_T}$PERL5LIB" >&6; } + fi + else + { echo "$as_me:$LINENO: result: unable to determine perl5 configuration" >&5 +echo "${ECHO_T}unable to determine perl5 configuration" >&6; } + PERL5EXT=$PERL5DIR + fi +else + { echo "$as_me:$LINENO: result: could not figure out how to run perl5" >&5 +echo "${ECHO_T}could not figure out how to run perl5" >&6; } +# PERL5EXT="/usr/local/lib/perl/archname/5.003/CORE" +fi + +# Only cygwin (Windows) needs the library for dynamic linking +case $ac_sys_system/$ac_sys_release in +CYGWIN*) PERL5DYNAMICLINKING="-L$PERL5EXT -l$PERL5LIB";; +*)PERL5DYNAMICLINKING="";; +esac + + + + + + + + + + +PYINCLUDE= +PYLIB= +PYPACKAGE= +PYTHONBUILD= + +# I don't think any of this commented stuff works anymore + +#PYLINK="-lModules -lPython -lObjects -lParser" + +#AC_ARG_WITH(py,[ --with-py=path Set location of Python],[ +# PYPACKAGE="$withval"], [PYPACKAGE=]) +#AC_ARG_WITH(pyincl,[ --with-pyincl=path Set location of Python include directory],[ +# PYINCLUDE="$withval"], [PYINCLUDE=]) +#AC_ARG_WITH(pylib,[ --with-pylib=path Set location of Python library directory],[ +# PYLIB="$withval"], [PYLIB=]) + +#if test -z "$PYINCLUDE"; then +# if test -n "$PYPACKAGE"; then +# PYINCLUDE="$PYPACKAGE/include" +# fi +#fi + +#if test -z "$PYLIB"; then +# if test -n "$PYPACKAGE"; then +# PYLIB="$PYPACKAGE/lib" +# fi +#fi + + +# Check whether --with-python was given. +if test "${with_python+set}" = set; then + withval=$with_python; PYBIN="$withval" +else + PYBIN= +fi + + +# First figure out the name of the Python executable + +if test -z "$PYBIN"; then +for ac_prog in $prefix/bin/python python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python1.4 python +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PYTHON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # 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_PYTHON="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { echo "$as_me:$LINENO: result: $PYTHON" >&5 +echo "${ECHO_T}$PYTHON" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$PYTHON" && break +done + +else +PYTHON="$PYBIN" +fi + +if test -n "$PYTHON"; then + { echo "$as_me:$LINENO: checking for Python prefix" >&5 +echo $ECHO_N "checking for Python prefix... $ECHO_C" >&6; } + PYPREFIX=`($PYTHON -c "import sys; print sys.prefix") 2>/dev/null` + { echo "$as_me:$LINENO: result: $PYPREFIX" >&5 +echo "${ECHO_T}$PYPREFIX" >&6; } + { echo "$as_me:$LINENO: checking for Python exec-prefix" >&5 +echo $ECHO_N "checking for Python exec-prefix... $ECHO_C" >&6; } + PYEPREFIX=`($PYTHON -c "import sys; print sys.exec_prefix") 2>/dev/null` + { echo "$as_me:$LINENO: result: $PYEPREFIX" >&5 +echo "${ECHO_T}$PYEPREFIX" >&6; } + + + # Note: I could not think of a standard way to get the version string from different versions. + # This trick pulls it out of the file location for a standard library file. + + { echo "$as_me:$LINENO: checking for Python version" >&5 +echo $ECHO_N "checking for Python version... $ECHO_C" >&6; } + + # Need to do this hack since autoconf replaces __file__ with the name of the configure file + filehack="file__" + PYVERSION=`($PYTHON -c "import string,operator; print operator.getitem(string.split(string.__$filehack,'/'),-2)")` + { echo "$as_me:$LINENO: result: $PYVERSION" >&5 +echo "${ECHO_T}$PYVERSION" >&6; } + + # Set the include directory + + { echo "$as_me:$LINENO: checking for Python header files" >&5 +echo $ECHO_N "checking for Python header files... $ECHO_C" >&6; } + if test -r $PYPREFIX/include/$PYVERSION/Python.h; then + PYINCLUDE="-I$PYPREFIX/include/$PYVERSION -I$PYEPREFIX/lib/$PYVERSION/config" + fi + if test -z "$PYINCLUDE"; then + if test -r $PYPREFIX/include/Py/Python.h; then + PYINCLUDE="-I$PYPREFIX/include/Py -I$PYEPREFIX/lib/python/lib" + fi + fi + { echo "$as_me:$LINENO: result: $PYINCLUDE" >&5 +echo "${ECHO_T}$PYINCLUDE" >&6; } + + # Set the library directory blindly. This probably won't work with older versions + { echo "$as_me:$LINENO: checking for Python library" >&5 +echo $ECHO_N "checking for Python library... $ECHO_C" >&6; } + dirs="$PYVERSION/config $PYVERSION/lib python/lib" + for i in $dirs; do + if test -d $PYEPREFIX/lib/$i; then + PYLIB="$PYEPREFIX/lib/$i" + PYTHONBUILD=python_make + break + fi + done + if test -z "$PYLIB"; then + { echo "$as_me:$LINENO: result: Not found" >&5 +echo "${ECHO_T}Not found" >&6; } + else + { echo "$as_me:$LINENO: result: $PYLIB" >&5 +echo "${ECHO_T}$PYLIB" >&6; } + fi + + # Check for really old versions + if test -r $PYLIB/libPython.a; then + PYLINK="-lModules -lPython -lObjects -lParser" + else + PYLINK="-l$PYVERSION" + fi +fi + +# Only cygwin (Windows) needs the library for dynamic linking +case $ac_sys_system/$ac_sys_release in +CYGWIN*) PYTHONDYNAMICLINKING="-L$PYLIB $PYLINK" + PYINCLUDE="-DUSE_DL_IMPORT $PYINCLUDE" + ;; +*)PYTHONDYNAMICLINKING="";; +esac + + + + + + + + + + + +PHP4BIN= + + +# Check whether --with-php4 was given. +if test "${with_php4+set}" = set; then + withval=$with_php4; PHP4BIN="$withval" +else + PHP4BIN= +fi + + +if test -z "$PHP4BIN"; then +for ac_prog in php php4 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PHP4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PHP4 in + [\\/]* | ?:[\\/]*) + ac_cv_path_PHP4="$PHP4" # 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_PHP4="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PHP4=$ac_cv_path_PHP4 +if test -n "$PHP4"; then + { echo "$as_me:$LINENO: result: $PHP4" >&5 +echo "${ECHO_T}$PHP4" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$PHP4" && break +done + +else +PHP4="$PHP4BIN" +fi +{ echo "$as_me:$LINENO: checking for PHP4 header files" >&5 +echo $ECHO_N "checking for PHP4 header files... $ECHO_C" >&6; } +dirs="/usr/include/php /usr/local/include/php /usr/local/apache/php /usr/include/php4 /usr/local/include/php4 /usr/local/apache/php4" +for i in $dirs; do + if test -r $i/php_config.h -o -r $i/php_version.h; then + { echo "$as_me:$LINENO: result: $i" >&5 +echo "${ECHO_T}$i" >&6; } + PHP4EXT="$i" + PHP4INC="-I$PHP4EXT -I$PHP4EXT/Zend -I$PHP4EXT/main -I$PHP4EXT/TSRM" + break; + fi +done +if test -z "$PHP4INC"; then + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } +fi + + + + + + + +TCLINCLUDE= +TCLLIB= +TCLPACKAGE= +#TCLSWIG= + + +# Check whether --with-tclconfig was given. +if test "${with_tclconfig+set}" = set; then + withval=$with_tclconfig; with_tclconfig="$withval" +fi + + +# Check whether --with-tcl was given. +if test "${with_tcl+set}" = set; then + withval=$with_tcl; + TCLPACKAGE="$withval" +else + TCLPACKAGE= +fi + + +# Check whether --with-tclincl was given. +if test "${with_tclincl+set}" = set; then + withval=$with_tclincl; + TCLINCLUDE="-I$withval" +else + TCLINCLUDE= +fi + + +# Check whether --with-tcllib was given. +if test "${with_tcllib+set}" = set; then + withval=$with_tcllib; + TCLLIB="-L$withval" +else + TCLLIB= +fi + + +{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5 +echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; } +# First check to see if --with-tclconfig was specified. +if test x"${with_tclconfig}" != x ; then + if test -f "${with_tclconfig}/tclConfig.sh" ; then + TCLCONFIG=`(cd ${with_tclconfig}; pwd)` + else + { { echo "$as_me:$LINENO: error: ${with_tcl} directory doesn't contain tclConfig.sh" >&5 +echo "$as_me: error: ${with_tcl} directory doesn't contain tclConfig.sh" >&2;} + { (exit 1); exit 1; }; } + fi +fi +# check in a few common install locations +if test x"${TCLCONFIG}" = x ; then + for i in `ls -d /usr/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` ; do + if test -f "$i/tclConfig.sh" ; then + TCLCONFIG=`(cd $i; pwd)` + break + fi + done +fi +if test x"${TCLCONFIG}" = x ; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + { echo "$as_me:$LINENO: result: found $TCLCONFIG/tclConfig.sh" >&5 +echo "${ECHO_T}found $TCLCONFIG/tclConfig.sh" >&6; } + . $TCLCONFIG/tclConfig.sh + TCLINCLUDE=-I$TCL_PREFIX/include + TCLLIB=$TCL_LIB_SPEC +fi + +if test -z "$TCLINCLUDE"; then + if test -n "$TCLPACKAGE"; then + TCLINCLUDE="-I$TCLPACKAGE/include" + fi +fi + +if test -z "$TCLLIB"; then + if test -n "$TCLPACKAGE"; then + TCLLIB="-L$TCLPACKAGE/lib -ltcl" + fi +fi + +{ echo "$as_me:$LINENO: checking for Tcl header files" >&5 +echo $ECHO_N "checking for Tcl header files... $ECHO_C" >&6; } +if test -z "$TCLINCLUDE"; then +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + TCLINCLUDE="" +fi + +rm -f conftest.err conftest.$ac_ext +if test -z "$TCLINCLUDE"; then + dirs="$prefix/include /usr/local/include /usr/include /opt/local/include" + for i in $dirs ; do + if test -r $i/tcl.h; then + { echo "$as_me:$LINENO: result: $i" >&5 +echo "${ECHO_T}$i" >&6; } + TCLINCLUDE="-I$i" + break + fi + done +fi +if test -z "$TCLINCLUDE"; then +# TCLINCLUDE="-I/usr/local/include" + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } +fi +else + { echo "$as_me:$LINENO: result: $TCLINCLUDE" >&5 +echo "${ECHO_T}$TCLINCLUDE" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for Tcl library" >&5 +echo $ECHO_N "checking for Tcl library... $ECHO_C" >&6; } +if test -z "$TCLLIB"; then +dirs="$prefix/lib /usr/local/lib /usr/lib /opt/local/lib" +for i in $dirs ; do + if test -r $i/libtcl.a; then + { echo "$as_me:$LINENO: result: $i" >&5 +echo "${ECHO_T}$i" >&6; } + TCLLIB="-L$i -ltcl" + break + fi +done +if test -z "$TCLLIB"; then + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } +# TCLLIB="-L/usr/local/lib" +fi +else +{ echo "$as_me:$LINENO: result: $TCLLIB" >&5 +echo "${ECHO_T}$TCLLIB" >&6; } +fi + +# Only cygwin (Windows) needs the library for dynamic linking +case $ac_sys_system/$ac_sys_release in +CYGWIN*) TCLDYNAMICLINKING="$TCLLIB";; +*)TCLDYNAMICLINKING="";; +esac + + + + +#AC_SUBST(TCLSWIG) + + + +# --------------------------------------------------------------------- +# Final output +# --------------------------------------------------------------------- +ac_config_files="$ac_config_files 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_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" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +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}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +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=`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. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${RUNSWIG_TRUE}" && test -z "${RUNSWIG_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"RUNSWIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"RUNSWIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${RUNSWIG_TRUE}" && test -z "${RUNSWIG_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"RUNSWIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"RUNSWIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $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} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## 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=: + # 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 + + + + +# PATH needs CR +# 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 + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +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.) +as_nl=' +' +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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); 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 +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +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 +fi +echo >conf$$.file +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 +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=: +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 + +# 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 swordbindings $as_me 1.5.11, which was +generated by GNU Autoconf 2.61. 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 + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet 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 + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +swordbindings config.status 1.5.11 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 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' +MKDIR_P='$MKDIR_P' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +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=$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 ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + 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. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$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 +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + 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_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 '{ (exit 1); 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") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +SED!$SED$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LN_S!$LN_S$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +CPP!$CPP$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +SWIG!$SWIG$ac_delim +RUNSWIG_TRUE!$RUNSWIG_TRUE$ac_delim +RUNSWIG_FALSE!$RUNSWIG_FALSE$ac_delim +USER_INCLUDES!$USER_INCLUDES$ac_delim +USER_LDFLAGS!$USER_LDFLAGS$ac_delim +LIBZ!$LIBZ$ac_delim +LIB_SWORD!$LIB_SWORD$ac_delim +SWORD_INCLUDES!$SWORD_INCLUDES$ac_delim +SWORD_INCLUDE_DIR!$SWORD_INCLUDE_DIR$ac_delim +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim +MAINT!$MAINT$ac_delim +PERL!$PERL$ac_delim +PERL5EXT!$PERL5EXT$ac_delim +PERL5DYNAMICLINKING!$PERL5DYNAMICLINKING$ac_delim +PERL5LIB!$PERL5LIB$ac_delim +PERLBUILD!$PERLBUILD$ac_delim +PYTHON!$PYTHON$ac_delim +PYINCLUDE!$PYINCLUDE$ac_delim +PYLIB!$PYLIB$ac_delim +PYLINK!$PYLINK$ac_delim +PYTHONBUILD!$PYTHONBUILD$ac_delim +PYTHONDYNAMICLINKING!$PYTHONDYNAMICLINKING$ac_delim +PHP4!$PHP4$ac_delim +PHP4INC!$PHP4INC$ac_delim +TCLINCLUDE!$TCLINCLUDE$ac_delim +TCLLIB!$TCLLIB$ac_delim +TCLDYNAMICLINKING!$TCLDYNAMICLINKING$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 35; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[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 || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$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 "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + 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 || +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" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`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 || +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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`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 + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# 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= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + 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 + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;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 +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +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"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +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 + ;; + + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`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 || +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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# 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 || { (exit 1); exit 1; } +fi + diff --git a/bindings/swig/package/configure.ac b/bindings/swig/package/configure.ac new file mode 100644 index 0000000..ffd2b3d --- /dev/null +++ b/bindings/swig/package/configure.ac @@ -0,0 +1,44 @@ +# --------------------------------------------------------------------- +# Initialisation +# --------------------------------------------------------------------- +AC_INIT([swordbindings],[1.5.11],[sword-bugs@crosswire.org]) +AC_CONFIG_SRCDIR(sword.i) +AC_PREREQ(2.59) +AC_REVISION($Revision: 1.2 $) +AM_INIT_AUTOMAKE(swordbindings,1.5.11) + +# --------------------------------------------------------------------- +# Check Programs +# --------------------------------------------------------------------- +AC_LANG(C++) +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_LIBTOOL +SW_PROG_SWIG + +# --------------------------------------------------------------------- +# Check libraries +# --------------------------------------------------------------------- +SW_CHECK_SWORD(1.5.7) + +# --------------------------------------------------------------------- +# Misc +# --------------------------------------------------------------------- +AM_MAINTAINER_MODE +AC_ARG_ENABLE(swig, [--disable-swig do not run swig to generate input files], enable_swig=$enableval, enable_swig=no) +AM_CONDITIONAL([RUNSWIG], [test x$enable_swig = xyes]) + +# --------------------------------------------------------------------- +# Check Scripting languages +# --------------------------------------------------------------------- +SW_FIND_PERL +SW_FIND_PYTHON +SW_FIND_PHP4 +SW_FIND_TCL + +# --------------------------------------------------------------------- +# Final output +# --------------------------------------------------------------------- +AC_CONFIG_FILES(Makefile) +AC_OUTPUT diff --git a/bindings/swig/package/defs.i b/bindings/swig/package/defs.i new file mode 100644 index 0000000..4d94cb6 --- /dev/null +++ b/bindings/swig/package/defs.i @@ -0,0 +1,6 @@ +%{ +#include "defs.h" +%} + +%include "defs.h" + diff --git a/bindings/swig/package/depcomp b/bindings/swig/package/depcomp new file mode 100755 index 0000000..ca5ea4e --- /dev/null +++ b/bindings/swig/package/depcomp @@ -0,0 +1,584 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2006-10-15.18 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. + +# 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, 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 Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/bindings/swig/package/directors.i b/bindings/swig/package/directors.i new file mode 100644 index 0000000..ec5e42c --- /dev/null +++ b/bindings/swig/package/directors.i @@ -0,0 +1,32 @@ +/* +This is a list of all the classes which have directors enabled. + +Directors allow virtual methods of classes to be overridden in a subclass in +the target language. This may have performance implications, and is not +available for all target languages, though it should be for the main ones +*/ +%feature("director") sword::SWLog::logMessage; +%feature("director") PyStringMgr; +%feature("nodirector") PyStringMgr::upperUTF8; +%feature("nodirector") PyStringMgr::upperLatin1; + +%feature("director") RenderCallback; +%feature("director") MarkupCallback; + +%feature("director") SWSearcher; + +%feature("director") sword::StatusReporter; +%feature("director") sword::FTPTransport; +%feature("nodirector") sword::FTPTransport::getDirList; + +%feature("director:except") { + if ($error != NULL) { + throw Swig::DirectorMethodException(); + } +} + +%exception { + try { $action } + catch (Swig::DirectorException &e) { SWIG_fail; } +} + diff --git a/bindings/swig/package/encfiltmgr.i b/bindings/swig/package/encfiltmgr.i new file mode 100644 index 0000000..1e52fb8 --- /dev/null +++ b/bindings/swig/package/encfiltmgr.i @@ -0,0 +1,11 @@ +%{ +#include "encfiltmgr.h" +%} + +%include "encfiltmgr.h" + +%extend sword::EncodingFilterMgr { + static sword::EncodingFilterMgr *castTo(sword::SWFilterMgr *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/package/extras.i b/bindings/swig/package/extras.i new file mode 100755 index 0000000..6422578 --- /dev/null +++ b/bindings/swig/package/extras.i @@ -0,0 +1,13 @@ +%{ +#include "markupcallback.h" +#include "rendercallback.h" +#include "searcher.h" +%} + +%include "markupcallback.h" +%include "rendercallback.h" +%include "searcher.h" + + + + diff --git a/bindings/swig/package/filemgr.i b/bindings/swig/package/filemgr.i new file mode 100644 index 0000000..365ff5b --- /dev/null +++ b/bindings/swig/package/filemgr.i @@ -0,0 +1,6 @@ +%{ +#include "filemgr.h" +%} + +%include "filemgr.h" + diff --git a/bindings/swig/package/ftptrans.i b/bindings/swig/package/ftptrans.i new file mode 100644 index 0000000..923cebc --- /dev/null +++ b/bindings/swig/package/ftptrans.i @@ -0,0 +1,6 @@ +%{ +#include "ftptrans.h" +%} + +%include "ftptrans.h" + diff --git a/bindings/swig/package/install-sh b/bindings/swig/package/install-sh new file mode 100755 index 0000000..4fbbae7 --- /dev/null +++ b/bindings/swig/package/install-sh @@ -0,0 +1,507 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-10-14.15 + +# 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. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +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: +-c (ignored) +-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. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + shift + shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac +done + +if test $# -ne 0 && test -z "$dir_arg$dstarg"; 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 "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$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 "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # 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: $dstarg: 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 + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + 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"; } && + + # Now 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. + { + if test -f "$dst"; then + $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 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + } || 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: diff --git a/bindings/swig/package/installmgr.i b/bindings/swig/package/installmgr.i new file mode 100644 index 0000000..2849520 --- /dev/null +++ b/bindings/swig/package/installmgr.i @@ -0,0 +1,8 @@ +%ignore sword::InstallSource::userData; + +%{ +#include "installmgr.h" +%} + +%include "installmgr.h" + diff --git a/bindings/swig/package/listkey.i b/bindings/swig/package/listkey.i new file mode 100644 index 0000000..3c91343 --- /dev/null +++ b/bindings/swig/package/listkey.i @@ -0,0 +1,21 @@ +%{ +#include "listkey.h" +%} + +%ignore sword::ListKey::operator<<; + +%include "listkey.h" + +/* +%extend { + virtual char SetToElement(int element) { + return self->SetToElement(element, TOP); + }; +} +*/ + +%extend sword::ListKey { + static sword::ListKey *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/package/localemgr.i b/bindings/swig/package/localemgr.i new file mode 100644 index 0000000..05d8a4e --- /dev/null +++ b/bindings/swig/package/localemgr.i @@ -0,0 +1,13 @@ +%{ +#include +%} + +%include "localemgr.h" + +%extend sword::LocaleMgr { + std::vector < sword::SWBuf > getAvailableLocalesVector() { + std::list l(self->getAvailableLocales()); + return std::vector< sword::SWBuf >(l.begin(), l.end()); + } +} + diff --git a/bindings/swig/package/ltmain.sh b/bindings/swig/package/ltmain.sh new file mode 100644 index 0000000..8e5a930 --- /dev/null +++ b/bindings/swig/package/ltmain.sh @@ -0,0 +1,6930 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# 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 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. + +basename="s,^.*/,,g" + +# 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: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.24 +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" + +# Be Bourne compatible (taken from Autoconf:_AS_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 + +# 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 <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# 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 "$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" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# 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 () +{ + 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 -e '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_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 () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + 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. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + 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 + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run 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 + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + 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 + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + 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" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + 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 have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + 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}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $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" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 2007 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." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.[fF][09]?) xform=[fF][09]. ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # 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 + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + 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" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + 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 $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "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." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </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." + + $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 + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </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." + + $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 + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + 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 + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$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" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$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 (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + 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. + libobjs="$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 + non_pic_objects="$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" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + 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 + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + 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 + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -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 + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + 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*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + 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*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$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*) + # 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 -framework System" + 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 + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -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* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # @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*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + 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*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + 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 + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + 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. + libobjs="$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 + non_pic_objects="$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" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_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. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + 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\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + 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 test "X$duplicate_deps" = "Xyes" ; 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 test "X$duplicate_compiler_generated_deps" = "Xyes" ; 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 + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + 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 + 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% $dependency_libs" ;; + esac + 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" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; 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 (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + 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 + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + 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 + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + 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 + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # 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) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 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 used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + 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 + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # 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 + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + 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 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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 test "X$duplicate_deps" = "Xyes" ; 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 + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + 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 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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 + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # 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 + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + 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 + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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" + # 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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + 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 test "X$duplicate_deps" = "Xyes" ; 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 + *" $dir "*) ;; + *" $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 + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if 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 + realname="$2" + shift; 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*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + 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 module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; 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 + 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; 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 + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + 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; 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + 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 test "X$duplicate_deps" = "Xyes" ; 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 + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + 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 "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + 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" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # 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*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + 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 + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # 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="$2" + number_minor="$3" + number_revision="$4" + # + # 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) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + 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]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + 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]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + 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]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + 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 + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + 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 + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi + 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 + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + 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 + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + 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 + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + 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) + ;; + $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 + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + 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 "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -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*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-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. + $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} 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 + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + 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 \"$potent_lib\" 2>/dev/null \ + | ${SED} 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 + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + 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" | ${SED} -e "1s,^X,," -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 is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + 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 + + + # 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 + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac + 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 + realname="$2" + shift; 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` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "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"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$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"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + 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 + $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:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # 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= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$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\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + 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 ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "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" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + 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\" + 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 + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(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 + $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 + $show "${rm}r $gentop" + $run ${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 + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run 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 "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $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" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${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" + # $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" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + 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 / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + 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*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$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 + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$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 arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # 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/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + 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*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + 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" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + 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. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run 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" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + 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" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + 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. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "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}\" || 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 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + 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 our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + 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 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#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 DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# 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 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#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); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +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; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +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; + + DEBUG("(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 * +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); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# 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 (taken from Autoconf:_AS_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 variable: + 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 >> $output "\ + + # 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 + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + 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 >> $output "\ + + # 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 $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + 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 >> $output "\ + # 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 >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + 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*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + 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" + 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" + 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 + # 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 + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$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 + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_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 + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$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= + 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 + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "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}\" || 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 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; 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" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + 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) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + 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) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# 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' + +# Libraries that this one depends upon. +dependency_libs='$dependency_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 + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # 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. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # 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. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + 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. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # 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 + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "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. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run 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 + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run 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 + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run 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 + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + 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 + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo 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. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo 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. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + 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) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + 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. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && 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" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + 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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; 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 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 + 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 + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + 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 + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + 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 (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $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. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $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) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # 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 + $show "$rm $rmfiles" + $run $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 + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [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 + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +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 \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [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: $modename [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 + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always 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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [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 + -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] + +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: $modename [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." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# 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 +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/bindings/swig/package/lzsscomprs.i b/bindings/swig/package/lzsscomprs.i new file mode 100644 index 0000000..f2ed093 --- /dev/null +++ b/bindings/swig/package/lzsscomprs.i @@ -0,0 +1,11 @@ +%{ +#include +%} + +%include "lzsscomprs.h" + +%extend sword::LZSSCompress { + static sword::LZSSCompress *castTo(sword::SWCompress *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/package/markupcallback.h b/bindings/swig/package/markupcallback.h new file mode 100755 index 0000000..cef01b7 --- /dev/null +++ b/bindings/swig/package/markupcallback.h @@ -0,0 +1,47 @@ +#include +#include +#include +using namespace sword; + +class MarkupCallback { +public: + virtual ~MarkupCallback() { ;} + virtual bool run(SWModule* x) {return false;} +}; + + class MyMarkup : public MarkupFilterMgr + { + + private: + MarkupCallback* _callback; + + public: + + MyMarkup(MarkupCallback* callback, char markup = FMT_THML, char encoding = ENC_UTF8): MarkupFilterMgr(markup, encoding), _callback(callback) + {} + virtual ~MyMarkup() { + delCallback(); + } + void delCallback() { + delete _callback; _callback = 0; + } + void setCallback(MarkupCallback *cb) + { + delCallback(); + _callback = cb; + } + bool call(SWModule* x) { + if (_callback) + return _callback->run(x); + return false; + } + protected: + virtual void AddRenderFilters(SWModule *module, ConfigEntMap + §ion) { + if(!call(module)) { + MarkupFilterMgr::AddRenderFilters(module, section); + } + } + }; + + diff --git a/bindings/swig/package/markupfiltmgr.i b/bindings/swig/package/markupfiltmgr.i new file mode 100644 index 0000000..d675d64 --- /dev/null +++ b/bindings/swig/package/markupfiltmgr.i @@ -0,0 +1,13 @@ +%{ +#include +using namespace sword; +%} + +%include "markupfiltmgr.h" + + +%extend sword::MarkupFilterMgr { + static sword::MarkupFilterMgr *castTo(sword::SWFilterMgr *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/package/missing b/bindings/swig/package/missing new file mode 100755 index 0000000..1c8ff70 --- /dev/null +++ b/bindings/swig/package/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# 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, 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. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# 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: diff --git a/bindings/swig/package/osishtmlhref.i b/bindings/swig/package/osishtmlhref.i new file mode 100755 index 0000000..d721b0c --- /dev/null +++ b/bindings/swig/package/osishtmlhref.i @@ -0,0 +1,16 @@ +%{ +#include +#include +#include +#include +#include +#include "utf8html.h" +%} + +%include +%include "osishtmlhref.h" +%include "plainhtml.h" +%include "thmlhtmlhref.h" +%include "gbfhtmlhref.h" +%include "utf8html.h" + diff --git a/bindings/swig/package/perl.m4 b/bindings/swig/package/perl.m4 new file mode 100644 index 0000000..9add0b3 --- /dev/null +++ b/bindings/swig/package/perl.m4 @@ -0,0 +1,71 @@ +#---------------------------------------------------------------- +# Look for Perl5 +#---------------------------------------------------------------- + +AC_DEFUN(SW_FIND_PERL, +[ + + +PERLBIN= +PERLSWIG= + +AC_ARG_WITH(perl,[ --with-perl=path Set location of Perl5 executable],[ PERLBIN="$withval"], [PERLBIN=]) + +# First figure out what the name of Perl5 is + +if test -z "$PERLBIN"; then +AC_PATH_PROGS(PERL, perl perl5.6.1 perl5.6.0 perl5.004 perl5.003 perl5.002 perl5.001 perl5 perl) +else +AC_PATH_PROG(PERL, perl, , $PERLBIN) +#PERL="$PERLBIN" +fi + + +AC_MSG_CHECKING(for Perl5 header files) +if test -n "$PERL"; then + PERL5DIR=`($PERL -e 'use Config; print $Config{archlib};') 2>/dev/null` + if test "$PERL5DIR" != ""; then + dirs="$PERL5DIR $PERL5DIR/CORE" + PERL5EXT=none + PERLBUILD=perl_make + for i in $dirs; do + if test -r $i/perl.h; then + AC_MSG_RESULT($i) + PERL5EXT="$i" + break; + fi + done + if test "$PERL5EXT" = none; then + PERL5EXT="$PERL5DIR/CORE" + AC_MSG_RESULT(could not locate perl.h...using $PERL5EXT) + fi + + AC_MSG_CHECKING(for Perl5 library) + PERL5LIB=`($PERL -e 'use Config; $_=$Config{libperl}; s/^lib//; s/$Config{_a}$//; print $_') 2>/dev/null` + if test "$PERL5LIB" = "" ; then + AC_MSG_RESULT(not found) + else + AC_MSG_RESULT($PERL5LIB) + fi + else + AC_MSG_RESULT(unable to determine perl5 configuration) + PERL5EXT=$PERL5DIR + fi +else + AC_MSG_RESULT(could not figure out how to run perl5) +# PERL5EXT="/usr/local/lib/perl/archname/5.003/CORE" +fi + +# Only cygwin (Windows) needs the library for dynamic linking +case $ac_sys_system/$ac_sys_release in +CYGWIN*) PERL5DYNAMICLINKING="-L$PERL5EXT -l$PERL5LIB";; +*)PERL5DYNAMICLINKING="";; +esac + + +AC_SUBST(PERL5EXT) +AC_SUBST(PERL5DYNAMICLINKING) +AC_SUBST(PERL5LIB) +AC_SUBST(PERLBUILD) + +]) diff --git a/bindings/swig/package/php4.m4 b/bindings/swig/package/php4.m4 new file mode 100644 index 0000000..d184ec2 --- /dev/null +++ b/bindings/swig/package/php4.m4 @@ -0,0 +1,33 @@ +#------------------------------------------------------------------------- +# Look for Php4 +#------------------------------------------------------------------------- + +AC_DEFUN(SW_FIND_PHP4, +[ + +PHP4BIN= + +AC_ARG_WITH(php4,[ --with-php4=path Set location of PHP4 executable],[ PHP4BIN="$withval"], [PHP4BIN=]) + +if test -z "$PHP4BIN"; then +AC_PATH_PROGS(PHP4, php php4) +else +PHP4="$PHP4BIN" +fi +AC_MSG_CHECKING(for PHP4 header files) +dirs="/usr/include/php /usr/local/include/php /usr/local/apache/php /usr/include/php4 /usr/local/include/php4 /usr/local/apache/php4" +for i in $dirs; do + if test -r $i/php_config.h -o -r $i/php_version.h; then + AC_MSG_RESULT($i) + PHP4EXT="$i" + PHP4INC="-I$PHP4EXT -I$PHP4EXT/Zend -I$PHP4EXT/main -I$PHP4EXT/TSRM" + break; + fi +done +if test -z "$PHP4INC"; then + AC_MSG_RESULT(not found) +fi + +AC_SUBST(PHP4INC) + +]) diff --git a/bindings/swig/package/python.m4 b/bindings/swig/package/python.m4 new file mode 100644 index 0000000..a047ea4 --- /dev/null +++ b/bindings/swig/package/python.m4 @@ -0,0 +1,117 @@ +#---------------------------------------------------------------- +# Look for Python +#---------------------------------------------------------------- + +AC_DEFUN(SW_FIND_PYTHON, +[ + +PYINCLUDE= +PYLIB= +PYPACKAGE= +PYTHONBUILD= + +# I don't think any of this commented stuff works anymore + +#PYLINK="-lModules -lPython -lObjects -lParser" + +#AC_ARG_WITH(py,[ --with-py=path Set location of Python],[ +# PYPACKAGE="$withval"], [PYPACKAGE=]) +#AC_ARG_WITH(pyincl,[ --with-pyincl=path Set location of Python include directory],[ +# PYINCLUDE="$withval"], [PYINCLUDE=]) +#AC_ARG_WITH(pylib,[ --with-pylib=path Set location of Python library directory],[ +# PYLIB="$withval"], [PYLIB=]) + +#if test -z "$PYINCLUDE"; then +# if test -n "$PYPACKAGE"; then +# PYINCLUDE="$PYPACKAGE/include" +# fi +#fi + +#if test -z "$PYLIB"; then +# if test -n "$PYPACKAGE"; then +# PYLIB="$PYPACKAGE/lib" +# fi +#fi + +AC_ARG_WITH(python,[ --with-python=path Set location of Python executable],[ PYBIN="$withval"], [PYBIN=]) + +# First figure out the name of the Python executable + +if test -z "$PYBIN"; then +AC_PATH_PROGS(PYTHON, $prefix/bin/python python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python1.4 python) +else +PYTHON="$PYBIN" +fi + +if test -n "$PYTHON"; then + AC_MSG_CHECKING(for Python prefix) + PYPREFIX=`($PYTHON -c "import sys; print sys.prefix") 2>/dev/null` + AC_MSG_RESULT($PYPREFIX) + AC_MSG_CHECKING(for Python exec-prefix) + PYEPREFIX=`($PYTHON -c "import sys; print sys.exec_prefix") 2>/dev/null` + AC_MSG_RESULT($PYEPREFIX) + + + # Note: I could not think of a standard way to get the version string from different versions. + # This trick pulls it out of the file location for a standard library file. + + AC_MSG_CHECKING(for Python version) + + # Need to do this hack since autoconf replaces __file__ with the name of the configure file + filehack="file__" + PYVERSION=`($PYTHON -c "import string,operator; print operator.getitem(string.split(string.__$filehack,'/'),-2)")` + AC_MSG_RESULT($PYVERSION) + + # Set the include directory + + AC_MSG_CHECKING(for Python header files) + if test -r $PYPREFIX/include/$PYVERSION/Python.h; then + PYINCLUDE="-I$PYPREFIX/include/$PYVERSION -I$PYEPREFIX/lib/$PYVERSION/config" + fi + if test -z "$PYINCLUDE"; then + if test -r $PYPREFIX/include/Py/Python.h; then + PYINCLUDE="-I$PYPREFIX/include/Py -I$PYEPREFIX/lib/python/lib" + fi + fi + AC_MSG_RESULT($PYINCLUDE) + + # Set the library directory blindly. This probably won't work with older versions + AC_MSG_CHECKING(for Python library) + dirs="$PYVERSION/config $PYVERSION/lib python/lib" + for i in $dirs; do + if test -d $PYEPREFIX/lib/$i; then + PYLIB="$PYEPREFIX/lib/$i" + PYTHONBUILD=python_make + break + fi + done + if test -z "$PYLIB"; then + AC_MSG_RESULT(Not found) + else + AC_MSG_RESULT($PYLIB) + fi + + # Check for really old versions + if test -r $PYLIB/libPython.a; then + PYLINK="-lModules -lPython -lObjects -lParser" + else + PYLINK="-l$PYVERSION" + fi +fi + +# Only cygwin (Windows) needs the library for dynamic linking +case $ac_sys_system/$ac_sys_release in +CYGWIN*) PYTHONDYNAMICLINKING="-L$PYLIB $PYLINK" + PYINCLUDE="-DUSE_DL_IMPORT $PYINCLUDE" + ;; +*)PYTHONDYNAMICLINKING="";; +esac + + +AC_SUBST(PYINCLUDE) +AC_SUBST(PYLIB) +AC_SUBST(PYLINK) +AC_SUBST(PYTHONBUILD) +AC_SUBST(PYTHONDYNAMICLINKING) + +]) diff --git a/bindings/swig/package/rawcom.i b/bindings/swig/package/rawcom.i new file mode 100644 index 0000000..5e9c17b --- /dev/null +++ b/bindings/swig/package/rawcom.i @@ -0,0 +1,14 @@ +%{ +#include "rawcom.h" +%} + + +%include "rawcom.h" + + + +%extend sword::RawCom { + static sword::RawCom *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/package/rawgenbook.i b/bindings/swig/package/rawgenbook.i new file mode 100644 index 0000000..ac4fd1c --- /dev/null +++ b/bindings/swig/package/rawgenbook.i @@ -0,0 +1,12 @@ +%{ +#include "rawgenbook.h" +%} + +%include "rawgenbook.h" + +%extend sword::RawGenBook { + static sword::RawGenBook *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } + +} diff --git a/bindings/swig/package/rawld.i b/bindings/swig/package/rawld.i new file mode 100644 index 0000000..b1a10df --- /dev/null +++ b/bindings/swig/package/rawld.i @@ -0,0 +1,12 @@ +%{ +#include "rawld.h" +%} + +%include "rawld.h" + +%extend sword::RawLD { + static sword::RawLD *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } + +} diff --git a/bindings/swig/package/rawld4.i b/bindings/swig/package/rawld4.i new file mode 100644 index 0000000..27e47b2 --- /dev/null +++ b/bindings/swig/package/rawld4.i @@ -0,0 +1,12 @@ +%{ +#include "rawld4.h" +%} + +%include "rawld4.h" + +%extend sword::RawLD4 { + static sword::RawLD4 *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } + +} diff --git a/bindings/swig/package/rawtext.i b/bindings/swig/package/rawtext.i new file mode 100644 index 0000000..fa2d019 --- /dev/null +++ b/bindings/swig/package/rawtext.i @@ -0,0 +1,12 @@ +%{ +#include "rawtext.h" +%} + +%include "rawtext.h" + + +%extend sword::RawText { + static sword::RawText *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/package/rendercallback.h b/bindings/swig/package/rendercallback.h new file mode 100755 index 0000000..8a19a86 --- /dev/null +++ b/bindings/swig/package/rendercallback.h @@ -0,0 +1,223 @@ +#ifndef _RENDERCALLBACK_H +#define _RENDERCALLBACK_H +#include +#include +#include +#include +#include +#include +#include + +#define FAILED 0 +#define SUCCEEDED 1 +#define INHERITED 2 + +using namespace sword; + +class ReturnSuccess +{ +public: + ReturnSuccess(): data(""), success(FAILED) {} + ReturnSuccess(char* data, int success): data(data), success(success) {} + virtual ~ReturnSuccess() {} + char* data; + int success; +}; + + +class RenderCallback { +public: + virtual ~RenderCallback() {;} + + virtual ReturnSuccess run(sword::SWBuf& x, const char * token, + sword::BasicFilterUserData* userData) + { + ReturnSuccess nullm("", INHERITED); + return nullm; + } +}; + +// Forward declarations +class OSISData; +class ThMLData; + + +class PyOSISHTMLHREF: public sword::OSISHTMLHREF +{ +private: + RenderCallback* _callback; + +public: + // Create a class which can be inherited externally +#ifndef SWIG + using sword::OSISHTMLHREF::MyUserData; + class MyOsisUserData : public MyUserData {}; +#endif + + PyOSISHTMLHREF(RenderCallback* callback) + { + _callback=callback; + } + + static OSISData* getData(sword::BasicFilterUserData* f) + { + return (OSISData*) f; + } + + virtual ~PyOSISHTMLHREF() + { + delCallback(); + } + + void delCallback() + { + delete _callback; + _callback = 0; + } + + void setCallback(RenderCallback *cb) + { + delCallback(); + _callback = cb; + } + + ReturnSuccess call(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) + { + if (_callback) return _callback->run(buf, token, userData); + else + { + ReturnSuccess nullm("", INHERITED); + return nullm; + } + } + + protected: + virtual bool handleToken(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) + { + ReturnSuccess result = call(buf, token, userData); + switch(result.success) + { + case INHERITED: + return sword::OSISHTMLHREF::handleToken(buf, token, userData); + case FAILED: + return false; + case SUCCEEDED: + buf += result.data; + return true; + } + + return true; + } + }; + + +class PyThMLHTMLHREF : public ThMLHTMLHREF { +private: + RenderCallback* _callback; +public: + // Create a class which can be inherited externally +#ifndef SWIG + using sword::ThMLHTMLHREF::MyUserData; + class MyThmlUserData : public MyUserData {}; +#endif + + PyThMLHTMLHREF(RenderCallback* callback) + { + _callback=callback; + } + + static ThMLData* getData(sword::BasicFilterUserData* f) + { + return (ThMLData*) f; + } + + virtual ~PyThMLHTMLHREF() + { + delCallback(); + } + + void delCallback() + { + delete _callback; + _callback = 0; + } + + void setCallback(RenderCallback *cb) + { + delCallback(); + _callback = cb; + } + + ReturnSuccess call(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) + { + if (_callback) return _callback->run(buf, token, userData); + else + { + ReturnSuccess nullm("", INHERITED); + return nullm; + } + } +protected: + virtual bool handleToken(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) + { + ReturnSuccess result = call(buf, token, userData); + switch(result.success) + { + case INHERITED: + return sword::ThMLHTMLHREF::handleToken(buf, token, userData); + case FAILED: + return false; + case SUCCEEDED: + buf += result.data; + return true; + } + + return true; + } + +public: + + +}; + +class OSISData : +#ifndef SWIG +public PyOSISHTMLHREF::MyOsisUserData { +#else +// trick SWIG into thinking this is not inherited from an inner class... +public sword::BasicFilterUserData +{ +public: + bool osisQToTick; + bool inBold; + bool inXRefNote; + bool BiblicalText; + int suspendLevel; + SWBuf wordsOfChristStart; + SWBuf wordsOfChristEnd; + SWBuf lastTransChange; + SWBuf w; + SWBuf fn; + SWBuf version; + +#endif //!SWIG +}; + +class ThMLData : +#ifndef SWIG +public PyThMLHTMLHREF::MyThmlUserData { +#else +// trick SWIG into thinking this is not inherited from an inner class... +public sword::BasicFilterUserData +{ +public: + SWBuf inscriptRef; + bool SecHead; + bool BiblicalText; + SWBuf version; + XMLTag startTag; + +#endif //!SWIG +}; + +#endif // _RENDERCALLBACK_H diff --git a/bindings/swig/package/searcher.h b/bindings/swig/package/searcher.h new file mode 100755 index 0000000..f7bf568 --- /dev/null +++ b/bindings/swig/package/searcher.h @@ -0,0 +1,39 @@ +using namespace sword; +class SWSearcher{ + public: + sword::SWModule* mod; + int percent; + + static void Callback(char status, void *me){ + SWSearcher* searcher = (SWSearcher*)me; + searcher->PercentFunction((int) status); + } + + virtual void PercentFunction(int value){ + percent=value; + } + + SWSearcher(sword::SWModule* Mod){mod=Mod;} + virtual ~SWSearcher(){} + + int GetPercent(){return percent;} + + bool isSearchSupported(const char *istr, int searchType = 0, + int flags = 0, + SWKey * scope = 0) { + bool checksupported = true; + mod->search(istr, searchType, flags, scope, &checksupported); + return checksupported; + } + + ListKey &doSearch(const char *istr, int searchType = 0, int flags = 0, + SWKey *scope = 0) { + return mod->search(istr, searchType, flags, scope, + 0, this->Callback, (void *) this); + } + + void TerminateSearch(){ + mod->terminateSearch=true; + } +}; + diff --git a/bindings/swig/package/stringmgr.i b/bindings/swig/package/stringmgr.i new file mode 100644 index 0000000..ba216b1 --- /dev/null +++ b/bindings/swig/package/stringmgr.i @@ -0,0 +1,26 @@ + +%{ +#include "stringmgr.h" +class PyStringMgr : public sword::StringMgr +{ + public: + char *upperUTF8(char *text, unsigned int max = 0) const + { + sword::SWBuf buf=(const char*)text; + getUpper(&buf); + strncpy(text, buf.c_str(), (max) ? max : strlen(text)); + return text; + } + + virtual void getUpper(sword::SWBuf* test) const = 0; +}; +%} + +%include "stringmgr.h" +class PyStringMgr : public sword::StringMgr +{ + public: + char *upperUTF8(char *text, unsigned int max = 0) const; + virtual void getUpper(sword::SWBuf* test) const = 0; +}; + diff --git a/bindings/swig/package/swbuf.i b/bindings/swig/package/swbuf.i new file mode 100644 index 0000000..6ae7bd0 --- /dev/null +++ b/bindings/swig/package/swbuf.i @@ -0,0 +1,37 @@ +%{ +#include "swbuf.h" +%} + +%ignore sword::SWBuf::operator const char *; +%ignore sword::SWBuf::operator[]; +%ignore sword::SWBuf::operator+; +%ignore sword::SWBuf::operator==; +%ignore sword::SWBuf::operator!=; +%ignore sword::SWBuf::operator+=; +%ignore sword::SWBuf::operator-=; +%ignore sword::SWBuf::operator<=; +%ignore sword::SWBuf::operator>=; +%ignore sword::SWBuf::operator<; +%ignore sword::SWBuf::operator>; +%ignore sword::SWBuf::operator<<; +%ignore sword::SWBuf::operator>>; +%ignore sword::SWBuf::operator=; +%ignore sword::SWBuf::operator--; +%ignore sword::SWBuf::charAt(unsigned long); + +/* Ignore this horrible constructor. +* This would be the default for single character strings passed in. This can +* lead to changing of immutable strings!!!! +*/ +%ignore sword::SWBuf::SWBuf(char, unsigned long); + + +%include "swbuf.h" + + +%extend sword::SWBuf { + char charAt2(unsigned int pos) { + return self->charAt((unsigned long)pos); + } +}; + diff --git a/bindings/swig/package/swcacher.i b/bindings/swig/package/swcacher.i new file mode 100644 index 0000000..99b065e --- /dev/null +++ b/bindings/swig/package/swcacher.i @@ -0,0 +1,6 @@ +%{ +#include "swcacher.h" +%} + +%include "swcacher.h" + diff --git a/bindings/swig/package/swcom.i b/bindings/swig/package/swcom.i new file mode 100644 index 0000000..90291cf --- /dev/null +++ b/bindings/swig/package/swcom.i @@ -0,0 +1,14 @@ +%{ +#include "swcom.h" +%} + +%ignore sword::SWCom::SWCom; + +%include "swcom.h" + +%extend sword::SWCom { + /* C++-style cast */ + static sword::SWCom *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/package/swcomprs.i b/bindings/swig/package/swcomprs.i new file mode 100644 index 0000000..3cdd653 --- /dev/null +++ b/bindings/swig/package/swcomprs.i @@ -0,0 +1,10 @@ +%{ +#include +%} + +%ignore sword::SWCompress::Buf; +%ignore sword::SWCompress::zBuf; +%ignore sword::SWCompress::GetChars; +%ignore sword::SWCompress::SendChars; + +%include "swcomprs.h" diff --git a/bindings/swig/package/swconfig.i b/bindings/swig/package/swconfig.i new file mode 100644 index 0000000..6ec1cad --- /dev/null +++ b/bindings/swig/package/swconfig.i @@ -0,0 +1,25 @@ +%{ +#include "swconfig.h" +%} + +%ignore sword::SWConfig::operator[]; +%ignore sword::SWConfig::operator+=; +%ignore sword::SWConfig::sections; +%ignore sword::SWConfig::Sections; + +%include "swconfig.h" + + +%extend sword::SWConfig { + void set(const char* group, const char* entry, const char* value) { + self->Sections[group][entry] = value; + }; + const char* get(const char* group, const char* entry) { + return self->Sections[group][entry].c_str(); + }; + std::multimap < sword::SWBuf, std::map > + *getSections() { + return (std::multimap < sword::SWBuf, std::map < sword::SWBuf, sword::SWBuf > > *) &self->Sections; + } +} + diff --git a/bindings/swig/package/swdisp.i b/bindings/swig/package/swdisp.i new file mode 100644 index 0000000..3451cd7 --- /dev/null +++ b/bindings/swig/package/swdisp.i @@ -0,0 +1,5 @@ +%{ +#include "swdisp.h" +%} + +%include "swdisp.h" diff --git a/bindings/swig/package/swfilter.i b/bindings/swig/package/swfilter.i new file mode 100644 index 0000000..46f659a --- /dev/null +++ b/bindings/swig/package/swfilter.i @@ -0,0 +1,7 @@ +%{ +#include +%} + +%ignore sword::SWFilter::getOptionValues; + +%include "swfilter.h" diff --git a/bindings/swig/package/swfiltermgr.i b/bindings/swig/package/swfiltermgr.i new file mode 100644 index 0000000..fb6b507 --- /dev/null +++ b/bindings/swig/package/swfiltermgr.i @@ -0,0 +1,12 @@ +%{ +#include +%} + +%ignore sword::SWFilterMgr::AddGlobalOptions; +%ignore sword::SWFilterMgr::AddLocalOptions; +%ignore sword::SWFilterMgr::AddEncodingFilters; +%ignore sword::SWFilterMgr::AddRenderFilters; +%ignore sword::SWFilterMgr::AddStripFilters; +%ignore sword::SWFilterMgr::AddRawFilters; + +%include "swfiltermgr.h" diff --git a/bindings/swig/package/swgenbook.i b/bindings/swig/package/swgenbook.i new file mode 100644 index 0000000..aef3df0 --- /dev/null +++ b/bindings/swig/package/swgenbook.i @@ -0,0 +1,11 @@ +%{ +#include "swgenbook.h" +%} + +%include "swgenbook.h" + +%extend sword::SWGenBook { + static sword::SWGenBook *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/package/swig.m4 b/bindings/swig/package/swig.m4 new file mode 100644 index 0000000..9ff89d7 --- /dev/null +++ b/bindings/swig/package/swig.m4 @@ -0,0 +1,29 @@ +#---------------------------------------------------------------- +# Look for SWIG +#---------------------------------------------------------------- + +AC_DEFUN(SW_PROG_SWIG, +[ + +AC_ARG_WITH(swigbin,[ --with-swigbin=path Set location of swig executable],[ SWIGBIN="$withval"], [SWIGBIN=]) +AC_ARG_ENABLE(swig,[ --enable-swig=path Run swig to generate new source default=no],, enable_swig=no) + +if test -z "$SWIGBIN"; then +AC_PATH_PROG(SWIG, swig) +else +AC_PATH_PROG(SWIG, swig, "not found", $SWIGBIN) +fi + +runswig=true +if test x"$SWIG"="xnot found"; then + runswig=false +fi +if test x"$enable_swig"="xno"; then + runswig=false +fi + +AM_CONDITIONAL(RUNSWIG, test x$runswig = xtrue) + +#ac_cv_swigversion=`` + +]) diff --git a/bindings/swig/package/swkey.i b/bindings/swig/package/swkey.i new file mode 100644 index 0000000..77412c1 --- /dev/null +++ b/bindings/swig/package/swkey.i @@ -0,0 +1,9 @@ +%{ +#include "swkey.h" +%} + +%ignore sword::SWKey::userData; + +%rename (getPosition) sword::SW_POSITION::operator char; + +%include "swkey.h" diff --git a/bindings/swig/package/swld.i b/bindings/swig/package/swld.i new file mode 100644 index 0000000..135f14e --- /dev/null +++ b/bindings/swig/package/swld.i @@ -0,0 +1,13 @@ +%{ +#include "swld.h" +%} + +%ignore sword::SWLD::SWLD; + +%include "swld.h" + +%extend sword::SWLD { + static sword::SWLD *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/package/swlocale.i b/bindings/swig/package/swlocale.i new file mode 100644 index 0000000..d98a126 --- /dev/null +++ b/bindings/swig/package/swlocale.i @@ -0,0 +1,31 @@ +%{ +#include "swlocale.h" +%} + +%ignore sword::SWLocale::operator+=; +%ignore sword::SWLocale::getBooks; + +%include "swlocale.h" + +%extend sword::SWLocale { + int getNumBookGroupings() { + return 2; + } + + int getNumBooks(int grouping) { + char *numbooks; + struct sbook **books; + + self->getBooks(&numbooks, &books); + + return numbooks[grouping]; + } + + sbook getBook(int grouping, int booknum) { + char *numbooks; + struct sbook **books; + self->getBooks(&numbooks, &books); + + return books[grouping][booknum]; + } +}; diff --git a/bindings/swig/package/swlog.i b/bindings/swig/package/swlog.i new file mode 100644 index 0000000..4b8a0f0 --- /dev/null +++ b/bindings/swig/package/swlog.i @@ -0,0 +1,6 @@ +%{ +#include "swlog.h" +%} + +%include "swlog.h" + diff --git a/bindings/swig/package/swmgr.i b/bindings/swig/package/swmgr.i new file mode 100644 index 0000000..f00490a --- /dev/null +++ b/bindings/swig/package/swmgr.i @@ -0,0 +1,40 @@ +%{ +#include +%} + +%ignore sword::SWMgr::Modules; +%ignore sword::SWMgr::findConfig; +%include "swmgr.h" + +%extend sword::SWMgr { + std::vector < sword::SWBuf > getGlobalOptionsVector() { + std::list l(self->getGlobalOptions()); + return std::vector< sword::SWBuf >(l.begin(), l.end()); + } + + std::vector < sword::SWBuf > getGlobalOptionValuesVector(const char *option) { + std::list l(self->getGlobalOptionValues(option)); + return std::vector< sword::SWBuf >(l.begin(), l.end()); + } + + std::map &getModules() { + return self->Modules; + } + + SWModule* getModuleAt( const int pos ) { + if (pos < 0 || pos > self->Modules.size() ) + return 0; + + sword::ModMap::iterator it = self->Modules.begin(); + + for (int i = 0; i < pos; ++i) { + it++; + } + + if ( it != self->Modules.end() ) { + return (*it).second; + } + + return 0; + } +} diff --git a/bindings/swig/package/swmodule.i b/bindings/swig/package/swmodule.i new file mode 100644 index 0000000..c9cce5e --- /dev/null +++ b/bindings/swig/package/swmodule.i @@ -0,0 +1,35 @@ +%{ +#include "swmodule.h" +%} + +%ignore sword::SWModule::operator sword::SWKey &; +%ignore sword::SWModule::operator sword::SWKey *; + +%ignore sword::SWModule::Search; + +%ignore sword::SWModule::SWModule; +%ignore sword::SWModule::filterBuffer; +%ignore sword::SWModule::getEntryAttributes; +%ignore sword::SWModule::getConfig; +%ignore sword::SWModule::setConfig; + +%include "swmodule.h" + +%extend sword::SWModule { + + static sword::SWModule *castTo(sword::SWSearchable *o) { + return dynamic_cast(o); + } + + + std::map < sword::SWBuf, std::map < sword::SWBuf, std::map < sword::SWBuf, sword::SWBuf > > > + + &getEntryAttributesMap() { + return self->getEntryAttributes(); + } + + std::map *getConfigMap() { + return ( std::map < sword::SWBuf, sword::SWBuf > * ) &self->getConfig(); + } +} + diff --git a/bindings/swig/package/swobject.i b/bindings/swig/package/swobject.i new file mode 100644 index 0000000..b6079a2 --- /dev/null +++ b/bindings/swig/package/swobject.i @@ -0,0 +1,7 @@ +%{ +#include "swobject.h" +%} + +%ignore sword::SWClass::SWClass; + +%include "swobject.h" diff --git a/bindings/swig/package/swoptfilter.i b/bindings/swig/package/swoptfilter.i new file mode 100644 index 0000000..7ef7b87 --- /dev/null +++ b/bindings/swig/package/swoptfilter.i @@ -0,0 +1,13 @@ +%{ +#include "swoptfilter.h" +%} + +%ignore sword::SWOptionFilter::getOptionValues; + +%include "swoptfilter.h" + +%extend sword::SWOptionFilter { + static sword::SWOptionFilter *castTo(sword::SWFilter *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/package/sword.i b/bindings/swig/package/sword.i new file mode 100644 index 0000000..78dc61f --- /dev/null +++ b/bindings/swig/package/sword.i @@ -0,0 +1,94 @@ +#define SWDLLEXPORT + +%module "Sword" +%module(directors="1") Sword; + +/* Ignore warnings about Unknown base class */ +%warnfilter(401); + +%include "directors.i" + +/* Some generic ignores. These don't map into any Python operators */ +%ignore *::operator=; +%ignore *::operator++; +%ignore *::operator--; +%ignore *::operator const char *; +%ignore *::operator sword::SWKey &; +%ignore *::operator sword::SWKey *; + +%include "defs.i" +%include "swbuf.i" + +/* Now include all the STL templates we are going to use */ +%include "templates.i" + +%include "swobject.i" +%include "swconfig.i" +%include "swversion.i" +%include "bases.i" + +%include "swkey.i" +%include "listkey.i" +%include "versekey.i" +%include "treekey.i" +%include "treekeyidx.i" +%include "versetreekey.i" + +%include "swdisp.i" + +%include "swfilter.i" +%include "swoptfilter.i" +%include "swfiltermgr.i" + + +%include "stringmgr.i" +%include "swsearchable.i" +//%include "swcacher.i" +%include "swmodule.i" + + + +%include "swmgr.i" +%include "filemgr.h" + +%include "encfiltmgr.i" +%include "markupfiltmgr.i" + +%include "swlocale.i" + +%include "swcomprs.i" +%include "lzsscomprs.i" +%include "zipcomprs.i" + + +%include "swcom.i" +%include "rawcom.i" +%include "zcom.i" + +%include "swgenbook.i" +%include "rawgenbook.i" + +%include "swld.i" +%include "rawld.i" +%include "rawld4.i" +%include "zld.i" + +%include "swtext.i" +%include "rawtext.i" +%include "ztext.i" + +%include "localemgr.i" + +%include "url.i" +%include "utilxml.i" + +%include "osishtmlhref.i" +%include "extras.i" +%include "swlog.i" + +%include "ftptrans.i" + +#ifndef EXCLUDE_INSTALLMGR +%include "installmgr.i" +#endif + diff --git a/bindings/swig/package/sword.m4 b/bindings/swig/package/sword.m4 new file mode 100644 index 0000000..206c794 --- /dev/null +++ b/bindings/swig/package/sword.m4 @@ -0,0 +1,174 @@ +## -*- autoconf -*- +dnl This file was created by Joachim Ansorg +dnl It provides macord for the autoconf package to find the Sword library on your system. + +dnl ---------------------------------------------------------------------- +dnl Check wheter to use static linking +dnl first parameter is the required version +dnl second is whether to use static sword library +dnl ---------------------------------------------------------------------- +AC_DEFUN(SW_CHECK_SWORD, +[ +dnl AC_MSG_CHECKING([for a Sword installation]) + +dnl The option for the configure script +AC_ARG_WITH(sword-dir, +[ --with-sword-dir=DIR Path where Sword is being installed (default=/usr) ], +[ + ac_sword_dir=$withval +],ac_sword_dir=/usr +) + +AC_ARG_ENABLE(static-sword, +[ --enable-static-sword Link to the static Sword library], + ac_static_sword="YES", + [ ac_static_sword="$2" ] +) + +dnl try to find Sword library files +AC_MSG_CHECKING([for Sword library files]) +AC_REQUIRE([AC_FIND_ZLIB]) +ac_sword_library_dirs="$ac_sword_dir/lib /usr/lib /usr/lib/sword /usr/local/lib /usr/local/lib/sword /usr/local/sword/lib" + +if test "$ac_static_sword" = "YES"; then + SEARCH_LIBS="libsword.a"; +else + SEARCH_LIBS="libsword.a libsword.so"; +fi + + +AC_CACHE_VAL(ac_cv_sword_libdir, AC_FIND_FILE($SEARCH_LIBS, $ac_sword_library_dirs, ac_cv_sword_libdir)) + +if test "$ac_cv_sword_libdir" = "NO"; then + AC_MSG_ERROR(SWORD library not found. Try to use configure with --with-sword-dir=/your/SWORD/path!); +fi + +if test "$ac_static_sword" = "YES"; then + LIB_SWORD="$ac_cv_sword_libdir/libsword.a"; +else + LIB_SWORD="-L$ac_cv_sword_libdir -lsword"; +fi + +#AC_SUBST(SWORD_LIBRARY_PATH) +AC_SUBST(LIB_SWORD) +all_libraries="$all_libraries -L$ac_cv_sword_libdir" + +if test "$ac_static_sword" = "YES"; then + MESSAGE="static library $ac_cv_sword_libdir/libsword.a"; +else + MESSAGE="$ac_cv_sword_libdir"; +fi +AC_MSG_RESULT([$MESSAGE]) + + + +dnl -- try to find Swords include files -- +AC_MSG_CHECKING([for Sword include files]) +ac_sword_include_dirs="$ac_sword_dir/include/sword $ac_sword_dir/include /usr/include/sword /usr/include /usr/local/include/sword /usr/local/include /usr/local/sword/include /usr/local/sword/include/sword" + +AC_CACHE_VAL(ac_cv_sword_incdir, AC_FIND_FILE(swmgr.h, $ac_sword_include_dirs, ac_cv_sword_incdir)) + +if test "$ac_cv_sword_incdir" = "NO"; then + AC_MSG_ERROR([The Sword include file files were not found. +Please try to use configure with --with-sword-dir=/your/SWORD/path ! +]) +fi + +SWORD_INCLUDES="-I$ac_cv_sword_incdir" +SWORD_INCLUDE_DIR="$ac_cv_sword_incdir" +AC_SUBST(SWORD_INCLUDES) +AC_SUBST(SWORD_INCLUDE_DIR) +all_includes="$all_includes -I$ac_cv_sword_incdir" + +AC_MSG_RESULT([$ac_cv_sword_incdir]) + + + +dnl -- check if Sword matches the minimum version -- +AC_MSG_CHECKING([if you have Sword $1 or later]) + +AC_CACHE_VAL(ac_cv_installed_sword_version, +[ +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH +ac_LIBRARY_PATH="$LIBRARY_PATH" +ac_cxxflags_safe="$CXXFLAGS" +ac_ldflags_safe="$LDFLAGS" +ac_libs_safe="$LIBS" + +CXXFLAGS="$CXXFLAGS -I$" +LDFLAGS="$LDFLAGS -L$ac_cv_sword_libdir" +LIBS="$LIB_SWORD -lz" +LD_LIBRARY_PATH="$ac_cv_sword_libdir" +export LD_LIBRARY_PATH +LIBRARY_PATH= +export LIBRARY_PATH + +cat > conftest.$ac_ext < +#include +using std::cout; +using std::endl; +using sword::SWVersion; + +int main(int argc, char* argv[]) { + if (argc != 2) { + cout << SWVersion::currentVersion << endl; + } + else if (argc == 2) + { + if (SWVersion(&argv[[1]]) < SWVersion::currentVersion || SWVersion(&argv[[1]]) == SWVersion::currentVersion) + { + cout << 0 << endl; + return 0; + } + else + { + cout << 1 << endl; + return 1; //version not recent enough + } + } + return 0; +} +EOF + +ac_link='${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +if AC_TRY_EVAL(ac_link) && test -s conftest; then + if test -x conftest; then + eval ac_cv_installed_sword_version=`./conftest 2>&5` + echo "configure: ac_cv_installed_sword_version=$ac_cv_installed_sword_version" >&AC_FD_CC + eval sword_test_returncode=`./conftest $1 2>&5`; + echo "configure: sword_test_returncode=$sword_test_returncode" >&AC_FD_CC + fi +else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +fi + +rm -f conftest* +CXXFLAGS="$ac_cxxflags_safe" +LDFLAGS="$ac_ldflags_safe" +LIBS="$ac_libs_safe" + +LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe" +export LD_LIBRARY_PATH +LIBRARY_PATH="$ac_LIBRARY_PATH" +export LIBRARY_PATH +AC_LANG_RESTORE +]) + +right_version="ok"; +if test "x$sword_test_returncode" = "x1"; then + echo "configure: changing right_version" >&AC_FD_CC + right_version="wrong version"; +fi; + +AC_MSG_RESULT([$ac_cv_installed_sword_version]) +echo "configure: right_version=$right_version" >&AC_FD_CC +if test "x$right_version" != "xok"; then + AC_MSG_ERROR([Your Sword installation is not recent enough! $sword_test_returncode Please +upgrade to version $1!]); +fi; + +]) diff --git a/bindings/swig/package/swsearchable.i b/bindings/swig/package/swsearchable.i new file mode 100644 index 0000000..6f6cbde --- /dev/null +++ b/bindings/swig/package/swsearchable.i @@ -0,0 +1,25 @@ +%{ +#include "swsearchable.h" +%} + +%ignore sword::SWSearchable::search; +%ignore sword::SWSearchable::createSearchFramework; +%ignore sword::SWSearchable::nullPercent; + +%include "swsearchable.h" + +%extend sword::SWSearchable { + bool isSearchSupported(const char *istr, int searchType = 0, + int flags = 0, + SWKey * scope = 0) { + bool checksupported = true; + self->search(istr, searchType, flags, scope, &checksupported); + return checksupported; + } + + ListKey &doSearch(const char *istr, int searchType = 0, int flags = 0, + SWKey *scope = 0) { + return self->search(istr, searchType, flags, scope); + } +}; + diff --git a/bindings/swig/package/swtext.i b/bindings/swig/package/swtext.i new file mode 100644 index 0000000..62aa00d --- /dev/null +++ b/bindings/swig/package/swtext.i @@ -0,0 +1,13 @@ +%{ +#include "swtext.h" +%} + +%ignore sword::SWText::SWText; + +%include "swtext.h" + +%extend sword::SWText { + static sword::SWText *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/package/swversion.i b/bindings/swig/package/swversion.i new file mode 100644 index 0000000..c09d7c7 --- /dev/null +++ b/bindings/swig/package/swversion.i @@ -0,0 +1,5 @@ +%{ +#include "swversion.h" +%} + +%include "swversion.h" diff --git a/bindings/swig/package/tcl.m4 b/bindings/swig/package/tcl.m4 new file mode 100644 index 0000000..9b99c7f --- /dev/null +++ b/bindings/swig/package/tcl.m4 @@ -0,0 +1,114 @@ +#-------------------------------------------------------------------- +# Try to locate the Tcl package +#-------------------------------------------------------------------- + +AC_DEFUN(SW_FIND_TCL, +[ + + +TCLINCLUDE= +TCLLIB= +TCLPACKAGE= +#TCLSWIG= + +AC_ARG_WITH(tclconfig,[ --with-tclconfig=path Set location of tclConfig.sh], + with_tclconfig="$withval") +AC_ARG_WITH(tcl,[ --with-tcl=path Set location of Tcl package],[ + TCLPACKAGE="$withval"], [TCLPACKAGE=]) +AC_ARG_WITH(tclincl,[ --with-tclincl=path Set location of Tcl include directory],[ + TCLINCLUDE="-I$withval"], [TCLINCLUDE=]) +AC_ARG_WITH(tcllib,[ --with-tcllib=path Set location of Tcl library directory],[ + TCLLIB="-L$withval"], [TCLLIB=]) + +AC_MSG_CHECKING([for Tcl configuration]) +# First check to see if --with-tclconfig was specified. +if test x"${with_tclconfig}" != x ; then + if test -f "${with_tclconfig}/tclConfig.sh" ; then + TCLCONFIG=`(cd ${with_tclconfig}; pwd)` + else + AC_MSG_ERROR([${with_tcl} directory doesn't contain tclConfig.sh]) + fi +fi +# check in a few common install locations +if test x"${TCLCONFIG}" = x ; then + for i in `ls -d /usr/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` ; do + if test -f "$i/tclConfig.sh" ; then + TCLCONFIG=`(cd $i; pwd)` + break + fi + done +fi +if test x"${TCLCONFIG}" = x ; then + AC_MSG_RESULT(no) +else + AC_MSG_RESULT(found $TCLCONFIG/tclConfig.sh) + . $TCLCONFIG/tclConfig.sh + TCLINCLUDE=-I$TCL_PREFIX/include + TCLLIB=$TCL_LIB_SPEC +fi + +if test -z "$TCLINCLUDE"; then + if test -n "$TCLPACKAGE"; then + TCLINCLUDE="-I$TCLPACKAGE/include" + fi +fi + +if test -z "$TCLLIB"; then + if test -n "$TCLPACKAGE"; then + TCLLIB="-L$TCLPACKAGE/lib -ltcl" + fi +fi + +AC_MSG_CHECKING(for Tcl header files) +if test -z "$TCLINCLUDE"; then +AC_TRY_CPP([#include ], , TCLINCLUDE="") +if test -z "$TCLINCLUDE"; then + dirs="$prefix/include /usr/local/include /usr/include /opt/local/include" + for i in $dirs ; do + if test -r $i/tcl.h; then + AC_MSG_RESULT($i) + TCLINCLUDE="-I$i" + break + fi + done +fi +if test -z "$TCLINCLUDE"; then +# TCLINCLUDE="-I/usr/local/include" + AC_MSG_RESULT(not found) +fi +else + AC_MSG_RESULT($TCLINCLUDE) +fi + +AC_MSG_CHECKING(for Tcl library) +if test -z "$TCLLIB"; then +dirs="$prefix/lib /usr/local/lib /usr/lib /opt/local/lib" +for i in $dirs ; do + if test -r $i/libtcl.a; then + AC_MSG_RESULT($i) + TCLLIB="-L$i -ltcl" + break + fi +done +if test -z "$TCLLIB"; then + AC_MSG_RESULT(not found) +# TCLLIB="-L/usr/local/lib" +fi +else +AC_MSG_RESULT($TCLLIB) +fi + +# Only cygwin (Windows) needs the library for dynamic linking +case $ac_sys_system/$ac_sys_release in +CYGWIN*) TCLDYNAMICLINKING="$TCLLIB";; +*)TCLDYNAMICLINKING="";; +esac + +AC_SUBST(TCLINCLUDE) +AC_SUBST(TCLLIB) +AC_SUBST(TCLDYNAMICLINKING) +#AC_SUBST(TCLSWIG) + +]) diff --git a/bindings/swig/package/templates.i b/bindings/swig/package/templates.i new file mode 100644 index 0000000..b7f1634 --- /dev/null +++ b/bindings/swig/package/templates.i @@ -0,0 +1,64 @@ +%include +%include +%include + +%include +%include + +/* +Include SWModule and DirEntry here, so that it will be able to appear below +*/ +%{ +#include "swmodule.h" +#include "filemgr.h" +%} + +/* +These are the stl templates that are used throughout Sword. Some have more +than one name in Sword, depending on context. However, these are all wrapped with the one class. +For example, sword::AttributeValueMap is the same as sword::ConfigEntMap +Both are wrapped as the former, however +*/ +%inline %{ +typedef std::map< sword::SWBuf, sword::SWBuf > AttributeValueMap; +typedef std::map< sword::SWBuf, AttributeValueMap> AttributeListMap; +typedef std::map< sword::SWBuf, AttributeListMap> AttributetypeListMap; +%} + +/* Used by SWModule and SWConfig */ +%template() std::pair ; +%template(AttributeValueMap) std::map < sword::SWBuf, sword::SWBuf >; + +/* Used by SWModule */ +%template() std::pair ; +%template(AttributeListMap) std::map < sword::SWBuf, AttributeValueMap>; +%template() std::pair < sword::SWBuf, AttributeListMap>; +%template(AttributeTypeListMap) std::map < sword::SWBuf, AttributeListMap>; + +/* Used by SWConfig */ +%template(SectionMapMultiMap) std::multimap < sword::SWBuf, AttributeValueMap >; + +/* Used by SWMgr */ +%template() std::pair; +%template(ModuleMap) std::map; + +/* Used by SWMgr and LocaleMgr */ +%template(StringVector) std::vector < sword::SWBuf >; + +/* Used by xmltag */ +%template(StringList) std::list < sword::SWBuf >; + + +/* Used by InstallMgr */ +#ifndef EXCLUDE_INSTALLMGR +%{ +#include "installmgr.h" +%} +%template() std::pair; +%template(InstallSourceMap) std::map; +%template() std::pair; +%template() std::map; +#endif + +/* Used by DirEntry */ +%template(DirEntryVector) std::vector < sword::DirEntry > ; diff --git a/bindings/swig/package/treekey.i b/bindings/swig/package/treekey.i new file mode 100644 index 0000000..a2bbac7 --- /dev/null +++ b/bindings/swig/package/treekey.i @@ -0,0 +1,38 @@ +%{ +#include "treekey.h" +%} + +%ignore sword::TreeKey::getUserData(int *); +%ignore sword::TreeKey::setUserData(const char *, int); + +%include + +//%pointer_class(unsigned char, BytePointer); +//%array_class(unsigned char, ByteArray); + +%include "treekey.h" + +%extend sword::TreeKey { + static sword::TreeKey *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } +} + +/* +%extend sword::TreeKey { + + const unsigned char *getUserData2() { + return (const unsigned char*)(self->getUserData(0)); + } + + int getUserDataSize() { + int s; + self->getUserData(&s); + return s; + } + + void setUserData(unsigned char data[], int size) { + self->setUserData(((const char*)(data)), size); + } +}; +*/ diff --git a/bindings/swig/package/treekeyidx.i b/bindings/swig/package/treekeyidx.i new file mode 100644 index 0000000..16e332d --- /dev/null +++ b/bindings/swig/package/treekeyidx.i @@ -0,0 +1,11 @@ +%{ +#include "treekeyidx.h" +%} + +%include "treekeyidx.h" + +%extend sword::TreeKeyIdx { + static sword::TreeKeyIdx *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/package/url.i b/bindings/swig/package/url.i new file mode 100644 index 0000000..2ef4cf4 --- /dev/null +++ b/bindings/swig/package/url.i @@ -0,0 +1,5 @@ +%{ +#include +%} + +%include "url.h" diff --git a/bindings/swig/package/utilxml.i b/bindings/swig/package/utilxml.i new file mode 100644 index 0000000..9094f06 --- /dev/null +++ b/bindings/swig/package/utilxml.i @@ -0,0 +1,5 @@ +%{ +#include +%} + +%include "utilxml.h" diff --git a/bindings/swig/package/versekey.i b/bindings/swig/package/versekey.i new file mode 100644 index 0000000..8d9f490 --- /dev/null +++ b/bindings/swig/package/versekey.i @@ -0,0 +1,115 @@ +%{ +#include "versekey.h" +%} + + +%ignore sword::sbook::versemax; +%ignore sword::VerseKey::setBookAbbrevs; +%ignore sword::VerseKey::setBooks; + +%ignore sword::VerseKey::builtin_BMAX; +%ignore sword::VerseKey::builtin_books; +%ignore sword::VerseKey::BMAX; +%ignore sword::VerseKey::books; + +%immutable sword::VerseKey::builtin_abbrevs; +%immutable sword::sbook::name; +%immutable sword::sbook::prefAbbrev; +%immutable sword::abbrev::ab; + +%include "versekey.h" + +%extend sword::abbrev { + int getAbbrevCount() { + int abbrevsCnt; + for (abbrevsCnt = 0; *self[abbrevsCnt].ab; abbrevsCnt++) {} + return abbrevsCnt-1; + } + + const struct sword::abbrev* getAbbrevData(int i) { + return &(self[i]); + } +} + +%extend sword::sbook { + const int verseMax( int chapter ) { + if ( chapter > 0 && chapter < self->chapmax ) { + return self->versemax[chapter-1]; + } else { + return 0; + } + } +}; + + + +%extend sword::VerseKey { + /* C++-style cast */ + static sword::VerseKey *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } + + + /* Get number of books in the given testament + * testament may be 1 (OT) or 2 (NT) + */ + + + const int bookCount( const int testament ) { + if ( (testament < 1) || (testament > 2) ) { + return 0; + }; + return self->BMAX[testament-1]; + }; + + + /* Get name of book + * Returns the name of the booknumber in the givn testament. + * Testament may be 1 (OT) or 2 (NT) + * book may be in the range of 1 <= bookCount(testament) + */ + const char* bookName( const int testament, const int book ) { + if ( (testament < 1) || (testament > 2) ) { + return ""; + }; + if ( (book < 1) || (book > self->BMAX[testament-1]) ) { + return ""; + } + + return self->books[testament-1][book-1].name; + }; + + /* Get number of chapters in the given testament and book number + * testament may be 1 (OT) or 2 (NT) + * book may be in the range 1 <= bookCount(testament) + */ + const int chapterCount( const int testament, const int book ) { + if ( (testament < 1) || (testament > 2) ) { + return 0; + }; + if ( (book < 1) || (book > self->BMAX[testament-1]) ) { + return 0; + } + + return self->books[testament-1][book-1].chapmax; + }; + /* Get number of verses in the given chapter of the given in the given testament, + * testament may be 1 (OT) or 2 (NT) + * book may be in the range 1 <= bookCount(testament) + * chapter may be in the range 1 <= chapterCount(testament, book) + */ + const int verseCount( const int testament, const int book, const int chapter ) { + if ( (testament < 1) || (testament > 2) ) { + return 0; + }; + if ( (book < 1) || (book > self->BMAX[testament-1]) ) { + return 0; + } + if ( (chapter < 1) || (chapter > self->books[testament-1][book-1].chapmax) ) { + return 0; + } + + return self->books[testament-1][book-1].versemax[chapter-1]; + + }; +}; diff --git a/bindings/swig/package/versetreekey.i b/bindings/swig/package/versetreekey.i new file mode 100644 index 0000000..35c0e3e --- /dev/null +++ b/bindings/swig/package/versetreekey.i @@ -0,0 +1,12 @@ +%{ +#include "versetreekey.h" +%} + +%include "versetreekey.h" + +%extend sword::VerseTreeKey { + /* C++-style cast */ + static sword::VerseTreeKey *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } +}; diff --git a/bindings/swig/package/zcom.i b/bindings/swig/package/zcom.i new file mode 100644 index 0000000..83af55f --- /dev/null +++ b/bindings/swig/package/zcom.i @@ -0,0 +1,12 @@ +%{ +#include "zverse.h" +#include "zcom.h" +%} + +%include "zcom.h" + +%extend sword::zCom { + static sword::zCom *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/package/zipcomprs.i b/bindings/swig/package/zipcomprs.i new file mode 100644 index 0000000..500295d --- /dev/null +++ b/bindings/swig/package/zipcomprs.i @@ -0,0 +1,11 @@ +%{ +#include +%} + +%include "zipcomprs.h" + +%extend sword::ZipCompress { + static sword::ZipCompress *castTo(sword::SWCompress *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/package/zld.i b/bindings/swig/package/zld.i new file mode 100644 index 0000000..36f07b2 --- /dev/null +++ b/bindings/swig/package/zld.i @@ -0,0 +1,11 @@ +%{ +#include "zld.h" +%} + +%include "zld.h" + +%extend sword::zLD { + static sword::zLD *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/package/zlib.m4 b/bindings/swig/package/zlib.m4 new file mode 100644 index 0000000..952e5bd --- /dev/null +++ b/bindings/swig/package/zlib.m4 @@ -0,0 +1,111 @@ +## -*- autoconf -*- + + +AC_DEFUN(AC_FIND_ZLIB, +[ +AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) +AC_MSG_CHECKING([for libz]) +AC_CACHE_VAL(ac_cv_lib_z, +[ +AC_LANG_C +kde_save_LIBS="$LIBS" +LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET" +kde_save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" +AC_TRY_LINK(dnl +[ +#include +], + [return (zlibVersion() == ZLIB_VERSION); ], + eval "ac_cv_lib_z='-lz'", + eval "ac_cv_lib_z=no") +LIBS="$kde_save_LIBS" +CFLAGS="$kde_save_CFLAGS" +])dnl +if test ! "$ac_cv_lib_z" = no; then + AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz]) + LIBZ="$ac_cv_lib_z" + AC_SUBST(LIBZ) + AC_MSG_RESULT($ac_cv_lib_z) +else + AC_MSG_ERROR(not found. Check your installation and look into config.log) + LIBZ="" + AC_SUBST(LIBZ) +fi +]) + +AC_DEFUN(KDE_CHECK_EXTRA_LIBS, +[ +AC_MSG_CHECKING(for extra includes) +AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR + adds non standard include paths], + kde_use_extra_includes="$withval", + kde_use_extra_includes=NONE +) +kde_extra_includes= +if test -n "$kde_use_extra_includes" && \ + test "$kde_use_extra_includes" != "NONE"; then + + ac_save_ifs=$IFS + IFS=':' + for dir in $kde_use_extra_includes; do + kde_extra_includes="$kde_extra_includes $dir" + USER_INCLUDES="$USER_INCLUDES -I$dir" + done + IFS=$ac_save_ifs + kde_use_extra_includes="added" +else + kde_use_extra_includes="no" +fi +AC_SUBST(USER_INCLUDES) + +AC_MSG_RESULT($kde_use_extra_includes) + +kde_extra_libs= +AC_MSG_CHECKING(for extra libs) +AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths], + kde_use_extra_libs=$withval, + kde_use_extra_libs=NONE +) +if test -n "$kde_use_extra_libs" && \ + test "$kde_use_extra_libs" != "NONE"; then + + ac_save_ifs=$IFS + IFS=':' + for dir in $kde_use_extra_libs; do + kde_extra_libs="$kde_extra_libs $dir" + KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir" + USER_LDFLAGS="$USER_LDFLAGS -L$dir" + done + IFS=$ac_save_ifs + kde_use_extra_libs="added" +else + kde_use_extra_libs="no" +fi + +AC_SUBST(USER_LDFLAGS) + +AC_MSG_RESULT($kde_use_extra_libs) + +]) + +dnl ------------------------------------------------------------------------ +dnl Find a file (or one of more files in a list of dirs) +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN(AC_FIND_FILE, +[ +$3=NO +for i in $2; +do + for j in $1; + do + echo "configure: __oline__: $i/$j" >&AC_FD_CC + if test -r "$i/$j"; then + echo "taking that" >&AC_FD_CC + $3=$i + break 2 + fi + done +done +]) diff --git a/bindings/swig/package/ztext.i b/bindings/swig/package/ztext.i new file mode 100644 index 0000000..55db441 --- /dev/null +++ b/bindings/swig/package/ztext.i @@ -0,0 +1,11 @@ +%{ +#include "ztext.h" +%} + +%include "ztext.h" + +%extend sword::zText { + static sword::zText *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/rawcom.i b/bindings/swig/rawcom.i new file mode 100644 index 0000000..5e9c17b --- /dev/null +++ b/bindings/swig/rawcom.i @@ -0,0 +1,14 @@ +%{ +#include "rawcom.h" +%} + + +%include "rawcom.h" + + + +%extend sword::RawCom { + static sword::RawCom *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/rawgenbook.i b/bindings/swig/rawgenbook.i new file mode 100644 index 0000000..ac4fd1c --- /dev/null +++ b/bindings/swig/rawgenbook.i @@ -0,0 +1,12 @@ +%{ +#include "rawgenbook.h" +%} + +%include "rawgenbook.h" + +%extend sword::RawGenBook { + static sword::RawGenBook *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } + +} diff --git a/bindings/swig/rawld.i b/bindings/swig/rawld.i new file mode 100644 index 0000000..b1a10df --- /dev/null +++ b/bindings/swig/rawld.i @@ -0,0 +1,12 @@ +%{ +#include "rawld.h" +%} + +%include "rawld.h" + +%extend sword::RawLD { + static sword::RawLD *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } + +} diff --git a/bindings/swig/rawld4.i b/bindings/swig/rawld4.i new file mode 100644 index 0000000..27e47b2 --- /dev/null +++ b/bindings/swig/rawld4.i @@ -0,0 +1,12 @@ +%{ +#include "rawld4.h" +%} + +%include "rawld4.h" + +%extend sword::RawLD4 { + static sword::RawLD4 *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } + +} diff --git a/bindings/swig/rawtext.i b/bindings/swig/rawtext.i new file mode 100644 index 0000000..fa2d019 --- /dev/null +++ b/bindings/swig/rawtext.i @@ -0,0 +1,12 @@ +%{ +#include "rawtext.h" +%} + +%include "rawtext.h" + + +%extend sword::RawText { + static sword::RawText *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/rendercallback.h b/bindings/swig/rendercallback.h new file mode 100755 index 0000000..8a19a86 --- /dev/null +++ b/bindings/swig/rendercallback.h @@ -0,0 +1,223 @@ +#ifndef _RENDERCALLBACK_H +#define _RENDERCALLBACK_H +#include +#include +#include +#include +#include +#include +#include + +#define FAILED 0 +#define SUCCEEDED 1 +#define INHERITED 2 + +using namespace sword; + +class ReturnSuccess +{ +public: + ReturnSuccess(): data(""), success(FAILED) {} + ReturnSuccess(char* data, int success): data(data), success(success) {} + virtual ~ReturnSuccess() {} + char* data; + int success; +}; + + +class RenderCallback { +public: + virtual ~RenderCallback() {;} + + virtual ReturnSuccess run(sword::SWBuf& x, const char * token, + sword::BasicFilterUserData* userData) + { + ReturnSuccess nullm("", INHERITED); + return nullm; + } +}; + +// Forward declarations +class OSISData; +class ThMLData; + + +class PyOSISHTMLHREF: public sword::OSISHTMLHREF +{ +private: + RenderCallback* _callback; + +public: + // Create a class which can be inherited externally +#ifndef SWIG + using sword::OSISHTMLHREF::MyUserData; + class MyOsisUserData : public MyUserData {}; +#endif + + PyOSISHTMLHREF(RenderCallback* callback) + { + _callback=callback; + } + + static OSISData* getData(sword::BasicFilterUserData* f) + { + return (OSISData*) f; + } + + virtual ~PyOSISHTMLHREF() + { + delCallback(); + } + + void delCallback() + { + delete _callback; + _callback = 0; + } + + void setCallback(RenderCallback *cb) + { + delCallback(); + _callback = cb; + } + + ReturnSuccess call(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) + { + if (_callback) return _callback->run(buf, token, userData); + else + { + ReturnSuccess nullm("", INHERITED); + return nullm; + } + } + + protected: + virtual bool handleToken(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) + { + ReturnSuccess result = call(buf, token, userData); + switch(result.success) + { + case INHERITED: + return sword::OSISHTMLHREF::handleToken(buf, token, userData); + case FAILED: + return false; + case SUCCEEDED: + buf += result.data; + return true; + } + + return true; + } + }; + + +class PyThMLHTMLHREF : public ThMLHTMLHREF { +private: + RenderCallback* _callback; +public: + // Create a class which can be inherited externally +#ifndef SWIG + using sword::ThMLHTMLHREF::MyUserData; + class MyThmlUserData : public MyUserData {}; +#endif + + PyThMLHTMLHREF(RenderCallback* callback) + { + _callback=callback; + } + + static ThMLData* getData(sword::BasicFilterUserData* f) + { + return (ThMLData*) f; + } + + virtual ~PyThMLHTMLHREF() + { + delCallback(); + } + + void delCallback() + { + delete _callback; + _callback = 0; + } + + void setCallback(RenderCallback *cb) + { + delCallback(); + _callback = cb; + } + + ReturnSuccess call(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) + { + if (_callback) return _callback->run(buf, token, userData); + else + { + ReturnSuccess nullm("", INHERITED); + return nullm; + } + } +protected: + virtual bool handleToken(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) + { + ReturnSuccess result = call(buf, token, userData); + switch(result.success) + { + case INHERITED: + return sword::ThMLHTMLHREF::handleToken(buf, token, userData); + case FAILED: + return false; + case SUCCEEDED: + buf += result.data; + return true; + } + + return true; + } + +public: + + +}; + +class OSISData : +#ifndef SWIG +public PyOSISHTMLHREF::MyOsisUserData { +#else +// trick SWIG into thinking this is not inherited from an inner class... +public sword::BasicFilterUserData +{ +public: + bool osisQToTick; + bool inBold; + bool inXRefNote; + bool BiblicalText; + int suspendLevel; + SWBuf wordsOfChristStart; + SWBuf wordsOfChristEnd; + SWBuf lastTransChange; + SWBuf w; + SWBuf fn; + SWBuf version; + +#endif //!SWIG +}; + +class ThMLData : +#ifndef SWIG +public PyThMLHTMLHREF::MyThmlUserData { +#else +// trick SWIG into thinking this is not inherited from an inner class... +public sword::BasicFilterUserData +{ +public: + SWBuf inscriptRef; + bool SecHead; + bool BiblicalText; + SWBuf version; + XMLTag startTag; + +#endif //!SWIG +}; + +#endif // _RENDERCALLBACK_H diff --git a/bindings/swig/searcher.h b/bindings/swig/searcher.h new file mode 100755 index 0000000..f7bf568 --- /dev/null +++ b/bindings/swig/searcher.h @@ -0,0 +1,39 @@ +using namespace sword; +class SWSearcher{ + public: + sword::SWModule* mod; + int percent; + + static void Callback(char status, void *me){ + SWSearcher* searcher = (SWSearcher*)me; + searcher->PercentFunction((int) status); + } + + virtual void PercentFunction(int value){ + percent=value; + } + + SWSearcher(sword::SWModule* Mod){mod=Mod;} + virtual ~SWSearcher(){} + + int GetPercent(){return percent;} + + bool isSearchSupported(const char *istr, int searchType = 0, + int flags = 0, + SWKey * scope = 0) { + bool checksupported = true; + mod->search(istr, searchType, flags, scope, &checksupported); + return checksupported; + } + + ListKey &doSearch(const char *istr, int searchType = 0, int flags = 0, + SWKey *scope = 0) { + return mod->search(istr, searchType, flags, scope, + 0, this->Callback, (void *) this); + } + + void TerminateSearch(){ + mod->terminateSearch=true; + } +}; + diff --git a/bindings/swig/stringmgr.i b/bindings/swig/stringmgr.i new file mode 100644 index 0000000..ba216b1 --- /dev/null +++ b/bindings/swig/stringmgr.i @@ -0,0 +1,26 @@ + +%{ +#include "stringmgr.h" +class PyStringMgr : public sword::StringMgr +{ + public: + char *upperUTF8(char *text, unsigned int max = 0) const + { + sword::SWBuf buf=(const char*)text; + getUpper(&buf); + strncpy(text, buf.c_str(), (max) ? max : strlen(text)); + return text; + } + + virtual void getUpper(sword::SWBuf* test) const = 0; +}; +%} + +%include "stringmgr.h" +class PyStringMgr : public sword::StringMgr +{ + public: + char *upperUTF8(char *text, unsigned int max = 0) const; + virtual void getUpper(sword::SWBuf* test) const = 0; +}; + diff --git a/bindings/swig/swbuf.i b/bindings/swig/swbuf.i new file mode 100644 index 0000000..6ae7bd0 --- /dev/null +++ b/bindings/swig/swbuf.i @@ -0,0 +1,37 @@ +%{ +#include "swbuf.h" +%} + +%ignore sword::SWBuf::operator const char *; +%ignore sword::SWBuf::operator[]; +%ignore sword::SWBuf::operator+; +%ignore sword::SWBuf::operator==; +%ignore sword::SWBuf::operator!=; +%ignore sword::SWBuf::operator+=; +%ignore sword::SWBuf::operator-=; +%ignore sword::SWBuf::operator<=; +%ignore sword::SWBuf::operator>=; +%ignore sword::SWBuf::operator<; +%ignore sword::SWBuf::operator>; +%ignore sword::SWBuf::operator<<; +%ignore sword::SWBuf::operator>>; +%ignore sword::SWBuf::operator=; +%ignore sword::SWBuf::operator--; +%ignore sword::SWBuf::charAt(unsigned long); + +/* Ignore this horrible constructor. +* This would be the default for single character strings passed in. This can +* lead to changing of immutable strings!!!! +*/ +%ignore sword::SWBuf::SWBuf(char, unsigned long); + + +%include "swbuf.h" + + +%extend sword::SWBuf { + char charAt2(unsigned int pos) { + return self->charAt((unsigned long)pos); + } +}; + diff --git a/bindings/swig/swcacher.i b/bindings/swig/swcacher.i new file mode 100644 index 0000000..99b065e --- /dev/null +++ b/bindings/swig/swcacher.i @@ -0,0 +1,6 @@ +%{ +#include "swcacher.h" +%} + +%include "swcacher.h" + diff --git a/bindings/swig/swcom.i b/bindings/swig/swcom.i new file mode 100644 index 0000000..90291cf --- /dev/null +++ b/bindings/swig/swcom.i @@ -0,0 +1,14 @@ +%{ +#include "swcom.h" +%} + +%ignore sword::SWCom::SWCom; + +%include "swcom.h" + +%extend sword::SWCom { + /* C++-style cast */ + static sword::SWCom *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/swcomprs.i b/bindings/swig/swcomprs.i new file mode 100644 index 0000000..3cdd653 --- /dev/null +++ b/bindings/swig/swcomprs.i @@ -0,0 +1,10 @@ +%{ +#include +%} + +%ignore sword::SWCompress::Buf; +%ignore sword::SWCompress::zBuf; +%ignore sword::SWCompress::GetChars; +%ignore sword::SWCompress::SendChars; + +%include "swcomprs.h" diff --git a/bindings/swig/swconfig.i b/bindings/swig/swconfig.i new file mode 100644 index 0000000..6ec1cad --- /dev/null +++ b/bindings/swig/swconfig.i @@ -0,0 +1,25 @@ +%{ +#include "swconfig.h" +%} + +%ignore sword::SWConfig::operator[]; +%ignore sword::SWConfig::operator+=; +%ignore sword::SWConfig::sections; +%ignore sword::SWConfig::Sections; + +%include "swconfig.h" + + +%extend sword::SWConfig { + void set(const char* group, const char* entry, const char* value) { + self->Sections[group][entry] = value; + }; + const char* get(const char* group, const char* entry) { + return self->Sections[group][entry].c_str(); + }; + std::multimap < sword::SWBuf, std::map > + *getSections() { + return (std::multimap < sword::SWBuf, std::map < sword::SWBuf, sword::SWBuf > > *) &self->Sections; + } +} + diff --git a/bindings/swig/swdisp.i b/bindings/swig/swdisp.i new file mode 100644 index 0000000..3451cd7 --- /dev/null +++ b/bindings/swig/swdisp.i @@ -0,0 +1,5 @@ +%{ +#include "swdisp.h" +%} + +%include "swdisp.h" diff --git a/bindings/swig/swfilter.i b/bindings/swig/swfilter.i new file mode 100644 index 0000000..46f659a --- /dev/null +++ b/bindings/swig/swfilter.i @@ -0,0 +1,7 @@ +%{ +#include +%} + +%ignore sword::SWFilter::getOptionValues; + +%include "swfilter.h" diff --git a/bindings/swig/swfiltermgr.i b/bindings/swig/swfiltermgr.i new file mode 100644 index 0000000..fb6b507 --- /dev/null +++ b/bindings/swig/swfiltermgr.i @@ -0,0 +1,12 @@ +%{ +#include +%} + +%ignore sword::SWFilterMgr::AddGlobalOptions; +%ignore sword::SWFilterMgr::AddLocalOptions; +%ignore sword::SWFilterMgr::AddEncodingFilters; +%ignore sword::SWFilterMgr::AddRenderFilters; +%ignore sword::SWFilterMgr::AddStripFilters; +%ignore sword::SWFilterMgr::AddRawFilters; + +%include "swfiltermgr.h" diff --git a/bindings/swig/swgenbook.i b/bindings/swig/swgenbook.i new file mode 100644 index 0000000..aef3df0 --- /dev/null +++ b/bindings/swig/swgenbook.i @@ -0,0 +1,11 @@ +%{ +#include "swgenbook.h" +%} + +%include "swgenbook.h" + +%extend sword::SWGenBook { + static sword::SWGenBook *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/swig-perl.doxygen b/bindings/swig/swig-perl.doxygen new file mode 100644 index 0000000..2c2b650 --- /dev/null +++ b/bindings/swig/swig-perl.doxygen @@ -0,0 +1,177 @@ +# Doxyfile 0.1 + +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = SWIG-Perl +PROJECT_NUMBER = 0.1 +OUTPUT_DIRECTORY = . +OUTPUT_LANGUAGE = English +EXTRACT_ALL = YES +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = NO +STRIP_CODE_COMMENTS = YES +CASE_SENSE_NAMES = YES +SHORT_NAMES = NO +HIDE_SCOPE_NAMES = NO +VERBATIM_HEADERS = YES +SHOW_INCLUDE_FILES = YES +JAVADOC_AUTOBRIEF = NO +INHERIT_DOCS = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +ALIASES = +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +OPTIMIZE_OUTPUT_FOR_C = NO +SHOW_USED_FILES = YES +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = +FILE_PATTERNS = *.i +RECURSIVE = NO +EXCLUDE = +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = api-documentation +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +TEMPLATE_RELATIONS = YES +HIDE_UNDOC_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO +CGI_NAME = search.cgi +CGI_URL = +DOC_URL = +DOC_ABSPATH = +BIN_ABSPATH = /usr/local/bin/ +EXT_DOC_PATHS = diff --git a/bindings/swig/swkey.i b/bindings/swig/swkey.i new file mode 100644 index 0000000..77412c1 --- /dev/null +++ b/bindings/swig/swkey.i @@ -0,0 +1,9 @@ +%{ +#include "swkey.h" +%} + +%ignore sword::SWKey::userData; + +%rename (getPosition) sword::SW_POSITION::operator char; + +%include "swkey.h" diff --git a/bindings/swig/swld.i b/bindings/swig/swld.i new file mode 100644 index 0000000..135f14e --- /dev/null +++ b/bindings/swig/swld.i @@ -0,0 +1,13 @@ +%{ +#include "swld.h" +%} + +%ignore sword::SWLD::SWLD; + +%include "swld.h" + +%extend sword::SWLD { + static sword::SWLD *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/swlocale.i b/bindings/swig/swlocale.i new file mode 100644 index 0000000..d98a126 --- /dev/null +++ b/bindings/swig/swlocale.i @@ -0,0 +1,31 @@ +%{ +#include "swlocale.h" +%} + +%ignore sword::SWLocale::operator+=; +%ignore sword::SWLocale::getBooks; + +%include "swlocale.h" + +%extend sword::SWLocale { + int getNumBookGroupings() { + return 2; + } + + int getNumBooks(int grouping) { + char *numbooks; + struct sbook **books; + + self->getBooks(&numbooks, &books); + + return numbooks[grouping]; + } + + sbook getBook(int grouping, int booknum) { + char *numbooks; + struct sbook **books; + self->getBooks(&numbooks, &books); + + return books[grouping][booknum]; + } +}; diff --git a/bindings/swig/swlog.i b/bindings/swig/swlog.i new file mode 100644 index 0000000..4b8a0f0 --- /dev/null +++ b/bindings/swig/swlog.i @@ -0,0 +1,6 @@ +%{ +#include "swlog.h" +%} + +%include "swlog.h" + diff --git a/bindings/swig/swmgr.i b/bindings/swig/swmgr.i new file mode 100644 index 0000000..f00490a --- /dev/null +++ b/bindings/swig/swmgr.i @@ -0,0 +1,40 @@ +%{ +#include +%} + +%ignore sword::SWMgr::Modules; +%ignore sword::SWMgr::findConfig; +%include "swmgr.h" + +%extend sword::SWMgr { + std::vector < sword::SWBuf > getGlobalOptionsVector() { + std::list l(self->getGlobalOptions()); + return std::vector< sword::SWBuf >(l.begin(), l.end()); + } + + std::vector < sword::SWBuf > getGlobalOptionValuesVector(const char *option) { + std::list l(self->getGlobalOptionValues(option)); + return std::vector< sword::SWBuf >(l.begin(), l.end()); + } + + std::map &getModules() { + return self->Modules; + } + + SWModule* getModuleAt( const int pos ) { + if (pos < 0 || pos > self->Modules.size() ) + return 0; + + sword::ModMap::iterator it = self->Modules.begin(); + + for (int i = 0; i < pos; ++i) { + it++; + } + + if ( it != self->Modules.end() ) { + return (*it).second; + } + + return 0; + } +} diff --git a/bindings/swig/swmodule.i b/bindings/swig/swmodule.i new file mode 100644 index 0000000..c9cce5e --- /dev/null +++ b/bindings/swig/swmodule.i @@ -0,0 +1,35 @@ +%{ +#include "swmodule.h" +%} + +%ignore sword::SWModule::operator sword::SWKey &; +%ignore sword::SWModule::operator sword::SWKey *; + +%ignore sword::SWModule::Search; + +%ignore sword::SWModule::SWModule; +%ignore sword::SWModule::filterBuffer; +%ignore sword::SWModule::getEntryAttributes; +%ignore sword::SWModule::getConfig; +%ignore sword::SWModule::setConfig; + +%include "swmodule.h" + +%extend sword::SWModule { + + static sword::SWModule *castTo(sword::SWSearchable *o) { + return dynamic_cast(o); + } + + + std::map < sword::SWBuf, std::map < sword::SWBuf, std::map < sword::SWBuf, sword::SWBuf > > > + + &getEntryAttributesMap() { + return self->getEntryAttributes(); + } + + std::map *getConfigMap() { + return ( std::map < sword::SWBuf, sword::SWBuf > * ) &self->getConfig(); + } +} + diff --git a/bindings/swig/swobject.i b/bindings/swig/swobject.i new file mode 100644 index 0000000..b6079a2 --- /dev/null +++ b/bindings/swig/swobject.i @@ -0,0 +1,7 @@ +%{ +#include "swobject.h" +%} + +%ignore sword::SWClass::SWClass; + +%include "swobject.h" diff --git a/bindings/swig/swoptfilter.i b/bindings/swig/swoptfilter.i new file mode 100644 index 0000000..7ef7b87 --- /dev/null +++ b/bindings/swig/swoptfilter.i @@ -0,0 +1,13 @@ +%{ +#include "swoptfilter.h" +%} + +%ignore sword::SWOptionFilter::getOptionValues; + +%include "swoptfilter.h" + +%extend sword::SWOptionFilter { + static sword::SWOptionFilter *castTo(sword::SWFilter *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/sword.i b/bindings/swig/sword.i new file mode 100644 index 0000000..78dc61f --- /dev/null +++ b/bindings/swig/sword.i @@ -0,0 +1,94 @@ +#define SWDLLEXPORT + +%module "Sword" +%module(directors="1") Sword; + +/* Ignore warnings about Unknown base class */ +%warnfilter(401); + +%include "directors.i" + +/* Some generic ignores. These don't map into any Python operators */ +%ignore *::operator=; +%ignore *::operator++; +%ignore *::operator--; +%ignore *::operator const char *; +%ignore *::operator sword::SWKey &; +%ignore *::operator sword::SWKey *; + +%include "defs.i" +%include "swbuf.i" + +/* Now include all the STL templates we are going to use */ +%include "templates.i" + +%include "swobject.i" +%include "swconfig.i" +%include "swversion.i" +%include "bases.i" + +%include "swkey.i" +%include "listkey.i" +%include "versekey.i" +%include "treekey.i" +%include "treekeyidx.i" +%include "versetreekey.i" + +%include "swdisp.i" + +%include "swfilter.i" +%include "swoptfilter.i" +%include "swfiltermgr.i" + + +%include "stringmgr.i" +%include "swsearchable.i" +//%include "swcacher.i" +%include "swmodule.i" + + + +%include "swmgr.i" +%include "filemgr.h" + +%include "encfiltmgr.i" +%include "markupfiltmgr.i" + +%include "swlocale.i" + +%include "swcomprs.i" +%include "lzsscomprs.i" +%include "zipcomprs.i" + + +%include "swcom.i" +%include "rawcom.i" +%include "zcom.i" + +%include "swgenbook.i" +%include "rawgenbook.i" + +%include "swld.i" +%include "rawld.i" +%include "rawld4.i" +%include "zld.i" + +%include "swtext.i" +%include "rawtext.i" +%include "ztext.i" + +%include "localemgr.i" + +%include "url.i" +%include "utilxml.i" + +%include "osishtmlhref.i" +%include "extras.i" +%include "swlog.i" + +%include "ftptrans.i" + +#ifndef EXCLUDE_INSTALLMGR +%include "installmgr.i" +#endif + diff --git a/bindings/swig/sword.pl b/bindings/swig/sword.pl new file mode 100644 index 0000000..c5a833c --- /dev/null +++ b/bindings/swig/sword.pl @@ -0,0 +1,104 @@ +#!/usr/bin/perl + +use Sword; + +print "Version (should be 1.0): " , $Sword::VERSION , "\n"; + +print "Create SWConfig object!\n"; +$config = new Sword::SWConfig("test.conf"); + +print "Load\n"; +$config->Load(); + +print "Set value ... "; +print $config->set("Group", "Entry", "Value"); +print " finished \n"; + +print "Get value ... "; +print $config->get("Group", "Entry"); +print " finished \n"; + +$config->Save(); + +#testing SWMgr +print "testing SWMgr\n"; +#$localemgr = Sword::LocaleMgr::getSystemLocaleMgr(); +#$localemgr->setDefaultLocaleName("de"); + +$mgr = new Sword::SWMgr(); +print "init ... "; +#$module = $mgr->module("GerLut1545-temp"); +$module = $mgr->module("WEB"); +print "Printing WEB Module information: \n"; +print "Name:\t", $module->Name(),"\nDescription:\t", $module->Description(), "\nLang:\t", $module->Lang(), "\n"; + +$key = new Sword::VerseKey("Matthew 3:16"); +$key->setPersist(1); +$module->SetKey($key); + +for ($i = 0; $i < 15; $i++) { + print "(", $module->KeyText() ,")\t", $module->StripText(), "\n"; + $key->next(); +} +$key->increment(103); +print "(", $module->KeyText() ,")\t", $module->StripText(), "\n"; + +#testing write interface +$key->setText("John 3:16"); +#$module->SetKey($key); +$module->write("This is a test entry! This tests the write abilities of the Sword Perl classes"); +print "(", $module->KeyText() ,")\t", $module->StripText(), "\n"; + +print "Searching for God: "; +$list = $module->Search("Gott"); +print $list->Count(), " entries found!\n"; +#for ( $i = 0; $i < $list->Count(); $i++) { +# print "(", $i, ")\t", $list->GetElement()->getText(), "\n"; +# $list->next(); +#} + +print "Creating new module! Writing search result..."; +#Sword::RawText::createModule("/usr/share/sword/modules/texts/ztext/testmodule/"); +#$newmod = new Sword::RawText("/usr/share/sword/modules/texts/ztext/testmodule/"); + +#$key->setText("Genesis 1:1"); +$newkey = $key->clone(); +#$newmod->SetKey($newkey); +# +#for ($i = 0; $i < $list->Count(); $i++, $list->next()) { +# $key->setText($list->GetElement()->getText()); +# $newkey->setText($list->GetElement()->getText()); +# +# $newmod->write( $module->StripText() ); +#} + +print "Now create the LD module\n"; + + mkdir("ldmod"); +Sword::zText::createModule("ldmod/",4); + +print "first step}\n"; + +$newmod = new Sword::zText("ldmod/"); + +print "Created module;\n"; + +$newkey = $newmod->CreateKey(); +$newkey->setPersist(1); +$newkey->setText(" "); +$module->SetKey($newkey); + +print "Loop! \n"; + +for ($i = 0; $i < $list->Count(); $i++) { + print $list->GetElement()->getText() . "\n"; + + $key->setText($list->GetElement()->getText()); + $newkey->setText($list->GetElement()->getText()); + + $newmod->SetKey($newkey); + + $newmod->write( $module->StripText() ); + $list->next(); +} + diff --git a/bindings/swig/swsearchable.i b/bindings/swig/swsearchable.i new file mode 100644 index 0000000..6f6cbde --- /dev/null +++ b/bindings/swig/swsearchable.i @@ -0,0 +1,25 @@ +%{ +#include "swsearchable.h" +%} + +%ignore sword::SWSearchable::search; +%ignore sword::SWSearchable::createSearchFramework; +%ignore sword::SWSearchable::nullPercent; + +%include "swsearchable.h" + +%extend sword::SWSearchable { + bool isSearchSupported(const char *istr, int searchType = 0, + int flags = 0, + SWKey * scope = 0) { + bool checksupported = true; + self->search(istr, searchType, flags, scope, &checksupported); + return checksupported; + } + + ListKey &doSearch(const char *istr, int searchType = 0, int flags = 0, + SWKey *scope = 0) { + return self->search(istr, searchType, flags, scope); + } +}; + diff --git a/bindings/swig/swtext.i b/bindings/swig/swtext.i new file mode 100644 index 0000000..62aa00d --- /dev/null +++ b/bindings/swig/swtext.i @@ -0,0 +1,13 @@ +%{ +#include "swtext.h" +%} + +%ignore sword::SWText::SWText; + +%include "swtext.h" + +%extend sword::SWText { + static sword::SWText *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/swversion.i b/bindings/swig/swversion.i new file mode 100644 index 0000000..c09d7c7 --- /dev/null +++ b/bindings/swig/swversion.i @@ -0,0 +1,5 @@ +%{ +#include "swversion.h" +%} + +%include "swversion.h" diff --git a/bindings/swig/templates.i b/bindings/swig/templates.i new file mode 100644 index 0000000..b7f1634 --- /dev/null +++ b/bindings/swig/templates.i @@ -0,0 +1,64 @@ +%include +%include +%include + +%include +%include + +/* +Include SWModule and DirEntry here, so that it will be able to appear below +*/ +%{ +#include "swmodule.h" +#include "filemgr.h" +%} + +/* +These are the stl templates that are used throughout Sword. Some have more +than one name in Sword, depending on context. However, these are all wrapped with the one class. +For example, sword::AttributeValueMap is the same as sword::ConfigEntMap +Both are wrapped as the former, however +*/ +%inline %{ +typedef std::map< sword::SWBuf, sword::SWBuf > AttributeValueMap; +typedef std::map< sword::SWBuf, AttributeValueMap> AttributeListMap; +typedef std::map< sword::SWBuf, AttributeListMap> AttributetypeListMap; +%} + +/* Used by SWModule and SWConfig */ +%template() std::pair ; +%template(AttributeValueMap) std::map < sword::SWBuf, sword::SWBuf >; + +/* Used by SWModule */ +%template() std::pair ; +%template(AttributeListMap) std::map < sword::SWBuf, AttributeValueMap>; +%template() std::pair < sword::SWBuf, AttributeListMap>; +%template(AttributeTypeListMap) std::map < sword::SWBuf, AttributeListMap>; + +/* Used by SWConfig */ +%template(SectionMapMultiMap) std::multimap < sword::SWBuf, AttributeValueMap >; + +/* Used by SWMgr */ +%template() std::pair; +%template(ModuleMap) std::map; + +/* Used by SWMgr and LocaleMgr */ +%template(StringVector) std::vector < sword::SWBuf >; + +/* Used by xmltag */ +%template(StringList) std::list < sword::SWBuf >; + + +/* Used by InstallMgr */ +#ifndef EXCLUDE_INSTALLMGR +%{ +#include "installmgr.h" +%} +%template() std::pair; +%template(InstallSourceMap) std::map; +%template() std::pair; +%template() std::map; +#endif + +/* Used by DirEntry */ +%template(DirEntryVector) std::vector < sword::DirEntry > ; diff --git a/bindings/swig/treekey.i b/bindings/swig/treekey.i new file mode 100644 index 0000000..a2bbac7 --- /dev/null +++ b/bindings/swig/treekey.i @@ -0,0 +1,38 @@ +%{ +#include "treekey.h" +%} + +%ignore sword::TreeKey::getUserData(int *); +%ignore sword::TreeKey::setUserData(const char *, int); + +%include + +//%pointer_class(unsigned char, BytePointer); +//%array_class(unsigned char, ByteArray); + +%include "treekey.h" + +%extend sword::TreeKey { + static sword::TreeKey *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } +} + +/* +%extend sword::TreeKey { + + const unsigned char *getUserData2() { + return (const unsigned char*)(self->getUserData(0)); + } + + int getUserDataSize() { + int s; + self->getUserData(&s); + return s; + } + + void setUserData(unsigned char data[], int size) { + self->setUserData(((const char*)(data)), size); + } +}; +*/ diff --git a/bindings/swig/treekeyidx.i b/bindings/swig/treekeyidx.i new file mode 100644 index 0000000..16e332d --- /dev/null +++ b/bindings/swig/treekeyidx.i @@ -0,0 +1,11 @@ +%{ +#include "treekeyidx.h" +%} + +%include "treekeyidx.h" + +%extend sword::TreeKeyIdx { + static sword::TreeKeyIdx *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/url.i b/bindings/swig/url.i new file mode 100644 index 0000000..2ef4cf4 --- /dev/null +++ b/bindings/swig/url.i @@ -0,0 +1,5 @@ +%{ +#include +%} + +%include "url.h" diff --git a/bindings/swig/utilxml.i b/bindings/swig/utilxml.i new file mode 100644 index 0000000..9094f06 --- /dev/null +++ b/bindings/swig/utilxml.i @@ -0,0 +1,5 @@ +%{ +#include +%} + +%include "utilxml.h" diff --git a/bindings/swig/versekey.i b/bindings/swig/versekey.i new file mode 100644 index 0000000..8d9f490 --- /dev/null +++ b/bindings/swig/versekey.i @@ -0,0 +1,115 @@ +%{ +#include "versekey.h" +%} + + +%ignore sword::sbook::versemax; +%ignore sword::VerseKey::setBookAbbrevs; +%ignore sword::VerseKey::setBooks; + +%ignore sword::VerseKey::builtin_BMAX; +%ignore sword::VerseKey::builtin_books; +%ignore sword::VerseKey::BMAX; +%ignore sword::VerseKey::books; + +%immutable sword::VerseKey::builtin_abbrevs; +%immutable sword::sbook::name; +%immutable sword::sbook::prefAbbrev; +%immutable sword::abbrev::ab; + +%include "versekey.h" + +%extend sword::abbrev { + int getAbbrevCount() { + int abbrevsCnt; + for (abbrevsCnt = 0; *self[abbrevsCnt].ab; abbrevsCnt++) {} + return abbrevsCnt-1; + } + + const struct sword::abbrev* getAbbrevData(int i) { + return &(self[i]); + } +} + +%extend sword::sbook { + const int verseMax( int chapter ) { + if ( chapter > 0 && chapter < self->chapmax ) { + return self->versemax[chapter-1]; + } else { + return 0; + } + } +}; + + + +%extend sword::VerseKey { + /* C++-style cast */ + static sword::VerseKey *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } + + + /* Get number of books in the given testament + * testament may be 1 (OT) or 2 (NT) + */ + + + const int bookCount( const int testament ) { + if ( (testament < 1) || (testament > 2) ) { + return 0; + }; + return self->BMAX[testament-1]; + }; + + + /* Get name of book + * Returns the name of the booknumber in the givn testament. + * Testament may be 1 (OT) or 2 (NT) + * book may be in the range of 1 <= bookCount(testament) + */ + const char* bookName( const int testament, const int book ) { + if ( (testament < 1) || (testament > 2) ) { + return ""; + }; + if ( (book < 1) || (book > self->BMAX[testament-1]) ) { + return ""; + } + + return self->books[testament-1][book-1].name; + }; + + /* Get number of chapters in the given testament and book number + * testament may be 1 (OT) or 2 (NT) + * book may be in the range 1 <= bookCount(testament) + */ + const int chapterCount( const int testament, const int book ) { + if ( (testament < 1) || (testament > 2) ) { + return 0; + }; + if ( (book < 1) || (book > self->BMAX[testament-1]) ) { + return 0; + } + + return self->books[testament-1][book-1].chapmax; + }; + /* Get number of verses in the given chapter of the given in the given testament, + * testament may be 1 (OT) or 2 (NT) + * book may be in the range 1 <= bookCount(testament) + * chapter may be in the range 1 <= chapterCount(testament, book) + */ + const int verseCount( const int testament, const int book, const int chapter ) { + if ( (testament < 1) || (testament > 2) ) { + return 0; + }; + if ( (book < 1) || (book > self->BMAX[testament-1]) ) { + return 0; + } + if ( (chapter < 1) || (chapter > self->books[testament-1][book-1].chapmax) ) { + return 0; + } + + return self->books[testament-1][book-1].versemax[chapter-1]; + + }; +}; diff --git a/bindings/swig/versetreekey.i b/bindings/swig/versetreekey.i new file mode 100644 index 0000000..35c0e3e --- /dev/null +++ b/bindings/swig/versetreekey.i @@ -0,0 +1,12 @@ +%{ +#include "versetreekey.h" +%} + +%include "versetreekey.h" + +%extend sword::VerseTreeKey { + /* C++-style cast */ + static sword::VerseTreeKey *castTo(sword::SWKey *o) { + return dynamic_cast(o); + } +}; diff --git a/bindings/swig/vstudio/SwigSword.csproj b/bindings/swig/vstudio/SwigSword.csproj new file mode 100644 index 0000000..7b40eab --- /dev/null +++ b/bindings/swig/vstudio/SwigSword.csproj @@ -0,0 +1,99 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {F594299C-1C3B-461E-B64A-6167735DCA12} + Library + Properties + SwigSword + SwigSword + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bindings/swig/vstudio/libsword-csharpbindings.sln b/bindings/swig/vstudio/libsword-csharpbindings.sln new file mode 100644 index 0000000..36cd729 --- /dev/null +++ b/bindings/swig/vstudio/libsword-csharpbindings.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsword", "..\..\..\lib\vcppmake\vc8\libsword.vcproj", "{97449E5E-F880-4D22-933A-0D2FC32034D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsword_csharpsword", "libsword_csharpsword.vcproj", "{0BD1471F-07D9-441C-9210-40A52770F2A1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug with ICU|Win32 = Debug with ICU|Win32 + Debug|Win32 = Debug|Win32 + Release with ICU|Win32 = Release with ICU|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {97449E5E-F880-4D22-933A-0D2FC32034D4}.Debug with ICU|Win32.ActiveCfg = Debug with ICU|Win32 + {97449E5E-F880-4D22-933A-0D2FC32034D4}.Debug with ICU|Win32.Build.0 = Debug with ICU|Win32 + {97449E5E-F880-4D22-933A-0D2FC32034D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {97449E5E-F880-4D22-933A-0D2FC32034D4}.Debug|Win32.Build.0 = Debug|Win32 + {97449E5E-F880-4D22-933A-0D2FC32034D4}.Release with ICU|Win32.ActiveCfg = Release with ICU|Win32 + {97449E5E-F880-4D22-933A-0D2FC32034D4}.Release with ICU|Win32.Build.0 = Release with ICU|Win32 + {97449E5E-F880-4D22-933A-0D2FC32034D4}.Release|Win32.ActiveCfg = Release|Win32 + {97449E5E-F880-4D22-933A-0D2FC32034D4}.Release|Win32.Build.0 = Release|Win32 + {0BD1471F-07D9-441C-9210-40A52770F2A1}.Debug with ICU|Win32.ActiveCfg = Debug with ICU|Win32 + {0BD1471F-07D9-441C-9210-40A52770F2A1}.Debug with ICU|Win32.Build.0 = Debug with ICU|Win32 + {0BD1471F-07D9-441C-9210-40A52770F2A1}.Debug|Win32.ActiveCfg = Debug|Win32 + {0BD1471F-07D9-441C-9210-40A52770F2A1}.Debug|Win32.Build.0 = Debug|Win32 + {0BD1471F-07D9-441C-9210-40A52770F2A1}.Release with ICU|Win32.ActiveCfg = Release with ICU|Win32 + {0BD1471F-07D9-441C-9210-40A52770F2A1}.Release with ICU|Win32.Build.0 = Release with ICU|Win32 + {0BD1471F-07D9-441C-9210-40A52770F2A1}.Release|Win32.ActiveCfg = Release|Win32 + {0BD1471F-07D9-441C-9210-40A52770F2A1}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/bindings/swig/vstudio/libsword_csharpsword.vcproj b/bindings/swig/vstudio/libsword_csharpsword.vcproj new file mode 100644 index 0000000..e69871a --- /dev/null +++ b/bindings/swig/vstudio/libsword_csharpsword.vcproj @@ -0,0 +1,974 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/swig/zcom.i b/bindings/swig/zcom.i new file mode 100644 index 0000000..83af55f --- /dev/null +++ b/bindings/swig/zcom.i @@ -0,0 +1,12 @@ +%{ +#include "zverse.h" +#include "zcom.h" +%} + +%include "zcom.h" + +%extend sword::zCom { + static sword::zCom *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/zipcomprs.i b/bindings/swig/zipcomprs.i new file mode 100644 index 0000000..500295d --- /dev/null +++ b/bindings/swig/zipcomprs.i @@ -0,0 +1,11 @@ +%{ +#include +%} + +%include "zipcomprs.h" + +%extend sword::ZipCompress { + static sword::ZipCompress *castTo(sword::SWCompress *o) { + return dynamic_cast(o); + } +} \ No newline at end of file diff --git a/bindings/swig/zld.i b/bindings/swig/zld.i new file mode 100644 index 0000000..36f07b2 --- /dev/null +++ b/bindings/swig/zld.i @@ -0,0 +1,11 @@ +%{ +#include "zld.h" +%} + +%include "zld.h" + +%extend sword::zLD { + static sword::zLD *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/swig/ztext.i b/bindings/swig/ztext.i new file mode 100644 index 0000000..55db441 --- /dev/null +++ b/bindings/swig/ztext.i @@ -0,0 +1,11 @@ +%{ +#include "ztext.h" +%} + +%include "ztext.h" + +%extend sword::zText { + static sword::zText *castTo(sword::SWModule *o) { + return dynamic_cast(o); + } +} diff --git a/bindings/usrinst.sh b/bindings/usrinst.sh new file mode 100755 index 0000000..e22d1a3 --- /dev/null +++ b/bindings/usrinst.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +OPTIONS="--prefix=/usr $OPTIONS" +OPTIONS="--enable-corba $OPTIONS" + +CPPFLAGS="$CFLAGS $CPPFLAGS" JAVAC=javac ./configure $OPTIONS $* + diff --git a/buildtest.cpp b/buildtest.cpp new file mode 100644 index 0000000..8d42487 --- /dev/null +++ b/buildtest.cpp @@ -0,0 +1,59 @@ +#include +#include +#include +//#include +#include +//#include +#ifndef NO_SWORD_NAMESPACE +using sword::VerseKey; +using sword::RawText; +using sword::RawCom; +using sword::SWKey; +#endif +using std::cout; + +int main(int argc, char **argv) +{ + int loop; + int max; + VerseKey mykey; +// RawText text("src/modules/texts/rawtext/sve/", "Sven Text", "Sven Text"); + RawText text("src/modules/texts/rawtext/webster/", "Webster", "Webster Text"); +// RawText text("src/modules/texts/rawtext/orthjbc/", "Webster", "Webster Text"); +// RawText text("src/modules/texts/rawtext/kjv/", "KJV", "KJV Text"); +// RawText text("src/modules/texts/rawtext/vnt/", "VNT", "Valera Spanish NT"); +// RawCom commentary("src/modules/comments/rawcom/rwp/", "RWP", "Robertson's Word Pictures"); + RawCom commentary("src/modules/comments/rawcom/mhc/", "MHC", "Matthew Henry's Commentary on the Whole Bible"); +// RawFiles commentary("src/modules/comments/rawfiles/personal/", "MHC", "Matthew Henry's Commentary on the Whole Bible"); + + + if (argc > 3) + mykey.AutoNormalize(0); // Turn off autonormalize if 3 args to allow for intros + // This is kludgy but at lease you can try it + // with something like: sword "Matthew 1:0" 1 1 + + + mykey = (argc < 2) ? "James 1:19" : argv[1]; + mykey.Persist(1); + text.setKey(mykey); + commentary.setKey(mykey); + + + max = (argc < 3) ? 1 : atoi(argv[2]); + + + cout << "\n"; + + + for (loop = 0; loop < max; loop++) { + cout << (SWKey &)text << ":\n"; + text.Display(); + cout << "\n"; + cout << "-------------\n"; + commentary.Display(); + cout << "\n"; + cout << "==========================\n"; + mykey++; + } + cout << "\n\n"; +} diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..951383e --- /dev/null +++ b/config.guess @@ -0,0 +1,1516 @@ +#! /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 Free Software Foundation, +# Inc. + +timestamp='2007-05-17' + +# 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 to . Submit a context +# diff and a properly formatted 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. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +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 +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 __ELF__ >/dev/null + 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'` + exit ;; + 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 ;; + 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:SunOS:5.*:* | ix86xen:SunOS:5.*:*) + echo i386-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:*:[45]) + 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 __LP64__ >/dev/null + 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*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-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 ;; + 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 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + 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 ;; + 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:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + 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 ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + 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 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-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 ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*) + 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 i386. + echo i386-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; } ;; + 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.0*:*) + 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 ;; + 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 + 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 ;; + 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 ;; +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: diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..4847ab0 --- /dev/null +++ b/config.h.in @@ -0,0 +1,62 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* 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 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. */ +#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 the header file. */ +#undef HAVE_UNISTD_H + +/* Name of package */ +#undef PACKAGE + +/* 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 version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN diff --git a/config.sub b/config.sub new file mode 100755 index 0000000..c060f44 --- /dev/null +++ b/config.sub @@ -0,0 +1,1626 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-04-29' + +# 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 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. + +# 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 +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-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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) + os= + basic_machine=$1 + ;; + -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 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | 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 | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # 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 + ;; + + # 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-* | c54x-* | c55x-* | c6x-* \ + | 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-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | 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-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | 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-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # 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 + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + 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 + ;; + cr16c) + basic_machine=cr16c-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 + ;; + 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 + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + 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 + ;; + 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 + ;; + 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) basic_machine=powerpc-unknown + ;; + ppc-*) 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 + ;; + 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 + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + 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 + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-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[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. + -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* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -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* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -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*) + # 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 + ;; + -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 + ;; + # 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 + ;; + -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: diff --git a/configure b/configure new file mode 100755 index 0000000..1b14cd0 --- /dev/null +++ b/configure @@ -0,0 +1,22844 @@ +#! /bin/sh +# From configure.ac Revision: 1.45 . +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for sword 1.5.11. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 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=: + # 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 + + + + +# PATH needs CR +# 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 + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +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.) +as_nl=' +' +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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +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 + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +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 + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); 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 +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +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 +fi +echo >conf$$.file +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 +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=: +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$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${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 </dev/null 2>&1 && unset CDPATH + +if test -z "$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 && + echo_test_string=`eval $cmd` && + (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. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, 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= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='sword' +PACKAGE_TARNAME='sword' +PACKAGE_VERSION='1.5.11' +PACKAGE_STRING='sword 1.5.11' +PACKAGE_BUGREPORT='sword-bugs@crosswire.org' + +ac_unique_file="sword.bmp" +# 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='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +SED +GREP +EGREP +LN_S +ECHO +AR +RANLIB +DLLTOOL +AS +OBJDUMP +CPP +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +CLUCENE_LIBS +CLUCENE_CXXFLAGS +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT +CPPUNIT_CONFIG +CPPUNIT_CFLAGS +CPPUNIT_LIBS +HAVE_CPPUNIT_TRUE +HAVE_CPPUNIT_FALSE +PKG_CONFIG +PKGDATA +GENCCODE +GENCMN +GENRB +ICU_CONFIG +CURL_CONFIG +with_zlib +with_icu +with_conf +dir_confdef +CURL_AM_CFLAGS +CURL_LIBS +ICU_LIBS +ICU_IOLIBS +ICU_VER +XML_LIBS +enable_debug +enable_profile +AM_CXXFLAGS +target_system +target_mingw32 +HAVE_VSNPRINTF_TRUE +HAVE_VSNPRINTF_FALSE +MINGW_TRUE +MINGW_FALSE +ICU_TRUE +ICU_FALSE +USELUCENE_TRUE +USELUCENE_FALSE +ICUSWORD_TRUE +ICUSWORD_FALSE +ZLIB_TRUE +ZLIB_FALSE +SHAREDLIB_TRUE +SHAREDLIB_FALSE +INSTCONF_TRUE +INSTCONF_FALSE +INSTALLMGR_TRUE +INSTALLMGR_FALSE +WITHCURL_TRUE +WITHCURL_FALSE +INTERNALFTPLIB_TRUE +INTERNALFTPLIB_FALSE +CONFDEF_TRUE +CONFDEF_FALSE +USE_PKGCONF_TRUE +USE_PKGCONF_FALSE +BUILDTESTS_TRUE +BUILDTESTS_FALSE +BUILDUTILS_TRUE +BUILDUTILS_FALSE +BUILDEXAMPLES_TRUE +BUILDEXAMPLES_FALSE +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CXX +CXXFLAGS +CCC +CPP +CXXCPP +F77 +FFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# 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=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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=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 ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + 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'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +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 + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +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 + 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 .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# 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 -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + 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 .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + 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 sword 1.5.11 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/sword] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of sword 1.5.11:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-debug build debug library (default=no) + --enable-warnings build with compiler warnings as errors (default=no) + --enable-profile allow profiling (default=no) + --enable-profilefn allow functioncheck profiling (default=no) + --enable-tests build test programs (default=no) + --enable-utilities build utilities (default=yes) + --enable-examples build examples (default=no) + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] include additional configurations [automatic] + --with-clucene= prefix of CLucene-Core installation. e.g. /usr/local + or /usr + --with-zlib allow zlib compressed modules (default=yes) + --with-icu use ICU for unicode (default=no) + --with-conf install a new sword.conf (default=yes) + --with-curl build install manager support using libcurl + (default=yes) + --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional) + --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional) + +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 C/C++/Objective 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 + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +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 . +_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" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`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 + 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 +sword configure 1.5.11 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 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 +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 sword $as_me 1.5.11, which was +generated by GNU Autoconf 2.61. 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=. + 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$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 + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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 + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_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 + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + 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'; { (exit 1); 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 + +# 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 + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + 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. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +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,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +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 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`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. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +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_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; 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 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +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. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +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 + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +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 + + +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +am__api_version='1.10' + +# 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. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +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 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$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' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P 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. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='sword' + VERSION='1.5.11' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +ac_config_headers="$ac_config_headers include/config.h" + + + +# --------------------------------------------------------------------- +# Check Programs +# --------------------------------------------------------------------- +CFLAGS=" $CFLAGS" +CXXFLAGS=" $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 + +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out 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. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 | *.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 + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$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 +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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" + 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +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 +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +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 -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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$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 + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +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. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +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 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$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' + + + +# 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 --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=yes +fi + + +# 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 + + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # 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 { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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 + +fi + +SED=$lt_cv_path_SED + +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + 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 + ac_count=`expr $ac_count + 1` + 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 + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + 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 + ac_count=`expr $ac_count + 1` + 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 + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +# 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. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +aix4* | aix5*) + 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 + ;; + +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) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + 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=unknown + ;; + +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 + ;; + +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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$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 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 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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 5021 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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*) + libsuff=64 + 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*) + 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" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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 +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-cygwin* | *-*-mingw* | *-*-pw32*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +echo "${ECHO_T}$DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_DLLTOOL="dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_AS="as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +echo "${ECHO_T}$ac_ct_AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +echo "${ECHO_T}$OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; + +esac + +need_locks="$enable_libtool_lock" + + +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 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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 + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f 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 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +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 + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## --------------------------------------- ## +## Report this to sword-bugs@crosswire.org ## +## --------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +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 +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f 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 +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +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 + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # 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_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo 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 + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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*) + # 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 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi + + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +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:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 -f 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 + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +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. +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' + +# 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 avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# 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 + +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 +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <&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 + +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 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <&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 + +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 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=yes + +# 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 + + +# 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 + +# Use C for the default configuration in the libtool script +tagname= +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 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 conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:7582: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7586: \$? = $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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$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= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) + # 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' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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' + ;; + + 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 + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # 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='-fPIC' + ;; + esac + ;; + + *) + 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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + 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' + ;; + *) + 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 + ;; + + 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 + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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:7872: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7876: \$? = $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_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } + +if test x"$lt_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 +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 + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:7976: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7980: \$? = $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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$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 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # 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_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + 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-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # 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 + ;; + 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>/dev/null` in + *\ [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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&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. + +EOF + fi + ;; + + amigaos*) + 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 + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + 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*) + # _LT_AC_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/'\'' -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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + 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' ;; + 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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; 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 + else + ld_shlibs=no + fi + ;; + + netbsd*) + 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 <&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. + +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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$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 + ;; + + aix4* | aix5*) + 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].*|aix5*) + 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_libdir_separator=':' + link_all_deplibs=yes + + 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 + 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 + + # 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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 "${wl}${allow_undefined_flag}"; 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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*) + 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 + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # 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 "$deplibs" | $SED -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*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = 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' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + 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_separator=: + + hardcode_direct=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 ${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_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + 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 + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + 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 ${wl}-set_version ${wl}$verstring` ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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 + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + 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' + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 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:$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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + 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* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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" + +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 +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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant 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_AC_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 +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; 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 + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}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" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +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*) + 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 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = 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 + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* 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 (); +/* 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_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* 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 (); +/* 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_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +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" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 < +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#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 ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$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\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 < +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#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 ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$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 + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + fix_srcfile_path \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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 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. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# 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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +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 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# 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 + +# 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 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_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 + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + 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_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= +export_dynamic_flag_spec_CXX= +hardcode_direct_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 +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 + +# 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= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$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(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 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-%%"` + + +# We don't want -fno-exception wen 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. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$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 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + 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].*|aix5*) + 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_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + 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 + + # 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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 "${wl}${allow_undefined_flag}"; 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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*) + # _LT_AC_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*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + 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 + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + 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' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + 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) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + 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_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 $list' + ;; + *) + 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 -set_version $verstring` -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 ${wl}-set_version ${wl}$verstring` ${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 ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux* | k*bsd*-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 $list' + + 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*) + # 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*) + # Portland Group C++ compiler + 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' + + 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 $templist | $SED "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 $list' + ;; + *) + 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' + + # 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::"' + ;; + 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 + 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*) + 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 + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + 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 ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + 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. + # + # 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 $templist | $SED "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 $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + 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 + ;; + 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. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + 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 -set_version $verstring` -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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + 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" | grep -v "ld:"`; templist=`echo $templist | $SED "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 $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + 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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + 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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + 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 + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) + # 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' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # 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 IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # 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_AC_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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + 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) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # 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' + ;; + *) + 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*) + ;; + 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 + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + 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 + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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:12847: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:12851: \$? = $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_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_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 +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 + +# +# 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\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_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_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:12951: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:12955: \$? = $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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$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 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # 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*) + 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' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 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:$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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + 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* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&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-existant 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_AC_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 +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +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 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# 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 + +# 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_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# 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 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# 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. + +# 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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$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-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-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_F77='-Bstatic' + fi + ;; + + amigaos*) + # 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_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + 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_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # 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_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-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_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # 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:14515: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:14519: \$? = $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_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=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_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=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:14619: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14623: \$? = $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_F77=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # 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_F77="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + 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-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # 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 + ;; + esac + + ld_shlibs_F77=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_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&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. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$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_F77='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_F77=no + fi + ;; + + interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${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_F77='$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_F77='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${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_F77='${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' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$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 + else + ld_shlibs_F77=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$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_F77=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$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_F77=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_F77=unsupported + fi + ;; + + aix4* | aix5*) + 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_F77='$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_F77='$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].*|aix5*) + 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_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + 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_F77=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_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + 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 + + # 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_F77=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_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$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 >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$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*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # 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_F77=' ' + allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$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_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$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_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_F77=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=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_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$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_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_F77 + +# 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_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# 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_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# 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 + +# 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_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$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. + +# 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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$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-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:16808: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:16812: \$? = $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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # 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_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + 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_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # 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_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # 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:17098: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17102: \$? = $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_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=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_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=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:17202: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:17206: \$? = $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_GCJ=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # 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_GCJ="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + 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-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # 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 + ;; + esac + + ld_shlibs_GCJ=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_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&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. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$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_GCJ='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_GCJ=no + fi + ;; + + interix[3-9]*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${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_GCJ='${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' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$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 + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$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_GCJ=no + cat <&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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + 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_GCJ='$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_GCJ='$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].*|aix5*) + 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_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + 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_GCJ=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_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + 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 + + # 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_GCJ=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_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$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*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # 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_GCJ=' ' + allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$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_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$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_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_GCJ=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$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' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=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_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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' + ;; + +aix4* | aix5*) + 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*) + 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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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*) + # 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}${versuffix}$shared_ext ${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) + 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 + # 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 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + + # 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="$sys_lib_dlsearch_path_spec $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' + ;; + +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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + +if test "$hardcode_action_GCJ" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_GCJ + +# 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_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# 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_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# 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 + +# 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_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$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. + +# 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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$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-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_RC + +# 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_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# 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_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# 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 + +# 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_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + + + +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 + + + +# Ask user for path to clucene-core stuff:. + +# Check whether --with-clucene was given. +if test "${with_clucene+set}" = set; then + withval=$with_clucene; +fi + + +{ echo "$as_me:$LINENO: checking how to include clucene" >&5 +echo $ECHO_N "checking how to include clucene... $ECHO_C" >&6; } +if test "x$with_clucene" = "xno"; then + { echo "$as_me:$LINENO: result: excluding support" >&5 +echo "${ECHO_T}excluding support" >&6; } +else +#try some default locations +if test -z "$with_clucene" || test "x$with_clucene" = "xyes"; then + #use parent of this directory, and some common library paths + with_clucene=$(cd "../" && pwd) + with_clucene="$with_clucene /usr /usr/local" +else + #use an absolute path + with_clucene=$(cd "$with_clucene" && pwd) +fi +clucene_set_failed= +CLUCENE_CXXFLAGS= +CLUCENE_LIBS= +for flag in $with_clucene; do + if test -z "$clucene_set_failed"; then + if test -e "$flag/include/CLucene.h"; then +# 64-bit checks first + if test -e "$flag/lib64/libclucene.la" || test -e "$flag/lib64/libclucene.so"; then + clucene_set_failed=$flag + CLUCENE_LIBS="-L$flag/lib64 -lclucene" + if test -e "$flag/include/CLucene/clucene-config.h"; then + CLUCENE_CXXFLAGS="-I$flag/include" + else + CLUCENE_CXXFLAGS="-I$flag/include -I$flag/lib64" + fi + else +# 32-bit checks + if test -e "$flag/lib/libclucene.la" || test -e "$flag/lib/libclucene.so"; then + clucene_set_failed=$flag + CLUCENE_LIBS="-L$flag/lib -lclucene" + if test -e "$flag/include/CLucene/clucene-config.h"; then + CLUCENE_CXXFLAGS="-I$flag/include" + else + CLUCENE_CXXFLAGS="-I$flag/include -I$flag/lib" + fi + fi + fi + fi + fi + + if test -z "$clucene_set_failed"; then + if test -e "$flag/src/CLucene/StdHeader.h"; then + if test -e "$flag/src/libclucene.la"; then + CLUCENE_LIBS="-L$flag/src/ -lclucene" + CLUCENE_CXXFLAGS="-I$flag/src/" + clucene_set_failed=$flag/src/ + fi + fi + fi +done + +if test -z "$clucene_set_failed"; then + clucene_set_failed="true" + with_clucene="no" + { echo "$as_me:$LINENO: result: excluding support" >&5 +echo "${ECHO_T}excluding support" >&6; } +else + { echo "$as_me:$LINENO: result: $clucene_set_failed" >&5 +echo "${ECHO_T}$clucene_set_failed" >&6; } +fi + +if test "$clucene_set_failed" = "true"; then + { echo "$as_me:$LINENO: WARNING: Could not detect clucene location. To enable clucene, you must + call configure with the --with-clucene option specifying the location. + This tells configure where to find the CLucene Core library and headers. + e.g. --with-clucene=/usr/local or --with-clucene=/usr" >&5 +echo "$as_me: WARNING: Could not detect clucene location. To enable clucene, you must + call configure with the --with-clucene option specifying the location. + This tells configure where to find the CLucene Core library and headers. + e.g. --with-clucene=/usr/local or --with-clucene=/usr" >&2;} +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 + + + +# --------------------------------------------------------------------- +# With options +# --------------------------------------------------------------------- + +# Check whether --with-zlib was given. +if test "${with_zlib+set}" = set; then + withval=$with_zlib; +else + with_zlib=yes +fi + + +# Check whether --with-icu was given. +if test "${with_icu+set}" = set; then + withval=$with_icu; +else + with_icu=no +fi + + +# Check whether --with-conf was given. +if test "${with_conf+set}" = set; then + withval=$with_conf; +else + with_conf=yes +fi + +#AC_ARG_WITH(installmgr, +# AC_HELP_STRING([--with-installmgr],[build install manager support: +# curl=using libcurl, +# ftplib=using external ftplib, +# internal=using internal ftplib +# (default=internal)]),,with_installmgr=internal) + +# Check whether --with-curl was given. +if test "${with_curl+set}" = set; then + withval=$with_curl; +else + with_curl=yes +fi + +#AC_ARG_WITH(lucene, +# AC_HELP_STRING([--with-lucene],[include lucene support for searching (default=no)]),,with_lucene=no) + + +# --------------------------------------------------------------------- +# Enable options +# --------------------------------------------------------------------- +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; +else + enable_debug=no +fi + +# Check whether --enable-warnings was given. +if test "${enable_warnings+set}" = set; then + enableval=$enable_warnings; +else + enable_warnings=no +fi + +# Check whether --enable-profile was given. +if test "${enable_profile+set}" = set; then + enableval=$enable_profile; +else + enable_profile=no +fi + +# Check whether --enable-profilefn was given. +if test "${enable_profilefn+set}" = set; then + enableval=$enable_profilefn; +else + enable_profilefn=no +fi + +# Check whether --enable-tests was given. +if test "${enable_tests+set}" = set; then + enableval=$enable_tests; +else + enable_tests=no +fi + +# Check whether --enable-utilities was given. +if test "${enable_utilities+set}" = set; then + enableval=$enable_utilities; +else + enable_utilities=yes +fi + +# Check whether --enable-examples was given. +if test "${enable_examples+set}" = set; then + enableval=$enable_examples; +else + enable_examples=no +fi + +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +# --------------------------------------------------------------------- +# Debug and profile +# --------------------------------------------------------------------- + +# these are first because the SET AM_C.*FLAGS, not just append +if test x$enable_debug = xyes; then + GCJFLAGS="-g -O0" + if test x$ac_cv_prog_cc_g = xyes; then + AM_CFLAGS="-g3 -O0 -Wall" + else + AM_CFLAGS="-O0 -Wall" + fi + if test x$ac_cv_prog_cxx_g = xyes; then + AM_CXXFLAGS="-g3 -O0 -Wall" + else + AM_CXXFLAGS="-O0 -Wall" + fi +else + AM_CFLAGS="-O2" + AM_CXXFLAGS="-O2" +fi + +# --------------------------------------------------------------------- +# Check libraries +# --------------------------------------------------------------------- +if test x$with_zlib = xyes; then + +{ echo "$as_me:$LINENO: checking for compress in -lz" >&5 +echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_compress+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 compress (); +int +main () +{ +return compress (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_z_compress=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_compress=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5 +echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; } +if test $ac_cv_lib_z_compress = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +fi + +fi + +#if test x$with_installmgr = xftplib; then +# AC_CHECK_LIB(ftplib, FtpGet) +#fi + +# --------------------------------------------------------------------- +# Find CppUnit +# --------------------------------------------------------------------- +# Locate CppUnit (minimum version 1.8.0) for testing. + + + +# Check whether --with-cppunit-prefix was given. +if test "${with_cppunit_prefix+set}" = set; then + withval=$with_cppunit_prefix; cppunit_config_prefix="$withval" +else + cppunit_config_prefix="" +fi + + +# Check whether --with-cppunit-exec-prefix was given. +if test "${with_cppunit_exec_prefix+set}" = set; then + withval=$with_cppunit_exec_prefix; cppunit_config_exec_prefix="$withval" +else + cppunit_config_exec_prefix="" +fi + + + if test x$cppunit_config_exec_prefix != x ; then + cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config + fi + fi + if test x$cppunit_config_prefix != x ; then + cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config + fi + fi + + # Extract the first word of "cppunit-config", so it can be a program name with args. +set dummy cppunit-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CPPUNIT_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $CPPUNIT_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_CPPUNIT_CONFIG="$CPPUNIT_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_CPPUNIT_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_CPPUNIT_CONFIG" && ac_cv_path_CPPUNIT_CONFIG="no" + ;; +esac +fi +CPPUNIT_CONFIG=$ac_cv_path_CPPUNIT_CONFIG +if test -n "$CPPUNIT_CONFIG"; then + { echo "$as_me:$LINENO: result: $CPPUNIT_CONFIG" >&5 +echo "${ECHO_T}$CPPUNIT_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + cppunit_version_min=1.8.0 + + { echo "$as_me:$LINENO: checking for Cppunit - version >= $cppunit_version_min" >&5 +echo $ECHO_N "checking for Cppunit - version >= $cppunit_version_min... $ECHO_C" >&6; } + no_cppunit="" + if test "$CPPUNIT_CONFIG" = "no" ; then + no_cppunit=yes + else + CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` + CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` + cppunit_version=`$CPPUNIT_CONFIG --version` + + cppunit_major_version=`echo $cppunit_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + cppunit_minor_version=`echo $cppunit_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + cppunit_micro_version=`echo $cppunit_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + + cppunit_major_min=`echo $cppunit_version_min | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + cppunit_minor_min=`echo $cppunit_version_min | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + cppunit_micro_min=`echo $cppunit_version_min | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + + cppunit_version_proper=`expr \ + $cppunit_major_version \> $cppunit_major_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \> $cppunit_minor_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \= $cppunit_minor_min \& \ + $cppunit_micro_version \>= $cppunit_micro_min ` + + if test "$cppunit_version_proper" = "1" ; then + { echo "$as_me:$LINENO: result: $cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version" >&5 +echo "${ECHO_T}$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + no_cppunit=yes + fi + fi + + if test "x$no_cppunit" = x ; then + : + else + CPPUNIT_CFLAGS="" + CPPUNIT_LIBS="" + : + fi + + + + + +# You can set up an automake conditional and use it to conditionally +# build cppunit-using test programs. + if test "$CPPUNIT_LIBS"; then + HAVE_CPPUNIT_TRUE= + HAVE_CPPUNIT_FALSE='#' +else + HAVE_CPPUNIT_TRUE='#' + HAVE_CPPUNIT_FALSE= +fi + + + +# --------------------------------------------------------------------- +# Find pkg-config +# --------------------------------------------------------------------- +use_pkgconfig=yes +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test x$PKG_CONFIG = xno ; then + { echo "$as_me:$LINENO: WARNING: *** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/" >&5 +echo "$as_me: WARNING: *** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/" >&2;} + { echo "$as_me:$LINENO: WARNING: not using pkg-config" >&5 +echo "$as_me: WARNING: not using pkg-config" >&2;} + use_pkgconfig=no +fi + +if $PKG_CONFIG --atleast-pkgconfig-version 0.14 ; then + : +else + { echo "$as_me:$LINENO: WARNING: *** pkg-config too old; version 0.14 or better required." >&5 +echo "$as_me: WARNING: *** pkg-config too old; version 0.14 or better required." >&2;} + { echo "$as_me:$LINENO: WARNING: not using pkg-config" >&5 +echo "$as_me: WARNING: not using pkg-config" >&2;} + use_pkgconfig=no +fi + + +# --------------------------------------------------------------------- +# Find ICU tools +# --------------------------------------------------------------------- +ICU_VER= +ICU_LIBS= +ICU_IOLIBS= +if test x$with_icu = xyes; then + # Extract the first word of "pkgdata", so it can be a program name with args. +set dummy pkgdata; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKGDATA+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKGDATA in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGDATA="$PKGDATA" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/sbin:." +for as_dir in $as_dummy +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_PKGDATA="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKGDATA" && ac_cv_path_PKGDATA="/usr/bin/pkgdata" + ;; +esac +fi +PKGDATA=$ac_cv_path_PKGDATA +if test -n "$PKGDATA"; then + { echo "$as_me:$LINENO: result: $PKGDATA" >&5 +echo "${ECHO_T}$PKGDATA" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + # Extract the first word of "genccode", so it can be a program name with args. +set dummy genccode; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GENCCODE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GENCCODE in + [\\/]* | ?:[\\/]*) + ac_cv_path_GENCCODE="$GENCCODE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/sbin:." +for as_dir in $as_dummy +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_GENCCODE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GENCCODE" && ac_cv_path_GENCCODE="/usr/bin/genccode" + ;; +esac +fi +GENCCODE=$ac_cv_path_GENCCODE +if test -n "$GENCCODE"; then + { echo "$as_me:$LINENO: result: $GENCCODE" >&5 +echo "${ECHO_T}$GENCCODE" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + # Extract the first word of "gencmn", so it can be a program name with args. +set dummy gencmn; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GENCMN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GENCMN in + [\\/]* | ?:[\\/]*) + ac_cv_path_GENCMN="$GENCMN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/sbin:." +for as_dir in $as_dummy +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_GENCMN="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GENCMN" && ac_cv_path_GENCMN="/usr/bin/gencmn" + ;; +esac +fi +GENCMN=$ac_cv_path_GENCMN +if test -n "$GENCMN"; then + { echo "$as_me:$LINENO: result: $GENCMN" >&5 +echo "${ECHO_T}$GENCMN" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + # Extract the first word of "genrb", so it can be a program name with args. +set dummy genrb; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GENRB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GENRB in + [\\/]* | ?:[\\/]*) + ac_cv_path_GENRB="$GENRB" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/sbin:." +for as_dir in $as_dummy +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_GENRB="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GENRB" && ac_cv_path_GENRB="/usr/bin/genrb" + ;; +esac +fi +GENRB=$ac_cv_path_GENRB +if test -n "$GENRB"; then + { echo "$as_me:$LINENO: result: $GENRB" >&5 +echo "${ECHO_T}$GENRB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + + # Extract the first word of "icu-config", so it can be a program name with args. +set dummy icu-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ICU_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ICU_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ICU_CONFIG="$ICU_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_ICU_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ICU_CONFIG" && ac_cv_path_ICU_CONFIG="no" + ;; +esac +fi +ICU_CONFIG=$ac_cv_path_ICU_CONFIG +if test -n "$ICU_CONFIG"; then + { echo "$as_me:$LINENO: result: $ICU_CONFIG" >&5 +echo "${ECHO_T}$ICU_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# The icu-config script was new in icu 2.2 + if test "$ICU_CONFIG" = "no" ; then + echo "*** The icu-config script installed by icu could not be found" + echo "*** continuing anyway and assuming 2.1 or earlier" + ICU_VER="2.1" + ICU_LIBS="-licui18n -licuuc -licudata" + ICU_IOLIBS="-lustdio" + else + ICU_VER=`$ICU_CONFIG --version` + ICU_LIBS=`$ICU_CONFIG --ldflags` + #ICU_IOLIBS=`if test $(echo "$ICU_VER >= 3.0"|bc) -eq 1; then $ICU_CONFIG --ldflags-icuio; else $ICU_CONFIG --ldflags-ustdio; fi;` + ICU_IOLIBS=`$ICU_CONFIG --ldflags-icuio` + fi + AM_CXXFLAGS="$AM_CXXFLAGS -D_ICU_" + AM_CFLAGS="$AM_CFLAGS -D_ICU_" +fi + + +AM_CXXFLAGS="$AM_CXXFLAGS -ftemplate-depth-25" +# AC_DEFINE(DEBUG) +#else +# AC_DEFINE(NDEBUG) +#fi + +if test x$enable_warnings = xyes; then + AM_CFLAGS="$AM_CFLAGS -Werror" + AM_CXXFLAGS="$AM_CXXFLAGS -Werror" +fi + +if test x$enable_profile = xyes; then + AM_CFLAGS="$AM_CFLAGS -pg" + AM_CXXFLAGS="$AM_CXXFLAGS -pg" +fi +if test x$enable_profilefn = xyes; then + AM_CFLAGS="$AM_CFLAGS -g -finstrument-functions" + AM_CXXFLAGS="$AM_CXXFLAGS -g -finstrument-functions" + LIBS="$LIBS -g -finstrument-functions -lfnccheck" +fi + +# --------------------------------------------------------------------- +# Check for curl for installmgr suport +# --------------------------------------------------------------------- + +CURL_AM_CFLAGS= +CURL_LIBS= +#if test x$with_installmgr = xcurl; then +if test x$with_curl = xyes; then + # Extract the first word of "curl-config", so it can be a program name with args. +set dummy curl-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CURL_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $CURL_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_CURL_CONFIG="$CURL_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_CURL_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_CURL_CONFIG" && ac_cv_path_CURL_CONFIG="no" + ;; +esac +fi +CURL_CONFIG=$ac_cv_path_CURL_CONFIG +if test -n "$CURL_CONFIG"; then + { echo "$as_me:$LINENO: result: $CURL_CONFIG" >&5 +echo "${ECHO_T}$CURL_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test "$CURL_CONFIG" = "no" ; then + echo "*** The curl-config script installed by curl could not be found" + echo "*** compiling without libcurl support" + with_curl=no + else + echo "curl found - remote install options available" + CURL_AM_CFLAGS=`$CURL_CONFIG --cflags` + CURL_LIBS=`$CURL_CONFIG --libs` + AM_CXXFLAGS="$AM_CXXFLAGS -DCURLAVAILABLE" + AM_CFLAGS="$AM_CFLAGS -DCURLAVAILABLE" + fi +fi + +# --------------------------------------------------------------------- +# Check for clucene for lucene searching support +# --------------------------------------------------------------------- + +use_clucene= +if test -z "$CLUCENE_LIBS"; then + echo "lucene searching options not available" +else + echo "lucene found - lucene searching options available" + AM_CXXFLAGS="$AM_CXXFLAGS $CLUCENE_CXXFLAGS -DUSELUCENE" + AM_CFLAGS="$AM_CFLAGS -DUSELUCENE" + LIBS="$LIBS $CLUCENE_LIBS" + use_clucene="yes" +fi + + +for ac_func in vsnprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* 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_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_vsnprintf="yes" +fi +done + + +# --------------------------------------------------------------------- +# Alter global conf directory only if not /etc +# --------------------------------------------------------------------- + +if test "x$sysconfdir" = "x/etc"; then + dir_confdef="no" +else + dir_confdef="yes" +fi + + +# --------------------------------------------------------------------- +# Substitute variables into makefiles +# --------------------------------------------------------------------- + + + + + + + +#AC_SUBST(LUCENE_LIBS) + + + + + + + + + + + + + + + + + +# --------------------------------------------------------------------- +# Conditional variables +# --------------------------------------------------------------------- + if test x$have_vsnprintf = xyes; then + HAVE_VSNPRINTF_TRUE= + HAVE_VSNPRINTF_FALSE='#' +else + HAVE_VSNPRINTF_TRUE='#' + HAVE_VSNPRINTF_FALSE= +fi + + if test x$target_mingw32 = xyes; then + MINGW_TRUE= + MINGW_FALSE='#' +else + MINGW_TRUE='#' + MINGW_FALSE= +fi + + if test x$with_icu = xyes; then + ICU_TRUE= + ICU_FALSE='#' +else + ICU_TRUE='#' + ICU_FALSE= +fi + + if test x$use_clucene = xyes; then + USELUCENE_TRUE= + USELUCENE_FALSE='#' +else + USELUCENE_TRUE='#' + USELUCENE_FALSE= +fi + + if test x$with_icu = xsword; then + ICUSWORD_TRUE= + ICUSWORD_FALSE='#' +else + ICUSWORD_TRUE='#' + ICUSWORD_FALSE= +fi + + if test x$with_zlib = xyes; then + ZLIB_TRUE= + ZLIB_FALSE='#' +else + ZLIB_TRUE='#' + ZLIB_FALSE= +fi + + if test x$enable_shared = xyes; then + SHAREDLIB_TRUE= + SHAREDLIB_FALSE='#' +else + SHAREDLIB_TRUE='#' + SHAREDLIB_FALSE= +fi + + if test x$with_conf = xyes; then + INSTCONF_TRUE= + INSTCONF_FALSE='#' +else + INSTCONF_TRUE='#' + INSTCONF_FALSE= +fi + + if test x$with_curl = xyes; then + INSTALLMGR_TRUE= + INSTALLMGR_FALSE='#' +else + INSTALLMGR_TRUE='#' + INSTALLMGR_FALSE= +fi + +#AM_CONDITIONAL(INTERNALFTPLIB, test x$with_installmgr = xinternal) +#AM_CONDITIONAL(WITHCURL, test x$with_installmgr = xcurl) + if test x$with_curl = xyes; then + WITHCURL_TRUE= + WITHCURL_FALSE='#' +else + WITHCURL_TRUE='#' + WITHCURL_FALSE= +fi + + if test x$with_curl != xyes; then + INTERNALFTPLIB_TRUE= + INTERNALFTPLIB_FALSE='#' +else + INTERNALFTPLIB_TRUE='#' + INTERNALFTPLIB_FALSE= +fi + +#AM_CONDITIONAL(WITHFTPLIB, test x$with_installmgr = xftplib) + if test x$dir_confdef = xyes; then + CONFDEF_TRUE= + CONFDEF_FALSE='#' +else + CONFDEF_TRUE='#' + CONFDEF_FALSE= +fi + + if test x$use_pkgconfig = xyes; then + USE_PKGCONF_TRUE= + USE_PKGCONF_FALSE='#' +else + USE_PKGCONF_TRUE='#' + USE_PKGCONF_FALSE= +fi + +#AM_CONDITIONAL(DEBUG, test x$with_debug = xyes) +#AM_CONDITIONAL(PROFILE, test x$with_profile = xyes) + if test x$enable_tests = xyes; then + BUILDTESTS_TRUE= + BUILDTESTS_FALSE='#' +else + BUILDTESTS_TRUE='#' + BUILDTESTS_FALSE= +fi + + if test x$enable_utilities = xyes; then + BUILDUTILS_TRUE= + BUILDUTILS_FALSE='#' +else + BUILDUTILS_TRUE='#' + BUILDUTILS_FALSE= +fi + + if test x$enable_examples = xyes; then + BUILDEXAMPLES_TRUE= + BUILDEXAMPLES_FALSE='#' +else + BUILDEXAMPLES_TRUE='#' + BUILDEXAMPLES_FALSE= +fi + + +# --------------------------------------------------------------------- +# Final output +# --------------------------------------------------------------------- +ac_config_files="$ac_config_files Makefile lib/Makefile tests/Makefile tests/cppunit/Makefile utilities/Makefile examples/Makefile examples/cmdline/Makefile utilities/diatheke/Makefile icu/Makefile sword.pc sword.spec" + +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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_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" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +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= +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=`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. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_CPPUNIT_TRUE}" && test -z "${HAVE_CPPUNIT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_CPPUNIT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_CPPUNIT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_VSNPRINTF_TRUE}" && test -z "${HAVE_VSNPRINTF_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_VSNPRINTF\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_VSNPRINTF\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MINGW_TRUE}" && test -z "${MINGW_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MINGW\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MINGW\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ICU_TRUE}" && test -z "${ICU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ICU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ICU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USELUCENE_TRUE}" && test -z "${USELUCENE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USELUCENE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USELUCENE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ICUSWORD_TRUE}" && test -z "${ICUSWORD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ICUSWORD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ICUSWORD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ZLIB_TRUE}" && test -z "${ZLIB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ZLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ZLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SHAREDLIB_TRUE}" && test -z "${SHAREDLIB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"SHAREDLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"SHAREDLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${INSTCONF_TRUE}" && test -z "${INSTCONF_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INSTCONF\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INSTCONF\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${INSTALLMGR_TRUE}" && test -z "${INSTALLMGR_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INSTALLMGR\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INSTALLMGR\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${WITHCURL_TRUE}" && test -z "${WITHCURL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"WITHCURL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"WITHCURL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${INTERNALFTPLIB_TRUE}" && test -z "${INTERNALFTPLIB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INTERNALFTPLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INTERNALFTPLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CONFDEF_TRUE}" && test -z "${CONFDEF_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONFDEF\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONFDEF\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_PKGCONF_TRUE}" && test -z "${USE_PKGCONF_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_PKGCONF\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_PKGCONF\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILDTESTS_TRUE}" && test -z "${BUILDTESTS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILDTESTS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILDTESTS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILDUTILS_TRUE}" && test -z "${BUILDUTILS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILDUTILS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILDUTILS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILDEXAMPLES_TRUE}" && test -z "${BUILDEXAMPLES_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILDEXAMPLES\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILDEXAMPLES\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $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} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## 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=: + # 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 + + + + +# PATH needs CR +# 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 + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +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.) +as_nl=' +' +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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); 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 +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +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 +fi +echo >conf$$.file +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 +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=: +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 + +# 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 sword $as_me 1.5.11, which was +generated by GNU Autoconf 2.61. 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 + +cat >>$CONFIG_STATUS <<_ACEOF +# 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_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet 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 ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +sword config.status 1.5.11 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 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' +MKDIR_P='$MKDIR_P' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +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=$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 ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + 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. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$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 +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests/cppunit/Makefile") CONFIG_FILES="$CONFIG_FILES tests/cppunit/Makefile" ;; + "utilities/Makefile") CONFIG_FILES="$CONFIG_FILES utilities/Makefile" ;; + "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; + "examples/cmdline/Makefile") CONFIG_FILES="$CONFIG_FILES examples/cmdline/Makefile" ;; + "utilities/diatheke/Makefile") CONFIG_FILES="$CONFIG_FILES utilities/diatheke/Makefile" ;; + "icu/Makefile") CONFIG_FILES="$CONFIG_FILES icu/Makefile" ;; + "sword.pc") CONFIG_FILES="$CONFIG_FILES sword.pc" ;; + "sword.spec") CONFIG_FILES="$CONFIG_FILES sword.spec" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + 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 '{ (exit 1); 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") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +SED!$SED$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LN_S!$LN_S$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +DLLTOOL!$DLLTOOL$ac_delim +AS!$AS$ac_delim +OBJDUMP!$OBJDUMP$ac_delim +CPP!$CPP$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +CLUCENE_LIBS!$CLUCENE_LIBS$ac_delim +CLUCENE_CXXFLAGS!$CLUCENE_CXXFLAGS$ac_delim +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim +MAINT!$MAINT$ac_delim +CPPUNIT_CONFIG!$CPPUNIT_CONFIG$ac_delim +CPPUNIT_CFLAGS!$CPPUNIT_CFLAGS$ac_delim +CPPUNIT_LIBS!$CPPUNIT_LIBS$ac_delim +HAVE_CPPUNIT_TRUE!$HAVE_CPPUNIT_TRUE$ac_delim +HAVE_CPPUNIT_FALSE!$HAVE_CPPUNIT_FALSE$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +PKGDATA!$PKGDATA$ac_delim +GENCCODE!$GENCCODE$ac_delim +GENCMN!$GENCMN$ac_delim +GENRB!$GENRB$ac_delim +ICU_CONFIG!$ICU_CONFIG$ac_delim +CURL_CONFIG!$CURL_CONFIG$ac_delim +with_zlib!$with_zlib$ac_delim +with_icu!$with_icu$ac_delim +with_conf!$with_conf$ac_delim +dir_confdef!$dir_confdef$ac_delim +CURL_AM_CFLAGS!$CURL_AM_CFLAGS$ac_delim +CURL_LIBS!$CURL_LIBS$ac_delim +ICU_LIBS!$ICU_LIBS$ac_delim +ICU_IOLIBS!$ICU_IOLIBS$ac_delim +ICU_VER!$ICU_VER$ac_delim +XML_LIBS!$XML_LIBS$ac_delim +enable_debug!$enable_debug$ac_delim +enable_profile!$enable_profile$ac_delim +AM_CXXFLAGS!$AM_CXXFLAGS$ac_delim +target_system!$target_system$ac_delim +target_mingw32!$target_mingw32$ac_delim +HAVE_VSNPRINTF_TRUE!$HAVE_VSNPRINTF_TRUE$ac_delim +HAVE_VSNPRINTF_FALSE!$HAVE_VSNPRINTF_FALSE$ac_delim +MINGW_TRUE!$MINGW_TRUE$ac_delim +MINGW_FALSE!$MINGW_FALSE$ac_delim +ICU_TRUE!$ICU_TRUE$ac_delim +ICU_FALSE!$ICU_FALSE$ac_delim +USELUCENE_TRUE!$USELUCENE_TRUE$ac_delim +USELUCENE_FALSE!$USELUCENE_FALSE$ac_delim +ICUSWORD_TRUE!$ICUSWORD_TRUE$ac_delim +ICUSWORD_FALSE!$ICUSWORD_FALSE$ac_delim +ZLIB_TRUE!$ZLIB_TRUE$ac_delim +ZLIB_FALSE!$ZLIB_FALSE$ac_delim +SHAREDLIB_TRUE!$SHAREDLIB_TRUE$ac_delim +SHAREDLIB_FALSE!$SHAREDLIB_FALSE$ac_delim +INSTCONF_TRUE!$INSTCONF_TRUE$ac_delim +INSTCONF_FALSE!$INSTCONF_FALSE$ac_delim +INSTALLMGR_TRUE!$INSTALLMGR_TRUE$ac_delim +INSTALLMGR_FALSE!$INSTALLMGR_FALSE$ac_delim +WITHCURL_TRUE!$WITHCURL_TRUE$ac_delim +WITHCURL_FALSE!$WITHCURL_FALSE$ac_delim +INTERNALFTPLIB_TRUE!$INTERNALFTPLIB_TRUE$ac_delim +INTERNALFTPLIB_FALSE!$INTERNALFTPLIB_FALSE$ac_delim +CONFDEF_TRUE!$CONFDEF_TRUE$ac_delim +CONFDEF_FALSE!$CONFDEF_FALSE$ac_delim +USE_PKGCONF_TRUE!$USE_PKGCONF_TRUE$ac_delim +USE_PKGCONF_FALSE!$USE_PKGCONF_FALSE$ac_delim +BUILDTESTS_TRUE!$BUILDTESTS_TRUE$ac_delim +BUILDTESTS_FALSE!$BUILDTESTS_FALSE$ac_delim +BUILDUTILS_TRUE!$BUILDUTILS_TRUE$ac_delim +BUILDUTILS_FALSE!$BUILDUTILS_FALSE$ac_delim +BUILDEXAMPLES_TRUE!$BUILDEXAMPLES_TRUE$ac_delim +BUILDEXAMPLES_FALSE!$BUILDEXAMPLES_FALSE$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[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 || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$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 "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + 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 || +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" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`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 || +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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`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 + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# 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= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + 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 + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;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 +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +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"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +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 + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then 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. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$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 || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`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 || +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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# 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 || { (exit 1); exit 1; } +fi + + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..6a92a04 --- /dev/null +++ b/configure.ac @@ -0,0 +1,299 @@ +# --------------------------------------------------------------------- +# Initialisation +# --------------------------------------------------------------------- + +# Version change: Change line 8 only ! +# Change it immediately after a release + +AC_INIT(sword, 1.5.11, sword-bugs@crosswire.org) +AC_CONFIG_SRCDIR(sword.bmp) +AC_PREREQ(2.52) +AC_REVISION($Revision: 1.45 $) + +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE + +AM_CONFIG_HEADER(include/config.h) + + +# --------------------------------------------------------------------- +# Check Programs +# --------------------------------------------------------------------- +CFLAGS=" $CFLAGS" +CXXFLAGS=" $CXXFLAGS" +AC_LANG(C++) +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL + +AC_C_BIGENDIAN + +ACX_CLUCENE + +# --------------------------------------------------------------------- +# With options +# --------------------------------------------------------------------- +AC_ARG_WITH(zlib, + AC_HELP_STRING([--with-zlib],[allow zlib compressed modules (default=yes)]),,with_zlib=yes) +AC_ARG_WITH(icu, + AC_HELP_STRING([--with-icu],[use ICU for unicode (default=no)]),,with_icu=no) +AC_ARG_WITH(conf, + AC_HELP_STRING([--with-conf],[install a new sword.conf (default=yes)]),,with_conf=yes) +#AC_ARG_WITH(installmgr, +# AC_HELP_STRING([--with-installmgr],[build install manager support: +# curl=using libcurl, +# ftplib=using external ftplib, +# internal=using internal ftplib +# (default=internal)]),,with_installmgr=internal) +AC_ARG_WITH(curl, + AC_HELP_STRING([--with-curl],[build install manager support using libcurl (default=yes)]),,with_curl=yes) +#AC_ARG_WITH(lucene, +# AC_HELP_STRING([--with-lucene],[include lucene support for searching (default=no)]),,with_lucene=no) + + +# --------------------------------------------------------------------- +# Enable options +# --------------------------------------------------------------------- +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug],[build debug library (default=no)]),,enable_debug=no) +AC_ARG_ENABLE(warnings, + AC_HELP_STRING([--enable-warnings],[build with compiler warnings as errors (default=no)]),,enable_warnings=no) +AC_ARG_ENABLE(profile, + AC_HELP_STRING([--enable-profile],[allow profiling (default=no)]),,enable_profile=no) +AC_ARG_ENABLE(profilefn, + AC_HELP_STRING([--enable-profilefn],[allow functioncheck profiling (default=no)]),,enable_profilefn=no) +AC_ARG_ENABLE(tests, + AC_HELP_STRING([--enable-tests],[build test programs (default=no)]),,enable_tests=no) +AC_ARG_ENABLE(utilities, + AC_HELP_STRING([--enable-utilities],[build utilities (default=yes)]),,enable_utilities=yes) +AC_ARG_ENABLE(examples, + AC_HELP_STRING([--enable-examples],[build examples (default=no)]),,enable_examples=no) +AM_MAINTAINER_MODE + +# --------------------------------------------------------------------- +# Debug and profile +# --------------------------------------------------------------------- + +# these are first because the SET AM_C.*FLAGS, not just append +if test x$enable_debug = xyes; then + GCJFLAGS="-g -O0" + if test x$ac_cv_prog_cc_g = xyes; then + AM_CFLAGS="-g3 -O0 -Wall" + else + AM_CFLAGS="-O0 -Wall" + fi + if test x$ac_cv_prog_cxx_g = xyes; then + AM_CXXFLAGS="-g3 -O0 -Wall" + else + AM_CXXFLAGS="-O0 -Wall" + fi +else + AM_CFLAGS="-O2" + AM_CXXFLAGS="-O2" +fi + +# --------------------------------------------------------------------- +# Check libraries +# --------------------------------------------------------------------- +if test x$with_zlib = xyes; then + AC_CHECK_LIB(z, compress) +fi + +#if test x$with_installmgr = xftplib; then +# AC_CHECK_LIB(ftplib, FtpGet) +#fi + +# --------------------------------------------------------------------- +# Find CppUnit +# --------------------------------------------------------------------- +# Locate CppUnit (minimum version 1.8.0) for testing. +AM_PATH_CPPUNIT(1.8.0) + +# You can set up an automake conditional and use it to conditionally +# build cppunit-using test programs. +AM_CONDITIONAL(HAVE_CPPUNIT, test "$CPPUNIT_LIBS") + + +# --------------------------------------------------------------------- +# Find pkg-config +# --------------------------------------------------------------------- +use_pkgconfig=yes +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +if test x$PKG_CONFIG = xno ; then + AC_MSG_WARN([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/]) + AC_MSG_WARN([not using pkg-config]) + use_pkgconfig=no +fi + +if $PKG_CONFIG --atleast-pkgconfig-version 0.14 ; then + : +else + AC_MSG_WARN([*** pkg-config too old; version 0.14 or better required.]) + AC_MSG_WARN([not using pkg-config]) + use_pkgconfig=no +fi + + +# --------------------------------------------------------------------- +# Find ICU tools +# --------------------------------------------------------------------- +ICU_VER= +ICU_LIBS= +ICU_IOLIBS= +if test x$with_icu = xyes; then + AC_PATH_PROG([PKGDATA], [pkgdata],[/usr/bin/pkgdata],[$PATH:/usr/sbin:.]) + AC_PATH_PROG([GENCCODE], [genccode], [/usr/bin/genccode], [$PATH:/usr/sbin:.]) + AC_PATH_PROG([GENCMN], [gencmn], [/usr/bin/gencmn], [$PATH:/usr/sbin:.]) + AC_PATH_PROG([GENRB], [genrb], [/usr/bin/genrb], [$PATH:/usr/sbin:.]) + + AC_PATH_PROG(ICU_CONFIG, icu-config, no) +# The icu-config script was new in icu 2.2 + if test "$ICU_CONFIG" = "no" ; then + echo "*** The icu-config script installed by icu could not be found" + echo "*** continuing anyway and assuming 2.1 or earlier" + ICU_VER="2.1" + ICU_LIBS="-licui18n -licuuc -licudata" + ICU_IOLIBS="-lustdio" + else + ICU_VER=`$ICU_CONFIG --version` + ICU_LIBS=`$ICU_CONFIG --ldflags` + #ICU_IOLIBS=`if test $(echo "$ICU_VER >= 3.0"|bc) -eq 1; then $ICU_CONFIG --ldflags-icuio; else $ICU_CONFIG --ldflags-ustdio; fi;` + ICU_IOLIBS=`$ICU_CONFIG --ldflags-icuio` + fi + AM_CXXFLAGS="$AM_CXXFLAGS -D_ICU_" + AM_CFLAGS="$AM_CFLAGS -D_ICU_" +fi + + +AM_CXXFLAGS="$AM_CXXFLAGS -ftemplate-depth-25" +# AC_DEFINE(DEBUG) +#else +# AC_DEFINE(NDEBUG) +#fi + +if test x$enable_warnings = xyes; then + AM_CFLAGS="$AM_CFLAGS -Werror" + AM_CXXFLAGS="$AM_CXXFLAGS -Werror" +fi + +if test x$enable_profile = xyes; then + AM_CFLAGS="$AM_CFLAGS -pg" + AM_CXXFLAGS="$AM_CXXFLAGS -pg" +fi +if test x$enable_profilefn = xyes; then + AM_CFLAGS="$AM_CFLAGS -g -finstrument-functions" + AM_CXXFLAGS="$AM_CXXFLAGS -g -finstrument-functions" + LIBS="$LIBS -g -finstrument-functions -lfnccheck" +fi + +# --------------------------------------------------------------------- +# Check for curl for installmgr suport +# --------------------------------------------------------------------- + +CURL_AM_CFLAGS= +CURL_LIBS= +#if test x$with_installmgr = xcurl; then +if test x$with_curl = xyes; then + AC_PATH_PROG(CURL_CONFIG, curl-config, no) + if test "$CURL_CONFIG" = "no" ; then + echo "*** The curl-config script installed by curl could not be found" + echo "*** compiling without libcurl support" + with_curl=no + else + echo "curl found - remote install options available" + CURL_AM_CFLAGS=`$CURL_CONFIG --cflags` + CURL_LIBS=`$CURL_CONFIG --libs` + AM_CXXFLAGS="$AM_CXXFLAGS -DCURLAVAILABLE" + AM_CFLAGS="$AM_CFLAGS -DCURLAVAILABLE" + fi +fi + +# --------------------------------------------------------------------- +# Check for clucene for lucene searching support +# --------------------------------------------------------------------- + +use_clucene= +if test -z "$CLUCENE_LIBS"; then + echo "lucene searching options not available" +else + echo "lucene found - lucene searching options available" + AM_CXXFLAGS="$AM_CXXFLAGS $CLUCENE_CXXFLAGS -DUSELUCENE" + AM_CFLAGS="$AM_CFLAGS -DUSELUCENE" + LIBS="$LIBS $CLUCENE_LIBS" + use_clucene="yes" +fi + +AC_CHECK_FUNCS(vsnprintf, [have_vsnprintf="yes"]) + +# --------------------------------------------------------------------- +# Alter global conf directory only if not /etc +# --------------------------------------------------------------------- + +if test "x$sysconfdir" = "x/etc"; then + dir_confdef="no" +else + dir_confdef="yes" +fi + + +# --------------------------------------------------------------------- +# Substitute variables into makefiles +# --------------------------------------------------------------------- +AC_SUBST(with_zlib) +AC_SUBST(with_icu) +AC_SUBST(with_conf) +AC_SUBST(dir_confdef) +AC_SUBST(CC) +AC_SUBST(CURL_AM_CFLAGS) +AC_SUBST(CURL_LIBS) +#AC_SUBST(LUCENE_LIBS) +AC_SUBST(ICU_LIBS) +AC_SUBST(ICU_IOLIBS) +AC_SUBST(ICU_VER) +AC_SUBST(XML_LIBS) +AC_SUBST(enable_debug) +AC_SUBST(enable_profile) +AC_SUBST(AM_CXXFLAGS) + +AC_SUBST(target_cpu) +AC_SUBST(target_vendor) +AC_SUBST(target_os) + +AC_SUBST(target_system) +AC_SUBST(target_mingw32) + + + +# --------------------------------------------------------------------- +# Conditional variables +# --------------------------------------------------------------------- +AM_CONDITIONAL(HAVE_VSNPRINTF, test x$have_vsnprintf = xyes) +AM_CONDITIONAL(MINGW, test x$target_mingw32 = xyes) +AM_CONDITIONAL(ICU, test x$with_icu = xyes) +AM_CONDITIONAL(USELUCENE, test x$use_clucene = xyes) +AM_CONDITIONAL(ICUSWORD, test x$with_icu = xsword) +AM_CONDITIONAL(ZLIB, test x$with_zlib = xyes) +AM_CONDITIONAL(SHAREDLIB, test x$enable_shared = xyes) +AM_CONDITIONAL(INSTCONF, test x$with_conf = xyes) +AM_CONDITIONAL(INSTALLMGR, test x$with_curl = xyes) +#AM_CONDITIONAL(INTERNALFTPLIB, test x$with_installmgr = xinternal) +#AM_CONDITIONAL(WITHCURL, test x$with_installmgr = xcurl) +AM_CONDITIONAL(WITHCURL, test x$with_curl = xyes) +AM_CONDITIONAL(INTERNALFTPLIB, test x$with_curl != xyes) +#AM_CONDITIONAL(WITHFTPLIB, test x$with_installmgr = xftplib) +AM_CONDITIONAL(CONFDEF, test x$dir_confdef = xyes) +AM_CONDITIONAL(USE_PKGCONF, test x$use_pkgconfig = xyes) +#AM_CONDITIONAL(DEBUG, test x$with_debug = xyes) +#AM_CONDITIONAL(PROFILE, test x$with_profile = xyes) +AM_CONDITIONAL(BUILDTESTS, test x$enable_tests = xyes) +AM_CONDITIONAL(BUILDUTILS, test x$enable_utilities = xyes) +AM_CONDITIONAL(BUILDEXAMPLES, test x$enable_examples = xyes) + +# --------------------------------------------------------------------- +# Final output +# --------------------------------------------------------------------- +AC_CONFIG_FILES(Makefile lib/Makefile tests/Makefile tests/cppunit/Makefile utilities/Makefile examples/Makefile examples/cmdline/Makefile utilities/diatheke/Makefile icu/Makefile sword.pc sword.spec) +AC_OUTPUT + diff --git a/depcomp b/depcomp new file mode 100755 index 0000000..ca5ea4e --- /dev/null +++ b/depcomp @@ -0,0 +1,584 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2006-10-15.18 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. + +# 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, 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 Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/distignore b/distignore new file mode 100644 index 0000000..ab9b218 --- /dev/null +++ b/distignore @@ -0,0 +1,5 @@ +sword/examples/windoze/delphi20/ojbcwin +sword/olb/all.c +sword/olb/online.h +sword/autom4te.cache + diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..c0ce3cb --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,5 @@ +swdocdir = $(top_srcdir)/doc + +EXTRA_DIST += $(swdocdir)/greektrans.txt +EXTRA_DIST += $(swdocdir)/translation-template.conf + diff --git a/doc/README b/doc/README new file mode 100644 index 0000000..ca0a00c --- /dev/null +++ b/doc/README @@ -0,0 +1,10 @@ +See README and INSTALL in root directory of the sword package + +No real good docs for developers yet, but see tutorials and primers on +our website at: + +http://www.crosswire.org + + +Thanks! More to come, Lord willing! + diff --git a/doc/greektrans.txt b/doc/greektrans.txt new file mode 100644 index 0000000..84851c9 --- /dev/null +++ b/doc/greektrans.txt @@ -0,0 +1,81 @@ + + TRANSLITERATING GREEK into ASCII + + B-Greek has from the beginning allowed every poster to use +any scheme he/she found comfortable, since we all could usually +figure out what text was meant. For those who wish some +guidance, a generally accepted scheme has evolved on the List, +with two or three matters still not fully settled. + +(1) CAPITALS are used when transliterating Greek letters, on a +one-to-one basis, reserving lower-case {i} to represent +iota-subscript and lower-case {h} to represent rough breathing. +No accents, no smooth breathings. And no distinction between +medial and final Sigma. + +(2) If accents are really necessary, to distinguish otherwise +identical words, acute is represented by {/}, grave by {\}, and +circumflex either by tilde {~ [preferable]} or {=} -- always +AFTER the vowel over which it would be written. + +(3) A few characters without Roman single-character form are +usually done with almost-look-alike Roman characters otherwise +unused: + + Theta = Q + Eta = H + Psi = Y (upsilon is always U) + Omega = W + +(4) Digraphs (in the usual Roman transliteration) are handled in +three different ways to avoid two-letter transliterations, all +involving otherwise-unused Roman letters: + + THeta uses Q ("look-alike", as above). + PSi uses Y ("look-alike", as above). + PHi uses F (sound equivalence). + CHi uses C (first letter of traditional digraph). + +(5) Xi and Chi: There being no single Roman letter for "Xi" +other than X, the "look-alike" use of X for "Chi" is confusing, +though some use it. And some seem to like to use C for "Sigma." +Since S is otherwise unused, and poses no confusion whatever, +using C for "Sigma" makes for problems in decoding back to Greek, +especially since it is the only letter available for "Chi" +(unless X is used, thus posing a problem for "Xi"). And +occasionally someone uses P for "Rho", making problems for how to +represent "Pi". + +***************************************************************** + + Usual in Traditional + B-Greek (uses macrons and digraphs) + + +alpha A a +beta B b +gamma G g +delta D d +epsilon E e +zeta Z z +eta H e with macron +theta Q th +iota I i +kappa K k +lambda L l +mu M m +nu N n +xi X x +omicron O o +pi P p +rho R r +sigma S s +tau T t +upsilon U u +phi F ph +chi C ch +psi Y ps +omega W o with macron + +rough breathing h h +iota-subscript i (i) diff --git a/doc/translation-template.conf b/doc/translation-template.conf new file mode 100644 index 0000000..6b7dda4 --- /dev/null +++ b/doc/translation-template.conf @@ -0,0 +1,334 @@ +[Meta] +Name= +Description= + +[Text] + +# Insert after the = characters the translated booknames. + +Genesis= +Exodus= +Leviticus= +Numbers= +Deuteronomy= +Joshua= +Judges= +Ruth= +I Samuel= +II Samuel= +I Kings= +II Kings= +I Chronicles= +II Chronicles= +Ezra= +Nehemiah= +Esther= +Job= +Psalms= +Proverbs= +Ecclesiastes= +Song of Solomon= +Isaiah= +Jeremiah= +Lamentations= +Ezekiel= +Daniel= +Hosea= +Joel= +Amos= +Obadiah= +Jonah= +Micah= +Nahum= +Habakkuk= +Zephaniah= +Haggai= +Zechariah= +Malachi= +Matthew= +Mark= +Luke= +John= +Acts= +Romans= +I Corinthians= +II Corinthians= +Galatians= +Ephesians= +Philippians= +Colossians= +I Thessalonians= +II Thessalonians= +I Timothy= +II Timothy= +Titus= +Philemon= +Hebrews= +James= +I Peter= +II Peter= +I John= +II John= +III John= +Jude= +Revelation of John= + +[Book Abbrevs] + +# Here are the standard english booknames and abbrevations. Don't change +# them. Change your own ones below. + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +# here are the booknames and possible abbrevations of your language! The +# names below are german booknames, change them. The number after the names +# are the booknumber (location of book in the Bible). + +1. MOSE=1 +2. MOSE=2 +3. MOSE=3 +4. MOSE=4 +5. MOSE=5 +JOSUA=6 +RICHTER=7 +RUT=8 +1. SAMUEL=9 +2. SAMUEL=10 +1. KÖNIGE=11 +2. KÖNIGE=12 +1. CHRONIK=13 +2. CHRONIK=14 +ESRA=15 +NEHEMIA=16 +ESTER=17 +HIOB=18 +PSALMEN=19 +SPRÜCHE=20 +PREDIGER=21 +HOHESLIED=22 +JESAJA=23 +JEREMIA=24 +KLAGELIEDER=25 +HESEKIEL=26 +DANIEL=27 +HOSEA=28 +JOEL=29 +AMOS=30 +OBADJA=31 +JONA=32 +MICHA=33 +NAHUM=34 +HABAKUK=35 +ZEPHANJA=36 +HAGGAI=37 +SACHARJA=38 +MALEACHI=39 +MATTHÄUS=40 +MARKUS=41 +LUKAS=42 +JOHANNES=43 +APOSTELGESCHICHTE=44 +RÖMER=45 +1. KORINTHER=46 +2. KORINTHER=47 +GALATER=48 +EPHESER=49 +PHILIPPER=50 +KOLOSSER=51 +1. THESSALONICHER=52 +2. THESSALONICHER=53 +1. THIMOTHEUS=54 +2. THIMOTHEUS=55 +TITUS=56 +PHILEMON=57 +HEBRÄER=58 +JAKOBUS=59 +1. PETRUS=60 +2. PETRUS=61 +1. JOHANNES=62 +2. JOHANNES=63 +3. JOHANNES=64 +JUDAS=65 +OFFENBARUNG=66 diff --git a/examples/.cvsignore b/examples/.cvsignore new file mode 100644 index 0000000..22a4e72 --- /dev/null +++ b/examples/.cvsignore @@ -0,0 +1,3 @@ +Makefile +Makefile.in + diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..3160def --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,3 @@ +AUTOMAKE_OPTIONS = 1.6 + +SUBDIRS = cmdline diff --git a/examples/Makefile.in b/examples/Makefile.in new file mode 100644 index 0000000..0622bd3 --- /dev/null +++ b/examples/Makefile.in @@ -0,0 +1,518 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = examples +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ + $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_CONFIG = @CPPUNIT_CONFIG@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CURL_AM_CFLAGS = @CURL_AM_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +GREP = @GREP@ +ICU_CONFIG = @ICU_CONFIG@ +ICU_IOLIBS = @ICU_IOLIBS@ +ICU_LIBS = @ICU_LIBS@ +ICU_VER = @ICU_VER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGDATA = @PKGDATA@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dir_confdef = @dir_confdef@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 +SUBDIRS = cmdline +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign examples/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/classes/Makefile b/examples/classes/Makefile new file mode 100644 index 0000000..882d9b8 --- /dev/null +++ b/examples/classes/Makefile @@ -0,0 +1,10 @@ +TARGETS= ciphercng swmgrex +all: $(TARGETS) + +clean: + rm $(TARGETS) + +.cpp: + g++ -g `pkg-config --cflags sword` $< -o $@ `pkg-config --libs sword` + + diff --git a/examples/classes/ciphercng.cpp b/examples/classes/ciphercng.cpp new file mode 100644 index 0000000..e1cd042 --- /dev/null +++ b/examples/classes/ciphercng.cpp @@ -0,0 +1,50 @@ +/****************************************************************************** + * + * This example demonstrates how to change the cipher key of a module + * The change is only in effect for this run. This DOES NOT change the + * cipherkey in the module's .conf file. + * + */ + +#include + +#include +#include + + +using namespace sword; +using namespace std; + +int main(int argc, char **argv) { + + if (argc != 2) { + fprintf(stderr, "usage: %s \n", *argv); + exit(-1); + } + + SWMgr manager; // create a default manager that looks in the current directory for mods.conf + ModMap::iterator it; + it = manager.Modules.find(argv[1]); + + if (it == manager.Modules.end()) { + fprintf(stderr, "%s: couldn't find module: %s\n", *argv, argv[1]); + exit(-1); + } + + SWModule *module = (*it).second; + string key; + + cout << "\nPress [CTRL-C] to end\n\n"; + while (true) { + cout << "\nModule text:\n"; + module->setKey("1jn 1:9"); + cout << "[ " << module->KeyText() << " ]\n"; + cout << (const char *)*module; + cout << "\n\nEnter new cipher key: "; + cin >> key; + cout << "\nSetting key to: " << key; + manager.setCipherKey(argv[1], key.c_str()); + } + + +} diff --git a/examples/classes/swmgrex.cpp b/examples/classes/swmgrex.cpp new file mode 100644 index 0000000..a3d6591 --- /dev/null +++ b/examples/classes/swmgrex.cpp @@ -0,0 +1,58 @@ +/****************************************************************************** + * Class SWMgr manages installed modules for a frontend. + * SWMgr reads a mods.conf file to discover its information. + * It then instantiates the correct decendent of SWModule for each + * module entry in mods.conf + * The developer may use this class to query what modules are installed + * and to retrieve an (SWModule *) for any one of these modules + * + * SWMgr makes its modules available as an STL Map. + * The Map definition is typedef'ed as ModMap + * ModMap consists of: FIRST : SWBuf moduleName + * SECOND: SWModule *module + * + */ + +#include + +#include +#include + +using namespace sword; +using namespace std; + +main() { + SWMgr manager; // create a default manager that looks in the current directory for mods.conf + + cout << "\nInstalled Modules:\n\n"; + + ModMap::iterator modIterator; + +// Loop thru all installed modules and print out information + + for (modIterator = manager.Modules.begin(); modIterator != manager.Modules.end(); modIterator++) { + SWBuf modName = (*modIterator).first; // mod.conf section name (stored in module->Name()) + SWModule *module = (*modIterator).second; + + cout << modName << "(" << module->Name() << ") | " << module->Type() << "\n"; + } + +// Print out a verse from the first module: + + cout << "\n" << manager.Modules.begin()->second->KeyText() << ":\n"; + cout << (const char *)(*manager.Modules.begin()->second); + cout << " (" << manager.Modules.begin()->second->Name() << ")\n"; + +// Print out the same verse from the second module (less confusing): + + modIterator = manager.Modules.begin(); // get first module + modIterator++; // increment to next module + + SWModule *mod = modIterator->second; + + cout << "\n" << mod->KeyText() << ":\n"; +// cout << (const char *)(*mod); // we could do this, the same as above + mod->Display(); // instead of casting mod to const char * to get its contents, we'll call the default display method that writes to stdout; + cout << " (" << mod->Name() << ")\n\n"; + +} diff --git a/examples/cmdline/.cvsignore b/examples/cmdline/.cvsignore new file mode 100644 index 0000000..bbe4fbe --- /dev/null +++ b/examples/cmdline/.cvsignore @@ -0,0 +1,7 @@ +.deps +.libs +Makefile +Makefile.in +lookup +search +threaded_search \ No newline at end of file diff --git a/examples/cmdline/Makefile.am b/examples/cmdline/Makefile.am new file mode 100644 index 0000000..6aaea63 --- /dev/null +++ b/examples/cmdline/Makefile.am @@ -0,0 +1,12 @@ +AUTOMAKE_OPTIONS = 1.6 +INCLUDES = -I $(top_srcdir)/include +LDADD = $(top_builddir)/lib/libsword.la + +noinst_PROGRAMS = lookup search threaded_search listoptions verserangeparse + +lookup_SOURCES = lookup.cpp +search_SOURCES = search.cpp +listoptions_SOURCES = listoptions.cpp +verserangeparse_SOURCES = verserangeparse.cpp +threaded_search_SOURCES = threaded_search.cpp +threaded_search_LDADD = $(LDADD) -lpthread diff --git a/examples/cmdline/Makefile.in b/examples/cmdline/Makefile.in new file mode 100644 index 0000000..b868c64 --- /dev/null +++ b/examples/cmdline/Makefile.in @@ -0,0 +1,512 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +noinst_PROGRAMS = lookup$(EXEEXT) search$(EXEEXT) \ + threaded_search$(EXEEXT) listoptions$(EXEEXT) \ + verserangeparse$(EXEEXT) +subdir = examples/cmdline +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ + $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_listoptions_OBJECTS = listoptions.$(OBJEXT) +listoptions_OBJECTS = $(am_listoptions_OBJECTS) +listoptions_LDADD = $(LDADD) +listoptions_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_lookup_OBJECTS = lookup.$(OBJEXT) +lookup_OBJECTS = $(am_lookup_OBJECTS) +lookup_LDADD = $(LDADD) +lookup_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_search_OBJECTS = search.$(OBJEXT) +search_OBJECTS = $(am_search_OBJECTS) +search_LDADD = $(LDADD) +search_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_threaded_search_OBJECTS = threaded_search.$(OBJEXT) +threaded_search_OBJECTS = $(am_threaded_search_OBJECTS) +threaded_search_DEPENDENCIES = $(LDADD) +am_verserangeparse_OBJECTS = verserangeparse.$(OBJEXT) +verserangeparse_OBJECTS = $(am_verserangeparse_OBJECTS) +verserangeparse_LDADD = $(LDADD) +verserangeparse_DEPENDENCIES = $(top_builddir)/lib/libsword.la +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(listoptions_SOURCES) $(lookup_SOURCES) $(search_SOURCES) \ + $(threaded_search_SOURCES) $(verserangeparse_SOURCES) +DIST_SOURCES = $(listoptions_SOURCES) $(lookup_SOURCES) \ + $(search_SOURCES) $(threaded_search_SOURCES) \ + $(verserangeparse_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_CONFIG = @CPPUNIT_CONFIG@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CURL_AM_CFLAGS = @CURL_AM_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +GREP = @GREP@ +ICU_CONFIG = @ICU_CONFIG@ +ICU_IOLIBS = @ICU_IOLIBS@ +ICU_LIBS = @ICU_LIBS@ +ICU_VER = @ICU_VER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGDATA = @PKGDATA@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dir_confdef = @dir_confdef@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 +INCLUDES = -I $(top_srcdir)/include +LDADD = $(top_builddir)/lib/libsword.la +lookup_SOURCES = lookup.cpp +search_SOURCES = search.cpp +listoptions_SOURCES = listoptions.cpp +verserangeparse_SOURCES = verserangeparse.cpp +threaded_search_SOURCES = threaded_search.cpp +threaded_search_LDADD = $(LDADD) -lpthread +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/cmdline/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign examples/cmdline/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +listoptions$(EXEEXT): $(listoptions_OBJECTS) $(listoptions_DEPENDENCIES) + @rm -f listoptions$(EXEEXT) + $(CXXLINK) $(listoptions_OBJECTS) $(listoptions_LDADD) $(LIBS) +lookup$(EXEEXT): $(lookup_OBJECTS) $(lookup_DEPENDENCIES) + @rm -f lookup$(EXEEXT) + $(CXXLINK) $(lookup_OBJECTS) $(lookup_LDADD) $(LIBS) +search$(EXEEXT): $(search_OBJECTS) $(search_DEPENDENCIES) + @rm -f search$(EXEEXT) + $(CXXLINK) $(search_OBJECTS) $(search_LDADD) $(LIBS) +threaded_search$(EXEEXT): $(threaded_search_OBJECTS) $(threaded_search_DEPENDENCIES) + @rm -f threaded_search$(EXEEXT) + $(CXXLINK) $(threaded_search_OBJECTS) $(threaded_search_LDADD) $(LIBS) +verserangeparse$(EXEEXT): $(verserangeparse_OBJECTS) $(verserangeparse_DEPENDENCIES) + @rm -f verserangeparse$(EXEEXT) + $(CXXLINK) $(verserangeparse_OBJECTS) $(verserangeparse_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listoptions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threaded_search.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verserangeparse.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/cmdline/listoptions.cpp b/examples/cmdline/listoptions.cpp new file mode 100644 index 0000000..580695b --- /dev/null +++ b/examples/cmdline/listoptions.cpp @@ -0,0 +1,21 @@ +#include +#include + +using sword::SWMgr; +using sword::StringList; +using std::cout; + +int main(int argc, char **argv) +{ + SWMgr library; + + StringList options = library.getGlobalOptions(); + for (StringList::const_iterator it = options.begin(); it != options.end(); it++) { + cout << *it << " (" << library.getGlobalOptionTip(*it) << ")\n"; + StringList optionValues = library.getGlobalOptionValues(*it); + for (StringList::const_iterator it2 = optionValues.begin(); it2 != optionValues.end(); it2++) { + cout << "\t" << *it2 << "\n"; + } + } + return 0; +} diff --git a/examples/cmdline/lookup.cpp b/examples/cmdline/lookup.cpp new file mode 100644 index 0000000..481961b --- /dev/null +++ b/examples/cmdline/lookup.cpp @@ -0,0 +1,75 @@ +#include +#include +#include +#include +#include +#include + +using sword::SWMgr; +using sword::MarkupFilterMgr; +using sword::SWModule; +using sword::FMT_WEBIF; +using sword::FMT_HTMLHREF; +using sword::ModMap; +using sword::AttributeTypeList; +using sword::AttributeList; +using sword::AttributeValue; + +int main(int argc, char **argv) +{ + + SWMgr manager(new MarkupFilterMgr(FMT_WEBIF)); +// SWMgr manager(new MarkupFilterMgr(FMT_HTMLHREF)); + SWModule *target; + + if (argc != 3) { + fprintf(stderr, "\nusage: %s <\"lookup key\">\n" + "\tExample: lookup KJV \"James 1:19\"\n\n", argv[0]); + + exit(-1); + } + + target = manager.getModule(argv[1]); + if (!target) { + fprintf(stderr, "Could not find module [%s]. Available modules:\n", argv[1]); + ModMap::iterator it; + for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { + fprintf(stderr, "[%s]\t - %s\n", (*it).second->Name(), (*it).second->Description()); + } + exit(-1); + } + + // turn all filters to default values + manager.setGlobalOption("Headings", "On"); + manager.setGlobalOption("Strong's Numbers", "On"); + manager.setGlobalOption("Lemmas", "Off"); +// manager.setGlobalOption("Greek Accents", "Off"); + + target->setKey(argv[2]); + + target->RenderText(); // force an entry lookup to resolve key to something in the index + + std::cout << "==Raw=Entry===============\n"; + std::cout << target->getKeyText() << ":\n"; + std::cout << target->getRawEntry(); + std::cout << "\n"; + std::cout << "==Render=Entry============\n"; + std::cout << target->RenderText(); + std::cout << "\n"; + std::cout << "==========================\n"; + std::cout << "Entry Attributes:\n\n"; + AttributeTypeList::iterator i1; + AttributeList::iterator i2; + AttributeValue::iterator i3; + for (i1 = target->getEntryAttributes().begin(); i1 != target->getEntryAttributes().end(); i1++) { + std::cout << "[ " << i1->first << " ]\n"; + for (i2 = i1->second.begin(); i2 != i1->second.end(); i2++) { + std::cout << "\t[ " << i2->first << " ]\n"; + for (i3 = i2->second.begin(); i3 != i2->second.end(); i3++) { + std::cout << "\t\t" << i3->first << " = " << i3->second << "\n"; + } + } + } + std::cout << std::endl; + return 0; +} diff --git a/examples/cmdline/search.cpp b/examples/cmdline/search.cpp new file mode 100644 index 0000000..31a9ad9 --- /dev/null +++ b/examples/cmdline/search.cpp @@ -0,0 +1,97 @@ +#include +#include +#include +#include +#include +#include // GNU +#include + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + + /* + * >=0 - regex + * -1 - phrase + * -2 - multiword + * -3 - entryAttrib (eg. Word//Lemma/G1234/) + * -4 - Lucene + */ +char SEARCH_TYPE=-2; + +char printed = 0; +void percentUpdate(char percent, void *userData) { + char maxHashes = *((char *)userData); + + while ((((float)percent)/100) * maxHashes > printed) { + std::cerr << "="; + printed++; + std::cerr.flush(); + } +/* + std::cout << (int)percent << "% "; +*/ + std::cout.flush(); +} + + +int main(int argc, char **argv) +{ +// SWMgr manager(0, 0, true, new MarkupFilterMgr(FMT_RTF, ENC_RTF)); + SWMgr manager; + SWModule *target; + ListKey listkey; + ListKey scope; + VerseKey parser; + ModMap::iterator it; + + if ((argc < 3) || (argc > 5)) { + fprintf(stderr, "\nusage: %s <\"search string\"> [\"search_scope\"] [\"search again for string in previous result set\"]\n" + "\tExample: search KJV \"swift hear slow speak\"\n\n", argv[0]); + + exit(-1); + } + + + SWBuf searchTerm = argv[2]; + manager.setGlobalOption("Greek Accents", "Off"); + manager.setGlobalOption("Strong's Numbers", "On"); + manager.filterText("Greek Accents", searchTerm); + + it = manager.Modules.find(argv[1]); + if (it == manager.Modules.end()) { + fprintf(stderr, "Could not find module [%s]. Available modules:\n", argv[1]); + for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { + fprintf(stderr, "[%s]\t - %s\n", (*it).second->Name(), (*it).second->Description()); + } + exit(-1); + } + + target = (*it).second; + + if (argc > 3) { // if min / max specified + scope = parser.ParseVerseList(argv[3], parser, true); + scope.Persist(1); + target->setKey(scope); + } + + std::cerr << "[0=================================50===============================100]\n "; + char lineLen = 70; + listkey = target->Search(searchTerm.c_str(), SEARCH_TYPE, /*SEARCHFLAG_MATCHWHOLEENTRY*/ REG_ICASE, 0, 0, &percentUpdate, &lineLen); + std::cerr << std::endl; + if (argc > 4) { // if min / max specified + scope = listkey; + scope.Persist(1); + target->setKey(scope); + printed = 0; + std::cerr << " "; + listkey = target->Search(argv[4], SEARCH_TYPE, /*SEARCHFLAG_MATCHWHOLEENTRY*/ REG_ICASE, 0, 0, &percentUpdate, &lineLen); + std::cerr << std::endl; + } + listkey.sort(); + while (!listkey.Error()) { + std::cout << (const char *)listkey << std::endl; + listkey++; + } + +} diff --git a/examples/cmdline/threaded_search.cpp b/examples/cmdline/threaded_search.cpp new file mode 100755 index 0000000..ce322a4 --- /dev/null +++ b/examples/cmdline/threaded_search.cpp @@ -0,0 +1,134 @@ +#include +#include +#include +#include // GNU +#include +#include +#include + +#include + +#ifndef NO_SWORD_NAMESPACE +using sword::SWMgr; +using sword::ListKey; +using sword::SWModule; +using sword::VerseKey; +using sword::SWKey; +using sword::ModMap; +#endif + +int cms_currentProgress; + +class SearchThread { +public: + SearchThread(); + ~SearchThread(); + + char* searchedText; + SWModule* module; + ListKey searchResult; + bool isSearching; + + void startThread(); + void search(); +}; + +void* dummy(void* p) { + SearchThread* searchThread = (SearchThread*)p; + searchThread->search(); + + return NULL; +} + +void percentUpdate(char percent, void* userData) { + cms_currentProgress = (int)percent; + std::cout << cms_currentProgress << "% "; +} + +SearchThread::SearchThread() { + isSearching = false; + module = 0; + searchedText = 0; + cms_currentProgress = -1; +} + +SearchThread::~SearchThread() { +} + +void SearchThread::startThread() { + std::cout << "startThread" << std::endl; + std::cout.flush(); + + pthread_attr_t* attr = new pthread_attr_t; + pthread_attr_init(attr); + pthread_attr_setdetachstate(attr, PTHREAD_CREATE_DETACHED); + + pthread_t *thread= new pthread_t; + isSearching = true; + int i = pthread_create(thread, attr, &dummy, this); + + std::cout << "Created the thread: " << i << std::endl; + std::cout.flush(); +} + +void SearchThread::search() { + + if (!module) { + std::cout << "Return." << std::endl; + return; + } + + ListKey scopeList = VerseKey().ParseVerseList("Luke;John;Revelation","", true); + for (int i=0; i < scopeList.Count(); ++i) { + std::cout << (const char*)*scopeList.GetElement(i) << std::endl; + } + SWKey* scope = &scopeList; + + searchResult = module->Search(searchedText, -2, REG_ICASE, scope, 0, &percentUpdate); + + if (!scope) + std::cout << "bad scope!" << std::endl; + isSearching = false; +} + +int main(int argc, char **argv) { + SWMgr manager; + ModMap::iterator it; + + SearchThread* searchThread = new SearchThread(); + + if (argc != 3) { + fprintf(stderr, "usage: %s \n", argv[0]); + exit(-1); + } + + it = manager.Modules.find(argv[1]); + if (it == manager.Modules.end()) { + fprintf(stderr, "Could not find module [%s]. Available modules:\n", argv[1]); + for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { + fprintf(stderr, "[%s]\t - %s\n", (*it).second->Name(), (*it).second->Description()); + } + exit(-1); + } + + searchThread->searchedText = argv[2]; + searchThread->module = (*it).second; + searchThread->startThread(); + + std::cout << "Start loop" << std::endl; + std::cout.flush(); + while (true) { + if (!searchThread->isSearching) + break; + else + std::cout.flush(); + }; + + std::cout << std::endl << "Number of found items: " << searchThread->searchResult.Count() << std::endl; + std::cout << "Finished program" << std::endl; + std::cout.flush(); + + delete searchThread; + exit(0); +} + diff --git a/examples/cmdline/verserangeparse.cpp b/examples/cmdline/verserangeparse.cpp new file mode 100644 index 0000000..544a7b0 --- /dev/null +++ b/examples/cmdline/verserangeparse.cpp @@ -0,0 +1,69 @@ +/****************************************************************** + * This example shows: + * How to parse a verse reference + * How to persist a custom range key in a book + */ + +#include +#include +#include +#include +#include +#include + +using sword::SWMgr; +using sword::VerseKey; +using sword::ListKey; +using sword::SWModule; +using sword::SW_POSITION; +using sword::FMT_PLAIN; +using sword::MarkupFilterMgr; +using std::cout; +using std::endl; + +int main(int argc, char **argv) +{ + const char *range = (argc > 1) ? argv[1] : "Mat 2:10,12-15"; + + VerseKey parser; + ListKey result; + + result = parser.ParseVerseList(range, parser, true); + // let's iterate the key and display + for (result = TOP; !result.Error(); result++) { + cout << result << "\n"; + } + cout << endl; + + // Now if we'd like persist this key for use inside of a book... + result.Persist(true); + + // Let's get a book; + SWMgr library(new MarkupFilterMgr(FMT_PLAIN)); // render plain without fancy markup + SWModule *book = library.getModule("KJV"); + + // and set our limited key inside + book->setKey(result); + + // now let's iterate the book and display + for ((*book) = TOP; !book->Error(); (*book)++) { + cout << "*** " << book->getKeyText() << ": " << book->RenderText() << "\n"; + } + + // since we've told our result key to persist in book, we can reuse our + // setup by simply resetting result, e.g. + // + // result = parser.ParseVerseList(someNewRange, parser, true); + // + // now an iteration of book will give us our new range. + // + // to stop persistence of our custom key, we'll need to set our book's key + // to something simple: + // + // book->setKey("gen.1.1"); + // + // this allows book to create and use an instance of its preferred key type + // + + return 0; +} diff --git a/examples/simple.cpp b/examples/simple.cpp new file mode 100644 index 0000000..33a6f22 --- /dev/null +++ b/examples/simple.cpp @@ -0,0 +1,33 @@ +/****************************************************************************** + * This is about the simplest useful example of using the sword engine. + * + * After sword is installed, it should compile with something similar to: + * + * g++ -o simple simple.cpp `pkg-config --cflags --libs sword` + * + * If you'd like to choose the type of tag markup which sword will output + * for you, include: + * + * #include + * + * and change your instantiation of SWMgr, below, to (e.g., for HTML): + * + * SWMgr library(0, 0, true, new MarkupFilterMgr(FMT_HTMLHREF)); + * + */ + +#include +#include +#include + +using namespace sword; +using std::cout; + +int main(int argc, char **argv) { + SWMgr library; + SWModule *darby = library.getModule("Darby"); + darby->setKey("James 1:19"); + cout << darby->RenderText(); + + return 0; +} diff --git a/icu/.cvsignore b/icu/.cvsignore new file mode 100644 index 0000000..7597b03 --- /dev/null +++ b/icu/.cvsignore @@ -0,0 +1,3 @@ +Makefile +Makefile.in +*.res \ No newline at end of file diff --git a/icu/Makefile.am b/icu/Makefile.am new file mode 100644 index 0000000..ae9c763 --- /dev/null +++ b/icu/Makefile.am @@ -0,0 +1,67 @@ +AUTOMAKE_OPTIONS = 1.6 + +swicuSOURCES = translit_BETA_Greek.txt +swicuSOURCES += translit_BGreek_Greek.txt +swicuSOURCES += translit_CCAT_Hebrew.txt +swicuSOURCES += translit_CCAT_Syriac.txt +swicuSOURCES += translit_Latin_Armenian.txt +swicuSOURCES += translit_Latin_Coptic.txt +swicuSOURCES += translit_Latin_Ethiopic.txt +swicuSOURCES += translit_Latin_Georgian.txt +swicuSOURCES += translit_Latin_Gothic.txt +swicuSOURCES += translit_Latin_Syriac.txt +swicuSOURCES += translit_Latin_Thai.txt +swicuSOURCES += translit_Latin_Ugaritic.txt +swicuSOURCES += translit_Any_Latin1.txt +swicuSOURCES += translit_Any_Latex.txt +#swicuSOURCES += translit_HTMLEnt_Unicode.txt +#swicuSOURCES += translit_Han_Pinyin.txt +#swicuSOURCES += translit_Kanji_English.txt +#swicuSOURCES += translit_Kanji_OnRomaji.txt +swicuSOURCES += translit_Latin_Arabic.txt +swicuSOURCES += translit_Latin_Hebrew.txt +swicuSOURCES += translit_swordindex.txt + + +if ICU +swicu_DATA = $(swicuSOURCES:.txt=.res) +else +swicu_DATA = +endif +EXTRA_DIST = $(swicuSOURCES) + +CLEANFILES = *.res *.lst *.mk *.mak swicu.dat + +SUFFIXES = .txt .res .dat + +.txt.res: + $(GENRB) -s . -d . $< + + +if ICU +swicudir = $(pkglibdir)/${VERSION}_icu_${ICU_VER} + +#installswicu_DATA: $(swicu_DATA) +# @$(NORMAL_INSTALL) +# $(mkinstalldirs) $(DESTDIR)$(swicudir) +# @list='$(swicu_DATA)'; for p in $$list; do \ +# if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +# f="`echo $$p | sed -e 's|^.*/||'`"; \ +# echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(swicudir)/$$f"; \ +# $(INSTALL_DATA) $$d$$p $(DESTDIR)$(swicudir)/$$f; \ +# done + +#uninstallswicu_DATA: +# @$(NORMAL_UNINSTALL) +# @list='$(swicu_DATA)'; for p in $$list; do \ +# f="`echo $$p | sed -e 's|^.*/||'`"; \ +# echo " rm -f $(DESTDIR)$(swicudir)/$$f"; \ +# rm -f $(DESTDIR)$(swicudir)/$$f; \ +# done +else +swicudir = $(pkglibdir) + +#installswicu_DATA: +# +#uninstallswicu_DATA: +endif diff --git a/icu/Makefile.in b/icu/Makefile.in new file mode 100644 index 0000000..70776a4 --- /dev/null +++ b/icu/Makefile.in @@ -0,0 +1,436 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = icu +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ + $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(swicudir)" +swicuDATA_INSTALL = $(INSTALL_DATA) +DATA = $(swicu_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_CONFIG = @CPPUNIT_CONFIG@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CURL_AM_CFLAGS = @CURL_AM_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +GREP = @GREP@ +ICU_CONFIG = @ICU_CONFIG@ +ICU_IOLIBS = @ICU_IOLIBS@ +ICU_LIBS = @ICU_LIBS@ +ICU_VER = @ICU_VER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGDATA = @PKGDATA@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dir_confdef = @dir_confdef@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 +#swicuSOURCES += translit_HTMLEnt_Unicode.txt +#swicuSOURCES += translit_Han_Pinyin.txt +#swicuSOURCES += translit_Kanji_English.txt +#swicuSOURCES += translit_Kanji_OnRomaji.txt +swicuSOURCES = translit_BETA_Greek.txt translit_BGreek_Greek.txt \ + translit_CCAT_Hebrew.txt translit_CCAT_Syriac.txt \ + translit_Latin_Armenian.txt translit_Latin_Coptic.txt \ + translit_Latin_Ethiopic.txt translit_Latin_Georgian.txt \ + translit_Latin_Gothic.txt translit_Latin_Syriac.txt \ + translit_Latin_Thai.txt translit_Latin_Ugaritic.txt \ + translit_Any_Latin1.txt translit_Any_Latex.txt \ + translit_Latin_Arabic.txt translit_Latin_Hebrew.txt \ + translit_swordindex.txt +@ICU_FALSE@swicu_DATA = +@ICU_TRUE@swicu_DATA = $(swicuSOURCES:.txt=.res) +EXTRA_DIST = $(swicuSOURCES) +CLEANFILES = *.res *.lst *.mk *.mak swicu.dat +SUFFIXES = .txt .res .dat + +#installswicu_DATA: $(swicu_DATA) +# @$(NORMAL_INSTALL) +# $(mkinstalldirs) $(DESTDIR)$(swicudir) +# @list='$(swicu_DATA)'; for p in $$list; do \ +# if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +# f="`echo $$p | sed -e 's|^.*/||'`"; \ +# echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(swicudir)/$$f"; \ +# $(INSTALL_DATA) $$d$$p $(DESTDIR)$(swicudir)/$$f; \ +# done + +#uninstallswicu_DATA: +# @$(NORMAL_UNINSTALL) +# @list='$(swicu_DATA)'; for p in $$list; do \ +# f="`echo $$p | sed -e 's|^.*/||'`"; \ +# echo " rm -f $(DESTDIR)$(swicudir)/$$f"; \ +# rm -f $(DESTDIR)$(swicudir)/$$f; \ +# done +@ICU_FALSE@swicudir = $(pkglibdir) +@ICU_TRUE@swicudir = $(pkglibdir)/${VERSION}_icu_${ICU_VER} +all: all-am + +.SUFFIXES: +.SUFFIXES: .txt .res .dat +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign icu/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign icu/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-swicuDATA: $(swicu_DATA) + @$(NORMAL_INSTALL) + test -z "$(swicudir)" || $(MKDIR_P) "$(DESTDIR)$(swicudir)" + @list='$(swicu_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(swicuDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(swicudir)/$$f'"; \ + $(swicuDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(swicudir)/$$f"; \ + done + +uninstall-swicuDATA: + @$(NORMAL_UNINSTALL) + @list='$(swicu_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(swicudir)/$$f'"; \ + rm -f "$(DESTDIR)$(swicudir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(swicudir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-swicuDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-swicuDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + install-swicuDATA installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-swicuDATA + + +.txt.res: + $(GENRB) -s . -d . $< + +#installswicu_DATA: +# +#uninstallswicu_DATA: +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/icu/translit_Any_Latex.txt b/icu/translit_Any_Latex.txt new file mode 100644 index 0000000..f4dec6e --- /dev/null +++ b/icu/translit_Any_Latex.txt @@ -0,0 +1,78 @@ +// Any_Latex + +// This transliterator is supposed to convert Unicode text into +// the (language-specific) transliterated format that latex (babel and arabtex) +// expects. For the start, only ancient greek will be supported. Feel free to +// add support for your language if desired. +// I am just starting to use ICU, so please forgive my mistakes. + +// Author Martin Gruner +// Copyright the Crosswire Bible Society + +translit_Any_Latex { + Rule { + + //Decompose combined characters + ":: NFD (NFC) ;" + + //How to handle accents now? + + //The letters: + " \u037A > | ;" //Iota subscriptum + " \u0384 > ' ;" //Accent acute + + " \u0391 > A ;" //Alpha + " \u0392 > B ;" //Beta + " \u0393 > D ;" //Gamma + " \u0394 > G ;" //Delta + " \u0395 > E ;" //Epsilon + " \u0396 > Z ;" //Zeta + " \u0397 > J ;" //Thetha !! + " \u0398 > H ;" //Eta + " \u0399 > I ;" //Iota + " \u039A > K ;" //Kappa + " \u039B > L ;" //Lambda + " \u039C > M ;" //My + " \u039D > N ;" //Ny + " \u039E > X ;" //Xi + " \u039F > O ;" //Omikron + " \u03A0 > P ;" //Pi + " \u03A1 > R ;" //Rho + " \u03A3 > S ;" //Sigma + " \u03A4 > T ;" //Tau + " \u03A5 > U ;" //Ypsilon !! + " \u03A6 > F ;" //Phi + " \u03A7 > Q ;" //Chi !! + " \u03A8 > Y ;" //Psi !! + " \u03A9 > W ;" //Omikron + + " \u03B1 > a ;" //alpha + " \u03B2 > b ;" //beta + " \u03B3 > d ;" //gamma + " \u03B4 > g ;" //delta + " \u03B5 > e ;" //epsilon + " \u03B6 > z ;" //zeta + " \u03B7 > j ;" //thetha !! + " \u03B8 > h ;" //eta + " \u03B9 > i ;" //iota + " \u03BA > k ;" //kappa + " \u03BB > l ;" //lambda + " \u03BC > m ;" //my + " \u03BD > n ;" //ny + " \u03BE > x ;" //xi + " \u03BF > o ;" //omikron + " \u03C0 > p ;" //pi + " \u03C1 > r ;" //rho + " \u03C3 > s ;" //sigma + " \u03C4 > t ;" //tau + " \u03C5 > u ;" //ypsilon !! + " \u03C6 > f ;" //phi + " \u03C7 > q ;" //chi !! + " \u03C8 > y ;" //psi !! + " \u03C9 > w ;" //omikron + + ":: NFC (NFD);" + + } +} + diff --git a/icu/translit_Any_Latin1.txt b/icu/translit_Any_Latin1.txt new file mode 100644 index 0000000..d049845 --- /dev/null +++ b/icu/translit_Any_Latin1.txt @@ -0,0 +1,89 @@ +// Any_Latin1 + +translit_Any_Latin1 { + Rule { + + //NFKD then NFC; then NFD all non-Latin-1 codepoints + ":: NFKC ();" + ":: [^\u0000-\u00FF] NFD ();" + + //remove non-spacing marks + "[:Mn:] > ;" + + //change some non-Latin-1 codepoints to similar characters in Latin-1 range + " [\u2000-\u200A\u3000] > ' ' ;" + " [\u01C3\u2762]> '!' ;" + " \u203C > '!!' ;" + " [\u203D\u2048] > '?!' ;" + " [\u02BA\u030B\u030E\u2033\u3003\u201C-\u201F] > '\"' ;" + " [\u066A\u2030\u2031] > '%' ;" + " [\u02B9\u02BC\u02C8\u0301\u2032\u2018-\u201B] > '' ;" + " [\u066D\u2217\u2731] > '*' ;" + " [\u060C\u201A\u3001] > ',' ;" + " [\u2010-\u2013\u2212] > '-' ;" + " [\u2023\u06D4\u3002\u0589] > '.' ;" + " [\u0338\u2044\u2215] > '/' ;" + " \u2236 > ':' ;" + " \u061B > ';' ;" + " [\u2039\u2329\u3008] > '<' ;" + " \u2261 > '=' ;" + " [\u203A\u232A\u3009] > '>' ;" + " [\u037E\u061F] > '?' ;" + " \u2049 > '!?' ;" + " \u212C > B ;" + " [\u2102\u212D] > C ;" + " [\u2107\u2130] > E ;" + " [\u2131\u2132] > F ;" + " [\u210B\u210C\u210D] > H ;" + " [\u2110\u2111\u2160] > I ;" + " \u212A > K ;" + " \u2112 > L ;" + " \u2133 > L ;" + " \u2115 > N ;" + " \u2119 > P ;" + " \u211A > Q ;" + " [\u211B\u211C\u211D] > R ;" + " [\u2124\u2128] > Z ;" + " \u2216 > '\\' ;" + " [\u02C4\u02C6\u0302\u2303] > '^' ;" + " [\u02CD\u0331\u0332\u2017] > '_' ;" + " [\u02CB\u0300\u2035] > '`' ;" + " [\u212E\u212F] > e ;" + " [\u0261\u210A] > g ;" + " [\u04BB\u210E] > h ;" + " \u0131 > i ;" + " \u207F > n ;" + " \u2134 > o ;" + " \u01B6 > z ;" + " [\u01C0\u2223\u2758] > '|' ;" + " [\u02DC\u0303\u223C\uFF5E] > '~' ;" + " \u202F > \u00A0 ;" + " \uFFFD > \u001A;" + " \u20A4 > \u00A3 ;" + " [\u20A0-\u20AF] > \u00A4 ;" + " \u0308 > \u00A8 ;" + " \u2117 > \u00A9 ;" + " [\u226A\u300A] > \u00AB ;" + " \u2310 > \u00AC ;" + " \u1806 > \u00AD ;" + " [\u02C9\u0304\u0305] > \u00AF ;" + " [\u02DA\u030A\u2070\u2218] > \u00B0 ;" + " \u2213 > \u00B1 ;" + " [\u02B9\u02CA\u0301\u2032] > \u00B4 ;" + " [\u204B\u2761] > \u00B6 ;" + " [\u2022\u2024\u2027\u2219\u22C5\u30FB] > \u00B7 ;" + " \u0327 > \u00B8 ;" + " [\u226B\u300B] > \u00BB ;" + " \u2014 > '--';" + " \u2015 > '---';" + " \u2024 > '..';" + " \u2025 > '...';" + " \u2016 > '||';" + " \uFEFF > ;" + + //change all spacing character to space + "[^\u0000-\u00FF] > ' ';" + + } +} + diff --git a/icu/translit_BETA_Greek.txt b/icu/translit_BETA_Greek.txt new file mode 100644 index 0000000..d90cec2 --- /dev/null +++ b/icu/translit_BETA_Greek.txt @@ -0,0 +1,119 @@ +//-------------------------------------------------------------------- +// Copyright (c) 2001, CrossWire Bible Society +//-------------------------------------------------------------------- + +// BETA-Greek/Coptic + +translit_BETA_Greek { + Rule { + ":: NFD (NFD);"//this is wrong, but required + + ":: [abdezqiklmncoypruxwv] upper();" + + //Uppercase + "'*A'<>\u0391;" + "'*B'<>\u0392;" + "'*G'<>\u0393;" + "'*D'<>\u0394;" + "'*E'<>\u0395;" + "'*Z'<>\u0396;" + "'*H'<>\u0397;" + "'*Q'<>\u0398;" + "'*I'<>\u0399;" + "'*K'<>\u039A;" + "'*L'<>\u039B;" + "'*M'<>\u039C;" + "'*N'<>\u039D;" + "'*C'<>\u039E;" + "'*O'<>\u039F;" + "'*F'<>\u03A6;" + "'*Y'<>\u03A8;" + "'*P'<>\u03A0;" + "'*R'<>\u03A1;" + "'*S'<>\u03A3;" + "'*T'<>\u03A4;" + "'*U'<>\u03A5;" + "'*X'<>\u03A7;" + "'*W'<>\u03A9;" + + //Archaic + "'*V'<>\u03DC;" + "'*#3'<>\u03DE;" + "'*#5'<>\u03E0;" + + //Coptic + "'*s'<>\u03E2;" + "'*f'<>\u03E4;" + "'*h'<>\u03E8;" + "'*j'<>\u03EA;" + "'*g'<>\u03EC;" + "'*t'<>\u03EE;" + + + //Lowercase + "A<>\u03B1;" + "B<>\u03B2;" + "G<>\u03B3;" + "D<>\u03B4;" + "E<>\u03B5;" + "Z<>\u03B6;" + "H<>\u03B7;" + "Q<>\u03B8;" + "I<>\u03B9;" + "K<>\u03BA;" + "L<>\u03BB;" + "M<>\u03BC;" + "N<>\u03BD;" + "C<>\u03BE;" + "O<>\u03BF;" + "F<>\u03C6;" + "Y<>\u03C8;" + "P<>\u03C0;" + "R<>\u03C1;" + "J<>\u03C2;" + "S<>\u03C3;" + "T<>\u03C4;" + "U<>\u03C5;" + "X<>\u03C7;" + "W<>\u03C9;" + + + //Archaic + "V<>\u03DD;" + "#3<>\u03DF;" + "#5<>\u03E1;" + + //Coptic + "s<>\u03E3;" + "f<>\u03E5;" + "h<>\u03E9;" + "j<>\u03EB;" + "g<>\u03ED;" + "t<>\u03EF;" + + // Non-letter characters //these don't work (this is wrong) + "'V'<>\u037A;" + "'V'<>\u0314;" + "'V'<\u02BD;" + "'V'<>\u0387;" + "'V'<>\u0313;" + "'V'<\u02BC;" + "'V'<>\u0301;" + "'V'<\u00B4;" + "'V'<\u02CA;" + "'V'<\u0384;" + "'V'<>\u0342;" + "'V'<\u0302;" + "'V'<'^';" + "'V'<\u02C6;" + "'V'<>\u0300;" + "'V'<'`';" + "'V'<\u02CB;" + "'V'<>\u0308;" + "'V'<\u00A8;" + "'V'<>\u0307;" + "'V'<\u02D9;" + + ":: NFD (NFD);" //this is wrong, but required + } +} diff --git a/icu/translit_BGreek_Greek.txt b/icu/translit_BGreek_Greek.txt new file mode 100644 index 0000000..1cacd3d --- /dev/null +++ b/icu/translit_BGreek_Greek.txt @@ -0,0 +1,155 @@ +//-------------------------------------------------------------------- +// Copyright (c) 2001, CrossWire Bible Society +//-------------------------------------------------------------------- + +// BGreek-Greek + +translit_BGreek_Greek { + Rule { + ":: NFD (NFC) ;" + + ":: [abgdezqklmnxofyprtucw] upper();" + + // Extra English Letters. Mapped for completeness + "J>I;" + "V>U;" + + "<[:Mn:];" + + // ============================================== + // Variables, used to make the rules more comprehensible + // and for conditionals. + // ============================================== + + // Greek Letters + + "$ALPHA=\u0391;" + "$BETA=\u0392;" + "$GAMMA=\u0393;" + "$DELTA=\u0394;" + "$EPSILON=\u0395;" + "$ZETA=\u0396;" + "$ETA=\u0397;" + "$THETA=\u0398;" + "$IOTA=\u0399;" + "$KAPPA=\u039A;" + "$LAMBDA=\u039B;" + "$MU=\u039C;" + "$NU=\u039D;" + "$XI=\u039E;" + "$OMICRON=\u039F;" + "$PI=\u03A0;" + "$RHO=\u03A1;" + "$SIGMA=\u03A3;" + "$TAU=\u03A4;" + "$YPSILON=\u03A5;" + "$PHI=\u03A6;" + "$CHI=\u03A7;" + "$PSI=\u03A8;" + "$OMEGA=\u03A9;" + + "$alpha=\u03B1;" + "$beta=\u03B2;" + "$gamma=\u03B3;" + "$delta=\u03B4;" + "$epsilon=\u03B5;" + "$zeta=\u03B6;" + "$eta=\u03B7;" + "$theta=\u03B8;" + "$iota=\u03B9;" + "$kappa=\u03BA;" + "$lambda=\u03BB;" + "$mu=\u03BC;" + "$nu=\u03BD;" + "$xi=\u03BE;" + "$omicron=\u03BF;" + "$pi=\u03C0;" + "$rho=\u03C1;" + "$sigma=\u03C3;" + "$tau=\u03C4;" + "$ypsilon=\u03C5;" + "$phi=\u03C6;" + "$chi=\u03C7;" + "$psi=\u03C8;" + "$omega=\u03C9;" + + "$sigma2=\u03C2;" + + "$iota_subscript=\u037A;" + "$comb_rough_breathing=\u0314;" + "$rough_breathing=\u02BD;" + + // Variables for conditional mappings + + // ============================================== + // Rules + // ============================================== + // The following are special titlecases, and should + // not be copied when duplicating the lowercase + // ============================================== + + // Because there is no uppercase forms for final sigma, + // we had to move all the sigma rules up here. + + // Remember to insert ' to preserve round trip, for double letters + // don't need to do this for the digraphs with h, + // since it is not created when mapping back from greek + + // use special form for s + + "S}[[:L:] & [:Latin:]]>$sigma2;" + "S <> $SIGMA;" + + // The following are a bit tricky. 's' takes two forms in greek + // final or non final. + // We use ~s to represent the abnormal form: final before letter + // or non-final before non-letter. + // We use 's to separate p and s (otherwise ps is one letter) + // so, we break out the following forms: + + "S < $sigma;" + "S < $sigma2;" + + // ============================================== + // Uppercase Forms. + // To make lowercase forms, just copy and lowercase below + // ============================================== + + // Basic Letters + + "A<>$ALPHA;" + "B<>$BETA;" + "G<>$GAMMA;" + "D<>$DELTA;" + "E<>$EPSILON;" + "Z<>$ZETA;" + "H<>$ETA;" + "Q<>$THETA;" + "I<>$IOTA;" + "K<>$KAPPA;" + "L<>$LAMBDA;" + "M<>$MU;" + "N<>$NU;" + "X<>$XI;" + "O<>$OMICRON;" + "F<>$PHI;" // needs ordering before P + "Y<>$PSI;" // needs ordering before P + "P<>$PI;" + "R<>$RHO;" + "T<>$TAU;" + "U<>$YPSILON;" + "C<>$CHI;" + "W<>$OMEGA;" + + // Non-letter characters + + "i<>$iota_subscript;" + "h<>$comb_rough_breathing;" + "h<$rough_breathing;" + + ":: [[:Ll:] & [:Greek:]] upper;" + + ":: NFC (NFD) ;" + } +} + diff --git a/icu/translit_CCAT_Hebrew.txt b/icu/translit_CCAT_Hebrew.txt new file mode 100644 index 0000000..2c9fafa --- /dev/null +++ b/icu/translit_CCAT_Hebrew.txt @@ -0,0 +1,200 @@ +//-------------------------------------------------------------------- +// Copyright (c) 2001, CrossWire Bible Society +//-------------------------------------------------------------------- + +// CCAT-Hebrew + +translit_CCAT_Hebrew { + Rule { + ":: NFD (NFC) ;" + + // Variable names, derived from the Unicode names. + "$CANT_ETNAHTA=\u0591;" + "$CANT_SEGOL=\u0592;" + "$CANT_SHALSHELET=\u0593;" + "$CANT_ZAQEF_QATAN=\u0594;" + "$CANT_ZAQEF_GADOL=\u0595;" + "$CANT_TIPEHA=\u0596;" + "$CANT_REVIA=\u0597;" + "$CANT_ZARQA=\u0598;" + "$CANT_PASHTA=\u0599;" + "$CANT_YETIV=\u059A;" + "$CANT_TEVIR=\u059B;" + "$CANT_GERESH=\u059C;" + "$CANT_GERESH_MUQDAM=\u059D;" + "$CANT_GERESHAYIM=\u059E;" + "$CANT_QARNEY_PARA=\u059F;" + "$CANT_TELISHA_GEDOLA=\u05A0;" + "$CANT_PAZER=\u05A1;" + "$CANT_MUNAH=\u05A3;" + "$CANT_MAHAPAKH=\u05A4;" + "$CANT_MERKHA=\u05A5;" + "$CANT_MERKHA_KEFULA=\u05A6;" + "$CANT_DARGA=\u05A7;" + "$CANT_QADMA=\u05A8;" + "$CANT_TELISHA_QETANA=\u05A9;" + "$CANT_YERAH_BEN_YOMO=\u05AA;" + "$CANT_OLE=\u05AB;" + "$CANT_ILUY=\u05AC;" + "$CANT_DEHI=\u05AD;" + "$CANT_ZINOR=\u05AE;" + + "$MASORA_CIRCLE=\u05AF;" + + "$POINT_SHEVA=\u05B0;" + "$POINT_HATAF_SEGOL=\u05B1;" + "$POINT_HATAF_PATAH=\u05B2;" + "$POINT_HATAF_QAMATS=\u05B3;" + "$POINT_HIRIQ=\u05B4;" + "$POINT_TSERE=\u05B5;" + "$POINT_SEGOL=\u05B6;" + "$POINT_PATAH=\u05B7;" + "$POINT_QAMATS=\u05B8;" + "$POINT_HOLAM=\u05B9;" + "$POINT_QUBUTS=\u05BB;" + "$POINT_DAGESH_OR_MAPIQ=\u05BC;" + "$POINT_METEG=\u05BD;" + "$PUNCTUATION_MAQAF=\u05BE;" + "$POINT_RAFE=\u05BF;" + "$PUNCTUATION_PASEQ=\u05C0;" + "$POINT_SHIN_DOT=\u05C1;" + "$POINT_SIN_DOT=\u05C2;" + "$PUNCTUATION_SOF_PASUQ=\u05C3;" + "$MARK_UPPER_DOT=\u05C4;" + "$ALEF=\u05D0;" + "$BET=\u05D1;" + "$GIMEL=\u05D2;" + "$DALET=\u05D3;" + "$HE=\u05D4;" + "$VAV=\u05D5;" + "$ZAYIN=\u05D6;" + "$HET=\u05D7;" + "$TET=\u05D8;" + "$YOD=\u05D9;" + "$FINAL_KAF=\u05DA;" + "$KAF=\u05DB;" + "$LAMED=\u05DC;" + "$FINAL_MEM=\u05DD;" + "$MEM=\u05DE;" + "$FINAL_NUN=\u05DF;" + "$NUN=\u05E0;" + "$SAMEKH=\u05E1;" + "$AYIN=\u05E2;" + "$FINAL_PE=\u05E3;" + "$PE=\u05E4;" + "$FINAL_TSADI=\u05E5;" + "$TSADI=\u05E6;" + "$QOF=\u05E7;" + "$RESH=\u05E8;" + "$SHIN=\u05E9;" + "$TAV=\u05EA;" + + "$YIDDISH_DOUBLE_VAV=\u05F0;" + "$YIDDISH_VAV_YOD=\u05F1;" + "$YIDDISH_DOUBLE_YOD=\u05F2;" + + "$PUNCTUATION_GERESH=\u05F3;" + "$PUNCTUATION_GERSHAYIM=\u05F4;" + + "$letter=[[:LATIN:]&[:L:]];" + "$softvowel=[eiyEIY];" + "$vowellike=[$ALEF $AYIN $YOD $VAV];" + + "'\)'<>$ALEF;" + "''>$ALEF;" + "B<>$BET;" + "G<>$GIMEL;" + "D<>$DALET;" + "H<>$HE;" + "W<>$VAV;" + "Z<>$ZAYIN;" + "X<>$HET;" + "'+'<>$TET;" + "Y<>$YOD;" + "K}$letter>$KAF;" + "K<$KAF;" + "K<>$FINAL_KAF;" + "L<>$LAMED;" + "M}$letter>$MEM;" + "M<$MEM;" + "M<>$FINAL_MEM;" + "N}$letter>$NUN;" + "N<$NUN;" + "N<>$FINAL_NUN;" + "S<>$SAMEKH;" + "P}$letter>$PE;" + "P<$PE;" + "P<>$FINAL_PE;" + "'\('<>$AYIN;" + "'\`'>$AYIN;" + "C}$letter>$TSADI;" + "C<$TSADI;" + "C<>$FINAL_TSADI;" + "Q<>$QOF;" + "R<>$RESH;" + "'&'<> $SHIN $POINT_SIN_DOT;" + "'\$'<> $SHIN $POINT_SHIN_DOT;" + "'\$'<$SHIN;" + "T<>$TAV;" + + "':A'<>$POINT_HATAF_PATAH;" + "':E'<>$POINT_HATAF_SEGOL;" + "':F'<>$POINT_HATAF_QAMATS;" + + "A<>$POINT_PATAH;" + "F<>$POINT_QAMATS;" + "E<>$POINT_SEGOL;" + "'\"'<>$POINT_TSERE;" + "I<>$POINT_HIRIQ;" + "O<>$POINT_HOLAM;" + "U<>$POINT_QUBUTS;" + "':'<>$POINT_SHEVA;" + + "'.'<>$POINT_DAGESH_OR_MAPIQ;" + "'-'<>$PUNCTUATION_MAQAF;" + + "00<>$PUNCTUATION_SOF_PASUQ;" + "01<>$CANT_SEGOL;" + "02<>$CANT_ZARQA;" + "03>$CANT_PASHTA;" + "04>$CANT_TELISHA_QETANA;" + "05<>$PUNCTUATION_PASEQ;" + "10<>$CANT_YETIV;" + "13<>$CANT_DEHI;" + "11<>$CANT_GERESH_MUQDAM;" + "14>$CANT_TELISHA_GEDOLA;" + "24<>$CANT_TELISHA_QETANA;" + "33<>$CANT_PASHTA;" + "44<>$CANT_TELISHA_GEDOLA;" + "60<>$CANT_OLE;" + "61<>$CANT_GERESH;" + "62<>$CANT_GERESHAYIM;" + "63<>$CANT_QADMA;" + "64<>$CANT_ILUY;" + "65<>$CANT_SHALSHELET;" + "80<>$CANT_ZAQEF_GADOL;" + "81<>$CANT_REVIA;" + "82>$CANT_ZARQA;" + "83<>$CANT_PAZER;" + "84<>$CANT_QARNEY_PARA;" + "85<>$CANT_ZAQEF_QATAN;" + "35<>$POINT_METEG;" + "70<>$CANT_MAHAPAKH;" + "71<>$CANT_MERKHA;" + "72<>$CANT_MERKHA_KEFULA;" + "73<>$CANT_TIPEHA;" + "74<>$CANT_MUNAH;" + "75>$POINT_METEG;" + "91<>$CANT_TEVIR;" + "92<>$CANT_ETNAHTA;" + "93<>$CANT_YERAH_BEN_YOMO;" + "94<>$CANT_DARGA;" + "95>$POINT_METEG;" + + //Get rid of anything we didn't recognize + "<[:HEBREW:];" + "$letter>;" + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_CCAT_Syriac.txt b/icu/translit_CCAT_Syriac.txt new file mode 100644 index 0000000..74bf876 --- /dev/null +++ b/icu/translit_CCAT_Syriac.txt @@ -0,0 +1,87 @@ +//-------------------------------------------------------------------- +// Copyright (c) 2001, CrossWire Bible Society +//-------------------------------------------------------------------- + +// CCAT-Syriac + +translit_CCAT_Syriac { + Rule { + ":: NFD (NFC) ;" + + // Variable names, derived from the Unicode names. + "$ALEF=\u0710;" + "$ALEF_SUPERSCRIPT=\u0711;" + "$BET=\u0712;" + "$GIMEL=\u0713;" + "$GIMEL_GARSHUNI=\u0714;" + "$DALET=\u0715;" + "$DALET_DOTLESS=\u0716;" + "$HE=\u0717;" + "$VAV=\u0718;" + "$ZAYIN=\u0719;" + "$HET=\u071A;" + "$TET=\u071B;" + "$TET_GARSHUNI=\u071C;" + "$YOD=\u071D;" + "$YOD_HE=\u071E;" + "$KAF=\u071F;" + "$LAMED=\u0720;" + "$MEM=\u0721;" + "$NUN=\u0722;" + "$SAMEKH=\u0723;" + "$FINAL_SAMEKH=\u0724;" + "$AYIN=\u0725;" + "$PE=\u0726;" + "$PE_REVERSED=\u0727;" + "$TSADI=\u0728;" + "$QOF=\u0729;" + "$RESH=\u072A;" + "$SHIN=\u072B;" + "$TAV=\u072C;" + + "$letter=[[:LATIN:] & [:L:]];" + "$softvowel=[eiyEIY];" + "$vowellike=[$ALEF $AYIN $YOD $VAV $ALEF_SUPERSCRIPT];" + + "'\)'<>$ALEF;" + "''>$ALEF;" + "'\)'<$ALEF_SUPERSCRIPT;" + "B<>$BET;" + "G<>$GIMEL;" + "G<$GIMEL_GARSHUNI;" + "D<>$DALET;" + "D<$DALET_DOTLESS;" + "H<>$HE;" + "W<>$VAV;" + "Z<>$ZAYIN;" + "X<>$HET;" + "'+'<>$TET;" + "'+'<$TET_GARSHUNI;" + "Y<>$YOD;" + "YH<$YOD_HE;" + "K<>$KAF;" + "L<>$LAMED;" + "M<>$MEM;" + "N<>$NUN;" + "S}$letter>$SAMEKH;" + "S<$SAMEKH;" + "S<>$FINAL_SAMEKH;" + "P<>$PE;" + "P<$PE_REVERSED;" + "'\('<>$AYIN;" + "'\`'>$AYIN;" + "C<>$TSADI;" + "Q<>$QOF;" + "R<>$RESH;" + "'#'>$SHIN;" + "'&'>$SHIN;" + "'\$'<>$SHIN;" + "T<>$TAV;" + + //Get rid of anything we didn't recognize + "<[:SYRIAC:];" + "$letter>;" + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_Latin_Arabic.txt b/icu/translit_Latin_Arabic.txt new file mode 100644 index 0000000..b310b64 --- /dev/null +++ b/icu/translit_Latin_Arabic.txt @@ -0,0 +1,198 @@ +//-------------------------------------------------------------------- +// Copyright (c) 1999-2000, International Business Machines +// Corporation and others. All Rights Reserved. +//-------------------------------------------------------------------- +// THIS IS A MACHINE-GENERATED FILE +// Tool: src\com\ibm\tools\translit\dumpICUrules.bat +// Source: src\com\ibm\text\resources/TransliterationRule_Latin_Arabic.java +// Date: Wed Jul 5 16:11:18 2000 +//-------------------------------------------------------------------- + +// Latin-Arabic + +translit_Latin_Arabic { + Rule { + ":: NFD (NFC) ;" + + // To Do: finish adding shadda, add sokoon + // [Is this done? Can someone finish this?] + + "$alefmadda=\u0622;" + "$alefuhamza=\u0623;" + "$wauuhamza=\u0624;" + "$alefhamza=\u0625;" + "$yehuhamza=\u0626;" + "$alef=\u0627;" + "$beh=\u0628;" + "$tehmarbuta=\u0629;" + "$teh=\u062A;" + "$theh=\u062B;" + "$geem=\u062C;" + "$hah=\u062D;" + "$kha=\u062E;" + "$dal=\u062F;" + "$dhal=\u0630;" + "$reh=\u0631;" + "$zain=\u0632;" + "$seen=\u0633;" + "$sheen=\u0634;" + "$sad=\u0635;" + "$dad=\u0636;" + "$tah=\u0637;" + "$zah=\u0638;" + "$ein=\u0639;" + "$ghein=\u063A;" + "$feh=\u0641;" + "$qaaf=\u0642;" + "$kaf=\u0643;" + "$lam=\u0644;" + "$meem=\u0645;" + "$noon=\u0646;" + "$heh=\u0647;" + "$wau=\u0648;" + "$yehmaqsura=\u0649;" + "$yeh=\u064A;" + "$peh=\u06A4;" + + "$hamza=\u0621;" + "$fathatein=\u064B;" + "$dammatein=\u064C;" + "$kasratein=\u064D;" + "$fatha=\u064E;" + "$damma=\u064F;" + "$kasra=\u0650;" + "$shadda=\u0651;" + "$sokoon=\u0652;" + + // Doubles - liu + "t'' < {$teh} [$teh$theh$tehmarbuta$tah];" + "h'' < {$heh} [$heh$hah];" + "s'' < {$seen} $sheen;" + + // A few pathological special cases to make round + // trip work. - liu + "d'~'d <> $dal $dal;" + "dh'~'dh <> $dhal $dhal;" + "dd'~'dd <> $dad $dad;" + + // Shadda: Map x $shadda to x x, where x is dh, dd, or + // d (that is, $dhal, $dad, or $dal). If x is d, d'd is + // output. Net effect is to map s.th. like $dad $shadda + // to dd'dd. - liu + "$dhal {dh} <> dh {$shadda};" + "$dad {dd} <> dd {$shadda};" + "$dal {''d} [^dh] <> d {$shadda};" // Avoid d'dd or d'dh + + // [This should be removed, but it's good for demos] + "Arabic>" + "\u062a\u062a\u0645\u062a\u0639' '" + "\u0627\u0644\u0644\u063a\u0629' '" + "\u0627\u0644\u0639\u0631\u0628\u0628\u064a\u0629' '" + "\u0628\u0628\u0646\u0638\u0645' '" + "\u0643\u062a\u0627\u0628\u0628\u064a\u0629' '" + "\u062c\u0645\u064a\u0644\u0629;" + + // Main rules + "''ai$alefmadda;" + "''ae$alefuhamza;" + "''ao$alefhamza;" + "''aa$alef;" + "''an$fathatein;" + "''a$fatha;" + "b<>$beh;" + "''dh$dhal;" + "''dd$dad;" + "''d$dal;" + "''e$ein;" + "f<>$feh;" + "gh<>$ghein;" + "''hh$hah;" + "''h$heh;" + "''ii$kasratein;" + "''i$kasra;" + "j<>$geem;" + "kh<>$kha;" + "k<>$kaf;" + "l<>$lam;" + "''m$meem;" + "n<>$noon;" + "''o$hamza;" + "p<>$peh;" + "q<>$qaaf;" + "r<>$reh;" + "sh<>$sheen;" + "''ss$sad;" + "''s$seen;" + "th<>$theh;" + "tm<>$tehmarbuta;" + "''tt$tah;" + "''t$teh;" + "''uu$dammatein;" + "''u$damma;" + "we<>$wauuhamza;" + "w<>$wau;" + "ye<>$yehuhamza;" + "ym<>$yehmaqsura;" + "''y$yeh;" + "''zz$zah;" + "''z$zain;" + + // One-way Latin-Arabic compatability rules + "c>$kaf;" + "g>$geem;" + "x>$kaf$shadda$seen;" + "v>$beh;" + + // Digits + "0<>\u0660;" // Arabic digit 0 + "1<>\u0661;" // Arabic digit 1 + "2<>\u0662;" // Arabic digit 2 + "3<>\u0663;" // Arabic digit 3 + "4<>\u0664;" // Arabic digit 4 + "5<>\u0665;" // Arabic digit 5 + "6<>\u0666;" // Arabic digit 6 + "7<>\u0667;" // Arabic digit 7 + "8<>\u0668;" // Arabic digit 8 + "9<>\u0669;" // Arabic digit 9 + "'%'<>\u066A;" // Arabic % + "'.'<>\u066B;" // Arabic decimal separator + "','<>\u066C;" // Arabic thousands separator + "'*'<>\u066D;" // Arabic five-pointed star + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_Latin_Armenian.txt b/icu/translit_Latin_Armenian.txt new file mode 100644 index 0000000..9ab4f1a --- /dev/null +++ b/icu/translit_Latin_Armenian.txt @@ -0,0 +1,151 @@ +//-------------------------------------------------------------------- +// Copyright 2001, CrossWire Bible Society (http://www.crosswire.org) +// Use freely. +//-------------------------------------------------------------------- +// Based upon UNGEGN recommendations from +// http://www.eki.ee/wgrs/rom2_hy.pdf +//-------------------------------------------------------------------- + +// Latin-Armenian + +translit_Latin_Armenian { + Rule { + ":: NFD (NFC) ;" + + "$armenian = [[:ARMENIAN:] & [:L:]];" + "$armenian_vowels = [\u0531\u0535\u0537\u053B\u0548\u0552\u0555\u0561\u0565\u0567\u056B\u0578\u0582\u0585];" + + "Ye<[:^L:]{\u0535}[:Ll:];" + "Ye<[$armenian_vowels]{\u0535}[:Ll:];" + "YE<[:^L:]{\u0535;" + "YE<[$armenian_vowels]{\u0535;" + + "OV<[:^L:]{\u0548\u054E}[:^L:];" + "Ov<[:^L:]{\u0548\u057E}[:^L:];" + "Vo<[:^L:]{\u0548}[:Ll:];" + "VO<[:^L:]{\u0548;" + + "Ts''<>\u0551}[:Ll:];" + "Ch''<>\u0549}[:Ll:];" + + "Gh<>\u0542}[:Ll:];" + "Dz<>\u0541}[:Ll:];" + "Zh<>\u053A}[:Ll:];" + "Kh<>\u053D}[:Ll:];" + "Ts<>\u053E}[:Ll:];" + "Ch<>\u0543}[:Ll:];" + "Sh<>\u0547}[:Ll:];" + "Rr<>\u054C}[:Ll:];" + + "TS''<>\u0551;" + "CH''<>\u0549;" + + "GH<>\u0542;" + "DZ<>\u0541;" + "T''<>\u0539;" + "ZH<>\u053A;" + "KH<>\u053D;" + "TS<>\u053E;" + "CH<>\u0543;" + "SH<>\u0547;" + "RR<>\u054C;" + "P''<>\u0553;" + "K''<>\u0554;" + + "A<>\u0531;" + "B<>\u0532;" + "G<>\u0533;" + "D<>\u0534;" + "E<>\u0535;" + "Z<>\u0536;" + "E<\u0537;" + "Y<>\u0538;" + "I<>\u053B;" + "L<>\u053C;" + "K<>\u053F;" + "H<>\u0540;" + "M<>\u0544;" + "Y<\u0545;" + "N<>\u0546;" + "O<\u0548;" + "P<>\u054A;" + "J<>\u054B;" + "S<>\u054D;" + "V<>\u054E;" + "T<>\u054F;" + "R<>\u0550;" + "U<>\u0552;" + "O<>\u0555;" + "F<>\u0556;" + + "\u02BF<>\u0559;" + "\u02BE<>\u055A;" + "\u02CA<>\u055B;" + "'!'<>\u055C;" + "','<>\u055D;" + "'?'<>\u055E;" + "\u2026<\u055F;" + + "yev<>[:^L:]{\u0587;" + "yev<[$armenian_vowels]{\u0587;" + "ye<[:^L:]{\u0565;" + "ye<[$armenian_vowels]{\u0565;" + + "ov<>[:^L:]{\u0578\u057E}[:^L:];" + "vo<>[:^L:]{\u0578;" + + "ts''<>\u0581;" + "ch''<>\u0579;" + + "gh<>\u0572;" + "dz<>\u0571;" + "ev<>\u0587;" + "t''<>\u0569;" + "zh<>\u056A;" + "kh<>\u056D;" + "ts<>\u056E;" + "k''<>\u0584;" + "ch<>\u0573;" + "p''<>\u0583;" + "rr<>\u057C;" + "sh<>\u0577;" + + "a<>\u0561;" + "b<>\u0562;" + "g<>\u0563;" + "d<>\u0564;" + "e<>\u0565;" + "z<>\u0566;" + "e<\u0567;" + "y<>\u0568;" + "i<>\u056B;" + "l<>\u056C;" + "k<>\u056F;" + "h<>\u0570;" + "m<>\u0574;" + "y<\u0575;" + "n<>\u0576;" + "o<\u0578;" + "p<>\u057A;" + "j<>\u057B;" + "s<>\u057D;" + "v<>\u057E;" + "t<>\u057F;" + "r<>\u0580;" + "u<>\u0582;" + "o<>\u0585;" + "f<>\u0586;" + + "'.'<>\u0589;" + "'-'<>\u058A;" + + //remove untransliterated + "<[:ARMENIAN:];" + "[:LATIN:]>;" + + ":: NFC (NFD) ;" + } +} + + + diff --git a/icu/translit_Latin_Coptic.txt b/icu/translit_Latin_Coptic.txt new file mode 100644 index 0000000..5f40008 --- /dev/null +++ b/icu/translit_Latin_Coptic.txt @@ -0,0 +1,129 @@ +//-------------------------------------------------------------------- +// Copyright 2001, CrossWire Bible Society (http://www.crosswire.org) +// Use freely. +//-------------------------------------------------------------------- +// Based upon SBL standard Coptic transliteration system from +// The SBL Handbook of Style p. 30 +//-------------------------------------------------------------------- + +// Latin-Coptic + +translit_Latin_Coptic { + Rule { + ":: NFD (NFC) ;" + + "$macron = \u0304;" + "$caron = \u030C;" + + //completeness mappings for latin + "C}[^$caron]>|C $caron;" + "c}[^$caron]>|c $caron;" + "Q>|K;" + "q>|k;" + "V>|U;" + "v>|u;" + "W>|U;" + "w>|u;" + "X>|KS;" + "x>|ks;" + "Y>|U;" + "y>|u;" + + //titlecase digraphs + "Th<>\u0398}[:LowercaseLetter:];" + "Ks<>\u039E}[:LowercaseLetter:];" + "Ph<>\u03A6}[:LowercaseLetter:];" + "Kh<>\u03A7}[:LowercaseLetter:];" + "Ps<>\u03A8}[:LowercaseLetter:];" + + //coptic-unique + "Ti<>\u03EE}[:LowercaseLetter:];" + + //uppercase digraphs + "TH<>\u0398;" + "KS<>\u039E;" + "PH<>\u03A6;" + "KH<>\u03A7;" + "PS<>\u03A8;" + + //coptic-unique + "TI<>\u03EE;" + + "E $macron<>\u0397;" + "O $macron<>\u03A9;" + + //coptic-unique + "S $caron<>\u03E2;" + "C $caron<>\u03EC;" + + "A<>\u0391;" + "B<>\u0392;" + "G<>\u0393;" + "D<>\u0394;" + "E<>\u0395;" + "Z<>\u0396;" + "I<>\u0399;" + "K<>\u039A;" + "L<>\u039B;" + "M<>\u039C;" + "N<>\u039D;" + "O<>\u039F;" + "P<>\u03A0;" + "R<>\u03A1;" + "S<>\u03A3;" + "T<>\u03A4;" + "U<>\u03A5;" + + //coptic-unique + "F<>\u03E4;" + "H<>\u03E8;" + "J<>\u03EA;" + + // lowercase digraphs + "th<>\u03B8;" + "ks<>\u03BE;" + "ph<>\u03C6;" + "kh<>\u03C7;" + "ps<>\u03C8;" + + //coptic-unique + "ti<>\u03EF;" + + "e $macron<>\u03B7;" + "o $macron<>\u03C9;" + + //coptic-unique + "s $caron<>\u03E3;" + "c $caron<>\u03ED;" + + "a<>\u03B1;" + "b<>\u03B2;" + "g<>\u03B3;" + "d<>\u03B4;" + "e<>\u03B5;" + "z<>\u03B6;" + "i<>\u03B9;" + "k<>\u03BA;" + "l<>\u03BB;" + "m<>\u03BC;" + "n<>\u03BD;" + "o<>\u03BF;" + "p<>\u03C0;" + "r<>\u03C1;" + "s<\u03C2;" + "s<>\u03C3;" + "t<>\u03C4;" + "u<>\u03C5;" + + //coptic-unique + "f<>\u03E5;" + "h<>\u03E9;" + "j<>\u03EB;" + + //remove untransliterated + "<[:GREEK:];" + "[:LATIN:]>;" + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_Latin_Ethiopic.txt b/icu/translit_Latin_Ethiopic.txt new file mode 100644 index 0000000..b77114c --- /dev/null +++ b/icu/translit_Latin_Ethiopic.txt @@ -0,0 +1,407 @@ +//-------------------------------------------------------------------- +// Copyright 2001, CrossWire Bible Society (http://www.crosswire.org) +// Use freely. +//-------------------------------------------------------------------- +// Based upon UNGEGN recommendations for Amharic/Ethiopic from +// http://www.eki.ee/wgrs/rom1_am.pdf +//-------------------------------------------------------------------- +// Latin-Ethiopic + +translit_Latin_Ethiopic { + Rule { + ":: NFD (NFC) ;" + + ":: [:LATIN:] lower();" + + "$macron = \u0331;" + + "li$macron<>\u120D;" + "le$macron<>\u1208;" + "lu<>\u1209;" + "li<>\u120A;" + "la<>\u120B;" + "le<>\u120C;" + "lo<>\u120E;" + "lwa<>\u120F;" + + "mi$macron<>\u121D;" + "me$macron<>\u1218;" + "mu<>\u1219;" + "mi<>\u121A;" + "ma<>\u121B;" + "me<>\u121C;" + "mo<>\u121E;" + "mwa<>\u121F;" + + "si$macron<>\u1225;" + "se$macron<>\u1220;" + "su<>\u1221;" + "si<>\u1222;" + "sa<>\u1223;" + "se<>\u1224;" + "so<>\u1226;" + "swa<>\u1227;" + + "ri$macron<>\u122D;" + "re$macron<>\u1228;" + "ru<>\u1229;" + "ri<>\u122A;" + "ra<>\u122B;" + "re<>\u122C;" + "ro<>\u122E;" + "rwa<>\u122F;" + + "si$macron<\u1235;" + "se$macron<\u1230;" + "su<\u1231;" + "si<\u1232;" + "sa<\u1233;" + "se<\u1234;" + "so<\u1236;" + "swa<\u1237;" + + "shi$macron<>\u123D;" + "she$macron<>\u1238;" + "shu<>\u1239;" + "shi<>\u123A;" + "sha<>\u123B;" + "she<>\u123C;" + "sho<>\u123E;" + "shwa<>\u123F;" + + "k''i$macron<>\u1245;" + "k''e$macron<>\u1240;" + "k''u<>\u1241;" + "k''i<>\u1242;" + "k''a<>\u1243;" + "k''e<>\u1244;" + "k''o<>\u1246;" + "k''wi$macron<>\u124D;" + "k''we$macron<>\u1248;" + "k''wi<>\u124A;" + "k''wa<>\u124B;" + "k''we<>\u124C;" + + "khi$macron<>\u1255;" + "khe$macron<>\u1250;" + "khu<>\u1251;" + "khi<>\u1252;" + "kha<>\u1253;" + "khe<>\u1254;" + "kho<>\u1256;" + "khwi$macron<>\u125D;" + "khwe$macron<>\u1258;" + "khwi<>\u125A;" + "khwa<>\u125B;" + "khwe<>\u125C;" + + "bi$macron<>\u1265;" + "be$macron<>\u1260;" + "bu<>\u1261;" + "bi<>\u1262;" + "ba<>\u1263;" + "be<>\u1264;" + "bo<>\u1266;" + "bwa<>\u1267;" + + "vi$macron<>\u126D;" + "ve$macron<>\u1268;" + "vu<>\u1269;" + "vi<>\u126A;" + "va<>\u126B;" + "ve<>\u126C;" + "vo<>\u126E;" + "vwa<>\u126F;" + + "ti$macron<>\u1275;" + "te$macron<>\u1270;" + "tu<>\u1271;" + "ti<>\u1272;" + "ta<>\u1273;" + "te<>\u1274;" + "to<>\u1276;" + "twa<>\u1277;" + + "chi$macron<>\u127D;" + "che$macron<>\u1278;" + "chu<>\u1279;" + "chi<>\u127A;" + "cha<>\u127B;" + "che<>\u127C;" + "cho<>\u127E;" + "chwa<>\u127F;" + + "ni$macron<>\u1295;" + "ne$macron<>\u1290;" + "nu<>\u1291;" + "ni<>\u1292;" + "na<>\u1293;" + "ne<>\u1294;" + "no<>\u1296;" + "nwa<>\u1297;" + + "nyi$macron<>\u129D;" + "nye$macron<>\u1298;" + "nyu<>\u1299;" + "nyi<>\u129A;" + "nya<>\u129B;" + "nye<>\u129C;" + "nyo<>\u129E;" + "nywa<>\u129F;" + + "ki$macron<>\u12AD;" + "ke$macron<>\u12A8;" + "ku<>\u12A9;" + "ki<>\u12AA;" + "ka<>\u12AB;" + "ke<>\u12AC;" + "ko<>\u12AE;" + "kwi$macron<>\u12B5;" + "kwe$macron<>\u12B0;" + "kwi<>\u12B2;" + "kwa<>\u12B3;" + "kwe<>\u12B4;" + + "wi$macron<>\u12CD;" + "we$macron<>\u12C8;" + "wu<>\u12C9;" + "wi<>\u12CA;" + "wa<>\u12CB;" + "we<>\u12CC;" + "wo<>\u12CE;" + + "zi$macron<>\u12DD;" + "ze$macron<>\u12D8;" + "zu<>\u12D9;" + "zi<>\u12DA;" + "za<>\u12DB;" + "ze<>\u12DC;" + "zo<>\u12DE;" + "zwa<>\u12DF;" + + "zhi$macron<>\u12E5;" + "zhe$macron<>\u12E0;" + "zhu<>\u12E1;" + "zhi<>\u12E2;" + "zha<>\u12E3;" + "zhe<>\u12E4;" + "zho<>\u12E6;" + "zhwa<>\u12E7;" + + "yi$macron<>\u12ED;" + "ye$macron<>\u12E8;" + "yu<>\u12E9;" + "yi<>\u12EA;" + "ya<>\u12EB;" + "ye<>\u12EC;" + "yo<>\u12EE;" + + "ddi$macron<>\u12FD;" + "dde$macron<>\u12F8;" + "ddu<>\u12F9;" + "ddi<>\u12FA;" + "dda<>\u12FB;" + "dde<>\u12FC;" + "ddo<>\u12FE;" + "ddwa<>\u12FF;" + + "di$macron<>\u12F5;" + "de$macron<>\u12F0;" + "du<>\u12F1;" + "di<>\u12F2;" + "da<>\u12F3;" + "de<>\u12F4;" + "do<>\u12F6;" + "dwa<>\u12F7;" + + "ji$macron<>\u1305;" + "je$macron<>\u1300;" + "ju<>\u1301;" + "ji<>\u1302;" + "ja<>\u1303;" + "je<>\u1304;" + "jo<>\u1306;" + "jwa<>\u1307;" + + "ggi$macron<>\u131D;" + "gge$macron<>\u1318;" + "ggu<>\u1319;" + "ggi<>\u131A;" + "gga<>\u131B;" + "gge<>\u131C;" + "ggo<>\u131E;" + "ggwa<>\u131F;" + + "gi$macron<>\u130D;" + "ge$macron<>\u1308;" + "gu<>\u1309;" + "gi<>\u130A;" + "ga<>\u130B;" + "ge<>\u130C;" + "go<>\u130E;" + "gwi$macron<>\u1315;" + "gwe$macron<>\u1310;" + "gwi<>\u1312;" + "gwa<>\u1313;" + "gwe<>\u1314;" + + "t''i$macron<>\u1325;" + "t''e$macron<>\u1320;" + "t''u<>\u1321;" + "t''i<>\u1322;" + "t''a<>\u1323;" + "t''e<>\u1324;" + "t''o<>\u1326;" + "t''wa<>\u1327;" + + "ch''i$macron<>\u132D;" + "ch''e$macron<>\u1328;" + "ch''u<>\u1329;" + "ch''i<>\u132A;" + "ch''a<>\u132B;" + "ch''e<>\u132C;" + "ch''o<>\u132E;" + "ch''wa<>\u132F;" + + "p''i$macron<>\u1335;" + "p''e$macron<>\u1330;" + "p''u<>\u1331;" + "p''i<>\u1332;" + "p''a<>\u1333;" + "p''e<>\u1334;" + "p''o<>\u1336;" + "p''wa<>\u1337;" + + "ts''i$macron<>\u133D;" + "ts''e$macron<>\u1338;" + "ts''u<>\u1339;" + "ts''i<>\u133A;" + "ts''a<>\u133B;" + "ts''e<>\u133C;" + "ts''o<>\u133E;" + "ts''wa<>\u133F;" + + "ts''i$macron<\u1345;" + "ts''e$macron<\u1340;" + "ts''u<\u1341;" + "ts''i<\u1342;" + "ts''a<\u1343;" + "ts''e<\u1344;" + "ts''o<\u1346;" + + "fi$macron<>\u134D;" + "fe$macron<>\u1348;" + "fu<>\u1349;" + "fi<>\u134A;" + "fa<>\u134B;" + "fe<>\u134C;" + "fo<>\u134E;" + "fwa<>\u134F;" + + "pi$macron<>\u1355;" + "pe$macron<>\u1350;" + "pu<>\u1351;" + "pi<>\u1352;" + "pa<>\u1353;" + "pe<>\u1354;" + "po<>\u1356;" + "pwa<>\u1357;" + + "rya<>\u1358;" + "mya<>\u1359;" + "fya<>\u135A;" + + "hi$macron<>\u1205;" + "ha<>\u1200;" + "hu<>\u1201;" + "hi<>\u1202;" + "ha<\u1203;" + "he<>\u1204;" + "ho<>\u1206;" + + "hi$macron<\u1215;" + "ha<\u1210;" + "hu<\u1211;" + "hi<\u1212;" + "ha<\u1213;" + "he<\u1214;" + "ho<\u1216;" + "hwa<>\u1217;" + + "hi$macron<\u1285;" + "ha<\u1280;" + "hu<\u1281;" + "hi<\u1282;" + "ha<\u1283;" + "he<\u1284;" + "ho<\u1286;" + "hwi$macron<>\u128D;" + "hwe$macron<>\u1288;" + "hwi<>\u128A;" + "hwa<\u128B;" + "hwe<>\u128C;" + + "hi$macron<\u12BD;" + "he$macron<\u12B8;" + "hu<\u12B9;" + "hi<\u12BA;" + "ha<\u12BB;" + "he<\u12BC;" + "ho<\u12BE;" + "hwa<\u12BF;" + "hwi$macron<\u12C5;" + "hwe$macron<\u12C0;" + "hwi<\u12C2;" + "hwa<\u12C3;" + "hwe<\u12C4;" + + "i$macron<>\u12A5;" + "a<>\u12A0;" + "u<>\u12A1;" + "i<>\u12A2;" + "a<\u12A3;" + "e<>\u12A4;" + "o<>\u12A6;" + + "i$macron<\u12D5;" + "a<\u12D0;" + "u<\u12D1;" + "i<\u12D2;" + "a<\u12D3;" + "e<\u12D4;" + "o<\u12D6;" + + "' '<>\u1361;" + "'.'<>\u1362;" + "','<>\u1363;" + "';'<>\u1364;" + "':'<>\u1365;" + "':'<\u1366;" + "'?'<>\u1367;" + "\u00B6<>\u1368;" + + "1<>\u1369;" + "2<>\u136A;" + "3<>\u136B;" + "4<>\u136C;" + "5<>\u136D;" + "6<>\u136E;" + "7<>\u136F;" + "8<>\u1370;" + "9<>\u1371;" + + "10<\u1372;" + "20<\u1373;" + "30<\u1374;" + "40<\u1375;" + "50<\u1376;" + "60<\u1377;" + "70<\u1378;" + "80<\u1379;" + "90<\u137A;" + "100<\u137B;" + "10000<\u137C;" + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_Latin_Georgian.txt b/icu/translit_Latin_Georgian.txt new file mode 100644 index 0000000..c07d54e --- /dev/null +++ b/icu/translit_Latin_Georgian.txt @@ -0,0 +1,137 @@ +//-------------------------------------------------------------------- +// Copyright 2001, CrossWire Bible Society (http://www.crosswire.org) +// Use freely. +//-------------------------------------------------------------------- +// Based upon UNGEGN recommendations from +// http://www.eki.ee/wgrs/rom2_ka.pdf +//-------------------------------------------------------------------- + +// Latin-Georgian + +translit_Latin_Georgian { + Rule { + ":: NFD (NFC) ;" + + ":: [:LATIN:] lower();" + + //titlecase digraphs + "Ch\'<\u10B9}[:LowercaseLetter:];" + "Ts\'<\u10BA}[:LowercaseLetter:];" + + "Zh<\u10AF}[:LowercaseLetter:];" + "Gh<\u10B6}[:LowercaseLetter:];" + "Sh<\u10B8}[:LowercaseLetter:];" + "Dz<\u10BB}[:LowercaseLetter:];" + "Ts<\u10BC}[:LowercaseLetter:];" + "Ch<\u10BD}[:LowercaseLetter:];" + "Kh<\u10BE}[:LowercaseLetter:];" + + //non-UNGEGN + "Ey<\u10C1}[:Ll:];" + "Ow<\u10C5}[:Ll:];" + + //uppercase digraphs + "CH\'<\u10B9;" + "TS\'<\u10BA;" + + "T\'<\u10A7;" + "ZH<\u10AF;" + "P\'<\u10B4;" + "K\'<\u10B5;" + "GH<\u10B6;" + "SH<\u10B8;" + "DZ<\u10BB;" + "TS<\u10BC;" + "CH<\u10BD;" + "KH<\u10BE;" + + //non-UNGEGN + "EY<\u10C1;" + "Q\'<\u10C4;" + "OW<\u10C5;" + + "A<\u10A0;" + "B<\u10A1;" + "G<\u10A2;" + "D<\u10A3;" + "E<\u10A4;" + "V<\u10A5;" + "Z<\u10A6;" + "I<\u10A8;" + "K<\u10A9;" + "L<\u10AA;" + "M<\u10AB;" + "N<\u10AC;" + "O<\u10AD;" + "P<\u10AE;" + "R<\u10B0;" + "S<\u10B1;" + "T<\u10B2;" + "U<\u10B3;" + "Q<\u10B7;" + "J<\u10BF;" + "H<\u10C0;" + "Y<\u10C2;" + "W<\u10C3;" + + //lowercase digraphs + "ch\'<>\u10E9;" + "ts\'<>\u10EA;" + + "t\'<>\u10D7;" + "zh<>\u10DF;" + "p\'<>\u10E4;" + "k\'<>\u10E5;" + "gh<>\u10E6;" + "sh<>\u10E8;" + "dz<>\u10EB;" + "ts<>\u10EC;" + "ch<>\u10ED;" + "kh<>\u10EE;" + + //non-UNGEGN + "ey<>\u10F1;" + "q\'<>\u10F4;" + "ow<>\u10F5;" + + "a<>\u10D0;" + "b<>\u10D1;" + "g<>\u10D2;" + "d<>\u10D3;" + "e<>\u10D4;" + "v<>\u10D5;" + "z<>\u10D6;" + "i<>\u10D8;" + "k<>\u10D9;" + "l<>\u10DA;" + "m<>\u10DB;" + "n<>\u10DC;" + "o<>\u10DD;" + "p<>\u10DE;" + "r<>\u10E0;" + "s<>\u10E1;" + "t<>\u10E2;" + "u<>\u10E3;" + "q<>\u10E7;" + "j<>\u10EF;" + "h<>\u10F0;" + + //non-UNGEGN + "y<>\u10F2;" + "w<>\u10F3;" + "f<>\u10F6;" + + //paragraph + "\u00B6<>\u10FB;" + + //completeness mappings for latin + "c>\u10D9;" + "x>\u10EE;" + + //remove untransliterated + "<[:GEORGIAN:];" + "[:LATIN:]>;" + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_Latin_Gothic.txt b/icu/translit_Latin_Gothic.txt new file mode 100644 index 0000000..423f65a --- /dev/null +++ b/icu/translit_Latin_Gothic.txt @@ -0,0 +1,57 @@ + // -*- Coding: utf-8; -*- +//-------------------------------------------------------------------- +// Copyright 2001, CrossWire Bible Society (http://www.crosswire.org) +// Use freely. +//-------------------------------------------------------------------- +// Based upon standard Gothic transliteration system from +// http://www.cs.tut.fi/~dla/gothic.html +//-------------------------------------------------------------------- + +// Latin-Gothic + +translit_Latin_Gothic { + Rule { + ":: NFD (NFC) ;" + + ":: [:Ll:] lower() ;" + + // the hv ligature might not be ligatured + "hv> |Æ•;" + + // completeness mapping for latin + "c> |k;" + "v> |w;" + "y> |i;" + + // latin-gothic transliteration + "a<>ðŒ°;" + "b<>ðŒ±;" + "g<>ðŒ²;" + "d<>ðŒ³;" + "e<>ðŒ´;" + "q<>ðŒµ;" + "z<>ðŒ¶;" + "h<>ðŒ·;" + "þ<>ðŒ¸;" + "i<>ðŒ¹;" + "k<>ðŒº;" + "l<>ðŒ»;" + "m<>ðŒ¼;" + "n<>ðŒ½;" + "j<>ðŒ¾;" + "u<>ðŒ¿;" + "p<>ð€;" + "90<ð;" // 90 + "r<>ð‚;" + "s<>ðƒ;" + "t<>ð„;" + "w<>ð…;" + "f<>ð†;" + "x<>ð‡;" + "Æ•<>ðˆ;" + "o<>ð‰;" + "900<ðŠ;" // 900 + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_Latin_Hebrew.txt b/icu/translit_Latin_Hebrew.txt new file mode 100644 index 0000000..957a566 --- /dev/null +++ b/icu/translit_Latin_Hebrew.txt @@ -0,0 +1,223 @@ +//-------------------------------------------------------------------- +// Copyright (c) 1999-2000, International Business Machines +// Corporation and others. All Rights Reserved. +//-------------------------------------------------------------------- +// THIS IS A MACHINE-GENERATED FILE +// Tool: src\com\ibm\tools\translit\dumpICUrules.bat +// Source: src\com\ibm\text\resources/TransliterationRule_Latin_Hebrew.java +// Date: Wed Jul 5 16:11:18 2000 +//-------------------------------------------------------------------- + +// Latin-Hebrew + +translit_Latin_Hebrew { + Rule { + ":: NFD (NFC) ;" + + // Variable names, derived from the Unicode names. + "$POINT_SHEVA=\u05B0;" + "$POINT_HATAF_SEGOL=\u05B1;" + "$POINT_HATAF_PATAH=\u05B2;" + "$POINT_HATAF_QAMATS=\u05B3;" + "$POINT_HIRIQ=\u05B4;" + "$POINT_TSERE=\u05B5;" + "$POINT_SEGOL=\u05B6;" + "$POINT_PATAH=\u05B7;" + "$POINT_QAMATS=\u05B8;" + "$POINT_HOLAM=\u05B9;" + "$POINT_QUBUTS=\u05BB;" + "$POINT_DAGESH_OR_MAPIQ=\u05BC;" + "$POINT_METEG=\u05BD;" + "$PUNCTUATION_MAQAF=\u05BE;" + "$POINT_RAFE=\u05BF;" + "$PUNCTUATION_PASEQ=\u05C0;" + "$POINT_SHIN_DOT=\u05C1;" + "$POINT_SIN_DOT=\u05C2;" + "$PUNCTUATION_SOF_PASUQ=\u05C3;" + "$ALEF=\u05D0;" + "$BET=\u05D1;" + "$GIMEL=\u05D2;" + "$DALET=\u05D3;" + "$HE=\u05D4;" + "$VAV=\u05D5;" + "$ZAYIN=\u05D6;" + "$HET=\u05D7;" + "$TET=\u05D8;" + "$YOD=\u05D9;" + "$FINAL_KAF=\u05DA;" + "$KAF=\u05DB;" + "$LAMED=\u05DC;" + "$FINAL_MEM=\u05DD;" + "$MEM=\u05DE;" + "$FINAL_NUN=\u05DF;" + "$NUN=\u05E0;" + "$SAMEKH=\u05E1;" + "$AYIN=\u05E2;" + "$FINAL_PE=\u05E3;" + "$PE=\u05E4;" + "$FINAL_TSADI=\u05E5;" + "$TSADI=\u05E6;" + "$QOF=\u05E7;" + "$RESH=\u05E8;" + "$SHIN=\u05E9;" + "$TAV=\u05EA;" + "$YIDDISH_DOUBLE_VAV=\u05F0;" + "$YIDDISH_VAV_YOD=\u05F1;" + "$YIDDISH_DOUBLE_YOD=\u05F2;" + "$PUNCTUATION_GERESH=\u05F3;" + "$PUNCTUATION_GERSHAYIM=\u05F4;" + + "$letter=[a-zA-Z];" + "$softvowel=[eiyEIY];" + "$vowellike=[$ALEF$AYIN$YOD$VAV];" + "$hebrew=[\u0590-\u05FF];" // the whole block -liu + + // [Why is this a special case? -liu] + "k''h <> $KAF $HE ;" + + // Mark non-final forms in final position as x~ -liu + "k < $KAF } $hebrew ;" + "m < $MEM } $hebrew ;" + "n < $NUN } $hebrew ;" + "p < $PE } $hebrew ;" + "ts < $TSADI } $hebrew ;" + "k'~' <> $KAF ;" + "m'~' <> $MEM ;" + "n'~' <> $NUN ;" + "p'~' <> $PE ;" + "ts'~'<> $TSADI ;" + + // Mark final forms in non-final position as x^ -liu + "k'^' <> $FINAL_KAF } $hebrew ;" + "m'^' <> $FINAL_MEM } $hebrew ;" + "n'^' <> $FINAL_NUN } $hebrew ;" + "p'^' <> $FINAL_PE } $hebrew ;" + "ts'^'<> $FINAL_TSADI } $hebrew ;" + "k < $FINAL_KAF;" + "m < $FINAL_MEM;" + "n < $FINAL_NUN;" + "p < $FINAL_PE;" + "ts < $FINAL_TSADI;" + + // Main rules + "a<>$ALEF;" + "A>$ALEF;" + + "b<>$BET;" + "B>$BET;" + + "c}$softvowel>$SAMEKH;" + "C}$softvowel>$SAMEKH;" + "c}$letter>$KAF;" + "C}$letter>$KAF;" + "c>$FINAL_KAF;" + "C>$FINAL_KAF;" + + "d<>$DALET;" + "D>$DALET;" + + "e<>$AYIN;" + "E>$AYIN;" + + "f}$letter>$PE;" + "f>$FINAL_PE;" + "F}$letter>$PE;" + "F>$FINAL_PE;" + + "g<>$GIMEL;" + "G>$GIMEL;" + + "h<>$HE;" + "H>$HE;" + + "i>$YOD;" + "I>$YOD;" + + "j>$DALET$SHIN;" + "J>$DALET$SHIN;" + + "kh<>$HET;" + "kH>$HET;" + "Kh>$HET;" + "KH>$HET;" + "k}$letter>$KAF;" + "K}$letter>$KAF;" + "k>$FINAL_KAF;" + "K>$FINAL_KAF;" + + "l<>$LAMED;" + "L>$LAMED;" + + "m}$letter>$MEM;" + "m>$FINAL_MEM;" + "M}$letter>$MEM;" + "M>$FINAL_MEM;" + + "n}$letter>$NUN;" + "n>$FINAL_NUN;" + "N}$letter>$NUN;" + "N>$FINAL_NUN;" + + "o>$VAV;" + "O>$VAV;" + + "p}$letter>$PE;" + "p>$FINAL_PE;" + "P}$letter>$PE;" + "P>$FINAL_PE;" + + "q<>$QOF;" + "Q>$QOF;" + + "r<>$RESH;" + "R>$RESH;" + + "sh<>$SHIN;" + "sH>$SHIN;" + "Sh>$SHIN;" + "SH>$SHIN;" + "s''<$SAMEKH}$HE;" + "s<>$SAMEKH;" + "S>$SAMEKH;" + + "th<>$TAV;" + "tH>$TAV;" + "Th>$TAV;" + "TH>$TAV;" + "tS}$letter>$TSADI;" + "ts}$letter>$TSADI;" + "Ts}$letter>$TSADI;" + "TS}$letter>$TSADI;" + "tS>$FINAL_TSADI;" + "ts>$FINAL_TSADI;" + "Ts>$FINAL_TSADI;" + "TS>$FINAL_TSADI;" + "t''<$TET}[$HE $SAMEKH $SHIN];" + "t<>$TET;" + "T>$TET;" + + "v<$VAV}$vowellike;" + "u<>$VAV;" + "U>$VAV;" + + "v>$VAV;" + "V>$VAV;" + + "w>$VAV;" + "W>$VAV;" + + "x>$KAF$SAMEKH;" + "X>$KAF$SAMEKH;" + + "y<>$YOD;" + "Y>$YOD;" + + "z<>$ZAYIN;" + "Z>$ZAYIN;" + + //Delete any Syriac we didn't recognize + "<$hebrew;" + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_Latin_Syriac.txt b/icu/translit_Latin_Syriac.txt new file mode 100644 index 0000000..5f5c140 --- /dev/null +++ b/icu/translit_Latin_Syriac.txt @@ -0,0 +1,169 @@ +// Latin-Syriac + +translit_Latin_Syriac { + Rule { + ":: NFD (NFC) ;" + + // Variable names, derived from the Unicode names. + "$ALEF=\u0710;" + "$ALEF_SUPERSCRIPT=\u0711;" + "$BET=\u0712;" + "$GIMEL=\u0713;" + "$GIMEL_GARSHUNI=\u0714;" + "$DALET=\u0715;" + "$DALET_DOTLESS=\u0716;" + "$HE=\u0717;" + "$VAV=\u0718;" + "$ZAYIN=\u0719;" + "$HET=\u071A;" + "$TET=\u071B;" + "$TET_GARSHUNI=\u071C;" + "$YOD=\u071D;" + "$YOD_HE=\u071E;" + "$KAF=\u071F;" + "$LAMED=\u0720;" + "$MEM=\u0721;" + "$NUN=\u0722;" + "$SAMEKH=\u0723;" + "$FINAL_SAMEKH=\u0724;" + "$AYIN=\u0725;" + "$PE=\u0726;" + "$PE_REVERSED=\u0727;" + "$TSADI=\u0728;" + "$QOF=\u0729;" + "$RESH=\u072A;" + "$SHIN=\u072B;" + "$TAV=\u072C;" + + "$PARAGRAPH=\u0700;" + + "$letter=[a-zA-Z];" + "$softvowel=[eiyEIY];" + "$vowellike=[$ALEF $AYIN $YOD $VAV $ALEF_SUPERSCRIPT];" + + // [Why is this a special case? -liu] + "k''h <> $KAF $HE ;" + + // Mark non-final forms in final position as x~ -liu + "s < $SAMEKH } [[:SYRIAC:]&[:LETTER:]] ;" + "s'~' <> $SAMEKH ;" + + // Mark final forms in non-final position as x^ -liu + "s < $FINAL_SAMEKH;" + + // Main rules + "a<>$ALEF;" + "A>$ALEF;" + "a<$ALEF_SUPERSCRIPT;" + + "b<>$BET;" + "B>$BET;" + + "c}$softvowel>$SAMEKH;" + "C}$softvowel>$SAMEKH;" + "c>$KAF;" + "C>$KAF;" + + "d<>$DALET;" + "D>$DALET;" + "d<$DALET_DOTLESS;" + + "e<>$AYIN;" + "E>$AYIN;" + + "f>$PE;" + "F>$PE;" + + "g<>$GIMEL;" + "G>$GIMEL;" + "g<$GIMEL_GARSHUNI;" + + "h<>$HE;" + "H>$HE;" + + "i>$YOD;" + "I>$YOD;" + "ih<$YOD_HE;" + + "j>$DALET$SHIN;" + "J>$DALET$SHIN;" + + "kh<>$HET;" + "kH>$HET;" + "Kh>$HET;" + "KH>$HET;" + "k<>$KAF;" + "K>$KAF;" + + "l<>$LAMED;" + "L>$LAMED;" + + "m<>$MEM;" + "M>$MEM;" + + "n<>$NUN;" + "N>$NUN;" + + "o>$VAV;" + "O>$VAV;" + + "p<>$PE;" + "P>$PE;" + "p<$PE_REVERSED;" + + "q<>$QOF;" + "Q>$QOF;" + + "r<>$RESH;" + "R>$RESH;" + + "sh<>$SHIN;" + "sH>$SHIN;" + "Sh>$SHIN;" + "SH>$SHIN;" + + "th<>$TAV;" + "tH>$TAV;" + "Th>$TAV;" + "TH>$TAV;" + "tS>$TSADI;" + "ts<>$TSADI;" + "Ts>$TSADI;" + "TS>$TSADI;" + "t''<$TET}[$HE $SAMEKH $SHIN];" + "t<>$TET;" + "T>$TET;" + "t<$TET_GARSHUNI;" + + "s}$letter>$SAMEKH;" + "s>$FINAL_SAMEKH;" + "S}$letter>$SAMEKH;" + "S>$FINAL_SAMEKH;" + + "v<$VAV}$vowellike;" + "u<>$VAV;" + "U>$VAV;" + + "v>$VAV;" + "V>$VAV;" + + "w>$VAV;" + "W>$VAV;" + + "x>$KAF$SAMEKH;" + "X>$KAF$SAMEKH;" + + "y<>$YOD;" + "Y>$YOD;" + + "z<>$ZAYIN;" + "Z>$ZAYIN;" + + "\u00B6<>$PARAGRAPH;" + + //Delete any Syriac we didn't recognize + "<[:SYRIAC:];" + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_Latin_Thai.txt b/icu/translit_Latin_Thai.txt new file mode 100644 index 0000000..6e3a849 --- /dev/null +++ b/icu/translit_Latin_Thai.txt @@ -0,0 +1,162 @@ +//-------------------------------------------------------------------- +// Copyright 2001, CrossWire Bible Society (http://www.crosswire.org) +// Use freely. +//-------------------------------------------------------------------- +// Based upon UNGEGN recommendations from +// http://www.eki.ee/wgrs/rom1_th.pdf +//-------------------------------------------------------------------- + +// Latin-Thai + +translit_Latin_Thai { + Rule { + ":: NFD (NFC) ;" + + ":: [[:LATIN:]-[B]] lower();" + + //completeness mappings + "c}[^h]>|k;" + "g>|ng;" + "q>|k;" + "v>|f;" + "x>|kh;" + "z>|s;" + "j>|i;" + + // latin-thai + "\u2026<>\u0E2F;" + "\u00B7<>\u0E4F;" + + "B<>\u0E3F;" + + "|$1 a $2<([[:THAI:]&[:L:]])\u0E31([[:THAI:]&[:L:]]);" + "|$1 a $2<([[:THAI:]&[:L:]])\u0E23\u0E23([[:THAI:]&[:L:]]);" + "|$1 e<\u0E40([[:THAI:]&[:L:]])\u0E30;" + "|$1 e $2<\u0E40([[:THAI:]&[:L:]])\u0E47([[:THAI:]&[:L:]]);" + "|$1 ae<\u0E41([[:THAI:]&[:L:]])\u0E30;" + "|$1 ae $2<\u0E41([[:THAI:]&[:L:]])\u0E47([[:THAI:]&[:L:]]);" + "|$1 o<\u0E42([[:THAI:]&[:L:]])\u0E30;" + "|$1 o<\u0E40([[:THAI:]&[:L:]])\u0E32\u0E30;" + "|$1 oe<\u0E40([[:THAI:]&[:L:]])\u0E3D\u0E30;" + "|$1 oe $2<\u0E40([[:THAI:]&[:L:]])\u0E34([[:THAI:]&[:L:]]);" + "|$1 oe<\u0E40([[:THAI:]&[:L:]])\u0E2D;" + "|$1 ia<\u0E40([[:THAI:]&[:L:]])\u0E35\u0E22\u0E30;" + "|$1 ia<\u0E40([[:THAI:]&[:L:]])\u0E35\u0E22;" + "|$1 uea<\u0E40([[:THAI:]&[:L:]])\u0E37\u0E2D\u0E30;" + "|$1 uea<\u0E40([[:THAI:]&[:L:]])\u0E37\u0E2D;" + "|$1 ua<([[:THAI:]&[:L:]])\u0E31\u0E27\u0E30;" + "|$1 ua<([[:THAI:]&[:L:]])\u0E31\u0E27;" + "|$1 ua $2<([[:THAI:]&[:L:]])\u0E27([[:THAI:]&[:L:]]);" + "|$1 ai<([[:THAI:]&[:L:]])\u0E31\u0E22;" + "|$1 ai<\u0E44([[:THAI:]&[:L:]])\u0E22;" + "|$1 ai<([[:THAI:]&[:L:]])\u0E32\u0E22;" + "|$1 ao<\u0E40([[:THAI:]&[:L:]])\u0E32;" + "|$1 ao<([[:THAI:]&[:L:]])\u0E32\u0E27;" + "|$1 ui<([[:THAI:]&[:L:]])\u0E38\u0E22;" + "|$1 oi<\u0E42([[:THAI:]&[:L:]])\u0E22;" + "|$1 oi<([[:THAI:]&[:L:]])\u0E2D\u0E22;" + "|$1 oei<\u0E40([[:THAI:]&[:L:]])\u0E22;" + "|$1 ueai<\u0E40([[:THAI:]&[:L:]])\u0E37\u0E2D\u0E22;" + "|$1 uai<([[:THAI:]&[:L:]])\u0E27\u0E22;" + "|$1 io<([[:THAI:]&[:L:]])\u0E34\u0E27;" + "|$1 eo<\u0E40([[:THAI:]&[:L:]])\u0E47\u0E27;" + "|$1 eo<\u0E40([[:THAI:]&[:L:]])\u0E27;" + "|$1 aeo<\u0E41([[:THAI:]&[:L:]])\u0E47\u0E27;" + "|$1 aeo<\u0E41([[:THAI:]&[:L:]])\u0E27;" + "|$1 iao<\u0E40([[:THAI:]&[:L:]])\u0E35\u0E22\u0E27;" + + "|$1 o<([[:THAI:]&[:L:]])\u0E2D;" + "|$1 a<([[:THAI:]&[:L:]])\u0E30;" + "|$1 a<([[:THAI:]&[:L:]])\u0E32;" + "|$1 an<([[:THAI:]&[:L:]])\u0E23\u0E23;" + "|$1 am<([[:THAI:]&[:L:]])\u0E33;" + "|$1 i<([[:THAI:]&[:L:]])\u0E34;" + "|$1 i<([[:THAI:]&[:L:]])\u0E35;" + "|$1 ue<([[:THAI:]&[:L:]])\u0E36;" + "|$1 ue<([[:THAI:]&[:L:]])\u0E37;" + "|$1 u<([[:THAI:]&[:L:]])\u0E38;" + "|$1 u<([[:THAI:]&[:L:]])\u0E39;" + "|$1 e<\u0E40([[:THAI:]&[:L:]]);" + "|$1 ae<\u0E41([[:THAI:]&[:L:]]);" + "|$1 o<\u0E42([[:THAI:]&[:L:]]);" + "|$1 ai<\u0E43([[:THAI:]&[:L:]]);" + "|$1 ai<\u0E44([[:THAI:]&[:L:]]);" + + "0<>\u0E50;" + "1<>\u0E51;" + "2<>\u0E52;" + "3<>\u0E53;" + "4<>\u0E54;" + "5<>\u0E55;" + "6<>\u0E56;" + "7<>\u0E57;" + "8<>\u0E58;" + "9<>\u0E59;" + + // this doesn't work; don't know why + // "| $1 o < ([[:THAI:]&[:L:]]);" + + "kh<>\u0E02;" + "kh<\u0E03;" + "kh<\u0E04;" + "kh<\u0E05;" + "kh<\u0E06;" + "k<>\u0E01;" + "ng<>\u0E07;" + "ch<>\u0E08;" + "ch<\u0E09;" + "ch<\u0E0A;" + "s<>\u0E0B;" + "ch<\u0E0C;" + "y<>\u0E0D;" + "d<>\u0E0E;" + "s<\u0E17\u0E23;" + "th<>\u0E10;" + "th<\u0E11;" + "th<\u0E12;" + "th<\u0E16;" + "th<\u0E17;" + "th<\u0E18;" + "t<>\u0E0F;" + "n<>\u0E13;" + "d<\u0E14;" + "t<\u0E15;" + "n<\u0E19;" + "b<>\u0E1A;" + "ph<>\u0E1C;" + "ph<\u0E1E;" + "ph<\u0E20;" + "p<>\u0E1B;" + "f<>\u0E1D;" + "f<\u0E1F;" + "m<>\u0E21;" + "y<\u0E22;" + "rue<>\u0E24\u0E32;" + "ri<>\u0E24;" + "r<>\u0E23;" + "lue<\u0E26\u0E32;" + "lue<>\u0E26;" + "l<>\u0E25;" + "w<>\u0E27;" + "s<\u0E28;" + "s<\u0E29;" + "s<\u0E2A;" + "h<>\u0E2B;" + "l<\u0E2C;" + "o<\u0E2D;" + "h<\u0E2E;" + + //vowels + "a>\u0E30;" + "([:LATIN:])e>|\u0E40 $1;" + "i>\u0E34;" + "([:^L:])o>|$1 \u0E2D;" + "u>\u0E38;" + + //remove untransliterated + "<[:THAI:];" + "[:LATIN:]>;" + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_Latin_Ugaritic.txt b/icu/translit_Latin_Ugaritic.txt new file mode 100644 index 0000000..d22ae45 --- /dev/null +++ b/icu/translit_Latin_Ugaritic.txt @@ -0,0 +1,63 @@ + // -*- Coding: utf-8; -*- +//-------------------------------------------------------------------- +// Copyright 2001, CrossWire Bible Society (http://www.crosswire.org) +// Use freely. +//-------------------------------------------------------------------- +// Based upon SBL standard transliteration system from +// the SBL Handbook of Style p.31 +//-------------------------------------------------------------------- + +// Latin-Ugaritic + +translit_Latin_Ugaritic { + Rule { + ":: NFD (NFC) ;" + + ":: lower() ;" + + // completeness + "c> | k;" + "e> | i;" + "f> | w;" + "j> | i;" + "o> | a;" + "v> | w;" + "x> | k;" + + // ugaritic cuneiform + "h Ì£ <> ðˆ;" + "d ̱ <> ð;" + "z Ì£ <> ð‘;" + "s Ì£ <> ð•;" + "g Ì <> ð™;" + "s Ì€ <> ð;" + + "a <> ð€;" + "b <> ð;" + "g <> ð‚;" + "h Ì®<> ðƒ;" + "d <> ð„;" + "h <> ð…;" + "w <> ð†;" + "z <> ð‡;" + "t Ì£ <> ð‰;" + "y <> ðŠ;" + "k <> ð‹;" + "s ÌŒ <> ðŒ;" + "l <> ð;" + "m <> ðŽ;" + "n <> ð;" + "s <> ð’;" + "Ê¿ <> ð“;" + "p <> ð”;" + "q <> ð–;" + "r <> ð—;" + "t ̱ <> ð˜;" + "t <> ðš;" + "i <> ð›;" + "u <> ðœ;" + "' ' <> ðŸ;" + + ":: NFC (NFD) ;" + } +} diff --git a/icu/translit_swordindex.txt b/icu/translit_swordindex.txt new file mode 100644 index 0000000..37cd93f --- /dev/null +++ b/icu/translit_swordindex.txt @@ -0,0 +1,108 @@ +//-------------------------------------------------------------------- +// Copyright (c) 1999-2001, International Business Machines +// Corporation and others. All Rights Reserved. +//-------------------------------------------------------------------- +// THIS IS A MACHINE-GENERATED FILE +// Tool: dumpicurules.bat +// Source: Transliterator_index.txt +// Date: Mon Dec 3 11:44:30 2001 +//-------------------------------------------------------------------- + +//-------------------------------------------------------------------- +// N.B.: This file has been generated mechanically from the +// corresponding ICU4J file, which is the master file that receives +// primary updates. The colon-delimited fields have been split into +// separate strings. For 'file' and 'internal' lines, the encoding +// field has been deleted, since the encoding is processed at build +// time in ICU4C. Certain large rule sets not intended for general +// use have been commented out with the notation "Java only". +//-------------------------------------------------------------------- + +translit_swordindex { + RuleBasedTransliteratorIDs { +// Copyright (c) 2001, International Business Machines Corporation and +// others. All Rights Reserved. +// +// TRANSLITERATOR INDEX FILE. This file lists the non-algorithmic +// system transliterators. It allows arbitrary mappings between +// transliterator IDs and file names, and also allows the system to +// define aliases for transliterators, so that "Latin-Hangul", for +// example, can be implemented transparently as the compound +// "Latin-Jamo;Jamo-Hangul". Internal IDs may also be defined; these +// are invisible to the user, but can be composed together by the +// system to create visible transliterators. +// +// Blank lines and lines beginning with '#' are ignored. +// +// Lines in this file have one of the following forms (text not +// enclosed by <> is literal): +// +// :file::: +// :internal::: +// :alias: +// +// is the ID of the system transliterator being defined. These +// are public IDs enumerated by Transliterator.getAvailableIDs(), +// unless the second field is "internal". +// +// is a ResourceReader resource name. Currently these refer +// to file names under com/ibm/text/resources. This string is passed +// directly to ResourceReader, together with . +// +// is the character encoding to use when reading ; +// passed directly to ResourceReader. E.g., "UTF8". +// +// is either "FORWARD" or "REVERSE". +// +// is a string to be passed directly to +// Transliterator.getInstance(). The returned Transliterator object +// then has its ID changed to and is returned. + +// ICU < 2.0 additions +{ "Latin-Hebrew", "file", "translit_Latin_Hebrew", "FORWARD" }, +{ "Hebrew-Latin", "file", "translit_Latin_Hebrew", "REVERSE" }, +{ "Latin-Arabic", "file", "translit_Latin_Arabic", "FORWARD" }, +{ "Arabic-Latin", "file", "translit_Latin_Arabic", "REVERSE" }, + +// xtradata additions +//{ "Han-Pinyin", "file", "translit_Han_Pinyin", "FORWARD" }, +//{ "Kanji-English", "file", "translit_Kanji_English", "FORWARD" }, +//{ "Kanji-OnRomaji", "file", "translit_Kanji_OnRomaji", "FORWARD" }, +//{ "HTMLEntities-Unicode", "file", "translit_HTMLEnt_Unicode", "FORWARD" }, +//{ "Unicode-HTMLEntities", "file", "translit_HTMLEnt_Unicode", "REVERSE" }, + +// SWORD additions for academic Biblical transliteration schemes +{ "BGreek-Greek", "file", "translit_BGreek_Greek", "FORWARD" }, +{ "Greek-BGreek", "file", "translit_BGreek_Greek", "REVERSE" }, +{ "Beta-Greek", "file", "translit_BETA_Greek", "FORWARD" }, +{ "Greek-Beta", "file", "translit_BETA_Greek", "REVERSE" }, +{ "CCAT-Hebrew", "file", "translit_CCAT_Hebrew", "FORWARD" }, +{ "Hebrew-CCAT", "file", "translit_CCAT_Hebrew", "REVERSE" } +{ "CCAT-Syriac", "file", "translit_CCAT_Syriac", "FORWARD" }, +{ "Syriac-CCAT", "file", "translit_CCAT_Syriac", "REVERSE" }, +//{ "Syriac-Hebrew", "alias", "Syriac-CCAT;CCAT-Hebrew", "" }, +//{ "Hebrew-Syriac", "alias", "Hebrew-CCAT;CCAT-Syriac", "" }, +{ "Latin-Syriac", "file", "translit_Latin_Syriac", "FORWARD" }, +{ "Syriac-Latin", "file", "translit_Latin_Syriac", "REVERSE" }, + +// SWORD additions for other languages +{ "Latin-Thai", "file", "translit_Latin_Thai", "FORWARD" }, +{ "Thai-Latin", "file", "translit_Latin_Thai", "REVERSE" }, +{ "Latin-Georgian", "file", "translit_Latin_Georgian", "FORWARD" }, +{ "Georgian-Latin", "file", "translit_Latin_Georgian", "REVERSE" }, +{ "Latin-Armenian", "file", "translit_Latin_Armenian", "FORWARD" }, +{ "Armenian-Latin", "file", "translit_Latin_Armenian", "REVERSE" }, +{ "Latin-Coptic", "file", "translit_Latin_Coptic", "FORWARD" }, +{ "Coptic-Latin", "file", "translit_Latin_Coptic", "REVERSE" }, +{ "Latin-Gothic", "file", "translit_Latin_Gothic", "FORWARD" }, +{ "Gothic-Latin", "file", "translit_Latin_Gothic", "REVERSE" }, +{ "Latin-Ethiopic", "file", "translit_Latin_Ethiopic", "FORWARD" }, +{ "Ethiopic-Latin", "file", "translit_Latin_Ethiopic", "REVERSE" }, +{ "Latin-Ugaritic", "file", "translit_Latin_Ugaritic", "FORWARD" }, +{ "Ugaritic-Latin", "file", "translit_Latin_Ugaritic", "REVERSE" }, + +{ "Any-Latin1", "file", "translit_Any_Latin1", "FORWARD" }, + +// eof + } +} diff --git a/include/.cvsignore b/include/.cvsignore new file mode 100644 index 0000000..9a4764a --- /dev/null +++ b/include/.cvsignore @@ -0,0 +1,2 @@ +config.h.in +stamp-h1 diff --git a/include/Greek2Greek.h b/include/Greek2Greek.h new file mode 100644 index 0000000..00359c1 --- /dev/null +++ b/include/Greek2Greek.h @@ -0,0 +1,117 @@ +//***************************************************************************** +// Author : William Dicks *** +// Date Created: 10 February 1998 *** +// Purpose : Interface for Greek to b-Greek conversion and vice versa *** +// File Name : Greek2Greek.h *** +// *** +// Author info : ---------------------------------------------------------- *** +// Address : 23 Tieroogpark *** +// : Hoewe Str *** +// : Elarduspark X3 *** +// : 0181 *** +// : South Africa *** +// Home Tel: +27 (0)12 345 3166 *** +// Cell No : +27 (0)82 577 4424 *** +// e-mail : wd@isis.co.za *** +// Church WWW : http://www.hatfield.co.za *** +//***************************************************************************** +/* + * + * $Id: Greek2Greek.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef __GREEK2GREEK +#define __GREEK2GREEK + +#include +SWORD_NAMESPACE_START + +//***************************************************************************** +// Used to convert a string created by using the Greek font supplied with the +// Sword Project to a string that conforms to the b-Greek discussion list +// method of transliteration. +//***************************************************************************** +unsigned char Greek2bGreek (unsigned char *sResult, unsigned char *sGreekText, + int nMaxResultBuflen); + +//***************************************************************************** +// Used to convert a string created by using the b-Greek method of +// transliteration to a string that can be converted to a Greek-font readable +// string. +//***************************************************************************** +unsigned char bGreek2Greek (unsigned char *sResult, + unsigned char *sGreekText, int nMaxResultBuflen); + +//***************************************************************************** +// Parse a Greek font created string and return the b-Greek equivalent +//***************************************************************************** +int ParseGreek (unsigned char *sResult, + unsigned char *sGreekText, int nMaxResultBuflen); + +//***************************************************************************** +// Parse a b-Greek string and return the Greek font equivalent +//***************************************************************************** +int ParsebGreek (unsigned char *sResult, + unsigned char *sGreekText, int nMaxResultBuflen); + +//***************************************************************************** +// Convert a unsigned character to a GREEK font unsigned character +//***************************************************************************** +unsigned char char2Font (unsigned char letter, // bGreek letter to convert to Font letter + bool finalSigma, // Is it a final SIGMA + bool iota, // TRUE = IOTA subscript; FALSE = No IOTA + bool breathing, // TRUE = add breathing; FALSE = no breathing + bool rough); // TRUE = rough breathing; False = smooth + +//***************************************************************************** +// Convert a GREEK font unsigned character to a unsigned character +//***************************************************************************** +unsigned char Font2char (unsigned char letter, // bGreek letter to convert to Font letter + bool & iota, // TRUE = IOTA subscript; FALSE = No IOTA + bool & breathing, // TRUE = add breathing; FALSE = no breathing + bool & rough); // TRUE = rough breathing; False = smooth + + +//***************************************************************************** +// Identify and return a bGreek letter from a special font char +//***************************************************************************** +bool getSpecialChar (unsigned char Font, unsigned char &letter); + +//***************************************************************************** +// true if the font character is a special character; false it isn't +//***************************************************************************** +bool SpecialGreek (unsigned char Font); + +//***************************************************************************** +// Return Greek font puntuation from bGreek punstuation +//***************************************************************************** +unsigned char getGreekPunct (unsigned char bGreek); + +//***************************************************************************** +// Return bGreek puntuation from Greek font punstuation +//***************************************************************************** +unsigned char getbGreekPunct (unsigned char Greek); + +//***************************************************************************** +// Is the character punctuation or a space: true it is, false it isn't +//***************************************************************************** +bool isPunctSpace (unsigned char c); + +SWORD_NAMESPACE_END + +#endif // __GREEK2GREEK diff --git a/include/GreekChars.h b/include/GreekChars.h new file mode 100644 index 0000000..225f9ef --- /dev/null +++ b/include/GreekChars.h @@ -0,0 +1,154 @@ +//***************************************************************************** +// Author : William Dicks *** +// Date Created: 10 February 1998 *** +// Purpose : Enumeration for Greek to b-Greek conversion and vice *** +// : versa. *** +// File Name : GreekChars.h *** +// *** +// Author info : ---------------------------------------------------------- *** +// Address : 23 Tieroogpark *** +// : Hoewe Str *** +// : Elarduspark X3 *** +// : 0181 *** +// : South Africa *** +// Home Tel: +27 (0)12 345 3166 *** +// Cell No : +27 (0)82 577 4424 *** +// e-mail : wd@isis.co.za *** +// Church WWW : http://www.hatfield.co.za *** +//***************************************************************************** +/* + * + * $Id: GreekChars.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef __GREEKCHARS_H +#define __GREEKCHARS_H + +// This enum represents the values of the characters used for the +// transliteration as used on the b-greek discussion list. + +#include +SWORD_NAMESPACE_START + +enum bGreekChars +{ + ALPHA = 65, // A + BETA, // B + CHI, // C + DELTA, // D + EPSILON, // E + PHI, // F + GAMMA, // G + ETA, // H + IOTA, // I + // No J + KAPPA = 75, // K + LAMBDA, // L + MU, // M + NU, // N + OMICRON, // O + PI, // P + THETA, // Q + RHO, // R + SIGMA, // S + TAU, // T + UPSILON, // U + // No V + OMEGA = 'W', // W + XI, // X + PSI, // Y + ZETA, // Z + ROUGH = 104, // h + IOTA_SUB // i +}; + +// This enum represents the values of the characters ib the Greek.ttf font, +// and the comments on the right are the corresponding bGreek equivalents. + +enum GreekFontChars +{ + gALPHA = 'a', // A + gBETA, // B + gCHI, // C + gDELTA, // D + gEPSILON, // E + gPHI, // F + gGAMMA, // G + gETA, // H + gIOTA, // I + gSIGMA_END, // j + gKAPPA, // K + gLAMBDA, // L + gMU, // M + gNU, // N + gOMICRON, // O + gPI, // P + gTHETA, // Q + gRHO, // R + gSIGMA, // S + gTAU, // T + gUPSILON, // U + // No V + gOMEGA = 'w', // W + gXI, // X + gPSI, // Y + gZETA, // Z + gROUGH_ALPHA = 161, // hA + gROUGH_EPSILON = 152, // hE + gROUGH_ETA = 185, // hH + gROUGH_IOTA = 131, // hH + gROUGH_OMICRON = 208, // hH + gROUGH_RHO = 183, // hR + gROUGH_UPSILON = 216, // hU + gROUGH_OMEGA = 230, // hW + gIOTA_ALPHA = 'v', // Ai + gIOTA_ETA = 'V', // Ei + gIOTA_OMEGA = 'J', // Wi + gNON_ROUGH_ALPHA = 162, // hA + gNON_ROUGH_EPSILON = 153, // hE + gNON_ROUGH_ETA = 186, // hH + gNON_ROUGH_IOTA = 132, // hH + gNON_ROUGH_OMICRON = 209, // hH + gNON_ROUGH_RHO = 184, // hR + gNON_ROUGH_UPSILON = 217, // hU + gNON_ROUGH_OMEGA = 231 // hW +}; + +// English puntuation as used on bGreek + +enum bGreekPunct +{ + COMMA = ',', + STOP = '.', + SEMI_COLON = ';', + QUESTION = '?' +}; + +// English puntuation as used in the Greek font + +enum GreekPunct +{ + gCOMMA = ',', + gSTOP = '.', + gSEMI_COLON = ':', + gQUESTION = ';' +}; + +SWORD_NAMESPACE_END + +#endif // __GREEKCHARS_H diff --git a/include/Makefile b/include/Makefile new file mode 100644 index 0000000..fc04b62 --- /dev/null +++ b/include/Makefile @@ -0,0 +1,5 @@ + +root := .. + +all: + make -C ${root} diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..62866cb --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,158 @@ +swincludedir = $(top_srcdir)/include + +pkginclude_HEADERS = $(swincludedir)/Greek2Greek.h +pkginclude_HEADERS += $(swincludedir)/GreekChars.h +pkginclude_HEADERS += $(swincludedir)/canon.h +pkginclude_HEADERS += $(swincludedir)/cipherfil.h +pkginclude_HEADERS += $(swincludedir)/curlftpt.h +pkginclude_HEADERS += $(swincludedir)/defs.h +pkginclude_HEADERS += $(swincludedir)/echomod.h +pkginclude_HEADERS += $(swincludedir)/encfiltmgr.h +pkginclude_HEADERS += $(swincludedir)/entriesblk.h +pkginclude_HEADERS += $(swincludedir)/femain.h +pkginclude_HEADERS += $(swincludedir)/filemgr.h +pkginclude_HEADERS += $(swincludedir)/flatapi.h +pkginclude_HEADERS += $(swincludedir)/ftpparse.h +pkginclude_HEADERS += $(swincludedir)/ftptrans.h +pkginclude_HEADERS += $(swincludedir)/ftplibftpt.h +pkginclude_HEADERS += $(swincludedir)/ftplib.h + +pkginclude_HEADERS += $(swincludedir)/gbffootnotes.h +pkginclude_HEADERS += $(swincludedir)/gbfheadings.h +pkginclude_HEADERS += $(swincludedir)/gbfhtml.h +pkginclude_HEADERS += $(swincludedir)/gbfhtmlhref.h +pkginclude_HEADERS += $(swincludedir)/gbfwebif.h +pkginclude_HEADERS += $(swincludedir)/gbfmorph.h +pkginclude_HEADERS += $(swincludedir)/gbfosis.h +pkginclude_HEADERS += $(swincludedir)/gbfplain.h +pkginclude_HEADERS += $(swincludedir)/gbfredletterwords.h +pkginclude_HEADERS += $(swincludedir)/gbfrtf.h +pkginclude_HEADERS += $(swincludedir)/gbfstrongs.h +pkginclude_HEADERS += $(swincludedir)/gbfwordjs.h +pkginclude_HEADERS += $(swincludedir)/gbfthml.h +pkginclude_HEADERS += $(swincludedir)/greeklexattribs.h + +pkginclude_HEADERS += $(swincludedir)/hebrewmcim.h +pkginclude_HEADERS += $(swincludedir)/hrefcom.h +pkginclude_HEADERS += $(swincludedir)/installmgr.h +pkginclude_HEADERS += $(swincludedir)/latin1utf16.h +pkginclude_HEADERS += $(swincludedir)/latin1utf8.h +pkginclude_HEADERS += $(swincludedir)/listkey.h +pkginclude_HEADERS += $(swincludedir)/localemgr.h +pkginclude_HEADERS += $(swincludedir)/lzsscomprs.h +pkginclude_HEADERS += $(swincludedir)/markupfiltmgr.h +pkginclude_HEADERS += $(swincludedir)/multimapwdef.h +pkginclude_HEADERS += $(swincludedir)/nullim.h + +pkginclude_HEADERS += $(swincludedir)/osisheadings.h +pkginclude_HEADERS += $(swincludedir)/osishtmlhref.h +pkginclude_HEADERS += $(swincludedir)/osiswebif.h +pkginclude_HEADERS += $(swincludedir)/osismorph.h +pkginclude_HEADERS += $(swincludedir)/osismorphsegmentation.h +pkginclude_HEADERS += $(swincludedir)/osisplain.h +pkginclude_HEADERS += $(swincludedir)/osisrtf.h +pkginclude_HEADERS += $(swincludedir)/osisosis.h +pkginclude_HEADERS += $(swincludedir)/osisstrongs.h +pkginclude_HEADERS += $(swincludedir)/osisfootnotes.h +pkginclude_HEADERS += $(swincludedir)/osislemma.h +pkginclude_HEADERS += $(swincludedir)/osisredletterwords.h +pkginclude_HEADERS += $(swincludedir)/osisscripref.h +pkginclude_HEADERS += $(swincludedir)/osiswordjs.h +pkginclude_HEADERS += $(swincludedir)/osisvariants.h + +pkginclude_HEADERS += $(swincludedir)/papyriplain.h +pkginclude_HEADERS += $(swincludedir)/plainfootnotes.h +pkginclude_HEADERS += $(swincludedir)/plainfootnotes.h +pkginclude_HEADERS += $(swincludedir)/plainhtml.h +pkginclude_HEADERS += $(swincludedir)/rawcom.h +pkginclude_HEADERS += $(swincludedir)/rawfiles.h +pkginclude_HEADERS += $(swincludedir)/rawgenbook.h +pkginclude_HEADERS += $(swincludedir)/rawld.h +pkginclude_HEADERS += $(swincludedir)/rawld4.h +pkginclude_HEADERS += $(swincludedir)/rawstr.h +pkginclude_HEADERS += $(swincludedir)/rawstr4.h +pkginclude_HEADERS += $(swincludedir)/rawtext.h +pkginclude_HEADERS += $(swincludedir)/rawverse.h +pkginclude_HEADERS += $(swincludedir)/regex.h +pkginclude_HEADERS += $(swincludedir)/roman.h +pkginclude_HEADERS += $(swincludedir)/rtfhtml.h +pkginclude_HEADERS += $(swincludedir)/sapphire.h +pkginclude_HEADERS += $(swincludedir)/scsuutf8.h +pkginclude_HEADERS += $(swincludedir)/strkey.h +pkginclude_HEADERS += $(swincludedir)/swbasicfilter.h +pkginclude_HEADERS += $(swincludedir)/swbuf.h +pkginclude_HEADERS += $(swincludedir)/swcacher.h +pkginclude_HEADERS += $(swincludedir)/swcipher.h +pkginclude_HEADERS += $(swincludedir)/swcom.h +pkginclude_HEADERS += $(swincludedir)/swcomprs.h +pkginclude_HEADERS += $(swincludedir)/swconfig.h +pkginclude_HEADERS += $(swincludedir)/swdisp.h +pkginclude_HEADERS += $(swincludedir)/swfilter.h +pkginclude_HEADERS += $(swincludedir)/swfiltermgr.h +pkginclude_HEADERS += $(swincludedir)/swgenbook.h +pkginclude_HEADERS += $(swincludedir)/swinputmeth.h +pkginclude_HEADERS += $(swincludedir)/swkey.h +pkginclude_HEADERS += $(swincludedir)/swld.h +pkginclude_HEADERS += $(swincludedir)/swlocale.h +pkginclude_HEADERS += $(swincludedir)/swlog.h +pkginclude_HEADERS += $(swincludedir)/swmacs.h +pkginclude_HEADERS += $(swincludedir)/swmgr.h +pkginclude_HEADERS += $(swincludedir)/stringmgr.h +pkginclude_HEADERS += $(swincludedir)/swmodule.h +pkginclude_HEADERS += $(swincludedir)/swoptfilter.h +pkginclude_HEADERS += $(swincludedir)/swobject.h +pkginclude_HEADERS += $(swincludedir)/swsearchable.h +pkginclude_HEADERS += $(swincludedir)/swtext.h +pkginclude_HEADERS += $(swincludedir)/swunicod.h +pkginclude_HEADERS += $(swincludedir)/swversion.h +pkginclude_HEADERS += $(swincludedir)/sysdata.h + +pkginclude_HEADERS += $(swincludedir)/thmlfootnotes.h +pkginclude_HEADERS += $(swincludedir)/thmlgbf.h +pkginclude_HEADERS += $(swincludedir)/thmlheadings.h +pkginclude_HEADERS += $(swincludedir)/thmlhtml.h +pkginclude_HEADERS += $(swincludedir)/thmlhtmlhref.h +pkginclude_HEADERS += $(swincludedir)/thmlwebif.h +pkginclude_HEADERS += $(swincludedir)/thmllemma.h +pkginclude_HEADERS += $(swincludedir)/thmlmorph.h +pkginclude_HEADERS += $(swincludedir)/thmlosis.h +pkginclude_HEADERS += $(swincludedir)/thmlplain.h +pkginclude_HEADERS += $(swincludedir)/thmlrtf.h +pkginclude_HEADERS += $(swincludedir)/thmlscripref.h +pkginclude_HEADERS += $(swincludedir)/thmlstrongs.h +pkginclude_HEADERS += $(swincludedir)/thmlvariants.h +pkginclude_HEADERS += $(swincludedir)/thmlwordjs.h + +pkginclude_HEADERS += $(swincludedir)/teiplain.h +pkginclude_HEADERS += $(swincludedir)/teirtf.h + +pkginclude_HEADERS += $(swincludedir)/treekey.h +pkginclude_HEADERS += $(swincludedir)/treekeyidx.h +pkginclude_HEADERS += $(swincludedir)/unicodertf.h +pkginclude_HEADERS += $(swincludedir)/url.h +pkginclude_HEADERS += $(swincludedir)/untgz.h +pkginclude_HEADERS += $(swincludedir)/utf16utf8.h +pkginclude_HEADERS += $(swincludedir)/utf8arshaping.h +pkginclude_HEADERS += $(swincludedir)/utf8bidireorder.h +pkginclude_HEADERS += $(swincludedir)/utf8cantillation.h +pkginclude_HEADERS += $(swincludedir)/utf8greekaccents.h +pkginclude_HEADERS += $(swincludedir)/utf8hebrewpoints.h +pkginclude_HEADERS += $(swincludedir)/utf8html.h +pkginclude_HEADERS += $(swincludedir)/utf8latin1.h +pkginclude_HEADERS += $(swincludedir)/utf8nfc.h +pkginclude_HEADERS += $(swincludedir)/utf8nfkd.h +pkginclude_HEADERS += $(swincludedir)/utf8transliterator.h +pkginclude_HEADERS += $(swincludedir)/utf8utf16.h +pkginclude_HEADERS += $(swincludedir)/utilstr.h +pkginclude_HEADERS += $(swincludedir)/utilxml.h + +pkginclude_HEADERS += $(swincludedir)/versekey.h +pkginclude_HEADERS += $(swincludedir)/versetreekey.h +pkginclude_HEADERS += $(swincludedir)/zcom.h +pkginclude_HEADERS += $(swincludedir)/zconf.h +pkginclude_HEADERS += $(swincludedir)/zipcomprs.h +pkginclude_HEADERS += $(swincludedir)/zld.h +pkginclude_HEADERS += $(swincludedir)/zstr.h +pkginclude_HEADERS += $(swincludedir)/ztext.h +pkginclude_HEADERS += $(swincludedir)/zverse.h + diff --git a/include/SwordAPI.pas b/include/SwordAPI.pas new file mode 100644 index 0000000..837ff2d --- /dev/null +++ b/include/SwordAPI.pas @@ -0,0 +1,69 @@ +{* + * + * $Id: SwordAPI.pas 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + *} +unit SwordAPI; + +interface +const + DLLNAME = 'sword32.dll'; + +type + paramt = record + path, name, disc: pchar; + end; + pparamt = ^paramt; + +function NewModule(modtype: PChar; params: pparamt): integer; stdcall; external DLLNAME; +procedure DeleteModule(hmod: integer); stdcall; external DLLNAME; +function ModGetTextLen(hmod: integer): integer; stdcall; external DLLNAME; +procedure ModGetText(hmod: integer; buf: PChar; size: integer); stdcall; external DLLNAME; +procedure ModGetKeyText(hmod: integer; buf: PChar; size: integer); stdcall; external DLLNAME; +function ModGetKey(hmod: integer):integer; stdcall; external DLLNAME; +function ModSetKeyText(hmod: integer; keytext: PChar):char; stdcall; external DLLNAME; +function ModSetKeyKey(hmod: integer; hkey: integer):char; stdcall; external DLLNAME; +function ModSearch(hmod: integer; stext: PChar):integer; stdcall; external DLLNAME; +procedure YoYo(x:integer; y:integer); stdcall; external DLLNAME; +procedure ModInc(hmod: integer); stdcall; external DLLNAME; +procedure ModDec(hmod: integer); stdcall; external DLLNAME; +function ModError(hmod:integer): integer; stdcall; external DLLNAME; +function NewKey(keytype:PChar):integer;stdcall; external DLLNAME; +procedure DeleteKey(hkey: integer); stdcall; external DLLNAME; +function KeyGetPersist(hkey: integer): integer; stdcall; external DLLNAME; +procedure KeySetPersist(hkey: integer; value: integer); stdcall; external DLLNAME; +function KeyError(hkey:integer): integer; stdcall; external DLLNAME; +procedure KeyGetText(hkey: integer; buf: PChar; size: integer); stdcall; external DLLNAME; +procedure KeySetText(hkey: integer; keytext: PChar); stdcall; external DLLNAME; +procedure KeySetKey(hkey: integer; hkey: integer); stdcall; external DLLNAME; +procedure KeyInc(hkey: integer); stdcall; external DLLNAME; +procedure KeyDec(hkey: integer); stdcall; external DLLNAME; +function VerseKeyGetTestament(hkey: integer): integer; stdcall; external DLLNAME; +function VerseKeyGetBook(hkey: integer): integer; stdcall; external DLLNAME; +function VerseKeyGetChapter(hkey: integer): integer; stdcall; external DLLNAME; +function VerseKeyGetVerse(hkey: integer): integer; stdcall; external DLLNAME; +procedure VerseKeySetTestament(hkey: integer; value: integer); stdcall; external DLLNAME; +procedure VerseKeySetBook(hkey: integer; value: integer); stdcall; external DLLNAME; +procedure VerseKeySetChapter(hkey: integer; value: integer); stdcall; external DLLNAME; +procedure VerseKeySetVerse(hkey: integer; value: integer); stdcall; external DLLNAME; +function VerseKeyGetAutoNormalize(hkey: integer): integer; stdcall; external DLLNAME; +procedure VerseKeySetAutoNormalize(hkey: integer; value: integer); stdcall; external DLLNAME; +procedure VerseKeyNormalize(hkey: integer); stdcall; external DLLNAME; + +implementation + +end. diff --git a/include/apocrypha.h b/include/apocrypha.h new file mode 100644 index 0000000..6f08bbe --- /dev/null +++ b/include/apocrypha.h @@ -0,0 +1,219 @@ +/****************************************************************************** + * apocrypha.h - Apocryphal text information to be included by VerseKey.cpp + * + * $Id: apocrypha.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +/****************************************************************************** + * [a]tbooks - initialize static instance for all canonical text names + * and chapmax + */ + +#include +//SWORD_NAMESPACE_START + +//Data based on NRSVA unless otherwise noted; this book ordering is not necessarily optimal. + +struct sbook +VerseKey::otbooks[] = { + //Catholic Deuterocanon + {"Tobit", "Tob", 14}, //67 + {"Judith", "Jdt", 16}, //68 + {"Wisdom", "Wis", 19}, //69 + {"Sirach", "Sir", 51}, //70 //51 or 52? count prologue as separate book or just chapter? + {"Baruch", "Bar", 5}, //71 //5 or 6? (see next line) + {"Letter of Jeremiah", "EpJer", 1}, //72 //1 or 6? EpJer is ch6 of Baruch + {"1 Esdras", "1Esd", 9}, //73 + {"2 Esdras", "2Esd", 16}, //74 + {"1 Maccabees", "1Macc", 16}, //75 + {"2 Maccabees", "2Macc", 15}, //76 + + //LXX + {"3 Maccabees", "3Macc", 7}, //77 + {"4 Maccabees", "4Macc", 18}, //78 + {"Odes", "Odes", 14}, //79 //based on LXX + {"Psalms of Solomon", "PssSol", 18}, //80 //based on LXX + + //Protestant Apocrypha + {"Additions to Esther", "AddEsth", 6}, //81 //based on Charles/NRSVA //6 or F or 16? If you're Catholic, you have a 16 chapter canonical book called Esther (ie Greek Esther); if you're Protestant you have a 10 chapter canonical book called Esther (ie Hebrew Esther) plus a 6 "chapter" set of "Additions" in an apocryphal book called Additions to Esther, which are "numbered" A through F or continue from chapter 10 through 16. + {"Prayer of Azariah", "PrAzar", 1}, //82 + {"Susanna", "Sus", 1}, //83 + {"Bel and the Dragon", "Bel", 1}, //84 + {"Prayer of Manasses", "PrMan", 1}, //85 + {"Psalm 151", "Ps151", 1}, //86 + + //Vulgate + {"Epistle to the Laodiceans", "EpLao", 1}, //87 //based on Vulgate + + //Other books may follow at a later date (e.g. Jub, 1En) +}; + +/****************************************************************************** + * Abbreviations - MUST be in alphabetical order & by PRIORITY + * RULE: first match of entire key + * (e.g. key: "1CH"; match: "1CHRONICLES") + */ + +const struct abbrev + VerseKey::builtin_abbrevs[] = { + {"1 ESDRAS", 73}, + {"1 MACCABEES", 75}, + {"1ESDRAS", 73}, + {"1MACCABEES", 75}, + {"2 ESDRAS", 74}, + {"2 MACCABEES", 76}, + {"2ESDRAS", 74}, + {"2MACCABEES", 76}, + {"3 MACCABEES", 77}, + {"3MACCABEES", 77}, + {"4 MACCABEES", 78}, + {"4MACCABEES", 78}, + {"ADDESTHER", 81}, + {"ADDITIONS TO ESTHER", 81}, + {"BARUCH", 71}, + {"BEL AND THE DRAGON", 84}, + {"BEN SIRACH", 70}, + {"ECCLESIASTICUS", 70}, + {"EPISTLE OF JEREMIAH", 72}, + {"EPISTLE TO THE LAODICEANS", 87}, + {"EPJER", 72}, + {"EPLAO", 87}, + {"I ESDRAS", 73}, + {"I MACCABEES", 75}, + {"IESDRAS", 73}, + {"II ESDRAS", 74}, + {"II MACCABEES", 76}, + {"IIESDRAS", 74}, + {"III MACCABEES", 77}, + {"IIII MACCABEES", 78}, + {"IIIIMACCABEES", 78}, + {"IIIMACCABEES", 77}, + {"IIMACCABEES", 76}, + {"IMACCABEES", 75}, + {"IV MACCABEES", 78}, + {"IVMACCABEES", 78}, + {"JDT", 68}, + {"JESUS BEN SIRACH", 70}, + {"JUDITH", 68}, + {"LAODICEANS", 87}, + {"LETTER OF JEREMIAH", 72}, + {"MANASSEH", 85}, + {"MANASSES", 85}, + {"ODES", 79}, + {"PRAYER OF AZARIAH", 82}, + {"PRAYER OF MANASSEH", 85}, + {"PRAYER OF MANASSES", 85}, + {"PRAZAR", 82}, + {"PRMAN", 85}, + {"PS151", 86}, + {"PSALM151", 86}, + {"PSALMS OF SOLOMON", 80}, + {"PSSOL", 80}, + {"PSSSOL", 80}, + {"SIRACH", 70}, + {"SUSANNA", 83}, + {"TOBIT", 67}, + {"WISDOM OF JESUS BEN SIRACH", 70}, + {"WISDOM", 69}, + {"", -1} +}; + + +/****************************************************************************** + * Maximum verses per chapter + */ + +int +VerseKey::vm[] = { + //Catholic Deuterocanon + //Tobit 14 //67 + 22, 14, 17, 21, 21, 17, 18, 21, 6, 12, + 19, 22, 18, 15, + //Judith 16 //68 + 16, 28, 10, 15, 24, 21, 32, 36, 14, 23, + 23, 20, 20, 19, 13, 25, + //Wisdom 19 //69 + 16, 24, 19, 20, 23, 25, 30, 21, 18, 21, + 26, 27, 19, 31, 19, 29, 21, 25, 22, + //Sirach 51 //70 //Prologue has 36 vv. in LXX, 1 v. in NRSVA + 30, 18, 31, 31, 15, 37, 36, 19, 18, 31, + 34, 18, 26, 27, 20, 30, 32, 33, 30, 32, + 28, 27, 27, 34, 26, 29, 30, 26, 28, 25, + 31, 24, 31, 26, 20, 26, 31, 34, 35, 30, + 23, 25, 33, 23, 26, 20, 25, 25, 16, 29, + 30, + //Baruch 5 //71 + 21, 35, 37, 37, 9, + //Letter of Jeremiah 1 //72 + 73, + //1 Esdras 9 //73 + 58, 30, 24, 63, 73, 34, 15, 96, 55, + //2 Esdras 16 //74 + 40, 48, 36, 52, 56, 59, 140, 63, 47, 59, + 46, 51, 58, 48, 63, 78, + //1 Maccabees 16 //75 + 64, 70, 60, 61, 68, 63, 50, 32, 73, 89, + 74, 53, 53, 49, 41, 24, + //2 Maccabees 15 //76 + 36, 32, 40, 50, 27, 31, 42, 36, 29, 38, + 38, 45, 26, 46, 39, + + //LXX + //3 Maccabees 7 //77 + 29, 33, 30, 21, 51, 41, 23, + //4 Maccabees 18 //78 + 35, 24, 21, 26, 38, 35, 23, 29, 32, 21, + 27, 19, 27, 20, 32, 25, 24, 24, + //Odes 14 //79 + 19, 43, 10, 19, 20, 10, 45, 88, 79, 9, + 20, 15, 32, 46, + //Psalms of Solomon 18 //80 + 8, 37, 12, 25, 19, 6, 10, 34, 11, 8, + 9, 6, 12, 10, 13, 15, 46, 12, + + //Protestant Apocrypha + //Additions to Esther 6 //81 + 17, 7, 30, 16, 24, 11 + //Prayer of Azariah 1 //82 + 68, + //Susanna 1 //83 + 64, + //Bel and the Dragon 1 //84 + 42, + //Prayer of Manasses 1 //85 + 15, + //Psalm 151 1 //86 + 7, + + //Vulgate + //Epistle to the Laodiceans 1 //87 + 20, +}; + + +long + VerseKey::atbks[] = { +0, 1, 16, 33, 53, 105, 111, 113, 123, 140, 157, 173, 181, 200, 215, 234, 241, 243, 245, 247, 249, 251 +}; + +long + VerseKey::atcps[] = { +0, 2, 3, 26, 41, 59, 81, 103, 121, 140, 162, 169, 183, 203, 226, 245, 262, 279, 308, 319, 335, 360, 382, 415, 452, 467, 492, 516, 537, 558, 578, 592, 619, 636, 661, 681, 702, 726, 752, 783, 805, 824, 847, 874, 902, 922, 954, 974, 1004, 1026, 1052, 1076, 1107, 1126, 1158, 1190, 1206, 1244, 1281, 1301, 1320, 1353, 1388, 1407, 1434, 1462, 1483, 1514, 1547, 1581, 1612, 1646, 1675, 1703, 1731, 1766, 1793, 1823, 1854, 1881, 1910, 1937, 1969, 1994, 2026, 2053, 2074, 2101, 2133, 2168, 2204, 2236, 2260, 2286, 2320, 2344, 2371, 2392, 2418, 2444, 2461, 2492, 2524, 2546, 2582, 2620, 2658, 2669, 2744, 2803, 2834, 2859, 2923, 2997, 3032, 3048, 3145, 3202, 3243, 3292, 3329, 3382, 3439, 3499, 3640, 3704, 3752, 3813, 3860, 3912, 3971, 4020, 4084, 4164, 4229, 4300, 4361, 4423, 4492, 4556, 4607, 4640, 4714, 4805, 4880, 4934, 4988, 5038, 5080, 5106, 5143, 5176, 5217, 5268, 5296, 5328, 5371, 5408, 5438, 5478, 5517, 5563, 5590, 5637, 5678, 5708, 5742, 5773, 5795, 5847, 5889, 5914, 5950, 5975, 5997, 6024, 6063, 6099, 6123, 6153, 6186, 6209, 6237, 6257, 6285, 6306, 6339, 6365, 6390, 6416, 6436, 6480, 6491, 6511, 6532, 6543, 6589, 6678, 6758, 6769, 6790, 6806, 6839, 6887, 6896, 6934, 6947, 6973, 6993, 7000, 7011, 7046, 7058, 7068, 7078, 7085, 7098, 7109, 7123, 7139, 7186, 7200, 7270, 7336, 7380, 7397, 7406 +}; + +//SWORD_NAMESPACE_END diff --git a/include/canon.h b/include/canon.h new file mode 100644 index 0000000..a17f86a --- /dev/null +++ b/include/canon.h @@ -0,0 +1,697 @@ +/****************************************************************************** + * canon.h - Canonical text information to be included by VerseKey.cpp + * + * $Id: canon.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998-2005 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +/****************************************************************************** + * [on]tbooks - initialize static instance for all canonical text names + * and chapmax + */ + +struct sbook + VerseKey::otbooks[] = { + {"Genesis", "Gen", 50}, + {"Exodus", "Exod", 40}, + {"Leviticus", "Lev", 27}, + {"Numbers", "Num", 36}, + {"Deuteronomy", "Deut", 34}, + {"Joshua", "Josh", 24}, + {"Judges", "Judg", 21}, + {"Ruth", "Ruth", 4}, + {"I Samuel", "1Sam", 31}, + {"II Samuel", "2Sam", 24}, + {"I Kings", "1Kgs", 22}, + {"II Kings", "2Kgs", 25}, + {"I Chronicles", "1Chr", 29}, + {"II Chronicles", "2Chr", 36}, + {"Ezra", "Ezra", 10}, + {"Nehemiah", "Neh", 13}, + {"Esther", "Esth", 10}, + {"Job", "Job", 42}, + {"Psalms", "Ps", 150}, + {"Proverbs", "Prov", 31}, + {"Ecclesiastes", "Eccl", 12}, + {"Song of Solomon", "Song", 8}, + {"Isaiah", "Isa", 66}, + {"Jeremiah", "Jer", 52}, + {"Lamentations", "Lam", 5}, + {"Ezekiel", "Ezek", 48}, + {"Daniel", "Dan", 12}, + {"Hosea", "Hos", 14}, + {"Joel", "Joel", 3}, + {"Amos", "Amos", 9}, + {"Obadiah", "Obad", 1}, + {"Jonah", "Jonah", 4}, + {"Micah", "Mic", 7}, + {"Nahum", "Nah", 3}, + {"Habakkuk", "Hab", 3}, + {"Zephaniah", "Zeph", 3}, + {"Haggai", "Hag", 2}, + {"Zechariah", "Zech", 14}, + {"Malachi", "Mal", 4} +}; + +struct sbook + VerseKey::ntbooks[] = { + {"Matthew", "Matt", 28}, + {"Mark", "Mark", 16}, + {"Luke", "Luke", 24}, + {"John", "John", 21}, + {"Acts", "Acts", 28}, + {"Romans", "Rom", 16}, + {"I Corinthians", "1Cor", 16}, + {"II Corinthians", "2Cor", 13}, + {"Galatians", "Gal", 6}, + {"Ephesians", "Eph", 6}, + {"Philippians", "Phil", 4}, + {"Colossians", "Col", 4}, + {"I Thessalonians", "1Thess", 5}, + {"II Thessalonians", "2Thess", 3}, + {"I Timothy", "1Tim", 6}, + {"II Timothy", "2Tim", 4}, + {"Titus", "Titus", 3}, + {"Philemon", "Phlm", 1}, + {"Hebrews", "Heb", 13}, + {"James", "Jas", 5}, + {"I Peter", "1Pet", 5}, + {"II Peter", "2Pet", 3}, + {"I John", "1John", 5}, + {"II John", "2John", 1}, + {"III John", "3John", 1}, + {"Jude", "Jude", 1}, + {"Revelation of John", "Rev", 22} +}; + + +/****************************************************************************** + * Abbreviations - MUST be in alphabetical order & by PRIORITY + * RULE: first match of entire key + * (e.g. key: "1CH"; match: "1CHRONICLES") + */ + +const struct abbrev + VerseKey::builtin_abbrevs[] = { + {"1 C", 46}, // 1 Corinthians + {"1 CHRONICLES", 13}, // 1 Chronicles + {"1 CORINTHIANS", 46}, // 1 Corinthians + {"1 JN", 62}, // 1 John + {"1 JOHN", 62}, // 1 John + {"1 KGS", 11}, // 1 Kings + {"1 KINGS", 11}, // 1 Kings + {"1 PETER", 60}, // 1 Peter + {"1 PTR", 60}, // 1 Peter + {"1 SAMUEL", 9}, // 1 Samuel + {"1 THESSALONIANS", 52}, // 1 Thessalonians + {"1 TIMOTHY", 54}, // 1 Timothy + {"1C", 46}, // 1 Corinthians + {"1CHRONICLES", 13}, // 1 Chronicles + {"1CORINTHIANS", 46}, // 1 Corinthians + {"1JN", 62}, // 1 John + {"1JOHN", 62}, // 1 John + {"1KGS", 11}, // 1 Kings + {"1KINGS", 11}, // 1 Kings + {"1PETER", 60}, // 1 Peter + {"1PTR", 60}, // 1 Peter + {"1SAMUEL", 9}, // 1 Samuel + {"1THESSALONIANS", 52}, // 1 Thessalonians + {"1TIMOTHY", 54}, // 1 Timothy + {"2 C", 47}, // 2 Corinthians + {"2 CHRONICLES", 14}, // 2 Chronicles + {"2 CORINTHIANS", 47}, // 2 Corinthians + {"2 JN", 63}, // 2 John + {"2 JOHN", 63}, // 2 John + {"2 KGS", 12}, // 2 Kings + {"2 KINGS", 12}, // 2 Kings + {"2 PETER", 61}, // 2 Peter + {"2 PTR", 61}, // 2 Peter + {"2 SAMUEL", 10}, // 2 Samuel + {"2 THESSALONIANS", 53}, // 2 Thessalonians + {"2 TIMOTHY", 55}, // 2 Timothy + {"2C", 47}, // 2 Corinthians + {"2CHRONICLES", 14}, // 2 Chronicles + {"2CORINTHIANS", 47}, // 2 Corinthians + {"2JN", 63}, // 2 John + {"2JOHN", 63}, // 2 John + {"2KGS", 12}, // 2 Kings + {"2KINGS", 12}, // 2 Kings + {"2PETER", 61}, // 2 Peter + {"2PTR", 61}, // 2 Peter + {"2SAMUEL", 10}, // 2 Samuel + {"2THESSALONIANS", 53}, // 2 Thessalonians + {"2TIMOTHY", 55}, // 2 Timothy + {"3 JN", 64}, // 3 John + {"3 JOHN", 64}, // 3 John + {"3JN", 64}, // 3 John + {"3JOHN", 64}, // 3 John + {"ACTS", 44}, // Acts + {"AMOS", 30}, // Amos + {"APOCALYPSE OF ST. JOHN", 66}, // Apocalypse of St. John (Rev.) + {"C", 51}, // Colossians + {"CANTICLE OF CANTICLES", 22}, // Canticle of Canticles (Song of S.) + {"COLOSSIANS", 51}, // Colossians + {"D", 5}, // Deuteronomy + {"DANIEL", 27}, // Daniel + {"DEUTERONOMY", 5}, // Deuteronomy + {"E", 49}, // Ephesians + {"ECCLESIASTES", 21}, // Ecclesiastes + {"EPHESIANS", 49}, // Ephesians + {"ESTER", 17}, // Esther + {"ESTHER", 17}, // Esther + {"EXODUS", 2}, // Exodus + {"EZEKIEL", 26}, // Ezekiel + {"EZK", 26}, // Ezekiel + {"EZRA", 15}, // Ezra + {"G", 1}, // Genesis + {"GALATIANS", 48}, // Galatians + {"GENESIS", 1}, // Genesis + {"H", 58}, // Hebrews + {"HABAKKUK", 35}, // Habakkuk + {"HAGGAI", 37}, // Haggai + {"HEBREWS", 58}, // Hebrews + {"HOSEA", 28}, // Hosea + {"I C", 46}, // 1 Corinthians + {"I CHRONICLES", 13}, // 1 Chronicles + {"I CORINTHIANS", 46}, // 1 Corinthians + {"I JN", 62}, // 1 John + {"I JOHN", 62}, // 1 John + {"I KGS", 11}, // 1 Kings + {"I KINGS", 11}, // 1 Kings + {"I PETER", 60}, // 1 Peter + {"I PTR", 60}, // 1 Peter + {"I SAMUEL", 9}, // 1 Samuel + {"I THESSALONIANS", 52}, // 1 Thessalonians + {"I TIMOTHY", 54}, // 1 Timothy + {"IC", 46}, // 1 Corinthians + {"ICHRONICLES", 13}, // 1 Chronicles + {"ICORINTHIANS", 46}, // 1 Corinthians + {"II C", 47}, // 2 Corinthians + {"II CHRONICLES", 14}, // 2 Chronicles + {"II CORINTHIANS", 47}, // 2 Corinthians + {"II JN", 63}, // 2 John + {"II JOHN", 63}, // 2 John + {"II KGS", 12}, // 2 Kings + {"II KINGS", 12}, // 2 Kings + {"II PETER", 61}, // 2 Peter + {"II PTR", 61}, // 2 Peter + {"II SAMUEL", 10}, // 2 Samuel + {"II THESSALONIANS", 53}, // 2 Thessalonians + {"II TIMOTHY", 55}, // 2 Timothy + {"IIC", 47}, // 2 Corinthians + {"IICHRONICLES", 14}, // 2 Chronicles + {"IICORINTHIANS", 47}, // 2 Corinthians + {"III JN", 64}, // 3 John + {"III JOHN", 64}, // 3 John + {"IIIJN", 64}, // 3 John + {"IIIJOHN", 64}, // 3 John + {"IIJN", 63}, // 2 John + {"IIJOHN", 63}, // 2 John + {"IIKGS", 12}, // 2 Kings + {"IIKINGS", 12}, // 2 Kings + {"IIPETER", 61}, // 2 Peter + {"IIPTR", 61}, // 2 Peter + {"IISAMUEL", 10}, // 2 Samuel + {"IITHESSALONIANS", 53}, // 2 Thessalonians + {"IITIMOTHY", 55}, // 2 Timothy + {"IJN", 62}, // 1 John + {"IJOHN", 62}, // 1 John + {"IKGS", 11}, // 1 Kings + {"IKINGS", 11}, // 1 Kings + {"IPETER", 60}, // 1 Peter + {"IPTR", 60}, // 1 Peter + {"ISA", 23}, // Isaiah + {"ISAIAH", 23}, // Isaiah + {"ISAMUEL", 9}, // 1 Samuel + {"ITHESSALONIANS", 52}, // 1 Thessalonians + {"ITIMOTHY", 54}, // 1 Timothy + {"J", 43}, // John + {"JAMES", 59}, // James + {"JAS", 59}, // James + {"JDGS", 7}, // Judges + {"JEREMIAH", 24}, // Jeremiah + {"JHN", 43}, // John + {"JN", 43}, // John + {"JO", 43}, // John + {"JOB", 18}, // Job + {"JOEL", 29}, // Joel + {"JOHN", 43}, // John + {"JOL", 29}, // Joel + {"JONAH", 32}, // Jonah + {"JOSHUA", 6}, // Joshua + {"JUDE", 65}, // Jude + {"JUDGES", 7}, // Judges + {"L", 42}, // Luke + {"LAMENTATIONS", 25}, // Lamentations + {"LEVITICUS", 3}, // Leviticus + {"LK", 42}, // Luke + {"LUKE", 42}, // Luke + {"MA", 40}, // Matthew + {"MALACHI", 39}, // Malachi + {"MARK", 41}, // Mark + {"MATTHEW", 40}, // Matthew + {"MICAH", 33}, // Micah + {"MK", 41}, // Mark + {"MRK", 41}, // Mark + {"MT", 40}, // Matthew + {"N", 4}, // Numbers + {"NAHUM", 34}, // Nahum + {"NAM", 34}, // Nahum + {"NEHEMIAH", 16}, // Nehemiah + {"NUMBERS", 4}, // Numbers + {"OBADIAH", 31}, // Obadiah + {"P", 19}, // Psalms + {"PHIL", 50}, // Philippians + {"PHILEMON", 57}, // Philemon + {"PHILIPPIANS", 50}, // Philippians + {"PHLM", 57}, // Philemon + {"PHM", 57}, // Philemon + {"PHP", 50}, // Philippians + {"PROVERBS", 20}, // Proverbs + {"PSALMS", 19}, // Psalms + {"PSM", 19}, // Psalms + {"PSS", 19}, // Psalms + {"QOHELETH", 21}, // Qohelet (Ecclesiastes) + {"REVELATION OF JOHN", 66}, // Revelation + {"ROMANS", 45}, // Romans + {"RUTH", 8}, // Ruth + {"SNG", 22}, // Song of Solomon + {"SOLOMON", 22}, // Song of Solomon + {"SONG OF SOLOMON", 22}, // Song of Solomon + {"SONG OF SONGS", 22}, // Song of Solomon + {"SOS", 22}, // Song of Solomon + {"TITUS", 56}, // Titus + {"ZECHARIAH", 38}, // Zechariah + {"ZEPHANIAH", 36}, // Zephaniah + {"", -1} +}; + + +/****************************************************************************** + * Maximum verses per chapter + */ + +int + VerseKey::vm[] = { + // Genesis + 31, 25, 24, 26, 32, 22, 24, 22, 29, 32, 32, 20, 18, 24, 21, 16, 27, 33, 38, + 18, 34, 24, 20, 67, 34, 35, 46, 22, 35, 43, 55, 32, 20, 31, 29, 43, 36, + 30, 23, 23, 57, 38, 34, 34, 28, 34, 31, 22, 33, 26, + // Exodus + 22, 25, 22, 31, 23, 30, 25, 32, 35, 29, 10, 51, 22, 31, 27, 36, 16, 27, 25, + 26, 36, 31, 33, 18, 40, 37, 21, 43, 46, 38, 18, 35, 23, 35, 35, 38, 29, + 31, 43, 38, + // Leviticus + 17, 16, 17, 35, 19, 30, 38, 36, 24, 20, 47, 8, 59, 57, 33, 34, 16, 30, 37, + 27, 24, 33, 44, 23, 55, 46, 34, + // Numbers + 54, 34, 51, 49, 31, 27, 89, 26, 23, 36, 35, 16, 33, 45, 41, 50, 13, 32, 22, + 29, 35, 41, 30, 25, 18, 65, 23, 31, 40, 16, 54, 42, 56, 29, 34, 13, + // Deuteronomy + 46, 37, 29, 49, 33, 25, 26, 20, 29, 22, 32, 32, 18, 29, 23, 22, 20, 22, 21, + 20, 23, 30, 25, 22, 19, 19, 26, 68, 29, 20, 30, 52, 29, 12, + // Joshua + 18, 24, 17, 24, 15, 27, 26, 35, 27, 43, 23, 24, 33, 15, 63, 10, 18, 28, 51, + 9, 45, 34, 16, 33, + // Judges + 36, 23, 31, 24, 31, 40, 25, 35, 57, 18, 40, 15, 25, 20, 20, 31, 13, 31, 30, + 48, 25, + // Ruth + 22, 23, 18, 22, + // I Samual + 28, 36, 21, 22, 12, 21, 17, 22, 27, 27, 15, 25, 23, 52, 35, 23, 58, 30, 24, + 42, 15, 23, 29, 22, 44, 25, 12, 25, 11, 31, 13, + // II Samuel + 27, 32, 39, 12, 25, 23, 29, 18, 13, 19, 27, 31, 39, 33, 37, 23, 29, 33, 43, + 26, 22, 51, 39, 25, + // I Kings + 53, 46, 28, 34, 18, 38, 51, 66, 28, 29, 43, 33, 34, 31, 34, 34, 24, 46, 21, + 43, 29, 53, + // II Kings + 18, 25, 27, 44, 27, 33, 20, 29, 37, 36, 21, 21, 25, 29, 38, 20, 41, 37, 37, + 21, 26, 20, 37, 20, 30, + // I Chronicles + 54, 55, 24, 43, 26, 81, 40, 40, 44, 14, 47, 40, 14, 17, 29, 43, 27, 17, 19, + 8, 30, 19, 32, 31, 31, 32, 34, 21, 30, + // II Chronicles + 17, 18, 17, 22, 14, 42, 22, 18, 31, 19, 23, 16, 22, 15, 19, 14, 19, 34, 11, + 37, 20, 12, 21, 27, 28, 23, 9, 27, 36, 27, 21, 33, 25, 33, 27, 23, + // Ezra + 11, 70, 13, 24, 17, 22, 28, 36, 15, 44, + // Nehemiah + 11, 20, 32, 23, 19, 19, 73, 18, 38, 39, 36, 47, 31, + // Esther + 22, 23, 15, 17, 14, 14, 10, 17, 32, 3, + // Job + 22, 13, 26, 21, 27, 30, 21, 22, 35, 22, 20, 25, 28, 22, 35, 22, 16, 21, 29, + 29, 34, 30, 17, 25, 6, 14, 23, 28, 25, 31, 40, 22, 33, 37, 16, 33, 24, 41, + 30, 24, 34, 17, + // Psalms + 6, 12, 8, 8, 12, 10, 17, 9, 20, 18, 7, 8, 6, 7, 5, 11, 15, 50, 14, 9, 13, + 31, 6, 10, 22, 12, 14, 9, 11, 12, 24, 11, 22, 22, 28, 12, 40, 22, 13, 17, + 13, 11, 5, 26, 17, 11, 9, 14, 20, 23, 19, 9, 6, 7, 23, 13, 11, 11, 17, 12, + 8, 12, 11, 10, 13, 20, 7, 35, 36, 5, 24, 20, 28, 23, 10, 12, 20, 72, 13, + 19, 16, 8, 18, 12, 13, 17, 7, 18, 52, 17, 16, 15, 5, 23, 11, 13, 12, 9, 9, + 5, 8, 28, 22, 35, 45, 48, 43, 13, 31, 7, 10, 10, 9, 8, 18, 19, 2, 29, 176, + 7, 8, 9, 4, 8, 5, 6, 5, 6, 8, 8, 3, 18, 3, 3, 21, 26, 9, 8, 24, 13, 10, 7, + 12, 15, 21, 10, 20, 14, 9, 6, + // Proverbs + 33, 22, 35, 27, 23, 35, 27, 36, 18, 32, 31, 28, 25, 35, 33, 33, 28, 24, 29, + 30, 31, 29, 35, 34, 28, 28, 27, 28, 27, 33, 31, + // Ecclesiastes + 18, 26, 22, 16, 20, 12, 29, 17, 18, 20, 10, 14, + // Song of Solomon + 17, 17, 11, 16, 16, 13, 13, 14, + // Isaiah + 31, 22, 26, 6, 30, 13, 25, 22, 21, 34, 16, 6, 22, 32, 9, 14, 14, 7, 25, 6, + 17, 25, 18, 23, 12, 21, 13, 29, 24, 33, 9, 20, 24, 17, 10, 22, 38, 22, 8, + 31, 29, 25, 28, 28, 25, 13, 15, 22, 26, 11, 23, 15, 12, 17, 13, 12, 21, + 14, 21, 22, 11, 12, 19, 12, 25, 24, + // Jeremiah + 19, 37, 25, 31, 31, 30, 34, 22, 26, 25, 23, 17, 27, 22, 21, 21, 27, 23, 15, + 18, 14, 30, 40, 10, 38, 24, 22, 17, 32, 24, 40, 44, 26, 22, 19, 32, 21, + 28, 18, 16, 18, 22, 13, 30, 5, 28, 7, 47, 39, 46, 64, 34, + // Lamentations + 22, 22, 66, 22, 22, + // Ezekiel + 28, 10, 27, 17, 17, 14, 27, 18, 11, 22, 25, 28, 23, 23, 8, 63, 24, 32, 14, + 49, 32, 31, 49, 27, 17, 21, 36, 26, 21, 26, 18, 32, 33, 31, 15, 38, 28, + 23, 29, 49, 26, 20, 27, 31, 25, 24, 23, 35, + // Daniel + 21, 49, 30, 37, 31, 28, 28, 27, 27, 21, 45, 13, + // Hosea + 11, 23, 5, 19, 15, 11, 16, 14, 17, 15, 12, 14, 16, 9, + // Joel + 20, 32, 21, + // Amos + 15, 16, 15, 13, 27, 14, 17, 14, 15, + // Obadiah + 21, + // Jonah + 17, 10, 10, 11, + // Micah + 16, 13, 12, 13, 15, 16, 20, + // Nahum + 15, 13, 19, + // Habakkuk + 17, 20, 19, + // Zephaniah + 18, 15, 20, + // Haggai + 15, 23, + // Zechariah + 21, 13, 10, 14, 11, 15, 14, 23, 17, 12, 17, 14, 9, 21, + // Malachi + 14, 17, 18, 6, + // ----------------------------------------------------------------- + // Matthew + 25, 23, 17, 25, 48, 34, 29, 34, 38, 42, 30, 50, 58, 36, 39, 28, 27, 35, 30, + 34, 46, 46, 39, 51, 46, 75, 66, 20, + // Mark + 45, 28, 35, 41, 43, 56, 37, 38, 50, 52, 33, 44, 37, 72, 47, 20, + // Luke + 80, 52, 38, 44, 39, 49, 50, 56, 62, 42, 54, 59, 35, 35, 32, 31, 37, 43, 48, + 47, 38, 71, 56, 53, + // John + 51, 25, 36, 54, 47, 71, 53, 59, 41, 42, 57, 50, 38, 31, 27, 33, 26, 40, 42, + 31, 25, + // Acts + 26, 47, 26, 37, 42, 15, 60, 40, 43, 48, 30, 25, 52, 28, 41, 40, 34, 28, 41, + 38, 40, 30, 35, 27, 27, 32, 44, 31, + // Romans + 32, 29, 31, 25, 21, 23, 25, 39, 33, 21, 36, 21, 14, 23, 33, 27, + // I Corinthians + 31, 16, 23, 21, 13, 20, 40, 13, 27, 33, 34, 31, 13, 40, 58, 24, + // II Corinthians + 24, 17, 18, 18, 21, 18, 16, 24, 15, 18, 33, 21, 14, + // Galatians + 24, 21, 29, 31, 26, 18, + // Ephesians + 23, 22, 21, 32, 33, 24, + // Philippians + 30, 30, 21, 23, + // Colossians + 29, 23, 25, 18, + // I Thessalonians + 10, 20, 13, 18, 28, + // II Thessalonians + 12, 17, 18, + // I Timothy + 20, 15, 16, 16, 25, 21, + // II Timothy + 18, 26, 17, 22, + // Titus + 16, 15, 15, + // Philemon + 25, + // Hebrews + 14, 18, 19, 16, 14, 20, 28, 13, 28, 39, 40, 29, 25, + // James + 27, 26, 18, 17, 20, + // I Peter + 25, 25, 22, 19, 14, + // II Peter + 21, 22, 18, + // I John + 10, 29, 24, 21, 21, + // II John + 13, + // III John + 14, + // Jude + 25, + // Revelation of John + 20, 29, 22, 11, 14, 17, 17, 13, 21, 11, 19, 17, 18, 20, 8, 21, 18, 24, 21, + 15, 27, 21 +}; + + +long + VerseKey::otbks[] = { + 0, 1, 52, 93, 121, 158, + 193, 218, 240, 245, 277, 302, 325, + 351, 381, 418, 429, 443, 454, 497, + 648, 680, 693, 702, 769, 822, 828, + 877, 890, 905, 909, 919, 921, 926, + 934, 938, 942, 946, 949, 964 +}; + +long + VerseKey::otcps[] = { + 0, 2, 3, 35, 61, 86, + 113, 146, 169, 194, 217, 247, 280, + 313, 334, 353, 378, 400, 417, 445, + 479, 518, 537, 572, 597, 618, 686, + 721, 757, 804, 827, 863, 907, 963, + 996, 1017, 1049, 1079, 1123, 1160, 1191, + 1215, 1239, 1297, 1336, 1371, 1406, 1435, + 1470, 1502, 1525, 1559, 1586, 1587, 1610, + 1636, 1659, 1691, 1715, 1746, 1772, 1805, + 1841, 1871, 1882, 1934, 1957, 1989, 2017, + 2054, 2071, 2099, 2125, 2152, 2189, 2221, + 2255, 2274, 2315, 2353, 2375, 2419, 2466, + 2505, 2524, 2560, 2584, 2620, 2656, 2695, + 2725, 2757, 2801, 2840, 2841, 2859, 2876, + 2894, 2930, 2950, 2981, 3020, 3057, 3082, + 3103, 3151, 3160, 3220, 3278, 3312, 3347, + 3364, 3395, 3433, 3461, 3486, 3520, 3565, + 3589, 3645, 3692, 3727, 3728, 3783, 3818, + 3870, 3920, 3952, 3980, 4070, 4097, 4121, + 4158, 4194, 4211, 4245, 4291, 4333, 4384, + 4398, 4431, 4454, 4484, 4520, 4562, 4593, + 4619, 4638, 4704, 4728, 4760, 4801, 4818, + 4873, 4916, 4973, 5003, 5038, 5052, 5053, + 5100, 5138, 5168, 5218, 5252, 5278, 5305, + 5326, 5356, 5379, 5412, 5445, 5464, 5494, + 5518, 5541, 5562, 5585, 5607, 5628, 5652, + 5683, 5709, 5732, 5752, 5772, 5799, 5868, + 5898, 5919, 5950, 6003, 6033, 6046, 6047, + 6066, 6091, 6109, 6134, 6150, 6178, 6205, + 6241, 6269, 6313, 6337, 6362, 6396, 6412, + 6476, 6487, 6506, 6535, 6587, 6597, 6643, + 6678, 6695, 6729, 6730, 6767, 6791, 6823, + 6848, 6880, 6921, 6947, 6983, 7041, 7060, + 7101, 7117, 7143, 7164, 7185, 7217, 7231, + 7263, 7294, 7343, 7369, 7370, 7393, 7417, + 7436, 7459, 7460, 7489, 7526, 7548, 7571, + 7584, 7606, 7624, 7647, 7675, 7703, 7719, + 7745, 7769, 7822, 7858, 7882, 7941, 7972, + 7997, 8040, 8056, 8080, 8110, 8133, 8178, + 8204, 8217, 8243, 8255, 8287, 8301, 8302, + 8330, 8363, 8403, 8416, 8442, 8466, 8496, + 8515, 8529, 8549, 8577, 8609, 8649, 8683, + 8721, 8745, 8775, 8809, 8853, 8880, 8903, + 8955, 8995, 9021, 9022, 9076, 9123, 9152, + 9187, 9206, 9245, 9297, 9364, 9393, 9423, + 9467, 9501, 9536, 9568, 9603, 9638, 9663, + 9710, 9732, 9776, 9806, 9860, 9861, 9880, + 9906, 9934, 9979, 10007, 10041, 10062, 10092, + 10130, 10167, 10189, 10211, 10237, 10267, 10306, + 10327, 10369, 10407, 10445, 10467, 10494, 10515, + 10553, 10574, 10605, 10606, 10661, 10717, 10742, + 10786, 10813, 10895, 10936, 10977, 11022, 11037, + 11085, 11126, 11141, 11159, 11189, 11233, 11261, + 11279, 11299, 11308, 11339, 11359, 11392, 11424, + 11456, 11489, 11524, 11546, 11577, 11578, 11596, + 11615, 11633, 11656, 11671, 11714, 11737, 11756, + 11788, 11808, 11832, 11849, 11872, 11888, 11908, + 11923, 11943, 11978, 11990, 12028, 12049, 12062, + 12084, 12112, 12141, 12165, 12175, 12203, 12240, + 12268, 12290, 12324, 12350, 12384, 12412, 12436, + 12437, 12449, 12520, 12534, 12559, 12577, 12600, + 12629, 12666, 12682, 12727, 12728, 12740, 12761, + 12794, 12818, 12838, 12858, 12932, 12951, 12990, + 13030, 13067, 13115, 13147, 13148, 13171, 13195, + 13211, 13229, 13244, 13259, 13270, 13288, 13321, + 13325, 13326, 13349, 13363, 13390, 13412, 13440, + 13471, 13493, 13516, 13552, 13575, 13596, 13622, + 13651, 13674, 13710, 13733, 13750, 13772, 13802, + 13832, 13867, 13898, 13916, 13942, 13949, 13964, + 13988, 14017, 14043, 14075, 14116, 14139, 14173, + 14211, 14228, 14262, 14287, 14329, 14360, 14385, + 14420, 14438, 14439, 14446, 14459, 14468, 14477, + 14490, 14501, 14519, 14529, 14550, 14569, 14577, + 14586, 14593, 14601, 14607, 14619, 14635, 14686, + 14701, 14711, 14725, 14757, 14764, 14775, 14798, + 14811, 14826, 14836, 14848, 14861, 14886, 14898, + 14921, 14944, 14973, 14986, 15027, 15050, 15064, + 15082, 15096, 15108, 15114, 15141, 15159, 15171, + 15181, 15196, 15217, 15241, 15261, 15271, 15278, + 15286, 15310, 15324, 15336, 15348, 15366, 15379, + 15388, 15401, 15413, 15424, 15438, 15459, 15467, + 15503, 15540, 15546, 15571, 15592, 15621, 15645, + 15656, 15669, 15690, 15763, 15777, 15797, 15814, + 15823, 15842, 15855, 15869, 15887, 15895, 15914, + 15967, 15985, 16002, 16018, 16024, 16048, 16060, + 16074, 16087, 16097, 16107, 16113, 16122, 16151, + 16174, 16210, 16256, 16305, 16349, 16363, 16395, + 16403, 16414, 16425, 16435, 16444, 16463, 16483, + 16486, 16516, 16693, 16701, 16710, 16720, 16725, + 16734, 16740, 16747, 16753, 16760, 16769, 16778, + 16782, 16801, 16805, 16809, 16831, 16858, 16868, + 16877, 16902, 16916, 16927, 16935, 16948, 16964, + 16986, 16997, 17018, 17033, 17043, 17050, 17051, + 17085, 17108, 17144, 17172, 17196, 17232, 17260, + 17297, 17316, 17349, 17381, 17410, 17436, 17472, + 17506, 17540, 17569, 17594, 17624, 17655, 17687, + 17717, 17753, 17788, 17817, 17846, 17874, 17903, + 17931, 17965, 17997, 17998, 18017, 18044, 18067, + 18084, 18105, 18118, 18148, 18166, 18185, 18206, + 18217, 18232, 18233, 18251, 18269, 18281, 18298, + 18315, 18329, 18343, 18358, 18359, 18391, 18414, + 18441, 18448, 18479, 18493, 18519, 18542, 18564, + 18599, 18616, 18623, 18646, 18679, 18689, 18704, + 18719, 18727, 18753, 18760, 18778, 18804, 18823, + 18847, 18860, 18882, 18896, 18926, 18951, 18985, + 18995, 19016, 19041, 19059, 19070, 19093, 19132, + 19155, 19164, 19196, 19226, 19252, 19281, 19310, + 19336, 19350, 19366, 19389, 19416, 19428, 19452, + 19468, 19481, 19499, 19513, 19526, 19548, 19563, + 19585, 19608, 19620, 19633, 19653, 19666, 19692, + 19717, 19718, 19738, 19776, 19802, 19834, 19866, + 19897, 19932, 19955, 19982, 20008, 20032, 20050, + 20078, 20101, 20123, 20145, 20173, 20197, 20213, + 20232, 20247, 20278, 20319, 20330, 20369, 20394, + 20417, 20435, 20468, 20493, 20534, 20579, 20606, + 20629, 20649, 20682, 20704, 20733, 20752, 20769, + 20788, 20811, 20825, 20856, 20862, 20891, 20899, + 20947, 20987, 21034, 21099, 21134, 21135, 21158, + 21181, 21248, 21271, 21294, 21295, 21324, 21335, + 21363, 21381, 21399, 21414, 21442, 21461, 21473, + 21496, 21522, 21551, 21575, 21599, 21608, 21672, + 21697, 21730, 21745, 21795, 21828, 21860, 21910, + 21938, 21956, 21978, 22015, 22042, 22064, 22091, + 22110, 22143, 22177, 22209, 22225, 22264, 22293, + 22317, 22347, 22397, 22424, 22445, 22473, 22505, + 22531, 22556, 22580, 22616, 22617, 22639, 22689, + 22720, 22758, 22790, 22819, 22848, 22876, 22904, + 22926, 22972, 22986, 22987, 22999, 23023, 23029, + 23049, 23065, 23077, 23094, 23109, 23127, 23143, + 23156, 23171, 23188, 23198, 23199, 23220, 23253, + 23275, 23276, 23292, 23309, 23325, 23339, 23367, + 23382, 23400, 23415, 23431, 23432, 23454, 23455, + 23473, 23484, 23495, 23507, 23508, 23525, 23539, + 23552, 23566, 23582, 23599, 23620, 23621, 23637, + 23651, 23671, 23672, 23690, 23711, 23731, 23732, + 23751, 23767, 23788, 23789, 23805, 23829, 23830, + 23852, 23866, 23877, 23892, 23904, 23920, 23935, + 23959, 23977, 23990, 24008, 24023, 24033, 24055, + 24056, 24071, 24089, 24108 +}; + +long + VerseKey::ntbks[] = { + 0, 1, 30, 47, 72, 94, + 123, 140, 157, 171, 178, 185, 190, + 195, 201, 205, 212, 217, 221, 223, + 237, 243, 249, 253, 259, 261, 263, + 265 +}; + +long + VerseKey::ntcps[] = { + 0, 2, 3, 29, 53, 71, + 97, 146, 181, 211, 246, 285, 328, + 359, 410, 469, 506, 546, 575, 603, + 639, 670, 705, 752, 799, 839, 891, + 938, 1014, 1081, 1102, 1103, 1149, 1178, + 1214, 1256, 1300, 1357, 1395, 1434, 1485, + 1538, 1572, 1617, 1655, 1728, 1776, 1797, + 1798, 1879, 1932, 1971, 2016, 2056, 2106, + 2157, 2214, 2277, 2320, 2375, 2435, 2471, + 2507, 2540, 2572, 2610, 2654, 2703, 2751, + 2790, 2862, 2919, 2973, 2974, 3026, 3052, + 3089, 3144, 3192, 3264, 3318, 3378, 3420, + 3463, 3521, 3572, 3611, 3643, 3671, 3705, + 3732, 3773, 3816, 3848, 3874, 3875, 3902, + 3950, 3977, 4015, 4058, 4074, 4135, 4176, + 4220, 4269, 4300, 4326, 4379, 4408, 4450, + 4491, 4526, 4555, 4597, 4636, 4677, 4708, + 4744, 4772, 4800, 4833, 4878, 4910, 4911, + 4944, 4974, 5006, 5032, 5054, 5078, 5104, + 5144, 5178, 5200, 5237, 5259, 5274, 5298, + 5332, 5360, 5361, 5393, 5410, 5434, 5456, + 5470, 5491, 5532, 5546, 5574, 5608, 5643, + 5675, 5689, 5730, 5789, 5814, 5815, 5840, + 5858, 5877, 5896, 5918, 5937, 5954, 5979, + 5995, 6014, 6048, 6070, 6085, 6086, 6111, + 6133, 6163, 6195, 6222, 6241, 6242, 6266, + 6289, 6311, 6344, 6378, 6403, 6404, 6435, + 6466, 6488, 6512, 6513, 6543, 6567, 6593, + 6612, 6613, 6624, 6645, 6659, 6678, 6707, + 6708, 6721, 6739, 6758, 6759, 6780, 6796, + 6813, 6830, 6856, 6878, 6879, 6898, 6925, + 6943, 6966, 6967, 6984, 7000, 7016, 7017, + 7043, 7044, 7059, 7078, 7098, 7115, 7130, + 7151, 7180, 7194, 7223, 7263, 7304, 7334, + 7360, 7361, 7389, 7416, 7435, 7453, 7474, + 7475, 7501, 7527, 7550, 7570, 7585, 7586, + 7608, 7631, 7650, 7651, 7662, 7692, 7717, + 7739, 7761, 7762, 7776, 7777, 7792, 7793, + 7819, 7820, 7841, 7871, 7894, 7906, 7921, + 7939, 7957, 7971, 7993, 8005, 8025, 8043, + 8062, 8083, 8092, 8114, 8133, 8158, 8180, + 8196, 8224 +}; + + +int + VerseKey::offsize[2][2] = + { {sizeof (VerseKey::otbks) / sizeof(long), sizeof (VerseKey::otcps) / sizeof(long)} +, {sizeof (VerseKey::ntbks) / sizeof(long), sizeof (VerseKey::ntcps) / sizeof(long)} +}; + diff --git a/include/cipherfil.h b/include/cipherfil.h new file mode 100644 index 0000000..cf48389 --- /dev/null +++ b/include/cipherfil.h @@ -0,0 +1,40 @@ +/*************************************************************************** + * + * $Id: cipherfil.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef CIPHERFIL_H +#define CIPHERFIL_H + +#include + +SWORD_NAMESPACE_START + +class SWCipher; + +class SWDLLEXPORT CipherFilter:public SWFilter { + SWCipher *cipher; +public: + CipherFilter(const char *key); + virtual ~CipherFilter(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule * = 0); + virtual SWCipher *getCipher(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/config.h b/include/config.h new file mode 100644 index 0000000..08b25a9 --- /dev/null +++ b/include/config.h @@ -0,0 +1,66 @@ +/* include/config.h. Generated from config.h.in by configure. */ +/* include/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `z' library (-lz). */ +#define HAVE_LIBZ 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + +/* Name of package */ +#define PACKAGE "sword" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "sword-bugs@crosswire.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "sword" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "sword 1.5.11" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "sword" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.5.11" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "1.5.11" + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef WORDS_BIGENDIAN */ diff --git a/include/config.h.in b/include/config.h.in new file mode 100644 index 0000000..9cf654f --- /dev/null +++ b/include/config.h.in @@ -0,0 +1,65 @@ +/* include/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* 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 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. */ +#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 the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + +/* Name of package */ +#undef PACKAGE + +/* 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 version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN diff --git a/include/curlftpt.h b/include/curlftpt.h new file mode 100644 index 0000000..7949814 --- /dev/null +++ b/include/curlftpt.h @@ -0,0 +1,32 @@ +#ifndef CURLFTPT_H +#define CURLFTPT_H + +#include +#include + +SWORD_NAMESPACE_START + +class CURL; + +// initialize/cleanup SYSTEMWIDE library with life of this static. +class CURLFTPTransport_init { +public: + CURLFTPTransport_init(); + ~CURLFTPTransport_init(); +}; + + +class SWDLLEXPORT CURLFTPTransport : public FTPTransport { + CURL *session; + +public: + CURLFTPTransport(const char *host, StatusReporter *statusReporter = 0); + ~CURLFTPTransport(); + + virtual char getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf = 0); +}; + + +SWORD_NAMESPACE_END + +#endif diff --git a/include/defs.h b/include/defs.h new file mode 100644 index 0000000..be04f49 --- /dev/null +++ b/include/defs.h @@ -0,0 +1,109 @@ +// ---------------------------------------------------------------------------- +// Making or using sword as a Windows DLL +// ---------------------------------------------------------------------------- +#ifndef SWORDDEFS_H +#define SWORDDEFS_H + +#ifdef NO_SWORD_NAMESPACE + #define SWORD_NAMESPACE_START namespace sword { + #define SWORD_NAMESPACE_END }; using namespace sword; +#else + #define SWORD_NAMESPACE_START namespace sword { + #define SWORD_NAMESPACE_END } +#endif + + +SWORD_NAMESPACE_START + +#ifdef _WIN32_WCE +#define SWTRY +#define SWCATCH(x) if (0) +#define GLOBCONFPATH "/Program Files/sword/sword.conf" +#else +#define SWTRY try +#define SWCATCH(x) catch (x) +#endif + +// _declspec works in BC++ 5 and later, as well as VC++ +#if defined(_MSC_VER) + +# ifdef SWMAKINGDLL +# define SWDLLEXPORT _declspec( dllexport ) +# define SWDLLEXPORT_DATA(type) _declspec( dllexport ) type +# define SWDLLEXPORT_CTORFN +# elif defined(SWUSINGDLL) +# define SWDLLEXPORT _declspec( dllimport ) +# define SWDLLEXPORT_DATA(type) _declspec( dllimport ) type +# define SWDLLEXPORT_CTORFN +# else +# define SWDLLEXPORT +# define SWDLLEXPORT_DATA(type) type +# define SWDLLEXPORT_CTORFN +# endif + +#elif defined(__SWPM__) + +# ifdef SWMAKINGDLL +# define SWDLLEXPORT _Export +# define SWDLLEXPORT_DATA(type) _Export type +# define SWDLLEXPORT_CTORFN +# elif defined(SWUSINGDLL) +# define SWDLLEXPORT _Export +# define SWDLLEXPORT_DATA(type) _Export type +# define SWDLLEXPORT_CTORFN +# else +# define SWDLLEXPORT +# define SWDLLEXPORT_DATA(type) type +# define SWDLLEXPORT_CTORFN +# endif + +#elif defined(__GNUWIN32__) + +# ifdef SWMAKINGDLL +# define SWDLLEXPORT __declspec( dllexport ) +# define SWDLLEXPORT_DATA(type) __declspec( dllexport ) type +# define SWDLLEXPORT_CTORFN +# elif defined(SWUSINGDLL) +# define SWDLLEXPORT __declspec( dllimport ) +# define SWDLLEXPORT_DATA(type) __declspec( dllimport ) type +# define SWDLLEXPORT_CTORFN +# else +# define SWDLLEXPORT +# define SWDLLEXPORT_DATA(type) type +# define SWDLLEXPORT_CTORFN +# endif + +#elif defined(__BORLANDC__) +# ifdef SWMAKINGDLL +# define SWDLLEXPORT _export +# define SWDLLEXPORT_DATA(type) __declspec( dllexport ) type +# define SWDLLEXPORT_CTORFN +# elif defined(SWUSINGDLL) +# define SWDLLEXPORT __declspec( dllimport ) +# define SWDLLEXPORT_DATA(type) __declspec( dllimport ) type +# define SWDLLEXPORT_CTORFN +# else +# define SWDLLEXPORT +# define SWDLLEXPORT_DATA(type) type +# define SWDLLEXPORT_CTORFN +# endif + +#else +# define SWDLLEXPORT +# define SWDLLEXPORT_DATA(type) type +# define SWDLLEXPORT_CTORFN +#endif + +// For ostream, istream ofstream +#if defined(__BORLANDC__) && defined( _RTLDLL ) +# define SWDLLIMPORT __import +#else +# define SWDLLIMPORT +#endif + +enum {DIRECTION_LTR = 0, DIRECTION_RTL, DIRECTION_BIDI}; +enum {FMT_UNKNOWN = 0, FMT_PLAIN, FMT_THML, FMT_GBF, FMT_HTML, FMT_HTMLHREF, FMT_RTF, FMT_OSIS, FMT_WEBIF, FMT_TEI}; +enum {ENC_UNKNOWN = 0, ENC_LATIN1, ENC_UTF8, ENC_SCSU, ENC_UTF16, ENC_RTF, ENC_HTML}; + +SWORD_NAMESPACE_END +#endif //SWORDDEFS_H diff --git a/include/echomod.h b/include/echomod.h new file mode 100644 index 0000000..c3873b4 --- /dev/null +++ b/include/echomod.h @@ -0,0 +1,41 @@ +/****************************************************************************** + * echomod.h - code for class 'EchoMod' - a test module that just echo back + * text of key. + * + * $Id: echomod.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef ECHOMOD_H +#define ECHOMOD_H + +#include +#include + + +SWORD_NAMESPACE_START + +class SWDLLEXPORT EchoMod : public SWText +{ +public: + EchoMod(); + virtual ~EchoMod(); + virtual SWBuf &getRawEntryBuf(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/encfiltmgr.h b/include/encfiltmgr.h new file mode 100644 index 0000000..1080994 --- /dev/null +++ b/include/encfiltmgr.h @@ -0,0 +1,86 @@ +/****************************************************************************** + * swencodingmgr.h - definition of class SWEncodingMgr, subclass of + * used to transcode all module text to a requested + * markup. + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef ENCFILTERMGR_H +#define ENCFILTERMGR_H + +#include + +SWORD_NAMESPACE_START + +class SWFilter; + +/** This class is like a normal SWMgr, + * but you can additonally specify which encoding + * you want to use. + */ + +class SWDLLEXPORT EncodingFilterMgr : public SWFilterMgr { + +protected: + SWFilter *latin1utf8; + SWFilter *scsuutf8; + SWFilter *targetenc; + + + /* + * current encoding value + */ + char encoding; + +public: + + + /** Constructor of SWEncodingMgr. + * + * @param encoding The desired encoding. + */ + EncodingFilterMgr (char encoding = ENC_UTF8); + + /** + * The destructor of SWEncodingMgr. + */ + ~EncodingFilterMgr(); + + /** Markup sets/gets the encoding after initialization + * + * @param enc The new encoding or ENC_UNKNOWN if you just want to get the current markup. + * @return The current (possibly changed) encoding format. + */ + char Encoding(char enc); + + /** + * Adds the raw filters which are defined in "section" to the SWModule object "module". + * @param module To this module the raw filter(s) are added + * @param section We use this section to get a list of filters we should apply to the module + */ + virtual void AddRawFilters(SWModule *module, ConfigEntMap §ion); + + /** + * Adds the encoding filters which are defined in "section" to the SWModule object "module". + * @param module To this module the encoding filter(s) are added + * @param section We use this section to get a list of filters we should apply to the module + */ + virtual void AddEncodingFilters(SWModule *module, ConfigEntMap §ion); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/entriesblk.h b/include/entriesblk.h new file mode 100644 index 0000000..833be03 --- /dev/null +++ b/include/entriesblk.h @@ -0,0 +1,34 @@ +#ifndef ENTRIESBLK_H +#define ENTRIESBLK_H + +#include +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT EntriesBlock { + static const int METAHEADERSIZE; + static const int METAENTRYSIZE; + +private: + char *block; + void setCount(int count); + void getMetaEntry(int index, unsigned long *offset, unsigned long *size); + void setMetaEntry(int index, unsigned long offset, unsigned long size); + +public: + EntriesBlock(const char *iBlock, unsigned long size); + EntriesBlock(); + ~EntriesBlock(); + + int getCount(); + int addEntry(const char *entry); + const char *getEntry(int entryIndex); + unsigned long getEntrySize(int entryIndex); + void removeEntry(int entryIndex); + const char *getRawData(unsigned long *size); +}; + + +SWORD_NAMESPACE_END +#endif diff --git a/include/femain.h b/include/femain.h new file mode 100644 index 0000000..5f4da3f --- /dev/null +++ b/include/femain.h @@ -0,0 +1,32 @@ +/* + * + * $Id: femain.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef FEMAIN_H +#define FEMAIN_H + +class FEMain +{ +public: + FEMain (); + virtual ~FEMain (); + list < SWDisplay * >displays; // so we can delete each display we create +}; + +#endif diff --git a/include/filemgr.h b/include/filemgr.h new file mode 100644 index 0000000..86b8334 --- /dev/null +++ b/include/filemgr.h @@ -0,0 +1,190 @@ +/****************************************************************************** +* filemgr.h - definition of class FileMgr used for pooling file handles +* +* $Id: filemgr.h 2108 2007-10-13 20:35:02Z scribe $ +* +* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) +* CrossWire Bible Society +* P. O. Box 2528 +* Tempe, AZ 85280-2528 +* +* 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 version 2. +* +* 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. +* +*/ + +#ifndef FILEMGR_H +#define FILEMGR_H + +#include +#include + +#include +#include +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT FileMgr; + +struct SWDLLEXPORT DirEntry { +public: + SWBuf name; + unsigned long size; + bool isDirectory; +}; +/** +* This class represents one file. It works with the FileMgr object. +*/ +class SWDLLEXPORT FileDesc { + + friend class FileMgr; + + long offset; + int fd; // -77 closed; + FileMgr *parent; + FileDesc *next; + + FileDesc(FileMgr * parent, const char *path, int mode, int perms, bool tryDowngrade); + virtual ~FileDesc(); + +public: + /** @return File handle. + */ + int getFd(); + + long seek(long offset, int whence); + long read(void *buf, long count); + long write(const void *buf, long count); + + /** Path to file. + */ + char *path; + /** File access mode. + */ + int mode; + /** File permissions. + */ + int perms; + /** + */ + bool tryDowngrade; +}; + +/** +* This class ist used make file access operations easier. +* It keeps a list of all open files internally and closes them +* when the destructor is called. +*/ +class SWDLLEXPORT FileMgr : public SWCacher { + + friend class FileDesc; + friend class __staticsystemFileMgr; + + FileDesc *files; + int sysOpen(FileDesc * file); +protected: + static FileMgr *systemFileMgr; +public: + static int CREAT; + static int APPEND; + static int TRUNC; + static int RDONLY; + static int RDWR; + static int WRONLY; + static int IREAD; + static int IWRITE; + + /** Maximum number of open files set in the constructor. + * determines the max number of real system files that + * filemgr will open. Adjust for tuning. + */ + int maxFiles; + + static FileMgr *getSystemFileMgr(); + static void setSystemFileMgr(FileMgr *newFileMgr); + + /** Constructor. + * @param maxFiles The number of files that this FileMgr may open in parallel, if necessary. + */ + FileMgr(int maxFiles = 35); + + /** + * Destructor. Clean things up. Will close all files opened by this FileMgr object. + */ + ~FileMgr(); + + /** Open a file and return a FileDesc for it. + * The file itself will only be opened when FileDesc::getFd() is called. + * @param path Filename. + * @param mode File access mode. + * @param tryDowngrade + * @return FileDesc object for the requested file. + */ + FileDesc *open(const char *path, int mode, bool tryDowngrade); + + /** Open a file and return a FileDesc for it. + * The file itself will only be opened when FileDesc::getFd() is called. + * @param path Filename. + * @param mode File access mode. + * @param perms Permissions. + * @param tryDowngrade + * @return FileDesc object for the requested file. + */ + FileDesc *open(const char *path, int mode, int perms = IREAD | IWRITE, bool tryDowngrade = false); + + /** Close a given file and delete its FileDesc object. + * Will only close the file if it was created by this FileMgr object. + * @param file The file to close. + */ + void close(FileDesc * file); + + /** Cacher methods overridden + */ + virtual void flush(); + virtual long resourceConsumption(); + + /** Checks for the existence of a file. + * @param ipath Path to file. + * @param ifileName Name of file to check for. + */ + static signed char existsFile(const char *ipath, const char *ifileName = 0); + + /** Checks for the existence of a directory. + * @param ipath Path to directory. + * @param idirName Name of directory to check for. + */ + static signed char existsDir(const char *ipath, const char *idirName = 0); + + /** Truncate a file at its current position + * leaving byte at current possition intact deleting everything afterward. + * @param file The file to operate on. + */ + signed char trunc(FileDesc *file); + + static char isDirectory(const char *path); + static int createParent(const char *pName); + static int createPathAndFile(const char *fName); + + /** attempts to open a file readonly + * @param fName filename to open + * @return fd; < 0 = error + */ + static int openFileReadOnly(const char *fName); + static int copyFile(const char *srcFile, const char *destFile); + static int copyDir(const char *srcDir, const char *destDir); + static int removeDir(const char *targetDir); + static int removeFile(const char *fName); + static char getLine(FileDesc *fDesc, SWBuf &line); + +}; + + +SWORD_NAMESPACE_END +#endif diff --git a/include/flatapi.h b/include/flatapi.h new file mode 100644 index 0000000..51cdeea --- /dev/null +++ b/include/flatapi.h @@ -0,0 +1,106 @@ +/****************************************************************************** + * swordapi.h - This file contains an api usable by non-C++ + * environments + * + * $Id: flatapi.h 2152 2008-05-04 03:52:06Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWORDAPI_H +#define SWORDAPI_H + +#include +#include +#ifdef __cplusplus +#endif + +extern "C" { + +#define SWHANDLE intptr_t + + +//----------------------------------------------------------------- +// stringlist_iterator methods + +void SWDLLEXPORT stringlist_iterator_next(SWHANDLE hsli); +const char * SWDLLEXPORT stringlist_iterator_val(SWHANDLE hsli); + +//----------------------------------------------------------------- +// listkey_iterator methods + +void SWDLLEXPORT listkey_iterator_next(SWHANDLE lki); +const char * SWDLLEXPORT listkey_iterator_val(SWHANDLE hsli); + +//----------------------------------------------------------------- +// modmap methods +// +void SWDLLEXPORT ModList_iterator_next(SWHANDLE hmmi); +SWHANDLE SWDLLEXPORT ModList_iterator_val(SWHANDLE hmmi); + + +//----------------------------------------------------------------- +// SWMgr methods +// +SWHANDLE SWDLLEXPORT SWMgr_new(char filterType); +// SWConfig *, SWConfig *, bool, SWFilterMgr * +SWHANDLE SWDLLEXPORT SWMgr_newEx(SWHANDLE hiconfig, SWHANDLE hisysconfig, char autoload, SWHANDLE hfilterMgr); +void SWDLLEXPORT SWMgr_delete(SWHANDLE hmgr); +SWHANDLE SWDLLEXPORT SWMgr_getConfig(SWHANDLE hmgr); +SWHANDLE SWDLLEXPORT SWMgr_getModulesIterator(SWHANDLE hmgr); +SWHANDLE SWDLLEXPORT SWMgr_getModuleByName(SWHANDLE hmgr, const char *name); +const char * SWDLLEXPORT SWMgr_getPrefixPath(SWHANDLE hmgr); +const char * SWDLLEXPORT SWMgr_getConfigPath(SWHANDLE hmgr); +void SWDLLEXPORT SWMgr_setGlobalOption(SWHANDLE hmgr, const char *option, const char *value); +const char * SWDLLEXPORT SWMgr_getGlobalOption(SWHANDLE hmgr, const char *option); +const char * SWDLLEXPORT SWMgr_getGlobalOptionTip(SWHANDLE hmgr, const char *option); +// ret: forward_iterator +SWHANDLE SWDLLEXPORT SWMgr_getGlobalOptionsIterator(SWHANDLE hmgr); +// ret: forward_iterator +SWHANDLE SWDLLEXPORT SWMgr_getGlobalOptionValuesIterator(SWHANDLE hmgr, const char *option); +void SWDLLEXPORT SWMgr_setCipherKey(SWHANDLE hmgr, const char *modName, const char *key); + + +//----------------------------------------------------------------- +// SWModule methods + +void SWDLLEXPORT SWModule_terminateSearch(SWHANDLE hmodule); +SWHANDLE SWDLLEXPORT SWModule_doSearch(SWHANDLE hmodule, const char *searchString, int type, int params, void (*percent) (char, void *), void *percentUserData); +char SWDLLEXPORT SWModule_error(SWHANDLE hmodule); +int SWDLLEXPORT SWModule_getEntrySize(SWHANDLE hmodule); +void SWDLLEXPORT SWModule_setKeyText(SWHANDLE hmodule, const char *key); +const char * SWDLLEXPORT SWModule_getKeyText(SWHANDLE hmodule); +const char * SWDLLEXPORT SWModule_getName(SWHANDLE hmodule); +const char * SWDLLEXPORT SWModule_getDescription(SWHANDLE hmodule); +const char * SWDLLEXPORT SWModule_getType(SWHANDLE hmodule); +void SWDLLEXPORT SWModule_previous(SWHANDLE hmodule); +void SWDLLEXPORT SWModule_next(SWHANDLE hmodule); +void SWDLLEXPORT SWModule_begin(SWHANDLE hmodule); +const char * SWDLLEXPORT SWModule_getStripText(SWHANDLE hmodule); +const char * SWDLLEXPORT SWModule_getRenderText(SWHANDLE hmodule); +const char * SWDLLEXPORT SWModule_getEntryAttributes(SWHANDLE hmodule, const char *level1, const char *level2, const char *level3); +const char * SWDLLEXPORT SWModule_getPreverseHeader(SWHANDLE hmodule, const char *key, int pvHeading); +const char * SWDLLEXPORT SWModule_getFootnoteType(SWHANDLE hmodule, const char *key, const char *note); +const char * SWDLLEXPORT SWModule_getFootnoteBody(SWHANDLE hmodule, const char *key, const char *note); +const char * SWDLLEXPORT SWModule_getFootnoteRefList(SWHANDLE hmodule, const char *key, const char *note); + +SWHANDLE SWDLLEXPORT listkey_getVerselistIterator(const char * list, const char * key); + +} +#ifdef __cplusplus +#endif + +#endif diff --git a/include/ftplib.h b/include/ftplib.h new file mode 100644 index 0000000..75a90ae --- /dev/null +++ b/include/ftplib.h @@ -0,0 +1,124 @@ +/***************************************************************************/ +/* ftplib.h - header file for callable ftp access routines */ +/* Copyright (C) 1996, 1997 Thomas Pfau, pfau@cnj.digex.net */ +/* 73 Catherine Street, South Bound Brook, NJ, 08880 */ +/* */ +/* This library is free software; you can redistribute it and/or */ +/* modify it under the terms of the GNU Library General Public */ +/* License as published by the Free Software Foundation; either */ +/* version 2 of the License, or (at your option) any later version. */ +/* */ +/* This library 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 */ +/* Library General Public License for more details. */ +/* */ +/* You should have received a copy of the GNU Library General Public */ +/* License along with this progam; if not, write to the */ +/* Free Software Foundation, Inc., 59 Temple Place - Suite 330, */ +/* Boston, MA 02111-1307, USA. */ +/* */ +/***************************************************************************/ + +#if !defined(__FTPLIB_H) +#define __FTPLIB_H + +#if defined(__unix__) || defined(VMS) +#define GLOBALDEF +#define GLOBALREF extern +#elif defined(_WIN32) +#if defined BUILDING_LIBRARY +#define GLOBALDEF __declspec(dllexport) +#define GLOBALREF __declspec(dllexport) +#else +#define GLOBALREF __declspec(dllimport) +#endif +#endif + +/* FtpAccess() type codes */ +#define FTPLIB_DIR 1 +#define FTPLIB_DIR_VERBOSE 2 +#define FTPLIB_FILE_READ 3 +#define FTPLIB_FILE_WRITE 4 + +/* FtpAccess() mode codes */ +#define FTPLIB_ASCII 'A' +#define FTPLIB_IMAGE 'I' +#define FTPLIB_TEXT FTPLIB_ASCII +#define FTPLIB_BINARY FTPLIB_IMAGE + +/* connection modes */ +#define FTPLIB_PASSIVE 1 +#define FTPLIB_PORT 2 + +/* connection option names */ +#define FTPLIB_CONNMODE 1 +#define FTPLIB_CALLBACK 2 +#define FTPLIB_IDLETIME 3 +#define FTPLIB_CALLBACKARG 4 +#define FTPLIB_CALLBACKBYTES 5 + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct NetBuf netbuf; +typedef int (*FtpCallback)(netbuf *nControl, int xfered, void *arg); + +/* v1 compatibility stuff */ +#if !defined(_FTPLIB_NO_COMPAT) +netbuf *DefaultNetbuf; + +#define ftplib_lastresp FtpLastResponse(DefaultNetbuf) +#define ftpInit FtpInit +#define ftpOpen(x) FtpConnect(x, &DefaultNetbuf) +#define ftpLogin(x,y) FtpLogin(x, y, DefaultNetbuf) +#define ftpSite(x) FtpSite(x, DefaultNetbuf) +#define ftpMkdir(x) FtpMkdir(x, DefaultNetbuf) +#define ftpChdir(x) FtpChdir(x, DefaultNetbuf) +#define ftpRmdir(x) FtpRmdir(x, DefaultNetbuf) +#define ftpNlst(x, y) FtpNlst(x, y, DefaultNetbuf) +#define ftpDir(x, y) FtpDir(x, y, DefaultNetbuf) +#define ftpGet(x, y, z) FtpGet(x, y, z, DefaultNetbuf) +#define ftpPut(x, y, z) FtpPut(x, y, z, DefaultNetbuf) +#define ftpRename(x, y) FtpRename(x, y, DefaultNetbuf) +#define ftpDelete(x) FtpDelete(x, DefaultNetbuf) +#define ftpQuit() FtpQuit(DefaultNetbuf) +#endif /* (_FTPLIB_NO_COMPAT) */ +/* end v1 compatibility stuff */ + +GLOBALREF int ftplib_debug; +GLOBALREF void FtpInit(void); +GLOBALREF char *FtpLastResponse(netbuf *nControl); +GLOBALREF int FtpConnect(const char *host, netbuf **nControl); +GLOBALREF int FtpOptions(int opt, long val, netbuf *nControl); +GLOBALREF int FtpLogin(const char *user, const char *pass, netbuf *nControl); +GLOBALREF int FtpAccess(const char *path, int typ, int mode, netbuf *nControl, + netbuf **nData); +GLOBALREF int FtpRead(void *buf, int max, netbuf *nData); +GLOBALREF int FtpWrite(void *buf, int len, netbuf *nData); +GLOBALREF int FtpClose(netbuf *nData); +GLOBALREF int FtpSite(const char *cmd, netbuf *nControl); +GLOBALREF int FtpSysType(char *buf, int max, netbuf *nControl); +GLOBALREF int FtpMkdir(const char *path, netbuf *nControl); +GLOBALREF int FtpChdir(const char *path, netbuf *nControl); +GLOBALREF int FtpCDUp(netbuf *nControl); +GLOBALREF int FtpRmdir(const char *path, netbuf *nControl); +GLOBALREF int FtpPwd(char *path, int max, netbuf *nControl); +GLOBALREF int FtpNlst(const char *output, const char *path, netbuf *nControl); +GLOBALREF int FtpDir(const char *output, const char *path, netbuf *nControl); +GLOBALREF int FtpSize(const char *path, int *size, char mode, netbuf *nControl); +GLOBALREF int FtpModDate(const char *path, char *dt, int max, netbuf *nControl); +GLOBALREF int FtpGet(const char *output, const char *path, char mode, + netbuf *nControl); +GLOBALREF int FtpPut(const char *input, const char *path, char mode, + netbuf *nControl); +GLOBALREF int FtpRename(const char *src, const char *dst, netbuf *nControl); +GLOBALREF int FtpDelete(const char *fnm, netbuf *nControl); +GLOBALREF void FtpQuit(netbuf *nControl); + +#ifdef __cplusplus +}; +#endif + +#endif /* __FTPLIB_H */ diff --git a/include/ftplibftpt.h b/include/ftplibftpt.h new file mode 100644 index 0000000..7aa9e13 --- /dev/null +++ b/include/ftplibftpt.h @@ -0,0 +1,34 @@ +#ifndef FTPLIBFTPT_H +#define FTPLIBFTPT_H + +#include +#include + +typedef struct NetBuf netbuf; + +SWORD_NAMESPACE_START + + +// initialize/cleanup SYSTEMWIDE library with life of this static. +class FTPLibFTPTransport_init { +public: + FTPLibFTPTransport_init(); + ~FTPLibFTPTransport_init(); +}; + + +class SWDLLEXPORT FTPLibFTPTransport : public FTPTransport { + netbuf *ftpConnection; + + char assureLoggedIn(); + +public: + FTPLibFTPTransport(const char *host, StatusReporter *statusReporter = 0); + ~FTPLibFTPTransport(); + char getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf = 0); +}; + + +SWORD_NAMESPACE_END + +#endif diff --git a/include/ftpparse.h b/include/ftpparse.h new file mode 100644 index 0000000..3da3c1b --- /dev/null +++ b/include/ftpparse.h @@ -0,0 +1,53 @@ +#ifndef FTPPARSE_H +#define FTPPARSE_H + +#include + +/* +ftpparse(&fp,buf,len) tries to parse one line of LIST output. + +The line is an array of len characters stored in buf. +It should not include the terminating CR LF; so buf[len] is typically CR. + +If ftpparse() can't find a filename, it returns 0. + +If ftpparse() can find a filename, it fills in fp and returns 1. +fp is a struct ftpparse, defined below. +The name is an array of fp.namelen characters stored in fp.name; +fp.name points somewhere within buf. +*/ + +struct ftpparse { + char *name; /* not necessarily 0-terminated */ + int namelen; + int flagtrycwd; /* 0 if cwd is definitely pointless, 1 otherwise */ + int flagtryretr; /* 0 if retr is definitely pointless, 1 otherwise */ + int sizetype; + long size; /* number of octets */ + int mtimetype; + time_t mtime; /* modification time */ + int idtype; + char *id; /* not necessarily 0-terminated */ + int idlen; +} ; + +#define FTPPARSE_SIZE_UNKNOWN 0 +#define FTPPARSE_SIZE_BINARY 1 /* size is the number of octets in TYPE I */ +#define FTPPARSE_SIZE_ASCII 2 /* size is the number of octets in TYPE A */ + +#define FTPPARSE_MTIME_UNKNOWN 0 +#define FTPPARSE_MTIME_LOCAL 1 /* time is correct */ +#define FTPPARSE_MTIME_REMOTEMINUTE 2 /* time zone and secs are unknown */ +#define FTPPARSE_MTIME_REMOTEDAY 3 /* time zone and time of day are unknown */ +/* +When a time zone is unknown, it is assumed to be GMT. You may want +to use localtime() for LOCAL times, along with an indication that the +time is correct in the local time zone, and gmtime() for REMOTE* times. +*/ + +#define FTPPARSE_ID_UNKNOWN 0 +#define FTPPARSE_ID_FULL 1 /* unique identifier for files on this FTP server */ + +extern int ftpparse(struct ftpparse *,char *,int); + +#endif diff --git a/include/ftptrans.h b/include/ftptrans.h new file mode 100644 index 0000000..c6a025a --- /dev/null +++ b/include/ftptrans.h @@ -0,0 +1,64 @@ +#ifndef FTPTRANS_H +#define FTPTRANS_H + +#include +#include +#include + +//SWORD_NAMESPACE_START + + +// move this include to cpp once struct ftpparse isn't exposed anymore +extern "C" { +#include +} + +SWORD_NAMESPACE_START + +/** Class for reporting status +*/ +class SWDLLEXPORT StatusReporter { +public: + virtual ~StatusReporter() {}; + /** Messages before stages of a batch download */ + virtual void preStatus(long totalBytes, long completedBytes, const char *message); + + /** frequently called throughout a download, to report status */ + virtual void statusUpdate(double dtTotal, double dlNow); +}; + + +/** TODO: document +* A base class to be used for reimplementation of network services. +*/ +class SWDLLEXPORT FTPTransport { + +protected: + StatusReporter *statusReporter; + bool passive; + bool term; + SWBuf host; + +public: + FTPTransport(const char *host, StatusReporter *statusReporter = 0); + virtual ~FTPTransport(); + + /*********** + * override this method in your real impl + * + * if destBuf then write to buffer instead of file + */ + virtual char getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf = 0); + + + int copyDirectory(const char *urlPrefix, const char *dir, const char *dest, const char *suffix); + + virtual std::vector getDirList(const char *dirURL); + void setPassive(bool passive) { this->passive = passive; } + void terminate() { term = true; } +}; + + +SWORD_NAMESPACE_END + +#endif diff --git a/include/gbffootnotes.h b/include/gbffootnotes.h new file mode 100644 index 0000000..22ca18f --- /dev/null +++ b/include/gbffootnotes.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * + * $Id: gbffootnotes.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFFOOTNOTES_H +#define GBFFOOTNOTES_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides footnotes in a GBF text + */ +class SWDLLEXPORT GBFFootnotes : public SWOptionFilter { +public: + GBFFootnotes(); + virtual ~GBFFootnotes(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfheadings.h b/include/gbfheadings.h new file mode 100644 index 0000000..b847f79 --- /dev/null +++ b/include/gbfheadings.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * + * $Id: gbfheadings.h 2068 2007-08-31 06:40:23Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFHEADINGS_H +#define GBFHEADINGS_H + +#include + +SWORD_NAMESPACE_START + + /** This Filter shows/hides headings in a GBF text + */ +class SWDLLEXPORT GBFHeadings : public SWOptionFilter { +public: + GBFHeadings(); + virtual ~GBFHeadings(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfhtml.h b/include/gbfhtml.h new file mode 100644 index 0000000..5879d8e --- /dev/null +++ b/include/gbfhtml.h @@ -0,0 +1,46 @@ +/****************************************************************************** + * + * $Id: gbfhtml.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFHTML_H +#define GBFHTML_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts GBF text to HTML text + */ +class SWDLLEXPORT GBFHTML : public SWBasicFilter { +protected: + class MyUserData : public BasicFilterUserData { + public: + MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {} + bool hasFootnotePreTag; + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + GBFHTML(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfhtmlhref.h b/include/gbfhtmlhref.h new file mode 100644 index 0000000..0c849ad --- /dev/null +++ b/include/gbfhtmlhref.h @@ -0,0 +1,47 @@ +/****************************************************************************** + * + * $Id: gbfhtmlhref.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFHTMLHREF_H +#define GBFHTMLHREF_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts GBF text to HTML text with hrefs + */ +class SWDLLEXPORT GBFHTMLHREF : public SWBasicFilter { +protected: + class MyUserData : public BasicFilterUserData { + public: + MyUserData(const SWModule *module, const SWKey *key); + bool hasFootnotePreTag; + SWBuf version; + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + GBFHTMLHREF(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfmorph.h b/include/gbfmorph.h new file mode 100644 index 0000000..87e5b78 --- /dev/null +++ b/include/gbfmorph.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * + * $Id: gbfmorph.h 2068 2007-08-31 06:40:23Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFMORPH_H +#define GBFMORPH_H + +#include + +SWORD_NAMESPACE_START + + /** This Filter shows/hides morph tags in a GBF text + */ +class SWDLLEXPORT GBFMorph : public SWOptionFilter { +public: + GBFMorph(); + virtual ~GBFMorph(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfosis.h b/include/gbfosis.h new file mode 100644 index 0000000..edcbc87 --- /dev/null +++ b/include/gbfosis.h @@ -0,0 +1,68 @@ +/*************************************************************************** + * + * $Id: gbfosis.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFOSIS_H +#define GBFOSIS_H + +#include +#include +#include + +SWORD_NAMESPACE_START + + +class SWDLLEXPORT QuoteStack { +private: + class QuoteInstance { + public: + char startChar; + char level; + SWBuf uniqueID; + char continueCount; + QuoteInstance(char startChar = '\"', char level = 1, SWBuf uniqueID = "", char continueCount = 0) { + this->startChar = startChar; + this->level = level; + this->uniqueID = uniqueID; + this->continueCount = continueCount; + } + void pushStartStream(SWBuf &text); + }; + + typedef std::stack QuoteInstanceStack; + QuoteInstanceStack quotes; +public: + QuoteStack(); + virtual ~QuoteStack(); + void handleQuote(char *buf, char *quotePos, SWBuf &text); + void clear(); + bool empty() { return quotes.empty(); } +}; + +/** this filter converts GBF text to OSIS text + */ +class SWDLLEXPORT GBFOSIS : public SWFilter { +public: + GBFOSIS(); + virtual ~GBFOSIS(); + char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif /* THMLOSIS_H */ diff --git a/include/gbfplain.h b/include/gbfplain.h new file mode 100644 index 0000000..3ac9f98 --- /dev/null +++ b/include/gbfplain.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * + * $Id: gbfplain.h 2068 2007-08-31 06:40:23Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFPLAIN_H +#define GBFPLAIN_H + +#include + +SWORD_NAMESPACE_START + + /** This filter converts GBF text to plain text + */ +class SWDLLEXPORT GBFPlain : public SWFilter { +public: + GBFPlain(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfredletterwords.h b/include/gbfredletterwords.h new file mode 100644 index 0000000..26941b8 --- /dev/null +++ b/include/gbfredletterwords.h @@ -0,0 +1,40 @@ +/*************************************************************************** + * + * $Id: gbfredletterwords.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFSREDLETTERWORDS_H +#define GBFREDLETTERWORDS_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides "red letter tags" (marking the + * words of Jesus) in a GBF text. Turn this off if you don't want + * to have this kind of markup in the text. + */ +class SWDLLEXPORT GBFRedLetterWords : public SWOptionFilter { +public: + GBFRedLetterWords(); + virtual ~GBFRedLetterWords(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfrtf.h b/include/gbfrtf.h new file mode 100644 index 0000000..907dfbd --- /dev/null +++ b/include/gbfrtf.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * + * $Id: gbfrtf.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFRTF_H +#define GBFRTF_H + +#include + +SWORD_NAMESPACE_START + +/** This filter converts GBF text into RTF text + */ +class SWDLLEXPORT GBFRTF : public SWFilter { +public: + GBFRTF(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfstrongs.h b/include/gbfstrongs.h new file mode 100644 index 0000000..0d08eb2 --- /dev/null +++ b/include/gbfstrongs.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * + * $Id: gbfstrongs.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFSTRONGS_H +#define GBFSTRONGS_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides strong's numbers in a GBF text + */ +class SWDLLEXPORT GBFStrongs : public SWOptionFilter { +public: + GBFStrongs(); + virtual ~GBFStrongs(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfthml.h b/include/gbfthml.h new file mode 100644 index 0000000..0c650ab --- /dev/null +++ b/include/gbfthml.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * + * $Id: gbfthml.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFTHML_H +#define GBFTHML_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts GBF text into ThML text + */ +class SWDLLEXPORT GBFThML : public SWFilter { +public: + GBFThML(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfwebif.h b/include/gbfwebif.h new file mode 100644 index 0000000..ae96f92 --- /dev/null +++ b/include/gbfwebif.h @@ -0,0 +1,41 @@ +/****************************************************************************** + * + * $Id: gbfwebif.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFWEBIF_H +#define GBFWEBIF_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts GBF text to HTML text with hrefs + */ +class SWDLLEXPORT GBFWEBIF : public GBFHTMLHREF { + const SWBuf baseURL; + const SWBuf passageStudyURL; + +protected: + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + GBFWEBIF(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/gbfwordjs.h b/include/gbfwordjs.h new file mode 100644 index 0000000..5f31d29 --- /dev/null +++ b/include/gbfwordjs.h @@ -0,0 +1,52 @@ +/*************************************************************************** + * + * $Id: gbfwordjs.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GBFWORDSJS_H +#define GBFWORDSJS_H + +#include + +SWORD_NAMESPACE_START + +class SWMgr; + /** This Filter shows/hides strong's numbers in a GBF text + */ +class SWDLLEXPORT GBFWordJS : public SWOptionFilter { + SWModule *defaultGreekLex; + SWModule *defaultHebLex; + SWModule *defaultGreekParse; + SWModule *defaultHebParse; + SWMgr *mgr; + +public: + GBFWordJS(); + virtual ~GBFWordJS(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); + void setDefaultModules(SWModule *defaultGreekLex = 0, SWModule *defaultHebLex = 0, SWModule *defaultGreekParse = 0, SWModule *defaultHebParse = 0) { + this->defaultGreekLex = defaultGreekLex; + this->defaultHebLex = defaultHebLex; + this->defaultGreekParse = defaultGreekParse; + this->defaultHebParse = defaultHebParse; + } + void setMgr(SWMgr *mgr) { this->mgr = mgr; } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/greeklexattribs.h b/include/greeklexattribs.h new file mode 100644 index 0000000..8dfb7d6 --- /dev/null +++ b/include/greeklexattribs.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * + * $Id: greeklexattribs.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef GREEKLEXATTRIBS_H +#define GREEKLEXATTRIBS_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts ThML text to plain text + */ +class SWDLLEXPORT GreekLexAttribs : public SWOptionFilter { +public: + GreekLexAttribs(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/hebrewmcim.h b/include/hebrewmcim.h new file mode 100644 index 0000000..3c9aa63 --- /dev/null +++ b/include/hebrewmcim.h @@ -0,0 +1,32 @@ +#ifndef HEBREWMCIM_H +#define HEBREWMCIM_H + +/** + * Title: Keyboard mapping for Michigan-Claremont Hebrew input + * Description: + * Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL + * Company: + * @author Troy A. Griffitts + * @version 1.0 + */ + +#include +#include +#include +SWORD_NAMESPACE_START + + +class SWDLLEXPORT HebrewMCIM : public SWInputMethod { + + void init(); + int subst[255]; + map subst2[12]; + map multiChars; + +public: + HebrewMCIM(); + int *translate(char in); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/hrefcom.h b/include/hrefcom.h new file mode 100644 index 0000000..83d71e6 --- /dev/null +++ b/include/hrefcom.h @@ -0,0 +1,52 @@ +/****************************************************************************** + * hrefcom.h - code for class 'HREFCom'- a module that produces HTML HREFs + * pointing to actual text desired. Uses standard + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * + * $Id: hrefcom.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef HREFCOM_H +#define HREFCOM_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT HREFCom:public RawVerse, public SWCom { + char *prefix; + +public: + + + HREFCom(const char *ipath, const char *prefix, const char *iname = 0, + const char *idesc = 0, SWDisplay * idisp = 0); + virtual ~HREFCom(); + virtual SWBuf &getRawEntryBuf(); + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/installmgr.h b/include/installmgr.h new file mode 100644 index 0000000..f4d48e9 --- /dev/null +++ b/include/installmgr.h @@ -0,0 +1,105 @@ +#ifndef INSTALLMGR_H +#define INSTALLMGR_H + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +class SWMgr; +class SWModule; +class SWConfig; +class FTPTransport; +class StatusReporter; + +/** TODO: document +*/ +class SWDLLEXPORT InstallSource { + SWMgr *mgr; +public: + InstallSource(const char *type, const char *confEnt = 0); + virtual ~InstallSource(); + SWBuf getConfEnt() { + return caption +"|" + source + "|" + directory; + } + SWBuf type; + SWBuf source; + SWBuf directory; + SWBuf caption; + SWBuf localShadow; + void *userData; + SWMgr *getMgr(); + void flush(); +}; + +typedef std::map InstallSourceMap; + +/** TODO: document +*/ +class SWDLLEXPORT InstallMgr { + +protected: + std::set defaultMods; + char *privatePath; + StatusReporter *statusReporter; + bool passive; + + // override this method and provide your own custom FTPTransport subclass + virtual FTPTransport *createFTPTransport(const char *host, StatusReporter *statusReporter); + + // we have a transport member to set as current running transport so we + // can ask it to terminate below, if user requests + FTPTransport *transport; + +public: + + static const int MODSTAT_OLDER; + static const int MODSTAT_SAMEVERSION; + static const int MODSTAT_UPDATED; + static const int MODSTAT_NEW; + static const int MODSTAT_CIPHERED; + static const int MODSTAT_CIPHERKEYPRESENT; + + SWConfig *installConf; + InstallSourceMap sources; + bool term; + + InstallMgr(const char *privatePath = "./", StatusReporter *statusReporter = 0); + virtual ~InstallMgr(); + + virtual int removeModule(SWMgr *manager, const char *modName); + virtual int ftpCopy(InstallSource *is, const char *src, const char *dest, bool dirTransfer = false, const char *suffix = ""); + virtual int installModule(SWMgr *destMgr, const char *fromLocation, const char *modName, InstallSource *is = 0); + + virtual int refreshRemoteSource(InstallSource *is); + virtual bool getCipherCode(const char *modName, SWConfig *config); + void setFTPPassive(bool passive) { this->passive = passive; } + void terminate(); + + /************************************************************************ + * getModuleStatus - compare the modules of two SWMgrs and return a + * vector describing the status of each. See MODSTAT_* + */ + static std::map getModuleStatus(const SWMgr &base, const SWMgr &other); + + /************************************************************************ + * isDefaultModule - allows an installation to provide a set of modules + * in installMgr.conf like: + * [General] + * DefaultMod=KJV + * DefaultMod=StrongsGreek + * DefaultMod=Personal + * This method allows a user interface to ask if a module is specified + * as a default in the above way. The logic is, if no modules are + * installed then all default modules should be automatically selected for install + * to help the user select a basic foundation of useful modules + */ + bool isDefaultModule(const char *modName); +}; + + +SWORD_NAMESPACE_END + +#endif diff --git a/include/latin1utf16.h b/include/latin1utf16.h new file mode 100644 index 0000000..582a89b --- /dev/null +++ b/include/latin1utf16.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * + * $Id: latin1utf16.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef LATIN1UTF16_H +#define LATIN1UTF16_H + +#include + +SWORD_NAMESPACE_START + +/** This filter converts Latin-1 encoded text to UTF-16 + */ +class SWDLLEXPORT Latin1UTF16 : public SWFilter { +public: + Latin1UTF16(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/latin1utf8.h b/include/latin1utf8.h new file mode 100644 index 0000000..1de302d --- /dev/null +++ b/include/latin1utf8.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * + * $Id: latin1utf8.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef LATIN1UTF8_H +#define LATIN1UTF8_H + +#include + +SWORD_NAMESPACE_START + +/** This filter converts Latin-1 encoded text to UTF-8 + */ +class SWDLLEXPORT Latin1UTF8 : public SWFilter { +public: + Latin1UTF8(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/listkey.h b/include/listkey.h new file mode 100644 index 0000000..e939248 --- /dev/null +++ b/include/listkey.h @@ -0,0 +1,144 @@ +/****************************************************************************** + * listkey.h - code for base class 'listkey'. listkey is the basis for all + * types of keys for indexing into modules + * (e.g. verse, word, + * place, etc.) + * + * $Id: listkey.h 1958 2006-08-22 00:15:10Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWLSTKEY_H +#define SWLSTKEY_H + +#include + +#include + +SWORD_NAMESPACE_START + + /** ListKey is the basis for all + * types of keys that have lists of specified indexes + * (e.g. a list of verses, place, etc.) + */ +class SWDLLEXPORT ListKey : public SWKey { + + static SWClass classdef; + void init(); + +protected: + int arraypos; + int arraymax; + int arraycnt; + SWKey **array; + +public: + + /** initializes instance of ListKey + * + * @param ikey text key + */ + ListKey(const char *ikey = 0); + ListKey(ListKey const &k); + + /** cleans up instance of ListKey + */ + virtual ~ListKey(); + + virtual SWKey *clone() const; + + /** Clears out elements of list + */ + virtual void clear(); + + /** deprecated, use clear(), instead + */ + virtual void ClearList() { clear(); } + + /** Returns number of elements in list + * @return number of elements in list + */ + virtual int Count(); + + /** Removes current element from list + */ + virtual void Remove(); + + /** Sets key to element number + * + * @param ielement element number to set to + * @return error status + */ + virtual char SetToElement(int ielement, SW_POSITION = TOP); + + /** Gets a key element number + * + * @param pos element number to get (or default current) + * @return Key or null on error + */ + virtual SWKey *getElement(int pos = -1); + + // deprecated, use above function + virtual SWKey *GetElement(int pos = -1) { return getElement(pos); } + + /** Adds an element to the list + * @param ikey the element to add + */ + ListKey & operator <<(const SWKey &ikey) { add(ikey); return *this; } + virtual void add(const SWKey &ikey); + + /** Equates this ListKey to another ListKey object + * + * @param ikey other ListKey object + */ + virtual void copyFrom(const ListKey & ikey); + virtual void copyFrom(const SWKey & ikey) { SWKey::copyFrom(ikey); } + + /** Positions this key + * + * @param pos position + * @return *this + */ + virtual void setPosition(SW_POSITION pos); + + /** Decrements a number of elements + */ + virtual void decrement(int step); + + /** Increments a number of elements + */ + virtual void increment(int step); + + virtual bool isTraversable() const { return true; } + virtual long Index() const { return arraypos; } + virtual const char *getRangeText() const; + + /** + * Returns the index for the new one given as as parameter. + * The first parameter is the new index. + */ + virtual long Index(long index) { SetToElement(index); return Index (); } + virtual const char *getText() const; + virtual void setText(const char *ikey); + virtual void sort(); + + SWKEY_OPERATORS + ListKey & operator =(const ListKey &key) { copyFrom(key); return *this; } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/localemgr.h b/include/localemgr.h new file mode 100644 index 0000000..9e30160 --- /dev/null +++ b/include/localemgr.h @@ -0,0 +1,118 @@ +/****************************************************************************** + * localemgr.h - definition of class LocaleMgr used to interact with + * registered locales for a sword installation + * + * $Id: localemgr.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef LOCALEMGR_H +#define LOCALEMGR_H + +#include +#include + +#include +#include + +SWORD_NAMESPACE_START + +class SWLocale; + +typedef std::list StringList; +typedef std::map < SWBuf, SWLocale *, std::less < SWBuf > > LocaleMap; +/** +* The LocaleMgr class handles all the different locales of Sword. +* It provides functions to get a list of all available locales, +* to get the default locale name and to get it. +* The other functions are not interesting for frontend programmers. +* +* To get the default locale name use @see getDefaultLocaleName +* To set the default locale name use @see setDefaultLocaleName +* To get the locale for a language name use @see getLocale +* To get a list of availble locales use @see getAvailableLocales +*/ +class SWDLLEXPORT LocaleMgr { +private: + void deleteLocales(); + char *defaultLocaleName; + LocaleMgr(const LocaleMgr &); + friend class __staticsystemLocaleMgr; +protected: + LocaleMap *locales; + static LocaleMgr *systemLocaleMgr; + +public: + + /** Default constructor of LocaleMgr + * You do normally not need this constructor, use LocaleMgr::getSystemLocaleMgr() instead. + */ + LocaleMgr(const char *iConfigPath = 0); + + /** + * Default destructor of LocaleMgr + */ + virtual ~LocaleMgr(); + + /** Get the locale connected with the name "name". + * + * @param name The name of the locale you want to have. For example use getLocale("de") to get the locale for the German language. + * @return Returns the locale object if the locale with the name given as parameter was found. If it wasn't found return NULL. + */ + virtual SWLocale *getLocale(const char *name); + + /** Get the list of available locales. + * + * @return Returns a list of strings, which contains the names of the available locales. + */ + virtual StringList getAvailableLocales(); + + /** Returns translated text. + * This function uses both parameters to return the translated version of the given text. + * + * @param text The text to translate into the language given by the first parameter. + * @param localeName The name of the locale Sword should use + * @return Returns the translated text. + */ + virtual const char *translate(const char *text, const char *localeName = 0); + + /** Get the default locale name. To set it use @see setDefaultLocaleName + * + * @return Returns the default locale name + */ + virtual const char *getDefaultLocaleName(); + + /** Set the new standard locale of Sword. + * + * @param name The name of the new default locale + */ + virtual void setDefaultLocaleName(const char *name); + + /** The LocaleMgr object used globally in the Sword world. + * Do not create your own LocaleMgr, use this static object instead. + */ + static LocaleMgr *getSystemLocaleMgr(); + static void setSystemLocaleMgr(LocaleMgr *newLocaleMgr); + + /** Augment this localmgr with all locale.conf files in a directory + */ + virtual void loadConfigDir(const char *ipath); + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/lzsscomprs.h b/include/lzsscomprs.h new file mode 100644 index 0000000..67732a3 --- /dev/null +++ b/include/lzsscomprs.h @@ -0,0 +1,82 @@ +/****************************************************************************** + * lzsscomprs.h - definition of Class SWCompress used for data compression + * + * $Id: lzsscomprs.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef LZSSCOMPRS_H +#define LZSSCOMPRS_H + +#include + +#include + +SWORD_NAMESPACE_START + +// The following are constant sizes used by the compression algorithm. +// +// N - This is the size of the ring buffer. It is set +// to 4K. It is important to note that a position +// within the ring buffer requires 12 bits. +// +// F - This is the maximum length of a character sequence +// that can be taken from the ring buffer. It is set +// to 18. Note that a length must be 3 before it is +// worthwhile to store a position/length pair, so the +// length can be encoded in only 4 bits. Or, put yet +// another way, it is not necessary to encode a length +// of 0-18, it is necessary to encode a length of +// 3-18, which requires 4 bits. +// +// THRESHOLD - It takes 2 bytes to store an offset and +// a length. If a character sequence only +// requires 1 or 2 characters to store +// uncompressed, then it is better to store +// it uncompressed than as an offset into +// the ring buffer. +// +// Note that the 12 bits used to store the position and the 4 bits +// used to store the length equal a total of 16 bits, or 2 bytes. + +#define N 4096 +#define F 18 +#define THRESHOLD 3 +#define NOT_USED N + + + +class SWDLLEXPORT LZSSCompress:public SWCompress +{ + static unsigned char m_ring_buffer[N + F - 1]; + static short int m_match_position; + static short int m_match_length; + static short int m_lson[N + 1]; + static short int m_rson[N + 257]; + static short int m_dad[N + 1]; + void InitTree (); + void InsertNode (short int Pos); + void DeleteNode (short int Node); +public: + LZSSCompress (); + virtual ~ LZSSCompress (); + virtual void Encode (void); + virtual void Decode (void); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/markupfiltmgr.h b/include/markupfiltmgr.h new file mode 100644 index 0000000..5d9faa6 --- /dev/null +++ b/include/markupfiltmgr.h @@ -0,0 +1,76 @@ +/****************************************************************************** + * swmarkupmgr.h - definition of class SWMarkupMgr, subclass of + * used to transcode all module text to a requested + * markup. + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef MARKUPFILTMGR_H +#define MARKUPFILTMGR_H + +#include + +SWORD_NAMESPACE_START + +/** This class is like a normal SWEncodingMgr, +* but you can additonally specify which markup +* you want to use. +*/ +class SWDLLEXPORT MarkupFilterMgr : public EncodingFilterMgr { +protected: + SWFilter* fromthml; + SWFilter* fromgbf; + SWFilter* fromplain; + SWFilter* fromosis; + SWFilter* fromtei; + + /** + * current markup value + */ + char markup; + + void CreateFilters(char markup); +public: + /** Constructor of SWMarkupMgr. + * + * @param encoding The desired encoding. + * @param markup The desired markup format. + */ + MarkupFilterMgr(char markup = FMT_THML, char encoding = ENC_UTF8); + + /** + * The destructor of SWMarkupMgr. + */ + ~MarkupFilterMgr(); + + /** Markup sets/gets the markup after initialization + * + * @param m The new markup or FMT_UNKNOWN if you just want to get the current markup. + * @return The current (possibly changed) markup format. + */ + char Markup(char m = FMT_UNKNOWN); + + /** + * Adds the render filters which are defined in "section" to the SWModule object "module". + * @param module To this module the render filter(s) are added + * @param section We use this section to get a list of filters we should apply to the module + */ + virtual void AddRenderFilters(SWModule *module, ConfigEntMap §ion); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/multimapwdef.h b/include/multimapwdef.h new file mode 100644 index 0000000..89b79a9 --- /dev/null +++ b/include/multimapwdef.h @@ -0,0 +1,39 @@ +#ifndef MULTIMAPWDEF +#define MULTIMAPWDEF + +#include + +SWORD_NAMESPACE_START + +// multmap that still lets you use [] to reference FIRST +// entry of a key if multiples exist +template +class multimapwithdefault : public std::multimap { +public: + typedef std::pair value_type; + T& getWithDefault(const Key& k, const T& defaultValue) { + if (find(k) == this->end()) { + insert(value_type(k, defaultValue)); + } + return (*(find(k))).second; + } + + T& operator[](const Key& k) { + if (find(k) == this->end()) { + insert(value_type(k, T())); + } + return (*(find(k))).second; + } + bool has(const Key& k, const T &val) const { + typename std::multimap::const_iterator start = lower_bound(k); + typename std::multimap::const_iterator end = upper_bound(k); + for (; start!=end; start++) { + if (start->second == val) + return true; + } + return false; + } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/nullim.h b/include/nullim.h new file mode 100644 index 0000000..217c38f --- /dev/null +++ b/include/nullim.h @@ -0,0 +1,16 @@ +#ifndef NULLIM_H +#define NULLIM_H + +#include +#include +SWORD_NAMESPACE_START + +class SWDLLEXPORT NullIM : public SWInputMethod { + +public: + NullIM(); + int * translate(char ch); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osisbook.h b/include/osisbook.h new file mode 100644 index 0000000..a3750f6 --- /dev/null +++ b/include/osisbook.h @@ -0,0 +1,640 @@ +/****************************************************************************** + * osisbook.h - Canonical text information to be included by VerseKey2.cpp + * + * $Id: osisbook.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 2004 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +/****************************************************************************** + * [on]tbooks - initialize static instance for all canonical text names + * and chapmax + * taken from http://whi.wts.edu/OSIS/Projects/Markup/specs/BibleBookNames.html + */ + +#define TESTAMENT_HEADING 255 +//#define NTOFFSET 24115 //24115 is offset to start of NT +#if 0 +#define OSISBMAX 68 +#endif +#define BUILTINABBREVCNT 195 + +struct sbook2 VerseKey2::osisbooks[] = { +//Module Heading +{"Module Heading", "ZZZ"},//0 +//Old Testament +{"Old Testament", "OT"},//1 +{"Genesis", "Gen"}, +{"Exodus", "Exod"}, +{"Leviticus", "Lev"}, +{"Numbers", "Num"}, +{"Deuteronomy", "Deut"}, +{"Joshua", "Josh"}, +{"Judges", "Judg"}, +{"Ruth", "Ruth"}, +{"1 Samuel", "1Sam"},//10 +{"2 Samuel", "2Sam"}, +{"1 Kings", "1Kgs"}, +{"2 Kings", "2Kgs"}, +{"1 Chronicles", "1Chr"}, +{"2 Chronicles", "2Chr"}, +{"Ezra", "Ezra"}, +{"Nehemiah", "Neh"}, +{"Esther", "Esth"}, +{"Job", "Job"}, +{"Psalms", "Ps"},//20 +{"Proverbs", "Prov"}, +{"Ecclesiastes", "Eccl"}, // Qohelot +{"Song of Solomon", "Song"}, // Canticle of Canticles +{"Isaiah", "Isa"}, +{"Jeremiah", "Jer"}, +{"Lamentations", "Lam"}, +{"Ezekiel", "Ezek"}, +{"Daniel", "Dan"}, +{"Hosea", "Hos"}, +{"Joel", "Joel"},//30 +{"Amos", "Amos"}, +{"Obadiah", "Obad"}, +{"Jonah", "Jonah"}, +{"Micah", "Mic"}, +{"Nahum", "Nah"}, +{"Habakkuk", "Hab"}, +{"Zephaniah", "Zeph"}, +{"Haggai", "Hag"}, +{"Zechariah", "Zech"}, +{"Malachi", "Mal"},//40 + +//Roman Catholic Deuterocanon +{"Deuterocanon", "DC"},//41 +{"Tobit", "Tob"},//(70) +{"Judith", "Jdt"}, +{"Wisdom", "Wis"}, // Wisdom of Solomon +{"Sirach", "Sir"}, // Ecclesiasticus +{"Baruch", "Bar"}, // 1 Baruch +{"Letter of Jeremiah", "EpJer"},//(75) +{"1 Esdras", "1Esd"}, // 3Ezra Esdras A +{"2 Esdras", "2Esd"}, // 4Ezra Esdras B +{"1 Maccabees", "1Macc"},//(78)50 +{"2 Maccabees", "2Macc"},//51 + + +//Septuagint +{"3 Maccabees", "3Macc"},//(80)52 +{"4 Maccabees", "4Macc"}, +{"Odes of Solomon", "OdesSol"}, +{"Psalms of Solomon", "PssSol"},//55 + + +//Vulgate +{"Epistle to the Laodiceans", "EpLao"},//(84)56 + + +//Orthodox Canon +{"1 Enoch", "1En"},//(85)57 // Ethiopic Apocalypse of Enoch +{"Jubilees", "Jub"},//(86)58 + + +//Protestant Apocrypha +{"Apocrypha", "Apoc"},//(87)59 +{"Additions to Esther", "AddEsth"}, +{"Prayer of Azariah", "PrAzar"}, // Song of the Three Children +{"Susanna", "Sus"},//(90) +{"Bel and the Dragon", "Bel"}, +{"Prayer of Manasses", "PrMan"}, +{"Psalm 151", "Ps151"},//(93)65 + + +//New Testament +{"New Testament", "NT"},//66 +{"Matthew", "Matt"}, +{"Mark", "Mark"}, +{"Luke", "Luke"}, +{"John", "John"},//70 +{"Acts", "Acts"}, +{"Romans", "Rom"}, +{"1 Corinthians", "1Cor"}, +{"2 Corinthians", "2Cor"}, +{"Galatians", "Gal"},//(50) +{"Ephesians", "Eph"}, +{"Philippians", "Phil"}, +{"Colossians", "Col"}, +{"1 Thessalonians", "1Thess"}, +{"2 Thessalonians", "2Thess"},//80 +{"1 Timothy", "1Tim"}, +{"2 Timothy", "2Tim"}, +{"Titus", "Titus"}, +{"Philemon", "Phlm"}, +{"Hebrews", "Heb"},//(60) +{"James", "Jas"}, +{"1 Peter", "1Pet"}, +{"2 Peter", "2Pet"}, +{"1 John", "1John"}, +{"2 John", "2John"},//90 +{"3 John", "3John"}, +{"Jude", "Jude"}, +{"Revelation", "Rev"}//(68)93 + + +}; + +/* the en abbrevs will be in a conf file as well +*/ + +/* +const struct abbrev2 + VerseKey2::builtin_abbrevs[] = { + {"1 C", 48}, // 1 Corinthians + {"1 CHRONICLES", 14}, // 1 Chronicles + {"1 CORINTHIANS", 48}, // 1 Corinthians + {"1 JN", 64}, // 1 John + {"1 JOHN", 64}, // 1 John + {"1 KGS", 12}, // 1 Kings + {"1 KINGS", 12}, // 1 Kings + {"1 PETER", 62}, // 1 Peter + {"1 PTR", 62}, // 1 Peter + {"1 SAMUEL", 10}, // 1 Samuel + {"1 THESSALONIANS", 54}, // 1 Thessalonians + {"1 TIMOTHY", 56}, // 1 Timothy + {"1C", 48}, // 1 Corinthians + {"1CHRONICLES", 14}, // 1 Chronicles + {"1CORINTHIANS", 48}, // 1 Corinthians + {"1JN", 64}, // 1 John + {"1JOHN", 64}, // 1 John + {"1KGS", 12}, // 1 Kings + {"1KINGS", 12}, // 1 Kings + {"1PETER", 62}, // 1 Peter + {"1PTR", 62}, // 1 Peter + {"1SAMUEL", 10}, // 1 Samuel + {"1THESSALONIANS", 54}, // 1 Thessalonians + {"1TIMOTHY", 56}, // 1 Timothy + {"2 C", 49}, // 2 Corinthians + {"2 CHRONICLES", 15}, // 2 Chronicles + {"2 CORINTHIANS", 49}, // 2 Corinthians + {"2 JN", 65}, // 2 John + {"2 JOHN", 65}, // 2 John + {"2 KGS", 13}, // 2 Kings + {"2 KINGS", 13}, // 2 Kings + {"2 PETER", 63}, // 2 Peter + {"2 PTR", 63}, // 2 Peter + {"2 SAMUEL", 11}, // 2 Samuel + {"2 THESSALONIANS", 55}, // 2 Thessalonians + {"2 TIMOTHY", 57}, // 2 Timothy + {"2C", 49}, // 2 Corinthians + {"2CHRONICLES", 15}, // 2 Chronicles + {"2CORINTHIANS", 49}, // 2 Corinthians + {"2JN", 65}, // 2 John + {"2JOHN", 65}, // 2 John + {"2KGS", 13}, // 2 Kings + {"2KINGS", 13}, // 2 Kings + {"2PETER", 63}, // 2 Peter + {"2PTR", 63}, // 2 Peter + {"2SAMUEL", 11}, // 2 Samuel + {"2THESSALONIANS", 55}, // 2 Thessalonians + {"2TIMOTHY", 57}, // 2 Timothy + {"3 JN", 66}, // 3 John + {"3 JOHN", 66}, // 3 John + {"3JN", 66}, // 3 John + {"3JOHN", 66}, // 3 John + {"ACTS", 46}, // Acts + {"AMOS", 31}, // Amos + {"APOCALYPSE OF ST. JOHN", 68}, // Apocalypse of St. John (Rev.) + {"C", 53}, // Colossians + {"CANTICLE OF CANTICLES", 23}, // Canticle of Canticles (Song of S.) + {"COLOSSIANS", 53}, // Colossians + {"D", 6}, // Deuteronomy + {"DANIEL", 28}, // Daniel + {"DEUTERONOMY", 6}, // Deuteronomy + {"E", 51}, // Ephesians + {"ECCLESIASTES", 22}, // Ecclesiastes + {"EPHESIANS", 51}, // Ephesians + {"ESTER", 18}, // Esther + {"ESTHER", 18}, // Esther + {"EXODUS", 3}, // Exodus + {"EZEKIEL", 27}, // Ezekiel + {"EZK", 27}, // Ezekiel + {"EZRA", 16}, // Ezra + {"G", 2}, // Genesis + {"GALATIANS", 50}, // Galatians + {"GENESIS", 2}, // Genesis + {"H", 60}, // Hebrews + {"HABAKKUK", 36}, // Habakkuk + {"HAGGAI", 38}, // Haggai + {"HEBREWS", 60}, // Hebrews + {"HOSEA", 29}, // Hosea + {"I C", 48}, // 1 Corinthians + {"I CHRONICLES", 14}, // 1 Chronicles + {"I CORINTHIANS", 48}, // 1 Corinthians + {"I JN", 64}, // 1 John + {"I JOHN", 64}, // 1 John + {"I KGS", 12}, // 1 Kings + {"I KINGS", 12}, // 1 Kings + {"I PETER", 62}, // 1 Peter + {"I PTR", 62}, // 1 Peter + {"I SAMUEL", 10}, // 1 Samuel + {"I THESSALONIANS", 54}, // 1 Thessalonians + {"I TIMOTHY", 56}, // 1 Timothy + {"IC", 48}, // 1 Corinthians + {"ICHRONICLES", 14}, // 1 Chronicles + {"ICORINTHIANS", 48}, // 1 Corinthians + {"II C", 49}, // 2 Corinthians + {"II CHRONICLES", 15}, // 2 Chronicles + {"II CORINTHIANS", 49}, // 2 Corinthians + {"II JN", 65}, // 2 John + {"II JOHN", 65}, // 2 John + {"II KGS", 13}, // 2 Kings + {"II KINGS", 13}, // 2 Kings + {"II PETER", 63}, // 2 Peter + {"II PTR", 63}, // 2 Peter + {"II SAMUEL", 11}, // 2 Samuel + {"II THESSALONIANS", 55}, // 2 Thessalonians + {"II TIMOTHY", 57}, // 2 Timothy + {"IIC", 49}, // 2 Corinthians + {"IICHRONICLES", 15}, // 2 Chronicles + {"IICORINTHIANS", 49}, // 2 Corinthians + {"III JN", 66}, // 3 John + {"III JOHN", 66}, // 3 John + {"IIIJN", 66}, // 3 John + {"IIIJOHN", 66}, // 3 John + {"IIJN", 65}, // 2 John + {"IIJOHN", 65}, // 2 John + {"IIKGS", 13}, // 2 Kings + {"IIKINGS", 13}, // 2 Kings + {"IIPETER", 63}, // 2 Peter + {"IIPTR", 63}, // 2 Peter + {"IISAMUEL", 11}, // 2 Samuel + {"IITHESSALONIANS", 55}, // 2 Thessalonians + {"IITIMOTHY", 55}, // 2 Timothy + {"IJN", 64}, // 1 John + {"IJOHN", 64}, // 1 John + {"IKGS", 12}, // 1 Kings + {"IKINGS", 12}, // 1 Kings + {"IPETER", 62}, // 1 Peter + {"IPTR", 62}, // 1 Peter + {"ISA", 24}, // Isaiah + {"ISAIAH", 24}, // Isaiah + {"ISAMUEL", 10}, // 1 Samuel + {"ITHESSALONIANS", 54}, // 1 Thessalonians + {"ITIMOTHY", 56}, // 1 Timothy + {"J", 45}, // John + {"JAMES", 61}, // James + {"JAS", 61}, // James + {"JDGS", 8}, // Judges + {"JEREMIAH", 25}, // Jeremiah + {"JHN", 45}, // John + {"JN", 45}, // John + {"JO", 45}, // John + {"JOB", 19}, // Job + {"JOEL", 30}, // Joel + {"JOHN", 45}, // John + {"JOL", 30}, // Joel + {"JONAH", 33}, // Jonah + {"JOSHUA", 7}, // Joshua + {"JUDE", 67}, // Jude + {"JUDGES", 8}, // Judges + {"L", 44}, // Luke + {"LAMENTATIONS", 26}, // Lamentations + {"LEVITICUS", 4}, // Leviticus + {"LK", 44}, // Luke + {"LUKE", 44}, // Luke + {"MA", 42}, // Matthew + {"MALACHI", 40}, // Malachi + {"MARK", 43}, // Mark + {"MATTHEW", 42}, // Matthew + {"MICAH", 34}, // Micah + {"MODULE HEADING", 0}, // Module Heading + {"MK", 43}, // Mark + {"MRK", 43}, // Mark + {"MT", 42}, // Matthew + {"N", 5}, // Numbers + {"NAHUM", 35}, // Nahum + {"NAM", 35}, // Nahum + {"NEHEMIAH", 17}, // Nehemiah + {"NEW TESTAMENT", 41}, // New Testament + {"NUMBERS", 5}, // Numbers + {"OBADIAH", 32}, // Obadiah + {"OLD TESTAMENT", 1}, // Old Testament + {"P", 20}, // Psalms + {"PHIL", 52}, // Philippians + {"PHILEMON", 59}, // Philemon + {"PHILIPPIANS", 52}, // Philippians + {"PHLM", 59}, // Philemon + {"PHM", 59}, // Philemon + {"PHP", 52}, // Philippians + {"PR", 21}, // Proverbs + {"PROVERBS", 21}, // Proverbs + {"PSA", 20}, // Psalms + {"PSALMS", 20}, // Psalms + {"PSM", 20}, // Psalms + {"PSS", 20}, // Psalms + {"QOHELETH", 22}, // Qohelet (Ecclesiastes) + {"REVELATION OF JOHN", 68}, // Revelation + {"ROMANS", 47}, // Romans + {"RUTH", 9}, // Ruth + {"SNG", 23}, // Song of Solomon + {"SOLOMON", 23}, // Song of Solomon + {"SONG OF SOLOMON", 23}, // Song of Solomon + {"SONG OF SONGS", 23}, // Song of Solomon + {"SOS", 23}, // Song of Solomon + {"TITUS", 58}, // Titus + {"ZECHARIAH", 39}, // Zechariah + {"ZEPHANIAH", 37}, // Zephaniah + {"", -1} +}; +*/ + +/* includes all osis books - use the locale osis.conf instead +const struct abbrev + VerseKey2::builtin_abbrevs[] = { + {"1 C", 46}, // 1 Corinthians + {"1 CHRONICLES", 13}, // 1 Chronicles + {"1 CORINTHIANS", 47}, // 1 Corinthians + {"1 ENOCH", 84}, + {"1 ESDRAS", 75}, + {"1 JN", 63}, // 1 John + {"1 JOHN", 63}, // 1 John + {"1 KGS", 11}, // 1 Kings + {"1 KINGS", 11}, // 1 Kings + {"1 MACCABEES", 77}, + {"1 PETER", 61}, // 1 Peter + {"1 PTR", 61}, // 1 Peter + {"1 SAMUEL", 9}, // 1 Samuel + {"1 THESSALONIANS", 53}, // 1 Thessalonians + {"1 TIMOTHY", 55}, // 1 Timothy + {"1C", 47}, // 1 Corinthians + {"1CHRONICLES", 13}, // 1 Chronicles + {"1CORINTHIANS", 47}, // 1 Corinthians + {"1ENOCH", 84}, + {"1ESDRAS", 75}, + {"1JN", 63}, // 1 John + {"1JOHN", 63}, // 1 John + {"1KGS", 11}, // 1 Kings + {"1KINGS", 11}, // 1 Kings + {"1MACCABEES", 77}, + {"1PETER", 61}, // 1 Peter + {"1PTR", 61}, // 1 Peter + {"1SAMUEL", 9}, // 1 Samuel + {"1THESSALONIANS", 53}, // 1 Thessalonians + {"1TIMOTHY", 55}, // 1 Timothy + {"2 C", 48}, // 2 Corinthians + {"2 CHRONICLES", 14}, // 2 Chronicles + {"2 CORINTHIANS", 48}, // 2 Corinthians + {"2 ESDRAS", 76}, + {"2 JN", 64}, // 2 John + {"2 JOHN", 64}, // 2 John + {"2 KGS", 12}, // 2 Kings + {"2 KINGS", 12}, // 2 Kings + {"2 MACCABEES", 78}, + {"2 PETER", 62}, // 2 Peter + {"2 PTR", 62}, // 2 Peter + {"2 SAMUEL", 10}, // 2 Samuel + {"2 THESSALONIANS", 54}, // 2 Thessalonians + {"2 TIMOTHY", 56}, // 2 Timothy + {"2C", 48}, // 2 Corinthians + {"2CHRONICLES", 14}, // 2 Chronicles + {"2CORINTHIANS", 48}, // 2 Corinthians + {"2ESDRAS", 76}, + {"2JN", 64}, // 2 John + {"2JOHN", 64}, // 2 John + {"2KGS", 12}, // 2 Kings + {"2KINGS", 12}, // 2 Kings + {"2MACCABEES", 78}, + {"2PETER", 62}, // 2 Peter + {"2PTR", 62}, // 2 Peter + {"2SAMUEL", 10}, // 2 Samuel + {"2THESSALONIANS", 54}, // 2 Thessalonians + {"2TIMOTHY", 56}, // 2 Timothy + {"3 JN", 65}, // 3 John + {"3 JOHN", 65}, // 3 John + {"3JN", 65}, // 3 John + {"3JOHN", 65}, // 3 John + {"3 MACCABEES", 79}, + {"3MACCABEES", 79}, + {"4 MACCABEES", 80}, + {"4MACCABEES", 80}, + {"ACTS", 45}, // Acts + {"ADDESTHER", 87}, + {"ADDITIONS TO ESTHER", 87}, + {"AMOS", 30}, // Amos + {"APOCALYPSE OF ST. JOHN", 67}, // Apocalypse of St. John (Rev.) + {"APOCRYPHA", 86}, + {"BARUCH", 73}, + {"BEL AND THE DRAGON",90}, + {"BEN SIRACH", 72}, + {"C", 52}, // Colossians + {"CANTICLE OF CANTICLES", 22}, // Canticle of Canticles (Song of S.) + {"COLOSSIANS", 52}, // Colossians + {"D", 5}, // Deuteronomy + {"DANIEL", 27}, // Daniel + {"DEUTERO", 5}, // Deuteronomy + {"DEUTEROCANON", 68}, // Deuteronomy + {"DEUTERONOMY", 5}, // Deuteronomy + {"E", 50}, // Ephesians + {"ECCLESIASTES", 21}, // Ecclesiastes + {"ECCLESIASTICUS", 73}, + {"EPHESIANS", 50}, // Ephesians + {"EPISTLE OF JEREMIAH", 74}, + {"EPISTLE TO THE LAODICEANS", 83}, + {"EPJER", 74}, + {"EPLAO", 83}, + {"ESTER", 17}, // Esther + {"ESTHER", 17}, // Esther + {"EXODUS", 2}, // Exodus + {"EZEKIEL", 26}, // Ezekiel + {"EZK", 26}, // Ezekiel + {"EZRA", 15}, // Ezra + {"G", 1}, // Genesis + {"GALATIANS", 49}, // Galatians + {"GENESIS", 1}, // Genesis + {"H", 59}, // Hebrews + {"HABAKKUK", 35}, // Habakkuk + {"HAGGAI", 37}, // Haggai + {"HEBREWS", 59}, // Hebrews + {"HOSEA", 28}, // Hosea + {"I C", 47}, // 1 Corinthians + {"I CHRONICLES", 13}, // 1 Chronicles + {"I CORINTHIANS", 47}, // 1 Corinthians + {"I ENOCH", 84}, + {"I ESDRAS", 76}, + {"I JN", 63}, // 1 John + {"I JOHN", 63}, // 1 John + {"I KGS", 11}, // 1 Kings + {"I KINGS", 11}, // 1 Kings + {"I MACCABEES", 78}, + {"I PETER", 61}, // 1 Peter + {"I PTR", 61}, // 1 Peter + {"I SAMUEL", 9}, // 1 Samuel + {"I THESSALONIANS", 53}, // 1 Thessalonians + {"I TIMOTHY", 55}, // 1 Timothy + {"IC", 47}, // 1 Corinthians + {"ICHRONICLES", 13}, // 1 Chronicles + {"ICORINTHIANS", 47}, // 1 Corinthians + {"IENOCH", 84}, + {"IESDRAS", 76}, + {"II C", 48}, // 2 Corinthians + {"II CHRONICLES", 14}, // 2 Chronicles + {"II CORINTHIANS", 48}, // 2 Corinthians + {"II ESDRAS", 77}, + {"II JN", 64}, // 2 John + {"II JOHN", 64}, // 2 John + {"II KGS", 12}, // 2 Kings + {"II KINGS", 12}, // 2 Kings + {"II MACCABEES", 79}, + {"II PETER", 62}, // 2 Peter + {"II PTR", 62}, // 2 Peter + {"II SAMUEL", 10}, // 2 Samuel + {"II THESSALONIANS", 54}, // 2 Thessalonians + {"II TIMOTHY", 56}, // 2 Timothy + {"IIC", 48}, // 2 Corinthians + {"IICHRONICLES", 14}, // 2 Chronicles + {"IICORINTHIANS", 48}, // 2 Corinthians + {"IIESDRAS", 77}, + {"III JN", 65}, // 3 John + {"III JOHN", 65}, // 3 John + {"IIIJN", 65}, // 3 John + {"IIIJOHN", 65}, // 3 John + {"III MACCABEES", 80}, + {"IIII MACCABEES", 81}, + {"IIIIMACCABEES", 81}, + {"IIIMACCABEES", 80}, + {"IIJN", 64}, // 2 John + {"IIJOHN", 64}, // 2 John + {"IIKGS", 12}, // 2 Kings + {"IIKINGS", 12}, // 2 Kings + {"IIMACCABEES", 79}, + {"IIPETER", 62}, // 2 Peter + {"IIPTR", 62}, // 2 Peter + {"IISAMUEL", 10}, // 2 Samuel + {"IITHESSALONIANS", 54}, // 2 Thessalonians + {"IITIMOTHY", 56}, // 2 Timothy + {"IJN", 63}, // 1 John + {"IJOHN", 63}, // 1 John + {"IKGS", 11}, // 1 Kings + {"IKINGS", 11}, // 1 Kings + {"IMACCABEES", 78}, + {"IPETER", 61}, // 1 Peter + {"IPTR", 61}, // 1 Peter + {"ISA", 23}, // Isaiah + {"ISAIAH", 23}, // Isaiah + {"ISAMUEL", 9}, // 1 Samuel + {"ITHESSALONIANS", 53}, // 1 Thessalonians + {"ITIMOTHY", 55}, // 1 Timothy + {"IV MACCABEES", 81}, + {"IVMACCABEES", 81}, + {"J", 44}, // John + {"JAMES", 60}, // James + {"JAS", 60}, // James + {"JDGS", 7}, // Judges + {"JDT", 70}, + {"JEREMIAH", 24}, // Jeremiah + {"JESUS BEN SIRACH", 73}, + {"JHN", 44}, // John + {"JN", 44}, // John + {"JO", 44}, // John + {"JOB", 18}, // Job + {"JOEL", 29}, // Joel + {"JOHN", 44}, // John + {"JOL", 29}, // Joel + {"JONAH", 32}, // Jonah + {"JOSHUA", 6}, // Joshua + {"JUBILEES", 85}, + {"JUDE", 66}, // Jude + {"JUDGES", 7}, // Judges + {"JUDITH", 70}, + {"L", 43}, // Luke + {"LAMENTATIONS", 25}, // Lamentations + {"LAODICEANS", 83}, + {"LETTER OF JEREMIAH", 74}, + {"LEVITICUS", 3}, // Leviticus + {"LK", 43}, // Luke + {"LUKE", 43}, // Luke + {"MA", 41}, // Matthew + {"MALACHI", 39}, // Malachi + {"MANASSEH", 91}, + {"MANASSES", 91}, + {"MARK", 42}, // Mark + {"MATTHEW", 41}, // Matthew + {"MICAH", 33}, // Micah + {"MK", 42}, // Mark + {"MRK", 42}, // Mark + {"MT", 41}, // Matthew + {"N", 4}, // Numbers + {"NAHUM", 34}, // Nahum + {"NAM", 34}, // Nahum + {"NEHEMIAH", 16}, // Nehemiah + {"NEW TESTAMENT", 40}, // New Testament + {"NUMBERS", 4}, // Numbers + {"OBADIAH", 31}, // Obadiah + {"ODES OF SOLOMON", 81}, + {"OLD TESTAMENT", 0}, // Old Testament + {"P", 19}, // Psalms + {"PHIL", 51}, // Philippians + {"PHILEMON", 58}, // Philemon + {"PHILIPPIANS", 51}, // Philippians + {"PHLM", 58}, // Philemon + {"PHM", 58}, // Philemon + {"PHP", 51}, // Philippians + {"PR", 20}, // Proverbs + {"PRAYER OF AZARIAH", 88}, + {"PRAYER OF MANASSEH", 91}, + {"PRAYER OF MANASSES", 91}, + {"PRAZAR", 88}, + {"PRMAN", 91}, + {"PROVERBS", 20}, // Proverbs + {"PS151", 92}, + {"PSA", 19}, // Psalms + {"PSALM ", 19}, + {"PSALM 151", 92}, + {"PSALM151", 92}, + {"PSALMS", 19}, // Psalms + {"PSALMS OF SOLOMON", 82}, + {"PSM", 19}, // Psalms + {"PSS", 19}, // Psalms + {"PSSOL", 82}, + {"PSSSOL", 82}, + {"QOHELETH", 21}, // Qohelet (Ecclesiastes) + {"REVELATION OF JOHN", 67}, // Revelation + {"ROMANS", 46}, // Romans + {"RUTH", 8}, // Ruth + {"SIRACH", 72}, + {"SNG", 22}, // Song of Solomon + {"SOLOMON", 22}, // Song of Solomon + {"SONG OF SOLOMON", 22}, // Song of Solomon + {"SONG OF SONGS", 22}, // Song of Solomon + {"SOS", 22}, // Song of Solomon + {"SUSANNA", 89}, + {"TITUS", 57}, // Titus + {"TOBIT", 69}, + {"WISDOM", 71},//250 + {"WISDOM OF JESUS BEN SIRACH", 72}, + {"ZECHARIAH", 38}, // Zechariah + {"ZEPHANIAH", 36}, // Zephaniah + {"", -1} +}; +*/ + +/* The default versification scheme is KJV */ +/* + 0, 1, 52, 93, 121, 158, + 193, 218, 240, 245, 277, 302, 325, + 351, 381, 418, 429, 443, 454, 497, + 648, 680, 693, 702, 769, 822, 828, + 877, 890, 905, 909, 919, 921, 926, + 934, 938, 942, 946, 949, 964 +*/ + + + + diff --git a/include/osisfootnotes.h b/include/osisfootnotes.h new file mode 100644 index 0000000..2478ce0 --- /dev/null +++ b/include/osisfootnotes.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: osisfootnotes.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISFOOTNOTES_H +#define OSISFOOTNOTES_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides headings in a OSIS text + */ +class SWDLLEXPORT OSISFootnotes : public SWOptionFilter { +public: + OSISFootnotes(); + virtual ~OSISFootnotes(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osisheadings.h b/include/osisheadings.h new file mode 100644 index 0000000..fd1460a --- /dev/null +++ b/include/osisheadings.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: osisheadings.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISHEADINGS_H +#define OSISHEADINGS_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides headings in a OSIS text + */ +class SWDLLEXPORT OSISHeadings : public SWOptionFilter { +public: + OSISHeadings(); + virtual ~OSISHeadings(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osishtmlhref.h b/include/osishtmlhref.h new file mode 100644 index 0000000..af8fab2 --- /dev/null +++ b/include/osishtmlhref.h @@ -0,0 +1,63 @@ +/****************************************************************************** + * + * $Id: osishtmlhref.h 2091 2007-09-28 01:49:45Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISHTMLHREF_H +#define OSISHTMLHREF_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts OSIS text to HTML text with hrefs + */ +class SWDLLEXPORT OSISHTMLHREF : public SWBasicFilter { +private: + bool morphFirst; +protected: + // used by derived classes so we have it in the header + class QuoteStack; + class MyUserData : public BasicFilterUserData { + public: + bool osisQToTick; + bool inBold; + bool inXRefNote; + bool BiblicalText; + int suspendLevel; + SWBuf wordsOfChristStart; + SWBuf wordsOfChristEnd; + QuoteStack *quoteStack; + SWBuf lastTransChange; + SWBuf w; + SWBuf fn; + SWBuf version; + MyUserData(const SWModule *module, const SWKey *key); + ~MyUserData(); + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + OSISHTMLHREF(); + void setMorphFirst(bool val = true) { morphFirst = val; } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osislemma.h b/include/osislemma.h new file mode 100644 index 0000000..c61dad4 --- /dev/null +++ b/include/osislemma.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: osislemma.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISLEMMA_H +#define OSISLEMMA_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides headings in a OSIS text + */ +class SWDLLEXPORT OSISLemma : public SWOptionFilter { +public: + OSISLemma(); + virtual ~OSISLemma(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osismorph.h b/include/osismorph.h new file mode 100644 index 0000000..85cd98f --- /dev/null +++ b/include/osismorph.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * + * $Id: osismorph.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISMORPH_H +#define OSISMORPH_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides morph tags in a OSIS text + */ +class SWDLLEXPORT OSISMorph : public SWOptionFilter { +public: + OSISMorph(); + virtual ~OSISMorph(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osismorphsegmentation.h b/include/osismorphsegmentation.h new file mode 100644 index 0000000..45bbec7 --- /dev/null +++ b/include/osismorphsegmentation.h @@ -0,0 +1,42 @@ +/****************************************************************************** + * + * $Id: osismorphsegmentation.h,v 1.3 2005/09/02 22:15:30 joachim Exp $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISMORPHSEGMENTATION_H +#define OSISMORPHSEGMENTATION_H + +#include + +SWORD_NAMESPACE_START + +/* This filters toggles splitting of morphemes + * (for morpheme segmented Hebrew in the WLC) + */ + +class OSISMorphSegmentation : public SWOptionFilter { + +public: + OSISMorphSegmentation(); + virtual ~OSISMorphSegmentation(); + + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osisosis.h b/include/osisosis.h new file mode 100644 index 0000000..8f0304d --- /dev/null +++ b/include/osisosis.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * + * $Id: osisosis.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISOSIS_H +#define OSISOSIS_H + +#include +#include + +SWORD_NAMESPACE_START + +/** this filter converts internal OSIS text to public OSIS text + */ +class SWDLLEXPORT OSISOSIS : public SWBasicFilter { +private: +protected: + class MyUserData : public BasicFilterUserData { + public: + bool osisQToTick; + bool inBold; + SWBuf lastTransChange; + SWBuf w; + SWBuf fn; + XMLTag startTag; + MyUserData(const SWModule *module, const SWKey *key); + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual char processText(SWBuf &text, const SWKey *key, const SWModule *module); + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + OSISOSIS(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osisplain.h b/include/osisplain.h new file mode 100644 index 0000000..19aee17 --- /dev/null +++ b/include/osisplain.h @@ -0,0 +1,49 @@ +/****************************************************************************** + * + * $Id: osisplain.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISPLAIN_H +#define OSISPLAIN_H + +#include +#include + +SWORD_NAMESPACE_START + +/** this filter converts OSIS text to plain text + */ +class SWDLLEXPORT OSISPlain : public SWBasicFilter { +public: +protected: + class MyUserData : public BasicFilterUserData { + public: + SWBuf w; + XMLTag tag; + MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {} + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + OSISPlain(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osisredletterwords.h b/include/osisredletterwords.h new file mode 100644 index 0000000..af63291 --- /dev/null +++ b/include/osisredletterwords.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: osisredletterwords.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISREDLETTERWORDS_H +#define OSISREDLETTERWORDS_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides headings in a OSIS text + */ +class SWDLLEXPORT OSISRedLetterWords : public SWOptionFilter { +public: + OSISRedLetterWords(); + virtual ~OSISRedLetterWords(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osisrtf.h b/include/osisrtf.h new file mode 100644 index 0000000..e5ac9a7 --- /dev/null +++ b/include/osisrtf.h @@ -0,0 +1,42 @@ +/****************************************************************************** + * + * $Id: osisrtf.h 1973 2006-09-20 04:09:16Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISRTF_H +#define OSISRTF_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts OSIS text to RTF text + */ +class SWDLLEXPORT OSISRTF : public SWBasicFilter { +private: + +protected: + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key); + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +public: + OSISRTF(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osisscripref.h b/include/osisscripref.h new file mode 100644 index 0000000..d3e7362 --- /dev/null +++ b/include/osisscripref.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: osisscripref.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISSCRIPREF_H +#define OSISSCRIPREF_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides headings in a OSIS text + */ +class SWDLLEXPORT OSISScripref : public SWOptionFilter { +public: + OSISScripref(); + virtual ~OSISScripref(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osisstrongs.h b/include/osisstrongs.h new file mode 100644 index 0000000..c40d8c2 --- /dev/null +++ b/include/osisstrongs.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * + * $Id: osisstrongs.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISSTRONGS_H +#define OSISSTRONGS_H + +#include + +SWORD_NAMESPACE_START + + /** This Filter shows/hides strong's numbers in a OSIS text + */ +class SWDLLEXPORT OSISStrongs : public SWOptionFilter { +public: + OSISStrongs(); + virtual ~OSISStrongs(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osisvariants.h b/include/osisvariants.h new file mode 100644 index 0000000..76f4806 --- /dev/null +++ b/include/osisvariants.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * + * $Id: osisvariants.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISVARIANTS_H +#define OSISVARIANTS_H + +#include +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides textual variants + */ +class SWDLLEXPORT OSISVariants : public SWOptionFilter { + char option; + + static const char primary[]; + static const char secondary[]; + static const char all[]; + + static const char optName[]; + static const char optTip[]; + StringList options; + +public: + OSISVariants(); + virtual ~OSISVariants(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); + virtual const char *getOptionName() { return optName; } + virtual const char *getOptionTip() { return optTip; } + virtual void setOptionValue(const char *ival); + virtual const char *getOptionValue(); + virtual StringList getOptionValues() { return options; } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osiswebif.h b/include/osiswebif.h new file mode 100644 index 0000000..2de6b89 --- /dev/null +++ b/include/osiswebif.h @@ -0,0 +1,44 @@ +/****************************************************************************** + * + * $Id: osiswebif.h 1946 2006-07-15 20:41:24Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISWEBIF_H +#define OSISWEBIF_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts OSIS text to HTML text with hrefs + */ +class SWDLLEXPORT OSISWEBIF : public OSISHTMLHREF { + const SWBuf baseURL; + const SWBuf passageStudyURL; + bool javascript; + +protected: + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key); +public: + OSISWEBIF(); + void setJavascript(bool mode) { javascript = mode; } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/osiswordjs.h b/include/osiswordjs.h new file mode 100644 index 0000000..d278d11 --- /dev/null +++ b/include/osiswordjs.h @@ -0,0 +1,52 @@ +/*************************************************************************** + * + * $Id: osisstrongs.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef OSISWORDSJS_H +#define OSISWORDSJS_H + +#include + +SWORD_NAMESPACE_START + +class SWMgr; + /** This Filter shows/hides strong's numbers in a OSIS text + */ +class SWDLLEXPORT OSISWordJS : public SWOptionFilter { + SWModule *defaultGreekLex; + SWModule *defaultHebLex; + SWModule *defaultGreekParse; + SWModule *defaultHebParse; + SWMgr *mgr; + +public: + OSISWordJS(); + virtual ~OSISWordJS(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); + void setDefaultModules(SWModule *defaultGreekLex = 0, SWModule *defaultHebLex = 0, SWModule *defaultGreekParse = 0, SWModule *defaultHebParse = 0) { + this->defaultGreekLex = defaultGreekLex; + this->defaultHebLex = defaultHebLex; + this->defaultGreekParse = defaultGreekParse; + this->defaultHebParse = defaultHebParse; + } + void setMgr(SWMgr *mgr) { this->mgr = mgr; } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/papyriplain.h b/include/papyriplain.h new file mode 100644 index 0000000..5498222 --- /dev/null +++ b/include/papyriplain.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * + * $Id: papyriplain.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef PapyriPLAIN_H +#define PapyriPLAIN_H + +#include + +SWORD_NAMESPACE_START + + /** This filter converts Papyri text to plain text + */ +class SWDLLEXPORT PapyriPlain : public SWOptionFilter { +public: + PapyriPlain(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/plainfootnotes.h b/include/plainfootnotes.h new file mode 100644 index 0000000..74a8c4a --- /dev/null +++ b/include/plainfootnotes.h @@ -0,0 +1,41 @@ +/*************************************************************************** + * + * $Id: plainfootnotes.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef PLAINFOOTNOTES_H +#define PLAINFOOTNOTES_H + +#include + +SWORD_NAMESPACE_START + +class SWKey; + +/**Shows or hides footnotes in plain text. + *@author The team of BibleTime + */ +class SWDLLEXPORT PLAINFootnotes : public SWOptionFilter { +public: + PLAINFootnotes(); + virtual ~PLAINFootnotes(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/plainhtml.h b/include/plainhtml.h new file mode 100644 index 0000000..e09821a --- /dev/null +++ b/include/plainhtml.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * + * $Id: plainhtml.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef PLAINHTML_H +#define PLAINHTML_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts plain text to HTML text + * @author Torsten Uhlmann, begin : Tue Jun 15 15:34:26 CEST 1999 + */ +class SWDLLEXPORT PLAINHTML : public SWFilter { +public: + PLAINHTML(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawcom.h b/include/rawcom.h new file mode 100644 index 0000000..c5f7895 --- /dev/null +++ b/include/rawcom.h @@ -0,0 +1,63 @@ +/****************************************************************************** + * rawcom.h - code for class 'RawCom'- a module that reads raw commentary + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * + * $Id: rawcom.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWCOM_H +#define RAWCOM_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT RawCom : public RawVerse, public SWCom { + + +public: + + RawCom(const char *ipath, const char *iname = 0, const char *idesc = 0, + SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, + const char* ilang = 0); + virtual ~RawCom(); + + virtual SWBuf &getRawEntryBuf(); + + virtual void increment(int steps); + virtual void decrement(int steps) { increment(-steps); } + + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *path) { return RawVerse::createModule(path); } + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + // end write interface ------------------------ + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END + +#endif diff --git a/include/rawcom4.h b/include/rawcom4.h new file mode 100644 index 0000000..8cd0574 --- /dev/null +++ b/include/rawcom4.h @@ -0,0 +1,63 @@ +/****************************************************************************** + * rawcom.h - code for class 'RawCom4'- a module that reads raw commentary + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * + * $Id: rawcom.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWCOM4_H +#define RAWCOM4_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT RawCom4 : public RawVerse4, public SWCom { + + +public: + + RawCom4(const char *ipath, const char *iname = 0, const char *idesc = 0, + SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, + const char* ilang = 0); + virtual ~RawCom4(); + + virtual SWBuf &getRawEntryBuf(); + + virtual void increment(int steps); + virtual void decrement(int steps) { increment(-steps); } + + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *path) { return RawVerse4::createModule(path); } + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + // end write interface ------------------------ + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END + +#endif diff --git a/include/rawfiles.h b/include/rawfiles.h new file mode 100644 index 0000000..5cb765b --- /dev/null +++ b/include/rawfiles.h @@ -0,0 +1,86 @@ +/****************************************************************************** + * rawfiles.h - code for class 'RawFiles'- a module that produces HTML HREFs + * pointing to actual text desired. Uses standard + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * + * $Id: rawfiles.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWFILES_H +#define RAWFILES_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT RawFiles : public RawVerse, public SWCom { + + char *getNextFilename(); + +public: + + + RawFiles(const char *ipath, const char *iname = 0, const char *idesc = 0, + SWDisplay *idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, + const char *ilang = 0); + virtual ~RawFiles(); + virtual SWBuf &getRawEntryBuf(); + + // write interface ---------------------------- + /** Is the module writable? :) + * @return yes or no + */ + virtual bool isWritable(); + + /** Creates a new module + * @param path The first parameter is path of the new module + * @return error + */ + static char createModule(const char *); + + /** Modify the current module entry text + * - only if module @ref isWritable + * @return *this + */ + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + + /** Link the current module entry to another module entry + * - only if module @ref isWritable + * @return *this + */ + virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry + + /** Delete current module entry - only if module @ref isWritable + * + */ + virtual void deleteEntry(); + // end write interface ------------------------ + + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawgenbook.h b/include/rawgenbook.h new file mode 100644 index 0000000..a915b4e --- /dev/null +++ b/include/rawgenbook.h @@ -0,0 +1,65 @@ +/****************************************************************************** + * rawtext.h - code for class 'RawText'- a module that reads raw text files: + * ot and nt using indexs ??.bks ??.cps ??.vss + * + * $Id: rawgenbook.h 1917 2006-05-22 01:07:17Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWGENBOOK_H +#define RAWGENBOOK_H + +#include + +#include + +SWORD_NAMESPACE_START + +class FileDesc; + +class SWDLLEXPORT RawGenBook : public SWGenBook { + char *path; + FileDesc *bdtfd; + bool verseKey; + +public: + + + RawGenBook(const char *ipath, const char *iname = 0, const char *idesc = 0, + SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, + SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0, const char *keyType = "TreeKey"); + virtual ~RawGenBook(); + virtual SWBuf &getRawEntryBuf(); + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *ipath); + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey * linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + virtual SWKey *CreateKey(); + // end write interface ------------------------ + + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawld.h b/include/rawld.h new file mode 100644 index 0000000..7afe9b9 --- /dev/null +++ b/include/rawld.h @@ -0,0 +1,67 @@ +/****************************************************************************** + * rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and + * dictionary files: *.dat *.idx + * + * $Id: rawld.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWLD_H +#define RAWLD_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT RawLD : public RawStr, public SWLD { + void strongsPad(char *buf); + char getEntry(long away = 0); + +public: + + + RawLD(const char *ipath, const char *iname = 0, const char *idesc = 0, + SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, + SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0); + + virtual ~RawLD(); + virtual SWBuf &getRawEntryBuf(); + + virtual void increment(int steps = 1); + virtual void decrement(int steps = 1) { increment(-steps); } + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *path) { return RawStr::createModule (path); } + + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + // end write interface ------------------------ + + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawld4.h b/include/rawld4.h new file mode 100644 index 0000000..616b992 --- /dev/null +++ b/include/rawld4.h @@ -0,0 +1,67 @@ +/****************************************************************************** + * rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and + * dictionary files: *.dat *.idx + * + * $Id: rawld4.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWLD4_H +#define RAWLD4_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT RawLD4 : public RawStr4, public SWLD { + void strongsPad(char *buf); + char getEntry(long away = 0); + +public: + + + RawLD4(const char *ipath, const char *iname = 0, const char *idesc = 0, + SWDisplay *idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, + SWTextMarkup markup = FMT_UNKNOWN, const char *ilang = 0); + + virtual ~RawLD4(); + virtual SWBuf &getRawEntryBuf(); + + virtual void increment(int steps = 1); + virtual void decrement(int steps = 1) { increment(-steps); } + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *path) { return RawStr4::createModule(path); } + + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + // end write interface ------------------------ + + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawstr.h b/include/rawstr.h new file mode 100644 index 0000000..4367851 --- /dev/null +++ b/include/rawstr.h @@ -0,0 +1,58 @@ +/***************************************************************************** + * rawstr.h - code for class 'RawStr'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class StrKey + * + * $Id: rawstr.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWSTR_H +#define RAWSTR_H + +#include + +SWORD_NAMESPACE_START + +class SWBuf; +class FileDesc; + +class SWDLLEXPORT RawStr { + static int instance; // number of instantiated RawStr objects or derivitives + char *path; + long lastoff; + +protected: + FileDesc *idxfd; + FileDesc *datfd; + void doSetText(const char *key, const char *buf, long len = -1); + void doLinkEntry(const char *destkey, const char *srckey); +public: + static void prepText(SWBuf &buf); + static char nl; + RawStr(const char *ipath, int fileMode = -1); + virtual ~RawStr(); + void getIDXBuf(long ioffset, char **buf); + void getIDXBufDat(long ioffset, char **buf); + signed char findOffset(const char *key, long *start, unsigned short *size, long away = 0, long *idxoff = 0); + void readText(long start, unsigned short *size, char **idxbuf, SWBuf &buf); + static signed char createModule(const char *path); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawstr4.h b/include/rawstr4.h new file mode 100644 index 0000000..32734ef --- /dev/null +++ b/include/rawstr4.h @@ -0,0 +1,59 @@ +/***************************************************************************** + * rawstr.h - code for class 'RawStr'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class StrKey + * + * $Id: rawstr4.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWSTR4_H +#define RAWSTR4_H + +#include + +SWORD_NAMESPACE_START + +class FileDesc; +class SWBuf; + +class SWDLLEXPORT RawStr4 { + static int instance; // number of instantiated RawStr4 objects or derivitives + char *path; + long lastoff; + +protected: + FileDesc *idxfd; + FileDesc *datfd; + void prepText(SWBuf &buf); + void doSetText(const char *key, const char *buf, long len = -1); + void doLinkEntry(const char *destkey, const char *srckey); +public: + char nl; + RawStr4(const char *ipath, int fileMode = -1); + virtual ~RawStr4(); + void getIDXBuf(long ioffset, char **buf); + void getIDXBufDat(long ioffset, char **buf); + signed char findOffset(const char *key, long *start, unsigned long *size, + long away = 0, long *idxoff = 0); + void readText(long start, unsigned long *size, char **idxbuf, SWBuf &buf); + static signed char createModule(const char *path); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawtext.h b/include/rawtext.h new file mode 100644 index 0000000..32986fe --- /dev/null +++ b/include/rawtext.h @@ -0,0 +1,66 @@ +/****************************************************************************** + * rawtext.h - code for class 'RawText'- a module that reads raw text files: + * ot and nt using indexs ??.bks ??.cps ??.vss + * + * $Id: rawtext.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWTEXT_H +#define RAWTEXT_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +class RawStr; + +class SWDLLEXPORT RawText : public SWText, public RawVerse { + + RawStr *fastSearch[2]; + +public: + + RawText(const char *ipath, const char *iname = 0, const char *idesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, + const char* ilang = 0); + virtual ~RawText(); + virtual SWBuf &getRawEntryBuf(); + virtual void increment(int steps = 1); + virtual void decrement(int steps = 1) { increment(-steps); } + virtual signed char createSearchFramework( + void (*percent) (char, void *) = &nullPercent, + void *percentUserData = 0); + virtual void deleteSearchFramework(); + virtual bool hasSearchFramework() { return true; } + virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0, SWKey * scope = 0, bool * justCheckIfSupported = 0, void (*percent)(char, void *) = &SWModule::nullPercent, void *percentUserData = 0); + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *path) { return RawVerse::createModule(path); } + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + // end write interface ------------------------ + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawtext4.h b/include/rawtext4.h new file mode 100644 index 0000000..39552ac --- /dev/null +++ b/include/rawtext4.h @@ -0,0 +1,67 @@ +/****************************************************************************** + * rawtext.h - code for class 'RawText4'- a module that reads raw text files: + * ot and nt using indexs ??.bks ??.cps ??.vss + * + * $Id: rawtext.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RAWTEXT4_H +#define RAWTEXT4_H + +#include +#include +#include + +#include + +SWORD_NAMESPACE_START + +class RawStr; + +class SWDLLEXPORT RawText4 : public SWText, public RawVerse4 { + + RawStr4 *fastSearch[2]; + +public: + + RawText4(const char *ipath, const char *iname = 0, const char *idesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, + const char* ilang = 0); + virtual ~RawText4(); + virtual SWBuf &getRawEntryBuf(); + virtual void increment(int steps = 1); + virtual void decrement(int steps = 1) { increment(-steps); } + virtual signed char createSearchFramework( + void (*percent) (char, void *) = &nullPercent, + void *percentUserData = 0); + virtual void deleteSearchFramework(); + virtual bool hasSearchFramework() { return true; } + virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0, SWKey * scope = 0, bool * justCheckIfSupported = 0, void (*percent)(char, void *) = &SWModule::nullPercent, void *percentUserData = 0); + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *path) { return RawVerse4::createModule(path); } + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + // end write interface ------------------------ + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawverse.h b/include/rawverse.h new file mode 100644 index 0000000..00abff0 --- /dev/null +++ b/include/rawverse.h @@ -0,0 +1,42 @@ +/****************************************************************************** + * rawverse.h - code for class 'RawVerse'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class VerseKey + */ + +#ifndef RAWVERSE_H +#define RAWVERSE_H + + +#include + +SWORD_NAMESPACE_START + +class FileDesc; +class SWBuf; + +class SWDLLEXPORT RawVerse { + + + static int instance; // number of instantiated RawVerse objects or derivitives +protected: + FileDesc *idxfp[2]; + FileDesc *textfp[2]; + + char *path; + void prepText(SWBuf &buf); + void doSetText(char testmt, long idxoff, const char *buf, long len = -1); + void doLinkEntry(char testmt, long destidxoff, long srcidxoff); + +public: + static const char *nl; + RawVerse(const char *ipath, int fileMode = -1); + virtual ~RawVerse(); + void findOffset(char testmt, long idxoff, long *start, unsigned short *end); + void readText(char testmt, long start, unsigned short size, SWBuf &buf); + static char createModule(const char *path); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/rawverse4.h b/include/rawverse4.h new file mode 100644 index 0000000..0b3a767 --- /dev/null +++ b/include/rawverse4.h @@ -0,0 +1,42 @@ +/****************************************************************************** + * rawverse.h - code for class 'RawVerse'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class VerseKey + */ + +#ifndef RAWVERSE4_H +#define RAWVERSE4_H + + +#include + +SWORD_NAMESPACE_START + +class FileDesc; +class SWBuf; + +class SWDLLEXPORT RawVerse4 { + + + static int instance; // number of instantiated RawVerse objects or derivitives +protected: + FileDesc *idxfp[2]; + FileDesc *textfp[2]; + + char *path; + void prepText(SWBuf &buf); + void doSetText(char testmt, long idxoff, const char *buf, long len = -1); + void doLinkEntry(char testmt, long destidxoff, long srcidxoff); + +public: + static const char *nl; + RawVerse4(const char *ipath, int fileMode = -1); + virtual ~RawVerse4(); + void findOffset(char testmt, long idxoff, long *start, unsigned long *end); + void readText(char testmt, long start, unsigned long size, SWBuf &buf); + static char createModule(const char *path); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/regex.h b/include/regex.h new file mode 100644 index 0000000..a81e07d --- /dev/null +++ b/include/regex.h @@ -0,0 +1,545 @@ +/* Definitions for data structures and routines for the regular + expression library, version 0.12. + Copyright (C) 1985,89,90,91,92,93,95,96,97 Free Software Foundation, Inc. + + the C library, however. The master source lives in /gd/gnu/lib. + +NOTE: The canonical source of this file is maintained with the +GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. + +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, 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. */ + +#ifndef _REGEX_H +#define _REGEX_H 1 + +/* Allow the use in C++ code. */ +#ifdef __cplusplus +extern "C" +{ +#endif + +/* POSIX says that must be included (by the caller) before + . */ + +#if !defined (_POSIX_C_SOURCE) && !defined (_POSIX_SOURCE) && defined (VMS) +/* VMS doesn't have `size_t' in , even though POSIX says it + should be there. */ +#include +#endif + +/* The following two types have to be signed and unsigned integer type + wide enough to hold a value of a pointer. For most ANSI compilers + ptrdiff_t and size_t should be likely OK. Still size of these two + types is 2 for Microsoft C. Ugh... */ + typedef long int s_reg_t; + typedef unsigned long int active_reg_t; + +/* The following bits are used to determine the regexp syntax we + recognize. The set/not-set meanings are chosen so that Emacs syntax + remains the value 0. The bits are given in alphabetical order, and + the definitions shifted by one from the previous bit; thus, when we + add or remove a bit, only one other definition need change. */ + typedef unsigned long int reg_syntax_t; + +/* If this bit is not set, then \ inside a bracket expression is literal. + If set, then such a \ quotes the following character. */ +#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) + +/* If this bit is not set, then + and ? are operators, and \+ and \? are + literals. + If set, then \+ and \? are operators and + and ? are literals. */ +#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) + +/* If this bit is set, then character classes are supported. They are: + [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], + [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. + If not set, then character classes are not supported. */ +#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) + +/* If this bit is set, then ^ and $ are always anchors (outside bracket + expressions, of course). + If this bit is not set, then it depends: + ^ is an anchor if it is at the beginning of a regular + expression or after an open-group or an alternation operator; + $ is an anchor if it is at the end of a regular expression, or + before a close-group or an alternation operator. + + This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because + POSIX draft 11.2 says that * etc. in leading positions is undefined. + We already implemented a previous draft which made those constructs + invalid, though, so we haven't changed the code back. */ +#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) + +/* If this bit is set, then special characters are always special + regardless of where they are in the pattern. + If this bit is not set, then special characters are special only in + some contexts; otherwise they are ordinary. Specifically, + * + ? and intervals are only special when not after the beginning, + open-group, or alternation operator. */ +#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) + +/* If this bit is set, then *, +, ?, and { cannot be first in an re or + immediately after an alternation or begin-group operator. */ +#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) + +/* If this bit is set, then . matches newline. + If not set, then it doesn't. */ +#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) + +/* If this bit is set, then . doesn't match NUL. + If not set, then it does. */ +#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) + +/* If this bit is set, nonmatching lists [^...] do not match newline. + If not set, they do. */ +#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) + +/* If this bit is set, either \{...\} or {...} defines an + interval, depending on RE_NO_BK_BRACES. + If not set, \{, \}, {, and } are literals. */ +#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) + +/* If this bit is set, +, ? and | aren't recognized as operators. + If not set, they are. */ +#define RE_LIMITED_OPS (RE_INTERVALS << 1) + +/* If this bit is set, newline is an alternation operator. + If not set, newline is literal. */ +#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) + +/* If this bit is set, then `{...}' defines an interval, and \{ and \} + are literals. + If not set, then `\{...\}' defines an interval. */ +#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) + +/* If this bit is set, (...) defines a group, and \( and \) are literals. + If not set, \(...\) defines a group, and ( and ) are literals. */ +#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) + +/* If this bit is set, then \ matches . + If not set, then \ is a back-reference. */ +#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) + +/* If this bit is set, then | is an alternation operator, and \| is literal. + If not set, then \| is an alternation operator, and | is literal. */ +#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) + +/* If this bit is set, then an ending range point collating higher + than the starting range point, as in [z-a], is invalid. + If not set, then when ending range point collates higher than the + starting range point, the range is ignored. */ +#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) + +/* If this bit is set, then an unmatched ) is ordinary. + If not set, then an unmatched ) is invalid. */ +#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) + +/* If this bit is set, succeed as soon as we match the whole pattern, + without further backtracking. */ +#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) + +/* If this bit is set, do not process the GNU regex operators. + If not set, then the GNU regex operators are recognized. */ +#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) + +/* If this bit is set, turn on internal regex debugging. + If not set, and debugging was on, turn it off. + This only works if regex.c is compiled -DDEBUG. + We define this bit always, so that all that's needed to turn on + debugging is to recompile regex.c; the calling code can always have + this bit set, and it won't affect anything in the normal case. */ +#define RE_DEBUG (RE_NO_GNU_OPS << 1) + +/* This global variable defines the particular regexp syntax to use (for + some interfaces). When a regexp is compiled, the syntax used is + stored in the pattern buffer, so changing this does not affect + already-compiled regexps. */ + extern reg_syntax_t re_syntax_options; + +/* Define combinations of the above bits for the standard possibilities. + (The [[[ comments delimit what gets put into the Texinfo file, so + don't delete them!) */ +/* [[[begin syntaxes]]] */ +#define RE_SYNTAX_EMACS 0 + +#define RE_SYNTAX_AWK \ + (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ + | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ + | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) + +#define RE_SYNTAX_GNU_AWK \ + ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ + & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS)) + +#define RE_SYNTAX_POSIX_AWK \ + (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ + | RE_INTERVALS | RE_NO_GNU_OPS) + +#define RE_SYNTAX_GREP \ + (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ + | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ + | RE_NEWLINE_ALT) + +#define RE_SYNTAX_EGREP \ + (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ + | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ + | RE_NO_BK_VBAR) + +#define RE_SYNTAX_POSIX_EGREP \ + (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES) + +/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ +#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC + +#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC + +/* Syntax bits common to both basic and extended POSIX regex syntax. */ +#define _RE_SYNTAX_POSIX_COMMON \ + (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ + | RE_INTERVALS | RE_NO_EMPTY_RANGES) + +#define RE_SYNTAX_POSIX_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM) + +/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes + RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this + isn't minimal, since other operators, such as \`, aren't disabled. */ +#define RE_SYNTAX_POSIX_MINIMAL_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) + +#define RE_SYNTAX_POSIX_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_UNMATCHED_RIGHT_PAREN_ORD) + +/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS + replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ +#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) +/* [[[end syntaxes]]] */ + +/* Maximum number of duplicates an interval can allow. Some systems + (erroneously) define this in other header files, but we want our + value, so remove any previous define. */ +#ifdef RE_DUP_MAX +#undef RE_DUP_MAX +#endif +/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */ +#define RE_DUP_MAX (0x7fff) + + +/* POSIX `cflags' bits (i.e., information for `regcomp'). */ + +/* If this bit is set, then use extended regular expression syntax. + If not set, then use basic regular expression syntax. */ +#define REG_EXTENDED 1 + +/* If this bit is set, then ignore case when matching. + If not set, then case is significant. */ +#define REG_ICASE (REG_EXTENDED << 1) + +/* If this bit is set, then anchors do not match at newline + characters in the string. + If not set, then anchors do match at newlines. */ +#define REG_NEWLINE (REG_ICASE << 1) + +/* If this bit is set, then report only success or fail in regexec. + If not set, then returns differ between not matching and errors. */ +#define REG_NOSUB (REG_NEWLINE << 1) + + +/* POSIX `eflags' bits (i.e., information for regexec). */ + +/* If this bit is set, then the beginning-of-line operator doesn't match + the beginning of the string (presumably because it's not the + beginning of a line). + If not set, then the beginning-of-line operator does match the + beginning of the string. */ +#define REG_NOTBOL 1 + +/* Like REG_NOTBOL, except for the end-of-line. */ +#define REG_NOTEOL (1 << 1) + + +/* If any error codes are removed, changed, or added, update the + `re_error_msg' table in regex.c. */ + typedef enum + { + REG_NOERROR = 0, /* Success. */ + REG_NOMATCH, /* Didn't find a match (for regexec). */ + + /* POSIX regcomp return error codes. (In the order listed in the + standard.) */ + REG_BADPAT, /* Invalid pattern. */ + REG_ECOLLATE, /* Not implemented. */ + REG_ECTYPE, /* Invalid character class name. */ + REG_EESCAPE, /* Trailing backslash. */ + REG_ESUBREG, /* Invalid back reference. */ + REG_EBRACK, /* Unmatched left bracket. */ + REG_EPAREN, /* Parenthesis imbalance. */ + REG_EBRACE, /* Unmatched \{. */ + REG_BADBR, /* Invalid contents of \{\}. */ + REG_ERANGE, /* Invalid range end. */ + REG_ESPACE, /* Ran out of memory. */ + REG_BADRPT, /* No preceding re for repetition op. */ + + /* Error codes we've added. */ + REG_EEND, /* Premature end. */ + REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ + REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ + } + reg_errcode_t; + +/* This data structure represents a compiled pattern. Before calling + the pattern compiler, the fields `buffer', `allocated', `fastmap', + `translate', and `no_sub' can be set. After the pattern has been + compiled, the `re_nsub' field is available. All other fields are + private to the regex routines. */ + +#ifndef RE_TRANSLATE_TYPE +#define RE_TRANSLATE_TYPE char * +#endif + + struct re_pattern_buffer + { +/* [[[begin pattern_buffer]]] */ + /* Space that holds the compiled pattern. It is declared as + `unsigned char *' because its elements are + sometimes used as array indexes. */ + unsigned char *buffer; + + /* Number of bytes to which `buffer' points. */ + unsigned long int allocated; + + /* Number of bytes actually used in `buffer'. */ + unsigned long int used; + + /* Syntax setting with which the pattern was compiled. */ + reg_syntax_t syntax; + + /* Pointer to a fastmap, if any, otherwise zero. re_search uses + the fastmap, if there is one, to skip over impossible + starting points for matches. */ + char *fastmap; + + /* Either a translate table to apply to all characters before + comparing them, or zero for no translation. The translation + is applied to a pattern when it is compiled and to a string + when it is matched. */ + RE_TRANSLATE_TYPE translate; + + /* Number of subexpressions found by the compiler. */ + size_t re_nsub; + + /* Zero if this pattern cannot match the empty string, one else. + Well, in truth it's used only in `re_search_2', to see + whether or not we should use the fastmap, so we don't set + this absolutely perfectly; see `re_compile_fastmap' (the + `duplicate' case). */ + unsigned can_be_null:1; + + /* If REGS_UNALLOCATED, allocate space in the `regs' structure + for `max (RE_NREGS, re_nsub + 1)' groups. + If REGS_REALLOCATE, reallocate space if necessary. + If REGS_FIXED, use what's there. */ +#define REGS_UNALLOCATED 0 +#define REGS_REALLOCATE 1 +#define REGS_FIXED 2 + unsigned regs_allocated:2; + + /* Set to zero when `regex_compile' compiles a pattern; set to one + by `re_compile_fastmap' if it updates the fastmap. */ + unsigned fastmap_accurate:1; + + /* If set, `re_match_2' does not return information about + subexpressions. */ + unsigned no_sub:1; + + /* If set, a beginning-of-line anchor doesn't match at the + beginning of the string. */ + unsigned not_bol:1; + + /* Similarly for an end-of-line anchor. */ + unsigned not_eol:1; + + /* If true, an anchor at a newline matches. */ + unsigned newline_anchor:1; + +/* [[[end pattern_buffer]]] */ + }; + + typedef struct re_pattern_buffer regex_t; + +/* Type for byte offsets within the string. POSIX mandates this. */ + typedef int regoff_t; + + +/* This is the structure we store register match data in. See + regex.texinfo for a full description of what registers match. */ + struct re_registers + { + unsigned num_regs; + regoff_t *start; + regoff_t *end; + }; + + +/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, + `re_match_2' returns information about at least this many registers + the first time a `regs' structure is passed. */ +#ifndef RE_NREGS +#define RE_NREGS 30 +#endif + + +/* POSIX specification for registers. Aside from the different names than + `re_registers', POSIX uses an array of structures, instead of a + structure of arrays. */ + typedef struct + { + regoff_t rm_so; /* Byte offset from string's start to substring's start. */ + regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ + } + regmatch_t; + +/* Declarations for routines. */ + +/* To avoid duplicating every routine declaration -- once with a + prototype (if we are ANSI), and once without (if we aren't) -- we + use the following macro to declare argument types. This + unfortunately clutters up the declarations a bit, but I think it's + worth it. */ +#ifndef __STDC__ +#define __STDC__ 1 +#endif +#if __STDC__ + +#define _RE_ARGS(args) args + +#else /* not __STDC__ */ + +#define _RE_ARGS(args) () + +#endif /* not __STDC__ */ + +/* Sets the current default syntax to SYNTAX, and return the old syntax. + You can also simply assign to the `re_syntax_options' variable. */ + extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax)); + +/* Compile the regular expression PATTERN, with length LENGTH + and syntax given by the global `re_syntax_options', into the buffer + BUFFER. Return NULL if successful, and an error string if not. */ + extern const char *re_compile_pattern + _RE_ARGS ((const char *pattern, size_t length, + struct re_pattern_buffer * buffer)); + + +/* Compile a fastmap for the compiled pattern in BUFFER; used to + accelerate searches. Return 0 if successful and -2 if was an + internal error. */ + extern int re_compile_fastmap + _RE_ARGS ((struct re_pattern_buffer * buffer)); + + +/* Search in the string STRING (with length LENGTH) for the pattern + compiled into BUFFER. Start searching at position START, for RANGE + characters. Return the starting position of the match, -1 for no + match, or -2 for an internal error. Also return register + information in REGS (if REGS and BUFFER->no_sub are nonzero). */ + extern int re_search + _RE_ARGS ((struct re_pattern_buffer * buffer, const char *string, + int length, int start, int range, struct re_registers * regs)); + + +/* Like `re_search', but search in the concatenation of STRING1 and + STRING2. Also, stop searching at index START + STOP. */ + extern int re_search_2 + _RE_ARGS ((struct re_pattern_buffer * buffer, const char *string1, + int length1, const char *string2, int length2, + int start, int range, struct re_registers * regs, int stop)); + + +/* Like `re_search', but return how many characters in STRING the regexp + in BUFFER matched, starting at position START. */ + extern int re_match + _RE_ARGS ((struct re_pattern_buffer * buffer, const char *string, + int length, int start, struct re_registers * regs)); + + +/* Relates to `re_match' as `re_search_2' relates to `re_search'. */ + extern int re_match_2 + _RE_ARGS ((struct re_pattern_buffer * buffer, const char *string1, + int length1, const char *string2, int length2, + int start, struct re_registers * regs, int stop)); + + +/* Set REGS to hold NUM_REGS registers, storing them in STARTS and + ENDS. Subsequent matches using BUFFER and REGS will use this memory + for recording register information. STARTS and ENDS must be + allocated with malloc, and must each be at least `NUM_REGS * sizeof + (regoff_t)' bytes long. + + If NUM_REGS == 0, then subsequent matches should allocate their own + register data. + + Unless this function is called, the first search or match using + PATTERN_BUFFER will allocate its own register data, without + freeing the old data. */ + extern void re_set_registers + _RE_ARGS ((struct re_pattern_buffer * buffer, struct re_registers * regs, + unsigned num_regs, regoff_t * starts, regoff_t * ends)); + +#ifdef _REGEX_RE_COMP +#ifndef _CRAY +/* 4.2 bsd compatibility. */ + extern char *re_comp _RE_ARGS ((const char *)); + extern int re_exec _RE_ARGS ((const char *)); +#endif +#endif + +/* POSIX compatibility. */ + extern int regcomp + _RE_ARGS ((regex_t * preg, const char *pattern, int cflags)); + extern int regexec + _RE_ARGS ( + (const regex_t * preg, const char *string, size_t nmatch, + regmatch_t pmatch[], int eflags)); + extern size_t regerror + _RE_ARGS ( + (int errcode, const regex_t * preg, char *errbuf, + size_t errbuf_size)); + extern void regfree _RE_ARGS ((regex_t * preg)); + + +#ifdef __cplusplus +} +#endif /* C++ */ + +#endif /* regex.h */ + +/* +Local variables: +make-backup-files: t +version-control: t +trim-versions-without-asking: nil +End: +*/ diff --git a/include/roman.h b/include/roman.h new file mode 100644 index 0000000..dd1acbd --- /dev/null +++ b/include/roman.h @@ -0,0 +1,36 @@ +/****************************************************************************** + * roman.h - roman numeral functions + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ +#ifndef ROMAN_H +#define ROMAN_H + +#include +SWORD_NAMESPACE_START + +/** Checks if a string is a roman numeral. +*/ +char isroman(const char *); +/* char* to_rom(int num, char *p); */ + +/** Converts a roman numeral to a string. +* @param s Roman numeral to convert. +*/ +int from_rom(const char *s); + +SWORD_NAMESPACE_END +#endif diff --git a/include/rtfhtml.h b/include/rtfhtml.h new file mode 100644 index 0000000..4fba5ed --- /dev/null +++ b/include/rtfhtml.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * + * $Id: rtfhtml.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef RTFHTML_H +#define RTFHTML_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts RTF text into HTML text + */ +class SWDLLEXPORT RTFHTML : public SWFilter { +public: + RTFHTML(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/sapphire.h b/include/sapphire.h new file mode 100644 index 0000000..a5e21ad --- /dev/null +++ b/include/sapphire.h @@ -0,0 +1,59 @@ +/* sapphire.h -- Interface for the Saphire II stream cipher. + + Dedicated to the Public Domain the author and inventor + (Michael Paul Johnson). This code comes with no warranty. + Use it at your own risk. + Ported from the Pascal implementation of the Sapphire Stream + Cipher 9 December 1994. + Added hash-specific functions 27 December 1994. + Made index variable initialization key-dependent, + made the output function more resistant to cryptanalysis, + and renamed to Sapphire II Stream Cipher 2 January 1995. + + unsigned char is assumed to be 8 bits. If it is not, the + results of assignments need to be reduced to 8 bits with + & 0xFF or % 0x100, whichever is faster. +*/ + +#ifndef NULL +#define NULL 0 +#endif /* */ + +#include + +SWORD_NAMESPACE_START + + class sapphire +{ + + // These variables comprise the state of the state machine. + unsigned char cards[256]; // A permutation of 0-255. + unsigned char rotor, // Index that rotates smoothly + ratchet, // Index that moves erratically + avalanche, // Index heavily data dependent + last_plain, // Last plain text byte + last_cipher; // Last cipher text byte + + // This function is used by initialize(), which is called by the + // constructor. + unsigned char keyrand (int limit, unsigned char *user_key, + unsigned char keysize, unsigned char *rsum, +unsigned *keypos); public:sapphire (unsigned char + *key = NULL, // Calls initialize if a real + unsigned char keysize = 0); // key is provided. If none + // is provided, call initialize + // before encrypt or decrypt. + ~sapphire (); // Destroy cipher state information. + void initialize (unsigned char *key, // User key is used to set + unsigned char keysize); // up state information. + void hash_init (void); // Set up default hash. + unsigned char encrypt (unsigned char b = 0); // Encrypt byte + // or get a random byte. + unsigned char decrypt (unsigned char b); // Decrypt byte. + void hash_final (unsigned char *hash, // Copy hash value to hash + unsigned char hashlength = 20); // Hash length (16-32) + void burn (void); // Destroy cipher state information. +}; + + +SWORD_NAMESPACE_END diff --git a/include/scsuutf8.h b/include/scsuutf8.h new file mode 100644 index 0000000..000cdd6 --- /dev/null +++ b/include/scsuutf8.h @@ -0,0 +1,40 @@ +/****************************************************************************** + * + * $Id: scsuutf8.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SCSUUTF8_H +#define SCSUUTF8_H + +#include + +SWORD_NAMESPACE_START + +/** This filter converts SCSU compressed (encoded) text to UTF-8 + */ +class SWDLLEXPORT SCSUUTF8 : public SWFilter { + unsigned long c, d; + unsigned char* UTF8Output(unsigned long, unsigned char* text); + +public: + SCSUUTF8(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/stringmgr.h b/include/stringmgr.h new file mode 100644 index 0000000..fe2eb5e --- /dev/null +++ b/include/stringmgr.h @@ -0,0 +1,120 @@ +/****************************************************************************** + * stringmgr.h - A class which provides string handling functions which can + * be reimplemented by frontends + * + * $Id: stringmgr.h 2098 2007-10-07 18:57:07Z scribe $ + * + * Copyright 2005 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + + +#ifndef STRINGMGR_H +#define STRINGMGR_H + +#include +#include +#include + +SWORD_NAMESPACE_START + +/** StringMgr is a way to provide UTf8 handling by the Sword frontend + * Each platform, if it's up-to-date, should provide functions to handle unicode and utf8. This class makes it possible to implement Unicode support on the user-side and not in Sword itself. + */ +class SWDLLEXPORT StringMgr { +public: + + /** Sets the global StringMgr handle + * @param newStringMgr The new global StringMgr. This pointer will be deleted by this StringMgr + */ + static void setSystemStringMgr(StringMgr *newStringMgr); + + /** Returns the global StringMgr handle + * @return The global string handle + */ + static StringMgr *getSystemStringMgr(); + + /** Checks whether Utf8 support is available. + * Override the function supportsUnicode() to tell whether your implementation has utf8 support. + * @return True if this implementation provides support for Utf8 handling or false if just latin1 handling is available + */ + static inline bool hasUTF8Support() { + return getSystemStringMgr()->supportsUnicode(); + }; + + /** Converts the param to an upper case Utf8 string + * @param text The text encoded in utf8 which should be turned into an upper case string + * @param max Max buffer size + * @return text buffer (only for convenience) + */ + virtual char *upperUTF8(char *text, unsigned int max = 0) const; + + /** Converts the param to an uppercase latin1 string + * @param text The text encoded in latin1 which should be turned into an upper case string + * @param max Max buffer size + * @return text buffer (only for convenience) + */ + virtual char *upperLatin1(char *text, unsigned int max = 0) const; + + +protected: + friend class __staticsystemStringMgr; + + /** Default constructor. Protected to make instances on user side impossible, because this is a Singleton + */ + StringMgr(); + + /** Copy constructor + */ + StringMgr(const StringMgr &); + + /** Destructor + */ + virtual ~StringMgr(); + + virtual bool supportsUnicode() const; + +private: + static StringMgr *systemStringMgr; +}; + +inline char *toupperstr(char *t, unsigned int max = 0) { + return StringMgr::getSystemStringMgr()->upperUTF8(t, max); +} + +inline char *toupperstr_utf8(char *t, unsigned int max = 0) { + return StringMgr::getSystemStringMgr()->upperUTF8(t, max); +} + +/** + * Converts an SWBuf filled with UTF-8 to upper case + * + * @param b SWBuf to change to upper case + * + * @return b for convenience + */ +inline SWBuf &toupperstr(SWBuf &b) { + char *utf8 = 0; + stdstr(&utf8, b.c_str(), 2); + toupperstr(utf8, strlen(utf8)*2); + b = utf8; + delete [] utf8; + return b; +} + +SWORD_NAMESPACE_END + + +#endif //STRINGMGR_H diff --git a/include/strkey.h b/include/strkey.h new file mode 100644 index 0000000..29cb0a9 --- /dev/null +++ b/include/strkey.h @@ -0,0 +1,55 @@ +/****************************************************************************** + * strkey.h - code for class 'strkey'- a standard Biblical verse key + * + * $Id: strkey.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + + +#ifndef STRKEY_H +#define STRKEY_H + +#include + +#include + +SWORD_NAMESPACE_START + + /** a standard string key class (used + * for modules that index on single strings (eg. cities, + * names, words, etc.) + */ +class SWDLLEXPORT StrKey:public SWKey +{ + static SWClass classdef; + void init (); +public: + /** initializes instance of StrKey + * + * @param ikey text key (word, city, name, etc.) + */ + StrKey (const char *ikey = 0); + /** cleans up instance of StrKey + */ + virtual ~ StrKey (); + + SWKEY_OPERATORS + +}; +SWORD_NAMESPACE_END + +#endif diff --git a/include/swbasicfilter.h b/include/swbasicfilter.h new file mode 100644 index 0000000..c3f9aee --- /dev/null +++ b/include/swbasicfilter.h @@ -0,0 +1,204 @@ +/****************************************************************************** + * swbasicfilter.h - definition of class SWBasicFilter. An SWFilter + * impl that provides some basic methods that + * many filter will need and can use as a starting + * point. + * + * $Id: swbasicfilter.h 1984 2006-10-08 05:06:52Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWBASICFILTER_H +#define SWBASICFILTER_H + +#include +#include + +SWORD_NAMESPACE_START + + +// not a protected inner class because MSVC++ sucks and can't handle it +class SWDLLEXPORT BasicFilterUserData { +public: + BasicFilterUserData(const SWModule *module, const SWKey *key) { this->module = module; this->key = key; suspendTextPassThru = false; supressAdjacentWhitespace = false; } + virtual ~BasicFilterUserData() {} + const SWModule *module; + const SWKey *key; + SWBuf lastTextNode; + SWBuf lastSuspendSegment; + bool suspendTextPassThru; + bool supressAdjacentWhitespace; +}; + +/** A filter providing commonly used functionality. + * This filter has facilities for handling SGML/HTML/XML like tokens and + * escape strings (like SGML entities). It has the facility for just + * substituting the given tokens and escape strings to other strings and for + * "manual" custom token handling. + * + * In this class the functions with arguments looking as char + * **buf write a character sequnce at address specified by + * *buf address and change *buf to point past + * the last char of the written sequence. + */ +class SWDLLEXPORT SWBasicFilter : public SWFilter { + +class Private; + + char *tokenStart; + char *tokenEnd; + char *escStart; + char *escEnd; + char escStartLen; + char escEndLen; + char tokenStartLen; + char tokenEndLen; + bool escStringCaseSensitive; + bool tokenCaseSensitive; + bool passThruUnknownToken; + bool passThruUnknownEsc; + bool passThruNumericEsc; + char processStages; + + + Private *p; +public: + + SWBasicFilter(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); + virtual ~SWBasicFilter(); + +protected: + + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new BasicFilterUserData(module, key); + } + + // STAGEs + static const char INITIALIZE; // flag for indicating processing before char loop + static const char PRECHAR; // flag for indicating processing at top in char loop + static const char POSTCHAR; // flag for indicating processing at bottom in char loop + static const char FINALIZE; // flag for indicating processing after char loop + + + /** Sets the beginning of escape sequence (by default "&").*/ + void setEscapeStart(const char *escStart); + + /** Sets the end of escape sequence (by default ";").*/ + void setEscapeEnd(const char *escEnd); + + /** Sets the beginning of token start sequence (by default "<").*/ + void setTokenStart(const char *tokenStart); + + /** Sets the end of token start sequence (by default ">").*/ + void setTokenEnd(const char *tokenEnd); + + /** Sets whether to pass thru an unknown token unchanged + * or just remove it. + * Default is false.*/ + void setPassThruUnknownToken(bool val); + + /** Sets whether to pass thru an unknown escape sequence unchanged + * or just remove it. + * Default is false. + */ + void setPassThruUnknownEscapeString(bool val); + + /** Sets whether to pass thru a numeric escape sequence unchanged + * or allow it to be handled otherwise. + * Default is false.*/ + void setPassThruNumericEscapeString(bool val); + + /** Are escapeStrings case sensitive or not? Call this + * function before addEscapeStingSubstitute() + */ + void setEscapeStringCaseSensitive(bool val); + + /** Registers an esc control sequence that can pass unchanged + */ + void addAllowedEscapeString(const char *findString); + + /** Unregisters an esc control sequence that can pass unchanged + */ + void removeAllowedEscapeString(const char *findString); + + /** Registers an esc control sequence + */ + void addEscapeStringSubstitute(const char *findString, const char *replaceString); + + /** Unregisters an esc control sequence + */ + void removeEscapeStringSubstitute(const char *findString); + + /** This function performs the substitution of escapeStrings */ + bool substituteEscapeString(SWBuf &buf, const char *escString); + + /** This passes allowed escapeStrings */ + bool passAllowedEscapeString(SWBuf &buf, const char *escString); + + /** This appends escString to buf as an entity */ + void appendEscapeString(SWBuf &buf, const char *escString); + + /** Are tokens case sensitive (like in GBF) or not? Call this + * function before addTokenSubstitute() + */ + void setTokenCaseSensitive(bool val); + + /** Registers a simple token substitutions. Usually called from the + * c-tor of a subclass + */ + void addTokenSubstitute(const char *findString, const char *replaceString); + + /** Unregisters a simple token substitute + */ + void removeTokenSubstitute(const char *findString); + + /** This function performs the substitution of tokens */ + bool substituteToken(SWBuf &buf, const char *token); + + /** This function is called for every token encountered in the input text. + * @param buf the output buffer + * @param token the token (e.g. "p align='left'" + * @param userData user storage space for data transient to 1 full buffer parse + * @return subclasses should return true if they handled the token, or false if they did not. + */ + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); + + virtual bool processStage(char /*stage*/, SWBuf &/*text*/, char *&/*from*/, BasicFilterUserData * /*userData*/) { return false; } + virtual void setStageProcessing(char stages) { processStages = stages; } // see STATICs up above + + /** This function is called for every escape sequence encountered in the input text. + * @param buf the output buffer + * @param escString the escape sequence (e.g. "amp" for &amp;) + * @param userData user storage space for data transient to 1 full buffer parse + * @return false if was not handled and should be handled in + * @return subclasses should return true if they handled the esc seq, or false if they did not. + */ + virtual bool handleEscapeString(SWBuf &buf, const char *escString, BasicFilterUserData *userData); + + /** This function is called for all numeric escape sequences. If passThrough + * @param buf the output buffer + * @param escString the escape sequence (e.g. "#235" for &235;) + * @return subclasses should return true if they handled the esc seq, or false if they did not. + */ + virtual bool handleNumericEscapeString(SWBuf &buf, const char *escString); + + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swbuf.h b/include/swbuf.h new file mode 100644 index 0000000..6ae6958 --- /dev/null +++ b/include/swbuf.h @@ -0,0 +1,430 @@ +/****************************************************************************** +* swbuf.h - code for SWBuf used as a transport and utility for data buffers +* +* $Id: swbuf.h 2116 2007-10-17 00:12:27Z scribe $ +* +* Copyright 2003 CrossWire Bible Society (http://www.crosswire.org) +* CrossWire Bible Society +* P. O. Box 2528 +* Tempe, AZ 85280-2528 +* +* 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 version 2. +* +* 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. +* +*/ + +#ifndef SWBUF_H +#define SWBUF_H + +#include +#include +#include +#ifdef __BORLANDC__ +#include +#endif + +SWORD_NAMESPACE_START + + +#define JUNKBUFSIZE 65534 + +/** +* This class is used as a transport and utility for data buffers. +* +* @warning This class does not perform pointer validity checks (for speed reasons). +* Therefore, never try to pass an invalid string (const char* 0) as an argument- +* it will crash your program. You need to perform the checks yourself! +*/ +class SWDLLEXPORT SWBuf { + char *buf; + char *end; + char *endAlloc; + char fillByte; + unsigned long allocSize; + static char *nullStr; + static char junkBuf[JUNKBUFSIZE]; + + inline void assureMore(size_t pastEnd) { + if (size_t(endAlloc-end) < pastEnd) { + assureSize(allocSize + pastEnd); + } + } + + inline void assureSize(size_t checkSize) { + if (checkSize > allocSize) { + long size = (end - buf); + checkSize += 128; + buf = (char *)((allocSize) ? realloc(buf, checkSize) : malloc(checkSize)); + allocSize = checkSize; + end = (buf + size); + *end = 0; + endAlloc = buf + allocSize - 1; + } + } + + inline void init(size_t initSize) { + fillByte = ' '; + allocSize = 0; + buf = nullStr; + end = buf; + endAlloc = buf; + if (initSize) + assureSize(initSize); + } + + +public: + + /****************************************************************************** + * SWBuf Constructor - Creates an empty SWBuf object + * + */ + inline SWBuf() { + init(0); + } + + /** + * SWBuf Constructor - Creates an SWBuf initialized + * to a value from a const char * + * + */ + SWBuf(const char *initVal, unsigned long initSize = 0); +// SWBuf(unsigned long initSize); + + /** + * SWBuf Constructor - Creates an SWBuf initialized + * to a value from a char + * + */ + SWBuf(char initVal, unsigned long initSize = 0); + + /** + * SWBuf Constructor - Creates an SWBuf initialized + * to a value from another SWBuf + * + */ + SWBuf(const SWBuf &other, unsigned long initSize = 0); + + /****************************************************************************** + * SWBuf Destructor - Cleans up instance of SWBuf + */ + inline ~SWBuf() { + if ((buf) && (buf != nullStr)) + free(buf); + } + + /** + * SWBuf::setFillByte - Set the fillByte character + * + * @param ch This character is used when the SWBuf is (re)sized. + * The memory will be filled with this character. \see setSize() \see resize() + */ + inline void setFillByte(char ch) { fillByte = ch; } + + /** + * SWBuf::getFillByte - Get the fillByte character + * + * @return The character used for filling memory. \see setFillByte. + */ + inline char getFillByte() { return fillByte; } + + /** + * @return a pointer to the buffer content (null-terminated string) + */ + inline const char *c_str() const{ return buf; } + + /** + * @param pos The position of the requested character. + * @return The character at the specified position + */ + inline char &charAt(unsigned long pos) { return ((pos <= (unsigned long)(end - buf)) ? buf[pos] : ((*junkBuf=0),*junkBuf)); } + + /** + * @return size() and length() return only the number of characters of the string. + * Add one for the following null and one for each char to be appended! + */ + inline unsigned long size() const { return length(); } + + /** + * set's the size of the buffer. This is a quick inline method which checks + * for changes before actually calling setSize(). + * @param newSize new size of the buffer + */ + inline void size(unsigned long newSize) { if (end - buf - newSize) setSize(newSize); } + + /** + * @return size() and length() return only the number of characters of the string. + */ + inline unsigned long length() const { return end - buf; } + + /** + * SWBuf::set - sets this buf to a new value + * If the allocated memory is bigger than the new string, it will NOT be resized. + * @param newVal the value to set this buffer to. + */ + inline void set(const SWBuf &newVal) { + unsigned long len = newVal.length() + 1; + assureSize(len); +// const char *n = newVal.c_str(); +// for (end = buf;len;len--) *end++ = *n++; + memcpy(buf, newVal.c_str(), len); + end = buf + (len - 1); + } + + /** + * SWBuf::set - sets this buf to a new value. + * If the allocated memory is bigger than the new string, it will NOT be resized. + * @param newVal the value to set this buffer to. + */ + inline void set(const char *newVal) { + if (newVal) { + unsigned long len = strlen(newVal) + 1; + assureSize(len); + memcpy(buf, newVal, len); + end = buf + (len - 1); + } + else { + assureSize(1); + end = buf; + *end = 0; + } + } + + /** + * SWBuf::setFormatted - sets this buf to a formatted string. + * If the allocated memory is bigger than the new string, it will NOT be resized. + * + * @warning This function can only write at most JUNKBUFSIZE to the string per call. + * + * @warning This function is not very fast. For loops with many iterations you might + * consider replacing it by other calls. + * Example: + * \code SWBuf buf.setFormatted("<%s>", stringVal); \endcode + * should be replaced by: + * \code buf.set("<"); buf.append(stringVal); buf.append(">"); \endcode + * This will produce much faster results. + * + * @param format The format string. Same syntax as printf, for example. + * @param ... Add all arguments here. + */ + void setFormatted(const char *format, ...); + + /** + * SWBuf::setSize - Size this buffer to a specific length. + * @param len The new size of the buffer. One byte for the null will be added. + */ + void setSize(unsigned long len); + /** + * SWBuf::resize - Resize this buffer to a specific length. + * @param len The new size of the buffer. One byte for the null will be added. + */ + inline void resize(unsigned long len) { setSize(len); } + + /** + * SWBuf::append - appends a value to the current value of this SWBuf. + * If the allocated memory is not enough, it will be resized accordingly. + * @param str Append this. + * @param max Append only max chars. + */ + void append(const char *str, long max = -1); + + /** + * SWBuf::append - appends a value to the current value of this SWBuf + * If the allocated memory is not enough, it will be resized accordingly. + * @param str Append this. + * @param max Append only max chars. + */ + inline void append(const SWBuf &str, long max = -1) { append(str.c_str(), max); } + + /** + * SWBuf::append - appends a value to the current value of this SWBuf + * If the allocated memory is not enough, it will be resized accordingly. + * @param ch Append this. + */ + inline void append(char ch) { + assureMore(1); + *end++ = ch; + *end = 0; + } + + /** + * SWBuf::appendFormatted - appends formatted strings to the current value of this SWBuf. + * + * @warning This function can only write at most JUNKBUFSIZE to the string per call. + * + * @warning This function is not very fast. For loops with many iterations you might + * consider replacing it by other calls. + * Example: + * \code SWBuf buf.appendFormatted("<%s>", stringVal); \endcode + * should be replaced by: + * \code buf.append("<"); buf.append(stringVal); buf.append(">"); \endcode + * This will produce much faster results. + * + * @param format The format string. Same syntax as printf, for example. + * @param ... Add all arguments here. + */ + void appendFormatted(const char *format, ...); + + /** + * SWBuf::insert - inserts the given string at position into this string + * @param pos The position where to insert. pos=0 inserts at the beginning, pos=1 after the first char, etc. Using pos=length() is the same as calling append(s) + * @param str string to be inserted + * @param start start from this position in the string to be inserted + * @param max Insert only max chars. + */ + void insert(unsigned long pos, const char* str, unsigned long start = 0, signed long max = -1); + + /** + * SWBuf::insert - inserts the given string at position into this string + * @param pos The position where to insert. pos=0 inserts at the beginning, pos=1 after the first char, etc. Using pos=length() is the same as calling append(s) + * @param str string to be inserted + * @param start start from this position in the string to be inserted + * @param max Insert only max chars. + */ + inline void insert(unsigned long pos, const SWBuf &str, unsigned long start = 0, signed long max = -1) { + insert(pos, str.c_str(), start, max); + }; + + /** + * SWBuf::insert - inserts the given character at position into this string + * @param pos The position where to insert. pos=0 inserts at the beginning, pos=1 after the first char, etc. Using pos=length() is the same as calling append(s) + * @param c Insert this. + */ + inline void insert(unsigned long pos, char c) { + insert(pos, SWBuf(c)); + } + + /** SWBuf::getRawData + * + * @warning be careful! Probably setSize needs to be called in conjunction before and maybe after + * + * @return Pointer to the allocated memory of the SWBuf. + */ + inline char *getRawData() { return buf; } + + inline operator const char *() const { return c_str(); } + inline char &operator[](unsigned long pos) { return charAt(pos); } + inline char &operator[](long pos) { return charAt((unsigned long)pos); } + inline char &operator[](unsigned int pos) { return charAt((unsigned long)pos); } + inline char &operator[](int pos) { return charAt((unsigned long)pos); } + inline SWBuf &operator =(const char *newVal) { set(newVal); return *this; } + inline SWBuf &operator =(const SWBuf &other) { set(other); return *this; } + inline SWBuf &operator +=(const char *str) { append(str); return *this; } + inline SWBuf &operator +=(char ch) { append(ch); return *this; } + + /** + * Decrease the buffer size, discarding the last characters + * @param len how many bytes to decrease the buffer size + */ + inline SWBuf &operator -=(unsigned long len) { setSize(length()-len); return *this; } + + /** + * Decrease the buffer size, discarding the last character + */ + inline SWBuf &operator --(int) { operator -=(1); return *this; } + + /** + * Shift the buffer to the left, discarding the first bytes, decreasing the buffer size + */ + inline SWBuf &operator <<(unsigned long n) { if (n && length()) { n = (n<=length())?n:(length()-1); memmove(buf, buf+n, length()-n); (*this)-=n; } return *this; } + + /** + * Shift the buffer to the right, increasing the buffer size + */ + inline SWBuf &operator >>(unsigned long n) { setSize(length()+n); memmove(buf+n, buf, length()-n); return *this; } + + /** + * Concatenate another buffer to the end of this buffer + */ + inline SWBuf operator +(const SWBuf &other) const { + SWBuf retVal = buf; + retVal += other; + return retVal; + } + + /** + * Concatenate a byte to the end of this buffer + */ + inline SWBuf operator +(char ch) const { return (*this) + SWBuf(ch); } + + /** + * Trim whitespace from the start of this buffer, shifting the buffer left as necessary + */ + inline SWBuf &trimStart() { while (size() && (strchr("\t\r\n ", *(buf)))) *this << 1; return *this; } + + /** + * Trim whitespace from the end of this buffer, decreasing the size as necessary + */ + inline SWBuf &trimEnd() { while (size() && (strchr("\t\r\n ", *(end-1)))) setSize(size()-1); return *this; } + + /** + * Trim whitespace from the start and end of this buffer, shifting left and decreasing size as necessary + */ + inline SWBuf &trim() { trimStart(); return trimEnd(); } + + + /** + * Strip a prefix from this buffer up to a separator byte. + * Returns the prefix and modifies this buffer, shifting left to remove prefix + * @param separator to use (e.g. ':') + * @return prefix if separator character found; otherwise, null and leaves buffer unmodified + */ + inline const char *stripPrefix(char separator) { const char *m = strchr(buf, separator); if (m) { int len = m-buf; char *hold = new char[len]; memcpy(hold, buf, len); *this << (len+1); memcpy(end+1, hold, len); delete [] hold; end[len+1] = 0; } return (m) ? end+1 : 0; } // safe. we know we don't actually realloc and shrink buffer when shifting, so we can place our return val at end. + + // this could be nicer, like replacing a contiguous series of target bytes with single replacement; offering replacement const char * + /** + * Replace with a new byte value all occurances in this buffer of any byte value specified in a set + * @param targets a set of bytes, any of which will be replaced + * @param newByte value to use as replacement. + * + * Example: replaceBytes("abc", 'z'); // replaces all occurances of 'a', 'b', and 'c' with 'z' + */ + inline SWBuf &replaceBytes(const char *targets, char newByte) { for (unsigned int i = 0; (i < size()); i++) { if (strchr(targets, buf[i])) buf[i] = newByte; } return *this; } + + /** + * @return returns true if this buffer starts with the specified prefix + */ + inline bool startsWith(const SWBuf &prefix) const { return !strncmp(c_str(), prefix.c_str(), prefix.size()); } + + /** + * @return returns true if this buffer ends with the specified postfix + */ + inline bool endsWith(const SWBuf &postfix) const { return (size() >= postfix.size())?!strncmp(end-postfix.size(), postfix.c_str(), postfix.size()):false; } + + inline int compare(const SWBuf &other) const { return strcmp(c_str(), other.c_str()); } + inline bool operator ==(const SWBuf &other) const { return compare(other) == 0; } + inline bool operator !=(const SWBuf &other) const { return compare(other) != 0; } + inline bool operator > (const SWBuf &other) const { return compare(other) > 0; } + inline bool operator < (const SWBuf &other) const { return compare(other) < 0; } + inline bool operator <=(const SWBuf &other) const { return compare(other) <= 0; } + inline bool operator >=(const SWBuf &other) const { return compare(other) >= 0; } + + /** + * @return returns true if this buffer starts with the specified prefix + */ + inline bool startsWith(const char *prefix) const { return !strncmp(c_str(), prefix, strlen(prefix)); } + + /** + * @return returns true if this buffer ends with the specified postfix + */ + inline bool endsWith(const char *postfix) const { unsigned int psize = strlen(postfix); return (size() >= psize)?!strncmp(end-psize, postfix, psize):false; } + + inline int compare(const char *other) const { return strcmp(c_str(), other); } + inline bool operator ==(const char *other) const { return compare(other) == 0; } + inline bool operator !=(const char *other) const { return compare(other) != 0; } + inline bool operator > (const char *other) const { return compare(other) > 0; } + inline bool operator < (const char *other) const { return compare(other) < 0; } + inline bool operator <=(const char *other) const { return compare(other) <= 0; } + inline bool operator >=(const char *other) const { return compare(other) >= 0; } +}; + + + +SWORD_NAMESPACE_END +#endif diff --git a/include/swcacher.h b/include/swcacher.h new file mode 100644 index 0000000..a68cb16 --- /dev/null +++ b/include/swcacher.h @@ -0,0 +1,43 @@ +/****************************************************************************** + * swcacher.h - definition of class SWCacher used to provide an interface for + * objects that cache and want a standard interface for cleaning up. + * + * $Id: swcacher.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWCACHER_H +#define SWCACHER_H + +#include + +SWORD_NAMESPACE_START + +/** used to provide an interface for objects that cache and want + * a standard interface for cleaning up. + */ +class SWDLLEXPORT SWCacher { +public: + SWCacher(); + virtual ~SWCacher(); + virtual void flush(); + virtual long resourceConsumption(); + virtual long lastAccess(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swcipher.h b/include/swcipher.h new file mode 100644 index 0000000..d9fad23 --- /dev/null +++ b/include/swcipher.h @@ -0,0 +1,52 @@ +/****************************************************************************** + * swcipher.h - definition of Class SWCipher used for data cipher/decipher + * + * $Id: swcipher.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1999 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWCIPHER_H +#define SWCIPHER_H + +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT SWCipher +{ + + sapphire master; + sapphire work; + + char *buf; + bool cipher; + unsigned long len; +protected: +public: + SWCipher (unsigned char *key); + virtual void setCipherKey (const char *key); + virtual ~ SWCipher (); + virtual char *Buf (const char *buf = 0, unsigned long len = 0); + virtual char *cipherBuf (unsigned long *len, const char *buf = 0); + virtual void Encode (void); + virtual void Decode (void); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swcom.h b/include/swcom.h new file mode 100644 index 0000000..5b17d83 --- /dev/null +++ b/include/swcom.h @@ -0,0 +1,69 @@ +/****************************************************************************** + * swcom.h - code for base class 'SWCom'. SWCom is the basis for all + * types of commentary modules + * + * $Id: swcom.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWCOM_H +#define SWCOM_H + +#include + +#include + +SWORD_NAMESPACE_START + +class VerseKey; +class SWKey; + + /** The basis for all commentary modules + */ +class SWDLLEXPORT SWCom : public SWModule { + + mutable VerseKey *tmpVK; + +protected: + VerseKey &getVerseKey() const; + + +public: + + /** Initializes data for instance of SWCom + */ + SWCom(const char *imodname = 0, const char *imoddesc = 0, + SWDisplay * idisp = 0, SWTextEncoding enc = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, + SWTextMarkup mark = FMT_UNKNOWN, const char* ilang = 0); + + virtual ~SWCom(); + virtual SWKey *CreateKey(); + + virtual long Index() const; + virtual long Index(long iindex); + + + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swcomprs.h b/include/swcomprs.h new file mode 100644 index 0000000..e7a772e --- /dev/null +++ b/include/swcomprs.h @@ -0,0 +1,48 @@ +/****************************************************************************** + * swcomprs.h - definition of Class SWCompress used for data compression + * + * $Id: swcomprs.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWCOMPRS_H +#define SWCOMPRS_H + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT SWCompress +{ + void Init (); + void cycleStream (); +protected: + char *buf, *zbuf, direct; // 0 - encode; 1 - decode + unsigned long zlen, zpos, pos, slen; +public: + SWCompress (); + virtual ~ SWCompress (); + virtual char *Buf (const char *buf = 0, unsigned long *len = 0); + virtual char *zBuf (unsigned long *len, char *buf = 0); + virtual unsigned long GetChars (char *buf, unsigned long len); // override for other than buffer compression + virtual unsigned long SendChars (char *buf, unsigned long len); // override for other than buffer compression + virtual void Encode (void); // override to provide compression algorythm + virtual void Decode (void); // override to provide compression algorythm +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swconfig.h b/include/swconfig.h new file mode 100644 index 0000000..5bc46d9 --- /dev/null +++ b/include/swconfig.h @@ -0,0 +1,87 @@ +/****************************************************************************** + * swconfig.h - definition of Class SWConfig used for saving and retrieval + * of configuration information + * + * $Id: swconfig.h 2094 2007-09-29 00:34:03Z chrislit $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWCONFIG_H +#define SWCONFIG_H + +#include + +#include +#include +#include + +SWORD_NAMESPACE_START + +typedef multimapwithdefault < SWBuf, SWBuf, std::less < SWBuf > >ConfigEntMap; +typedef std::map < SWBuf, ConfigEntMap, std::less < SWBuf > >SectionMap; + +/** The class to read and save settings using a file on disk. +* +*/ +class SWDLLEXPORT SWConfig { +private: + char getline(int fd, SWBuf &line); +public: + /** The filename used by this SWConfig object + * + */ + SWBuf filename; + /** Map of available sections + * The map of available sections. + */ + SectionMap Sections; + + /** Constructor of SWConfig + * @param ifilename The file, which should be used for this config. + */ + SWConfig(const char *ifilename); + virtual ~SWConfig(); + + /** Load from disk + * Load the content from disk. + */ + virtual void Load(); + + /** Save to disk + * Save the content of this config object to disk. + */ + virtual void Save(); + + /** Merges the values of addFrom + * @param addFrom The config which values should be merged to this config object. Already existing values will be overwritten. + */ + virtual void augment(SWConfig &addFrom); + virtual SWConfig & operator +=(SWConfig &addFrom) { augment(addFrom); return *this; } + + /** Get a section + * This is an easy way to get and store config values. + * The following will work:\n + * + * @code + * SWConfig config("/home/user/.setttings"); + * config["Colors"]["Background"] = "red"; + * @endcode + */ + virtual ConfigEntMap & operator [](const char *section); + }; +SWORD_NAMESPACE_END +#endif diff --git a/include/swdisp.h b/include/swdisp.h new file mode 100644 index 0000000..ca56a6e --- /dev/null +++ b/include/swdisp.h @@ -0,0 +1,53 @@ +/****************************************************************************** + * swdisp.h - code for base class 'swdisp'. swdisp is the basis for all + * types of displays (e.g. raw textout, curses, xwindow, etc.) + * + * $Id: swdisp.h 1825 2005-06-10 09:03:37Z jansorg $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWDISP_H +#define SWDISP_H + +#include +#include + +SWORD_NAMESPACE_START + +class SWModule; + +/** swdisp is the basis for all types of displays +* (e.g. raw textout, curses, xwindow, etc.) +*/ +class SWDLLEXPORT SWDisplay : public SWObject { + static SWClass classdef; +public: + SWDisplay () { myclass = &classdef; }; + virtual ~SWDisplay() {}; + + /** casts a module to a character pointer and displays it to + * raw output (overriden for different display types and + * module types if necessary) + * + * @param imodule module to display + * @return error status + */ + virtual char Display (SWModule & imodule); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swfilter.h b/include/swfilter.h new file mode 100644 index 0000000..8e16e22 --- /dev/null +++ b/include/swfilter.h @@ -0,0 +1,55 @@ +/****************************************************************************** + * swfilter.h - definition of class SWFilter used to filter text between + * different formats + * + * $Id: swfilter.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWFILTER_H +#define SWFILTER_H + +#include + +SWORD_NAMESPACE_START + +class SWKey; +class SWBuf; +class SWModule; + + +class SWModule; + +/** Base class for all filters in sword. +* Filters are used to filter/convert text between different formats +* like GBF, HTML, RTF ... +*/ +class SWDLLEXPORT SWFilter { +public: + virtual ~SWFilter() {} + + /** This is the main filter function + * @param text The text to be filtered/converted + * @param key Current key That was used. + * @param module Current module. + * @return 0 + */ + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0) = 0; +}; + + SWORD_NAMESPACE_END +#endif diff --git a/include/swfiltermgr.h b/include/swfiltermgr.h new file mode 100644 index 0000000..49923fe --- /dev/null +++ b/include/swfiltermgr.h @@ -0,0 +1,87 @@ +/****************************************************************************** + * swfiltermgr.h - definition of class SWFilterMgr used as an interface to + * manage filters on a module + * + * $Id: swfiltermgr.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWFILTERMGR_H +#define SWFILTERMGR_H + +#include +#include + +SWORD_NAMESPACE_START + +class SWModule; +class SWMgr; + +/** Class to manage different kinds of filters. +*/ +class SWDLLEXPORT SWFilterMgr { + +private: + SWMgr *parentMgr; + +public: + SWFilterMgr(); + virtual ~SWFilterMgr(); + + virtual void setParentMgr(SWMgr *parentMgr); + virtual SWMgr *getParentMgr(); + + virtual void AddGlobalOptions(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, + ConfigEntMap::iterator end); + virtual void AddLocalOptions(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, + ConfigEntMap::iterator end); + + + /** + * Adds the encoding filters which are defined in "section" to the SWModule object "module". + * @param module To this module the encoding filter(s) are added + * @param section We use this section to get a list of filters we should apply to the module + */ + virtual void AddEncodingFilters(SWModule *module, ConfigEntMap §ion); + + + /** + * Adds the render filters which are defined in "section" to the SWModule object "module". + * @param module To this module the render filter(s) are added + * @param section We use this section to get a list of filters we should apply to the module + */ + virtual void AddRenderFilters(SWModule *module, ConfigEntMap §ion); + + + /** + * Adds the strip filters which are defined in "section" to the SWModule object "module". + * @param module To this module the strip filter(s) are added + * @param section We use this section to get a list of filters we should apply to the module + */ + virtual void AddStripFilters(SWModule *module, ConfigEntMap §ion); + + + /** + * Adds the raw filters which are defined in "section" to the SWModule object "module". + * @param module To this module the raw filter(s) are added + * @param section We use this section to get a list of filters we should apply to the module + */ + virtual void AddRawFilters(SWModule *module, ConfigEntMap §ion); + +}; +SWORD_NAMESPACE_END +#endif diff --git a/include/swgenbook.h b/include/swgenbook.h new file mode 100644 index 0000000..3cfa785 --- /dev/null +++ b/include/swgenbook.h @@ -0,0 +1,57 @@ +/****************************************************************************** +* swgenbook.h +* +* $Id: swgenbook.h 1864 2005-11-20 06:06:40Z scribe $ +* +* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) +* CrossWire Bible Society +* P. O. Box 2528 +* Tempe, AZ 85280-2528 +* +* 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 version 2. +* +* 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. +* +*/ + +#ifndef SWGENBOOK_H +#define SWGENBOOK_H + +#include + +#include + +SWORD_NAMESPACE_START + +/** The basis for all Book modules. +*/ +class SWDLLEXPORT SWGenBook : public SWModule { + +protected: + char *entkeytxt; + +public: + /** Initializes data for instance of SWGenBook + */ + SWGenBook(const char *imodname = 0, const char *imoddesc = 0, + SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, + SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0); + + virtual ~SWGenBook(); + virtual SWKey *CreateKey() = 0; + + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swinputmeth.h b/include/swinputmeth.h new file mode 100644 index 0000000..e2d14e2 --- /dev/null +++ b/include/swinputmeth.h @@ -0,0 +1,34 @@ +/** + * Title: + * Description: + * Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL + * Company: + * @author Troy A. Griffitts + * @version 1.0 + */ + +#ifndef SWINPUTMETHOD_H +#define SWINPUTMETHOD_H + +#include +SWORD_NAMESPACE_START + +class SWDLLEXPORT SWInputMethod { + +private: + int state; + +protected: + virtual void setState(int state); + +public: + SWInputMethod(); + virtual ~SWInputMethod() {} + + virtual int *translate(char in) = 0; + virtual int getState(); + virtual void clearState(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swkey.h b/include/swkey.h new file mode 100644 index 0000000..ed62e67 --- /dev/null +++ b/include/swkey.h @@ -0,0 +1,214 @@ +/****************************************************************************** + * swkey.h - code for base class 'swkey'. swkey is the basis for all + * types of keys for indexing into modules (e.g. verse, word, + * place, etc.) + * + * $Id: swkey.h 2121 2007-11-24 16:42:32Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWKEY_H +#define SWKEY_H + +#include + +#include + +SWORD_NAMESPACE_START + +#define KEYERR_OUTOFBOUNDS 1 + +#define SWKEY_OPERATORS \ + SWKey &operator =(const char *ikey) { setText(ikey); return *this; } \ + SWKey &operator =(const SWKey &ikey) { copyFrom(ikey); return *this; } \ + SWKey &operator =(SW_POSITION pos) { setPosition(pos); return *this; } \ + operator const char *() const { return getText(); } \ + bool operator ==(const SWKey &ikey) { return equals(ikey); } \ + bool operator !=(const SWKey &ikey) { return !equals(ikey); } \ + virtual bool operator >(const SWKey &ikey) { return (compare(ikey) > 0); } \ + virtual bool operator <(const SWKey &ikey) { return (compare(ikey) < 0); } \ + virtual bool operator >=(const SWKey &ikey) { return (compare(ikey) > -1); } \ + virtual bool operator <=(const SWKey &ikey) { return (compare(ikey) < 1); } \ + SWKey &operator -=(int steps) { decrement(steps); return *this; } \ + SWKey &operator +=(int steps) { increment(steps); return *this; } \ + SWKey &operator++(int) { return *this += 1; } \ + SWKey &operator--(int) { return *this -= 1; } + + +/** For use with = operator to position key. +*/ +class SW_POSITION { + char pos; +public: + SW_POSITION(char ipos) { pos = ipos; } + operator char() { return pos; } +}; + +#define POS_TOP ((char)1) +#define POS_BOTTOM ((char)2) + +#define TOP SW_POSITION(POS_TOP) +#define BOTTOM SW_POSITION(POS_BOTTOM) + +/** SWKey is used for positioning an SWModule to a specific entry. + * It always represents a possible location into a module and can additionally represent + * a domain of entries (e.g. "John 3:16" in the domain "John 1:1 - Mark 5:25") + */ +class SWDLLEXPORT SWKey : public SWObject { + long index; + static SWClass classdef; + void init(); + +protected: + char *keytext; + mutable char *rangeText; + mutable bool boundSet; + char persist; + char error; + +public: + + // misc pointer for whatever + void *userData; + + /** initializes instance of SWKey from a string + * All keys can be reduced to a string representation which should be able + * to be used to again set the key to the same position + * @param ikey string to use for initializing this new key + */ + SWKey(const char *ikey = 0); + + /** Copy Constructor + * @param k The SWKey object to copy. + */ + SWKey(SWKey const &k); + + /** Destructor, cleans up this instance of SWKey + */ + virtual ~SWKey(); + + /** Returns a new exact clone of this SWKey object. This allocates + * a new SWKey which must be deleted by the caller + * @return new clone of this key + */ + virtual SWKey *clone() const; + + /** Gets whether this key should persist in any module to which it is set + * otherwise just a copy will be used in the module. + * @return 1 - persists in module; 0 - a copy is attempted + */ + char Persist() const; + + /** Sets whether this key should persist in any module to which it is set + * otherwise just a copy will be used in the module. + * @param ipersist value which to set persist; + * @return 1 - persists in module; 0 - a copy is attempted + */ + char Persist(signed char ipersist); + + /** Gets and clears error status + * @return error status + */ + virtual char Error(); + + /** Sets this SWKey with a character string + * @param ikey string used to set this key + */ + virtual void setText(const char *ikey); + + /** Copies as much info (position, range, etc.) as possible from another SWKey object + * @param ikey other SWKey object from which to copy + */ + virtual void copyFrom(const SWKey &ikey); + + /** returns string representation of this key + */ + virtual const char *getText() const; + virtual const char *getShortText() const { return getText(); } + virtual const char *getRangeText() const; + virtual bool isBoundSet() const { return boundSet; } + virtual void clearBound() const { boundSet = false; } + + /** Compares this key object to another SWKey object + * @param ikey key to compare with this one + * @return >0 if this key is greater than compare key; + * <0 if this key is smaller than compare key; + * 0 if the keys are the same + */ + virtual int compare(const SWKey &ikey); + + /** test equality of this SWKey object's position with another SWKey + * @param ikey key to compare with this one + * @return true if the key positions are equal + */ + virtual bool equals(const SWKey &ikey) { return !compare(ikey); } + + virtual void setPosition(SW_POSITION); + + /** Decrements key a number of entry positions + * This is only valid if isTraversable is true + * @param steps Number of entries to jump backward + */ + virtual void decrement(int steps = 1); + + /** Increments key a number of entry positions + * This is only valid if isTraversable is true + * @param steps Number of entries to jump forward + */ + virtual void increment(int steps = 1); + + /** deprecated, use isTraversible + */ + char Traversable() { return (isTraversable()) ? 1:0; } + + /** Whether or not this key can be ++ -- incremented + */ + virtual bool isTraversable() const { return false; } + + /** Use this function to get an index position within a module. + * Here's a small example how to use this function and @ref Index(long). + * This function uses the GerLut module and chooses a random verse from the + * Bible and returns it. + * @code + * const char* randomVerse() { + * VerseKey vk; + * SWMgr mgr; + * LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName("de"); + * + * SWModule* module = mgr->Modules("GerLut"); + * srand( time(0) ); + * const double newIndex = (double(rand())/RAND_MAX)*(24108+8224); + * vk.Index(newIndex); + * module->setKey(vk); + * + * char* text; + * sprintf(text, "%s: %s",(const char*)vk ,module->StripText(&vk)); + * return text; + * @endcode + */ + virtual long Index() const { return index; } + + /** See documentation for @ref Index() + */ + virtual long Index(long iindex) { index = iindex; return index; } + + SWKEY_OPERATORS + + }; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swld.h b/include/swld.h new file mode 100644 index 0000000..28d416b --- /dev/null +++ b/include/swld.h @@ -0,0 +1,66 @@ +/****************************************************************************** + * swld.h - code for base class 'SWLD'. SWLD is the basis for all + * types of Lexicon and Dictionary modules (hence the 'LD'). + * + * $Id: swld.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWLD_H +#define SWLD_H + +#include + +#include + +SWORD_NAMESPACE_START + + /** the basis for all types of Lexicon and + * Dictionary modules (hence the 'LD'). + */ +class SWDLLEXPORT SWLD : public SWModule { +protected: + char *entkeytxt; +public: + /** Initializes data for instance of SWLD + */ + SWLD(const char *imodname = 0, const char *imoddesc = 0, + SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, + SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0); + + virtual ~SWLD(); + virtual SWKey *CreateKey(); + + /** Sets/gets module KeyText, getting from saved text if key is persistent + * + * @param ikeytext value which to set keytext; + * [0] - only get + * @return pointer to keytext + */ + virtual const char *KeyText(const char *ikeytext = 0); + virtual void setPosition(SW_POSITION pos); + + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swlocale.h b/include/swlocale.h new file mode 100644 index 0000000..afe45a1 --- /dev/null +++ b/include/swlocale.h @@ -0,0 +1,76 @@ +/****************************************************************************** + * swlocale.h - definition of Class SWLocale used for retrieval + * of locale lookups + * + * $Id: swlocale.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 2000 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWLOCALE_H +#define SWLOCALE_H + +#include + +SWORD_NAMESPACE_START + +class SWConfig; +static const int ENDOFABBREVS = -2; + +/** SWLocale is used for the localisation of the booknames +* The SWLocale is a class which holds the information of one language. +* Every language supported by SWORD has one SWLocale object, +* get the name of the Language using @see getname of this class. +* Another functions useful for frontend developers is @see getDescription. +*/ +class SWDLLEXPORT SWLocale { + +class Private; + + Private *p; + + SWConfig *localeSource; + + char *name; + char *description; + char *encoding; + struct abbrev *bookAbbrevs; + char *BMAX; + struct sbook **books; + +public: + SWLocale(const char *ifilename); + virtual ~SWLocale(); + + /** + * This function is used to get the name of the languages which this object is handling. + * @return The name of the managed language. A possible example is "de". + */ + virtual const char *getName(); + /** + * @return The description. A possible example is "German". + */ + virtual const char *getDescription(); + virtual const char *getEncoding(); + virtual const char *translate(const char *text); + virtual void augment(SWLocale &addFrom); + virtual SWLocale & operator +=(SWLocale &addFrom) { augment(addFrom); return *this; } + virtual const struct abbrev *getBookAbbrevs(); + virtual void getBooks(char **iBMAX, struct sbook ***ibooks); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swlog.h b/include/swlog.h new file mode 100644 index 0000000..9aa6109 --- /dev/null +++ b/include/swlog.h @@ -0,0 +1,63 @@ +/****************************************************************************** + * swlog.h - definition of class SWLog used for logging messages + * + * $Id: swlog.h 2080 2007-09-17 06:21:29Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +//--------------------------------------------------------------------------- +#ifndef swlogH +#define swlogH +//--------------------------------------------------------------------------- + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT SWLog { +protected: + char logLevel; + static SWLog *systemLog; + +public: + + static const int LOG_ERROR; + static const int LOG_WARN; + static const int LOG_INFO; + static const int LOG_TIMEDINFO; + static const int LOG_DEBUG; + + static SWLog *getSystemLog(); + static void setSystemLog(SWLog *newLogger); + + SWLog() { logLevel = 1; /*default to show only errors*/} + virtual ~SWLog() {}; + + void setLogLevel(char level) { logLevel = level; } + char getLogLevel() const { return logLevel; } + void logWarning(const char *fmt, ...) const; + void logError(const char *fmt, ...) const; + void logInformation(const char *fmt, ...) const; + virtual void logTimedInformation(const char *fmt, ...) const; + void logDebug(const char *fmt, ...) const; + + // Override this method if you want to have a custom logger + virtual void logMessage(const char *message, int level) const; +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swmacs.h b/include/swmacs.h new file mode 100644 index 0000000..4da07b0 --- /dev/null +++ b/include/swmacs.h @@ -0,0 +1,32 @@ +/****************************************************************************** + * swmacs.h - generic macros + * + * $Id: swmacs.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWMACS_H +#define SWMACS_H + +#include + +SWORD_NAMESPACE_START +// Maximum positive value of a signed numeric type +#define MAXPOS(x) ((x)((unsigned x)(1L << (sizeof(x)*8-1)) - 1)) + +SWORD_NAMESPACE_END +#endif diff --git a/include/swmgr.h b/include/swmgr.h new file mode 100644 index 0000000..7991933 --- /dev/null +++ b/include/swmgr.h @@ -0,0 +1,353 @@ +/****************************************************************************** + * swmgr.h - definition of class SWMgr used to interact with an install + * base of sword modules. + * + * $Id: swmgr.h 2149 2008-03-31 04:44:30Z scribe $ + * + * Copyright 1998-2008 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +/** @mainpage The SWORD Project - API documentation + * This is the API documentation for The SWORD Project. + * It describes the structure of the SWORD library and documents the functions of the classes. + * From time to time this documentation gives programming examples, too. + * + * SWORD provides a simple to use engine for working with many types of texts including Bibles, + * commentaries, lexicons, glossaries, daily devotionals, and others. + * + * Some main classes: + * + * SWMgr gives access to an installed library of modules (books). + * SWModule represents an individual module + * SWKey represents a location into a module (e.g. "John 3:16") + * + * An API Primer can be found at: + * + * http://crosswire.org/sword/develop/swordapi/apiprimer.jsp + * + * If you're interested in working on a client which uses SWORD, please first have a look at + * some of the existing ones. They can always use help, and will also prove to be good examples + * if you decide to start a new project. + * + * Well known frontends are:\n + * -SWORD for Windows (http://crosswire.org/sword/software/biblecs/)\n + * -GnomeSword (http://gnomesword.sourceforge.net/)\n + * -BibleTime (http://www.bibletime.info/)\n + */ + +#ifndef SWMGR_H +#define SWMGR_H + +#include +#include +#include +#include + +#include + +SWORD_NAMESPACE_START + +class SWModule; +class SWFilter; +class SWOptionFilter; +class SWFilterMgr; +class SWBuf; +class SWKey; + +typedef std::map < SWBuf, SWModule *, std::less < SWBuf > >ModMap; +typedef std::map < SWBuf, SWFilter * >FilterMap; +typedef std::map < SWBuf, SWOptionFilter * >OptionFilterMap; +typedef std::list < SWBuf >StringList; +typedef std::list < SWFilter* >FilterList; +typedef std::list < SWOptionFilter* >OptionFilterList; + +class FileDesc; +class SWOptionFilter; + +/** SWMgr exposes an installed module set + * + * SWMgr exposes an installed module set and can be asked to configure the desired + * markup and options which modules will produce. + * + * @version $Id: swmgr.h 2149 2008-03-31 04:44:30Z scribe $ + */ +class SWDLLEXPORT SWMgr { + + +private: + bool mgrModeMultiMod; + bool augmentHome; + void commonInit(SWConfig *iconfig, SWConfig *isysconfig, bool autoload, SWFilterMgr *filterMgr, bool multiMod = false); + +protected: + SWFilterMgr *filterMgr; //made protected because because BibleTime needs it + SWConfig *myconfig; //made protected because because BibleTime needs it + SWConfig *mysysconfig; + SWConfig *homeConfig; + void CreateMods(bool multiMod = false); + SWModule *CreateMod(const char *name, const char *driver, ConfigEntMap §ion); + void DeleteMods(); + char configType; // 0 = file; 1 = directory + OptionFilterMap optionFilters; + FilterMap cipherFilters; + SWFilter *gbfplain; + SWFilter *thmlplain; + SWFilter *osisplain; + SWFilter *teiplain; + SWOptionFilter *transliterator; + FilterList cleanupFilters; + StringList options; + virtual void init(); // use to initialize before loading modules + virtual char AddModToConfig(FileDesc *conffd, const char *fname); + virtual void loadConfigDir(const char *ipath); + virtual void AddGlobalOptions(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, ConfigEntMap::iterator end); + virtual void AddLocalOptions(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, ConfigEntMap::iterator end); + StringList augPaths; + + /** + * Called to add appropriate Encoding Filters to a module. Override to do special actions, + * if desired. See the module.conf Encoding= entry. + * @param module module to which to add Encoding Filters + * @param section configuration information from module.conf + */ + virtual void AddEncodingFilters(SWModule *module, ConfigEntMap §ion); + + /** + * Called to add appropriate Render Filters to a module. Override to do special actions, + * if desired. See the module.conf SourceType= entry. + * @param module module to which to add Render Filters + * @param section configuration information from module.conf + */ + virtual void AddRenderFilters(SWModule *module, ConfigEntMap §ion); + + /** + * Called to add appropriate Strip Filters to a module. Override to do special actions, + * if desired. See the module.conf SourceType= entry. + * @param module module to which to add Strip Filters + * @param section configuration information from module.conf + */ + virtual void AddStripFilters(SWModule *module, ConfigEntMap §ion); + + // ones manually specified in .conf file + virtual void AddStripFilters(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, ConfigEntMap::iterator end); + + /** + * Called to add appropriate Raw Filters to a module. Override to do special actions, + * if desired. See the module.conf CipherKey= entry. + * @param module module to which to add Raw Filters + * @param section configuration information from module.conf + */ + virtual void AddRawFilters(SWModule *module, ConfigEntMap §ion); + + +public: + + static bool isICU; + static const char *globalConfPath; + + /** + * + */ + static void findConfig(char *configType, char **prefixPath, char **configPath, StringList *augPaths = 0, SWConfig *providedSysConf = 0); + + SWConfig *config; + SWConfig *sysconfig; + + /** The path to main module set and locales + */ + char *prefixPath; + + /** path to main module set configuration + */ + char *configPath; + + /** The map of available modules. + * This map exposes the installed modules. + * Here's an example how to iterate over the map and check the module type of each module. + * + *@code + * ModMap::iterator it; + * SWModule *curMod = 0; + * + * for (it = Modules.begin(); it != Modules.end(); it++) { + * curMod = (*it).second; + * if (!strcmp(curMod->Type(), "Biblical Texts")) { + * // do something with curMod + * } + * else if (!strcmp(curMod->Type(), "Commentaries")) { + * // do something with curMod + * } + * else if (!strcmp(curMod->Type(), "Lexicons / Dictionaries")) { + * // do something with curMod + * } + * } + * @endcode + */ + ModMap Modules; + + /** Gets a specific module by name. e.g. SWModule *kjv = myManager.getModule("KJV"); + * @param modName the name of the module to retrieve + * @return the module, if found, otherwise 0 + */ + SWModule *getModule(const char *modName) { ModMap::iterator it = Modules.find(modName); return ((it != Modules.end()) ? it->second : 0); } + const SWModule *getModule(const char *modName) const { ModMap::const_iterator it = Modules.find(modName); return ((it != Modules.end()) ? it->second : 0); } + + + /** Constructs an instance of SWMgr + * + * @param iconfig manually supply a configuration. If not supplied, SWMgr will look on the system + * using a complex hierarchical search. See README for detailed specifics. + * @param isysconfig + * @param autoload whether or not to immediately load modules on construction of this SWMgr. + * If you reimplemented SWMgr you can set this to false and call SWMgr::Load() after you have + * completed the contruction and setup of your SWMgr subclass. + * @param filterMgr an SWFilterMgr subclass to use to manager filters on modules + * SWMgr TAKES OWNERSHIP FOR DELETING THIS OBJECT + * For example, this will create an SWMgr and cause its modules to produce HTMLHREF formatted output + * when asked for renderable text: + * + * SWMgr *myMgr = new SWMgr(0, 0, true, new MarkupFilterMgr(FMT_HTMLHREF)); + */ + SWMgr(SWConfig *iconfig = 0, SWConfig *isysconfig = 0, bool autoload = true, SWFilterMgr *filterMgr = 0, bool multiMod = false); + + /** + */ + SWMgr(SWFilterMgr *filterMgr, bool multiMod = false); + + /** + * @param iConfigPath provide a custom path to use for module set location, instead of + * searching the system for it. + */ + SWMgr(const char *iConfigPath, bool autoload = true, SWFilterMgr *filterMgr = 0, bool multiMod = false, bool augmentHome = true); + + /** The destructor of SWMgr. + * This function cleans up the modules and deletes the created object. + * Destroying the SWMgr causes all retrieved SWModule object to be invalid, so + * be sure to destroy only when retrieved objects are no longer needed. + */ + virtual ~SWMgr(); + + /** + * Adds books from a new path to the library + * @param path the path in which to search for books + * @param multiMod whether or not to keep multiple copies of the same book if found in different paths + * default - false, uses last found version of the book + */ + virtual void augmentModules(const char *path, bool multiMod = false); + + void deleteModule(const char *); + + /** Looks for any newly installed module.conf file in the path provided, + * displays the copyright information to the user, and then copies the + * module.conf to the main module set's mods.d directory + * @param dir where to search for new modules + */ + virtual void InstallScan(const char *dir); + + /** Load all modules. Should only be manually called if SWMgr was constructed + * without autoload; otherwise, this will be called on SWMgr construction + * Reimplement this function to supply special functionality when modules are + * initially loaded. + */ + virtual signed char Load(); + + /** Change the values of global options (e.g. Footnotes, Strong's Number, etc.) + * @param option The name of the option, for which you want to change the + * value. Well known and often used values are "Footnotes" or "Strong's Numbers" + * @param value new value. Common values are "On" and "Off" + */ + virtual void setGlobalOption(const char *option, const char *value); + + /** Get the current value of the given option + * @param option the name of the option, who's value is desired + * @return the value of the given option + */ + virtual const char *getGlobalOption(const char *option); + + /** Gets a brief description for the given option + * @param option the name of the option, who's tip is desired + * @return description text + * @see setGlobalOption, getGlobalOption, getGlobalOptions + */ + virtual const char *getGlobalOptionTip(const char *option); + + /** Gets a list of all available option names + * @return list of option names + */ + virtual StringList getGlobalOptions(); + + /** Gets a list of legal values to which a specific option + * may be set + * @param option the name of the option, who's legal values are desired + * @return a list of legal values for the given option + */ + virtual StringList getGlobalOptionValues(const char *option); + + /** Filters a buffer thru a named filter + * @param filterName + * @param text buffer to filter + * @param key context key if filter needs this for processing + * @param module context module if filter needs this for processing + * @return error status + */ + virtual char filterText(const char *filterName, SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); + + /** + * Sets the cipher key for the given module. This function updates the key + * at runtime, but it does not write to the config file. + * To write the new unlock key to the config file use code like this: + * + * @code + * SectionMap::iterator section; + * ConfigEntMap::iterator entry; + * DIR *dir = opendir(configPath); + * struct dirent *ent; + * char* modFile; + * if (dir) { // find and update .conf file + * rewinddir(dir); + * while ((ent = readdir(dir))) + * { + * if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) + * { + * modFile = m_backend->configPath; + * modFile += "/"; + * modFile += ent->d_name; + * SWConfig *myConfig = new SWConfig( modFile ); + * section = myConfig->Sections.find( m_module->Name() ); + * if ( section != myConfig->Sections.end() ) + * { + * entry = section->second.find("CipherKey"); + * if (entry != section->second.end()) + * { + * entry->second = unlockKey;//set cipher key + * myConfig->Save();//save config file + * } + * } + * delete myConfig; + * } + * } + * } + * closedir(dir); + * @endcode + * + * @param modName For this module we change the unlockKey + * @param key This is the new unlck key we use for te module. + */ + virtual signed char setCipherKey(const char *modName, const char *key); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swmodule.h b/include/swmodule.h new file mode 100644 index 0000000..f1db7e9 --- /dev/null +++ b/include/swmodule.h @@ -0,0 +1,673 @@ +/****************************************************************************** + * swmodule.h - code for base class 'module'. Module is the basis for all + * types of modules (e.g. texts, commentaries, maps, lexicons, + * etc.) + * + * $Id: swmodule.h 2093 2007-09-28 19:20:22Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWMODULE_H +#define SWMODULE_H + +#include +#include +#include + +#include +#include + +#include + +#include + +SWORD_NAMESPACE_START + +class SWOptionFilter; +class SWFilter; + +#define SEARCHFLAG_MATCHWHOLEENTRY 4096 + +#define SWMODULE_OPERATORS \ + operator const char *() { return RenderText(); } \ + operator SWKey &() { return *getKey(); } \ + operator SWKey *() { return getKey(); } \ + SWModule &operator <<(const char *inbuf) { setEntry(inbuf); return *this; } \ + SWModule &operator <<(const SWKey *sourceKey) { linkEntry(sourceKey); return *this; } \ + SWModule &operator -=(int steps) { decrement(steps); return *this; } \ + SWModule &operator +=(int steps) { increment(steps); return *this; } \ + SWModule &operator ++(int) { return *this += 1; } \ + SWModule &operator --(int) { return *this -= 1; } \ + SWModule &operator =(SW_POSITION p) { setPosition(p); return *this; } + + +typedef std::list < SWFilter * >FilterList; +typedef std::list < SWOptionFilter * >OptionFilterList; +typedef std::map < SWBuf, SWBuf, std::less < SWBuf > > AttributeValue; +typedef std::map < SWBuf, AttributeValue, std::less < SWBuf > > AttributeList; +typedef std::map < SWBuf, AttributeList, std::less < SWBuf > > AttributeTypeList; + +#define SWTextDirection char +#define SWTextEncoding char +#define SWTextMarkup char + +/** + * The class SWModule is the base class for all modules used in Sword. + * It provides functions to look up a text passage, to search in the module, + * to switch on/off the state of optional things like Strong's numbers or + * footnotes. + * + * SWModule has also functions to write to the data files. + */ + +// TODO: should all SWModule decendents be SWCachers? Only some really +// cache data. But if we don't do this, then we need another mechanism to +// check if we are an SWCacher. Maybe make SWModule extend SWObject (which +// it probably should anyway. But then we need to add all the cheezy +// heirarchy info to all he decendent classes for our SWDYNAMIC_CAST and +// then we can see if we implement SWCacher so we know whether or not to add +// to the yet to be developed cachemgr. +// Just leave for now. This lets us always able to call module->flush() +// to manually flush a cache, and doesn't hurt if there is no work done. + +class SWDLLEXPORT SWModule : public SWCacher, public SWSearchable { + +protected: + + ConfigEntMap ownConfig; + ConfigEntMap *config; + mutable AttributeTypeList entryAttributes; + mutable bool procEntAttr; + + char error; + bool skipConsecutiveLinks; + + /** the current key */ + SWKey *key; + + ListKey listKey; + char *modname; + char *moddesc; + char *modtype; + char *modlang; + + char direction; + char markup; + char encoding; + + /** this module's display object */ + SWDisplay *disp; + + static SWDisplay rawdisp; + SWBuf entryBuf; + + /** filters to be executed to remove all markup (for searches) */ + FilterList *stripFilters; + + /** filters to be executed immediately upon fileread */ + FilterList *rawFilters; + + /** filters to be executed to format for display */ + FilterList *renderFilters; + + /** filters to be executed to change markup to user prefs */ + OptionFilterList *optionFilters; + + /** filters to be executed to decode text for display */ + FilterList *encodingFilters; + + int entrySize; + mutable long entryIndex; // internal common storage for index + + +public: + + /** + * Set this bool to false to terminate the search which is executed by this module (search()). + * This is useful for threaded applications to terminate the search from another thread. + */ + bool terminateSearch; + + /** SWModule c-tor + * + * @param imodname Internal name for module; see also getName() + * @param imoddesc Name to display to user for module; see also getDescription() + * @param idisp Display object to use for displaying; see also getDisplay() + * @param imodtype Type of module (e.g. Biblical Text, Commentary, etc.); see also getType() + * @param encoding Encoding of the module (e.g. UTF-8) + * @param dir Direction of text flow (e.g. Right to Left for Hebrew) + * @param markup Source Markup of the module (e.g. OSIS) + * @param modlang Language of the module (e.g. en) + */ + SWModule(const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, char *imodtype = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* modlang = 0); + + /** SWModule d-tor + */ + virtual ~SWModule(); + + /** Gets and clears error status + * + * @return error status + */ + virtual char Error(); + + /** + * @return True if this module is encoded in Unicode, otherwise returns false. + */ + virtual const bool isUnicode() const { return (encoding == (char)ENC_UTF8 || encoding == (char)ENC_SCSU); } + + // These methods are useful for modules that come from a standard SWORD install (most do). + // SWMgr will call setConfig. The user may use getConfig and getConfigEntry (if they + // are not comfortable with, or don't wish to use stl maps). + virtual void setConfig(ConfigEntMap *config); + virtual const ConfigEntMap &getConfig() const { return *config; } + virtual const char *getConfigEntry(const char *key) const; + + /** + * @return The size of the text entry for the module's current key position. + */ + virtual const int getEntrySize() const { return entrySize; } + + /** + * Sets a key to this module for position to a particular record + * + * @param ikey key with which to set this module + * @return error status + */ + virtual char setKey(const SWKey *ikey); + + /** + * Sets a key to this module for position to a particular record + * @param ikey The SWKey which should be used as new key. + * @return Error status + */ + char setKey(const SWKey &ikey) { return setKey(&ikey); } + /** + * @deprecated Use setKey() instead. + */ + char SetKey(const SWKey *ikey) { return setKey(ikey); } + /** + * @deprecated Use setKey() instead. + */ + char SetKey(const SWKey &ikey) { return setKey(ikey); } + /** + * @deprecated Use setKey() instead. + */ + char Key(const SWKey & ikey) { return setKey(ikey); } + + /** Gets the current module key + * @return the current key of this module + */ + virtual SWKey *getKey() const; + /** + * @deprecated Use getKey() instead. + */ + SWKey &Key() const { return *getKey(); } + + /** + * Sets/gets module KeyText + * @deprecated Use getKeyText/setKey + * @param ikeytext Value which to set keytext; [0]-only get + * @return pointer to keytext + */ + virtual const char *KeyText(const char *ikeytext = 0) { + if (ikeytext) setKey(ikeytext); + return *getKey(); + } + + /** + * gets the key text for the module. + * do we really need this? + */ + + virtual const char *getKeyText() const { + return *getKey(); + } + + + virtual long Index() const { return entryIndex; } + virtual long Index(long iindex) { entryIndex = iindex; return entryIndex; } + + /** Calls this module's display object and passes itself + * + * @return error status + */ + virtual char Display(); + + /** Gets display driver + * + * @return pointer to SWDisplay class for this module + */ + virtual SWDisplay *getDisplay() const; + + /** Sets display driver + * + * @param idisp pointer to SWDisplay class to assign to this module + */ + virtual void setDisplay(SWDisplay * idisp); + + /** + * @deprecated Use get/setDisplay() instead. + */ + SWDisplay *Disp(SWDisplay * idisp = 0) { + if (idisp) + setDisplay(idisp); + return getDisplay(); + } + + /** Gets module name + * + * @return pointer to modname + */ + virtual char *Name() const; + + /** Sets module name + * + * @param imodname Value which to set modname; [0]-only get + * @return pointer to modname + */ + virtual char *Name(const char *imodname); + + /** Gets module description + * + * @return pointer to moddesc + */ + virtual char *Description() const; + + /** Sets module description + * + * @param imoddesc Value which to set moddesc; [0]-only get + * @return pointer to moddesc + */ + virtual char *Description(const char *imoddesc); + + /** Gets module type + * + * @return pointer to modtype + */ + virtual char *Type() const; + + /** Sets module type + * + * @param imodtype Value which to set modtype; [0]-only get + * @return pointer to modtype + */ + virtual char *Type(const char *imodtype); + + /** Sets/gets module direction + * + * @param newdir Value which to set direction; [-1]-only get + * @return new direction + */ + virtual char Direction(signed char newdir = -1); + + /** Sets/gets module encoding + * + * @param enc Value which to set encoding; [-1]-only get + * @return Encoding + */ + virtual char Encoding(signed char enc = -1); + + /** Sets/gets module markup + * + * @param markup Vvalue which to set markup; [-1]-only get + * @return Markup + */ + virtual char Markup(signed char markup = -1); + + /** Sets/gets module language + * + * @param imodlang Value which to set modlang; [0]-only get + * @return pointer to modlang + */ + virtual char *Lang(const char *imodlang = 0); + + + // search interface ------------------------------------------------- + + /** Searches a module for a string + * + * @param istr string for which to search + * @param searchType type of search to perform + * >=0 - regex + * -1 - phrase + * -2 - multiword + * -3 - entryAttrib (eg. Word//Strongs/G1234/) + * -4 - Lucene + * @param flags options flags for search + * @param scope Key containing the scope. VerseKey or ListKey are useful here. + * @param justCheckIfSupported if set, don't search, + * only tell if this function supports requested search. + * @param percent Callback function to get the current search status in %. + * @param percentUserData User data that is given to the callback function as parameter. + * + * @return ListKey set to verses that contain istr + */ + virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0, + SWKey * scope = 0, + bool * justCheckIfSupported = 0, + void (*percent) (char, void *) = &nullPercent, + void *percentUserData = 0); + + // for backward compat-- deprecated + virtual ListKey &Search(const char *istr, int searchType = 0, int flags = 0, + SWKey * scope = 0, + bool * justCheckIfSupported = 0, + void (*percent) (char, void *) = &nullPercent, + void *percentUserData = 0) { + return search(istr, searchType, flags, scope, justCheckIfSupported, percent, percentUserData); + } + + + /** Allocates a key of specific type for module + * The different reimplementatiosn of SWModule (e.g. SWText) support SWKey implementations, which support special. + * This functions returns a SWKey object which works with the current implementation of SWModule. For example for the SWText class it returns a VerseKey object. + * @see VerseKey, ListKey, SWText, SWLD, SWCom + * @return pointer to allocated key + */ + virtual SWKey *CreateKey(); + + /** This function is reimplemented by the different kinds + * of module objects + * @return the raw module text of the current entry + */ + virtual SWBuf &getRawEntryBuf() = 0; + + virtual const char *getRawEntry() { return getRawEntryBuf().c_str(); } + + // write interface ---------------------------- + /** Is the module writable? :) + * @return yes or no + */ + virtual bool isWritable() { return false; } + + /** Creates a new, empty module + * @param path path where to create the new module + * @return error + */ + static signed char createModule(const char *path); + + /** Modify the current module entry text - only if module isWritable() + */ + virtual void setEntry(const char *inbuf, long len= -1); + + /** Link the current module entry to another module entry - only if + * module isWritable() + */ + virtual void linkEntry(const SWKey *sourceKey); + + /** Delete current module entry - only if module isWritable() + */ + virtual void deleteEntry() {} + + // end write interface ------------------------ + + /** Decrements module key a number of entries + * @param steps Number of entries to jump backward + */ + virtual void decrement(int steps = 1); + + /** Increments module key a number of entries + * @param steps Number of entries to jump forward + */ + virtual void increment(int steps = 1); + + /** Positions this modules to a logical position entry + * @param pos position (e.g. TOP, BOTTOM) + */ + virtual void setPosition(SW_POSITION pos); + + /** OptionFilterBuffer a text buffer + * @param filters the FilterList of filters to iterate + * @param buf the buffer to filter + * @param key key location from where this buffer was extracted + */ + virtual void filterBuffer(OptionFilterList *filters, SWBuf &buf, SWKey *key); + + /** FilterBuffer a text buffer + * @param filters the FilterList of filters to iterate + * @param buf the buffer to filter + * @param key key location from where this buffer was extracted + */ + virtual void filterBuffer(FilterList *filters, SWBuf &buf, SWKey *key); + + /** Adds a RenderFilter to this module's renderFilters queue. + * Render Filters are called when the module is asked to produce + * renderable text. + * @param newFilter the filter to add + * @return *this + */ + virtual SWModule &AddRenderFilter(SWFilter *newfilter) { + renderFilters->push_back(newfilter); + return *this; + } + + /** Retrieves a container of render filters associated with this + * module. + * @return container of render filters + */ + virtual const FilterList &getRenderFilters() const { + return *renderFilters; + } + + /** Removes a RenderFilter from this module's renderFilters queue + * @param oldfilter the filter to remove + * @return *this + */ + virtual SWModule &RemoveRenderFilter(SWFilter *oldfilter) { + renderFilters->remove(oldfilter); + return *this; + } + + /** Replaces a RenderFilter in this module's renderfilters queue + * @param oldfilter the filter to remove + * @param newfilter the filter to add in its place + * @return *this + */ + virtual SWModule &ReplaceRenderFilter(SWFilter *oldfilter, SWFilter *newfilter) { + FilterList::iterator iter; + for (iter = renderFilters->begin(); iter != renderFilters->end(); iter++) { + if (*iter == oldfilter) + *iter = newfilter; + } + return *this; + } + + /** RenderFilter run a buf through this module's Render Filters + * @param buf the buffer to filter + * @param key key location from where this buffer was extracted + */ + virtual void renderFilter(SWBuf &buf, SWKey *key) { + filterBuffer(renderFilters, buf, key); + } + + /** Adds an EncodingFilter to this module's @see encodingFilters queue. + * Encoding Filters are called immediately when the module is read + * from data source, to assure we have desired internal data stream + * (e.g. UTF-8 for text modules) + * @param newfilter the filter to add + * @return *this + */ + virtual SWModule &AddEncodingFilter(SWFilter *newfilter) { + encodingFilters->push_back(newfilter); + return *this; + } + + /** Removes an EncodingFilter from this module's encodingFilters queue + * @param oldfilter the filter to remove + * @return *this + */ + virtual SWModule &RemoveEncodingFilter(SWFilter *oldfilter) { + encodingFilters->remove(oldfilter); + return *this; + } + + /** Replaces an EncodingFilter in this module's encodingfilters queue + * @param oldfilter the filter to remove + * @param newfilter the filter to add in its place + * @return *this + */ + virtual SWModule &ReplaceEncodingFilter(SWFilter *oldfilter, SWFilter *newfilter) { + FilterList::iterator iter; + for (iter = encodingFilters->begin(); iter != encodingFilters->end(); iter++) { + if (*iter == oldfilter) + *iter = newfilter; + } + return *this; + } + + /** encodingFilter run a buf through this module's Encoding Filters + * @param buf the buffer to filter + * @param key key location from where this buffer was extracted + */ + virtual void encodingFilter(SWBuf &buf, SWKey *key) { + filterBuffer(encodingFilters, buf, key); + } + + /** Adds a StripFilter to this module's stripFilters queue. + * Strip filters are called when a module is asked to render + * an entry without any markup (like when searching). + * @param newfilter the filter to add + * @return *this + */ + virtual SWModule &AddStripFilter(SWFilter *newfilter) { + stripFilters->push_back(newfilter); + return *this; + } + + /** Adds a RawFilter to this module's rawFilters queue + * @param newfilter the filter to add + * @return *this + */ + virtual SWModule &AddRawFilter(SWFilter *newfilter) { + rawFilters->push_back(newfilter); + return *this; + } + + /** StripFilter run a buf through this module's Strip Filters + * @param buf the buffer to filter + * @param key key location from where this buffer was extracted + */ + virtual void stripFilter(SWBuf &buf, SWKey *key) { + filterBuffer(stripFilters, buf, key); + } + + + /** RawFilter a text buffer + * @param buf the buffer to filter + * @param key key location from where this buffer was extracted + */ + virtual void rawFilter(SWBuf &buf, SWKey *key) { + filterBuffer(rawFilters, buf, key); + } + + /** Adds an OptionFilter to this module's optionFilters queue. + * Option Filters are used to turn options in the text on + * or off, or so some other state (e.g. Strong's Number, + * Footnotes, Cross References, etc.) + * @param newfilter the filter to add + * @return *this + */ + virtual SWModule &AddOptionFilter(SWOptionFilter *newfilter) { + optionFilters->push_back(newfilter); + return *this; + } + + /** OptionFilter a text buffer + * @param buf the buffer to filter + * @param key key location from where this buffer was extracted + */ + virtual void optionFilter(SWBuf &buf, SWKey *key) { + filterBuffer(optionFilters, buf, key); + } + + /** Produces plain text, without markup, of the current module entry, + * or supplied text + * + * @param buf buf to massage instead of current module entry; + * if buf is 0, the current text will be used + * @param len max len to process + * @return result buffer + */ + virtual const char *StripText(const char *buf = 0, int len = -1); + + /** Produces renderable text of the current module entry or supplied text + * + * @param buf buffer to massage instead of current module entry; + * if buf is 0, the current module position text will be used + * @param len max len to process + * @param render for internal use + * @return result buffer + */ + virtual const char *RenderText(const char *buf = 0, int len = -1, bool render = true); + + /** Produces plain text, without markup, of the module entry at the supplied key + * @param tmpKey desired module entry + * @return result buffer + */ + virtual const char *StripText(SWKey *tmpKey); + + /** Produces renderable text of the module entry at the supplied key + * @param tmpKey key to use to grab text + * @return this module's text at specified key location massaged by Render filters + */ + virtual const char *RenderText(SWKey *tmpKey); + + /** Whether or not to only hit one entry when iterating encounters + * consecutive links when iterating + * @param val = true means only include entry once in iteration + */ + virtual void setSkipConsecutiveLinks(bool val) { skipConsecutiveLinks = val; } + + /** Whether or not to only hit one entry when iterating encounters + * consecutive links when iterating + */ + virtual bool getSkipConsecutiveLinks() { return skipConsecutiveLinks; } + + /** Entry Attributes are special data pertaining to the current entry. + * To see what Entry Attributes exists for a specific entry of a module, + * the example examples/cmdline/lookup.cpp is a good utility which + * displays this information. It is also useful as an example of how + * to access such. + */ + virtual AttributeTypeList &getEntryAttributes() const { return entryAttributes; } + + /** Processing Entry Attributes can be expensive. This method allows + * turning the processing off if they are not desired. Some internal + * engine processing turns them off (like searching) temporarily for + * optimization. + */ + virtual void processEntryAttributes(bool val) const { procEntAttr = val; } + + /** Whether or not we're processing Entry Attributes + */ + virtual bool isProcessEntryAttributes() const { return procEntAttr; } + + // OPERATORS ----------------------------------------------------------------- + + virtual signed char createSearchFramework( + void (*percent) (char, void *) = &nullPercent, + void *percentUserData = 0); + virtual void deleteSearchFramework(); + virtual bool hasSearchFramework(); + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swobject.h b/include/swobject.h new file mode 100644 index 0000000..6f60a57 --- /dev/null +++ b/include/swobject.h @@ -0,0 +1,65 @@ +/****************************************************************************** +* swobject.h - definition for SWObject used as lowest base class for many +* SWORD objects +* +* $Id: swobject.h 1790 2005-05-03 03:49:04Z scribe $ +* +* Copyright 2005 CrossWire Bible Society (http://www.crosswire.org) +* CrossWire Bible Society +* P. O. Box 2528 +* Tempe, AZ 85280-2528 +* +* 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 version 2. +* +* 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. +* +*/ + +#ifndef SWOBJECT_H +#define SWOBJECT_H + +#include + +SWORD_NAMESPACE_START +#define SWDYNAMIC_CAST(className, object) (className *)((object)?((object->getClass()->isAssignableFrom(#className))?object:0):0) + +/** +* Class used for SWDYNAMIC_CAST to save the inheritance order. +*/ +class SWDLLEXPORT SWClass { +private: + const char **descends; + +public: + SWClass(const char **descends) { + this->descends = descends; + } + + bool isAssignableFrom(const char *className) const; +}; + +/** Base class for major Sword classes. +* SWObject is the base class for major Sword classes like SWKey. +* It is used because dynamic_cast is not available on all plattforms supported +* by Sword. Use SWDYNAMIC_CAST(classname, object) instead of dynamic_cast(object). +*/ +class SWObject { +protected: + SWClass * myclass; + +public: + /** Use this to get the class definition and inheritance order. + * @return The class definition of this object + */ + const SWClass *getClass () const { + return myclass; + } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swoptfilter.h b/include/swoptfilter.h new file mode 100644 index 0000000..f1b00a6 --- /dev/null +++ b/include/swoptfilter.h @@ -0,0 +1,84 @@ +/*************************************************************************** + * + * $Id: swoptfilter.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWOPTFILTER_H +#define SWOPTFILTER_H + +#include +#include +#include + +SWORD_NAMESPACE_START + +/** +* The type definitoin for option types +*/ +typedef std::list < SWBuf > StringList; + + + /** Base class for all option filters. + */ +class SWDLLEXPORT SWOptionFilter : public SWFilter { +protected: + SWBuf optionValue; + const char *optName; + const char *optTip; + const StringList *optValues; + bool option; +public: + + SWOptionFilter(); + SWOptionFilter(const char *oName, const char *oTip, const StringList *oValues); + virtual ~SWOptionFilter(); + + + /** gets the name of the option of this filter + * @return option name + */ + virtual const char *getOptionName() { return optName; } + + /** gets a short explanation of the option of this filter; + * it could be presented to the user in frontend programs + * @return option tip/explanation + */ + virtual const char *getOptionTip() { return optTip; } + + /** returns a list of the possible option values + * + * @return list of option values + */ + virtual StringList getOptionValues() { return *optValues; } + + /** @return The value of the current option. + */ + virtual const char *getOptionValue(); + + /** sets the value of the option of this filter, + * e.g maybe a strong's filter mioght be set to "on" / "off" - + * that would mean to show or not to show the strongs in the text, + * see also getOptionValues() + * @param ival the new option value + */ + virtual void setOptionValue(const char *ival); + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swsearchable.h b/include/swsearchable.h new file mode 100644 index 0000000..928352e --- /dev/null +++ b/include/swsearchable.h @@ -0,0 +1,101 @@ +/****************************************************************************** + * swsearchable.h - definition of class SWSearchable used to provide an + * interface for objects that be searched. + * + * $Id: swsearchable.h 2054 2007-05-25 17:31:39Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWSEARCHABLE_H +#define SWSEARCHABLE_H + +#include + +SWORD_NAMESPACE_START + +class ListKey; +class SWKey; + +/** used to provide an interface for objects that be searched. + */ +class SWDLLEXPORT SWSearchable { +public: + SWSearchable(); + virtual ~SWSearchable(); + + /** + * This is the default callback function for searching. + * This function is a placeholder and does nothing. + * You can define your own function for search progress + * evaluation, and pass it over to Search(). + */ + static void nullPercent(char percent, void *userData); + + // search interface ------------------------------------------------- + + /** + * Searches a module for a string + * @param istr string for which to search + * @param searchType type of search to perform + * >=0 - regex + * -1 - phrase + * -2 - multiword + * -3 - entryAttrib (eg. Word//Strongs/G1234/) + * -4 - Lucene + * @param flags options flags for search + * @param scope Key containing the scope. VerseKey or ListKey are useful here. + * @param justCheckIfSupported if set, don't search, + * only tell if this function supports requested search. + * @param percent Callback function to get the current search status in %. + * @param percentUserData User data that is given to the callback function as parameter. + * + * @return ListKey set to verses that contain istr + */ + + virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0, + SWKey * scope = 0, + bool * justCheckIfSupported = 0, + void (*percent) (char, void *) = &nullPercent, + void *percentUserData = 0) = 0; + + /** + * ask the object to build any indecies it wants for optimal searching + */ + virtual signed char createSearchFramework( + void (*percent) (char, void *) = &nullPercent, + void *percentUserData = 0); // special search framework + + virtual void deleteSearchFramework(); + + /** + * was SWORD compiled with code to optimize searching for this driver? + */ + virtual bool hasSearchFramework() { return false; } + + /** + * Check if the search is optimally supported (e.g. if index files are + * presnt and working) + * This function checks whether the search framework may work in the + * best way. + * @return true if the the search is optimally supported, false if + * it's not working in the best way. + */ + virtual bool isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/swtext.h b/include/swtext.h new file mode 100644 index 0000000..cb8d1d5 --- /dev/null +++ b/include/swtext.h @@ -0,0 +1,69 @@ +/****************************************************************************** + * swtext.h - code for base class 'SWText'. SWText is the basis for all + * types of text modules + * + * $Id: swtext.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWTEXT_H +#define SWTEXT_H + +#include + +#include + +SWORD_NAMESPACE_START + +class VerseKey; + +/** The basis for all text modules + */ +class SWDLLEXPORT SWText : public SWModule { + + // for conversion if we have been set with a different internal key type + mutable VerseKey *tmpVK; + +protected: + VerseKey &getVerseKey() const; + +public: + /** Initializes data for instance of SWText + */ + SWText(const char *imodname = 0, const char *imoddesc = 0, + SWDisplay * idisp = 0, + SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, + SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0); + + virtual ~SWText(); + /** Create the correct key (VerseKey) for use with SWText + */ + virtual SWKey *CreateKey(); + + virtual long Index() const; + virtual long Index(long iindex); + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END + +#endif diff --git a/include/swunicod.h b/include/swunicod.h new file mode 100644 index 0000000..3bf4e95 --- /dev/null +++ b/include/swunicod.h @@ -0,0 +1,43 @@ +/* + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + + +#ifndef SWUNICOD_H +#define SWUNICOD_H + +#include +SWORD_NAMESPACE_START + +/** Converts a 32-bit unsigned integer UTF-32 value into a UTF-8 encoded 1-6 byte array + * @param utf32 the UTF-32 Unicode code point value + * @param utf8 pointer to an array of 6 unsigned chars to contain the UTF-8 value + * @return utf8 + */ +unsigned char* UTF32to8 (unsigned long utf32, unsigned char * utf8); + + +/** Converts a UTF-8 encoded 1-6 byte array into a 32-bit unsigned integer UTF-32 value + * @param utf8 pointer to an array of 6 unsigned chars containing the UTF-8 value, starting in the utf8[0] + * @param utf32 the UTF-32 Unicode code point value + * @return utf32 + */ +unsigned long UTF8to32 (unsigned char * utf8, unsigned long utf32); + +SWORD_NAMESPACE_END + +#endif diff --git a/include/swversion.h b/include/swversion.h new file mode 100644 index 0000000..d3c0ab1 --- /dev/null +++ b/include/swversion.h @@ -0,0 +1,65 @@ +/****************************************************************************** + * swversion.h - definition of class SWVersion used to compare version info + * + * $Id: swversion.h 1763 2005-04-03 23:57:03Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef SWVERSION_H +#define SWVERSION_H + +#include +SWORD_NAMESPACE_START + +/** A basic tool class to handle program version numbers. +*/ +class SWDLLEXPORT SWVersion { + public: + /** The different version subnumbers. + */ + int major, minor, minor2, minor3; + /**The constructor. + * @param version Version string to be parsed. + */ + SWVersion(const char *version = "0.0"); + /** Compare 2 Versions with each other. + * @param vi Version number to compare with. + * @return >0:this>vi; 0:this==vi; <0:this(const SWVersion &vi) const {return (compare(vi) > 0);} + bool operator<(const SWVersion &vi) const {return (compare(vi) < 0);} + bool operator>=(const SWVersion &vi) const {return (compare(vi) >= 0);} + bool operator<=(const SWVersion &vi) const {return (compare(vi) <= 0);} + bool operator==(const SWVersion &vi) const {return (compare(vi) == 0);} + + /** Current sword library version. + * Use this to check (e.g. at compile time) if the + * version of the sword lib is recent enough for your program. + */ + static SWVersion currentVersion; +}; + +SWORD_NAMESPACE_END +#endif + diff --git a/include/sysdata.h b/include/sysdata.h new file mode 100644 index 0000000..58b8083 --- /dev/null +++ b/include/sysdata.h @@ -0,0 +1,77 @@ +#ifndef SIZEDTYPES_H +#define SIZEDTYPES_H +/* + * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the + * header files exported to user space + */ +#ifdef USE_AUTOTOOLS +#include "config.h" +#endif + + +typedef signed char __s8; +typedef unsigned char __u8; + +typedef signed short __s16; +typedef unsigned short __u16; + +typedef signed int __s32; +typedef unsigned int __u32; + +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +//typedef __signed__ long long __s64; +//typedef unsigned long long __u64; +#endif + + +#define __swap16(x) \ + ((__u16)( \ + (((__u16)(x) & (__u16)0x00ffU) << 8) | \ + (((__u16)(x) & (__u16)0xff00U) >> 8) )) + + +#define __swap32(x) \ + ((__u32)( \ + (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ + (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ + (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ + (((__u32)(x) & (__u32)0xff000000UL) >> 24) )) + + +#define __swap64(x) \ + ((__u64)( \ + (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ + (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ + (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ + (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ + (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ + (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ + (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ + (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) )) + + + + +#ifndef WORDS_BIGENDIAN + +#define swordtoarch16(x) (x) +#define swordtoarch32(x) (x) +#define swordtoarch64(x) (x) +#define archtosword16(x) (x) +#define archtosword32(x) (x) +#define archtosword64(x) (x) + +#else + +#define swordtoarch16(x) __swap16(x) +#define swordtoarch32(x) __swap32(x) +#define swordtoarch64(x) __swap64(x) +#define archtosword16(x) __swap16(x) +#define archtosword32(x) __swap32(x) +#define archtosword64(x) __swap64(x) + + +#endif + + +#endif diff --git a/include/teihtmlhref.h b/include/teihtmlhref.h new file mode 100644 index 0000000..302c38e --- /dev/null +++ b/include/teihtmlhref.h @@ -0,0 +1,51 @@ +/****************************************************************************** + * + * $Id: + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef TEIHTMLHREF_H +#define TEIHTMLHREF_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts TEI text to HTMLHREF text + */ +class SWDLLEXPORT TEIHTMLHREF : public SWBasicFilter { +private: + +protected: + class MyUserData : public BasicFilterUserData { + public: + bool BiblicalText; + SWBuf lastHi; + + SWBuf version; + MyUserData(const SWModule *module, const SWKey *key); + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + TEIHTMLHREF(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/teiplain.h b/include/teiplain.h new file mode 100644 index 0000000..b0fe06d --- /dev/null +++ b/include/teiplain.h @@ -0,0 +1,49 @@ +/****************************************************************************** + * + * $Id: + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef TEIPLAIN_H +#define TEIPLAIN_H + +#include +#include + +SWORD_NAMESPACE_START + +/** this filter converts TEI text to plain text + */ +class SWDLLEXPORT TEIPlain : public SWBasicFilter { +public: +protected: + class MyUserData : public BasicFilterUserData { + public: + SWBuf w; + XMLTag tag; + MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {} + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + TEIPlain(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/teirtf.h b/include/teirtf.h new file mode 100644 index 0000000..9c115e4 --- /dev/null +++ b/include/teirtf.h @@ -0,0 +1,50 @@ +/****************************************************************************** + * + * $Id: + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef TEIRTF_H +#define TEIRTF_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts TEI text to RTF text + */ +class SWDLLEXPORT TEIRTF : public SWBasicFilter { +private: + +protected: + class MyUserData : public BasicFilterUserData { + public: + bool BiblicalText; + SWBuf w; + SWBuf version; + MyUserData(const SWModule *module, const SWKey *key); + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + TEIRTF(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlfootnotes.h b/include/thmlfootnotes.h new file mode 100644 index 0000000..6106b13 --- /dev/null +++ b/include/thmlfootnotes.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: thmlfootnotes.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLFOOTNOTES_H +#define THMLFOOTNOTES_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides footnotes in a ThML text + */ +class SWDLLEXPORT ThMLFootnotes : public SWOptionFilter { +public: + ThMLFootnotes(); + virtual ~ThMLFootnotes(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlgbf.h b/include/thmlgbf.h new file mode 100644 index 0000000..0975a24 --- /dev/null +++ b/include/thmlgbf.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: thmlgbf.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLGBF_H +#define THMLGBF_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts ThML text to GBF text + */ +class SWDLLEXPORT ThMLGBF : public SWFilter { +protected: + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +public: + ThMLGBF(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlheadings.h b/include/thmlheadings.h new file mode 100644 index 0000000..18aadc5 --- /dev/null +++ b/include/thmlheadings.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: thmlheadings.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLHEADINGS_H +#define THMLHEADINGS_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides headings in a ThML text + */ +class SWDLLEXPORT ThMLHeadings : public SWOptionFilter { +public: + ThMLHeadings(); + virtual ~ThMLHeadings(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlhtml.h b/include/thmlhtml.h new file mode 100644 index 0000000..26871a6 --- /dev/null +++ b/include/thmlhtml.h @@ -0,0 +1,46 @@ +/****************************************************************************** + * + * $Id: thmlhtml.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLHTML_H +#define THMLHTML_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts ThML text to HTML text + */ +class SWDLLEXPORT ThMLHTML : public SWBasicFilter { +protected: + class MyUserData : public BasicFilterUserData { + public: + MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {} + bool SecHead; + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + ThMLHTML(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlhtmlhref.h b/include/thmlhtmlhref.h new file mode 100644 index 0000000..2f91fcd --- /dev/null +++ b/include/thmlhtmlhref.h @@ -0,0 +1,53 @@ +/****************************************************************************** + * + * $Id: thmlhtmlhref.h 2157 2008-05-13 23:37:56Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef _THMLHTMLHREF_H +#define _THMLHTMLHREF_H + +#include +#include + +SWORD_NAMESPACE_START + +/** this filter converts ThML text to HTML text with hrefs + */ +class SWDLLEXPORT ThMLHTMLHREF : public SWBasicFilter { + SWBuf imgPrefix; +protected: + class MyUserData : public BasicFilterUserData { + public: + MyUserData(const SWModule *module, const SWKey *key);//: BasicFilterUserData(module, key) {} + bool inscriptRef; + bool SecHead; + bool BiblicalText; + SWBuf version; + XMLTag startTag; + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + ThMLHTMLHREF(); + virtual const char *getImagePrefix() { return imgPrefix.c_str(); } + virtual void setImagePrefix(const char *newImgPrefix) { imgPrefix = newImgPrefix; } +}; +SWORD_NAMESPACE_END +#endif /* _THMLHTMLHREF_H */ diff --git a/include/thmllemma.h b/include/thmllemma.h new file mode 100644 index 0000000..40a056a --- /dev/null +++ b/include/thmllemma.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: thmllemma.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLLEMMA_H +#define THMLLEMMA_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides lemmas in a ThML text + */ +class SWDLLEXPORT ThMLLemma : public SWOptionFilter { +public: + ThMLLemma(); + virtual ~ThMLLemma(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlmorph.h b/include/thmlmorph.h new file mode 100644 index 0000000..66e55bd --- /dev/null +++ b/include/thmlmorph.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: thmlmorph.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLMORPH_H +#define THMLMORPH_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides morph tags in a ThML text + */ +class SWDLLEXPORT ThMLMorph : public SWOptionFilter { +public: + ThMLMorph(); + virtual ~ThMLMorph(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlosis.h b/include/thmlosis.h new file mode 100644 index 0000000..c3a2a13 --- /dev/null +++ b/include/thmlosis.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: thmlosis.h 1804 2005-05-07 06:26:10Z scribe $ + * + * Copyright 2003 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLOSIS_H +#define THMLOSIS_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts ThML text to OSIS text + */ +class SWDLLEXPORT ThMLOSIS : public SWFilter { +public: + ThMLOSIS(); + virtual ~ThMLOSIS(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif /* THMLOSIS_H */ diff --git a/include/thmlplain.h b/include/thmlplain.h new file mode 100644 index 0000000..499dbf6 --- /dev/null +++ b/include/thmlplain.h @@ -0,0 +1,37 @@ +/****************************************************************************** + * + * $Id: thmlplain.h 2068 2007-08-31 06:40:23Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLPLAIN_H +#define THMLPLAIN_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts ThML text to plain text + */ +class SWDLLEXPORT ThMLPlain : public SWFilter { +public: + ThMLPlain(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlrtf.h b/include/thmlrtf.h new file mode 100644 index 0000000..dfeecb2 --- /dev/null +++ b/include/thmlrtf.h @@ -0,0 +1,51 @@ +/****************************************************************************** + * + * $Id: thmlrtf.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLRTF_H +#define THMLRTF_H + +#include +#include + +SWORD_NAMESPACE_START + +/** this filter converts ThML text to RTF text + */ +class SWDLLEXPORT ThMLRTF : public SWBasicFilter { +protected: + class MyUserData : public BasicFilterUserData { + public: + MyUserData(const SWModule *module, const SWKey *key); + bool SecHead; + SWBuf version; + bool BiblicalText; + XMLTag startTag; + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +public: + ThMLRTF(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlscripref.h b/include/thmlscripref.h new file mode 100644 index 0000000..58b4820 --- /dev/null +++ b/include/thmlscripref.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: thmlscripref.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLSCRIPREF_H +#define THMLSCRIPREF_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides scripture references in a ThML text + */ +class SWDLLEXPORT ThMLScripref : public SWOptionFilter { +public: + ThMLScripref(); + virtual ~ThMLScripref(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlstrongs.h b/include/thmlstrongs.h new file mode 100644 index 0000000..dfb97b3 --- /dev/null +++ b/include/thmlstrongs.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: thmlstrongs.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLSTRONGS_H +#define THMLSTRONGS_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides strong's numbers in a ThML text + */ +class SWDLLEXPORT ThMLStrongs : public SWOptionFilter { +public: + ThMLStrongs(); + virtual ~ThMLStrongs(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlvariants.h b/include/thmlvariants.h new file mode 100644 index 0000000..9adda8c --- /dev/null +++ b/include/thmlvariants.h @@ -0,0 +1,53 @@ +/****************************************************************************** + * + * $Id: thmlvariants.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLVARIANTS_H +#define THMLVARIANTS_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides textual variants + */ +class SWDLLEXPORT ThMLVariants : public SWOptionFilter { + char option; + + static const char primary[]; + static const char secondary[]; + static const char all[]; + + static const char optName[]; + static const char optTip[]; + StringList options; + +public: + ThMLVariants(); + virtual ~ThMLVariants(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); + virtual const char *getOptionName() { return optName; } + virtual const char *getOptionTip() { return optTip; } + virtual void setOptionValue(const char *ival); + virtual const char *getOptionValue(); + virtual StringList getOptionValues() { return options; } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/thmlwebif.h b/include/thmlwebif.h new file mode 100644 index 0000000..25201d7 --- /dev/null +++ b/include/thmlwebif.h @@ -0,0 +1,40 @@ +/****************************************************************************** + * + * $Id: thmlwebif.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef _ThMLWEBIF_H +#define _ThMLWEBIF_H + +#include + +SWORD_NAMESPACE_START + +/** this filter converts ThML text to HTML text with hrefs + */ +class SWDLLEXPORT ThMLWEBIF : public ThMLHTMLHREF { + const SWBuf baseURL; + const SWBuf passageStudyURL; + +protected: + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + ThMLWEBIF(); +}; +SWORD_NAMESPACE_END +#endif /* _ThMLWEBIF_H */ diff --git a/include/thmlwordjs.h b/include/thmlwordjs.h new file mode 100644 index 0000000..9d7b83d --- /dev/null +++ b/include/thmlwordjs.h @@ -0,0 +1,52 @@ +/*************************************************************************** + * + * $Id: thmlstrongs.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef THMLWORDSJS_H +#define THMLWORDSJS_H + +#include + +SWORD_NAMESPACE_START + +class SWMgr; + /** This Filter shows/hides strong's numbers in a ThML text + */ +class SWDLLEXPORT ThMLWordJS : public SWOptionFilter { + SWModule *defaultGreekLex; + SWModule *defaultHebLex; + SWModule *defaultGreekParse; + SWModule *defaultHebParse; + SWMgr *mgr; + +public: + ThMLWordJS(); + virtual ~ThMLWordJS(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); + void setDefaultModules(SWModule *defaultGreekLex = 0, SWModule *defaultHebLex = 0, SWModule *defaultGreekParse = 0, SWModule *defaultHebParse = 0) { + this->defaultGreekLex = defaultGreekLex; + this->defaultHebLex = defaultHebLex; + this->defaultGreekParse = defaultGreekParse; + this->defaultHebParse = defaultHebParse; + } + void setMgr(SWMgr *mgr) { this->mgr = mgr; } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/treekey.h b/include/treekey.h new file mode 100644 index 0000000..1e7c773 --- /dev/null +++ b/include/treekey.h @@ -0,0 +1,122 @@ +/****************************************************************************** + * versekey.h - code for class 'versekey'- a standard Biblical verse key + * + * $Id: treekey.h 1958 2006-08-22 00:15:10Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + + +#ifndef TREEKEY_H +#define TREEKEY_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +/** + * Class TreeKey + * The base class for all tree-based key implementations in Sword. + */ +class SWDLLEXPORT TreeKey : public SWKey { + static SWClass classdef; + void init(); + +protected: + // hold on to setText until we've done a snap action: getText or navigation + // if we set, and then write out userData, we want to assure the path exists. + // This better conforms to the SWORD write methodology: mod.setKey, mod.setEntry + mutable SWBuf unsnappedKeyText; + +public: +// TreeKey (const char *ikey = 0); +// TreeKey (const SWKey * ikey); +// TreeKey (TreeKey const &k); + TreeKey () { init(); }; + ~TreeKey () {}; + + + virtual const char *getLocalName() = 0; + virtual const char *setLocalName(const char *) = 0; + + virtual const char *getUserData(int *size = 0) = 0; + virtual void setUserData(const char *userData, int size = 0) = 0; + + /** Go to the root node + */ + virtual void root() = 0; + + /** Go to the parent of the current node + * @return success or failure + */ + virtual bool parent() = 0; + + /** Go to the first child of the current node + * @return success or failure + */ + virtual bool firstChild() = 0; + + /** Go to the next sibling of the current node + * @return success or failure + */ + virtual bool nextSibling() = 0; + + /** Go to the previous sibling of the current node + * @return success or failure + */ + virtual bool previousSibling() = 0; + + /** Does the current node have children? + * @return whether or not it does + */ + virtual bool hasChildren() = 0; + + virtual void append() = 0; + virtual void appendChild() = 0; + virtual void insertBefore() = 0; + + virtual void remove() = 0; + + + virtual void setOffset(unsigned long offset) = 0; + virtual unsigned long getOffset() const = 0; + + virtual void setText(const char *ikey) = 0; + virtual void setPosition(SW_POSITION p) = 0; + virtual const char *getText() const = 0; + virtual int compare(const SWKey &ikey) = 0; + virtual void decrement(int steps = 1) = 0; + virtual void increment(int steps = 1) = 0; + virtual bool isTraversable() const { return true; } + virtual long Index() const { return getOffset(); } + virtual long Index(long iindex) { setOffset(iindex); return getOffset(); } + + /** Set the key to this path. If the path doesn't exist, then + * nodes are created as necessary + * @keyPath = path to set/create; if unsupplied, then use any unsnapped setText value. + */ + virtual void assureKeyPath(const char *keyPath = 0); + virtual void save() {} + + SWKEY_OPERATORS + + }; + +SWORD_NAMESPACE_END +#endif diff --git a/include/treekeyidx.h b/include/treekeyidx.h new file mode 100644 index 0000000..4a9fc99 --- /dev/null +++ b/include/treekeyidx.h @@ -0,0 +1,122 @@ +/****************************************************************************** + * versekey.h - code for class 'versekey'- a standard Biblical verse key + * + * $Id: treekeyidx.h 2009 2006-11-25 21:24:43Z dglassey $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + + +#ifndef TREEKEYIDX_H +#define TREEKEYIDX_H + +#include +#include + +SWORD_NAMESPACE_START + +class FileDesc; + +/** + * Class TreeKeyIdx + * The TreeKey implementation used for all tree-based modules in Sword, such as GenBooks. + */ +class SWDLLEXPORT TreeKeyIdx : public TreeKey { + + class TreeNode { + public: + TreeNode(); + ~TreeNode(); + void clear(); + __s32 offset; + __s32 parent; + __s32 next; + __s32 firstChild; + char *name; + __u16 dsize; + char *userData; + } currentNode; + + static SWClass classdef; + + char *path; + + FileDesc *idxfd; + FileDesc *datfd; + + void getTreeNodeFromDatOffset(long ioffset, TreeNode *buf) const; + char getTreeNodeFromIdxOffset(long ioffset, TreeNode *node) const; + void saveTreeNode(TreeNode *node); + void saveTreeNodeOffsets(TreeNode *node); + void init(); + +public: + TreeKeyIdx(const TreeKeyIdx &ikey); + TreeKeyIdx (const char *idxPath, int fileMode = -1); + ~TreeKeyIdx (); + + virtual SWKey *clone() const; + + virtual const char *getLocalName(); + virtual const char *setLocalName(const char *); + + virtual const char *getUserData(int *size = 0); + virtual void setUserData(const char *userData, int size = 0); + + virtual void root(); + virtual bool parent(); + + virtual bool firstChild(); + virtual bool nextSibling(); + virtual bool previousSibling(); + + virtual bool hasChildren(); + + virtual void append(); + virtual void appendChild(); + virtual void insertBefore(); + + virtual void remove(); + virtual void save(); + + virtual void copyFrom(const TreeKeyIdx &ikey); + virtual void copyFrom(const SWKey &ikey); + + void setOffset(unsigned long offset); + unsigned long getOffset() const; + + + // OPERATORS ------------------------------------------------------------ + + + virtual SWKey &operator = (const TreeKeyIdx &ikey) { copyFrom(ikey); return *this; } + SWKEY_OPERATORS + + virtual void setText(const char *ikey); + virtual void setPosition(SW_POSITION p); + virtual const char *getText() const; + virtual int _compare (const TreeKeyIdx & ikey); + virtual int compare(const SWKey &ikey); + virtual void decrement(int steps = 1); + virtual void increment(int steps = 1); + virtual bool isTraversable() const { return true; } + + static signed char create(const char *path); +}; + +SWORD_NAMESPACE_END + +#endif diff --git a/include/unicodertf.h b/include/unicodertf.h new file mode 100644 index 0000000..ace8b05 --- /dev/null +++ b/include/unicodertf.h @@ -0,0 +1,37 @@ +/****************************************************************************** + * + * $Id: unicodertf.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UNICODERTF_H +#define UNICODERTF_H + +#include + +SWORD_NAMESPACE_START + +/** This filter converts UTF-8 text into RTF Unicode tags + */ +class SWDLLEXPORT UnicodeRTF : public SWFilter { +public: + UnicodeRTF(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/untgz.h b/include/untgz.h new file mode 100644 index 0000000..24ac8cf --- /dev/null +++ b/include/untgz.h @@ -0,0 +1,10 @@ +#ifndef UNTGZ_H +#define UNTGZ_H + +#include "zlib.h" + +int untargz(int fd, const char *dest); +int untar(gzFile in, const char *dest); + +#endif + diff --git a/include/url.h b/include/url.h new file mode 100644 index 0000000..c57ace0 --- /dev/null +++ b/include/url.h @@ -0,0 +1,93 @@ +/****************************************************************************** +* url.h - code for an URL parser utility class +* +* $Id: url.h 1763 2005-04-03 23:57:03Z scribe $ +* +* Copyright 2003 CrossWire Bible Society (http://www.crosswire.org) +* CrossWire Bible Society +* P. O. Box 2528 +* Tempe, AZ 85280-2528 +* +* 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 version 2. +* +* 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. +* +*/ + +#ifndef URL_H +#define URL_H + +#include +#include + +SWORD_NAMESPACE_START + +/** URL provides URL parsing + * The URL class provides an interface to work on the data of an URL like "http://www.crosswire.org/index.jsp?page=test&user=nobody" + */ +class SWDLLEXPORT URL { +public: + typedef std::map ParameterMap; + + /** Constructor. + * @param url The url string which should be parsed into protocol, hostname, path and paramters + */ + URL(const char *url); + + /** Get the protocol. + * @return The protocol, e.g. "http" for an url like "http://www.crosswire.org/index.jsp?page=help" + */ + const char *getProtocol() const; + /** Get the hostname + * @return The hostname, e.g. "www.crosswire.org" for an url like "http://www.crosswire.org/index.jsp?page=help" + */ + const char *getHostName() const; + /** Get the path + * @return The path, e.g. "/index.jsp" for an url like "http://www.crosswire.org/index.jsp?page=help" + */ + const char *getPath() const; + + /** All available paramters + * @return The map which contains the parameters and their values + */ + const ParameterMap &getParameters() const; + + /** + * Returns the value of an URL parameter. For the URL "http://www.crosswire.org/index.jsp?page=test&user=nobody" the value of the parameter "page" would be "test". + * If the parameter is not set an empty string is returned. + * @param name The name of the paramter. + * @return The value of the given paramter of an empty string if the name could not be found in the list of available paramters + */ + const char *getParameterValue(const char *name) const; + + /** Encodes and URL + * Encodes a string into a valid URL, e.g. changes http://www.crosswire.org/test.jsp?force=1&help=1 into + * http://www.crosswire.org/test.jsp?force=1&help=1 + * This function works on the data of the buf parameter. + * + * WARNING: It doesn't check if the URL is encoded already, so http://www.crosswire.org/test.jsp?force=1&help=1 becomes http://www.crosswire.org/test.jsp?force=1&amp;help=1 + */ + static const SWBuf encode(const char *urlText); + static const SWBuf decode(const char *encodedText); + +private: + /** Parse + * Parse the URL into protocol, hostname, path, page and paramters + */ + void parse(); + + SWBuf url; + SWBuf protocol; + SWBuf hostname; + SWBuf path; + ParameterMap parameterMap; +}; + +SWORD_NAMESPACE_END + +#endif //URL_H diff --git a/include/utf16utf8.h b/include/utf16utf8.h new file mode 100644 index 0000000..ed17116 --- /dev/null +++ b/include/utf16utf8.h @@ -0,0 +1,37 @@ +/****************************************************************************** + * + * $Id: utf16utf8.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF16UTF8_H +#define UTF16UTF8_H + +#include + +SWORD_NAMESPACE_START + +/** This filter converts UTF-16 encoded text to UTF-8 + */ +class SWDLLEXPORT UTF16UTF8 : public SWFilter { +public: + UTF16UTF8(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utf8arshaping.h b/include/utf8arshaping.h new file mode 100644 index 0000000..047b02f --- /dev/null +++ b/include/utf8arshaping.h @@ -0,0 +1,49 @@ +/****************************************************************************** + * + * $Id: utf8arshaping.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8ARSHAPING_H +#define UTF8ARSHAPING_H + +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/** This Filter controls the arabic shaping of UTF-8 text + * FIXME: is that correct? how to control it? + */ +class SWDLLEXPORT UTF8arShaping : public SWFilter { +private: + UConverter* conv; + UErrorCode err; +public: + UTF8arShaping(); + ~UTF8arShaping(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif + + diff --git a/include/utf8bidireorder.h b/include/utf8bidireorder.h new file mode 100644 index 0000000..a673920 --- /dev/null +++ b/include/utf8bidireorder.h @@ -0,0 +1,47 @@ +/****************************************************************************** + * + * $Id: utf8bidireorder.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8BIDIREORDER_H +#define UTF8BIDIREORDER_H + +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/** This Filter reorders UTF-8 text according to Unicode BiDi + */ +class SWDLLEXPORT UTF8BiDiReorder : public SWFilter { +private: + UConverter* conv; + UErrorCode err; +public: + UTF8BiDiReorder(); + ~UTF8BiDiReorder(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif + diff --git a/include/utf8cantillation.h b/include/utf8cantillation.h new file mode 100644 index 0000000..c268655 --- /dev/null +++ b/include/utf8cantillation.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: utf8cantillation.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8CANTILLATION_H +#define UTF8CANTILLATION_H + +#include + +SWORD_NAMESPACE_START + + /** This Filter shows/hides Hebrew cantillation marks in UTF8 text + */ +class SWDLLEXPORT UTF8Cantillation : public SWOptionFilter { +public: + UTF8Cantillation(); + virtual ~UTF8Cantillation(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utf8greekaccents.h b/include/utf8greekaccents.h new file mode 100644 index 0000000..847fd5c --- /dev/null +++ b/include/utf8greekaccents.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: utf8greekaccents.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8GREEKACCENTS_H +#define UTF8GREEKACCENTS_H + +#include + +SWORD_NAMESPACE_START + + /** This Filter shows/hides Greek Accents marks in UTF8 text + */ +class SWDLLEXPORT UTF8GreekAccents : public SWOptionFilter { +public: + UTF8GreekAccents(); + virtual ~UTF8GreekAccents(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utf8hebrewpoints.h b/include/utf8hebrewpoints.h new file mode 100644 index 0000000..d3cc70b --- /dev/null +++ b/include/utf8hebrewpoints.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: utf8hebrewpoints.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8HEBREWPOINTS_H +#define UTF8HEBREWPOINTS_H + +#include + +SWORD_NAMESPACE_START + +/** This Filter shows/hides Hebrew vowel points in UTF8 text + */ +class SWDLLEXPORT UTF8HebrewPoints : public SWOptionFilter { +public: + UTF8HebrewPoints(); + virtual ~UTF8HebrewPoints(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utf8html.h b/include/utf8html.h new file mode 100644 index 0000000..ee7d07e --- /dev/null +++ b/include/utf8html.h @@ -0,0 +1,37 @@ +/****************************************************************************** + * + * $Id: utf8html.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8HTML_H +#define UTF8HTML_H + +#include + +SWORD_NAMESPACE_START + +/** This filter converts UTF-8 text into HTML escape sequences + */ +class SWDLLEXPORT UTF8HTML : public SWFilter { +public: + UTF8HTML(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utf8latin1.h b/include/utf8latin1.h new file mode 100644 index 0000000..5b3c544 --- /dev/null +++ b/include/utf8latin1.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * + * $Id: utf8latin1.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8Latin1_H +#define UTF8Latin1_H + +#include + +SWORD_NAMESPACE_START + +/** This filter converts UTF-8 encoded text to Latin-1 + */ +class SWDLLEXPORT UTF8Latin1 : public SWFilter { + char replacementChar; +public: + UTF8Latin1(char rchar = '?'); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utf8nfc.h b/include/utf8nfc.h new file mode 100644 index 0000000..b91fe37 --- /dev/null +++ b/include/utf8nfc.h @@ -0,0 +1,45 @@ +/****************************************************************************** + * + * $Id: utf8nfc.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8NFC_H +#define UTF8NFC_H + +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT UTF8NFC : public SWFilter { +private: + UConverter* conv; + UChar *source, *target; + UErrorCode err; +public: + UTF8NFC(); + ~UTF8NFC(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utf8nfkd.h b/include/utf8nfkd.h new file mode 100644 index 0000000..70a33e5 --- /dev/null +++ b/include/utf8nfkd.h @@ -0,0 +1,45 @@ +/****************************************************************************** + * + * $Id: utf8nfkd.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8NFKD_H +#define UTF8NFKD_H + +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT UTF8NFKD : public SWFilter { +private: + UConverter* conv; + UChar *source, *target; + UErrorCode err; +public: + UTF8NFKD(); + ~UTF8NFKD(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utf8transliterator.h b/include/utf8transliterator.h new file mode 100644 index 0000000..d539ac3 --- /dev/null +++ b/include/utf8transliterator.h @@ -0,0 +1,87 @@ +/****************************************************************************** + * + * $Id: utf8transliterator.h 2088 2007-09-26 23:42:44Z chrislit $ + * + * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8TRANSLITERATOR_H +#define UTF8TRANSLITERATOR_H + +enum scriptEnum {SE_OFF, SE_LATIN, /*one-way (to) transliterators*/ SE_IPA, SE_BASICLATIN, SE_SBL, SE_TC, SE_BETA, SE_BGREEK, SE_SERA, SE_HUGOYE, SE_UNGEGN, SE_ISO, SE_ALALC, SE_BGNPCGN, /*two-way transliterators*/ SE_GREEK, SE_HEBREW, SE_CYRILLIC, SE_ARABIC, SE_SYRIAC, SE_KATAKANA, SE_HIRAGANA, SE_HANGUL, SE_DEVANAGARI, SE_TAMIL, SE_BENGALI, SE_GURMUKHI, SE_GUJARATI, SE_ORIYA, SE_TELUGU, SE_KANNADA, SE_MALAYALAM, SE_THAI, SE_GEORGIAN, SE_ARMENIAN, SE_ETHIOPIC, SE_GOTHIC, SE_UGARITIC, SE_COPTIC, SE_MEROITIC, SE_LINEARB, SE_CYPRIOT, SE_RUNIC, SE_OGHAM, SE_THAANA, SE_GLAGOLITIC, /*SE_TENGWAR, SE_CIRTH,*/ /*one-way (from) transliterators*/ SE_JAMO, SE_HAN, SE_KANJI}; +#define NUMSCRIPTS 48 +#define NUMTARGETSCRIPTS NUMSCRIPTS-3//6 + +#include + +#include + +#include + +#include +#include + +SWORD_NAMESPACE_START + +class SWModule; + +struct SWTransData { + UnicodeString resource; + UTransDirection dir; +}; +typedef std::map SWTransMap; +typedef std::pair SWTransPair; + +// Chris, please add more javadoc-style documentation in this header file +// so that the information will show up in the doxygen-generated +// api-docs. + +/** This Filter uses ICU for transliteration +*/ +class SWDLLEXPORT UTF8Transliterator : public SWOptionFilter { +private: + + unsigned char option; + + static const char optionstring[NUMTARGETSCRIPTS][16]; + + static const char optName[]; + static const char optTip[]; + static const char SW_RB_RULE_BASED_IDS[]; + static const char SW_RB_RULE[]; + static const char SW_RESDATA[]; + StringList options; + static SWTransMap transMap; + UErrorCode utf8status; + + void Load(UErrorCode &status); + void registerTrans(const UnicodeString& ID, const UnicodeString& resource, UTransDirection dir, UErrorCode &status); + bool addTrans(const char* newTrans, SWBuf* transList); + bool checkTrans(const UnicodeString& ID, UErrorCode &status); + Transliterator *createTrans(const UnicodeString& ID, UTransDirection dir, UErrorCode &status); + +public: + UTF8Transliterator(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); + virtual const char *getOptionName() { return optName; } + virtual const char *getOptionTip() { return optTip; } + virtual void setOptionValue(const char *ival); + virtual const char *getOptionValue(); + virtual StringList getOptionValues() { return options; } +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utf8utf16.h b/include/utf8utf16.h new file mode 100644 index 0000000..0c51bea --- /dev/null +++ b/include/utf8utf16.h @@ -0,0 +1,37 @@ +/****************************************************************************** + * + * $Id: utf8utf16.h 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTF8UTF16_H +#define UTF8UTF16_H + +#include + +SWORD_NAMESPACE_START + +/** This filter converts UTF-8 encoded text to UTF-16 + */ +class SWDLLEXPORT UTF8UTF16 : public SWFilter { +public: + UTF8UTF16(); + virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/utilstr.h b/include/utilstr.h new file mode 100644 index 0000000..2e3a65e --- /dev/null +++ b/include/utilstr.h @@ -0,0 +1,46 @@ +/****************************************************************************** + * utilstr.h - prototypes for string utility functions + * + * $Id: utilstr.h 2062 2007-07-19 17:27:31Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTILSTR_H +#define UTILSTR_H + +#include + +SWORD_NAMESPACE_START + +/** stdstr - clone a string +*/ +char *stdstr (char **iistr, const char *istr, unsigned int memPadFactor = 1); +char *strstrip (char *istr); +const char *stristr (const char *s1, const char *s2); +int strnicmp(const char *s1, const char *s2, int len); +int stricmp(const char *s1, const char *s2); + +/****************************************************************************** + * SW_toupper - array of uppercase values for any given Latin-1 value + * + * use this instead of toupper() for fast lookups on accented characters + */ +extern const unsigned char SW_toupper_array[256]; +#define SW_toupper(c) SW_toupper_array[(unsigned char)c] + +SWORD_NAMESPACE_END +#endif diff --git a/include/utilxml.h b/include/utilxml.h new file mode 100644 index 0000000..dc5e9d8 --- /dev/null +++ b/include/utilxml.h @@ -0,0 +1,88 @@ +/****************************************************************************** + * utilxml.h - definition of class that deal with xml constructs + * + * $Id: utilxml.h 2096 2007-10-07 00:40:00Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef UTILXML_H +#define UTILXML_H + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +typedef std::map StringPairMap; +typedef std::list StringList; + +/** Simple XML helper class. +*/ +class SWDLLEXPORT XMLTag { +private: + mutable char *buf; + char *name; + mutable bool parsed; + mutable bool empty; + mutable bool endTag; + mutable StringPairMap attributes; + mutable SWBuf junkBuf; + + void parse() const; + const char *getPart(const char *buf, int partNum = 0, char partSplit = '|') const; + static const char *nullstr; + +public: + XMLTag(const char *tagString = 0); + ~XMLTag(); + + void setText(const char *tagString); + inline const char *getName() const { return (name)?name:nullstr; } + + inline bool isEmpty() const { + if (!parsed) + parse(); + + return empty; + } + inline void setEmpty(bool value) { + if (!parsed) + parse(); + empty = value; + if (value) + endTag = false; + } + + inline bool isEndTag() const { return endTag; } + + const StringList getAttributeNames() const; + int getAttributePartCount(const char *attribName, char partSplit = '|') const; + + // return values should not be considered to persist beyond the return of the function. + const char *getAttribute(const char *attribName, int partNum = -1, char partSplit = '|') const; + const char *setAttribute(const char *attribName, const char *attribValue, int partNum = -1, char partSplit = '|'); + const char *toString() const; + inline operator const char *() const { return toString(); } + inline XMLTag & operator =(const char *tagString) { setText(tagString); return *this; } + inline XMLTag & operator =(const XMLTag &other) { setText(other.toString()); return *this; } +}; + +SWORD_NAMESPACE_END +#endif + diff --git a/include/versekey.h b/include/versekey.h new file mode 100644 index 0000000..42127bf --- /dev/null +++ b/include/versekey.h @@ -0,0 +1,444 @@ +/****************************************************************************** + * versekey.h - code for class 'versekey'- a standard Biblical verse key + * + * $Id: versekey.h 2169 2008-05-18 02:50:53Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + + +#ifndef VERSEKEY_H +#define VERSEKEY_H + +#include +#include +#include + +#include + +SWORD_NAMESPACE_START + +#define POS_MAXVERSE ((char)3) +#define POS_MAXCHAPTER ((char)4) +#define POS_MAXBOOK ((char)5) + +#define MAXVERSE SW_POSITION(POS_MAXVERSE) +#define MAXCHAPTER SW_POSITION(POS_MAXCHAPTER) +#define MAXBOOK SW_POSITION(POS_MAXBOOK) + + +struct sbook +{ + /**Name of book + */ + const char *name; + + /**Preferred Abbreviation + */ + const char *prefAbbrev; + + /**Maximum chapters in book + */ + unsigned char chapmax; + /** Array[chapmax] of maximum verses in chapters + */ + int *versemax; +}; + +struct abbrev +{ + const char *ab; + int book; +}; + + +class SWLocale; + +/** + * Class VerseKey + * The SWKey implementation used for verse based modules like Bibles or commentaries. + */ +class SWDLLEXPORT VerseKey : public SWKey { + + class LocaleCache { + public: + char *name; + unsigned int abbrevsCnt; + SWLocale *locale; + LocaleCache() { + name = 0; + abbrevsCnt = 0; + locale = 0; + } + virtual ~LocaleCache() { + if (name) + delete[]name; + } + }; + + static SWClass classdef; + + static long *offsets[2][2]; + static int offsize[2][2]; + /** number of instantiated VerseKey objects or derivitives + */ + static int instance; + static struct sbook otbooks[]; + static struct sbook ntbooks[]; + static const char *osisotbooks[]; + static const char *osisntbooks[]; + static const char **osisbooks[]; +#if 1 + static long otbks[]; + static long otcps[]; + static long ntbks[]; + static long ntcps[]; +#endif + static int vm[]; + static LocaleCache localeCache; + ListKey internalListKey; + + const struct abbrev *abbrevs; + char *locale; + int abbrevsCnt; + + /** The Testament: 0 - Old; 1 - New + */ + signed char testament; + mutable signed char book; + mutable signed int chapter; + mutable signed int verse; + + /** flag for auto normalization + */ + char autonorm; + + /** flag for headings on/off + */ + char headings; + + int getBookAbbrev(const char *abbr); + void initBounds() const; + + /** initialize and allocate books array + */ + void initstatics(); + + /** initializes this VerseKey() + */ + void init(); + + /** Binary search to find the index closest, but less + * than the given value. + * + * @param array long * to array to search + * @param size number of elements in the array + * @param value value to find + * @return the index into the array that is less than but closest to value + */ + int findindex(long *array, int size, long value); + + mutable VerseKey *lowerBound, *upperBound; + + +protected: + + /** Refresh keytext based on testament|book|chapter|verse + * default auto normalization to true + * default display headings option is false + */ + void freshtext() const; + /** Parse a character array into testament|book|chapter|verse + * + */ + virtual char parse(bool checkNormalize = true); +public: +#if 0 + static long otbks[]; + static long otcps[]; + static long ntbks[]; + static long ntcps[]; +#endif + static const char builtin_BMAX[2]; + static struct sbook *builtin_books[2]; + static const struct abbrev builtin_abbrevs[]; + const char *BMAX; + struct sbook **books; + + /** + * VerseKey Constructor - initializes Instance of VerseKey + * + * @param ikey text key (will take various forms of 'BOOK CH:VS'. + * See parse() for more detailed information) + */ + VerseKey(const char *ikey = 0); + + /** + * VerseKey Constructor - initializes instance of VerseKey + * + * @param ikey base key (will take various forms of 'BOOK CH:VS'. + * See parse() for more detailed information) + */ + VerseKey(const SWKey *ikey); + + /** VerseKey Constructor - initializes instance of VerseKey + * with boundariess - see also LowerBound() + * and UpperBound() + * @param min the lower boundary of the new VerseKey + * @param max the upper boundary of the new VerseKey + */ + VerseKey(const char *min, const char *max); + + /** VerseKey Copy Constructor - will create a new VerseKey + * based on an existing SWKey + * + * @param k the VerseKey to copy from + */ + VerseKey(const SWKey &k); + + /** VerseKey Copy Constructor - will create a new VerseKey + * based on an existing one + * + * @param k the VerseKey to copy from + */ + VerseKey(const VerseKey &k); + + /** VerseKey Destructor + * Cleans up an instance of VerseKey + */ + virtual ~VerseKey(); + + /** sets the lower boundary for this VerseKey + * and returns the new boundary + * + * @param lb the new lower boundary for this VerseKey + * @return the lower boundary the key was set to + */ + VerseKey &LowerBound(const char *lb); + + /** sets the upper boundary for this VerseKey + * and returns the new boundary + * @param ub the new upper boundary for this VerseKey + * @return the upper boundary the key was set to + */ + VerseKey &UpperBound(const char *ub); + + /** gets the lower boundary of this VerseKey + * @return the lower boundary of this VerseKey + */ + VerseKey &LowerBound() const; + + /** gets the upper boundary of this VerseKey + * @return the upper boundary of this VerseKey + */ + VerseKey &UpperBound() const; + + /** clears the boundaries of this VerseKey + */ + void ClearBounds(); + + /** Creates a new SWKey based on the current VerseKey + * see also the Copy Constructor + */ + virtual SWKey *clone() const; + + /** refreshes keytext before returning if cast to + * a (char *) is requested + */ + virtual const char *getText() const; + virtual const char *getShortText() const; + virtual void setText(const char *ikey, bool checkNormalize) { SWKey::setText(ikey); parse(checkNormalize); } + virtual void setText(const char *ikey) { SWKey::setText(ikey); parse(); } + virtual void copyFrom(const SWKey &ikey); + + /** Equates this VerseKey to another VerseKey + */ + virtual void copyFrom(const VerseKey &ikey); + + /** Positions this key + * + * @param newpos Position to set to. + * @return *this + */ + virtual void setPosition(SW_POSITION newpos); + + /** Decrements key a number of verses + * + * @param steps Number of verses to jump backward + * @return *this + */ + virtual void decrement(int steps); + + /** Increments key a number of verses + * + * @param steps Number of verses to jump forward + * @return *this + */ + virtual void increment(int steps); + virtual bool isTraversable() const { return true; } + + virtual const char *getBookName() const; + virtual const char *getBookAbbrev() const; + /** Gets testament + * + * @return value of testament + */ + virtual char Testament() const; + + /** Gets book + * + * @return value of book + */ + virtual char Book() const; + + /** Gets chapter + * + * @return value of chapter + */ + virtual int Chapter() const; + + /** Gets verse + * + * @return value of verse + */ + virtual int Verse() const; + + /** Sets/gets testament + * + * @param itestament value which to set testament + * [MAXPOS(char)] - only get + * @return if unchanged -> value of testament, + * if changed -> previous value of testament + */ + virtual char Testament(char itestament); + + /** Sets/gets book + * + * @param ibook value which to set book + * [MAXPOS(char)] - only get + * @return if unchanged -> value of book, + * if changed -> previous value of book + */ + virtual char Book(char ibook); + + /** Sets/gets chapter + * + * @param ichapter value which to set chapter + * [MAXPOS(int)] - only get + * @return if unchanged -> value of chapter, + * if changed -> previous value of chapter + */ + virtual int Chapter(int ichapter); + + /** Sets/gets verse + * + * @param iverse value which to set verse + * [MAXPOS(int)] - only get + * @return if unchanged -> value of verse, + * if changed -> previous value of verse + */ + virtual int Verse(int iverse); + + /** checks limits and normalizes if necessary (e.g. + * Matthew 29:47 = Mark 2:2). If last verse is + * exceeded, key is set to last Book CH:VS + * + * @return *this + */ + virtual void Normalize(char autocheck = 0); + + /** Sets/gets flag that tells VerseKey to + * automatically normalize itself when modified + * + * @param iautonorm value which to set autonorm + * [MAXPOS(char)] - only get + * @return if unchanged -> value of autonorm, + * if changed -> previous value of autonorm + */ + virtual char AutoNormalize(char iautonorm = MAXPOS(char)); + + /** Sets/gets flag that tells VerseKey to include + * chapter/book/testament/module headings + * + * @param iheadings value which to set headings + * [MAXPOS(char)] - only get + * @return if unchanged -> value of headings, + * if changed -> previous value of headings + */ + virtual char Headings(char iheadings = MAXPOS(char)); + + virtual long NewIndex() const; + + /** Gets index based upon current verse + * + * @return offset + */ + virtual long Index() const; + + /** Sets index based upon current verse + * + * @param iindex value to set index to + * @return offset + */ + virtual long Index(long iindex); + + virtual const char *getOSISRef() const; + static const int getOSISBookNum(const char *bookab); + + /** Tries to parse a string and convert it into an OSIS reference + * @param inRef reference string to try to parse + * @param defaultKey @see ParseVerseList(..., defaultKey, ...) + */ + static const char *convertToOSIS(const char *inRef, const SWKey *defaultKey); + + virtual ListKey ParseVerseList(const char *buf, const char *defaultKey = 0, bool expandRange = false); + virtual const char *getRangeText() const; + /** Compares another SWKey object + * + * @param ikey key to compare with this one + * @return >0 if this VerseKey is greater than compare SWKey, + * <0 if this VerseKey is smaller than compare SWKey, + * 0 if the keys are the same + */ + virtual int compare(const SWKey & ikey); + + /** Compares another VerseKey object + * + * @param ikey key to compare with this one + * @return >0 if this VerseKey is greater than compare VerseKey, + * <0 if this VerseKey is smaller than compare VerseKey, + * 0 if the keys are the same + */ + virtual int _compare(const VerseKey & ikey); + + virtual void setBookAbbrevs(const struct abbrev *bookAbbrevs, unsigned int size = 0 /* default determine size */ ); + virtual void setBooks(const char *iBMAX, struct sbook **ibooks); + virtual void setLocale(const char *name); + virtual const char *getLocale() const { return locale; } + + + + // OPERATORS -------------------------------------------------------------------- + + + SWKEY_OPERATORS + + virtual SWKey & operator =(const VerseKey & ikey) { copyFrom(ikey); return *this; } +}; + +SWORD_NAMESPACE_END + +#endif //VERSEKEY_H diff --git a/include/versetreekey.h b/include/versetreekey.h new file mode 100644 index 0000000..574c026 --- /dev/null +++ b/include/versetreekey.h @@ -0,0 +1,102 @@ +/****************************************************************************** + * versekey.h - code for class 'versekey'- a standard Biblical verse key + * + * $Id: versekey.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + + +#ifndef VERSETREEKEY_H +#define VERSETREEKEY_H + +#include +#include +#include +#include + +#include + +SWORD_NAMESPACE_START + +/** + * Class VerseKey + * The SWKey implementation used for verse based modules like Bibles or commentaries. + */ +class SWDLLEXPORT VerseTreeKey : public VerseKey { + + static SWClass classdef; + TreeKey *treeKey; + +public: + + /** + * VerseKey Constructor - initializes Instance of VerseKey + * + * @param ikey text key (will take various forms of 'BOOK CH:VS'. + * See parse() for more detailed information) + */ + VerseTreeKey(TreeKey *treeKey, const char *ikey = 0); + + /** + * VerseKey Constructor - initializes instance of VerseKey + * + * @param ikey base key (will take various forms of 'BOOK CH:VS'. + * See parse() for more detailed information) + */ + VerseTreeKey(TreeKey *treeKey, const SWKey *ikey); + + /** VerseKey Constructor - initializes instance of VerseKey + * with boundariess - see also LowerBound() + * and UpperBound() + * @param min the lower boundary of the new VerseKey + * @param max the upper boundary of the new VerseKey + */ + VerseTreeKey(TreeKey *treeKey, const char *min, const char *max); + + /** VerseKey Copy Constructor - will create a new VerseKey + * based on an existing one + * + * @param k the VerseKey to copy from + */ + VerseTreeKey(const VerseTreeKey &k); + + /** VerseKey Destructor + * Cleans up an instance of VerseKey + */ + virtual ~VerseTreeKey(); + + /** Creates a new SWKey based on the current VerseKey + * see also the Copy Constructor + */ + virtual SWKey *clone() const; + + virtual bool isTraversable() const { return true; } + + virtual TreeKey *getTreeKey() { return treeKey; } + + + // OPERATORS -------------------------------------------------------------------- + + + SWKEY_OPERATORS + + virtual SWKey & operator = (const VerseKey & ikey) { copyFrom(ikey); return *this; } +}; + +SWORD_NAMESPACE_END + +#endif //VERSETREEKEY_H diff --git a/include/zcom.h b/include/zcom.h new file mode 100644 index 0000000..137c5c3 --- /dev/null +++ b/include/zcom.h @@ -0,0 +1,73 @@ +/****************************************************************************** + * zcom.h - code for class 'zCom'- a module that reads compressed text + * files: ot and nt using indexs ??.vss + * + * $Id: zcom.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef ZCOM_H +#define ZCOM_H + +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT zCom : public zVerse, public SWCom { + + VerseKey *lastWriteKey; + bool sameBlock(VerseKey * lastWriteKey, VerseKey * key); + int blockType; + + +public: + + zCom(const char *ipath, const char *iname = 0, const char *idesc = 0, + int blockType = CHAPTERBLOCKS, SWCompress * icomp = 0, + SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, + SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0); + virtual ~zCom(); + virtual SWBuf &getRawEntryBuf(); + virtual void increment(int steps = 1); + virtual void decrement(int steps = 1) { increment(-steps); } + + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *path, int blockBound) { + return zVerse::createModule(path, blockBound); + } + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey * linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + // end write interface ------------------------ + + virtual void rawZFilter(SWBuf &buf, char direction = 0) { rawFilter(buf, (SWKey *)(long)direction); }// hack, use key as direction for enciphering + + // swcacher interface ---------------------- + virtual void flush() { flushCache(); } + // end swcacher interface ---------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END + +#endif diff --git a/include/zconf.h b/include/zconf.h new file mode 100644 index 0000000..cb3b162 --- /dev/null +++ b/include/zconf.h @@ -0,0 +1,279 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: zconf.h 1688 2005-01-01 04:42:26Z scribe $ */ + +#ifndef _ZCONF_H +#define _ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + */ +#ifdef Z_PREFIX +# define deflateInit_ z_deflateInit_ +# define deflate z_deflate +# define deflateEnd z_deflateEnd +# define inflateInit_ z_inflateInit_ +# define inflate z_inflate +# define inflateEnd z_inflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateSetDictionary z_deflateSetDictionary +# define deflateCopy z_deflateCopy +# define deflateReset z_deflateReset +# define deflateParams z_deflateParams +# define inflateInit2_ z_inflateInit2_ +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateReset z_inflateReset +# define compress z_compress +# define compress2 z_compress2 +# define uncompress z_uncompress +# define adler32 z_adler32 +# define crc32 z_crc32 +# define get_crc_table z_get_crc_table + +# define Byte z_Byte +# define uInt z_uInt +# define uLong z_uLong +# define Bytef z_Bytef +# define charf z_charf +# define intf z_intf +# define uIntf z_uIntf +# define uLongf z_uLongf +# define voidpf z_voidpf +# define voidp z_voidp +#endif + +#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) +# define WIN32 +#endif +#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) +# ifndef __32BIT__ +# define __32BIT__ +# endif +#endif +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#if defined(MSDOS) && !defined(__32BIT__) +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC) +# define STDC +#endif +#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__) +# ifndef STDC +# define STDC +# endif +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Old Borland C incorrectly complains about missing returns: */ +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) +# define NEED_DUMMY_RETURN +#endif + + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +#endif +#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) +# ifndef __32BIT__ +# define SMALL_MEDIUM +# define FAR _far +# endif +#endif + +/* Compile with -DZLIB_DLL for Windows DLL support */ +#if defined(ZLIB_DLL) +# if defined(_WINDOWS) || defined(WINDOWS) +# ifdef FAR +# undef FAR +# endif +# include +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR _cdecl _export +# endif +# endif +# if defined (__BORLANDC__) +# if (__BORLANDC__ >= 0x0500) && defined (WIN32) +# include +# define ZEXPORT __declspec(dllexport) WINAPI +# define ZEXPORTRVA __declspec(dllexport) WINAPIV +# else +# if defined (_Windows) && defined (__DLL__) +# define ZEXPORT _export +# define ZEXPORTVA _export +# endif +# endif +# endif +#endif + +#if defined (__BEOS__) +# if defined (ZLIB_DLL) +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +#endif + +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif +#ifndef ZEXTERN +# define ZEXTERN extern +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(MACOS) && !defined(TARGET_OS_MAC) && !defined(VCL) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef unsigned char FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#ifdef HAVE_UNISTD_H +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# define z_off_t off_t +#endif +#ifndef SEEK_SET +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif +#ifndef z_off_t +# define z_off_t long +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) +# pragma map(deflateInit_,"DEIN") +# pragma map(deflateInit2_,"DEIN2") +# pragma map(deflateEnd,"DEEND") +# pragma map(inflateInit_,"ININ") +# pragma map(inflateInit2_,"ININ2") +# pragma map(inflateEnd,"INEND") +# pragma map(inflateSync,"INSY") +# pragma map(inflateSetDictionary,"INSEDI") +# pragma map(inflate_blocks,"INBL") +# pragma map(inflate_blocks_new,"INBLNE") +# pragma map(inflate_blocks_free,"INBLFR") +# pragma map(inflate_blocks_reset,"INBLRE") +# pragma map(inflate_codes_free,"INCOFR") +# pragma map(inflate_codes,"INCO") +# pragma map(inflate_fast,"INFA") +# pragma map(inflate_flush,"INFLU") +# pragma map(inflate_mask,"INMA") +# pragma map(inflate_set_dictionary,"INSEDI2") +# pragma map(inflate_copyright,"INCOPY") +# pragma map(inflate_trees_bits,"INTRBI") +# pragma map(inflate_trees_dynamic,"INTRDY") +# pragma map(inflate_trees_fixed,"INTRFI") +# pragma map(inflate_trees_free,"INTRFR") +#endif + +#endif /* _ZCONF_H */ diff --git a/include/zipcomprs.h b/include/zipcomprs.h new file mode 100644 index 0000000..63500d4 --- /dev/null +++ b/include/zipcomprs.h @@ -0,0 +1,43 @@ +/****************************************************************************** + * swcomprs.h - definition of Class SWCompress used for data compression + * + * $Id: zipcomprs.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef ZIPCOMPRS_H +#define ZIPCOMPRS_H + +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT ZipCompress : public SWCompress { + +protected: +public: + ZipCompress(); + virtual ~ZipCompress(); + + virtual void Encode(void); + virtual void Decode(void); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/zld.h b/include/zld.h new file mode 100644 index 0000000..1046c33 --- /dev/null +++ b/include/zld.h @@ -0,0 +1,74 @@ +/****************************************************************************** + * zld.cpp - code for class 'zLD'- a module that reads compressed lexicon and + * dictionary files. + * + * $Id: zld.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef ZLD_H +#define ZLD_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +class SWDLLEXPORT zLD : public zStr, public SWLD { + + void strongsPad(char *buf); + char getEntry(long away = 0); + +public: + + + zLD(const char *ipath, const char *iname = 0, const char *idesc = 0, long blockCount = 200, SWCompress *icomp = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, + const char* ilang = 0); + virtual ~zLD(); + virtual SWBuf &getRawEntryBuf(); + + virtual void increment(int steps = 1); + virtual void decrement(int steps = 1) { increment(-steps); } + + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *path) { + return zStr::createModule(path); + } + + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + // end write interface ------------------------ + + virtual void rawZFilter(SWBuf &buf, char direction = 0) { rawFilter(buf, (SWKey *)(long)direction); }// hack, use key as direction for enciphering + + // swcacher interface ---------------------- + virtual void flush() { flushCache(); } + // end swcacher interface ---------------------- + + + // OPERATORS ----------------------------------------------------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/zlib.h b/include/zlib.h new file mode 100644 index 0000000..52cb529 --- /dev/null +++ b/include/zlib.h @@ -0,0 +1,893 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.1.4, March 11th, 2002 + + Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt + (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). +*/ + +#ifndef _ZLIB_H +#define _ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.1.4" + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed + data. This version of the library supports only one compression method + (deflation) but other algorithms will be added later and will have the same + stream interface. + + Compression can be done in a single step if the buffers are large + enough (for example if an input file is mmap'ed), or can be done by + repeated calls of the compression function. In the latter case, the + application must provide more input and/or consume the output + (providing more output space) before each call. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never + crash even in case of corrupted input. +*/ + +typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); +typedef void (*free_func) OF((voidpf opaque, voidpf address)); + +struct internal_state; + +typedef struct z_stream_s { + Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total nb of input bytes read so far */ + + Bytef *next_out; /* next output byte should be put there */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total nb of bytes output so far */ + + char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: ascii or binary */ + uLong adler; /* adler32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + The application must update next_in and avail_in when avail_in has + dropped to zero. It must update next_out and avail_out when avail_out + has dropped to zero. The application must initialize zalloc, zfree and + opaque before calling the init function. All other fields are set by the + compression library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this + if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, + pointers returned by zalloc for objects of exactly 65536 bytes *must* + have their offset normalized to zero. The default allocation function + provided by this library ensures this (see zutil.c). To reduce memory + requirements and avoid any allocation of 64K objects, at the expense of + compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or + progress reports. After compression, total_in holds the total size of + the uncompressed data and may be saved for use in the decompressor + (particularly if the decompressor wants to decompress everything in + a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +/* Allowed flush values; see deflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative + * values are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_ASCII 1 +#define Z_UNKNOWN 2 +/* Possible values of the data_type field */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is + not compatible with the zlib.h header file used by the application. + This check is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. + If zalloc and zfree are set to Z_NULL, deflateInit updates them to + use default allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at + all (the input data is simply copied a block at a time). + Z_DEFAULT_COMPRESSION requests a default compromise between speed and + compression (currently equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if level is not a valid compression level, + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). + msg is set to null if there is no error message. deflateInit does not + perform any compression: this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce some + output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary (in interactive applications). + Some output may be provided even if flush is not set. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating avail_in or avail_out accordingly; avail_out + should never be zero before the call. The application can consume the + compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK + and with zero avail_out, it must be called again after making room in the + output buffer because there might be more output pending. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In particular + avail_in is zero after the call if enough output space has been provided + before the call.) Flushing may degrade compression for some compression + algorithms and so it should be used only when necessary. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + the compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there + was enough output space; if deflate returns with Z_OK, this function must be + called again with Z_FINISH and more output space (updated avail_out) but no + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the + stream are deflateReset or deflateEnd. + + Z_FINISH can be used immediately after deflateInit if all the compression + is to be done in a single step. In this case, avail_out must be at least + 0.1% larger than avail_in plus 12 bytes. If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + deflate() sets strm->adler to the adler32 checksum of all input read + so far (that is, total_in bytes). + + deflate() may update data_type if it can make a good guess about + the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered + binary. This field is only for information purposes and does not affect + the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). +*/ + + +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, + msg may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. If next_in is not Z_NULL and avail_in is large enough (the exact + value depends on the compression method), inflateInit determines the + compression method from the zlib header and allocates all data structures + accordingly; otherwise the allocation will be deferred to the first call of + inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to + use default allocation functions. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller. msg is set to null if there is no error + message. inflateInit does not perform any decompression apart from reading + the zlib header if present: this will be done by inflate(). (So next_in and + avail_in may be modified, but next_out and avail_out are unchanged.) +*/ + + +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may some + introduce some output latency (reading input without producing any output) + except when forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing + will resume at this point for the next call of inflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there + is no more input data or no more space in the output buffer (see below + about the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating the next_* and avail_* values accordingly. + The application can consume the uncompressed output when it wants, for + example when the output buffer is full (avail_out == 0), or after each + call of inflate(). If inflate returns Z_OK and with zero avail_out, it + must be called again after making room in the output buffer because there + might be more output pending. + + If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much + output as possible to the output buffer. The flushing behavior of inflate is + not specified for values of the flush parameter other than Z_SYNC_FLUSH + and Z_FINISH, but the current implementation actually flushes as much output + as possible anyway. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step + (a single call of inflate), the parameter flush should be set to + Z_FINISH. In this case all pending input is processed and all pending + output is flushed; avail_out must be large enough to hold all the + uncompressed data. (The size of the uncompressed data may have been saved + by the compressor for this purpose.) The next operation on this stream must + be inflateEnd to deallocate the decompression state. The use of Z_FINISH + is never required, but can be used to inform inflate that a faster routine + may be used for the single inflate() call. + + If a preset dictionary is needed at this point (see inflateSetDictionary + below), inflate sets strm-adler to the adler32 checksum of the + dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise + it sets strm->adler to the adler32 checksum of all output produced + so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or + an error code as described below. At the end of the stream, inflate() + checks that its computed adler32 checksum is equal to that saved by the + compressor and returns Z_STREAM_END only if the checksum is correct. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect + adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent + (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if no progress is possible or if there was not + enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR + case, the application may then call inflateSync to look for a good + compression block. +*/ + + +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state + was inconsistent. In the error case, msg may be set but then points to a + static string (which must not be deallocated). +*/ + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy)); + + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by + the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but + is slow and reduces compression ratio; memLevel=9 uses maximum memory + for optimal speed. The default value is 8. See zconf.h for total memory + usage as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match). Filtered data consists mostly of small values with a + somewhat random distribution. In this case, the compression algorithm is + tuned to compress them better. The effect of Z_FILTERED is to force more + Huffman coding and less string matching; it is somewhat intermediate + between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects + the compression ratio but not the correctness of the compressed output even + if it is not set appropriately. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid + method). msg is set to null if there is no error message. deflateInit2 does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any + call of deflate. The compressor and decompressor must use exactly the same + dictionary (see inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size in + deflate or deflate2. Thus the strings most likely to be useful should be + put at the end of the dictionary, not at the front. + + Upon return of this function, strm->adler is set to the Adler32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The Adler32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if the compression method is bsort). deflateSetDictionary does not + perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and + can consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +/* + This function is equivalent to deflateEnd followed by deflateInit, + but does not free and reallocate all the internal compression state. + The stream will keep the same compression level and any other attributes + that may have been set by deflateInit2. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2. This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different + strategy. If the compression level is changed, the input available so far + is compressed with the old level (and may be flushed); the new level will + take effect only at the next call of deflate(). + + Before the call of deflateParams, the stream state must be set as for + a call of deflate(), since the currently available input may have to + be compressed and flushed. In particular, strm->avail_out must be non-zero. + + deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR + if strm->avail_out was zero. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, + int windowBits)); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. If a compressed stream with a larger window size is given as + input, inflate() will return with the error code Z_DATA_ERROR instead of + trying to allocate a larger window. + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative + memLevel). msg is set to null if there is no error message. inflateInit2 + does not perform any decompression apart from reading the zlib header if + present: this will be done by inflate(). (So next_in and avail_in may be + modified, but next_out and avail_out are unchanged.) +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate + if this call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler32 value returned by this call of + inflate. The compressor and decompressor must use exactly the same + dictionary (see deflateSetDictionary). + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect Adler32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +/* + Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been found, + or Z_STREAM_ERROR if the stream structure was inconsistent. In the success + case, the application may save the current current value of total_in which + indicates where valid compressed data was found. In the error case, the + application may repeatedly call inflateSync, providing more input each time, + until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate all the internal decompression state. + The stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + + + /* utility functions */ + +/* + The following utility functions are implemented on top of the + basic stream-oriented functions. To simplify the interface, some + default options are assumed (compression level and memory usage, + standard memory allocation functions). The source code of these + utility functions can easily be modified if you need special options. +*/ + +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be at least 0.1% larger than + sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the + compressed buffer. + This function can be used to compress a whole file at once if the + input file is mmap'ed. + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least 0.1% larger than sourceLen plus + 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +*/ + + +typedef voidp gzFile; + +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); +/* + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb") but can also include a compression level + ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for + Huffman only compression as in "wb1h". (See the description + of deflateInit2 for more information about the strategy parameter.) + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. + + gzopen returns NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). */ + +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + gzdopen() associates a gzFile with the file descriptor fd. File + descriptors are obtained from calls like open, dup, creat, pipe or + fileno (in the file has been previously opened with fopen). + The mode parameter is as in gzopen. + The next call of gzclose on the returned gzFile will also close the + file descriptor fd, just like fclose(fdopen(fd), mode) closes the file + descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). + gzdopen returns NULL if there was insufficient memory to allocate + the (de)compression state. +*/ + +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +/* + Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. + gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not + opened for writing. +*/ + +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +/* + Reads the given number of uncompressed bytes from the compressed file. + If the input file was not in gzip format, gzread copies the given number + of bytes into the buffer. + gzread returns the number of uncompressed bytes actually read (0 for + end of file, -1 for error). */ + +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + const voidp buf, unsigned len)); +/* + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes actually written + (0 in case of error). +*/ + +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +/* + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). +*/ + +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +/* + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +/* + Reads bytes from the compressed file until len-1 characters are read, or + a newline character is read and transferred to buf, or an end-of-file + condition is encountered. The string is then terminated with a null + character. + gzgets returns buf, or Z_NULL in case of error. +*/ + +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +/* + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +/* + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +*/ + +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +/* + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. The return value is the zlib + error number (see function gzerror below). gzflush returns Z_OK if + the flush parameter is Z_FINISH and all output could be flushed. + gzflush should be called only when strictly necessary because it can + degrade compression. +*/ + +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); +/* + Sets the starting position for the next gzread or gzwrite on the + given compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +/* + Rewinds the given file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) +*/ + +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); +/* + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +/* + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ + +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +/* + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. The return value is the zlib + error number (see function gzerror below). +*/ + +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +/* + Returns the error message for the last error which occurred on the + given compressed file. errnum is set to zlib error number. If an + error occurred in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +*/ + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the + compression library. +*/ + +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); + +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. If buf is NULL, this function returns + the required initial value for the checksum. + An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +/* + Update a running crc with the bytes buf[0..len-1] and return the updated + crc. If buf is NULL, this function returns the required initial value + for the crc. Pre- and post-conditioning (one's complement) is performed + within this function so it shouldn't be done by the application. + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); +#define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) +#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) + + +#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL) + struct internal_state {int dummy;}; /* hack for buggy compilers */ +#endif + +ZEXTERN const char * ZEXPORT zError OF((int err)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); +ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); + +#ifdef __cplusplus +} +#endif + +#endif /* _ZLIB_H */ diff --git a/include/zstr.h b/include/zstr.h new file mode 100644 index 0000000..2622ca7 --- /dev/null +++ b/include/zstr.h @@ -0,0 +1,76 @@ +/***************************************************************************** + * zstr.h - code for class 'zStr'- a module that reads compressed text + * files. + * and provides lookup and parsing functions based on + * class StrKey + * + * $Id: zstr.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef ZSTR_H +#define ZSTR_H + +#include + +SWORD_NAMESPACE_START + +class SWCompress; +class EntriesBlock; +class FileDesc; +class SWBuf; + +class SWDLLEXPORT zStr { + +private: + static int instance; // number of instantiated zStr objects or derivitives + EntriesBlock *cacheBlock; + long cacheBlockIndex; + bool cacheDirty; + char *path; + long lastoff; + long blockCount; + SWCompress *compressor; + +protected: + FileDesc *idxfd; + FileDesc *datfd; + FileDesc *zdxfd; + FileDesc *zdtfd; + static const int IDXENTRYSIZE; + static const int ZDXENTRYSIZE; + + void getCompressedText(long block, long entry, char **buf); + void flushCache(); + void prepText(SWBuf &buf); + void getKeyFromDatOffset(long ioffset, char **buf); + void getKeyFromIdxOffset(long ioffset, char **buf); + +public: + char nl; + zStr(const char *ipath, int fileMode = -1, long blockCount = 100, SWCompress *icomp = 0); + virtual ~zStr(); + signed char findKeyIndex(const char *ikey, long *idxoff, long away = 0); + void getText(long index, char **idxbuf, char **buf); + void setText(const char *ikey, const char *buf, long len = -1); + void linkEntry(const char *destkey, const char *srckey); + virtual void rawZFilter(SWBuf &buf, char direction = 0) {} + static signed char createModule (const char *path); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/ztext.h b/include/ztext.h new file mode 100644 index 0000000..461dc45 --- /dev/null +++ b/include/ztext.h @@ -0,0 +1,88 @@ +/****************************************************************************** + * ztext.h - code for class 'zText'- a module that reads compressed text + * files: ot and nt using indexs ??.vss + * + * $Id: ztext.h 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef ZTEXT_H +#define ZTEXT_H + +#include +#include + +#include + +namespace lucene { namespace index { +class IndexReader; +}} + +namespace lucene { namespace search { +class IndexSearcher; +}} + +SWORD_NAMESPACE_START + +/*** SWModule implementation for compressed modules +* This class handles compressed modules. +* It should not be used in frontends, unless you are doing very special things. +*/ +class SWDLLEXPORT zText:public zVerse, public SWText { + + VerseKey *lastWriteKey; + bool sameBlock(VerseKey * lastWriteKey, VerseKey * key); + int blockType; + + +public: + + zText(const char *ipath, const char *iname = 0, const char *idesc = 0, + int blockType = CHAPTERBLOCKS, SWCompress * icomp = 0, + SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, + SWTextDirection dir = DIRECTION_LTR, + SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0); + + virtual ~zText(); + virtual SWBuf &getRawEntryBuf(); + + virtual void increment(int steps = 1); + virtual void decrement(int steps = 1) { increment(-steps); } + + // write interface ---------------------------- + virtual bool isWritable(); + static char createModule(const char *path, int blockBound) { + return zVerse::createModule(path, blockBound); + } + + virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry + virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry + virtual void deleteEntry(); // Delete current module entry + // end write interface ------------------------ + + virtual void rawZFilter(SWBuf &buf, char direction = 0) { rawFilter(buf, (SWKey *)(long)direction); }// hack, use key as direction for enciphering + + // swcacher interface ---------------------- + virtual void flush() { flushCache(); } + // end swcacher interface ---------------------- + + SWMODULE_OPERATORS + +}; + +SWORD_NAMESPACE_END +#endif diff --git a/include/zverse.h b/include/zverse.h new file mode 100644 index 0000000..6323025 --- /dev/null +++ b/include/zverse.h @@ -0,0 +1,59 @@ +/****************************************************************************** + * rawverse.h - code for class 'zVerse'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class VerseKey + */ + +#ifndef ZVERSE_H +#define ZVERSE_H + +#include + +SWORD_NAMESPACE_START + +class FileDesc; +class SWCompress; +class SWBuf; + +class SWDLLEXPORT zVerse { + SWCompress *compressor; + +protected: + static int instance; // number of instantiated zVerse objects or derivitives + + FileDesc *idxfp[2]; + FileDesc *textfp[2]; + FileDesc *compfp[2]; + char *path; + void prepText(SWBuf &buf); + void doSetText(char testmt, long idxoff, const char *buf, long len = 0); + void doLinkEntry(char testmt, long destidxoff, long srcidxoff); + void flushCache(); + char *cacheBuf; + char cacheTestament; + long cacheBufIdx; + bool dirtyCache; + +public: + +#define VERSEBLOCKS 2 +#define CHAPTERBLOCKS 3 +#define BOOKBLOCKS 4 + + static const char uniqueIndexID[]; + char nl; + + + // fileMode default = RDONLY + zVerse(const char *ipath, int fileMode = -1, int blockType = CHAPTERBLOCKS, SWCompress * icomp = 0); + virtual ~zVerse(); + + void findOffset(char testmt, long idxoff, long *start, unsigned short *end); + void zReadText(char testmt, long start, unsigned short size, SWBuf &buf); + virtual void rawZFilter(SWBuf &buf, char direction = 0) {} + static char createModule(const char *path, int blockBound); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/install-sh b/install-sh new file mode 100755 index 0000000..4fbbae7 --- /dev/null +++ b/install-sh @@ -0,0 +1,507 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-10-14.15 + +# 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. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +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: +-c (ignored) +-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. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + shift + shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac +done + +if test $# -ne 0 && test -z "$dir_arg$dstarg"; 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 "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$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 "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # 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: $dstarg: 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 + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + 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"; } && + + # Now 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. + { + if test -f "$dst"; then + $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 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + } || 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: diff --git a/lib/.cvsignore b/lib/.cvsignore new file mode 100644 index 0000000..3bbe136 --- /dev/null +++ b/lib/.cvsignore @@ -0,0 +1,6 @@ +*.lo +Makefile +Makefile.in +libsword.la +.deps +.libs diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 0000000..d658aa3 --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,51 @@ +AUTOMAKE_OPTIONS = 1.6 +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS += -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ + +if ZLIB +ZLIBDEF = +else +ZLIBDEF = -DEXCLUDEZLIB +endif + +AM_CPPFLAGS += $(ZLIBDEF) + +# Global config directory +globalconfdir := @sysconfdir@ + +lib_LTLIBRARIES = libsword.la + +libsword_la_SOURCES = +if ICU +ICULIBADD = $(ICU_LIBS) $(ICU_IOLIBS) +ICUDEF = -DSWICU_DATA=\"${pkglibdir}/${VERSION}_icu_${ICU_VER}\" +else +ICULIBADD = +ICUDEF = +endif + +AM_CPPFLAGS += $(ICUDEF) + +#if WITHCURL +if INSTALLMGR +IMGRLIBADD = -lcurl $(CURL_LIBS) +else +IMGRLIBADD = +endif + + +libsword_la_LIBADD = $(ICULIBADD) $(IMGRLIBADD) $(CLUCENE_LIBS) + +libsword_la_LDFLAGS = -release $(VERSION) + +include ../src/keys/Makefile.am +include ../src/utilfuns/Makefile.am +include ../src/mgr/Makefile.am +include ../src/frontend/Makefile.am +include ../src/modules/Makefile.am +#include ../bindings/Makefile.am +bindingsdir = $(top_srcdir)/bindings +libsword_la_SOURCES += $(bindingsdir)/flatapi.cpp +include ../include/Makefile.am + + diff --git a/lib/Makefile.in b/lib/Makefile.in new file mode 100644 index 0000000..fec7695 --- /dev/null +++ b/lib/Makefile.in @@ -0,0 +1,2006 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +DIST_COMMON = README $(pkginclude_HEADERS) \ + $(srcdir)/../include/Makefile.am \ + $(srcdir)/../src/frontend/Makefile.am \ + $(srcdir)/../src/keys/Makefile.am \ + $(srcdir)/../src/mgr/Makefile.am \ + $(srcdir)/../src/modules/Makefile.am \ + $(srcdir)/../src/modules/comments/Makefile.am \ + $(srcdir)/../src/modules/comments/hrefcom/Makefile.am \ + $(srcdir)/../src/modules/comments/rawcom/Makefile.am \ + $(srcdir)/../src/modules/comments/rawcom4/Makefile.am \ + $(srcdir)/../src/modules/comments/rawfiles/Makefile.am \ + $(srcdir)/../src/modules/comments/zcom/Makefile.am \ + $(srcdir)/../src/modules/common/Makefile.am \ + $(srcdir)/../src/modules/filters/Makefile.am \ + $(srcdir)/../src/modules/genbook/Makefile.am \ + $(srcdir)/../src/modules/genbook/rawgenbook/Makefile.am \ + $(srcdir)/../src/modules/lexdict/Makefile.am \ + $(srcdir)/../src/modules/lexdict/rawld/Makefile.am \ + $(srcdir)/../src/modules/lexdict/rawld4/Makefile.am \ + $(srcdir)/../src/modules/lexdict/zld/Makefile.am \ + $(srcdir)/../src/modules/texts/Makefile.am \ + $(srcdir)/../src/modules/texts/rawtext/Makefile.am \ + $(srcdir)/../src/modules/texts/rawtext4/Makefile.am \ + $(srcdir)/../src/modules/texts/ztext/Makefile.am \ + $(srcdir)/../src/utilfuns/Makefile.am $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +@HAVE_VSNPRINTF_FALSE@am__append_1 = -DNO_VSNPRINTF +subdir = lib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ + $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +@ICU_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \ +@ICU_TRUE@ $(am__DEPENDENCIES_1) +@INSTALLMGR_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) +libsword_la_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \ + $(am__DEPENDENCIES_1) +am__libsword_la_SOURCES_DIST = $(keysdir)/swkey.cpp \ + $(keysdir)/listkey.cpp $(keysdir)/strkey.cpp \ + $(keysdir)/treekey.cpp $(keysdir)/treekeyidx.cpp \ + $(keysdir)/versekey.cpp $(keysdir)/versetreekey.cpp \ + $(utilfunsdir)/swobject.cpp $(utilfunsdir)/utilstr.cpp \ + $(utilfunsdir)/utilxml.cpp $(utilfunsdir)/swunicod.cpp \ + $(utilfunsdir)/swversion.cpp $(utilfunsdir)/swbuf.cpp \ + $(utilfunsdir)/ftpparse.c $(utilfunsdir)/url.cpp \ + $(utilfunsdir)/zlib/untgz.c $(utilfunsdir)/ftplib.c \ + $(utilfunsdir)/regex.c $(utilfunsdir)/roman.cpp \ + $(mgrdir)/ftplibftpt.cpp $(mgrdir)/curlftpt.cpp \ + $(mgrdir)/swconfig.cpp $(mgrdir)/swmgr.cpp \ + $(mgrdir)/swfiltermgr.cpp $(mgrdir)/encfiltmgr.cpp \ + $(mgrdir)/markupfiltmgr.cpp $(mgrdir)/filemgr.cpp \ + $(mgrdir)/ftptrans.cpp $(mgrdir)/swlocale.cpp \ + $(mgrdir)/localemgr.cpp $(mgrdir)/swcacher.cpp \ + $(mgrdir)/swsearchable.cpp $(mgrdir)/installmgr.cpp \ + $(mgrdir)/stringmgr.cpp $(frontenddir)/swdisp.cpp \ + $(frontenddir)/swlog.cpp $(modulesdir)/swmodule.cpp \ + $(commondir)/rawstr.cpp $(commondir)/rawstr4.cpp \ + $(commondir)/swcomprs.cpp $(commondir)/lzsscomprs.cpp \ + $(commondir)/zipcomprs.cpp $(commondir)/rawverse.cpp \ + $(commondir)/rawverse4.cpp $(commondir)/swcipher.cpp \ + $(commondir)/zverse.cpp $(commondir)/zstr.cpp \ + $(commondir)/entriesblk.cpp $(commondir)/sapphire.cpp \ + $(filtersdir)/swbasicfilter.cpp $(filtersdir)/swoptfilter.cpp \ + $(filtersdir)/latin1utf8.cpp $(filtersdir)/latin1utf16.cpp \ + $(filtersdir)/utf8utf16.cpp $(filtersdir)/utf16utf8.cpp \ + $(filtersdir)/scsuutf8.cpp $(filtersdir)/utf8html.cpp \ + $(filtersdir)/utf8latin1.cpp \ + $(filtersdir)/utf8cantillation.cpp \ + $(filtersdir)/utf8hebrewpoints.cpp \ + $(filtersdir)/utf8greekaccents.cpp $(filtersdir)/cipherfil.cpp \ + $(filtersdir)/utf8transliterator.cpp $(filtersdir)/utf8nfc.cpp \ + $(filtersdir)/utf8nfkd.cpp $(filtersdir)/utf8arshaping.cpp \ + $(filtersdir)/utf8bidireorder.cpp \ + $(filtersdir)/osisheadings.cpp $(filtersdir)/osisfootnotes.cpp \ + $(filtersdir)/osishtmlhref.cpp $(filtersdir)/osiswebif.cpp \ + $(filtersdir)/osismorph.cpp $(filtersdir)/osisstrongs.cpp \ + $(filtersdir)/osisplain.cpp $(filtersdir)/osisrtf.cpp \ + $(filtersdir)/osislemma.cpp \ + $(filtersdir)/osisredletterwords.cpp \ + $(filtersdir)/osisscripref.cpp $(filtersdir)/osisvariants.cpp \ + $(filtersdir)/osiswordjs.cpp \ + $(filtersdir)/osismorphsegmentation.cpp \ + $(filtersdir)/gbfhtml.cpp $(filtersdir)/gbfhtmlhref.cpp \ + $(filtersdir)/gbfwebif.cpp $(filtersdir)/gbfplain.cpp \ + $(filtersdir)/gbfrtf.cpp $(filtersdir)/gbfstrongs.cpp \ + $(filtersdir)/gbffootnotes.cpp $(filtersdir)/gbfheadings.cpp \ + $(filtersdir)/gbfredletterwords.cpp $(filtersdir)/gbfmorph.cpp \ + $(filtersdir)/gbfwordjs.cpp $(filtersdir)/thmlstrongs.cpp \ + $(filtersdir)/thmlfootnotes.cpp $(filtersdir)/thmlheadings.cpp \ + $(filtersdir)/thmlmorph.cpp $(filtersdir)/thmllemma.cpp \ + $(filtersdir)/thmlscripref.cpp $(filtersdir)/thmlvariants.cpp \ + $(filtersdir)/thmlgbf.cpp $(filtersdir)/thmlrtf.cpp \ + $(filtersdir)/thmlhtml.cpp $(filtersdir)/thmlhtmlhref.cpp \ + $(filtersdir)/thmlwebif.cpp $(filtersdir)/thmlwordjs.cpp \ + $(filtersdir)/gbfthml.cpp $(filtersdir)/gbfosis.cpp \ + $(filtersdir)/thmlosis.cpp $(filtersdir)/thmlplain.cpp \ + $(filtersdir)/osisosis.cpp $(filtersdir)/rtfhtml.cpp \ + $(filtersdir)/plainfootnotes.cpp $(filtersdir)/plainhtml.cpp \ + $(filtersdir)/greeklexattribs.cpp $(filtersdir)/unicodertf.cpp \ + $(filtersdir)/papyriplain.cpp $(filtersdir)/teiplain.cpp \ + $(filtersdir)/teirtf.cpp $(filtersdir)/teihtmlhref.cpp \ + $(genbookdir)/swgenbook.cpp $(rawgenbookdir)/rawgenbook.cpp \ + $(textsdir)/swtext.cpp $(rawtextdir)/rawtext.cpp \ + $(rawtext4dir)/rawtext4.cpp $(ztextdir)/ztext.cpp \ + $(commentsdir)/swcom.cpp $(rawcomdir)/rawcom.cpp \ + $(rawcom4dir)/rawcom4.cpp $(rawfilesdir)/rawfiles.cpp \ + $(zcomdir)/zcom.cpp $(hrefcomdir)/hrefcom.cpp \ + $(lexdictdir)/swld.cpp $(rawlddir)/rawld.cpp \ + $(rawld4dir)/rawld4.cpp $(zlddir)/zld.cpp \ + $(bindingsdir)/flatapi.cpp +@ZLIB_TRUE@am__objects_1 = untgz.lo +@INTERNALFTPLIB_TRUE@am__objects_2 = ftplib.lo +@MINGW_TRUE@am__objects_3 = regex.lo +@WITHCURL_FALSE@am__objects_4 = ftplibftpt.lo +@WITHCURL_TRUE@am__objects_4 = curlftpt.lo +@ZLIB_TRUE@am__objects_5 = zipcomprs.lo +am__objects_6 = utf8transliterator.lo utf8nfc.lo utf8nfkd.lo \ + utf8arshaping.lo utf8bidireorder.lo +@ICUSWORD_TRUE@@ICU_FALSE@am__objects_7 = $(am__objects_6) +@ICU_TRUE@am__objects_7 = $(am__objects_6) +am__objects_8 = osisheadings.lo osisfootnotes.lo osishtmlhref.lo \ + osiswebif.lo osismorph.lo osisstrongs.lo osisplain.lo \ + osisrtf.lo osislemma.lo osisredletterwords.lo osisscripref.lo \ + osisvariants.lo osiswordjs.lo osismorphsegmentation.lo +am__objects_9 = gbfhtml.lo gbfhtmlhref.lo gbfwebif.lo gbfplain.lo \ + gbfrtf.lo gbfstrongs.lo gbffootnotes.lo gbfheadings.lo \ + gbfredletterwords.lo gbfmorph.lo gbfwordjs.lo +am__objects_10 = thmlstrongs.lo thmlfootnotes.lo thmlheadings.lo \ + thmlmorph.lo thmllemma.lo thmlscripref.lo thmlvariants.lo \ + thmlgbf.lo thmlrtf.lo thmlhtml.lo thmlhtmlhref.lo thmlwebif.lo \ + thmlwordjs.lo +am__objects_11 = gbfthml.lo gbfosis.lo thmlosis.lo thmlplain.lo \ + osisosis.lo +am__objects_12 = rtfhtml.lo plainfootnotes.lo plainhtml.lo \ + greeklexattribs.lo unicodertf.lo papyriplain.lo +am__objects_13 = teiplain.lo teirtf.lo teihtmlhref.lo +am_libsword_la_OBJECTS = swkey.lo listkey.lo strkey.lo treekey.lo \ + treekeyidx.lo versekey.lo versetreekey.lo swobject.lo \ + utilstr.lo utilxml.lo swunicod.lo swversion.lo swbuf.lo \ + ftpparse.lo url.lo $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) roman.lo $(am__objects_4) swconfig.lo \ + swmgr.lo swfiltermgr.lo encfiltmgr.lo markupfiltmgr.lo \ + filemgr.lo ftptrans.lo swlocale.lo localemgr.lo swcacher.lo \ + swsearchable.lo installmgr.lo stringmgr.lo swdisp.lo swlog.lo \ + swmodule.lo rawstr.lo rawstr4.lo swcomprs.lo lzsscomprs.lo \ + $(am__objects_5) rawverse.lo rawverse4.lo swcipher.lo \ + zverse.lo zstr.lo entriesblk.lo sapphire.lo swbasicfilter.lo \ + swoptfilter.lo latin1utf8.lo latin1utf16.lo utf8utf16.lo \ + utf16utf8.lo scsuutf8.lo utf8html.lo utf8latin1.lo \ + utf8cantillation.lo utf8hebrewpoints.lo utf8greekaccents.lo \ + cipherfil.lo $(am__objects_7) $(am__objects_8) \ + $(am__objects_9) $(am__objects_10) $(am__objects_11) \ + $(am__objects_12) $(am__objects_13) swgenbook.lo rawgenbook.lo \ + swtext.lo rawtext.lo rawtext4.lo ztext.lo swcom.lo rawcom.lo \ + rawcom4.lo rawfiles.lo zcom.lo hrefcom.lo swld.lo rawld.lo \ + rawld4.lo zld.lo flatapi.lo +libsword_la_OBJECTS = $(am_libsword_la_OBJECTS) +libsword_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libsword_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libsword_la_SOURCES) +DIST_SOURCES = $(am__libsword_la_SOURCES_DIST) +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_CONFIG = @CPPUNIT_CONFIG@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CURL_AM_CFLAGS = @CURL_AM_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ $(am__append_1) +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +GREP = @GREP@ +ICU_CONFIG = @ICU_CONFIG@ +ICU_IOLIBS = @ICU_IOLIBS@ +ICU_LIBS = @ICU_LIBS@ +ICU_VER = @ICU_VER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGDATA = @PKGDATA@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dir_confdef = @dir_confdef@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 +AM_CPPFLAGS = -I$(top_srcdir)/include -DUSE_AUTOTOOLS -DUNIX -Dunix \ + -D__unix__ $(ZLIBDEF) $(ICUDEF) $(globdef) -D_FTPLIB_NO_COMPAT \ + $(ICUDEFS) +@ZLIB_FALSE@ZLIBDEF = -DEXCLUDEZLIB +@ZLIB_TRUE@ZLIBDEF = + +# Global config directory +globalconfdir := @sysconfdir@ +lib_LTLIBRARIES = libsword.la +libsword_la_SOURCES = $(keysdir)/swkey.cpp $(keysdir)/listkey.cpp \ + $(keysdir)/strkey.cpp $(keysdir)/treekey.cpp \ + $(keysdir)/treekeyidx.cpp $(keysdir)/versekey.cpp \ + $(keysdir)/versetreekey.cpp $(utilfunsdir)/swobject.cpp \ + $(utilfunsdir)/utilstr.cpp $(utilfunsdir)/utilxml.cpp \ + $(utilfunsdir)/swunicod.cpp $(utilfunsdir)/swversion.cpp \ + $(utilfunsdir)/swbuf.cpp $(utilfunsdir)/ftpparse.c \ + $(utilfunsdir)/url.cpp $(UNTGZ) $(ftpsrc) $(SWREGEX) \ + $(utilfunsdir)/roman.cpp $(FTP_SOURCES) $(mgrdir)/swconfig.cpp \ + $(mgrdir)/swmgr.cpp $(mgrdir)/swfiltermgr.cpp \ + $(mgrdir)/encfiltmgr.cpp $(mgrdir)/markupfiltmgr.cpp \ + $(mgrdir)/filemgr.cpp $(mgrdir)/ftptrans.cpp \ + $(mgrdir)/swlocale.cpp $(mgrdir)/localemgr.cpp \ + $(mgrdir)/swcacher.cpp $(mgrdir)/swsearchable.cpp \ + $(mgrdir)/installmgr.cpp $(mgrdir)/stringmgr.cpp \ + $(frontenddir)/swdisp.cpp $(frontenddir)/swlog.cpp \ + $(modulesdir)/swmodule.cpp $(commondir)/rawstr.cpp \ + $(commondir)/rawstr4.cpp $(commondir)/swcomprs.cpp \ + $(commondir)/lzsscomprs.cpp $(SWZLIB) \ + $(commondir)/rawverse.cpp $(commondir)/rawverse4.cpp \ + $(commondir)/swcipher.cpp $(commondir)/zverse.cpp \ + $(commondir)/zstr.cpp $(commondir)/entriesblk.cpp \ + $(commondir)/sapphire.cpp $(filtersdir)/swbasicfilter.cpp \ + $(filtersdir)/swoptfilter.cpp $(filtersdir)/latin1utf8.cpp \ + $(filtersdir)/latin1utf16.cpp $(filtersdir)/utf8utf16.cpp \ + $(filtersdir)/utf16utf8.cpp $(filtersdir)/scsuutf8.cpp \ + $(filtersdir)/utf8html.cpp $(filtersdir)/utf8latin1.cpp \ + $(filtersdir)/utf8cantillation.cpp \ + $(filtersdir)/utf8hebrewpoints.cpp \ + $(filtersdir)/utf8greekaccents.cpp $(filtersdir)/cipherfil.cpp \ + $(SWREALICUSRC) $(OSISFIL) $(GBFFIL) $(THMLFIL) $(CONVFIL) \ + $(PLFIL) $(TEIFIL) $(genbookdir)/swgenbook.cpp \ + $(rawgenbookdir)/rawgenbook.cpp $(textsdir)/swtext.cpp \ + $(rawtextdir)/rawtext.cpp $(rawtext4dir)/rawtext4.cpp \ + $(ztextdir)/ztext.cpp $(commentsdir)/swcom.cpp \ + $(rawcomdir)/rawcom.cpp $(rawcom4dir)/rawcom4.cpp \ + $(rawfilesdir)/rawfiles.cpp $(zcomdir)/zcom.cpp \ + $(hrefcomdir)/hrefcom.cpp $(lexdictdir)/swld.cpp \ + $(rawlddir)/rawld.cpp $(rawld4dir)/rawld4.cpp \ + $(zlddir)/zld.cpp $(bindingsdir)/flatapi.cpp +@ICU_FALSE@ICULIBADD = +@ICU_TRUE@ICULIBADD = $(ICU_LIBS) $(ICU_IOLIBS) +@ICU_FALSE@ICUDEF = +@ICU_TRUE@ICUDEF = -DSWICU_DATA=\"${pkglibdir}/${VERSION}_icu_${ICU_VER}\" +@INSTALLMGR_FALSE@IMGRLIBADD = + +#if WITHCURL +@INSTALLMGR_TRUE@IMGRLIBADD = -lcurl $(CURL_LIBS) +libsword_la_LIBADD = $(ICULIBADD) $(IMGRLIBADD) $(CLUCENE_LIBS) +libsword_la_LDFLAGS = -release $(VERSION) +keysdir = $(top_srcdir)/src/keys +utilfunsdir = $(top_srcdir)/src/utilfuns +@INTERNALFTPLIB_FALSE@ftpsrc = +@INTERNALFTPLIB_TRUE@ftpsrc = $(utilfunsdir)/ftplib.c +@ZLIB_FALSE@UNTGZ = +@ZLIB_TRUE@UNTGZ = $(utilfunsdir)/zlib/untgz.c +@MINGW_FALSE@SWREGEX = +@MINGW_TRUE@SWREGEX = $(utilfunsdir)/regex.c +mgrdir = $(top_srcdir)/src/mgr +@CONFDEF_FALSE@globdef = +@CONFDEF_TRUE@globdef = -DGLOBCONFPATH=\"${globalconfdir}/sword.conf\" +@WITHCURL_FALSE@FTP_SOURCES = $(mgrdir)/ftplibftpt.cpp +@WITHCURL_TRUE@FTP_SOURCES = $(mgrdir)/curlftpt.cpp +frontenddir = $(top_srcdir)/src/frontend +modulesdir = $(top_srcdir)/src/modules +commondir = $(top_srcdir)/src/modules/common +@ZLIB_FALSE@SWZLIB = +@ZLIB_TRUE@SWZLIB = $(commondir)/zipcomprs.cpp +filtersdir = $(top_srcdir)/src/modules/filters +GBFFIL = $(filtersdir)/gbfhtml.cpp $(filtersdir)/gbfhtmlhref.cpp \ + $(filtersdir)/gbfwebif.cpp $(filtersdir)/gbfplain.cpp \ + $(filtersdir)/gbfrtf.cpp $(filtersdir)/gbfstrongs.cpp \ + $(filtersdir)/gbffootnotes.cpp $(filtersdir)/gbfheadings.cpp \ + $(filtersdir)/gbfredletterwords.cpp $(filtersdir)/gbfmorph.cpp \ + $(filtersdir)/gbfwordjs.cpp +THMLFIL = $(filtersdir)/thmlstrongs.cpp \ + $(filtersdir)/thmlfootnotes.cpp $(filtersdir)/thmlheadings.cpp \ + $(filtersdir)/thmlmorph.cpp $(filtersdir)/thmllemma.cpp \ + $(filtersdir)/thmlscripref.cpp $(filtersdir)/thmlvariants.cpp \ + $(filtersdir)/thmlgbf.cpp $(filtersdir)/thmlrtf.cpp \ + $(filtersdir)/thmlhtml.cpp $(filtersdir)/thmlhtmlhref.cpp \ + $(filtersdir)/thmlwebif.cpp $(filtersdir)/thmlwordjs.cpp +TEIFIL = $(filtersdir)/teiplain.cpp $(filtersdir)/teirtf.cpp \ + $(filtersdir)/teihtmlhref.cpp +CONVFIL = $(filtersdir)/gbfthml.cpp $(filtersdir)/gbfosis.cpp \ + $(filtersdir)/thmlosis.cpp $(filtersdir)/thmlplain.cpp \ + $(filtersdir)/osisosis.cpp +OSISFIL = $(filtersdir)/osisheadings.cpp \ + $(filtersdir)/osisfootnotes.cpp $(filtersdir)/osishtmlhref.cpp \ + $(filtersdir)/osiswebif.cpp $(filtersdir)/osismorph.cpp \ + $(filtersdir)/osisstrongs.cpp $(filtersdir)/osisplain.cpp \ + $(filtersdir)/osisrtf.cpp $(filtersdir)/osislemma.cpp \ + $(filtersdir)/osisredletterwords.cpp \ + $(filtersdir)/osisscripref.cpp $(filtersdir)/osisvariants.cpp \ + $(filtersdir)/osiswordjs.cpp \ + $(filtersdir)/osismorphsegmentation.cpp +PLFIL = $(filtersdir)/rtfhtml.cpp $(filtersdir)/plainfootnotes.cpp \ + $(filtersdir)/plainhtml.cpp $(filtersdir)/greeklexattribs.cpp \ + $(filtersdir)/unicodertf.cpp $(filtersdir)/papyriplain.cpp +SWICUSRC = $(filtersdir)/utf8transliterator.cpp \ + $(filtersdir)/utf8nfc.cpp $(filtersdir)/utf8nfkd.cpp \ + $(filtersdir)/utf8arshaping.cpp \ + $(filtersdir)/utf8bidireorder.cpp +@ICUSWORD_TRUE@@ICU_FALSE@ICUDEFS = -D_ICU_ -D_ICUSWORD_ +@ICU_TRUE@ICUDEFS = -D_ICU_ +@ICUSWORD_FALSE@@ICU_FALSE@DISTSWICUSRC = $(SWICUSRC) +@ICUSWORD_TRUE@@ICU_FALSE@DISTSWICUSRC = +@ICU_TRUE@DISTSWICUSRC = +@ICUSWORD_FALSE@@ICU_FALSE@SWREALICUSRC = +@ICUSWORD_TRUE@@ICU_FALSE@SWREALICUSRC = $(SWICUSRC) +@ICU_TRUE@SWREALICUSRC = $(SWICUSRC) +EXTRA_DIST = $(DISTSWICUSRC) +genbookdir = $(top_srcdir)/src/modules/genbook +rawgenbookdir = $(top_srcdir)/src/modules/genbook/rawgenbook +textsdir = $(top_srcdir)/src/modules/texts +rawtextdir = $(top_srcdir)/src/modules/texts/rawtext +rawtext4dir = $(top_srcdir)/src/modules/texts/rawtext4 +ztextdir = $(top_srcdir)/src/modules/texts/ztext +commentsdir = $(top_srcdir)/src/modules/comments +rawcomdir = $(top_srcdir)/src/modules/comments/rawcom +rawcom4dir = $(top_srcdir)/src/modules/comments/rawcom4 +rawfilesdir = $(top_srcdir)/src/modules/comments/rawfiles +zcomdir = $(top_srcdir)/src/modules/comments/zcom +hrefcomdir = $(top_srcdir)/src/modules/comments/hrefcom +lexdictdir = $(top_srcdir)/src/modules/lexdict +rawlddir = $(top_srcdir)/src/modules/lexdict/rawld +rawld4dir = $(top_srcdir)/src/modules/lexdict/rawld4 +zlddir = $(top_srcdir)/src/modules/lexdict/zld + +#include ../bindings/Makefile.am +bindingsdir = $(top_srcdir)/bindings +swincludedir = $(top_srcdir)/include +pkginclude_HEADERS = $(swincludedir)/Greek2Greek.h \ + $(swincludedir)/GreekChars.h $(swincludedir)/canon.h \ + $(swincludedir)/cipherfil.h $(swincludedir)/curlftpt.h \ + $(swincludedir)/defs.h $(swincludedir)/echomod.h \ + $(swincludedir)/encfiltmgr.h $(swincludedir)/entriesblk.h \ + $(swincludedir)/femain.h $(swincludedir)/filemgr.h \ + $(swincludedir)/flatapi.h $(swincludedir)/ftpparse.h \ + $(swincludedir)/ftptrans.h $(swincludedir)/ftplibftpt.h \ + $(swincludedir)/ftplib.h $(swincludedir)/gbffootnotes.h \ + $(swincludedir)/gbfheadings.h $(swincludedir)/gbfhtml.h \ + $(swincludedir)/gbfhtmlhref.h $(swincludedir)/gbfwebif.h \ + $(swincludedir)/gbfmorph.h $(swincludedir)/gbfosis.h \ + $(swincludedir)/gbfplain.h $(swincludedir)/gbfredletterwords.h \ + $(swincludedir)/gbfrtf.h $(swincludedir)/gbfstrongs.h \ + $(swincludedir)/gbfwordjs.h $(swincludedir)/gbfthml.h \ + $(swincludedir)/greeklexattribs.h $(swincludedir)/hebrewmcim.h \ + $(swincludedir)/hrefcom.h $(swincludedir)/installmgr.h \ + $(swincludedir)/latin1utf16.h $(swincludedir)/latin1utf8.h \ + $(swincludedir)/listkey.h $(swincludedir)/localemgr.h \ + $(swincludedir)/lzsscomprs.h $(swincludedir)/markupfiltmgr.h \ + $(swincludedir)/multimapwdef.h $(swincludedir)/nullim.h \ + $(swincludedir)/osisheadings.h $(swincludedir)/osishtmlhref.h \ + $(swincludedir)/osiswebif.h $(swincludedir)/osismorph.h \ + $(swincludedir)/osismorphsegmentation.h \ + $(swincludedir)/osisplain.h $(swincludedir)/osisrtf.h \ + $(swincludedir)/osisosis.h $(swincludedir)/osisstrongs.h \ + $(swincludedir)/osisfootnotes.h $(swincludedir)/osislemma.h \ + $(swincludedir)/osisredletterwords.h \ + $(swincludedir)/osisscripref.h $(swincludedir)/osiswordjs.h \ + $(swincludedir)/osisvariants.h $(swincludedir)/papyriplain.h \ + $(swincludedir)/plainfootnotes.h \ + $(swincludedir)/plainfootnotes.h $(swincludedir)/plainhtml.h \ + $(swincludedir)/rawcom.h $(swincludedir)/rawfiles.h \ + $(swincludedir)/rawgenbook.h $(swincludedir)/rawld.h \ + $(swincludedir)/rawld4.h $(swincludedir)/rawstr.h \ + $(swincludedir)/rawstr4.h $(swincludedir)/rawtext.h \ + $(swincludedir)/rawverse.h $(swincludedir)/regex.h \ + $(swincludedir)/roman.h $(swincludedir)/rtfhtml.h \ + $(swincludedir)/sapphire.h $(swincludedir)/scsuutf8.h \ + $(swincludedir)/strkey.h $(swincludedir)/swbasicfilter.h \ + $(swincludedir)/swbuf.h $(swincludedir)/swcacher.h \ + $(swincludedir)/swcipher.h $(swincludedir)/swcom.h \ + $(swincludedir)/swcomprs.h $(swincludedir)/swconfig.h \ + $(swincludedir)/swdisp.h $(swincludedir)/swfilter.h \ + $(swincludedir)/swfiltermgr.h $(swincludedir)/swgenbook.h \ + $(swincludedir)/swinputmeth.h $(swincludedir)/swkey.h \ + $(swincludedir)/swld.h $(swincludedir)/swlocale.h \ + $(swincludedir)/swlog.h $(swincludedir)/swmacs.h \ + $(swincludedir)/swmgr.h $(swincludedir)/stringmgr.h \ + $(swincludedir)/swmodule.h $(swincludedir)/swoptfilter.h \ + $(swincludedir)/swobject.h $(swincludedir)/swsearchable.h \ + $(swincludedir)/swtext.h $(swincludedir)/swunicod.h \ + $(swincludedir)/swversion.h $(swincludedir)/sysdata.h \ + $(swincludedir)/thmlfootnotes.h $(swincludedir)/thmlgbf.h \ + $(swincludedir)/thmlheadings.h $(swincludedir)/thmlhtml.h \ + $(swincludedir)/thmlhtmlhref.h $(swincludedir)/thmlwebif.h \ + $(swincludedir)/thmllemma.h $(swincludedir)/thmlmorph.h \ + $(swincludedir)/thmlosis.h $(swincludedir)/thmlplain.h \ + $(swincludedir)/thmlrtf.h $(swincludedir)/thmlscripref.h \ + $(swincludedir)/thmlstrongs.h $(swincludedir)/thmlvariants.h \ + $(swincludedir)/thmlwordjs.h $(swincludedir)/teiplain.h \ + $(swincludedir)/teirtf.h $(swincludedir)/treekey.h \ + $(swincludedir)/treekeyidx.h $(swincludedir)/unicodertf.h \ + $(swincludedir)/url.h $(swincludedir)/untgz.h \ + $(swincludedir)/utf16utf8.h $(swincludedir)/utf8arshaping.h \ + $(swincludedir)/utf8bidireorder.h \ + $(swincludedir)/utf8cantillation.h \ + $(swincludedir)/utf8greekaccents.h \ + $(swincludedir)/utf8hebrewpoints.h $(swincludedir)/utf8html.h \ + $(swincludedir)/utf8latin1.h $(swincludedir)/utf8nfc.h \ + $(swincludedir)/utf8nfkd.h \ + $(swincludedir)/utf8transliterator.h \ + $(swincludedir)/utf8utf16.h $(swincludedir)/utilstr.h \ + $(swincludedir)/utilxml.h $(swincludedir)/versekey.h \ + $(swincludedir)/versetreekey.h $(swincludedir)/zcom.h \ + $(swincludedir)/zconf.h $(swincludedir)/zipcomprs.h \ + $(swincludedir)/zld.h $(swincludedir)/zstr.h \ + $(swincludedir)/ztext.h $(swincludedir)/zverse.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../src/keys/Makefile.am $(srcdir)/../src/utilfuns/Makefile.am $(srcdir)/../src/mgr/Makefile.am $(srcdir)/../src/frontend/Makefile.am $(srcdir)/../src/modules/Makefile.am $(srcdir)/../src/modules/common/Makefile.am $(srcdir)/../src/modules/filters/Makefile.am $(srcdir)/../src/modules/genbook/Makefile.am $(srcdir)/../src/modules/genbook/rawgenbook/Makefile.am $(srcdir)/../src/modules/texts/Makefile.am $(srcdir)/../src/modules/texts/rawtext/Makefile.am $(srcdir)/../src/modules/texts/rawtext4/Makefile.am $(srcdir)/../src/modules/texts/ztext/Makefile.am $(srcdir)/../src/modules/comments/Makefile.am $(srcdir)/../src/modules/comments/rawcom/Makefile.am $(srcdir)/../src/modules/comments/rawcom4/Makefile.am $(srcdir)/../src/modules/comments/rawfiles/Makefile.am $(srcdir)/../src/modules/comments/zcom/Makefile.am $(srcdir)/../src/modules/comments/hrefcom/Makefile.am $(srcdir)/../src/modules/lexdict/Makefile.am $(srcdir)/../src/modules/lexdict/rawld/Makefile.am $(srcdir)/../src/modules/lexdict/rawld4/Makefile.am $(srcdir)/../src/modules/lexdict/zld/Makefile.am $(srcdir)/../include/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign lib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libsword.la: $(libsword_la_OBJECTS) $(libsword_la_DEPENDENCIES) + $(libsword_la_LINK) -rpath $(libdir) $(libsword_la_OBJECTS) $(libsword_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipherfil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curlftpt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encfiltmgr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entriesblk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemgr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flatapi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftplib.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftplibftpt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpparse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftptrans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbffootnotes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfheadings.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfhtml.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfhtmlhref.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfmorph.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfosis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfplain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfredletterwords.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfrtf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfstrongs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfthml.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfwebif.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfwordjs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/greeklexattribs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hrefcom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/installmgr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/latin1utf16.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/latin1utf8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listkey.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localemgr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzsscomprs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/markupfiltmgr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osisfootnotes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osisheadings.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osishtmlhref.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osislemma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osismorph.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osismorphsegmentation.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osisosis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osisplain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osisredletterwords.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osisrtf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osisscripref.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osisstrongs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osisvariants.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osiswebif.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osiswordjs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/papyriplain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plainfootnotes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plainhtml.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawcom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawcom4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawfiles.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawgenbook.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawld.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawld4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawstr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawstr4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawtext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawtext4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawverse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawverse4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/roman.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtfhtml.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sapphire.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scsuutf8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringmgr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strkey.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swbasicfilter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swcacher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swcipher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swcom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swcomprs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swconfig.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swdisp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swfiltermgr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swgenbook.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swkey.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swld.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swlocale.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swlog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swmgr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swmodule.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swobject.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swoptfilter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swsearchable.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swtext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swunicod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swversion.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teihtmlhref.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teiplain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teirtf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlfootnotes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlgbf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlheadings.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlhtml.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlhtmlhref.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmllemma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlmorph.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlosis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlplain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlrtf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlscripref.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlstrongs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlvariants.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlwebif.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlwordjs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/treekey.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/treekeyidx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodertf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/untgz.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf16utf8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8arshaping.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8bidireorder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8cantillation.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8greekaccents.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8hebrewpoints.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8html.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8latin1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8nfc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8nfkd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8transliterator.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8utf16.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilstr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilxml.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versekey.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versetreekey.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zcom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zipcomprs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zld.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zstr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ztext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zverse.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +ftpparse.lo: $(utilfunsdir)/ftpparse.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftpparse.lo -MD -MP -MF $(DEPDIR)/ftpparse.Tpo -c -o ftpparse.lo `test -f '$(utilfunsdir)/ftpparse.c' || echo '$(srcdir)/'`$(utilfunsdir)/ftpparse.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ftpparse.Tpo $(DEPDIR)/ftpparse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(utilfunsdir)/ftpparse.c' object='ftpparse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftpparse.lo `test -f '$(utilfunsdir)/ftpparse.c' || echo '$(srcdir)/'`$(utilfunsdir)/ftpparse.c + +untgz.lo: $(utilfunsdir)/zlib/untgz.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT untgz.lo -MD -MP -MF $(DEPDIR)/untgz.Tpo -c -o untgz.lo `test -f '$(utilfunsdir)/zlib/untgz.c' || echo '$(srcdir)/'`$(utilfunsdir)/zlib/untgz.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/untgz.Tpo $(DEPDIR)/untgz.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(utilfunsdir)/zlib/untgz.c' object='untgz.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o untgz.lo `test -f '$(utilfunsdir)/zlib/untgz.c' || echo '$(srcdir)/'`$(utilfunsdir)/zlib/untgz.c + +ftplib.lo: $(utilfunsdir)/ftplib.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftplib.lo -MD -MP -MF $(DEPDIR)/ftplib.Tpo -c -o ftplib.lo `test -f '$(utilfunsdir)/ftplib.c' || echo '$(srcdir)/'`$(utilfunsdir)/ftplib.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ftplib.Tpo $(DEPDIR)/ftplib.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(utilfunsdir)/ftplib.c' object='ftplib.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftplib.lo `test -f '$(utilfunsdir)/ftplib.c' || echo '$(srcdir)/'`$(utilfunsdir)/ftplib.c + +regex.lo: $(utilfunsdir)/regex.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regex.lo -MD -MP -MF $(DEPDIR)/regex.Tpo -c -o regex.lo `test -f '$(utilfunsdir)/regex.c' || echo '$(srcdir)/'`$(utilfunsdir)/regex.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/regex.Tpo $(DEPDIR)/regex.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(utilfunsdir)/regex.c' object='regex.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regex.lo `test -f '$(utilfunsdir)/regex.c' || echo '$(srcdir)/'`$(utilfunsdir)/regex.c + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +swkey.lo: $(keysdir)/swkey.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swkey.lo -MD -MP -MF $(DEPDIR)/swkey.Tpo -c -o swkey.lo `test -f '$(keysdir)/swkey.cpp' || echo '$(srcdir)/'`$(keysdir)/swkey.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swkey.Tpo $(DEPDIR)/swkey.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(keysdir)/swkey.cpp' object='swkey.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swkey.lo `test -f '$(keysdir)/swkey.cpp' || echo '$(srcdir)/'`$(keysdir)/swkey.cpp + +listkey.lo: $(keysdir)/listkey.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT listkey.lo -MD -MP -MF $(DEPDIR)/listkey.Tpo -c -o listkey.lo `test -f '$(keysdir)/listkey.cpp' || echo '$(srcdir)/'`$(keysdir)/listkey.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/listkey.Tpo $(DEPDIR)/listkey.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(keysdir)/listkey.cpp' object='listkey.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o listkey.lo `test -f '$(keysdir)/listkey.cpp' || echo '$(srcdir)/'`$(keysdir)/listkey.cpp + +strkey.lo: $(keysdir)/strkey.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT strkey.lo -MD -MP -MF $(DEPDIR)/strkey.Tpo -c -o strkey.lo `test -f '$(keysdir)/strkey.cpp' || echo '$(srcdir)/'`$(keysdir)/strkey.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/strkey.Tpo $(DEPDIR)/strkey.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(keysdir)/strkey.cpp' object='strkey.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o strkey.lo `test -f '$(keysdir)/strkey.cpp' || echo '$(srcdir)/'`$(keysdir)/strkey.cpp + +treekey.lo: $(keysdir)/treekey.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT treekey.lo -MD -MP -MF $(DEPDIR)/treekey.Tpo -c -o treekey.lo `test -f '$(keysdir)/treekey.cpp' || echo '$(srcdir)/'`$(keysdir)/treekey.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/treekey.Tpo $(DEPDIR)/treekey.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(keysdir)/treekey.cpp' object='treekey.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o treekey.lo `test -f '$(keysdir)/treekey.cpp' || echo '$(srcdir)/'`$(keysdir)/treekey.cpp + +treekeyidx.lo: $(keysdir)/treekeyidx.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT treekeyidx.lo -MD -MP -MF $(DEPDIR)/treekeyidx.Tpo -c -o treekeyidx.lo `test -f '$(keysdir)/treekeyidx.cpp' || echo '$(srcdir)/'`$(keysdir)/treekeyidx.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/treekeyidx.Tpo $(DEPDIR)/treekeyidx.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(keysdir)/treekeyidx.cpp' object='treekeyidx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o treekeyidx.lo `test -f '$(keysdir)/treekeyidx.cpp' || echo '$(srcdir)/'`$(keysdir)/treekeyidx.cpp + +versekey.lo: $(keysdir)/versekey.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT versekey.lo -MD -MP -MF $(DEPDIR)/versekey.Tpo -c -o versekey.lo `test -f '$(keysdir)/versekey.cpp' || echo '$(srcdir)/'`$(keysdir)/versekey.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/versekey.Tpo $(DEPDIR)/versekey.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(keysdir)/versekey.cpp' object='versekey.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o versekey.lo `test -f '$(keysdir)/versekey.cpp' || echo '$(srcdir)/'`$(keysdir)/versekey.cpp + +versetreekey.lo: $(keysdir)/versetreekey.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT versetreekey.lo -MD -MP -MF $(DEPDIR)/versetreekey.Tpo -c -o versetreekey.lo `test -f '$(keysdir)/versetreekey.cpp' || echo '$(srcdir)/'`$(keysdir)/versetreekey.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/versetreekey.Tpo $(DEPDIR)/versetreekey.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(keysdir)/versetreekey.cpp' object='versetreekey.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o versetreekey.lo `test -f '$(keysdir)/versetreekey.cpp' || echo '$(srcdir)/'`$(keysdir)/versetreekey.cpp + +swobject.lo: $(utilfunsdir)/swobject.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swobject.lo -MD -MP -MF $(DEPDIR)/swobject.Tpo -c -o swobject.lo `test -f '$(utilfunsdir)/swobject.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/swobject.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swobject.Tpo $(DEPDIR)/swobject.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(utilfunsdir)/swobject.cpp' object='swobject.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swobject.lo `test -f '$(utilfunsdir)/swobject.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/swobject.cpp + +utilstr.lo: $(utilfunsdir)/utilstr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utilstr.lo -MD -MP -MF $(DEPDIR)/utilstr.Tpo -c -o utilstr.lo `test -f '$(utilfunsdir)/utilstr.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/utilstr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utilstr.Tpo $(DEPDIR)/utilstr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(utilfunsdir)/utilstr.cpp' object='utilstr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utilstr.lo `test -f '$(utilfunsdir)/utilstr.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/utilstr.cpp + +utilxml.lo: $(utilfunsdir)/utilxml.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utilxml.lo -MD -MP -MF $(DEPDIR)/utilxml.Tpo -c -o utilxml.lo `test -f '$(utilfunsdir)/utilxml.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/utilxml.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utilxml.Tpo $(DEPDIR)/utilxml.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(utilfunsdir)/utilxml.cpp' object='utilxml.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utilxml.lo `test -f '$(utilfunsdir)/utilxml.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/utilxml.cpp + +swunicod.lo: $(utilfunsdir)/swunicod.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swunicod.lo -MD -MP -MF $(DEPDIR)/swunicod.Tpo -c -o swunicod.lo `test -f '$(utilfunsdir)/swunicod.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/swunicod.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swunicod.Tpo $(DEPDIR)/swunicod.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(utilfunsdir)/swunicod.cpp' object='swunicod.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swunicod.lo `test -f '$(utilfunsdir)/swunicod.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/swunicod.cpp + +swversion.lo: $(utilfunsdir)/swversion.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swversion.lo -MD -MP -MF $(DEPDIR)/swversion.Tpo -c -o swversion.lo `test -f '$(utilfunsdir)/swversion.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/swversion.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swversion.Tpo $(DEPDIR)/swversion.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(utilfunsdir)/swversion.cpp' object='swversion.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swversion.lo `test -f '$(utilfunsdir)/swversion.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/swversion.cpp + +swbuf.lo: $(utilfunsdir)/swbuf.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swbuf.lo -MD -MP -MF $(DEPDIR)/swbuf.Tpo -c -o swbuf.lo `test -f '$(utilfunsdir)/swbuf.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/swbuf.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swbuf.Tpo $(DEPDIR)/swbuf.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(utilfunsdir)/swbuf.cpp' object='swbuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swbuf.lo `test -f '$(utilfunsdir)/swbuf.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/swbuf.cpp + +url.lo: $(utilfunsdir)/url.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT url.lo -MD -MP -MF $(DEPDIR)/url.Tpo -c -o url.lo `test -f '$(utilfunsdir)/url.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/url.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/url.Tpo $(DEPDIR)/url.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(utilfunsdir)/url.cpp' object='url.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o url.lo `test -f '$(utilfunsdir)/url.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/url.cpp + +roman.lo: $(utilfunsdir)/roman.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT roman.lo -MD -MP -MF $(DEPDIR)/roman.Tpo -c -o roman.lo `test -f '$(utilfunsdir)/roman.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/roman.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/roman.Tpo $(DEPDIR)/roman.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(utilfunsdir)/roman.cpp' object='roman.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o roman.lo `test -f '$(utilfunsdir)/roman.cpp' || echo '$(srcdir)/'`$(utilfunsdir)/roman.cpp + +ftplibftpt.lo: $(mgrdir)/ftplibftpt.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ftplibftpt.lo -MD -MP -MF $(DEPDIR)/ftplibftpt.Tpo -c -o ftplibftpt.lo `test -f '$(mgrdir)/ftplibftpt.cpp' || echo '$(srcdir)/'`$(mgrdir)/ftplibftpt.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/ftplibftpt.Tpo $(DEPDIR)/ftplibftpt.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/ftplibftpt.cpp' object='ftplibftpt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ftplibftpt.lo `test -f '$(mgrdir)/ftplibftpt.cpp' || echo '$(srcdir)/'`$(mgrdir)/ftplibftpt.cpp + +curlftpt.lo: $(mgrdir)/curlftpt.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT curlftpt.lo -MD -MP -MF $(DEPDIR)/curlftpt.Tpo -c -o curlftpt.lo `test -f '$(mgrdir)/curlftpt.cpp' || echo '$(srcdir)/'`$(mgrdir)/curlftpt.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/curlftpt.Tpo $(DEPDIR)/curlftpt.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/curlftpt.cpp' object='curlftpt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o curlftpt.lo `test -f '$(mgrdir)/curlftpt.cpp' || echo '$(srcdir)/'`$(mgrdir)/curlftpt.cpp + +swconfig.lo: $(mgrdir)/swconfig.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swconfig.lo -MD -MP -MF $(DEPDIR)/swconfig.Tpo -c -o swconfig.lo `test -f '$(mgrdir)/swconfig.cpp' || echo '$(srcdir)/'`$(mgrdir)/swconfig.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swconfig.Tpo $(DEPDIR)/swconfig.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/swconfig.cpp' object='swconfig.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swconfig.lo `test -f '$(mgrdir)/swconfig.cpp' || echo '$(srcdir)/'`$(mgrdir)/swconfig.cpp + +swmgr.lo: $(mgrdir)/swmgr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swmgr.lo -MD -MP -MF $(DEPDIR)/swmgr.Tpo -c -o swmgr.lo `test -f '$(mgrdir)/swmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/swmgr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swmgr.Tpo $(DEPDIR)/swmgr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/swmgr.cpp' object='swmgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swmgr.lo `test -f '$(mgrdir)/swmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/swmgr.cpp + +swfiltermgr.lo: $(mgrdir)/swfiltermgr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swfiltermgr.lo -MD -MP -MF $(DEPDIR)/swfiltermgr.Tpo -c -o swfiltermgr.lo `test -f '$(mgrdir)/swfiltermgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/swfiltermgr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swfiltermgr.Tpo $(DEPDIR)/swfiltermgr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/swfiltermgr.cpp' object='swfiltermgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swfiltermgr.lo `test -f '$(mgrdir)/swfiltermgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/swfiltermgr.cpp + +encfiltmgr.lo: $(mgrdir)/encfiltmgr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT encfiltmgr.lo -MD -MP -MF $(DEPDIR)/encfiltmgr.Tpo -c -o encfiltmgr.lo `test -f '$(mgrdir)/encfiltmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/encfiltmgr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/encfiltmgr.Tpo $(DEPDIR)/encfiltmgr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/encfiltmgr.cpp' object='encfiltmgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o encfiltmgr.lo `test -f '$(mgrdir)/encfiltmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/encfiltmgr.cpp + +markupfiltmgr.lo: $(mgrdir)/markupfiltmgr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT markupfiltmgr.lo -MD -MP -MF $(DEPDIR)/markupfiltmgr.Tpo -c -o markupfiltmgr.lo `test -f '$(mgrdir)/markupfiltmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/markupfiltmgr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/markupfiltmgr.Tpo $(DEPDIR)/markupfiltmgr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/markupfiltmgr.cpp' object='markupfiltmgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o markupfiltmgr.lo `test -f '$(mgrdir)/markupfiltmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/markupfiltmgr.cpp + +filemgr.lo: $(mgrdir)/filemgr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT filemgr.lo -MD -MP -MF $(DEPDIR)/filemgr.Tpo -c -o filemgr.lo `test -f '$(mgrdir)/filemgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/filemgr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/filemgr.Tpo $(DEPDIR)/filemgr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/filemgr.cpp' object='filemgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o filemgr.lo `test -f '$(mgrdir)/filemgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/filemgr.cpp + +ftptrans.lo: $(mgrdir)/ftptrans.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ftptrans.lo -MD -MP -MF $(DEPDIR)/ftptrans.Tpo -c -o ftptrans.lo `test -f '$(mgrdir)/ftptrans.cpp' || echo '$(srcdir)/'`$(mgrdir)/ftptrans.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/ftptrans.Tpo $(DEPDIR)/ftptrans.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/ftptrans.cpp' object='ftptrans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ftptrans.lo `test -f '$(mgrdir)/ftptrans.cpp' || echo '$(srcdir)/'`$(mgrdir)/ftptrans.cpp + +swlocale.lo: $(mgrdir)/swlocale.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swlocale.lo -MD -MP -MF $(DEPDIR)/swlocale.Tpo -c -o swlocale.lo `test -f '$(mgrdir)/swlocale.cpp' || echo '$(srcdir)/'`$(mgrdir)/swlocale.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swlocale.Tpo $(DEPDIR)/swlocale.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/swlocale.cpp' object='swlocale.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swlocale.lo `test -f '$(mgrdir)/swlocale.cpp' || echo '$(srcdir)/'`$(mgrdir)/swlocale.cpp + +localemgr.lo: $(mgrdir)/localemgr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT localemgr.lo -MD -MP -MF $(DEPDIR)/localemgr.Tpo -c -o localemgr.lo `test -f '$(mgrdir)/localemgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/localemgr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/localemgr.Tpo $(DEPDIR)/localemgr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/localemgr.cpp' object='localemgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o localemgr.lo `test -f '$(mgrdir)/localemgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/localemgr.cpp + +swcacher.lo: $(mgrdir)/swcacher.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swcacher.lo -MD -MP -MF $(DEPDIR)/swcacher.Tpo -c -o swcacher.lo `test -f '$(mgrdir)/swcacher.cpp' || echo '$(srcdir)/'`$(mgrdir)/swcacher.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swcacher.Tpo $(DEPDIR)/swcacher.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/swcacher.cpp' object='swcacher.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swcacher.lo `test -f '$(mgrdir)/swcacher.cpp' || echo '$(srcdir)/'`$(mgrdir)/swcacher.cpp + +swsearchable.lo: $(mgrdir)/swsearchable.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swsearchable.lo -MD -MP -MF $(DEPDIR)/swsearchable.Tpo -c -o swsearchable.lo `test -f '$(mgrdir)/swsearchable.cpp' || echo '$(srcdir)/'`$(mgrdir)/swsearchable.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swsearchable.Tpo $(DEPDIR)/swsearchable.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/swsearchable.cpp' object='swsearchable.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swsearchable.lo `test -f '$(mgrdir)/swsearchable.cpp' || echo '$(srcdir)/'`$(mgrdir)/swsearchable.cpp + +installmgr.lo: $(mgrdir)/installmgr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT installmgr.lo -MD -MP -MF $(DEPDIR)/installmgr.Tpo -c -o installmgr.lo `test -f '$(mgrdir)/installmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/installmgr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/installmgr.Tpo $(DEPDIR)/installmgr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/installmgr.cpp' object='installmgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o installmgr.lo `test -f '$(mgrdir)/installmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/installmgr.cpp + +stringmgr.lo: $(mgrdir)/stringmgr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT stringmgr.lo -MD -MP -MF $(DEPDIR)/stringmgr.Tpo -c -o stringmgr.lo `test -f '$(mgrdir)/stringmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/stringmgr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stringmgr.Tpo $(DEPDIR)/stringmgr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(mgrdir)/stringmgr.cpp' object='stringmgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o stringmgr.lo `test -f '$(mgrdir)/stringmgr.cpp' || echo '$(srcdir)/'`$(mgrdir)/stringmgr.cpp + +swdisp.lo: $(frontenddir)/swdisp.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swdisp.lo -MD -MP -MF $(DEPDIR)/swdisp.Tpo -c -o swdisp.lo `test -f '$(frontenddir)/swdisp.cpp' || echo '$(srcdir)/'`$(frontenddir)/swdisp.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swdisp.Tpo $(DEPDIR)/swdisp.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(frontenddir)/swdisp.cpp' object='swdisp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swdisp.lo `test -f '$(frontenddir)/swdisp.cpp' || echo '$(srcdir)/'`$(frontenddir)/swdisp.cpp + +swlog.lo: $(frontenddir)/swlog.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swlog.lo -MD -MP -MF $(DEPDIR)/swlog.Tpo -c -o swlog.lo `test -f '$(frontenddir)/swlog.cpp' || echo '$(srcdir)/'`$(frontenddir)/swlog.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swlog.Tpo $(DEPDIR)/swlog.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(frontenddir)/swlog.cpp' object='swlog.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swlog.lo `test -f '$(frontenddir)/swlog.cpp' || echo '$(srcdir)/'`$(frontenddir)/swlog.cpp + +swmodule.lo: $(modulesdir)/swmodule.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swmodule.lo -MD -MP -MF $(DEPDIR)/swmodule.Tpo -c -o swmodule.lo `test -f '$(modulesdir)/swmodule.cpp' || echo '$(srcdir)/'`$(modulesdir)/swmodule.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swmodule.Tpo $(DEPDIR)/swmodule.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(modulesdir)/swmodule.cpp' object='swmodule.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swmodule.lo `test -f '$(modulesdir)/swmodule.cpp' || echo '$(srcdir)/'`$(modulesdir)/swmodule.cpp + +rawstr.lo: $(commondir)/rawstr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawstr.lo -MD -MP -MF $(DEPDIR)/rawstr.Tpo -c -o rawstr.lo `test -f '$(commondir)/rawstr.cpp' || echo '$(srcdir)/'`$(commondir)/rawstr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawstr.Tpo $(DEPDIR)/rawstr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/rawstr.cpp' object='rawstr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawstr.lo `test -f '$(commondir)/rawstr.cpp' || echo '$(srcdir)/'`$(commondir)/rawstr.cpp + +rawstr4.lo: $(commondir)/rawstr4.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawstr4.lo -MD -MP -MF $(DEPDIR)/rawstr4.Tpo -c -o rawstr4.lo `test -f '$(commondir)/rawstr4.cpp' || echo '$(srcdir)/'`$(commondir)/rawstr4.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawstr4.Tpo $(DEPDIR)/rawstr4.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/rawstr4.cpp' object='rawstr4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawstr4.lo `test -f '$(commondir)/rawstr4.cpp' || echo '$(srcdir)/'`$(commondir)/rawstr4.cpp + +swcomprs.lo: $(commondir)/swcomprs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swcomprs.lo -MD -MP -MF $(DEPDIR)/swcomprs.Tpo -c -o swcomprs.lo `test -f '$(commondir)/swcomprs.cpp' || echo '$(srcdir)/'`$(commondir)/swcomprs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swcomprs.Tpo $(DEPDIR)/swcomprs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/swcomprs.cpp' object='swcomprs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swcomprs.lo `test -f '$(commondir)/swcomprs.cpp' || echo '$(srcdir)/'`$(commondir)/swcomprs.cpp + +lzsscomprs.lo: $(commondir)/lzsscomprs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lzsscomprs.lo -MD -MP -MF $(DEPDIR)/lzsscomprs.Tpo -c -o lzsscomprs.lo `test -f '$(commondir)/lzsscomprs.cpp' || echo '$(srcdir)/'`$(commondir)/lzsscomprs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/lzsscomprs.Tpo $(DEPDIR)/lzsscomprs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/lzsscomprs.cpp' object='lzsscomprs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lzsscomprs.lo `test -f '$(commondir)/lzsscomprs.cpp' || echo '$(srcdir)/'`$(commondir)/lzsscomprs.cpp + +zipcomprs.lo: $(commondir)/zipcomprs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zipcomprs.lo -MD -MP -MF $(DEPDIR)/zipcomprs.Tpo -c -o zipcomprs.lo `test -f '$(commondir)/zipcomprs.cpp' || echo '$(srcdir)/'`$(commondir)/zipcomprs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zipcomprs.Tpo $(DEPDIR)/zipcomprs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/zipcomprs.cpp' object='zipcomprs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zipcomprs.lo `test -f '$(commondir)/zipcomprs.cpp' || echo '$(srcdir)/'`$(commondir)/zipcomprs.cpp + +rawverse.lo: $(commondir)/rawverse.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawverse.lo -MD -MP -MF $(DEPDIR)/rawverse.Tpo -c -o rawverse.lo `test -f '$(commondir)/rawverse.cpp' || echo '$(srcdir)/'`$(commondir)/rawverse.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawverse.Tpo $(DEPDIR)/rawverse.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/rawverse.cpp' object='rawverse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawverse.lo `test -f '$(commondir)/rawverse.cpp' || echo '$(srcdir)/'`$(commondir)/rawverse.cpp + +rawverse4.lo: $(commondir)/rawverse4.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawverse4.lo -MD -MP -MF $(DEPDIR)/rawverse4.Tpo -c -o rawverse4.lo `test -f '$(commondir)/rawverse4.cpp' || echo '$(srcdir)/'`$(commondir)/rawverse4.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawverse4.Tpo $(DEPDIR)/rawverse4.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/rawverse4.cpp' object='rawverse4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawverse4.lo `test -f '$(commondir)/rawverse4.cpp' || echo '$(srcdir)/'`$(commondir)/rawverse4.cpp + +swcipher.lo: $(commondir)/swcipher.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swcipher.lo -MD -MP -MF $(DEPDIR)/swcipher.Tpo -c -o swcipher.lo `test -f '$(commondir)/swcipher.cpp' || echo '$(srcdir)/'`$(commondir)/swcipher.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swcipher.Tpo $(DEPDIR)/swcipher.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/swcipher.cpp' object='swcipher.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swcipher.lo `test -f '$(commondir)/swcipher.cpp' || echo '$(srcdir)/'`$(commondir)/swcipher.cpp + +zverse.lo: $(commondir)/zverse.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zverse.lo -MD -MP -MF $(DEPDIR)/zverse.Tpo -c -o zverse.lo `test -f '$(commondir)/zverse.cpp' || echo '$(srcdir)/'`$(commondir)/zverse.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zverse.Tpo $(DEPDIR)/zverse.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/zverse.cpp' object='zverse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zverse.lo `test -f '$(commondir)/zverse.cpp' || echo '$(srcdir)/'`$(commondir)/zverse.cpp + +zstr.lo: $(commondir)/zstr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zstr.lo -MD -MP -MF $(DEPDIR)/zstr.Tpo -c -o zstr.lo `test -f '$(commondir)/zstr.cpp' || echo '$(srcdir)/'`$(commondir)/zstr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zstr.Tpo $(DEPDIR)/zstr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/zstr.cpp' object='zstr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zstr.lo `test -f '$(commondir)/zstr.cpp' || echo '$(srcdir)/'`$(commondir)/zstr.cpp + +entriesblk.lo: $(commondir)/entriesblk.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT entriesblk.lo -MD -MP -MF $(DEPDIR)/entriesblk.Tpo -c -o entriesblk.lo `test -f '$(commondir)/entriesblk.cpp' || echo '$(srcdir)/'`$(commondir)/entriesblk.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/entriesblk.Tpo $(DEPDIR)/entriesblk.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/entriesblk.cpp' object='entriesblk.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o entriesblk.lo `test -f '$(commondir)/entriesblk.cpp' || echo '$(srcdir)/'`$(commondir)/entriesblk.cpp + +sapphire.lo: $(commondir)/sapphire.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sapphire.lo -MD -MP -MF $(DEPDIR)/sapphire.Tpo -c -o sapphire.lo `test -f '$(commondir)/sapphire.cpp' || echo '$(srcdir)/'`$(commondir)/sapphire.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/sapphire.Tpo $(DEPDIR)/sapphire.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commondir)/sapphire.cpp' object='sapphire.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sapphire.lo `test -f '$(commondir)/sapphire.cpp' || echo '$(srcdir)/'`$(commondir)/sapphire.cpp + +swbasicfilter.lo: $(filtersdir)/swbasicfilter.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swbasicfilter.lo -MD -MP -MF $(DEPDIR)/swbasicfilter.Tpo -c -o swbasicfilter.lo `test -f '$(filtersdir)/swbasicfilter.cpp' || echo '$(srcdir)/'`$(filtersdir)/swbasicfilter.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swbasicfilter.Tpo $(DEPDIR)/swbasicfilter.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/swbasicfilter.cpp' object='swbasicfilter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swbasicfilter.lo `test -f '$(filtersdir)/swbasicfilter.cpp' || echo '$(srcdir)/'`$(filtersdir)/swbasicfilter.cpp + +swoptfilter.lo: $(filtersdir)/swoptfilter.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swoptfilter.lo -MD -MP -MF $(DEPDIR)/swoptfilter.Tpo -c -o swoptfilter.lo `test -f '$(filtersdir)/swoptfilter.cpp' || echo '$(srcdir)/'`$(filtersdir)/swoptfilter.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swoptfilter.Tpo $(DEPDIR)/swoptfilter.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/swoptfilter.cpp' object='swoptfilter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swoptfilter.lo `test -f '$(filtersdir)/swoptfilter.cpp' || echo '$(srcdir)/'`$(filtersdir)/swoptfilter.cpp + +latin1utf8.lo: $(filtersdir)/latin1utf8.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT latin1utf8.lo -MD -MP -MF $(DEPDIR)/latin1utf8.Tpo -c -o latin1utf8.lo `test -f '$(filtersdir)/latin1utf8.cpp' || echo '$(srcdir)/'`$(filtersdir)/latin1utf8.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/latin1utf8.Tpo $(DEPDIR)/latin1utf8.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/latin1utf8.cpp' object='latin1utf8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o latin1utf8.lo `test -f '$(filtersdir)/latin1utf8.cpp' || echo '$(srcdir)/'`$(filtersdir)/latin1utf8.cpp + +latin1utf16.lo: $(filtersdir)/latin1utf16.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT latin1utf16.lo -MD -MP -MF $(DEPDIR)/latin1utf16.Tpo -c -o latin1utf16.lo `test -f '$(filtersdir)/latin1utf16.cpp' || echo '$(srcdir)/'`$(filtersdir)/latin1utf16.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/latin1utf16.Tpo $(DEPDIR)/latin1utf16.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/latin1utf16.cpp' object='latin1utf16.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o latin1utf16.lo `test -f '$(filtersdir)/latin1utf16.cpp' || echo '$(srcdir)/'`$(filtersdir)/latin1utf16.cpp + +utf8utf16.lo: $(filtersdir)/utf8utf16.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8utf16.lo -MD -MP -MF $(DEPDIR)/utf8utf16.Tpo -c -o utf8utf16.lo `test -f '$(filtersdir)/utf8utf16.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8utf16.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8utf16.Tpo $(DEPDIR)/utf8utf16.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8utf16.cpp' object='utf8utf16.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8utf16.lo `test -f '$(filtersdir)/utf8utf16.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8utf16.cpp + +utf16utf8.lo: $(filtersdir)/utf16utf8.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf16utf8.lo -MD -MP -MF $(DEPDIR)/utf16utf8.Tpo -c -o utf16utf8.lo `test -f '$(filtersdir)/utf16utf8.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf16utf8.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf16utf8.Tpo $(DEPDIR)/utf16utf8.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf16utf8.cpp' object='utf16utf8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf16utf8.lo `test -f '$(filtersdir)/utf16utf8.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf16utf8.cpp + +scsuutf8.lo: $(filtersdir)/scsuutf8.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT scsuutf8.lo -MD -MP -MF $(DEPDIR)/scsuutf8.Tpo -c -o scsuutf8.lo `test -f '$(filtersdir)/scsuutf8.cpp' || echo '$(srcdir)/'`$(filtersdir)/scsuutf8.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/scsuutf8.Tpo $(DEPDIR)/scsuutf8.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/scsuutf8.cpp' object='scsuutf8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o scsuutf8.lo `test -f '$(filtersdir)/scsuutf8.cpp' || echo '$(srcdir)/'`$(filtersdir)/scsuutf8.cpp + +utf8html.lo: $(filtersdir)/utf8html.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8html.lo -MD -MP -MF $(DEPDIR)/utf8html.Tpo -c -o utf8html.lo `test -f '$(filtersdir)/utf8html.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8html.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8html.Tpo $(DEPDIR)/utf8html.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8html.cpp' object='utf8html.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8html.lo `test -f '$(filtersdir)/utf8html.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8html.cpp + +utf8latin1.lo: $(filtersdir)/utf8latin1.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8latin1.lo -MD -MP -MF $(DEPDIR)/utf8latin1.Tpo -c -o utf8latin1.lo `test -f '$(filtersdir)/utf8latin1.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8latin1.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8latin1.Tpo $(DEPDIR)/utf8latin1.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8latin1.cpp' object='utf8latin1.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8latin1.lo `test -f '$(filtersdir)/utf8latin1.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8latin1.cpp + +utf8cantillation.lo: $(filtersdir)/utf8cantillation.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8cantillation.lo -MD -MP -MF $(DEPDIR)/utf8cantillation.Tpo -c -o utf8cantillation.lo `test -f '$(filtersdir)/utf8cantillation.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8cantillation.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8cantillation.Tpo $(DEPDIR)/utf8cantillation.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8cantillation.cpp' object='utf8cantillation.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8cantillation.lo `test -f '$(filtersdir)/utf8cantillation.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8cantillation.cpp + +utf8hebrewpoints.lo: $(filtersdir)/utf8hebrewpoints.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8hebrewpoints.lo -MD -MP -MF $(DEPDIR)/utf8hebrewpoints.Tpo -c -o utf8hebrewpoints.lo `test -f '$(filtersdir)/utf8hebrewpoints.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8hebrewpoints.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8hebrewpoints.Tpo $(DEPDIR)/utf8hebrewpoints.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8hebrewpoints.cpp' object='utf8hebrewpoints.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8hebrewpoints.lo `test -f '$(filtersdir)/utf8hebrewpoints.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8hebrewpoints.cpp + +utf8greekaccents.lo: $(filtersdir)/utf8greekaccents.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8greekaccents.lo -MD -MP -MF $(DEPDIR)/utf8greekaccents.Tpo -c -o utf8greekaccents.lo `test -f '$(filtersdir)/utf8greekaccents.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8greekaccents.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8greekaccents.Tpo $(DEPDIR)/utf8greekaccents.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8greekaccents.cpp' object='utf8greekaccents.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8greekaccents.lo `test -f '$(filtersdir)/utf8greekaccents.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8greekaccents.cpp + +cipherfil.lo: $(filtersdir)/cipherfil.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cipherfil.lo -MD -MP -MF $(DEPDIR)/cipherfil.Tpo -c -o cipherfil.lo `test -f '$(filtersdir)/cipherfil.cpp' || echo '$(srcdir)/'`$(filtersdir)/cipherfil.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/cipherfil.Tpo $(DEPDIR)/cipherfil.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/cipherfil.cpp' object='cipherfil.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cipherfil.lo `test -f '$(filtersdir)/cipherfil.cpp' || echo '$(srcdir)/'`$(filtersdir)/cipherfil.cpp + +utf8transliterator.lo: $(filtersdir)/utf8transliterator.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8transliterator.lo -MD -MP -MF $(DEPDIR)/utf8transliterator.Tpo -c -o utf8transliterator.lo `test -f '$(filtersdir)/utf8transliterator.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8transliterator.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8transliterator.Tpo $(DEPDIR)/utf8transliterator.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8transliterator.cpp' object='utf8transliterator.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8transliterator.lo `test -f '$(filtersdir)/utf8transliterator.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8transliterator.cpp + +utf8nfc.lo: $(filtersdir)/utf8nfc.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8nfc.lo -MD -MP -MF $(DEPDIR)/utf8nfc.Tpo -c -o utf8nfc.lo `test -f '$(filtersdir)/utf8nfc.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8nfc.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8nfc.Tpo $(DEPDIR)/utf8nfc.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8nfc.cpp' object='utf8nfc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8nfc.lo `test -f '$(filtersdir)/utf8nfc.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8nfc.cpp + +utf8nfkd.lo: $(filtersdir)/utf8nfkd.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8nfkd.lo -MD -MP -MF $(DEPDIR)/utf8nfkd.Tpo -c -o utf8nfkd.lo `test -f '$(filtersdir)/utf8nfkd.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8nfkd.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8nfkd.Tpo $(DEPDIR)/utf8nfkd.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8nfkd.cpp' object='utf8nfkd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8nfkd.lo `test -f '$(filtersdir)/utf8nfkd.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8nfkd.cpp + +utf8arshaping.lo: $(filtersdir)/utf8arshaping.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8arshaping.lo -MD -MP -MF $(DEPDIR)/utf8arshaping.Tpo -c -o utf8arshaping.lo `test -f '$(filtersdir)/utf8arshaping.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8arshaping.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8arshaping.Tpo $(DEPDIR)/utf8arshaping.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8arshaping.cpp' object='utf8arshaping.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8arshaping.lo `test -f '$(filtersdir)/utf8arshaping.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8arshaping.cpp + +utf8bidireorder.lo: $(filtersdir)/utf8bidireorder.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utf8bidireorder.lo -MD -MP -MF $(DEPDIR)/utf8bidireorder.Tpo -c -o utf8bidireorder.lo `test -f '$(filtersdir)/utf8bidireorder.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8bidireorder.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utf8bidireorder.Tpo $(DEPDIR)/utf8bidireorder.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/utf8bidireorder.cpp' object='utf8bidireorder.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utf8bidireorder.lo `test -f '$(filtersdir)/utf8bidireorder.cpp' || echo '$(srcdir)/'`$(filtersdir)/utf8bidireorder.cpp + +osisheadings.lo: $(filtersdir)/osisheadings.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osisheadings.lo -MD -MP -MF $(DEPDIR)/osisheadings.Tpo -c -o osisheadings.lo `test -f '$(filtersdir)/osisheadings.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisheadings.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osisheadings.Tpo $(DEPDIR)/osisheadings.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osisheadings.cpp' object='osisheadings.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osisheadings.lo `test -f '$(filtersdir)/osisheadings.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisheadings.cpp + +osisfootnotes.lo: $(filtersdir)/osisfootnotes.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osisfootnotes.lo -MD -MP -MF $(DEPDIR)/osisfootnotes.Tpo -c -o osisfootnotes.lo `test -f '$(filtersdir)/osisfootnotes.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisfootnotes.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osisfootnotes.Tpo $(DEPDIR)/osisfootnotes.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osisfootnotes.cpp' object='osisfootnotes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osisfootnotes.lo `test -f '$(filtersdir)/osisfootnotes.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisfootnotes.cpp + +osishtmlhref.lo: $(filtersdir)/osishtmlhref.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osishtmlhref.lo -MD -MP -MF $(DEPDIR)/osishtmlhref.Tpo -c -o osishtmlhref.lo `test -f '$(filtersdir)/osishtmlhref.cpp' || echo '$(srcdir)/'`$(filtersdir)/osishtmlhref.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osishtmlhref.Tpo $(DEPDIR)/osishtmlhref.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osishtmlhref.cpp' object='osishtmlhref.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osishtmlhref.lo `test -f '$(filtersdir)/osishtmlhref.cpp' || echo '$(srcdir)/'`$(filtersdir)/osishtmlhref.cpp + +osiswebif.lo: $(filtersdir)/osiswebif.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osiswebif.lo -MD -MP -MF $(DEPDIR)/osiswebif.Tpo -c -o osiswebif.lo `test -f '$(filtersdir)/osiswebif.cpp' || echo '$(srcdir)/'`$(filtersdir)/osiswebif.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osiswebif.Tpo $(DEPDIR)/osiswebif.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osiswebif.cpp' object='osiswebif.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osiswebif.lo `test -f '$(filtersdir)/osiswebif.cpp' || echo '$(srcdir)/'`$(filtersdir)/osiswebif.cpp + +osismorph.lo: $(filtersdir)/osismorph.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osismorph.lo -MD -MP -MF $(DEPDIR)/osismorph.Tpo -c -o osismorph.lo `test -f '$(filtersdir)/osismorph.cpp' || echo '$(srcdir)/'`$(filtersdir)/osismorph.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osismorph.Tpo $(DEPDIR)/osismorph.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osismorph.cpp' object='osismorph.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osismorph.lo `test -f '$(filtersdir)/osismorph.cpp' || echo '$(srcdir)/'`$(filtersdir)/osismorph.cpp + +osisstrongs.lo: $(filtersdir)/osisstrongs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osisstrongs.lo -MD -MP -MF $(DEPDIR)/osisstrongs.Tpo -c -o osisstrongs.lo `test -f '$(filtersdir)/osisstrongs.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisstrongs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osisstrongs.Tpo $(DEPDIR)/osisstrongs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osisstrongs.cpp' object='osisstrongs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osisstrongs.lo `test -f '$(filtersdir)/osisstrongs.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisstrongs.cpp + +osisplain.lo: $(filtersdir)/osisplain.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osisplain.lo -MD -MP -MF $(DEPDIR)/osisplain.Tpo -c -o osisplain.lo `test -f '$(filtersdir)/osisplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisplain.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osisplain.Tpo $(DEPDIR)/osisplain.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osisplain.cpp' object='osisplain.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osisplain.lo `test -f '$(filtersdir)/osisplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisplain.cpp + +osisrtf.lo: $(filtersdir)/osisrtf.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osisrtf.lo -MD -MP -MF $(DEPDIR)/osisrtf.Tpo -c -o osisrtf.lo `test -f '$(filtersdir)/osisrtf.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisrtf.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osisrtf.Tpo $(DEPDIR)/osisrtf.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osisrtf.cpp' object='osisrtf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osisrtf.lo `test -f '$(filtersdir)/osisrtf.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisrtf.cpp + +osislemma.lo: $(filtersdir)/osislemma.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osislemma.lo -MD -MP -MF $(DEPDIR)/osislemma.Tpo -c -o osislemma.lo `test -f '$(filtersdir)/osislemma.cpp' || echo '$(srcdir)/'`$(filtersdir)/osislemma.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osislemma.Tpo $(DEPDIR)/osislemma.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osislemma.cpp' object='osislemma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osislemma.lo `test -f '$(filtersdir)/osislemma.cpp' || echo '$(srcdir)/'`$(filtersdir)/osislemma.cpp + +osisredletterwords.lo: $(filtersdir)/osisredletterwords.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osisredletterwords.lo -MD -MP -MF $(DEPDIR)/osisredletterwords.Tpo -c -o osisredletterwords.lo `test -f '$(filtersdir)/osisredletterwords.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisredletterwords.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osisredletterwords.Tpo $(DEPDIR)/osisredletterwords.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osisredletterwords.cpp' object='osisredletterwords.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osisredletterwords.lo `test -f '$(filtersdir)/osisredletterwords.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisredletterwords.cpp + +osisscripref.lo: $(filtersdir)/osisscripref.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osisscripref.lo -MD -MP -MF $(DEPDIR)/osisscripref.Tpo -c -o osisscripref.lo `test -f '$(filtersdir)/osisscripref.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisscripref.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osisscripref.Tpo $(DEPDIR)/osisscripref.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osisscripref.cpp' object='osisscripref.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osisscripref.lo `test -f '$(filtersdir)/osisscripref.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisscripref.cpp + +osisvariants.lo: $(filtersdir)/osisvariants.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osisvariants.lo -MD -MP -MF $(DEPDIR)/osisvariants.Tpo -c -o osisvariants.lo `test -f '$(filtersdir)/osisvariants.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisvariants.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osisvariants.Tpo $(DEPDIR)/osisvariants.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osisvariants.cpp' object='osisvariants.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osisvariants.lo `test -f '$(filtersdir)/osisvariants.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisvariants.cpp + +osiswordjs.lo: $(filtersdir)/osiswordjs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osiswordjs.lo -MD -MP -MF $(DEPDIR)/osiswordjs.Tpo -c -o osiswordjs.lo `test -f '$(filtersdir)/osiswordjs.cpp' || echo '$(srcdir)/'`$(filtersdir)/osiswordjs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osiswordjs.Tpo $(DEPDIR)/osiswordjs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osiswordjs.cpp' object='osiswordjs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osiswordjs.lo `test -f '$(filtersdir)/osiswordjs.cpp' || echo '$(srcdir)/'`$(filtersdir)/osiswordjs.cpp + +osismorphsegmentation.lo: $(filtersdir)/osismorphsegmentation.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osismorphsegmentation.lo -MD -MP -MF $(DEPDIR)/osismorphsegmentation.Tpo -c -o osismorphsegmentation.lo `test -f '$(filtersdir)/osismorphsegmentation.cpp' || echo '$(srcdir)/'`$(filtersdir)/osismorphsegmentation.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osismorphsegmentation.Tpo $(DEPDIR)/osismorphsegmentation.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osismorphsegmentation.cpp' object='osismorphsegmentation.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osismorphsegmentation.lo `test -f '$(filtersdir)/osismorphsegmentation.cpp' || echo '$(srcdir)/'`$(filtersdir)/osismorphsegmentation.cpp + +gbfhtml.lo: $(filtersdir)/gbfhtml.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfhtml.lo -MD -MP -MF $(DEPDIR)/gbfhtml.Tpo -c -o gbfhtml.lo `test -f '$(filtersdir)/gbfhtml.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfhtml.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfhtml.Tpo $(DEPDIR)/gbfhtml.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfhtml.cpp' object='gbfhtml.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfhtml.lo `test -f '$(filtersdir)/gbfhtml.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfhtml.cpp + +gbfhtmlhref.lo: $(filtersdir)/gbfhtmlhref.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfhtmlhref.lo -MD -MP -MF $(DEPDIR)/gbfhtmlhref.Tpo -c -o gbfhtmlhref.lo `test -f '$(filtersdir)/gbfhtmlhref.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfhtmlhref.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfhtmlhref.Tpo $(DEPDIR)/gbfhtmlhref.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfhtmlhref.cpp' object='gbfhtmlhref.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfhtmlhref.lo `test -f '$(filtersdir)/gbfhtmlhref.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfhtmlhref.cpp + +gbfwebif.lo: $(filtersdir)/gbfwebif.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfwebif.lo -MD -MP -MF $(DEPDIR)/gbfwebif.Tpo -c -o gbfwebif.lo `test -f '$(filtersdir)/gbfwebif.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfwebif.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfwebif.Tpo $(DEPDIR)/gbfwebif.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfwebif.cpp' object='gbfwebif.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfwebif.lo `test -f '$(filtersdir)/gbfwebif.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfwebif.cpp + +gbfplain.lo: $(filtersdir)/gbfplain.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfplain.lo -MD -MP -MF $(DEPDIR)/gbfplain.Tpo -c -o gbfplain.lo `test -f '$(filtersdir)/gbfplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfplain.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfplain.Tpo $(DEPDIR)/gbfplain.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfplain.cpp' object='gbfplain.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfplain.lo `test -f '$(filtersdir)/gbfplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfplain.cpp + +gbfrtf.lo: $(filtersdir)/gbfrtf.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfrtf.lo -MD -MP -MF $(DEPDIR)/gbfrtf.Tpo -c -o gbfrtf.lo `test -f '$(filtersdir)/gbfrtf.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfrtf.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfrtf.Tpo $(DEPDIR)/gbfrtf.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfrtf.cpp' object='gbfrtf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfrtf.lo `test -f '$(filtersdir)/gbfrtf.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfrtf.cpp + +gbfstrongs.lo: $(filtersdir)/gbfstrongs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfstrongs.lo -MD -MP -MF $(DEPDIR)/gbfstrongs.Tpo -c -o gbfstrongs.lo `test -f '$(filtersdir)/gbfstrongs.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfstrongs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfstrongs.Tpo $(DEPDIR)/gbfstrongs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfstrongs.cpp' object='gbfstrongs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfstrongs.lo `test -f '$(filtersdir)/gbfstrongs.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfstrongs.cpp + +gbffootnotes.lo: $(filtersdir)/gbffootnotes.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbffootnotes.lo -MD -MP -MF $(DEPDIR)/gbffootnotes.Tpo -c -o gbffootnotes.lo `test -f '$(filtersdir)/gbffootnotes.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbffootnotes.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbffootnotes.Tpo $(DEPDIR)/gbffootnotes.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbffootnotes.cpp' object='gbffootnotes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbffootnotes.lo `test -f '$(filtersdir)/gbffootnotes.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbffootnotes.cpp + +gbfheadings.lo: $(filtersdir)/gbfheadings.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfheadings.lo -MD -MP -MF $(DEPDIR)/gbfheadings.Tpo -c -o gbfheadings.lo `test -f '$(filtersdir)/gbfheadings.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfheadings.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfheadings.Tpo $(DEPDIR)/gbfheadings.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfheadings.cpp' object='gbfheadings.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfheadings.lo `test -f '$(filtersdir)/gbfheadings.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfheadings.cpp + +gbfredletterwords.lo: $(filtersdir)/gbfredletterwords.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfredletterwords.lo -MD -MP -MF $(DEPDIR)/gbfredletterwords.Tpo -c -o gbfredletterwords.lo `test -f '$(filtersdir)/gbfredletterwords.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfredletterwords.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfredletterwords.Tpo $(DEPDIR)/gbfredletterwords.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfredletterwords.cpp' object='gbfredletterwords.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfredletterwords.lo `test -f '$(filtersdir)/gbfredletterwords.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfredletterwords.cpp + +gbfmorph.lo: $(filtersdir)/gbfmorph.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfmorph.lo -MD -MP -MF $(DEPDIR)/gbfmorph.Tpo -c -o gbfmorph.lo `test -f '$(filtersdir)/gbfmorph.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfmorph.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfmorph.Tpo $(DEPDIR)/gbfmorph.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfmorph.cpp' object='gbfmorph.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfmorph.lo `test -f '$(filtersdir)/gbfmorph.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfmorph.cpp + +gbfwordjs.lo: $(filtersdir)/gbfwordjs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfwordjs.lo -MD -MP -MF $(DEPDIR)/gbfwordjs.Tpo -c -o gbfwordjs.lo `test -f '$(filtersdir)/gbfwordjs.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfwordjs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfwordjs.Tpo $(DEPDIR)/gbfwordjs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfwordjs.cpp' object='gbfwordjs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfwordjs.lo `test -f '$(filtersdir)/gbfwordjs.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfwordjs.cpp + +thmlstrongs.lo: $(filtersdir)/thmlstrongs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlstrongs.lo -MD -MP -MF $(DEPDIR)/thmlstrongs.Tpo -c -o thmlstrongs.lo `test -f '$(filtersdir)/thmlstrongs.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlstrongs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlstrongs.Tpo $(DEPDIR)/thmlstrongs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlstrongs.cpp' object='thmlstrongs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlstrongs.lo `test -f '$(filtersdir)/thmlstrongs.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlstrongs.cpp + +thmlfootnotes.lo: $(filtersdir)/thmlfootnotes.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlfootnotes.lo -MD -MP -MF $(DEPDIR)/thmlfootnotes.Tpo -c -o thmlfootnotes.lo `test -f '$(filtersdir)/thmlfootnotes.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlfootnotes.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlfootnotes.Tpo $(DEPDIR)/thmlfootnotes.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlfootnotes.cpp' object='thmlfootnotes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlfootnotes.lo `test -f '$(filtersdir)/thmlfootnotes.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlfootnotes.cpp + +thmlheadings.lo: $(filtersdir)/thmlheadings.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlheadings.lo -MD -MP -MF $(DEPDIR)/thmlheadings.Tpo -c -o thmlheadings.lo `test -f '$(filtersdir)/thmlheadings.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlheadings.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlheadings.Tpo $(DEPDIR)/thmlheadings.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlheadings.cpp' object='thmlheadings.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlheadings.lo `test -f '$(filtersdir)/thmlheadings.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlheadings.cpp + +thmlmorph.lo: $(filtersdir)/thmlmorph.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlmorph.lo -MD -MP -MF $(DEPDIR)/thmlmorph.Tpo -c -o thmlmorph.lo `test -f '$(filtersdir)/thmlmorph.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlmorph.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlmorph.Tpo $(DEPDIR)/thmlmorph.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlmorph.cpp' object='thmlmorph.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlmorph.lo `test -f '$(filtersdir)/thmlmorph.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlmorph.cpp + +thmllemma.lo: $(filtersdir)/thmllemma.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmllemma.lo -MD -MP -MF $(DEPDIR)/thmllemma.Tpo -c -o thmllemma.lo `test -f '$(filtersdir)/thmllemma.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmllemma.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmllemma.Tpo $(DEPDIR)/thmllemma.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmllemma.cpp' object='thmllemma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmllemma.lo `test -f '$(filtersdir)/thmllemma.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmllemma.cpp + +thmlscripref.lo: $(filtersdir)/thmlscripref.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlscripref.lo -MD -MP -MF $(DEPDIR)/thmlscripref.Tpo -c -o thmlscripref.lo `test -f '$(filtersdir)/thmlscripref.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlscripref.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlscripref.Tpo $(DEPDIR)/thmlscripref.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlscripref.cpp' object='thmlscripref.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlscripref.lo `test -f '$(filtersdir)/thmlscripref.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlscripref.cpp + +thmlvariants.lo: $(filtersdir)/thmlvariants.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlvariants.lo -MD -MP -MF $(DEPDIR)/thmlvariants.Tpo -c -o thmlvariants.lo `test -f '$(filtersdir)/thmlvariants.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlvariants.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlvariants.Tpo $(DEPDIR)/thmlvariants.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlvariants.cpp' object='thmlvariants.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlvariants.lo `test -f '$(filtersdir)/thmlvariants.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlvariants.cpp + +thmlgbf.lo: $(filtersdir)/thmlgbf.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlgbf.lo -MD -MP -MF $(DEPDIR)/thmlgbf.Tpo -c -o thmlgbf.lo `test -f '$(filtersdir)/thmlgbf.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlgbf.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlgbf.Tpo $(DEPDIR)/thmlgbf.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlgbf.cpp' object='thmlgbf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlgbf.lo `test -f '$(filtersdir)/thmlgbf.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlgbf.cpp + +thmlrtf.lo: $(filtersdir)/thmlrtf.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlrtf.lo -MD -MP -MF $(DEPDIR)/thmlrtf.Tpo -c -o thmlrtf.lo `test -f '$(filtersdir)/thmlrtf.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlrtf.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlrtf.Tpo $(DEPDIR)/thmlrtf.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlrtf.cpp' object='thmlrtf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlrtf.lo `test -f '$(filtersdir)/thmlrtf.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlrtf.cpp + +thmlhtml.lo: $(filtersdir)/thmlhtml.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlhtml.lo -MD -MP -MF $(DEPDIR)/thmlhtml.Tpo -c -o thmlhtml.lo `test -f '$(filtersdir)/thmlhtml.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlhtml.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlhtml.Tpo $(DEPDIR)/thmlhtml.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlhtml.cpp' object='thmlhtml.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlhtml.lo `test -f '$(filtersdir)/thmlhtml.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlhtml.cpp + +thmlhtmlhref.lo: $(filtersdir)/thmlhtmlhref.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlhtmlhref.lo -MD -MP -MF $(DEPDIR)/thmlhtmlhref.Tpo -c -o thmlhtmlhref.lo `test -f '$(filtersdir)/thmlhtmlhref.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlhtmlhref.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlhtmlhref.Tpo $(DEPDIR)/thmlhtmlhref.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlhtmlhref.cpp' object='thmlhtmlhref.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlhtmlhref.lo `test -f '$(filtersdir)/thmlhtmlhref.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlhtmlhref.cpp + +thmlwebif.lo: $(filtersdir)/thmlwebif.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlwebif.lo -MD -MP -MF $(DEPDIR)/thmlwebif.Tpo -c -o thmlwebif.lo `test -f '$(filtersdir)/thmlwebif.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlwebif.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlwebif.Tpo $(DEPDIR)/thmlwebif.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlwebif.cpp' object='thmlwebif.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlwebif.lo `test -f '$(filtersdir)/thmlwebif.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlwebif.cpp + +thmlwordjs.lo: $(filtersdir)/thmlwordjs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlwordjs.lo -MD -MP -MF $(DEPDIR)/thmlwordjs.Tpo -c -o thmlwordjs.lo `test -f '$(filtersdir)/thmlwordjs.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlwordjs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlwordjs.Tpo $(DEPDIR)/thmlwordjs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlwordjs.cpp' object='thmlwordjs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlwordjs.lo `test -f '$(filtersdir)/thmlwordjs.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlwordjs.cpp + +gbfthml.lo: $(filtersdir)/gbfthml.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfthml.lo -MD -MP -MF $(DEPDIR)/gbfthml.Tpo -c -o gbfthml.lo `test -f '$(filtersdir)/gbfthml.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfthml.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfthml.Tpo $(DEPDIR)/gbfthml.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfthml.cpp' object='gbfthml.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfthml.lo `test -f '$(filtersdir)/gbfthml.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfthml.cpp + +gbfosis.lo: $(filtersdir)/gbfosis.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gbfosis.lo -MD -MP -MF $(DEPDIR)/gbfosis.Tpo -c -o gbfosis.lo `test -f '$(filtersdir)/gbfosis.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfosis.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gbfosis.Tpo $(DEPDIR)/gbfosis.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/gbfosis.cpp' object='gbfosis.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gbfosis.lo `test -f '$(filtersdir)/gbfosis.cpp' || echo '$(srcdir)/'`$(filtersdir)/gbfosis.cpp + +thmlosis.lo: $(filtersdir)/thmlosis.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlosis.lo -MD -MP -MF $(DEPDIR)/thmlosis.Tpo -c -o thmlosis.lo `test -f '$(filtersdir)/thmlosis.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlosis.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlosis.Tpo $(DEPDIR)/thmlosis.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlosis.cpp' object='thmlosis.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlosis.lo `test -f '$(filtersdir)/thmlosis.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlosis.cpp + +thmlplain.lo: $(filtersdir)/thmlplain.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT thmlplain.lo -MD -MP -MF $(DEPDIR)/thmlplain.Tpo -c -o thmlplain.lo `test -f '$(filtersdir)/thmlplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlplain.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/thmlplain.Tpo $(DEPDIR)/thmlplain.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/thmlplain.cpp' object='thmlplain.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o thmlplain.lo `test -f '$(filtersdir)/thmlplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/thmlplain.cpp + +osisosis.lo: $(filtersdir)/osisosis.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT osisosis.lo -MD -MP -MF $(DEPDIR)/osisosis.Tpo -c -o osisosis.lo `test -f '$(filtersdir)/osisosis.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisosis.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/osisosis.Tpo $(DEPDIR)/osisosis.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/osisosis.cpp' object='osisosis.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o osisosis.lo `test -f '$(filtersdir)/osisosis.cpp' || echo '$(srcdir)/'`$(filtersdir)/osisosis.cpp + +rtfhtml.lo: $(filtersdir)/rtfhtml.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rtfhtml.lo -MD -MP -MF $(DEPDIR)/rtfhtml.Tpo -c -o rtfhtml.lo `test -f '$(filtersdir)/rtfhtml.cpp' || echo '$(srcdir)/'`$(filtersdir)/rtfhtml.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rtfhtml.Tpo $(DEPDIR)/rtfhtml.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/rtfhtml.cpp' object='rtfhtml.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rtfhtml.lo `test -f '$(filtersdir)/rtfhtml.cpp' || echo '$(srcdir)/'`$(filtersdir)/rtfhtml.cpp + +plainfootnotes.lo: $(filtersdir)/plainfootnotes.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT plainfootnotes.lo -MD -MP -MF $(DEPDIR)/plainfootnotes.Tpo -c -o plainfootnotes.lo `test -f '$(filtersdir)/plainfootnotes.cpp' || echo '$(srcdir)/'`$(filtersdir)/plainfootnotes.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/plainfootnotes.Tpo $(DEPDIR)/plainfootnotes.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/plainfootnotes.cpp' object='plainfootnotes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o plainfootnotes.lo `test -f '$(filtersdir)/plainfootnotes.cpp' || echo '$(srcdir)/'`$(filtersdir)/plainfootnotes.cpp + +plainhtml.lo: $(filtersdir)/plainhtml.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT plainhtml.lo -MD -MP -MF $(DEPDIR)/plainhtml.Tpo -c -o plainhtml.lo `test -f '$(filtersdir)/plainhtml.cpp' || echo '$(srcdir)/'`$(filtersdir)/plainhtml.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/plainhtml.Tpo $(DEPDIR)/plainhtml.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/plainhtml.cpp' object='plainhtml.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o plainhtml.lo `test -f '$(filtersdir)/plainhtml.cpp' || echo '$(srcdir)/'`$(filtersdir)/plainhtml.cpp + +greeklexattribs.lo: $(filtersdir)/greeklexattribs.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT greeklexattribs.lo -MD -MP -MF $(DEPDIR)/greeklexattribs.Tpo -c -o greeklexattribs.lo `test -f '$(filtersdir)/greeklexattribs.cpp' || echo '$(srcdir)/'`$(filtersdir)/greeklexattribs.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/greeklexattribs.Tpo $(DEPDIR)/greeklexattribs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/greeklexattribs.cpp' object='greeklexattribs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o greeklexattribs.lo `test -f '$(filtersdir)/greeklexattribs.cpp' || echo '$(srcdir)/'`$(filtersdir)/greeklexattribs.cpp + +unicodertf.lo: $(filtersdir)/unicodertf.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT unicodertf.lo -MD -MP -MF $(DEPDIR)/unicodertf.Tpo -c -o unicodertf.lo `test -f '$(filtersdir)/unicodertf.cpp' || echo '$(srcdir)/'`$(filtersdir)/unicodertf.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/unicodertf.Tpo $(DEPDIR)/unicodertf.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/unicodertf.cpp' object='unicodertf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o unicodertf.lo `test -f '$(filtersdir)/unicodertf.cpp' || echo '$(srcdir)/'`$(filtersdir)/unicodertf.cpp + +papyriplain.lo: $(filtersdir)/papyriplain.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT papyriplain.lo -MD -MP -MF $(DEPDIR)/papyriplain.Tpo -c -o papyriplain.lo `test -f '$(filtersdir)/papyriplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/papyriplain.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/papyriplain.Tpo $(DEPDIR)/papyriplain.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/papyriplain.cpp' object='papyriplain.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o papyriplain.lo `test -f '$(filtersdir)/papyriplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/papyriplain.cpp + +teiplain.lo: $(filtersdir)/teiplain.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT teiplain.lo -MD -MP -MF $(DEPDIR)/teiplain.Tpo -c -o teiplain.lo `test -f '$(filtersdir)/teiplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/teiplain.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/teiplain.Tpo $(DEPDIR)/teiplain.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/teiplain.cpp' object='teiplain.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o teiplain.lo `test -f '$(filtersdir)/teiplain.cpp' || echo '$(srcdir)/'`$(filtersdir)/teiplain.cpp + +teirtf.lo: $(filtersdir)/teirtf.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT teirtf.lo -MD -MP -MF $(DEPDIR)/teirtf.Tpo -c -o teirtf.lo `test -f '$(filtersdir)/teirtf.cpp' || echo '$(srcdir)/'`$(filtersdir)/teirtf.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/teirtf.Tpo $(DEPDIR)/teirtf.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/teirtf.cpp' object='teirtf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o teirtf.lo `test -f '$(filtersdir)/teirtf.cpp' || echo '$(srcdir)/'`$(filtersdir)/teirtf.cpp + +teihtmlhref.lo: $(filtersdir)/teihtmlhref.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT teihtmlhref.lo -MD -MP -MF $(DEPDIR)/teihtmlhref.Tpo -c -o teihtmlhref.lo `test -f '$(filtersdir)/teihtmlhref.cpp' || echo '$(srcdir)/'`$(filtersdir)/teihtmlhref.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/teihtmlhref.Tpo $(DEPDIR)/teihtmlhref.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(filtersdir)/teihtmlhref.cpp' object='teihtmlhref.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o teihtmlhref.lo `test -f '$(filtersdir)/teihtmlhref.cpp' || echo '$(srcdir)/'`$(filtersdir)/teihtmlhref.cpp + +swgenbook.lo: $(genbookdir)/swgenbook.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swgenbook.lo -MD -MP -MF $(DEPDIR)/swgenbook.Tpo -c -o swgenbook.lo `test -f '$(genbookdir)/swgenbook.cpp' || echo '$(srcdir)/'`$(genbookdir)/swgenbook.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swgenbook.Tpo $(DEPDIR)/swgenbook.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(genbookdir)/swgenbook.cpp' object='swgenbook.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swgenbook.lo `test -f '$(genbookdir)/swgenbook.cpp' || echo '$(srcdir)/'`$(genbookdir)/swgenbook.cpp + +rawgenbook.lo: $(rawgenbookdir)/rawgenbook.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawgenbook.lo -MD -MP -MF $(DEPDIR)/rawgenbook.Tpo -c -o rawgenbook.lo `test -f '$(rawgenbookdir)/rawgenbook.cpp' || echo '$(srcdir)/'`$(rawgenbookdir)/rawgenbook.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawgenbook.Tpo $(DEPDIR)/rawgenbook.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(rawgenbookdir)/rawgenbook.cpp' object='rawgenbook.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawgenbook.lo `test -f '$(rawgenbookdir)/rawgenbook.cpp' || echo '$(srcdir)/'`$(rawgenbookdir)/rawgenbook.cpp + +swtext.lo: $(textsdir)/swtext.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swtext.lo -MD -MP -MF $(DEPDIR)/swtext.Tpo -c -o swtext.lo `test -f '$(textsdir)/swtext.cpp' || echo '$(srcdir)/'`$(textsdir)/swtext.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swtext.Tpo $(DEPDIR)/swtext.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(textsdir)/swtext.cpp' object='swtext.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swtext.lo `test -f '$(textsdir)/swtext.cpp' || echo '$(srcdir)/'`$(textsdir)/swtext.cpp + +rawtext.lo: $(rawtextdir)/rawtext.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawtext.lo -MD -MP -MF $(DEPDIR)/rawtext.Tpo -c -o rawtext.lo `test -f '$(rawtextdir)/rawtext.cpp' || echo '$(srcdir)/'`$(rawtextdir)/rawtext.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawtext.Tpo $(DEPDIR)/rawtext.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(rawtextdir)/rawtext.cpp' object='rawtext.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawtext.lo `test -f '$(rawtextdir)/rawtext.cpp' || echo '$(srcdir)/'`$(rawtextdir)/rawtext.cpp + +rawtext4.lo: $(rawtext4dir)/rawtext4.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawtext4.lo -MD -MP -MF $(DEPDIR)/rawtext4.Tpo -c -o rawtext4.lo `test -f '$(rawtext4dir)/rawtext4.cpp' || echo '$(srcdir)/'`$(rawtext4dir)/rawtext4.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawtext4.Tpo $(DEPDIR)/rawtext4.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(rawtext4dir)/rawtext4.cpp' object='rawtext4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawtext4.lo `test -f '$(rawtext4dir)/rawtext4.cpp' || echo '$(srcdir)/'`$(rawtext4dir)/rawtext4.cpp + +ztext.lo: $(ztextdir)/ztext.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ztext.lo -MD -MP -MF $(DEPDIR)/ztext.Tpo -c -o ztext.lo `test -f '$(ztextdir)/ztext.cpp' || echo '$(srcdir)/'`$(ztextdir)/ztext.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/ztext.Tpo $(DEPDIR)/ztext.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(ztextdir)/ztext.cpp' object='ztext.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ztext.lo `test -f '$(ztextdir)/ztext.cpp' || echo '$(srcdir)/'`$(ztextdir)/ztext.cpp + +swcom.lo: $(commentsdir)/swcom.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swcom.lo -MD -MP -MF $(DEPDIR)/swcom.Tpo -c -o swcom.lo `test -f '$(commentsdir)/swcom.cpp' || echo '$(srcdir)/'`$(commentsdir)/swcom.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swcom.Tpo $(DEPDIR)/swcom.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(commentsdir)/swcom.cpp' object='swcom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swcom.lo `test -f '$(commentsdir)/swcom.cpp' || echo '$(srcdir)/'`$(commentsdir)/swcom.cpp + +rawcom.lo: $(rawcomdir)/rawcom.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawcom.lo -MD -MP -MF $(DEPDIR)/rawcom.Tpo -c -o rawcom.lo `test -f '$(rawcomdir)/rawcom.cpp' || echo '$(srcdir)/'`$(rawcomdir)/rawcom.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawcom.Tpo $(DEPDIR)/rawcom.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(rawcomdir)/rawcom.cpp' object='rawcom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawcom.lo `test -f '$(rawcomdir)/rawcom.cpp' || echo '$(srcdir)/'`$(rawcomdir)/rawcom.cpp + +rawcom4.lo: $(rawcom4dir)/rawcom4.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawcom4.lo -MD -MP -MF $(DEPDIR)/rawcom4.Tpo -c -o rawcom4.lo `test -f '$(rawcom4dir)/rawcom4.cpp' || echo '$(srcdir)/'`$(rawcom4dir)/rawcom4.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawcom4.Tpo $(DEPDIR)/rawcom4.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(rawcom4dir)/rawcom4.cpp' object='rawcom4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawcom4.lo `test -f '$(rawcom4dir)/rawcom4.cpp' || echo '$(srcdir)/'`$(rawcom4dir)/rawcom4.cpp + +rawfiles.lo: $(rawfilesdir)/rawfiles.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawfiles.lo -MD -MP -MF $(DEPDIR)/rawfiles.Tpo -c -o rawfiles.lo `test -f '$(rawfilesdir)/rawfiles.cpp' || echo '$(srcdir)/'`$(rawfilesdir)/rawfiles.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawfiles.Tpo $(DEPDIR)/rawfiles.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(rawfilesdir)/rawfiles.cpp' object='rawfiles.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawfiles.lo `test -f '$(rawfilesdir)/rawfiles.cpp' || echo '$(srcdir)/'`$(rawfilesdir)/rawfiles.cpp + +zcom.lo: $(zcomdir)/zcom.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zcom.lo -MD -MP -MF $(DEPDIR)/zcom.Tpo -c -o zcom.lo `test -f '$(zcomdir)/zcom.cpp' || echo '$(srcdir)/'`$(zcomdir)/zcom.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zcom.Tpo $(DEPDIR)/zcom.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(zcomdir)/zcom.cpp' object='zcom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zcom.lo `test -f '$(zcomdir)/zcom.cpp' || echo '$(srcdir)/'`$(zcomdir)/zcom.cpp + +hrefcom.lo: $(hrefcomdir)/hrefcom.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT hrefcom.lo -MD -MP -MF $(DEPDIR)/hrefcom.Tpo -c -o hrefcom.lo `test -f '$(hrefcomdir)/hrefcom.cpp' || echo '$(srcdir)/'`$(hrefcomdir)/hrefcom.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/hrefcom.Tpo $(DEPDIR)/hrefcom.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(hrefcomdir)/hrefcom.cpp' object='hrefcom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o hrefcom.lo `test -f '$(hrefcomdir)/hrefcom.cpp' || echo '$(srcdir)/'`$(hrefcomdir)/hrefcom.cpp + +swld.lo: $(lexdictdir)/swld.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT swld.lo -MD -MP -MF $(DEPDIR)/swld.Tpo -c -o swld.lo `test -f '$(lexdictdir)/swld.cpp' || echo '$(srcdir)/'`$(lexdictdir)/swld.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/swld.Tpo $(DEPDIR)/swld.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(lexdictdir)/swld.cpp' object='swld.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o swld.lo `test -f '$(lexdictdir)/swld.cpp' || echo '$(srcdir)/'`$(lexdictdir)/swld.cpp + +rawld.lo: $(rawlddir)/rawld.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawld.lo -MD -MP -MF $(DEPDIR)/rawld.Tpo -c -o rawld.lo `test -f '$(rawlddir)/rawld.cpp' || echo '$(srcdir)/'`$(rawlddir)/rawld.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawld.Tpo $(DEPDIR)/rawld.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(rawlddir)/rawld.cpp' object='rawld.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawld.lo `test -f '$(rawlddir)/rawld.cpp' || echo '$(srcdir)/'`$(rawlddir)/rawld.cpp + +rawld4.lo: $(rawld4dir)/rawld4.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rawld4.lo -MD -MP -MF $(DEPDIR)/rawld4.Tpo -c -o rawld4.lo `test -f '$(rawld4dir)/rawld4.cpp' || echo '$(srcdir)/'`$(rawld4dir)/rawld4.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/rawld4.Tpo $(DEPDIR)/rawld4.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(rawld4dir)/rawld4.cpp' object='rawld4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rawld4.lo `test -f '$(rawld4dir)/rawld4.cpp' || echo '$(srcdir)/'`$(rawld4dir)/rawld4.cpp + +zld.lo: $(zlddir)/zld.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zld.lo -MD -MP -MF $(DEPDIR)/zld.Tpo -c -o zld.lo `test -f '$(zlddir)/zld.cpp' || echo '$(srcdir)/'`$(zlddir)/zld.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zld.Tpo $(DEPDIR)/zld.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(zlddir)/zld.cpp' object='zld.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zld.lo `test -f '$(zlddir)/zld.cpp' || echo '$(srcdir)/'`$(zlddir)/zld.cpp + +flatapi.lo: $(bindingsdir)/flatapi.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT flatapi.lo -MD -MP -MF $(DEPDIR)/flatapi.Tpo -c -o flatapi.lo `test -f '$(bindingsdir)/flatapi.cpp' || echo '$(srcdir)/'`$(bindingsdir)/flatapi.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/flatapi.Tpo $(DEPDIR)/flatapi.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(bindingsdir)/flatapi.cpp' object='flatapi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o flatapi.lo `test -f '$(bindingsdir)/flatapi.cpp' || echo '$(srcdir)/'`$(bindingsdir)/flatapi.cpp + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-pkgincludeHEADERS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/README b/lib/README new file mode 100644 index 0000000..5b46484 --- /dev/null +++ b/lib/README @@ -0,0 +1,2 @@ +This is where the API Libraries will reside after a +successful build. diff --git a/lib/bcppmake/libsword.bdsproj b/lib/bcppmake/libsword.bdsproj new file mode 100644 index 0000000..cd6ae8d --- /dev/null +++ b/lib/bcppmake/libsword.bdsproj @@ -0,0 +1,690 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 20 + ..\..\src\modules\tests;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src;..\..\..\biblecs\apps\InstallMgr\curl\include + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src;..\..\..\biblecs\apps\InstallMgr\curl\include + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\include;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\include;..\..\apps\windoze\CBuilder5\InstallMgr;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\..\icu-sword\include;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n + ..\..\apps\windoze;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n + ..\..\apps\windoze;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\include;$(BCB)\include;$(BCB)\include\vcl + ..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\include;$(BCB)\include\vcl + + + 7 + ..\..\src\modules\tests;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + ..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + $(BCB)\lib\obj;$(BCB)\lib + ..\..\apps\windoze;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + ..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + ..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + ..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 22 + UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING + UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;_DEBUG + _ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING + _ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;UNICODE + _UCS2;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING + _ASCII;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING + __ASCII;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING + _ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;LUCENE_DISABLE_MULTITHREADING;_WIN32;HAVE_DIRENT + _ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;LUCENE_DISABLE_MULTITHREADING;_WIN32;HAVE_DIRENT;_DEBUG + _ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;_DEBUG;USELUCENE;LUCENE_DISABLE_MULTITHREADING;_WIN32;HAVE_DIRENT + _ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;_DEBUG;USELUCENE + _ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;_DEBUG + _ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0 + _ICU_;_ICUSWORD_;USBINARY;_DEBUG;U_HAVE_PLACEMENT_NEW=0 + _ICU_;_ICUSWORD_;USBINARY;_DEBUG + _ICU_;_ICUSWORD_;USBINARY + _ICU_;_ICUSWORD_;USBINARY;CURLAVAILABLE;_DEBUG + _ICU_;_ICUSWORD_;USBINARY;CURLAVAILABLE + ;USBINARY;_DEBUG + _ICU_;_ICUSWORD_ + _ICU_;_ICUSWORD_;_DEBUG + _DEBUG + + + 3 + ..\ + ../\ + ../ + + + 5 + 0x0200 + 0x0080 + 0x0040 + 0x0020 + 0x0010 + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + libsword.bpf + + + diff --git a/lib/bcppmake/libsword.bpf b/lib/bcppmake/libsword.bpf new file mode 100644 index 0000000..e74f31c --- /dev/null +++ b/lib/bcppmake/libsword.bpf @@ -0,0 +1,156 @@ +//--------------------------------------------------------------------------- + +//#include +#pragma hdrstop + +USEUNIT("..\..\src\frontend\swdisp.cpp"); +USEUNIT("..\..\src\frontend\swlog.cpp"); +USEUNIT("..\..\src\keys\versekey.cpp"); +USEUNIT("..\..\src\keys\strkey.cpp"); +USEUNIT("..\..\src\keys\swkey.cpp"); +USEUNIT("..\..\src\keys\treekey.cpp"); +USEUNIT("..\..\src\keys\treekeyidx.cpp"); +USEUNIT("..\..\src\keys\listkey.cpp"); +USEUNIT("..\..\src\mgr\swsearchable.cpp"); +USEUNIT("..\..\src\mgr\encfiltmgr.cpp"); +USEUNIT("..\..\src\mgr\filemgr.cpp"); +USEUNIT("..\..\src\mgr\ftptrans.cpp"); +USEUNIT("..\..\src\mgr\installmgr.cpp"); +USEUNIT("..\..\src\mgr\localemgr.cpp"); +USEUNIT("..\..\src\mgr\markupfiltmgr.cpp"); +USEUNIT("..\..\src\mgr\stringmgr.cpp"); +USEUNIT("..\..\src\mgr\swcacher.cpp"); +USEUNIT("..\..\src\mgr\swconfig.cpp"); +USEUNIT("..\..\src\mgr\swfiltermgr.cpp"); +USEUNIT("..\..\src\mgr\swlocale.cpp"); +USEUNIT("..\..\src\mgr\swmgr.cpp"); +USEUNIT("..\..\src\mgr\curlftpt.cpp"); +USEUNIT("..\..\src\utilfuns\utilxml.cpp"); +USEUNIT("..\..\src\utilfuns\roman.cpp"); +USEUNIT("..\..\src\utilfuns\swbuf.cpp"); +USEUNIT("..\..\src\utilfuns\swobject.cpp"); +USEUNIT("..\..\src\utilfuns\swunicod.cpp"); +USEUNIT("..\..\src\utilfuns\swversion.cpp"); +USEUNIT("..\..\src\utilfuns\url.cpp"); +USEUNIT("..\..\src\utilfuns\utilstr.cpp"); +USEUNIT("..\..\src\modules\comments\hrefcom\hrefcom.cpp"); +USEUNIT("..\..\src\modules\comments\rawcom\rawcom.cpp"); +USEUNIT("..\..\src\modules\comments\rawfiles\rawfiles.cpp"); +USEUNIT("..\..\src\modules\comments\zcom\zcom.cpp"); +USEUNIT("..\..\src\modules\comments\swcom.cpp"); +USEUNIT("..\..\src\modules\common\zverse.cpp"); +USEUNIT("..\..\src\modules\common\entriesblk.cpp"); +USEUNIT("..\..\src\modules\common\lzsscomprs.cpp"); +USEUNIT("..\..\src\modules\common\rawstr.cpp"); +USEUNIT("..\..\src\modules\common\rawstr4.cpp"); +USEUNIT("..\..\src\modules\common\rawverse.cpp"); +USEUNIT("..\..\src\modules\common\sapphire.cpp"); +USEUNIT("..\..\src\modules\common\swcipher.cpp"); +USEUNIT("..\..\src\modules\common\swcomprs.cpp"); +USEUNIT("..\..\src\modules\common\zipcomprs.cpp"); +USEUNIT("..\..\src\modules\common\zstr.cpp"); +USEUNIT("..\..\src\modules\filters\utf8utf16.cpp"); +USEUNIT("..\..\src\modules\filters\gbffootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\gbfheadings.cpp"); +USEUNIT("..\..\src\modules\filters\gbfhtml.cpp"); +USEUNIT("..\..\src\modules\filters\gbfhtmlhref.cpp"); +USEUNIT("..\..\src\modules\filters\gbfmorph.cpp"); +USEUNIT("..\..\src\modules\filters\gbfosis.cpp"); +USEUNIT("..\..\src\modules\filters\gbfplain.cpp"); +USEUNIT("..\..\src\modules\filters\gbfredletterwords.cpp"); +USEUNIT("..\..\src\modules\filters\gbfrtf.cpp"); +USEUNIT("..\..\src\modules\filters\gbfstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\gbfthml.cpp"); +USEUNIT("..\..\src\modules\filters\gbfwebif.cpp"); +USEUNIT("..\..\src\modules\filters\greeklexattribs.cpp"); +USEUNIT("..\..\src\modules\filters\latin1utf16.cpp"); +USEUNIT("..\..\src\modules\filters\latin1utf8.cpp"); +USEUNIT("..\..\src\modules\filters\osisfootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\osisheadings.cpp"); +USEUNIT("..\..\src\modules\filters\osishtmlhref.cpp"); +USEUNIT("..\..\src\modules\filters\osislemma.cpp"); +USEUNIT("..\..\src\modules\filters\osismorph.cpp"); +USEUNIT("..\..\src\modules\filters\osisosis.cpp"); +USEUNIT("..\..\src\modules\filters\osisplain.cpp"); +USEUNIT("..\..\src\modules\filters\osisredletterwords.cpp"); +USEUNIT("..\..\src\modules\filters\osisrtf.cpp"); +USEUNIT("..\..\src\modules\filters\osisscripref.cpp"); +USEUNIT("..\..\src\modules\filters\osisstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\osiswebif.cpp"); +USEUNIT("..\..\src\modules\filters\osiswordjs.cpp"); +USEUNIT("..\..\src\modules\filters\plainfootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\plainhtml.cpp"); +USEUNIT("..\..\src\modules\filters\rtfhtml.cpp"); +USEUNIT("..\..\src\modules\filters\scsuutf8.cpp"); +USEUNIT("..\..\src\modules\filters\swbasicfilter.cpp"); +USEUNIT("..\..\src\modules\filters\swoptfilter.cpp"); +USEUNIT("..\..\src\modules\filters\thmlfootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\thmlgbf.cpp"); +USEUNIT("..\..\src\modules\filters\thmlheadings.cpp"); +USEUNIT("..\..\src\modules\filters\thmlhtml.cpp"); +USEUNIT("..\..\src\modules\filters\thmlhtmlhref.cpp"); +USEUNIT("..\..\src\modules\filters\thmllemma.cpp"); +USEUNIT("..\..\src\modules\filters\thmlmorph.cpp"); +USEUNIT("..\..\src\modules\filters\thmlosis.cpp"); +USEUNIT("..\..\src\modules\filters\thmlplain.cpp"); +USEUNIT("..\..\src\modules\filters\thmlrtf.cpp"); +USEUNIT("..\..\src\modules\filters\thmlscripref.cpp"); +USEUNIT("..\..\src\modules\filters\thmlstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\thmlvariants.cpp"); +USEUNIT("..\..\src\modules\filters\thmlwebif.cpp"); +USEUNIT("..\..\src\modules\filters\thmlwordjs.cpp"); +USEUNIT("..\..\src\modules\filters\unicodertf.cpp"); +USEUNIT("..\..\src\modules\filters\utf16utf8.cpp"); +USEUNIT("..\..\src\modules\filters\utf8arshaping.cpp"); +USEUNIT("..\..\src\modules\filters\utf8bidireorder.cpp"); +USEUNIT("..\..\src\modules\filters\utf8cantillation.cpp"); +USEUNIT("..\..\src\modules\filters\utf8greekaccents.cpp"); +USEUNIT("..\..\src\modules\filters\utf8hebrewpoints.cpp"); +USEUNIT("..\..\src\modules\filters\utf8html.cpp"); +USEUNIT("..\..\src\modules\filters\utf8latin1.cpp"); +USEUNIT("..\..\src\modules\filters\utf8nfc.cpp"); +USEUNIT("..\..\src\modules\filters\utf8nfkd.cpp"); +USEUNIT("..\..\src\modules\filters\utf8transliterator.cpp"); +USEUNIT("..\..\src\modules\filters\cipherfil.cpp"); +USEUNIT("..\..\src\modules\genbook\rawgenbook\rawgenbook.cpp"); +USEUNIT("..\..\src\modules\genbook\swgenbook.cpp"); +USEUNIT("..\..\src\modules\lexdict\rawld\rawld.cpp"); +USEUNIT("..\..\src\modules\lexdict\rawld4\rawld4.cpp"); +USEUNIT("..\..\src\modules\lexdict\zld\zld.cpp"); +USEUNIT("..\..\src\modules\lexdict\swld.cpp"); +USEUNIT("..\..\src\modules\tests\echomod.cpp"); +USEUNIT("..\..\src\modules\texts\rawtext\rawtext.cpp"); +USEUNIT("..\..\src\modules\texts\ztext\ztext.cpp"); +USEUNIT("..\..\src\modules\texts\swtext.cpp"); +USEUNIT("..\..\src\modules\swmodule.cpp"); +USEUNIT("..\..\src\utilfuns\zlib\zutil.c"); +USEUNIT("..\..\src\utilfuns\zlib\compress.c"); +USEUNIT("..\..\src\utilfuns\zlib\crc32.c"); +USEUNIT("..\..\src\utilfuns\zlib\deflate.c"); +USEUNIT("..\..\src\utilfuns\zlib\gzio.c"); +USEUNIT("..\..\src\utilfuns\zlib\infblock.c"); +USEUNIT("..\..\src\utilfuns\zlib\infcodes.c"); +USEUNIT("..\..\src\utilfuns\zlib\inffast.c"); +USEUNIT("..\..\src\utilfuns\zlib\inflate.c"); +USEUNIT("..\..\src\utilfuns\zlib\inftrees.c"); +USEUNIT("..\..\src\utilfuns\zlib\infutil.c"); +USEUNIT("..\..\src\utilfuns\zlib\maketree.c"); +USEUNIT("..\..\src\utilfuns\zlib\trees.c"); +USEUNIT("..\..\src\utilfuns\zlib\uncompr.c"); +USEUNIT("..\..\src\utilfuns\zlib\untgz.c"); +USEUNIT("..\..\src\utilfuns\zlib\adler32.c"); +USEUNIT("..\..\src\modules\filters\papyriplain.cpp"); +USEUNIT("..\..\src\utilfuns\ftpparse.c"); +USEUNIT("..\..\src\modules\filters\osismorphsegmentation.cpp"); +USEUNIT("..\..\src\keys\versetreekey.cpp"); +USEUNIT("..\..\src\modules\filters\teiplain.cpp"); +USEUNIT("..\..\src\modules\filters\teirtf.cpp"); +USEUNIT("..\..\src\modules\texts\rawtext4\rawtext4.cpp"); +USEUNIT("..\..\src\modules\comments\rawcom4\rawcom4.cpp"); +USEUNIT("..\..\src\modules\common\rawverse4.cpp"); +USEUNIT("..\..\src\modules\filters\teihtmlhref.cpp"); +//--------------------------------------------------------------------------- +#define Library + +// To add a file to the library use the Project menu 'Add to Project'. + diff --git a/lib/bcppmake/libsword.bpr b/lib/bcppmake/libsword.bpr new file mode 100644 index 0000000..f7e7bd0 --- /dev/null +++ b/lib/bcppmake/libsword.bpr @@ -0,0 +1,301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=21 +Item0=..\..\src\modules\comments\rawcom4;..\..\src\modules\texts\rawtext4;..\..\src\modules\tests;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src;..\..\..\biblecs\apps\InstallMgr\curl\include +Item1=..\..\src\modules\tests;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src;..\..\..\biblecs\apps\InstallMgr\curl\include +Item2=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src;..\..\..\biblecs\apps\InstallMgr\curl\include +Item3=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src +Item4=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src +Item5=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n +Item6=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item7=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\include;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item8=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\include;..\..\apps\windoze\CBuilder5\InstallMgr;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item9=..\..\..\icu-sword\include;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item10=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item11=..\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item12=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n +Item13=..\..\apps\windoze;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n +Item14=..\..\apps\windoze;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n +Item15=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common +Item16=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item17=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item18=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item19=..\include;$(BCB)\include;$(BCB)\include\vcl +Item20=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=8 +Item0=..\..\src\modules\comments\rawcom4;..\..\src\modules\texts\rawtext4;..\..\src\modules\tests;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\src\modules\tests;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\apps\windoze;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item7=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=24 +Item0=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;CURLAVAILABLE;LUCENE_ENABLE_REFCOUNT +Item1=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;CURLAVAILABLE +Item2=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING +Item3=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;_DEBUG +Item4=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING +Item5=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;UNICODE +Item6=_UCS2;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING +Item7=_ASCII;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING +Item8=__ASCII;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING +Item9=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;LUCENE_DISABLE_MULTITHREADING;_WIN32;HAVE_DIRENT +Item10=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;LUCENE_DISABLE_MULTITHREADING;_WIN32;HAVE_DIRENT;_DEBUG +Item11=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;_DEBUG;USELUCENE;LUCENE_DISABLE_MULTITHREADING;_WIN32;HAVE_DIRENT +Item12=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;_DEBUG;USELUCENE +Item13=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item14=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0 +Item15=_ICU_;_ICUSWORD_;USBINARY;_DEBUG;U_HAVE_PLACEMENT_NEW=0 +Item16=_ICU_;_ICUSWORD_;USBINARY;_DEBUG +Item17=_ICU_;_ICUSWORD_;USBINARY +Item18=_ICU_;_ICUSWORD_;USBINARY;CURLAVAILABLE;_DEBUG +Item19=_ICU_;_ICUSWORD_;USBINARY;CURLAVAILABLE +Item20=;USBINARY;_DEBUG +Item21=_ICU_;_ICUSWORD_ +Item22=_ICU_;_ICUSWORD_;_DEBUG +Item23=_DEBUG + +[HistoryLists\hlFinalOutputDir] +Count=3 +Item0=..\ +Item1=../\ +Item2=../ + +[HistoryLists\hlTlibPageSize] +Count=5 +Item0=0x0200 +Item1=0x0080 +Item2=0x0040 +Item3=0x0020 +Item4=0x0010 + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + diff --git a/lib/bcppmake/libsword6icu.bpf b/lib/bcppmake/libsword6icu.bpf new file mode 100644 index 0000000..9cda1a9 --- /dev/null +++ b/lib/bcppmake/libsword6icu.bpf @@ -0,0 +1,124 @@ +//--------------------------------------------------------------------------- + +//#include +#pragma hdrstop +USEUNIT("..\..\src\keys\versekey.cpp"); +USEUNIT("..\..\src\keys\strkey.cpp"); +USEUNIT("..\..\src\keys\swkey.cpp"); +USEUNIT("..\..\src\keys\listkey.cpp"); +USEUNIT("..\..\src\mgr\swmgr.cpp"); +USEUNIT("..\..\src\mgr\localemgr.cpp"); +USEUNIT("..\..\src\mgr\swconfig.cpp"); +USEUNIT("..\..\src\mgr\swlocale.cpp"); +USEUNIT("..\..\src\mgr\filemgr.cpp"); +USEUNIT("..\..\src\utilfuns\utilstr.cpp"); +USEUNIT("..\..\src\utilfuns\utilconf.cpp"); +USEUNIT("..\..\src\utilfuns\Greek2Greek.cpp"); +USEUNIT("..\..\src\frontend\swlog.cpp"); +USEUNIT("..\..\src\frontend\swdisp.cpp"); +USEUNIT("..\..\src\modules\swmodule.cpp"); +USEUNIT("..\..\src\modules\comments\swcom.cpp"); +USEUNIT("..\..\src\modules\comments\hrefcom\hrefcom.cpp"); +USEUNIT("..\..\src\modules\comments\rawcom\rawcom.cpp"); +USEUNIT("..\..\src\modules\comments\rawfiles\rawfiles.cpp"); +USEUNIT("..\..\src\modules\common\lzsscomprs.cpp"); +USEUNIT("..\..\src\modules\common\rawstr.cpp"); +USEUNIT("..\..\src\modules\common\rawverse.cpp"); +USEUNIT("..\..\src\modules\common\sapphire.cpp"); +USEUNIT("..\..\src\modules\common\swcipher.cpp"); +USEUNIT("..\..\src\modules\common\swcomprs.cpp"); +USEUNIT("..\..\src\modules\filters\thmlrtf.cpp"); +USEUNIT("..\..\src\modules\filters\gbffootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\gbfhtml.cpp"); +USEUNIT("..\..\src\modules\filters\gbfplain.cpp"); +USEUNIT("..\..\src\modules\filters\gbfrtf.cpp"); +USEUNIT("..\..\src\modules\filters\gbfstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\gbfthml.cpp"); +USEUNIT("..\..\src\modules\filters\plainfootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\plainhtml.cpp"); +USEUNIT("..\..\src\modules\filters\rtfhtml.cpp"); +USEUNIT("..\..\src\modules\filters\rwphtml.cpp"); +USEUNIT("..\..\src\modules\filters\rwprtf.cpp"); +USEUNIT("..\..\src\modules\filters\thmlgbf.cpp"); +USEUNIT("..\..\src\modules\filters\thmlhtml.cpp"); +USEUNIT("..\..\src\modules\filters\thmlplain.cpp"); +USEUNIT("..\..\src\modules\filters\cipherfil.cpp"); +USEUNIT("..\..\src\modules\lexdict\swld.cpp"); +USEUNIT("..\..\src\modules\lexdict\rawld\rawld.cpp"); +USEUNIT("..\..\src\modules\texts\swtext.cpp"); +USEUNIT("..\..\src\modules\texts\rawtext\rawtext.cpp"); +USEUNIT("..\..\src\modules\texts\ztext\ztext.cpp"); +USEUNIT("..\..\src\modules\common\zverse.cpp"); +USEUNIT("..\..\src\keys\treekey.cpp"); +USEUNIT("..\..\src\keys\treekeyidx.cpp"); +USEUNIT("..\..\src\modules\common\rawstr4.cpp"); +USEUNIT("..\..\src\modules\common\zstr.cpp"); +USEUNIT("..\..\src\modules\genbook\swgenbook.cpp"); +USEUNIT("..\..\src\modules\genbook\rawgenbook\rawgenbook.cpp"); +USEUNIT("..\..\src\mgr\swfiltermgr.cpp"); +USEUNIT("..\..\src\modules\filters\utf8utf16.cpp"); +USEUNIT("..\..\src\modules\filters\gbfheadings.cpp"); +USEUNIT("..\..\src\modules\filters\gbfhtmlhref.cpp"); +USEUNIT("..\..\src\modules\filters\gbfmorph.cpp"); +USEUNIT("..\..\src\modules\filters\latin1utf16.cpp"); +USEUNIT("..\..\src\modules\filters\latin1utf8.cpp"); +USEUNIT("..\..\src\modules\filters\scsuutf8.cpp"); +USEUNIT("..\..\src\modules\filters\swbasicfilter.cpp"); +USEUNIT("..\..\src\modules\filters\thmlfootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\thmlheadings.cpp"); +USEUNIT("..\..\src\modules\filters\thmlhtmlhref.cpp"); +USEUNIT("..\..\src\modules\filters\thmllemma.cpp"); +USEUNIT("..\..\src\modules\filters\thmlmorph.cpp"); +USEUNIT("..\..\src\modules\filters\thmlscripref.cpp"); +USEUNIT("..\..\src\modules\filters\thmlstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\thmlvariants.cpp"); +USEUNIT("..\..\src\modules\filters\unicodertf.cpp"); +USEUNIT("..\..\src\modules\filters\utf16utf8.cpp"); +USEUNIT("..\..\src\modules\filters\utf8arshaping.cpp"); +USEUNIT("..\..\src\modules\filters\utf8bidireorder.cpp"); +USEUNIT("..\..\src\modules\filters\utf8cantillation.cpp"); +USEUNIT("..\..\src\modules\filters\utf8greekaccents.cpp"); +USEUNIT("..\..\src\modules\filters\utf8hebrewpoints.cpp"); +USEUNIT("..\..\src\modules\filters\utf8html.cpp"); +USEUNIT("..\..\src\modules\filters\utf8latin1.cpp"); +USEUNIT("..\..\src\modules\filters\utf8nfc.cpp"); +USEUNIT("..\..\src\modules\filters\utf8nfkd.cpp"); +USEUNIT("..\..\src\modules\filters\utf8transliterator.cpp"); +USEUNIT("..\..\src\modules\comments\zcom\zcom.cpp"); +USEUNIT("..\..\src\modules\lexdict\rawld4\rawld4.cpp"); +USEUNIT("..\..\src\modules\common\zipcomprs.cpp"); +USEUNIT("..\..\src\modules\lexdict\zld\zld.cpp"); +USEUNIT("..\..\src\modules\common\entriesblk.cpp"); +USEUNIT("..\..\src\utilfuns\zlib\zutil.c"); +USEUNIT("..\..\src\utilfuns\zlib\compress.c"); +USEUNIT("..\..\src\utilfuns\zlib\crc32.c"); +USEUNIT("..\..\src\utilfuns\zlib\deflate.c"); +USEUNIT("..\..\src\utilfuns\zlib\gzio.c"); +USEUNIT("..\..\src\utilfuns\zlib\infblock.c"); +USEUNIT("..\..\src\utilfuns\zlib\infcodes.c"); +USEUNIT("..\..\src\utilfuns\zlib\inffast.c"); +USEUNIT("..\..\src\utilfuns\zlib\inflate.c"); +USEUNIT("..\..\src\utilfuns\zlib\inftrees.c"); +USEUNIT("..\..\src\utilfuns\zlib\infutil.c"); +USEUNIT("..\..\src\utilfuns\zlib\trees.c"); +USEUNIT("..\..\src\utilfuns\zlib\uncompr.c"); +USEUNIT("..\..\src\utilfuns\zlib\untgz.c"); +USEUNIT("..\..\src\utilfuns\zlib\adler32.c"); +USEUNIT("..\..\src\modules\filters\greeklexattribs.cpp"); +USEUNIT("..\..\src\mgr\swcacher.cpp"); +USEUNIT("..\..\src\modules\filters\gbfosis.cpp"); +USEUNIT("..\..\src\modules\filters\thmlosis.cpp"); +USEUNIT("..\..\src\mgr\encfiltmgr.cpp"); +USEUNIT("..\..\src\mgr\markupfiltmgr.cpp"); +USEUNIT("..\..\src\utilfuns\roman.cpp"); +USEUNIT("..\..\src\mgr\swsourcemgr.cpp"); +USEUNIT("..\..\src\mgr\installmgr.cpp"); +USEUNIT("..\..\src\utilfuns\ftpparse.c"); +USEUNIT("..\..\src\modules\filters\osisstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\osismorph.cpp"); +USEUNIT("..\..\src\modules\filters\gbfredletterwords.cpp"); +//--------------------------------------------------------------------------- +#define Library + +// To add a file to the library use the Project menu 'Add to Project'. + diff --git a/lib/bcppmake/libsword6icu.bpr b/lib/bcppmake/libsword6icu.bpr new file mode 100644 index 0000000..2863040 --- /dev/null +++ b/lib/bcppmake/libsword6icu.bpr @@ -0,0 +1,350 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=15 +Item0=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n +Item1=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\include;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\include;..\..\apps\windoze\CBuilder5\InstallMgr;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\..\icu-sword\include;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item5=..\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item6=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n +Item7=..\..\apps\windoze;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n +Item8=..\..\apps\windoze;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n +Item9=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common +Item10=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item11=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item12=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item13=..\include;$(BCB)\include;$(BCB)\include\vcl +Item14=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\apps\windoze;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=9 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0 +Item2=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL +Item3=_ICU_;_ICUSWORD_;USBINARY +Item4=_ICU_;_ICUSWORD_;USBINARY;_DEBUG +Item5=;USBINARY;_DEBUG +Item6=_ICU_;_ICUSWORD_ +Item7=_ICU_;_ICUSWORD_;_DEBUG +Item8=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=..\..\obj +Item1=obj + +[HistoryLists\hlFinalOutputDir] +Count=3 +Item0=..\ +Item1=../\ +Item2=../ + +[HistoryLists\hlTlibPageSize] +Count=5 +Item0=0x0200 +Item1=0x0080 +Item2=0x0040 +Item3=0x0020 +Item4=0x0010 + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/lib/vcppmake/vc7.1/libsword.vcproj b/lib/vcppmake/vc7.1/libsword.vcproj new file mode 100644 index 0000000..8df55c5 --- /dev/null +++ b/lib/vcppmake/vc7.1/libsword.vcproj @@ -0,0 +1,5614 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/vcppmake/vc8/libsword.vcproj b/lib/vcppmake/vc8/libsword.vcproj new file mode 100644 index 0000000..a43c749 --- /dev/null +++ b/lib/vcppmake/vc8/libsword.vcproj @@ -0,0 +1,6934 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/locales.d/Makefile.am b/locales.d/Makefile.am new file mode 100644 index 0000000..e5b11f7 --- /dev/null +++ b/locales.d/Makefile.am @@ -0,0 +1,59 @@ +swlocaledir = $(top_srcdir)/locales.d + +localeDATA = $(swlocaledir)/*.conf + +# This is too messy, not sure if it really is necessary. +# +#localeDATA = $(swlocaledir)/abbr.conf +#localeDATA += $(swlocaledir)/af.conf +#localeDATA += $(swlocaledir)/bg_BG-cp1251.conf +#localeDATA += $(swlocaledir)/cs.conf +#localeDATA += $(swlocaledir)/da.conf +#localeDATA += $(swlocaledir)/de-utf8.conf +#localeDATA += $(swlocaledir)/de.conf +#localeDATA += $(swlocaledir)/de_abbrev.conf +#localeDATA += $(swlocaledir)/en_GB.conf +#localeDATA += $(swlocaledir)/es.conf +#localeDATA += $(swlocaledir)/et.conf +#localeDATA += $(swlocaledir)/et_abbr.conf +#localeDATA += $(swlocaledir)/fi.conf +#localeDATA += $(swlocaledir)/fr.conf +#localeDATA += $(swlocaledir)/hu.conf +#localeDATA += $(swlocaledir)/id.conf +#localeDATA += $(swlocaledir)/it.conf +#localeDATA += $(swlocaledir)/la.conf +#localeDATA += $(swlocaledir)/nl.conf +#localeDATA += $(swlocaledir)/no.conf +#localeDATA += $(swlocaledir)/pl.conf +#localeDATA += $(swlocaledir)/pt.conf +#localeDATA += $(swlocaledir)/pt_BR.conf +#localeDATA += $(swlocaledir)/ro.conf +#localeDATA += $(swlocaledir)/ru_RU-cp1251.conf +#localeDATA += $(swlocaledir)/ru_RU-koi8-r.conf +#localeDATA += $(swlocaledir)/sk.conf +#localeDATA += $(swlocaledir)/sl.conf +#localeDATA += $(swlocaledir)/uk_UA-cp1251.conf +#localeDATA += $(swlocaledir)/uk_UA-koi8-u.conf + +EXTRA_DIST += $(localeDATA) + +localedatadir = $(pkgdatadir)/locales.d + +installlocaleDATA: $(localeDATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(localedatadir) + @list='$(localeDATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(localedatadir)/$$f"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(localedatadir)/$$f; \ + done + +uninstalllocaleDATA: + @$(NORMAL_UNINSTALL) + @list='$(localeDATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(localedatadir)/$$f"; \ + rm -f $(DESTDIR)$(localedatadir)/$$f; \ + done + diff --git a/locales.d/abbr.conf b/locales.d/abbr.conf new file mode 100644 index 0000000..4207426 --- /dev/null +++ b/locales.d/abbr.conf @@ -0,0 +1,258 @@ +[Meta] +Name=abbr +Description=English abbreviations +Encoding=ASCII + +[Text] +Genesis=Gen +Exodus=Ex +Leviticus=Lev +Numbers=Num +Deuteronomy=Deut +Joshua=Josh +Judges=Judg +Ruth=Ruth +I Samuel=1Sam +II Samuel=2Sam +I Kings=1Kgs +II Kings=2Kgs +I Chronicles=1Chr +II Chronicles=2Chr +Ezra=Ezra +Nehemiah=Neh +Esther=Esth +Job=Job +Psalms=Pss +Proverbs=Prov +Ecclesiastes=Eccl +Song of Solomon=Song +Isaiah=Isa +Jeremiah=Jer +Lamentations=Lam +Ezekiel=Eze +Daniel=Dan +Hosea=Hos +Joel=Joel +Amos=Amos +Obadiah=Ob +Jonah=Jonah +Micah=Mic +Nahum=Nah +Habakkuk=Hab +Zephaniah=Zeph +Haggai=Hag +Zechariah=Zech +Malachi=Mal +Matthew=Mt +Mark=Mk +Luke=Lk +John=Jn +Acts=Acts +Romans=Rom +I Corinthians=1Cor +II Corinthians=2Cor +Galatians=Gal +Ephesians=Eph +Philippians=Php +Colossians=Col +I Thessalonians=1Thes +II Thessalonians=2Thes +I Timothy=1Tim +II Timothy=2Tim +Titus=Tit +Philemon=Phm +Hebrews=Heb +James=Jas +I Peter=1Pet +II Peter=2Pet +I John=1Jn +II John=2Jn +III John=3Jn +Jude=Jude +Revelation of John=Rev + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 diff --git a/locales.d/af-utf8.conf b/locales.d/af-utf8.conf new file mode 100644 index 0000000..b125aa6 --- /dev/null +++ b/locales.d/af-utf8.conf @@ -0,0 +1,325 @@ +[Meta] +Name=af +Description=Afrikaans (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Genesis +Exodus=Exodus +Leviticus=Levitikus +Numbers=Numeri +Deuteronomy=Deuteronomium +Joshua=Josua +Judges=Rigters +Ruth=Rut +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Konings +II Kings=2 Konings +I Chronicles=1 Kronieke +II Chronicles=2 Kronieke +Ezra=Esra +Nehemiah=Nehemia +Esther=Ester +Job=Job +Psalms=Psalms +Proverbs=Spreuke van Salomo +Ecclesiastes=Prediker +Song of Solomon=Hooglied van Salomo +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Klaagliedere van Jeremia +Ezekiel=Esegiël +Daniel=Daniël +Hosea=Hosea +Joel=Joël +Amos=Amos +Obadiah=Obadja +Jonah=Jona +Micah=Miga +Nahum=Nahum +Habakkuk=Habakuk +Zephaniah=Sefanja +Haggai=Haggai +Zechariah=Sagaria +Malachi=Maleagi +Matthew=Matteus +Mark=Markus +Luke=Lukas +John=Johannes +Acts=Handelinge +Romans=Romeine +I Corinthians=1 Korintiërs +II Corinthians=2 Korintiërs +Galatians=Galasiërs +Ephesians=Efesiërs +Philippians=Filipense +Colossians=Kolossense +I Thessalonians=1 Tessalonisense +II Thessalonians=2 Thessalonisense +I Timothy=1 Timoteus +II Timothy=2 Timoteus +Titus=Titus +Philemon=Filemon +Hebrews=Hebreërs +James=Jakobus +I Peter=1 Petrus +II Peter=2 Petrus +I John=1 Johannes +II John=2 Johannes +III John=3 Johannes +Jude=Judas +Revelation of John=Openbaring + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENESIS=1 +EXODUS=2 +LEVITIKUS=3 +NUMERI=4 +DEUTERONOMIUM=5 +JOSUA=6 +RIGTERS=7 +RUT=8 +1 SAMUEL=9 +2 SAMUEL=10 +1 KONINGS=11 +2 KONINGS=12 +1 KRONIEKE=13 +2 KRONIEKE=14 +ESRA=15 +NEHEMIA=16 +ESTER=17 +JOB=18 +PSALMS=19 +SPREUKE VAN SALOMO=20 +PREDIKER=21 +HOOGLIED VAN SALOMO=22 +JESAJA=23 +JEREMIA=24 +KLAAGLIEDERE VAN JEREMIA=25 +ESEGIËL=26 +DANIËL=27 +HOSEA=28 +JOËL=29 +AMOS=30 +OBADJA=31 +JONA=32 +MIGA=33 +NAHUM=34 +HABAKUK=35 +SEFANJA=36 +HAGGAI=37 +SAGARIA=38 +MALEAGI=39 +MATTEUS=40 +MARKUS=41 +LUKAS=42 +JOHANNES=43 +HANDELINGE=44 +ROMEINE=45 +1 KORINTIËRS=46 +2 KORINTIËRS=47 +GALASIËRS=48 +EFESIËRS=49 +FILIPENSE=50 +KOLOSSENSE=51 +1 TESSALONISENSE=52 +2 THESSALONISENSE=53 +1 TIMOTEUS=54 +2 TIMOTEUS=55 +TITUS=56 +FILEMON=57 +HEBREËRS=58 +JAKOBUS=59 +1 PETRUS=60 +2 PETRUS=61 +1 JOHANNES=62 +2 JOHANNES=63 +3 JOHANNES=64 +JUDAS=65 +OPENBARING=66 diff --git a/locales.d/af.conf b/locales.d/af.conf new file mode 100644 index 0000000..5b94fd1 --- /dev/null +++ b/locales.d/af.conf @@ -0,0 +1,602 @@ +[Meta] +Name=af +Description=Afrikaans +Encoding=ISO8859-1 + +[Text] +Genesis=Génesis +Exodus=Exodus +Leviticus=Levítikus +Numbers=Númeri +Deuteronomy=Deuteronómium +Joshua=Josua +Judges=Rigters +Ruth=Rut +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Konings +II Kings=2 Konings +I Chronicles=1 Kronieke +II Chronicles=2 Kronieke +Ezra=Esra +Nehemiah=Nehemía +Esther=Ester +Job=Job +Psalms=Psalms +Proverbs=Spreuke van Salomo +Ecclesiastes=Prediker +Song of Solomon=Hooglied van Salomo +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Klaagliedere van Jeremia +Ezekiel=Eségiël +Daniel=Daniël +Hosea=Hoséa +Joel=Joël +Amos=Amos +Obadiah=Obadja +Jonah=Jona +Micah=Miga +Nahum=Nahum +Habakkuk=Hábakuk +Zephaniah=Sefánja +Haggai=Haggai +Zechariah=Sagaria +Malachi=Maleági +Matthew=Matthéüs +Mark=Markus +Luke=Lukas +John=Johannes +Acts=Handelinge +Romans=Romeine +I Corinthians=1 Korinthiërs +II Corinthians=2 Korinthiërs +Galatians=Galásiërs +Ephesians=Efésiërs +Philippians=Filippense +Colossians=Kolossense +I Thessalonians=1 Thessalonicense +II Thessalonians=2 Thessalonicense +I Timothy=1 Timótheüs +I Timothy=2 Timótheüs +Titus=Titus +Philemon=Filémon +Hebrews=Hebreërs +James=Jakobus +I Peter=1 Petrus +II Peter=2 Petrus +I John=1 Johannes +II John=2 Johannes +III John=3 Johannes +Jude=Judas +Revelation of John=Openbaring   + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11   +1 KINGS=11   +1 PETER=60   +1 PTR=60   +1 SAMUEL=9   +1 THESSALONIANS=52   +1 TIMOTHY=54   +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11   +1PETER=60   +1PTR=60   +1SAMUEL=9   +1THESSALONIANS=52   +1TIMOTHY=54   +2 C=47   +2 CHRONICLES=14   +2 CORINTHIANS=47   +2 JN=63 +2 JOHN=63   +2 KGS=12   +2 KINGS=12   +2 PETER=61   +2 PTR=61   +2 SAMUEL=10   +2 THESSALONIANS=53   +2 TIMOTHY=55   +2C=47   +2CHRONICLES=14   +2CORINTHIANS=47   +2JN=63   +2JOHN=63   +2KGS=12 +2KINGS=12   +2PETER=61   +2PTR=61   +2SAMUEL=10   +2THESSALONIANS=53   +2TIMOTHY=55   +3 JN=64   +3 JOHN=64   +3JN=64   +3JOHN=64   +ACTS=44   +AMOS=30   +APOCALYPSE OF ST. JOHN=66   +C=51   +CANTICLE OF CANTICLES=22   +COC=22   +COLOSSIANS=51   +D=5   +DANIEL=27   +DEUTERONOMY=5   +E=49   +ECCLESIASTES=21   +EPHESIANS=49   +ESTER=17   +ESTHER=17   +EXODUS=2   +EZEKIEL=26   +EZRA=15   +G=1   +GALATIANS=48   +GENESIS=1   +H=58   +HABAKKUK=35   +HAGGAI=37   +HEBREWS=58   +HOSEA=28   +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11   +I PETER=60   +I PTR=60   +I SAMUEL=9   +I THESSALONIANS=52   +I TIMOTHY=54   +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47   +II CHRONICLES=14   +II CORINTHIANS=47   +II JN=63   +II JOHN=63   +II KGS=12 +II KINGS=12   +II PETER=61   +II PTR=61   +II SAMUEL=10   +II THESSALONIANS=53   +II TIMOTHY=55   +IIC=47   +IICHRONICLES=14   +IICORINTHIANS=47   +III JN=64   +III JOHN=64   +IIIJN=64   +IIIJOHN=64   +IIJN=63   +IIJOHN=63   +IIKGS=12 +IIKINGS=12   +IIPETER=61   +IIPTR=61   +IISAMUEL=10   +IITHESSALONIANS=53   +IITIMOTHY=55   +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11   +IPETER=60   +IPTR=60   +ISA=23   +ISAIAH=23   +ISAMUEL=9   +ITHESSALONIANS=52   +ITIMOTHY=54   +J=43   +JAMES=59   +JAS=59   +JEREMIAH=24   +JN=43   +JO=43   +JOB=18   +JOEL=29   +JOHN=43   +JONAH=32   +JOSHUA=6   +JUD=7   +JUDE=65   +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39   +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + + +GÉNESIS=1 +GENESIS=1 +GEN=1 +genesis=1 +gen=1 +EXODUS=2 +EX=2 +EXO=2 +EXOD=2 +ex=2 +exo=2 +exod=2 +LEVÍTIKUS=3 +LEVITIKUS=3 +LEV=3 +levitikus=3 +lev=3 +NÚMERI=4 +NUMERI=4 +NUM=4 +numeri=4 +num=4 +DEUTERONÓMIUM=5 +DEUTERONOMIUM=5 +DEUT=5 +DEU=5 +deuteronomium=5 +deut=5 +deu=5 +JOSUA=6 +JOS=6 +josua=6 +jos=6 +RIGTERS=7 +RIG=7 +rigters=7 +rig=7 +RUT=8 +rut=8 +1 SAMUEL=9 +1SAMUEL=9 +1 SAM=9 +1SAM=9 +1 samuel=9 +1samuel=9 +1 sam=9 +1sam=9 +2 SAMUEL=10 +2SAMUEL=10 +2 SAM=10 +2SAM=10 +2 samuel=10 +2samuel=10 +2 sam=10 +2sam=10 +1 KONINGS=11 +1KONINGS=11 +1 KON=11 +1KON=11 +1 konings=11 +1konings=11 +1 kon=11 +1kon=11 +2 KONINGS=12 +2KONINGS=12 +2 KON=12 +2KON=12 +2 konings=12 +2konings=12 +2 kon=12 +2kon=12 +1 KRONIEKE=13 +1KRONIEKE=13 +1 KRON=13 +1KRON=13 +1 kronieke=13 +1kronieke=13 +1 kron=13 +1kron=13 +2 KRONIEKE=14 +2KRONIEKE=14 +2 KRON=14 +2KRON=14 +2 kronieke=14 +2kronieke=14 +2 kron=14 +2kron=14 +ESRA=15 +esra=15 +NEHEMÍA=16 +NEHEMIA=16 +NEH=16 +nehemia=16 +neh=16 +ESTER=17 +EST=17 +ester=17 +est=17 +JOB=18 +job=18 +PSALMS=19 +PS=19 +psalms=19 +ps=19 +SPREUKE VAN SALOMO=20 +SPREUKE=20 +spreuke=20 +PREDIKER=21 +PRED=21 +prediker=21 +pred=21 +HOOGLIED VAN SALOMO=22 +HOOGLIED=22 +hooglied=22 +JESAJA=23 +JES=23 +jesaja=23 +jes=23 +JEREMIA=24 +JER=24 +jeremia=24 +jer=24 +KLAAGLIEDERE VAN JEREMIA=25 +KLAAGLIEDERE=25 +KLAAGL=25 +klaaglieder=25 +klaagl=25 +ESÉGIËL=26 +ESEGIEL=26 +ESE=26 +esegiel=26 +ese=26 +DANIËL=27 +DANIEL=27 +DAN=27 +daniel=27 +daniël=27 +dan=27 +HOSÉA=28 +HOSEA=28 +HOS=28 +hosea=28 +hos=28 +JOËL=29 +JOEL=29 +joël=29 +joel=29 +AMOS=30 +amos=30 +OBADJA=31 +OBAD=31 +obadja=31 +obad=31 +JONA=32 +jona=32 +MIGA=33 +miga=33 +NAHUM=34 +NAH=34 +nahum=34 +nah=34 +HÁBAKUK=35 +HABAKUK=35 +HAB=35 +habakuk=35 +hab=35 +SEFÁNJA=36 +SEFANJA=36 +SEF=36 +sefanja=36 +sef=36 +HAGGAI=37 +HAG=37 +haggai=37 +hag=37 +SAGARIA=38 +SAG=38 +sagaria=38 +sag=38 +MALEÁGI=39 +MALEAGI=39 +MAL=39 +maleagi=39 +mal=39 +MATTHÉÜS=40 +MATTHEUS=40 +MAT=40 +mattheus=40 +mat=40 +MARKUS=41 +MARK=41 +MAR=41 +markus=41 +mark=41 +mar=41 +LUKAS=42 +LUK=42 +lukas=42 +LUK=42 +JOHANNES=43 +JOH=43 +johannes=43 +joh=43 +HANDELINGE=44 +HAND=44 +handelinge=44 +hand=44 +ROMEINE=45 +ROM=45 +romeine=45 +rom=45 +1 KORINTHIËRS=46 +1 KORINTHIERS=46 +1 KOR=46 +1KORINTHIERS=46 +1KOR=46 +1 korinthiërs=46 +1 korinthiers=46 +1korinthiers=46 +2 KORINTHIËRS=47 +2 KORINTHIERS=47 +2 KOR=47 +2KORINTHIERS=47 +2KOR=47 +2 korinthiërs=47 +2 korinthiers=47 +2korinthiers=47 +GALÁSIËRS=48 +GALASIERS=48 +GAL=48 +galasiers=48 +gal=48 +EFÉSIËRS=49 +EFESIERS=49 +EF=49 +efesiers=49 +ef=49 +FILIPPENSE=50 +FIL=50 +filipense=50 +fil=50 +KOLOSSENSE=51 +KOL=51 +kolossense=51 +kol=51 +1 THESSALONICENSE=52 +1THESSALONICENSE=52 +1THES=52 +1 thessalonicense=52 +1thessalonicense=52 +1thes=52 +2 THESSALONICENSE=53 +2THESSALONICENSE=53 +2THES=53 +2 thessalonicense=53 +2thessalonicense=53 +2thes=53 +1 TIMÓTHEÜS=54 +1 TIMOTHEUS=54 +1TIMOTHEUS=54 +1TIM=54 +1 timótheüs=54 +1 timotheus=54 +1timotheus=54 +1tim=54 +2 TIMÓTHEÜS=55 +2 TIMOTHEUS=55 +2TIMOTHEUS=55 +2TIM=55 +2 timótheüs=55 +2 timotheus=55 +2timotheus=55 +2tim=55 +TITUS=56 +TIT=56 +titus=56 +tit=56 +FILÉMON=57 +FILEMON=57 +FIL=57 +filemon=57 +fil=57 +HEBREËRS=58 +HEBREERS=58 +HEB=58 +hebreërs=58 +hebreers=58 +heb=58 +JAKOBUS=59 +JAK=59 +jakobus=59 +jak=59 +1 PETRUS=60 +1PETRUS=60 +1 PET=60 +1PET=60 +1 petrus=60 +1petrus=60 +1 pet=60 +1pet=60 +2 PETRUS=61 +2PETRUS=61 +2 PET=61 +2PET=61 +2 petrus=61 +2petrus=61 +2 pet=61 +2pet=61 +1 JOHANNES=62 +1JOHANNES=62 +1 JOH=62 +1JOH=62 +1 johannes=62 +1johannes=62 +1 joh=62 +1joh=62 +2 JOHANNES=63 +2JOHANNES=63 +2 JOH=63 +2JOH=63 +2 johannes=63 +2johannes=63 +2 joh=63 +2joh=63 +3 JOHANNES=64 +3JOHANNES=64 +3 JOH=64 +3JOH=64 +3 johannes=64 +3johannes=64 +3 joh=64 +3joh=64 +JUDAS=64 +JUD=64 +judas=64 +jud=64 +OPENBARING=66 +OPEN=66 +OP=66 +openbaring=66 +open=66 +op=66 \ No newline at end of file diff --git a/locales.d/ar_EG-cp1256.conf b/locales.d/ar_EG-cp1256.conf new file mode 100644 index 0000000..839285e --- /dev/null +++ b/locales.d/ar_EG-cp1256.conf @@ -0,0 +1,325 @@ +[Meta] +Name=ar_EG +Description=Arabic (EG) +Encoding=CP1256 + +[Text] +Genesis=Êßæíä +Exodus=ÎÑæÌ +Leviticus=áÇæííä +Numbers=ÚÏÏ +Deuteronomy=ÊËäíÉ +Joshua=íÔæÚ +Judges=ÞÖÇå +Ruth=ÑÇÚæË +I Samuel=ÕãæÇÆíá ÇáÇæá +II Samuel=ÕãæÇÆíá ÇáËÇäí +I Kings=ãáæß ÇáÇæá +II Kings=ãáæß ÇáËÇäí +I Chronicles=ÃÎÈÇÑ ÇáÃíÇã ÇáÃæá +II Chronicles= ÃÎÈÇÑ ÇáÃíÇã ÇáËÇäí +Ezra=ÚÒÑÇ +Nehemiah=äÍãíÇ +Esther=ÃÓÊíÑ +Job=ÃíæÈ +Psalms=ãÒÇãíÑ +Proverbs=ÃãËÇá +Ecclesiastes=ÇáÌÇãÚÉ +Song of Solomon=äÔíÏ ÇáÃäÔÇÏ +Isaiah=ÃÔÚíÇÁ +Jeremiah=ÃÑãíÇ +Lamentations=ãÑÇËí ÃÑãíÇ +Ezekiel=ÍÒÞíÇá +Daniel=ÏÇäíÇá +Hosea=åæÔÚ +Joel=íæÆíá +Amos=ÚÇãæÓ +Obadiah=ÚæÈÏíÇ +Jonah=íæäÇä +Micah=ãíÎÇ +Nahum=äÇÍæã +Habakkuk=ÍÈÞæÞ +Zephaniah=ÕÝäíÇ +Haggai=ÍÌí +Zechariah=ÒßÑíÇ +Malachi=ãáÇÎí +Matthew=ãÊí +Mark=ãÑÞÓ +Luke=áæÞÇ +John=íæÍäÇ +Acts=ÃÚãÇá ÇáÑÓá +Romans=ÑæãíÉ +I Corinthians=ßæÑäËæÓ ÇáÃæáì +II Corinthians=ßæÑäËæÓ ÇáËÇäíÉ +Galatians=ÛáÇØíÉ +Ephesians=ÇÝÓÓ +Philippians=ÝíáÈì +Colossians=ßæáæÓí +I Thessalonians=ÊÓÇáæäíßì ÇáÃæáì +II Thessalonians=ÊÓÇáæäíßì ÇáËÇäíÉ +I Timothy=ÊíãæËÇæÓ ÇáÃæáì +II Timothy=ÊíãæËÇæÓ ÇáËÇäíÉ +Titus=ÊíØÓ +Philemon=Ýíáãæä +Hebrews=ÇáÚÈÑÇäííä +James=íÚÞæÈ +I Peter=ÈØÑÓ ÇáÃæáì +II Peter=ÈØÑÓ ÇáËÇäíÉ +I John=íæÍäÇ ÇáÃæáì +II John=íæÍäÇ ÇáËÇäíÉ +III John=íæÍäÇ ÇáËÇáËÉ +Jude=íåæÐÇ +Revelation of John=ÇáÑÄíÇ + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +Êßæíä=1 +ÎÑæÌ=2 +áÇæííä=3 +ÚÏÏ=4 +ÊËäíÉ=5 +íÔæÚ=6 +ÞÖÇå=7 +ÑÇÚæË=8 +ÕãæÇÆíá ÇáÇæá=9 +ÕãæÇÆíá ÇáËÇäí=10 +ãáæß ÇáÇæá=11 +ãáæß ÇáËÇäí=12 +ÃÎÈÇÑ ÇáÃíÇã ÇáÃæá=13 +ÃÎÈÇÑ ÇáÃíÇã ÇáËÇäí=14 +ÚÒÑÇ=15 +äÍãíÇ=16 +ÃÓÊíÑ=17 +ÃíæÈ=18 +ãÒÇãíÑ=19 +ÃãËÇá=20 +ÇáÌÇãÚÉ=21 +äÔíÏ ÇáÃäÔÇÏ=22 +ÃÔÚíÇÁ=23 +ÃÑãíÇ=24 +ãÑÇËí ÃÑãíÇ=25 +ÍÒÞíÇá=26 +ÏÇäíÇá=27 +åæÔÚ=28 +íæÆíá=29 +ÚÇãæÓ=30 +ÚæÈÏíÇ=31 +íæäÇä=32 +ãíÎÇ=33 +äÇÍæã=34 +ÍÈÞæÞ=35 +ÕÝäíÇ=36 +ÍÌí=37 +ÒßÑíÇ=38 +ãáÇÎí=39 +ãÊí=40 +ãÑÞÓ=41 +áæÞÇ=42 +íæÍäÇ=43 +ÃÚãÇá ÇáÑÓá=44 +ÑæãíÉ=45 +ßæÑäËæÓ ÇáÃæáì=46 +ßæÑäËæÓ ÇáËÇäíÉ=47 +ÛáÇØíÉ=48 +ÇÝÓÓ=49 +ÝíáÈì=50 +ßæáæÓí=51 +ÊÓÇáæäíßì ÇáÃæáì=52 +ÊÓÇáæäíßì ÇáËÇäíÉ=53 +ÊíãæËÇæÓ ÇáÃæáì=54 +ÊíãæËÇæÓ ÇáËÇäíÉ=55 +ÊíØÓ=56 +Ýíáãæä=57 +ÇáÚÈÑÇäííä=58 +íÚÞæÈ=59 +ÈØÑÓ ÇáÃæáì=60 +ÈØÑÓ ÇáËÇäíÉ=61 +íæÍäÇ ÇáÃæáì=62 +íæÍäÇ ÇáËÇäíÉ=63 +íæÍäÇ ÇáËÇáËÉ=64 +íåæÐÇ=65 +ÇáÑÄíÇ=66 \ No newline at end of file diff --git a/locales.d/ar_EG-utf8.conf b/locales.d/ar_EG-utf8.conf new file mode 100644 index 0000000..b937ab2 --- /dev/null +++ b/locales.d/ar_EG-utf8.conf @@ -0,0 +1,326 @@ + +[Meta] +Name=ar_EG +Description=Arabic (EG, Unicode) +Encoding=UTF-8 + +[Text] +Genesis=تكوين +Exodus=خروج +Leviticus=لاويين +Numbers=عدد +Deuteronomy=تثنية +Joshua=يشوع +Judges=قضاه +Ruth=راعوث +I Samuel=صموائيل الاول +II Samuel=صموائيل الثاني +I Kings=ملوك الاول +II Kings=ملوك الثاني +I Chronicles=أخبار الأيام الأول +II Chronicles= أخبار الأيام الثاني +Ezra=عزرا +Nehemiah=نحميا +Esther=أستير +Job=أيوب +Psalms=مزامير +Proverbs=أمثال +Ecclesiastes=الجامعة +Song of Solomon=نشيد الأنشاد +Isaiah=أشعياء +Jeremiah=أرميا +Lamentations=مراثي أرميا +Ezekiel=حزقيال +Daniel=دانيال +Hosea=هوشع +Joel=يوئيل +Amos=عاموس +Obadiah=عوبديا +Jonah=يونان +Micah=ميخا +Nahum=ناحوم +Habakkuk=حبقوق +Zephaniah=صÙنيا +Haggai=حجي +Zechariah=زكريا +Malachi=ملاخي +Matthew=متي +Mark=مرقس +Luke=لوقا +John=يوحنا +Acts=أعمال الرسل +Romans=رومية +I Corinthians=كورنثوس الأولى +II Corinthians=كورنثوس الثانية +Galatians=غلاطية +Ephesians=اÙسس +Philippians=Ùيلبى +Colossians=كولوسي +I Thessalonians=تسالونيكى الأولى +II Thessalonians=تسالونيكى الثانية +I Timothy=تيموثاوس الأولى +II Timothy=تيموثاوس الثانية +Titus=تيطس +Philemon=Ùيلمون +Hebrews=العبرانيين +James=يعقوب +I Peter=بطرس الأولى +II Peter=بطرس الثانية +I John=يوحنا الأولى +II John=يوحنا الثانية +III John=يوحنا الثالثة +Jude=يهوذا +Revelation of John=الرؤيا + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +تكوين=1 +خروج=2 +لاويين=3 +عدد=4 +تثنية=5 +يشوع=6 +قضاه=7 +راعوث=8 +صموائيل الاول=9 +صموائيل الثاني=10 +ملوك الاول=11 +ملوك الثاني=12 +أخبار الأيام الأول=13 +أخبار الأيام الثاني=14 +عزرا=15 +نحميا=16 +أستير=17 +أيوب=18 +مزامير=19 +أمثال=20 +الجامعة=21 +نشيد الأنشاد=22 +أشعياء=23 +أرميا=24 +مراثي أرميا=25 +حزقيال=26 +دانيال=27 +هوشع=28 +يوئيل=29 +عاموس=30 +عوبديا=31 +يونان=32 +ميخا=33 +ناحوم=34 +حبقوق=35 +صÙنيا=36 +حجي=37 +زكريا=38 +ملاخي=39 +متي=40 +مرقس=41 +لوقا=42 +يوحنا=43 +أعمال الرسل=44 +رومية=45 +كورنثوس الأولى=46 +كورنثوس الثانية=47 +غلاطية=48 +اÙسس=49 +Ùيلبى=50 +كولوسي=51 +تسالونيكى الأولى=52 +تسالونيكى الثانية=53 +تيموثاوس الأولى=54 +تيموثاوس الثانية=55 +تيطس=56 +Ùيلمون=57 +العبرانيين=58 +يعقوب=59 +بطرس الأولى=60 +بطرس الثانية=61 +يوحنا الأولى=62 +يوحنا الثانية=63 +يوحنا الثالثة=64 +يهوذا=65 +الرؤيا=66 \ No newline at end of file diff --git a/locales.d/bg_BG-cp1251.conf b/locales.d/bg_BG-cp1251.conf new file mode 100644 index 0000000..a15abf8 --- /dev/null +++ b/locales.d/bg_BG-cp1251.conf @@ -0,0 +1,404 @@ +# Bulgarian BIBLE +# ÁÈÁËÈß ÈËÈ ÑÂÅÙÅÍÎÒÎ ÏÈÑÀÍÈÅ ÍÀ ÑÒÀÐÈß È ÍÎÂÈß ÇÀÂÅÒ. +# Andrew Ivanov andrew@hacker.bg + +[Meta] +Name=bg_BG-cp1251 +Description=Bulgarian +Encoding=CP1251 + +[Text] +Genesis=Áèòèå +Exodus=Èçõîä +Leviticus=Ëåâèò +Numbers=×èñëà +Deuteronomy=Âòîðîçàêîíèå +Joshua=Èñóñ Íàâèí +Judges=Ñúäèè +Ruth=Ðóò +I Samuel=1 Êíèãà íà Öàðåòå +II Samuel=2 Kíèãà íà Öàðåòå +I Kings=3 Êíèãà íà Öàðåòå +II Kings=4 Êíèãà íà Öàðåòå +I Chronicles=1 Êíèãà íà Ëåòîïèñèòå +II Chronicles=2 Êíèãà íà Ëåòîïèñèòå +Ezra=Åçäðà +Nehemiah=Íååìèÿ +Esther=Åñòèð +Job=Éîâ +Psalms=Ïñàëìè +Proverbs=Ïðèò÷è +Ecclesiastes=Åêëèñèàñò +Song of Solomon=Ïåñåí íà Ïåñíèòå +Isaiah=Èñàÿ +Jeremiah=Éåðåìèÿ +Lamentations=Ïëà÷úò íà Éåðåìèÿ +Ezekiel=Éåçåêèë +Daniel=Äàíèèë +Hosea=Îñèÿ +Joel=Éîèë +Amos=Àìîñ +Obadiah=Àâäèé +Jonah=Éîíà +Micah=Ìèõåé +Nahum=Íàóì +Habakkuk=Àâàêóì +Zephaniah=Ñîôîíèÿ +Haggai=Àãåé +Zechariah=Çàõàðèÿ +Malachi=Ìàëàõèÿ +Matthew=Ìàòåé +Mark=Ìàðêî +Luke=Ëóêà +John=Éîàí +Acts=Äåÿíèÿ íà Àïîñòîëèòå +Romans=Ðèìëÿíè +I Corinthians=1 Êîðèíòÿíè +II Corinthians=2 Êîðèíòÿíè +Galatians=Ãàëàòÿíè +Ephesians=Åôåñÿíè +Philippians=Ôèëèïÿíè +Colossians=Êîëîñÿíè +I Thessalonians=1 Ñîëóíöè +II Thessalonians=2 Ñîëóíöè +I Timothy=1 Òèìîòåé +II Timothy=2 Òèìîòåé +Titus=Òèò +Philemon=Ôèëèìîí +Hebrews=Åâðåè +James=ßêîâ +I Peter=1 Ïåòðîâî +II Peter=2 Ïåòðîâî +I John=1 Éîàíîâî +II John=2 Éîàíîâî +III John=3 Éîàíîâî +Jude=Þäà +Revelation of John=Îòêðîâåíèåòî íà Éîàí + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +Áèòèå=1 +Áèò=1 + +Èçõîä=2 +Èçõ=2 + +Ëåâèò=3 + +×èñëà=4 + +Âòîðîçàêîíèå=5 + +Èñóñ Íàâèí=6 + +Ñúäèè=7 + +Ðóò=8 + +1 Êíèãà íà Öàðåòå=9 +1 Öàðå=9 + +2 Kíèãà íà Öàðåòå=10 +2 Öàðå=10 + +3 Êíèãà íà Öàðåòå=11 +3 Öàðå=11 + +4 Êíèãà íà Öàðåòå=12 +4 Öàðå=12 + +1 Êíèãà íà Ëåòîïèñèòå=13 +1 Ëåòîïèñè=13 + +2 Êíèãà íà Ëåòîïèñèòå=14 +2 Ëåòîïèñè=14 + +Åçäðà=15 + +Íååìèÿ=16 + +Åñòèð=17 + +Éîâ=18 + +Ïñàëìè=19 + +Ïðèò÷è=20 + +Åêëèñèàñò=21 + +Ïåñåí íà Ïåñíèòå=22 + +Èñàÿ=23 + +Éåðåìèÿ=24 + +Ïëà÷úò íà Éåðåìèÿ=25 + +Éåçåêèë=26 + +Äàíèèë=27 + +Îñèÿ=28 + +Éîèë=29 + +Àìîñ=30 + +Àâäèé=31 + +Éîíà=32 + +Ìèõåé=33 + +Íàóì=34 + +Àâàêóì=35 + +Ñîôîíèÿ=36 + +Àãåé=37 + +Çàõàðèÿ=38 + +Ìàëàõèÿ=39 + +Ìàòåé=40 + +Ìàðêî=41 + +Ëóêà=42 + +Éîàí=43 + +Äåÿíèÿ íà Àïîñòîëèòå=44 +Äåÿíèÿ=44 + +Ðèìëÿíè=45 + +1 Êîðèíòÿíè=46 + +2 Êîðèíòÿíè=47 + +Ãàëàòÿíè=48 + +Åôåñÿíè=49 + +Ôèëèïÿíè=50 + +Êîëîñÿíè=51 + +1 Ñîëóíöè=52 + +2 Ñîëóíöè=53 + +1 Òèìîòåé=54 + +2 Òèìîòåé=55 + +Òèò=56 + +Ôèëèìîí=57 + +Åâðåè=58 + +ßêîâ=59 + +1 Ïåòðîâî=60 + +2 Ïåòðîâî=61 + +1 Éîàíîâî=62 + +2 Éîàíîâî=63 + +3 Éîàíîâî=64 + +Þäà=65 + +Îòêðîâåíèåòî íà Éîàí=66 +Îòêðîâåíèå=66 diff --git a/locales.d/bg_BG-utf8.conf b/locales.d/bg_BG-utf8.conf new file mode 100644 index 0000000..122925f --- /dev/null +++ b/locales.d/bg_BG-utf8.conf @@ -0,0 +1,404 @@ +# Bulgarian BIBLE +# БИБЛИЯ ИЛИ СВЕЩЕÐОТО ПИСÐÐИЕ ÐРСТÐРИЯ И ÐОВИЯ ЗÐВЕТ. +# Andrew Ivanov andrew@hacker.bg + +[Meta] +Name=bg +Description=Bulgarian (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Битие +Exodus=Изход +Leviticus=Левит +Numbers=ЧиÑла +Deuteronomy=Второзаконие +Joshua=ИÑÑƒÑ Ðавин +Judges=Съдии +Ruth=Рут +I Samuel=1 Книга на Царете +II Samuel=2 Kнига на Царете +I Kings=3 Книга на Царете +II Kings=4 Книга на Царете +I Chronicles=1 Книга на ЛетопиÑите +II Chronicles=2 Книга на ЛетопиÑите +Ezra=Ездра +Nehemiah=ÐÐµÐµÐ¼Ð¸Ñ +Esther=ЕÑтир +Job=Йов +Psalms=ПÑалми +Proverbs=Притчи +Ecclesiastes=ЕклиÑиаÑÑ‚ +Song of Solomon=ПеÑен на ПеÑните +Isaiah=ИÑÐ°Ñ +Jeremiah=Ð™ÐµÑ€ÐµÐ¼Ð¸Ñ +Lamentations=Плачът на Ð™ÐµÑ€ÐµÐ¼Ð¸Ñ +Ezekiel=Йезекил +Daniel=Даниил +Hosea=ОÑÐ¸Ñ +Joel=Йоил +Amos=ÐÐ¼Ð¾Ñ +Obadiah=Ðвдий +Jonah=Йона +Micah=Михей +Nahum=Ðаум +Habakkuk=Ðвакум +Zephaniah=Ð¡Ð¾Ñ„Ð¾Ð½Ð¸Ñ +Haggai=Ðгей +Zechariah=Ð—Ð°Ñ…Ð°Ñ€Ð¸Ñ +Malachi=ÐœÐ°Ð»Ð°Ñ…Ð¸Ñ +Matthew=Матей +Mark=Марко +Luke=Лука +John=Йоан +Acts=ДеÑÐ½Ð¸Ñ Ð½Ð° ÐпоÑтолите +Romans=РимлÑни +I Corinthians=1 КоринтÑни +II Corinthians=2 КоринтÑни +Galatians=ГалатÑни +Ephesians=ЕфеÑÑни +Philippians=ФилипÑни +Colossians=КолоÑÑни +I Thessalonians=1 Солунци +II Thessalonians=2 Солунци +I Timothy=1 Тимотей +II Timothy=2 Тимотей +Titus=Тит +Philemon=Филимон +Hebrews=Евреи +James=Яков +I Peter=1 Петрово +II Peter=2 Петрово +I John=1 Йоаново +II John=2 Йоаново +III John=3 Йоаново +Jude=Юда +Revelation of John=Откровението на Йоан + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +Битие=1 +Бит=1 + +Изход=2 +Изх=2 + +Левит=3 + +ЧиÑла=4 + +Второзаконие=5 + +ИÑÑƒÑ Ðавин=6 + +Съдии=7 + +Рут=8 + +1 Книга на Царете=9 +1 Царе=9 + +2 Kнига на Царете=10 +2 Царе=10 + +3 Книга на Царете=11 +3 Царе=11 + +4 Книга на Царете=12 +4 Царе=12 + +1 Книга на ЛетопиÑите=13 +1 ЛетопиÑи=13 + +2 Книга на ЛетопиÑите=14 +2 ЛетопиÑи=14 + +Ездра=15 + +ÐеемиÑ=16 + +ЕÑтир=17 + +Йов=18 + +ПÑалми=19 + +Притчи=20 + +ЕклиÑиаÑÑ‚=21 + +ПеÑен на ПеÑните=22 + +ИÑаÑ=23 + +ЙеремиÑ=24 + +Плачът на ЙеремиÑ=25 + +Йезекил=26 + +Даниил=27 + +ОÑиÑ=28 + +Йоил=29 + +ÐмоÑ=30 + +Ðвдий=31 + +Йона=32 + +Михей=33 + +Ðаум=34 + +Ðвакум=35 + +СофониÑ=36 + +Ðгей=37 + +ЗахариÑ=38 + +МалахиÑ=39 + +Матей=40 + +Марко=41 + +Лука=42 + +Йоан=43 + +ДеÑÐ½Ð¸Ñ Ð½Ð° ÐпоÑтолите=44 +ДеÑниÑ=44 + +РимлÑни=45 + +1 КоринтÑни=46 + +2 КоринтÑни=47 + +ГалатÑни=48 + +ЕфеÑÑни=49 + +ФилипÑни=50 + +КолоÑÑни=51 + +1 Солунци=52 + +2 Солунци=53 + +1 Тимотей=54 + +2 Тимотей=55 + +Тит=56 + +Филимон=57 + +Евреи=58 + +Яков=59 + +1 Петрово=60 + +2 Петрово=61 + +1 Йоаново=62 + +2 Йоаново=63 + +3 Йоаново=64 + +Юда=65 + +Откровението на Йоан=66 +Откровение=66 diff --git a/locales.d/cs-utf8.conf b/locales.d/cs-utf8.conf new file mode 100644 index 0000000..185af03 --- /dev/null +++ b/locales.d/cs-utf8.conf @@ -0,0 +1,462 @@ +# +# Czech Bible books for Sword. +# +# 2000/04/12. (c) Petr@Kristof.CZ, GNU GPL 2.0. +# +# Notice: the locales name of czech language is CS, not CZ. +# CZ is shortcut name of state (Czech Republic). +# +# Notice: For correct czech environment you must set locales to "cs_CZ" +# +# Notice: Names and abbreviations are in compliance with authority +# A. Novotný: Biblický slovník (1967). +# + +[Meta] +Name=cs +Description=Czech (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Genesis +Exodus=Exodus +Leviticus=Leviticus +Numbers=Numeri +Deuteronomy=Deuteronomium +Joshua=Jozue +Judges=Soudců +Ruth=Rut +I Samuel=1. Samuelova +II Samuel=2. Samuelova +I Kings=1. Královská +II Kings=2. Královská +I Chronicles=1. Paralipomenon +II Chronicles=2. Paralipomenon +Ezra=Ezdráš +Nehemiah=Nehemiáš +Esther=Ester +Job=Job +Psalms=Žalmy +Proverbs=Přísloví +Ecclesiastes=Kazatel +Song of Solomon=Píseň Å alomounova +Isaiah=Izaiáš +Jeremiah=Jeremiáš +Lamentations=PlÃ¡Ä Jeremiášův +Ezekiel=Ezechiel +Daniel=Daniel +Hosea=Ozeáš +Joel=Joel +Amos=Amos +Obadiah=Abdiáš +Jonah=Jonáš +Micah=Micheáš +Nahum=Nahum +Habakkuk=Abakuk +Zephaniah=Sofoniáš +Haggai=Aggeus +Zechariah=Zachariáš +Malachi=Malachiáš +Matthew=MatouÅ¡ +Mark=Marek +Luke=Lukáš +John=Jan +Acts=Skutky +Romans=Římanům +I Corinthians=1. Korintským +II Corinthians=2. Korintským +Galatians=Galatským +Ephesians=Efezským +Philippians=Filipenským +Colossians=Kolossenským +I Thessalonians=1. Tessalonicenským +II Thessalonians=2. Tessalonicenským +I Timothy=1. Timoteovi +II Timothy=2. Timoteovi +Titus=Titovi +Philemon=Filemonovi +Hebrews=Židům +James=Jakub +I Peter=1. Petrova +II Peter=2. Petrova +I John=1. Janova +II John=2. Janova +III John=3. Janova +Jude=Juda +Revelation of John=Zjevení + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENESIS=1 +GN=1 +EXODUS=2 +EX=2 +LEVITICUS=3 +LV=3 +NUMERI=4 +NU=4 +DEUTERONOMIUM=5 +DT=5 +JOZUE=6 +JOZ=6 +SOUDCÅ®=7 +SD=7 +RUT=8 +RT=8 + +1. SAMUELOVA=9 +1 SAMUELOVA=9 +1SAMUELOVA=9 +1S=9 + +2. SAMUELOVA=10 +2 SAMUELOVA=10 +2SAMUELOVA=10 +2S=10 + +1. KRÃLOVSKÃ=11 +1 KRÃLOVSKÃ=11 +1KRÃLOVSKÃ=11 +1KR=11 + +2. KRÃLOVSKÃ=12 +2 KRÃLOVSKÃ=12 +2KRÃLOVSKÃ=12 +2KR=12 + +1. PARALIPOMENON=13 +1 PARALIPOMENON=13 +1PARALIPOMENON=13 +1PA=13 + +2. PARALIPOMENON=14 +2 PARALIPOMENON=14 +2PARALIPOMENON=14 +2PA=14 + +EZDRÃÅ =15 +EZD=15 +NEHEMIÃÅ =16 +NEH=16 +ESTER=17 +EST=17 +JOB=18 +JB=18 +ŽALMY=19 +Ž=19 +PŘÃSLOVÃ=20 +PŘ=20 +KAZATEL=21 +KAZ=21 +PÃSEŇ Å ALOMOUNOVA=22 +PÃSEŇ Å ALAMOUNOVA=22 +PÃS=22 +IZAIÃÅ =23 +IZ=23 +JEREMIÃÅ =24 +JR=24 +PLÃÄŒ JEREMIÃÅ Å®V=25 +PL=25 +EZECHIEL=26 +EZ=26 +DANIEL=26 +DN=27 +OZEÃÅ =28 +OZ=28 +JOEL=29 +JL=29 +AMOS=30 +AM=30 +ABDIÃÅ =31 +ABD=31 +JONÃÅ =32 +JON=32 +MICHEÃÅ =33 +MI=33 +NAHUM=34 +NA=34 +ABAKUK=35 +AB=35 +SOFONIÃÅ =36 +SF=36 +AGGEUS=37 +AG=37 +ZACHARIÃÅ =38 +ZA=38 +MALACHIÃÅ =39 +MAL=39 +MATOUÅ =40 +MT=40 +MAREK=41 +MK=41 +LUKÃÅ =42 +LK=42 +L=42 +JAN=43 +J=43 +SKUTKY=44 +SK=44 +ŘÃMANÅ®M=45 +Ř=45 + +1. KORINTSKÃM=46 +1 KORINTSKÃM=46 +1KORINTSKÃM=46 +1K=46 + +2. KORINTSKÃM=47 +2 KORINTSKÃM=47 +2KORINTSKÃM=47 +2K=47 + +GALATSKÃM=48 +GA=48 +EFEZSKÃM=49 +EF=49 +FILIPENSKÃM=50 +FP=50 +KOLOSSENSKÃM=51 +KO=51 + +1. TESSALONICENSKÃM=52 +1 TESSALONICENSKÃM=52 +1TESSALONICENSKÃM=52 +1TE=52 + +2. TESSALONICENSKÃM=53 +2 TESSALONICENSKÃM=53 +2TESSALONICENSKÃM=53 +2TE=53 + +1. TIMOTEOVI=54 +1 TIMOTEOVI=54 +1TIMOTEOVI=54 +1TM=54 + +2. TIMOTEOVI=55 +2 TIMOTEOVI=55 +2TIMOTEOVI=55 +2TM=55 + +TITOVI=56 +TT=56 +FILEMONOVI=57 +FM=57 +ŽIDÅ®M=58 +ŽD=58 +JAKUB=59 +JK=59 + +1. PETROVA=60 +1 PETROVA=60 +1PETROVA=60 +1PT=60 + +2. PETROVA=61 +2 PETROVA=61 +2PETROVA=61 +2PT=61 + +1. JANOVA=62 +1 JANOVA=62 +1JANOVA=62 +1J=62 + +2. JANOVA=63 +2 JANOVA=63 +2JANOVA=63 +2J=63 + +3. JANOVA=64 +3 JANOVA=64 +3JANOVA=64 +3J=64 + +JUDA=65 +JU=65 +ZJEVENÃ=66 +ZJ=66 diff --git a/locales.d/cs.conf b/locales.d/cs.conf new file mode 100644 index 0000000..3dffc81 --- /dev/null +++ b/locales.d/cs.conf @@ -0,0 +1,462 @@ +# +# Czech Bible books for Sword. +# +# 2000/04/12. (c) Petr@Kristof.CZ, GNU GPL 2.0. +# +# Notice: the locales name of czech language is CS, not CZ. +# CZ is shortcut name of state (Czech Republic). +# +# Notice: For correct czech environment you must set locales to "cs_CZ" +# +# Notice: Names and abbreviations are in compliance with authority +# A. Novotný: Biblický slovník (1967). +# + +[Meta] +Name=cs +Description=Czech +Encoding=ISO8859-2 + +[Text] +Genesis=Genesis +Exodus=Exodus +Leviticus=Leviticus +Numbers=Numeri +Deuteronomy=Deuteronomium +Joshua=Jozue +Judges=Soudcù +Ruth=Rut +I Samuel=1. Samuelova +II Samuel=2. Samuelova +I Kings=1. Královská +II Kings=2. Královská +I Chronicles=1. Paralipomenon +II Chronicles=2. Paralipomenon +Ezra=Ezdrá¹ +Nehemiah=Nehemiá¹ +Esther=Ester +Job=Job +Psalms=®almy +Proverbs=Pøísloví +Ecclesiastes=Kazatel +Song of Solomon=Píseò ©alomounova +Isaiah=Izaiá¹ +Jeremiah=Jeremiá¹ +Lamentations=Pláè Jeremiá¹ùv +Ezekiel=Ezechiel +Daniel=Daniel +Hosea=Ozeá¹ +Joel=Joel +Amos=Amos +Obadiah=Abdiá¹ +Jonah=Joná¹ +Micah=Micheá¹ +Nahum=Nahum +Habakkuk=Abakuk +Zephaniah=Sofoniá¹ +Haggai=Aggeus +Zechariah=Zachariá¹ +Malachi=Malachiá¹ +Matthew=Matou¹ +Mark=Marek +Luke=Luká¹ +John=Jan +Acts=Skutky +Romans=Øímanùm +I Corinthians=1. Korintským +II Corinthians=2. Korintským +Galatians=Galatským +Ephesians=Efezským +Philippians=Filipenským +Colossians=Kolossenským +I Thessalonians=1. Tessalonicenským +II Thessalonians=2. Tessalonicenským +I Timothy=1. Timoteovi +II Timothy=2. Timoteovi +Titus=Titovi +Philemon=Filemonovi +Hebrews=®idùm +James=Jakub +I Peter=1. Petrova +II Peter=2. Petrova +I John=1. Janova +II John=2. Janova +III John=3. Janova +Jude=Juda +Revelation of John=Zjevení + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENESIS=1 +GN=1 +EXODUS=2 +EX=2 +LEVITICUS=3 +LV=3 +NUMERI=4 +NU=4 +DEUTERONOMIUM=5 +DT=5 +JOZUE=6 +JOZ=6 +SOUDCÙ=7 +SD=7 +RUT=8 +RT=8 + +1. SAMUELOVA=9 +1 SAMUELOVA=9 +1SAMUELOVA=9 +1S=9 + +2. SAMUELOVA=10 +2 SAMUELOVA=10 +2SAMUELOVA=10 +2S=10 + +1. KRÁLOVSKÁ=11 +1 KRÁLOVSKÁ=11 +1KRÁLOVSKÁ=11 +1KR=11 + +2. KRÁLOVSKÁ=12 +2 KRÁLOVSKÁ=12 +2KRÁLOVSKÁ=12 +2KR=12 + +1. PARALIPOMENON=13 +1 PARALIPOMENON=13 +1PARALIPOMENON=13 +1PA=13 + +2. PARALIPOMENON=14 +2 PARALIPOMENON=14 +2PARALIPOMENON=14 +2PA=14 + +EZDRÁ¹=15 +EZD=15 +NEHEMIÁ¹=16 +NEH=16 +ESTER=17 +EST=17 +JOB=18 +JB=18 +®ALMY=19 +®=19 +PØÍSLOVÍ=20 +PØ=20 +KAZATEL=21 +KAZ=21 +PÍSEÒ ©ALOMOUNOVA=22 +PÍSEÒ ©ALAMOUNOVA=22 +PÍS=22 +IZAIÁ¹=23 +IZ=23 +JEREMIÁ¹=24 +JR=24 +PLÁÈ JEREMIÁ¹ÙV=25 +PL=25 +EZECHIEL=26 +EZ=26 +DANIEL=26 +DN=27 +OZEÁ¹=28 +OZ=28 +JOEL=29 +JL=29 +AMOS=30 +AM=30 +ABDIÁ¹=31 +ABD=31 +JONÁ¹=32 +JON=32 +MICHEÁ¹=33 +MI=33 +NAHUM=34 +NA=34 +ABAKUK=35 +AB=35 +SOFONIÁ¹=36 +SF=36 +AGGEUS=37 +AG=37 +ZACHARIÁ¹=38 +ZA=38 +MALACHIÁ¹=39 +MAL=39 +MATOU¹=40 +MT=40 +MAREK=41 +MK=41 +LUKÁ¹=42 +LK=42 +L=42 +JAN=43 +J=43 +SKUTKY=44 +SK=44 +ØÍMANÙM=45 +Ø=45 + +1. KORINTSKÝM=46 +1 KORINTSKÝM=46 +1KORINTSKÝM=46 +1K=46 + +2. KORINTSKÝM=47 +2 KORINTSKÝM=47 +2KORINTSKÝM=47 +2K=47 + +GALATSKÝM=48 +GA=48 +EFEZSKÝM=49 +EF=49 +FILIPENSKÝM=50 +FP=50 +KOLOSSENSKÝM=51 +KO=51 + +1. TESSALONICENSKÝM=52 +1 TESSALONICENSKÝM=52 +1TESSALONICENSKÝM=52 +1TE=52 + +2. TESSALONICENSKÝM=53 +2 TESSALONICENSKÝM=53 +2TESSALONICENSKÝM=53 +2TE=53 + +1. TIMOTEOVI=54 +1 TIMOTEOVI=54 +1TIMOTEOVI=54 +1TM=54 + +2. TIMOTEOVI=55 +2 TIMOTEOVI=55 +2TIMOTEOVI=55 +2TM=55 + +TITOVI=56 +TT=56 +FILEMONOVI=57 +FM=57 +®IDÙM=58 +®D=58 +JAKUB=59 +JK=59 + +1. PETROVA=60 +1 PETROVA=60 +1PETROVA=60 +1PT=60 + +2. PETROVA=61 +2 PETROVA=61 +2PETROVA=61 +2PT=61 + +1. JANOVA=62 +1 JANOVA=62 +1JANOVA=62 +1J=62 + +2. JANOVA=63 +2 JANOVA=63 +2JANOVA=63 +2J=63 + +3. JANOVA=64 +3 JANOVA=64 +3JANOVA=64 +3J=64 + +JUDA=65 +JU=65 +ZJEVENÍ=66 +ZJ=66 diff --git a/locales.d/da-utf8.conf b/locales.d/da-utf8.conf new file mode 100644 index 0000000..e93b4a6 --- /dev/null +++ b/locales.d/da-utf8.conf @@ -0,0 +1,571 @@ +[Meta] +Name=da +Description=Danish (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Første Mosebog +Exodus=Anden Mosebog +Leviticus=Tredje Mosebog +Numbers=Fjerde Mosebog +Deuteronomy=Femte Mosebog +Joshua=Josvabogen +Judges=Dommerbogen +Ruth=Ruths Bog +I Samuel=1. Samuelsbog +II Samuel=2. Samuelsbog +I Kings=1. Kongebog +II Kings=2. Kongebog +I Chronicles=1. Krønikebog +II Chronicles=2. Krønikebog +Ezra=Ezras Bog +Nehemiah=Nehemias' Bog +Esther=Esters Bog +Job=Jobs Bog +Psalms=Salmernes Bog +Proverbs=Ordsprogenes Bog +Ecclesiastes=Prædikerens Bog +Song of Solomon=Højsangen +Isaiah=Esajas' Bog +Jeremiah=Jeremias' Bog +Lamentations=Klagesangene +Ezekiel=Ezekiels Bog +Daniel=Daniels Bog +Hosea=Hoseas' Bog +Joel=Joels Bog +Amos=Amos' Bog +Obadiah=Obadias' Bog +Jonah=Jonas' Bog +Micah=Mikas Bog +Nahum=Nahums Bog +Habakkuk=Habakkuks Bog +Zephaniah=Sefanias' Bog +Haggai=Haggajs Bog +Zechariah=Zakarias' Bog +Malachi=Malakias' Bog +Matthew=Matthæusevangeliet +Mark=Markusevangeliet +Luke=Lukasevangeliet +John=Johannesevangeliet +Acts=Apostlenes Gerninger +Romans=Paulus' Brev til Romerne +I Corinthians=Paulus' Første Brev til Korintherne +II Corinthians=Paulus' Andet Brev til Korintherne +Galatians=Paulus' Brev til Galaterne +Ephesians=Paulus' Brev til Efeserne +Philippians=Paulus' Brev til Filipperne +Colossians=Paulus' Brev til Kolossenserne +I Thessalonians=Paulus' Første Brev til Thessalonikerne +II Thessalonians=Paulus' Andet Brev til Thessalonikerne +I Timothy=Paulus' Første Brev til Timotheus +II Timothy=Paulus' Andet Brev til Timotheus +Titus=Paulus' Brev til Titus +Philemon=Paulus' Brev til Filemon +Hebrews=Brevet til Hebræerne +James=Jakobs Brev +I Peter=Peters Første Brev +II Peter=Peters Andet Brev +I John=Johannes' Første Brev +II John=Johannes' Andet Brev +III John=Johannes' Tredje Brev +Jude=Judas' Brev +Revelation of John=Johannes' Ã…benbaring + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOSEBOG=1 +1 MOSEBOG=1 +1MOSEBOG=1 +1 MOS=1 + +2. MOSEBOG=2 +2 MOSEBOG=2 +2MOSEBOG=2 +2 MOS=2 + +3. MOSEBOG=3 +3 MOSEBOG=3 +3MOSEBOG=3 +3 MOS=3 + +4. MOSEBOG=4 +4 MOSEBOG=4 +4MOSEBOG=4 +4 MOS=4 +NUMERI=4 + +5. MOSEBOG=5 +5 MOSEBOG=5 +5MOSEBOG=5 +5 MOS=5 +DEUTERONOMIUM=5 + +JOSVA=6 +JOSUA=6 +JOS=6 +DOMMER=7 +DOM=7 +JUDICIUM=7 +RUTH=8 +RUT=8 + +1. SAMUEL=9 +1 SAMUEL=9 +1SAMUEL=9 +1 SAM=9 + +2. SAMUEL=10 +2 SAMUEL=10 +2SAMUEL=10 +2 SAM=10 + +1. KONGE=11 +1 KONGE=11 +1KONGE=11 +1 KONG=11 + +2. KONGE=12 +2 KONGE=12 +2KONGE=12 +2 KONG=12 + +1. KRØNIKE=13 +1 KRØNIKE=13 +1KRØNIKE=13 +1 KRØN=13 + +2. KRØNIKE=14 +2 KRØNIKE=14 +2KRØNIKE=14 +2 KRØN=14 + +EZRA=15 +NEHEMIAS=16 +NEH=16 +ESTER=17 +JOB=18 +SALMERNE=19 +SL=19 +PSALM=19 +PSL=19 +ORDSPROGENE=20 +ORDSP=20 +PRÆDIKEREN=21 +PRÆD=21 +HØJSANGEN=22 +HØJS=22 +SALOMOS HØJSANG=22 +ESAJAS=23 +ES=23 +JEREMIAS=24 +JER=24 +KLAGESANGENE=25 +KLAGES=25 +EZEKIEL=26 +EZ=26 +EZEK=26 +DANIEL=27 +DAN=27 +HOSEAS=28 +HOS=28 +JOEL=29 +AMOS=30 +AM=30 +OBADIAS=31 +OBAD=31 +JONAS=32 +JON=32 +MIKA=33 +NAHUM=34 +HABAKKUK=35 +HAB=35 +ZEFANIAS=36 +ZEF=36 +HAGGAJ=37 +HAGG=37 +ZAKARIAS=38 +ZAK=38 +MALAKIAS=39 +MAL=39 +MATTHÆUS=40 +MATT=40 +MATTH=40 +MARKUS=41 +MARK=41 +LUKAS=42 +LUK=42 +JOHANNES=43 +JOH=43 +APOSTLENE=44 +AP.G=44 +AP G=44 +APG=44 +APOST=44 +ACTA=44 +ROMER=45 +ROM=45 + +1. KORINTHER=46 +1 KORINTHER=46 +1KORINTHER=46 +1 KOR=46 + +2. KORINTHER=47 +2 KORINTHER=47 +2KORINTHER=47 +2 KOR=47 + +GALATER=48 +GALATERNE=48 +GAL=48 +EFESER=49 +EFESERBREVET=49 +EFESERNE=49 +EF=49 +FILIPPER=50 +FILIPPERBREVET=50 +FILIPPERNE=50 +FIL=50 +KOLOSSENSER=51 +KOLOSSENSERNE=51 +KOLOSSENSERBREVET=51 +KOLOSSER=51 +KOLOSSERNE=51 +KOLOSSERBREVET=51 +KOL=51 + +1. THESSALONIKER=52 +1 THESSALONIKER=52 +1THESSALONIKER=52 +1 TESS=52 +1 THESS=52 + +2. THESSALONIKER=53 +2 THESSALONIKER=53 +2THESSALONIKER=53 +2 TESS=53 +2 THESS=53 + +1. TIMOTHEUS=54 +1 TIMOTHEUS=54 +1TIMOTHEUS=54 +1 TIM=54 + +2. TIMOTHEUS=55 +2 TIMOTHEUS=55 +2TIMOTHEUS=55 +2 TIM=55 + +TITUS=56 +TIT=56 +FILEMON=57 +FILEM=57 +HEBRÆERNE=58 +HEBR=58 +HEBRÆERBREVET=58 +JAKOB=59 +JAKOBSBREVET=59 +JAK=59 + +1. PETER=60 +1 PETER=60 +1PETER=60 +1 PET=60 + +2. PETER=61 +2 PETER=61 +2PETER=61 +2 PET=61 + +1. JOHANNES=62 +1 JOHANNES=62 +1JOHANNES=62 +1 JOH=62 + +2. JOHANNES=63 +2 JOHANNES=63 +2JOHANNES=63 +2 JOH=63 + +3. JOHANNES=64 +3 JOHANNES=64 +3JOHANNES=64 +3 JOH=64 + +JUDAS=65 +Ã…BENBARINGEN=66 +Ã…B=66 +AAB=66 +Ã…BENBARINGSBOGEN=66 +JOHANNES' APOKALYPSE=66 +APOKALYPSEN=66 + +FØRSTE MOSEBOG=1 +ANDEN MOSEBOG=2 +TREDJE MOSEBOG=3 +FJERDE MOSEBOG=4 +FEMTE MOSEBOG=5 +JOSVABOGEN=6 +DOMMERBOGEN=7 +RUTHS BOG=8 + +1. SAMUELSBOG=9 +1 SAMUELSBOG=9 +1SAMUELSBOG=9 + +2. SAMUELSBOG=10 +2 SAMUELSBOG=10 +2SAMUELSBOG=10 + +1. KONGEBOG=11 +1 KONGEBOG=11 +1KONGEBOG=11 + +2. KONGEBOG=12 +2 KONGEBOG=12 +2KONGEBOG=12 + +1. KRØNIKEBOG=13 +1 KRØNIKEBOG=13 +1KRØNIKEBOG=13 + +2. KRØNIKEBOG=14 +2 KRØNIKEBOG=14 +2KRØNIKEBOG=14 + +EZRAS BOG=15 +NEHEMIAS' BOG=16 +ESTERS BOG=17 +JOBS BOG=18 +SALMERNES BOG=19 +ORDSPROGENES BOG=20 +PRÆDIKERENS BOG=21 +HØJSANGEN=22 +ESAJAS' BOG=23 +JEREMIAS' BOG=24 +KLAGESANGENE=25 +EZEKIELS BOG=26 +DANIELS BOG=27 +HOSEAS' BOG=28 +JOELS BOG=29 +AMOS' BOG=30 +OBADIAS' BOG=31 +JONAS' BOG=32 +MIKAS BOG=33 +NAHUMS BOG=34 +HABAKKUKS BOG=35 +SEFANIAS' BOG=36 +HAGGAJS BOG=37 +ZAKARIAS' BOG=38 +MALAKIAS' BOG=39 +MATTHÆUSEVANGELIET=40 +MARKUSEVANGELIET=41 +LUKASEVANGELIET=42 +JOHANNESEVANGELIET=43 +APOSTLENES GERNINGER=44 +PAULUS' BREV TIL ROMERNE=45 +PAULUS' FØRSTE BREV TIL KORINTHERNE=46 +PAULUS' ANDET BREV TIL KORINTHERNE=47 +PAULUS' BREV TIL GALATERNE=48 +PAULUS' BREV TIL EFESERNE=49 +PAULUS' BREV TIL FILIPPERNE=50 +PAULUS' BREV TIL KOLOSSENSERNE=51 +PAULUS' FØRSTE BREV TIL THESSALONIKERNE=52 +PAULUS' ANDET BREV TIL THESSALONIKERNE=53 +PAULUS' FØRSTE BREV TIL TIMOTHEUS=54 +PAULUS' ANDET BREV TIL TIMOTHEUS=55 +PAULUS' BREV TIL TITUS=56 +PAULUS' BREV TIL FILEMON=57 +BREVET TIL HEBRÆERNE=58 +JAKOBS BREV=59 +PETERS FØRSTE BREV=60 +PETERS ANDET BREV=61 +JOHANNES' FØRSTE BREV=62 +JOHANNES' ANDET BREV=63 +JOHANNES' TREDJE BREV=64 +JUDAS' BREV=65 +JOHANNES' Ã…BENBARING=66 diff --git a/locales.d/da.conf b/locales.d/da.conf new file mode 100644 index 0000000..e3619be --- /dev/null +++ b/locales.d/da.conf @@ -0,0 +1,571 @@ +[Meta] +Name=da +Description=Danish +Encoding=ISO8859-1 + +[Text] +Genesis=Første Mosebog +Exodus=Anden Mosebog +Leviticus=Tredje Mosebog +Numbers=Fjerde Mosebog +Deuteronomy=Femte Mosebog +Joshua=Josvabogen +Judges=Dommerbogen +Ruth=Ruths Bog +I Samuel=1. Samuelsbog +II Samuel=2. Samuelsbog +I Kings=1. Kongebog +II Kings=2. Kongebog +I Chronicles=1. Krønikebog +II Chronicles=2. Krønikebog +Ezra=Ezras Bog +Nehemiah=Nehemias' Bog +Esther=Esters Bog +Job=Jobs Bog +Psalms=Salmernes Bog +Proverbs=Ordsprogenes Bog +Ecclesiastes=Prædikerens Bog +Song of Solomon=Højsangen +Isaiah=Esajas' Bog +Jeremiah=Jeremias' Bog +Lamentations=Klagesangene +Ezekiel=Ezekiels Bog +Daniel=Daniels Bog +Hosea=Hoseas' Bog +Joel=Joels Bog +Amos=Amos' Bog +Obadiah=Obadias' Bog +Jonah=Jonas' Bog +Micah=Mikas Bog +Nahum=Nahums Bog +Habakkuk=Habakkuks Bog +Zephaniah=Sefanias' Bog +Haggai=Haggajs Bog +Zechariah=Zakarias' Bog +Malachi=Malakias' Bog +Matthew=Matthæusevangeliet +Mark=Markusevangeliet +Luke=Lukasevangeliet +John=Johannesevangeliet +Acts=Apostlenes Gerninger +Romans=Paulus' Brev til Romerne +I Corinthians=Paulus' Første Brev til Korintherne +II Corinthians=Paulus' Andet Brev til Korintherne +Galatians=Paulus' Brev til Galaterne +Ephesians=Paulus' Brev til Efeserne +Philippians=Paulus' Brev til Filipperne +Colossians=Paulus' Brev til Kolossenserne +I Thessalonians=Paulus' Første Brev til Thessalonikerne +II Thessalonians=Paulus' Andet Brev til Thessalonikerne +I Timothy=Paulus' Første Brev til Timotheus +II Timothy=Paulus' Andet Brev til Timotheus +Titus=Paulus' Brev til Titus +Philemon=Paulus' Brev til Filemon +Hebrews=Brevet til Hebræerne +James=Jakobs Brev +I Peter=Peters Første Brev +II Peter=Peters Andet Brev +I John=Johannes' Første Brev +II John=Johannes' Andet Brev +III John=Johannes' Tredje Brev +Jude=Judas' Brev +Revelation of John=Johannes' Åbenbaring + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOSEBOG=1 +1 MOSEBOG=1 +1MOSEBOG=1 +1 MOS=1 + +2. MOSEBOG=2 +2 MOSEBOG=2 +2MOSEBOG=2 +2 MOS=2 + +3. MOSEBOG=3 +3 MOSEBOG=3 +3MOSEBOG=3 +3 MOS=3 + +4. MOSEBOG=4 +4 MOSEBOG=4 +4MOSEBOG=4 +4 MOS=4 +NUMERI=4 + +5. MOSEBOG=5 +5 MOSEBOG=5 +5MOSEBOG=5 +5 MOS=5 +DEUTERONOMIUM=5 + +JOSVA=6 +JOSUA=6 +JOS=6 +DOMMER=7 +DOM=7 +JUDICIUM=7 +RUTH=8 +RUT=8 + +1. SAMUEL=9 +1 SAMUEL=9 +1SAMUEL=9 +1 SAM=9 + +2. SAMUEL=10 +2 SAMUEL=10 +2SAMUEL=10 +2 SAM=10 + +1. KONGE=11 +1 KONGE=11 +1KONGE=11 +1 KONG=11 + +2. KONGE=12 +2 KONGE=12 +2KONGE=12 +2 KONG=12 + +1. KRØNIKE=13 +1 KRØNIKE=13 +1KRØNIKE=13 +1 KRØN=13 + +2. KRØNIKE=14 +2 KRØNIKE=14 +2KRØNIKE=14 +2 KRØN=14 + +EZRA=15 +NEHEMIAS=16 +NEH=16 +ESTER=17 +JOB=18 +SALMERNE=19 +SL=19 +PSALM=19 +PSL=19 +ORDSPROGENE=20 +ORDSP=20 +PRÆDIKEREN=21 +PRÆD=21 +HØJSANGEN=22 +HØJS=22 +SALOMOS HØJSANG=22 +ESAJAS=23 +ES=23 +JEREMIAS=24 +JER=24 +KLAGESANGENE=25 +KLAGES=25 +EZEKIEL=26 +EZ=26 +EZEK=26 +DANIEL=27 +DAN=27 +HOSEAS=28 +HOS=28 +JOEL=29 +AMOS=30 +AM=30 +OBADIAS=31 +OBAD=31 +JONAS=32 +JON=32 +MIKA=33 +NAHUM=34 +HABAKKUK=35 +HAB=35 +ZEFANIAS=36 +ZEF=36 +HAGGAJ=37 +HAGG=37 +ZAKARIAS=38 +ZAK=38 +MALAKIAS=39 +MAL=39 +MATTHÆUS=40 +MATT=40 +MATTH=40 +MARKUS=41 +MARK=41 +LUKAS=42 +LUK=42 +JOHANNES=43 +JOH=43 +APOSTLENE=44 +AP.G=44 +AP G=44 +APG=44 +APOST=44 +ACTA=44 +ROMER=45 +ROM=45 + +1. KORINTHER=46 +1 KORINTHER=46 +1KORINTHER=46 +1 KOR=46 + +2. KORINTHER=47 +2 KORINTHER=47 +2KORINTHER=47 +2 KOR=47 + +GALATER=48 +GALATERNE=48 +GAL=48 +EFESER=49 +EFESERBREVET=49 +EFESERNE=49 +EF=49 +FILIPPER=50 +FILIPPERBREVET=50 +FILIPPERNE=50 +FIL=50 +KOLOSSENSER=51 +KOLOSSENSERNE=51 +KOLOSSENSERBREVET=51 +KOLOSSER=51 +KOLOSSERNE=51 +KOLOSSERBREVET=51 +KOL=51 + +1. THESSALONIKER=52 +1 THESSALONIKER=52 +1THESSALONIKER=52 +1 TESS=52 +1 THESS=52 + +2. THESSALONIKER=53 +2 THESSALONIKER=53 +2THESSALONIKER=53 +2 TESS=53 +2 THESS=53 + +1. TIMOTHEUS=54 +1 TIMOTHEUS=54 +1TIMOTHEUS=54 +1 TIM=54 + +2. TIMOTHEUS=55 +2 TIMOTHEUS=55 +2TIMOTHEUS=55 +2 TIM=55 + +TITUS=56 +TIT=56 +FILEMON=57 +FILEM=57 +HEBRÆERNE=58 +HEBR=58 +HEBRÆERBREVET=58 +JAKOB=59 +JAKOBSBREVET=59 +JAK=59 + +1. PETER=60 +1 PETER=60 +1PETER=60 +1 PET=60 + +2. PETER=61 +2 PETER=61 +2PETER=61 +2 PET=61 + +1. JOHANNES=62 +1 JOHANNES=62 +1JOHANNES=62 +1 JOH=62 + +2. JOHANNES=63 +2 JOHANNES=63 +2JOHANNES=63 +2 JOH=63 + +3. JOHANNES=64 +3 JOHANNES=64 +3JOHANNES=64 +3 JOH=64 + +JUDAS=65 +ÅBENBARINGEN=66 +ÅB=66 +AAB=66 +ÅBENBARINGSBOGEN=66 +JOHANNES' APOKALYPSE=66 +APOKALYPSEN=66 + +FØRSTE MOSEBOG=1 +ANDEN MOSEBOG=2 +TREDJE MOSEBOG=3 +FJERDE MOSEBOG=4 +FEMTE MOSEBOG=5 +JOSVABOGEN=6 +DOMMERBOGEN=7 +RUTHS BOG=8 + +1. SAMUELSBOG=9 +1 SAMUELSBOG=9 +1SAMUELSBOG=9 + +2. SAMUELSBOG=10 +2 SAMUELSBOG=10 +2SAMUELSBOG=10 + +1. KONGEBOG=11 +1 KONGEBOG=11 +1KONGEBOG=11 + +2. KONGEBOG=12 +2 KONGEBOG=12 +2KONGEBOG=12 + +1. KRØNIKEBOG=13 +1 KRØNIKEBOG=13 +1KRØNIKEBOG=13 + +2. KRØNIKEBOG=14 +2 KRØNIKEBOG=14 +2KRØNIKEBOG=14 + +EZRAS BOG=15 +NEHEMIAS' BOG=16 +ESTERS BOG=17 +JOBS BOG=18 +SALMERNES BOG=19 +ORDSPROGENES BOG=20 +PRÆDIKERENS BOG=21 +HØJSANGEN=22 +ESAJAS' BOG=23 +JEREMIAS' BOG=24 +KLAGESANGENE=25 +EZEKIELS BOG=26 +DANIELS BOG=27 +HOSEAS' BOG=28 +JOELS BOG=29 +AMOS' BOG=30 +OBADIAS' BOG=31 +JONAS' BOG=32 +MIKAS BOG=33 +NAHUMS BOG=34 +HABAKKUKS BOG=35 +SEFANIAS' BOG=36 +HAGGAJS BOG=37 +ZAKARIAS' BOG=38 +MALAKIAS' BOG=39 +MATTHÆUSEVANGELIET=40 +MARKUSEVANGELIET=41 +LUKASEVANGELIET=42 +JOHANNESEVANGELIET=43 +APOSTLENES GERNINGER=44 +PAULUS' BREV TIL ROMERNE=45 +PAULUS' FØRSTE BREV TIL KORINTHERNE=46 +PAULUS' ANDET BREV TIL KORINTHERNE=47 +PAULUS' BREV TIL GALATERNE=48 +PAULUS' BREV TIL EFESERNE=49 +PAULUS' BREV TIL FILIPPERNE=50 +PAULUS' BREV TIL KOLOSSENSERNE=51 +PAULUS' FØRSTE BREV TIL THESSALONIKERNE=52 +PAULUS' ANDET BREV TIL THESSALONIKERNE=53 +PAULUS' FØRSTE BREV TIL TIMOTHEUS=54 +PAULUS' ANDET BREV TIL TIMOTHEUS=55 +PAULUS' BREV TIL TITUS=56 +PAULUS' BREV TIL FILEMON=57 +BREVET TIL HEBRÆERNE=58 +JAKOBS BREV=59 +PETERS FØRSTE BREV=60 +PETERS ANDET BREV=61 +JOHANNES' FØRSTE BREV=62 +JOHANNES' ANDET BREV=63 +JOHANNES' TREDJE BREV=64 +JUDAS' BREV=65 +JOHANNES' ÅBENBARING=66 diff --git a/locales.d/de-utf8.conf b/locales.d/de-utf8.conf new file mode 100644 index 0000000..4e02861 --- /dev/null +++ b/locales.d/de-utf8.conf @@ -0,0 +1,421 @@ + +[Meta] +Name=de +Description=German (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=1. Mose +Exodus=2. Mose +Leviticus=3. Mose +Numbers=4. Mose +Deuteronomy=5. Mose +Joshua=Josua +Judges=Richter +Ruth=Rut +I Samuel=1. Samuel +II Samuel=2. Samuel +I Kings=1. Könige +II Kings=2. Könige +I Chronicles=1. Chronik +II Chronicles=2. Chronik +Ezra=Esra +Nehemiah=Nehemia +Esther=Ester +Job=Hiob +Psalms=Psalmen +Proverbs=Sprüche +Ecclesiastes=Prediger +Song of Solomon=Hoheslied +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Klagelieder +Ezekiel=Hesekiel +Daniel=Daniel +Hosea=Hosea +Joel=Joel +Amos=Amos +Obadiah=Obadja +Jonah=Jona +Micah=Micha +Nahum=Nahum +Habakkuk=Habakuk +Zephaniah=Zefanja +Haggai=Haggai +Zechariah=Sacharja +Malachi=Maleachi +Matthew=Matthäus +Mark=Markus +Luke=Lukas +John=Johannes +Acts=Apostelgeschichte +Romans=Römer +I Corinthians=1. Korinther +II Corinthians=2. Korinther +Galatians=Galater +Ephesians=Epheser +Philippians=Philipper +Colossians=Kolosser +I Thessalonians=1. Thessalonicher +II Thessalonians=2. Thessalonicher +I Timothy=1. Timotheus +II Timothy=2. Timotheus +Titus=Titus +Philemon=Philemon +Hebrews=Hebräer +James=Jakobus +I Peter=1. Petrus +II Peter=2. Petrus +I John=1. Johannes +II John=2. Johannes +III John=3. Johannes +Jude=Judas +Revelation of John=Offenbarung + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOSE=1 +1 MOSE=1 +1MOSE=1 +1MO=1 + +2. MOSE=2 +2 MOSE=2 +2MOSE=2 +2MO=2 + +3. MOSE=3 +3 MOSE=3 +3MOSE=3 +3MO=3 + +4. MOSE=4 +4 MOSE=4 +4MOSE=4 +4MO=4 + +5. MOSE=5 +5 MOSE=5 +5MOSE=5 +5MO=5 + +JOSUA=6 +RICHTER=7 +RUT=8 + +1. SAMUEL=9 +1 SAMUEL=9 +1SAMUEL=9 +1SAM=9 + +2. SAMUEL=10 +2 SAMUEL=10 +2SAM=10 + +1. KÖNIGE=11 +1 KÖNIGE=11 +1KÖNIGE=11 +1KÖN=11 + +2. KÖNIGE=12 +2 KÖNIGE=12 +2KÖN=12 +2KÖN=12 + +1. CHRONIK=13 +1 CHRONIK=13 +1CHRONIK=13 +1CHR=13 + +2. CHRONIK=14 +2 CHRONIK=14 +2CHRONIK=14 +2CHR=14 + +ESRA=15 +NEHEMIA=16 +ESTER=17 +HIOB=18 +PSALMEN=19 +SPRÃœCHE=20 +PREDIGER=21 +HOHESLIED=22 +JESAJA=23 +JEREMIA=24 +KLAGELIEDER=25 +HESEKIEL=26 +DANIEL=27 +HOSEA=28 +JOEL=29 +AMOS=30 +OBADJA=31 +JONA=32 +MICHA=33 +NAHUM=34 +HABAKUK=35 +ZEFANJA=36 +ZEPHANJA=36 +HAGGAI=37 +SACHARJA=38 +MALEACHI=39 +MATTHÄUS=40 +MARKUS=41 +LUKAS=42 +JOHANNES=43 +APOSTELGESCHICHTE=44 +RÖMER=45 + +1. KORINTHER=46 +1 KORINTHER=46 +1KORINTHER=46 +1KOR=46 + +2. KORINTHER=47 +2 KORINTHER=47 +2KORINTHER=47 +2KOR=47 + +GALATER=48 +EPHESER=49 +PHILIPPER=50 +KOLOSSER=51 + +1. THESSALONICHER=52 +1 THESSALONICHER=52 +1THESSALONICHER=52 +1THESS=52 + +2. THESSALONICHER=53 +2 THESSALONICHER=53 +2THESSALONICHER=53 +2THESS=53 + +1. TIMOTHEUS=54 +1 TIMOTHEUS=54 +1TIMOTHEUS=54 +1TIM=54 + +2. TIMOTHEUS=55 +2 TIMOTHEUS=55 +2TIMOTHEUS=55 +2TIM=55 + +TITUS=56 +PHILEMON=57 +HEBRÄER=58 +JAKOBUS=59 + +1. PETRUS=60 +1 PETRUS=60 +1PETRUS=60 +1PET=60 + +2. PETRUS=61 +2 PETRUS=61 +2PETRUS=61 +2PET=61 + +1. JOHANNES=62 +1 JOHANNES=62 +1JOHANNES=62 +1JOH=62 + +2. JOHANNES=63 +2 JOHANNES=63 +2JOHANNES=63 +2JOH=63 + +3. JOHANNES=64 +3 JOHANNES=64 +3JOHANNES=64 +3JOH=64 + +JUDAS=65 + +OFFENBARUNG=66 +OFFB=66 +APC=66 diff --git a/locales.d/de.conf b/locales.d/de.conf new file mode 100644 index 0000000..beb799d --- /dev/null +++ b/locales.d/de.conf @@ -0,0 +1,420 @@ +[Meta] +Name=de +Description=German +Encoding=ISO8859-1 + +[Text] +Genesis=1. Mose +Exodus=2. Mose +Leviticus=3. Mose +Numbers=4. Mose +Deuteronomy=5. Mose +Joshua=Josua +Judges=Richter +Ruth=Rut +I Samuel=1. Samuel +II Samuel=2. Samuel +I Kings=1. Könige +II Kings=2. Könige +I Chronicles=1. Chronik +II Chronicles=2. Chronik +Ezra=Esra +Nehemiah=Nehemia +Esther=Ester +Job=Hiob +Psalms=Psalmen +Proverbs=Sprüche +Ecclesiastes=Prediger +Song of Solomon=Hoheslied +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Klagelieder +Ezekiel=Hesekiel +Daniel=Daniel +Hosea=Hosea +Joel=Joel +Amos=Amos +Obadiah=Obadja +Jonah=Jona +Micah=Micha +Nahum=Nahum +Habakkuk=Habakuk +Zephaniah=Zefanja +Haggai=Haggai +Zechariah=Sacharja +Malachi=Maleachi +Matthew=Matthäus +Mark=Markus +Luke=Lukas +John=Johannes +Acts=Apostelgeschichte +Romans=Römer +I Corinthians=1. Korinther +II Corinthians=2. Korinther +Galatians=Galater +Ephesians=Epheser +Philippians=Philipper +Colossians=Kolosser +I Thessalonians=1. Thessalonicher +II Thessalonians=2. Thessalonicher +I Timothy=1. Timotheus +II Timothy=2. Timotheus +Titus=Titus +Philemon=Philemon +Hebrews=Hebräer +James=Jakobus +I Peter=1. Petrus +II Peter=2. Petrus +I John=1. Johannes +II John=2. Johannes +III John=3. Johannes +Jude=Judas +Revelation of John=Offenbarung + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOSE=1 +1 MOSE=1 +1MOSE=1 +1MO=1 + +2. MOSE=2 +2 MOSE=2 +2MOSE=2 +2MO=2 + +3. MOSE=3 +3 MOSE=3 +3MOSE=3 +3MO=3 + +4. MOSE=4 +4 MOSE=4 +4MOSE=4 +4MO=4 + +5. MOSE=5 +5 MOSE=5 +5MOSE=5 +5MO=5 + +JOSUA=6 +RICHTER=7 +RUT=8 + +1. SAMUEL=9 +1 SAMUEL=9 +1SAMUEL=9 +1SAM=9 + +2. SAMUEL=10 +2 SAMUEL=10 +2SAM=10 + +1. KÖNIGE=11 +1 KÖNIGE=11 +1KÖNIGE=11 +1KÖN=11 + +2. KÖNIGE=12 +2 KÖNIGE=12 +2KÖN=12 +2KÖN=12 + +1. CHRONIK=13 +1 CHRONIK=13 +1CHRONIK=13 +1CHR=13 + +2. CHRONIK=14 +2 CHRONIK=14 +2CHRONIK=14 +2CHR=14 + +ESRA=15 +NEHEMIA=16 +ESTER=17 +HIOB=18 +PSALMEN=19 +SPRÜCHE=20 +PREDIGER=21 +HOHESLIED=22 +JESAJA=23 +JEREMIA=24 +KLAGELIEDER=25 +HESEKIEL=26 +DANIEL=27 +HOSEA=28 +JOEL=29 +AMOS=30 +OBADJA=31 +JONA=32 +MICHA=33 +NAHUM=34 +HABAKUK=35 +ZEFANJA=36 +ZEPHANJA=36 +HAGGAI=37 +SACHARJA=38 +MALEACHI=39 +MATTHÄUS=40 +MARKUS=41 +LUKAS=42 +JOHANNES=43 +APOSTELGESCHICHTE=44 +RÖMER=45 + +1. KORINTHER=46 +1 KORINTHER=46 +1KORINTHER=46 +1KOR=46 + +2. KORINTHER=47 +2 KORINTHER=47 +2KORINTHER=47 +2KOR=47 + +GALATER=48 +EPHESER=49 +PHILIPPER=50 +KOLOSSER=51 + +1. THESSALONICHER=52 +1 THESSALONICHER=52 +1THESSALONICHER=52 +1THESS=52 + +2. THESSALONICHER=53 +2 THESSALONICHER=53 +2THESSALONICHER=53 +2THESS=53 + +1. TIMOTHEUS=54 +1 TIMOTHEUS=54 +1TIMOTHEUS=54 +1TIM=54 + +2. TIMOTHEUS=55 +2 TIMOTHEUS=55 +2TIMOTHEUS=55 +2TIM=55 + +TITUS=56 +PHILEMON=57 +HEBRÄER=58 +JAKOBUS=59 + +1. PETRUS=60 +1 PETRUS=60 +1PETRUS=60 +1PET=60 + +2. PETRUS=61 +2 PETRUS=61 +2PETRUS=61 +2PET=61 + +1. JOHANNES=62 +1 JOHANNES=62 +1JOHANNES=62 +1JOH=62 + +2. JOHANNES=63 +2 JOHANNES=63 +2JOHANNES=63 +2JOH=63 + +3. JOHANNES=64 +3 JOHANNES=64 +3JOHANNES=64 +3JOH=64 + +JUDAS=65 + +OFFENBARUNG=66 +OFFB=66 +APC=66 diff --git a/locales.d/de_abbrev-utf8.conf b/locales.d/de_abbrev-utf8.conf new file mode 100644 index 0000000..09a34a2 --- /dev/null +++ b/locales.d/de_abbrev-utf8.conf @@ -0,0 +1,331 @@ +# +# German Bible bookname abbreviations -- derived from the "Loccumer Richtlinien" +# Corrections & Contributions welcome +# +# Martin Gruner mg.pub@gmx.net +# + +[Meta] +Name=de_abbrev +Description=German abbreviations (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=1Mo +Exodus=2Mo +Leviticus=3Mo +Numbers=4Mo +Deuteronomy=5Mo +Joshua=Jos +Judges=Ri +Ruth=Rut +I Samuel=1Sam +II Samuel=2Sam +I Kings=1Kön +II Kings=2Kön +I Chronicles=1Chr +II Chronicles=2Chr +Ezra=Esra +Nehemiah=Neh +Esther=Est +Job=Hiob +Psalms=Ps +Proverbs=Spr +Ecclesiastes=Pred +Song of Solomon=Hld +Isaiah=Jes +Jeremiah=Jer +Lamentations=Klgl +Ezekiel=Hes +Daniel=Dan +Hosea=Hos +Joel=Joel +Amos=Am +Obadiah=Obd +Jonah=Jona +Micah=Mi +Nahum=Nah +Habakkuk=Hab +Zephaniah=Zef +Haggai=Hag +Zechariah=Sach +Malachi=Mal +Matthew=Mt +Mark=Mk +Luke=Lk +John=Joh +Acts=Apg +Romans=Röm +I Corinthians=1Kor +II Corinthians=2Kor +Galatians=Gal +Ephesians=Eph +Philippians=Phil +Colossians=Kol +I Thessalonians=1Thess +II Thessalonians=2Thess +I Timothy=1Tim +II Timothy=2Tim +Titus=Tit +Philemon=Phlm +Hebrews=Heb +James=Jak +I Peter=1Pet +II Peter=2Pet +I John=1Joh +II John=2Joh +III John=3Joh +Jude=Jud +Revelation of John=Offb + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1MO=1 +2MO=2 +3MO=3 +4MO=4 +5MO=5 +JOS=6 +RI=7 +RUT=8 +1SAM=9 +2SAMUEL=10 +1KÖN=11 +2KÖN=12 +1CHR=13 +2CHR=14 +ESRA=15 +NEH=16 +EST=17 +HIOB=18 +PS=19 +SPR=20 +PRED=21 +HLD=22 +JES=23 +JER=24 +KLGL=25 +HESL=26 +DAN=27 +HOS=28 +JOEL=29 +AM=30 +OBD=31 +JONA=32 +MI=33 +NAH=34 +HAB=35 +ZEF=36 +HAG=37 +SACH=38 +MAL=39 +MT=40 +MK=41 +LK=42 +JOH=43 +APG=44 +RÖM=45 +1KOR=46 +2KOR=47 +GAL=48 +EPH=49 +PHIL=50 +KOL=51 +1THESS=52 +2THESS=53 +1TIM=54 +2TIM=55 +TIT=56 +PHLM=57 +HEB=58 +JAK=59 +1PET=60 +2PET=61 +1JOH=62 +2JOH=63 +3JOH=64 +JUD=65 +OFFB=66 diff --git a/locales.d/de_abbrev.conf b/locales.d/de_abbrev.conf new file mode 100644 index 0000000..c34cb94 --- /dev/null +++ b/locales.d/de_abbrev.conf @@ -0,0 +1,331 @@ +# +# German Bible bookname abbreviations -- derived from the "Loccumer Richtlinien" +# Corrections & Contributions welcome +# +# Martin Gruner mg.pub@gmx.net +# + +[Meta] +Name=de_abbrev +Description=German abbreviations +Encoding=ISO8859-1 + +[Text] +Genesis=1Mo +Exodus=2Mo +Leviticus=3Mo +Numbers=4Mo +Deuteronomy=5Mo +Joshua=Jos +Judges=Ri +Ruth=Rut +I Samuel=1Sam +II Samuel=2Sam +I Kings=1Kön +II Kings=2Kön +I Chronicles=1Chr +II Chronicles=2Chr +Ezra=Esra +Nehemiah=Neh +Esther=Est +Job=Hiob +Psalms=Ps +Proverbs=Spr +Ecclesiastes=Pred +Song of Solomon=Hld +Isaiah=Jes +Jeremiah=Jer +Lamentations=Klgl +Ezekiel=Hes +Daniel=Dan +Hosea=Hos +Joel=Joel +Amos=Am +Obadiah=Obd +Jonah=Jona +Micah=Mi +Nahum=Nah +Habakkuk=Hab +Zephaniah=Zef +Haggai=Hag +Zechariah=Sach +Malachi=Mal +Matthew=Mt +Mark=Mk +Luke=Lk +John=Joh +Acts=Apg +Romans=Röm +I Corinthians=1Kor +II Corinthians=2Kor +Galatians=Gal +Ephesians=Eph +Philippians=Phil +Colossians=Kol +I Thessalonians=1Thess +II Thessalonians=2Thess +I Timothy=1Tim +II Timothy=2Tim +Titus=Tit +Philemon=Phlm +Hebrews=Heb +James=Jak +I Peter=1Pet +II Peter=2Pet +I John=1Joh +II John=2Joh +III John=3Joh +Jude=Jud +Revelation of John=Offb + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1MO=1 +2MO=2 +3MO=3 +4MO=4 +5MO=5 +JOS=6 +RI=7 +RUT=8 +1SAM=9 +2SAMUEL=10 +1KÖN=11 +2KÖN=12 +1CHR=13 +2CHR=14 +ESRA=15 +NEH=16 +EST=17 +HIOB=18 +PS=19 +SPR=20 +PRED=21 +HLD=22 +JES=23 +JER=24 +KLGL=25 +HESL=26 +DAN=27 +HOS=28 +JOEL=29 +AM=30 +OBD=31 +JONA=32 +MI=33 +NAH=34 +HAB=35 +ZEF=36 +HAG=37 +SACH=38 +MAL=39 +MT=40 +MK=41 +LK=42 +JOH=43 +APG=44 +RÖM=45 +1KOR=46 +2KOR=47 +GAL=48 +EPH=49 +PHIL=50 +KOL=51 +1THESS=52 +2THESS=53 +1TIM=54 +2TIM=55 +TIT=56 +PHLM=57 +HEB=58 +JAK=59 +1PET=60 +2PET=61 +1JOH=62 +2JOH=63 +3JOH=64 +JUD=65 +OFFB=66 diff --git a/locales.d/en_GB.conf b/locales.d/en_GB.conf new file mode 100644 index 0000000..032c751 --- /dev/null +++ b/locales.d/en_GB.conf @@ -0,0 +1,258 @@ +[Meta] +Name=en_GB +Description=English (UK) +Encoding=ASCII + +[Text] +Genesis=Genesis +Exodus=Exodus +Leviticus=Leviticus +Numbers=Numbers +Deuteronomy=Deuteronomy +Joshua=Joshua +Judges=Judges +Ruth=Ruth +I Samuel=I Samuel +II Samuel=II Samuel +I Kings=I Kings +II Kings=II Kings +I Chronicles=I Chronicles +II Chronicles=II Chronicles +Ezra=Ezra +Nehemiah=Nehemiah +Esther=Esther +Job=Job +Psalms=Psalms +Proverbs=Proverbs +Ecclesiastes=Ecclesiastes +Song of Solomon=Song of Solomon +Isaiah=Isaiah +Jeremiah=Jeremiah +Lamentations=Lamentations +Ezekiel=Ezekiel +Daniel=Daniel +Hosea=Hosea +Joel=Joel +Amos=Amos +Obadiah=Obadiah +Jonah=Jonah +Micah=Micah +Nahum=Nahum +Habakkuk=Habakkuk +Zephaniah=Zephaniah +Haggai=Haggai +Zechariah=Zechariah +Malachi=Malachi +Matthew=Matthew +Mark=Mark +Luke=Luke +John=John +Acts=Acts +Romans=Romans +I Corinthians=I Corinthians +II Corinthians=II Corinthians +Galatians=Galatians +Ephesians=Ephesians +Philippians=Philippians +Colossians=Colossians +I Thessalonians=I Thessalonians +II Thessalonians=II Thessalonians +I Timothy=I Timothy +II Timothy=II Timothy +Titus=Titus +Philemon=Philemon +Hebrews=Hebrews +James=James +I Peter=I Peter +II Peter=II Peter +I John=I John +II John=II John +III John=III John +Jude=Jude +Revelation of John=Revelation of John + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 diff --git a/locales.d/es-utf8.conf b/locales.d/es-utf8.conf new file mode 100644 index 0000000..fd3b779 --- /dev/null +++ b/locales.d/es-utf8.conf @@ -0,0 +1,391 @@ +[Meta] +Name=es +Description=Spanish (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Génesis +Exodus=Éxodo +Leviticus=Levítico +Numbers=Números +Deuteronomy=Deuteronomio +Joshua=Josué +Judges=Jueces +Ruth=Rut +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Reyes +II Kings=2 Reyes +I Chronicles=1 Crónicas +II Chronicles=2 Crónicas +Ezra=Esdras +Nehemiah=Nehemías +Esther=Ester +Job=Job +Psalms=Salmos +Proverbs=Proverbios +Ecclesiastes=Eclesiastés +Song of Solomon=Cantares +Isaiah=Isaías +Jeremiah=Jeremías +Lamentations=Lamentaciones +Ezekiel=Ezequiel +Daniel=Daniel +Hosea=Oseas +Joel=Joel +Amos=Amós +Obadiah=Abdías +Jonah=Jonás +Micah=Miqueas +Nahum=Nahum +Habakkuk=Habacuc +Zephaniah=Sofonías +Haggai=Hageo +Zechariah=Zacarías +Malachi=Malaquías +Matthew=Mateo +Mark=Marcos +Luke=Lucas +John=Juan +Acts=Hechos +Romans=Romanos +I Corinthians=1 Corintios +II Corinthians=2 Corintios +Galatians=Gálatas +Ephesians=Efesios +Philippians=Filipenses +Colossians=Colosenses +I Thessalonians=1 Tesalonicenses +II Thessalonians=2 Tesalonicenses +I Timothy=1 Timoteo +II Timothy=2 Timoteo +Titus=Tito +Philemon=Filemón +Hebrews=Hebreos +James=Santiago +I Peter=1 Pedro +II Peter=2 Pedro +I John=1 Juan +II John=2 Juan +III John=3 Juan +Jude=Judas +Revelation of John=Apocalipsis + +[Book Abbrevs] + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GÉNESIS=1 +GN=1 +ÉXODO=2 +EX=2 +LEVÃTICO=3 +LV=3 +NÚMEROS=4 +NM=4 +DEUTERONOMIO=5 +DT=5 +JOSUÉ=6 +JOS=6 +JUECES=7 +JUE=7 +RUT=8 +RT=8 +1 SAMUEL=9 +1S=9 +2 SAMUEL=10 +2S=10 +1 REYES=11 +1R=11 +2 REYES=12 +2R=12 +1 CRÓNICAS=13 +1CR=13 +2 CRÓNICAS=14 +2CR=14 +ESDRAS=15 +ESD=15 +NEHEMÃAS=16 +NEH=16 +ESTER=17 +EST=17 +JOB=18 +SALMOS=19 +SAL=19 +PROVERBIOS=20 +PR=20 +ECLESIASTÉS=21 +EC=21 +CANTARES=22 +CNT=22 +ISAÃAS=23 +IS=23 +JEREMÃAS=24 +JER=24 +LAMENTACIONES=25 +LM=25 +EZEQUIEL=26 +EZ=26 +DANIEL=27 +DN=27 +OSEAS=28 +OS=28 +JOEL=29 +JL=29 +AMÓS=30 +AM=30 +ABDÃAS=31 +ABD=31 +JONÃS=32 +JON=32 +MIQUEAS=33 +MI=33 +NAHUM=34 +NAH=34 +HABACUC=35 +HAB=35 +SOFONÃAS=36 +SOF=36 +HAGEO=37 +HAG=37 +ZACARÃAS=38 +ZAC=38 +MALAQUÃAS=39 +MAL=39 +MATEO=40 +MT=40 +MARCOS=41 +MR=41 +LUCAS=42 +LC=42 +JUAN=43 +JN=43 +HECHOS=44 +HCH=44 +ROMANOS=45 +RO=45 +1 CORINTIOS=46 +1CO=46 +2 CORINTIOS=47 +2CO=47 +GÃLATAS=48 +GÃ=48 +EFESIOS=49 +EF=49 +FILIPENSES=50 +FIL=50 +COLOSENSES=51 +COL=51 +1 TESALONICENSES=52 +1TS=52 +2 TESALONICENSES=53 +2TS=53 +1 TIMOTEO=54 +1TI=54 +2 TIMOTEO=55 +2TI=55 +TITO=56 +TIT=56 +FILEMÓN=57 +FLM=57 +HEBREOS=58 +HE=58 +SANTIAGO=59 +STG=59 +1 PEDRO=60 +1P=60 +2 PEDRO=61 +2P=61 +1 JUAN=62 +1JN=62 +2 JUAN=63 +2JN=63 +3 JUAN=64 +3JN=64 +JUDAS=65 +JUD=65 +APOCALIPSIS=66 +AP=66 diff --git a/locales.d/es.conf b/locales.d/es.conf new file mode 100644 index 0000000..3b80060 --- /dev/null +++ b/locales.d/es.conf @@ -0,0 +1,391 @@ +[Meta] +Name=es +Description=Spanish +Encoding=ISO8859-1 + +[Text] +Genesis=Génesis +Exodus=Éxodo +Leviticus=Levítico +Numbers=Números +Deuteronomy=Deuteronomio +Joshua=Josué +Judges=Jueces +Ruth=Rut +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Reyes +II Kings=2 Reyes +I Chronicles=1 Crónicas +II Chronicles=2 Crónicas +Ezra=Esdras +Nehemiah=Nehemías +Esther=Ester +Job=Job +Psalms=Salmos +Proverbs=Proverbios +Ecclesiastes=Eclesiastés +Song of Solomon=Cantares +Isaiah=Isaías +Jeremiah=Jeremías +Lamentations=Lamentaciones +Ezekiel=Ezequiel +Daniel=Daniel +Hosea=Oseas +Joel=Joel +Amos=Amós +Obadiah=Abdías +Jonah=Jonás +Micah=Miqueas +Nahum=Nahum +Habakkuk=Habacuc +Zephaniah=Sofonías +Haggai=Hageo +Zechariah=Zacarías +Malachi=Malaquías +Matthew=Mateo +Mark=Marcos +Luke=Lucas +John=Juan +Acts=Hechos +Romans=Romanos +I Corinthians=1 Corintios +II Corinthians=2 Corintios +Galatians=Gálatas +Ephesians=Efesios +Philippians=Filipenses +Colossians=Colosenses +I Thessalonians=1 Tesalonicenses +II Thessalonians=2 Tesalonicenses +I Timothy=1 Timoteo +II Timothy=2 Timoteo +Titus=Tito +Philemon=Filemón +Hebrews=Hebreos +James=Santiago +I Peter=1 Pedro +II Peter=2 Pedro +I John=1 Juan +II John=2 Juan +III John=3 Juan +Jude=Judas +Revelation of John=Apocalipsis + +[Book Abbrevs] + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GÉNESIS=1 +GN=1 +ÉXODO=2 +EX=2 +LEVÍTICO=3 +LV=3 +NÚMEROS=4 +NM=4 +DEUTERONOMIO=5 +DT=5 +JOSUÉ=6 +JOS=6 +JUECES=7 +JUE=7 +RUT=8 +RT=8 +1 SAMUEL=9 +1S=9 +2 SAMUEL=10 +2S=10 +1 REYES=11 +1R=11 +2 REYES=12 +2R=12 +1 CRÓNICAS=13 +1CR=13 +2 CRÓNICAS=14 +2CR=14 +ESDRAS=15 +ESD=15 +NEHEMÍAS=16 +NEH=16 +ESTER=17 +EST=17 +JOB=18 +SALMOS=19 +SAL=19 +PROVERBIOS=20 +PR=20 +ECLESIASTÉS=21 +EC=21 +CANTARES=22 +CNT=22 +ISAÍAS=23 +IS=23 +JEREMÍAS=24 +JER=24 +LAMENTACIONES=25 +LM=25 +EZEQUIEL=26 +EZ=26 +DANIEL=27 +DN=27 +OSEAS=28 +OS=28 +JOEL=29 +JL=29 +AMÓS=30 +AM=30 +ABDÍAS=31 +ABD=31 +JONÁS=32 +JON=32 +MIQUEAS=33 +MI=33 +NAHUM=34 +NAH=34 +HABACUC=35 +HAB=35 +SOFONÍAS=36 +SOF=36 +HAGEO=37 +HAG=37 +ZACARÍAS=38 +ZAC=38 +MALAQUÍAS=39 +MAL=39 +MATEO=40 +MT=40 +MARCOS=41 +MR=41 +LUCAS=42 +LC=42 +JUAN=43 +JN=43 +HECHOS=44 +HCH=44 +ROMANOS=45 +RO=45 +1 CORINTIOS=46 +1CO=46 +2 CORINTIOS=47 +2CO=47 +GÁLATAS=48 +GÁ=48 +EFESIOS=49 +EF=49 +FILIPENSES=50 +FIL=50 +COLOSENSES=51 +COL=51 +1 TESALONICENSES=52 +1TS=52 +2 TESALONICENSES=53 +2TS=53 +1 TIMOTEO=54 +1TI=54 +2 TIMOTEO=55 +2TI=55 +TITO=56 +TIT=56 +FILEMÓN=57 +FLM=57 +HEBREOS=58 +HE=58 +SANTIAGO=59 +STG=59 +1 PEDRO=60 +1P=60 +2 PEDRO=61 +2P=61 +1 JUAN=62 +1JN=62 +2 JUAN=63 +2JN=63 +3 JUAN=64 +3JN=64 +JUDAS=65 +JUD=65 +APOCALIPSIS=66 +AP=66 diff --git a/locales.d/et-utf8.conf b/locales.d/et-utf8.conf new file mode 100644 index 0000000..59696e3 --- /dev/null +++ b/locales.d/et-utf8.conf @@ -0,0 +1,494 @@ +[Meta] +Name=et +Description=Estonian (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=1. Moosese +Exodus=2. Moosese +Leviticus=3. Moosese +Numbers=4. Moosese +Deuteronomy=5. Moosese +Joshua=Joosua +Judges=Kohtumõistjate +Ruth=Rutt +I Samuel=1. Saamueli +II Samuel=2. Saamueli +I Kings=1. Kuningate +II Kings=2. Kuningate +I Chronicles=1. Ajaraamat +II Chronicles=2. Ajaraamat +Ezra=Esra +Nehemiah=Nehemja +Esther=Ester +Job=Iiob +Psalms=Laulud +Proverbs=Õpetussõnad +Ecclesiastes=Koguja +Song of Solomon=Ãœlemlaul +Isaiah=Jesaja +Jeremiah=Jeremija +Lamentations=Nutulaulud +Ezekiel=Hesekiel +Daniel=Taaniel +Hosea=Hoosea +Joel=Joel +Amos=Aamos +Obadiah=Obadja +Jonah=Joona +Micah=Miika +Nahum=Nahum +Habakkuk=Habakuk +Zephaniah=Sefanja +Haggai=Haggai +Zechariah=Sakarja +Malachi=Malaki +Matthew=Matteuse +Mark=Markuse +Luke=Luuka +John=Johannese +Acts=Apostlite Teod +Romans=Roomlastele +I Corinthians=1. Korintlastele +II Corinthians=2. Korintlastele +Galatians=Galaatlastele +Ephesians=Efeslastele +Philippians=Filiplastele +Colossians=Koloslastele +I Thessalonians=1. Tessalooniklastele +II Thessalonians=2. Tessalooniklastele +I Timothy=1. Timoteosele +II Timothy=2. Timoteosele +Titus=Tiitusele +Philemon=Fileemonile +Hebrews=Heebrealastele +James=Jaakobuse +I Peter=1. Peetruse +II Peter=2. Peetruse +I John=1. Johannese +II John=2. Johannese +III John=3. Johannese +Jude=Juuda +Revelation of John=Ilmutuse + +[Book Abbrevs] + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1MO=1 +1MS=1 +G=1 +GE=1 +1. MOOSESE=1 +1 MOOSESE=1 +1MOOSESE=1 + +2MO=2 +2MS=2 +EX=2 +2. MOOSESE=2 +2 MOOSESE=2 +2MOOSESE=2 + +3MO=3 +3MS=3 +LEV=3 +3. MOOSESE=3 +3 MOOSESE=3 +3MOOSESE=3 + +4MO=4 +4MS=4 +NU=4 +4. MOOSESE=4 +4 MOOSESE=4 +4MOOSESE=4 + +5MO=5 +5MS=5 +DT=5 +5. MOOSESE=5 +5 MOOSESE=5 +5MOOSESE=5 + +JO=6 +JOOSUA=6 +KM=7 +KOHTUMÕISTJATE=7 +RU=8 +RUTT=8 + +1SM=9 +1. SAAMUELI=9 +1 SAAMUELI=9 +1SAAMUELI=9 + +2SM=10 +2. SAAMUELI=10 +2 SAAMUELI=10 +2SAAMUELI=10 + +1KN=11 +1KU=11 +1. KUNINGATE=11 +1 KUNINGATE=11 +1KUNINGATE=11 + +2KN=12 +2KU=12 +2. KUNINGATE=12 +2 KUNINGATE=12 +2KUNINGATE=12 + +1AJ=13 +1. AJARAAMAT=13 +1 AJARAAMAT=13 +1AJARAAMAT=13 + +2AJ=14 +2. AJARAAMAT=14 +2 AJARAAMAT=14 +2AJARAAMAT=14 + +ES=15 +ESRA=15 +NE=16 +NEHEMJA=16 +EST=17 +ESTER=17 +II=18 +IIOB=18 +PS=19 +LA=19 +PSALMID=19 +LAULUD=19 +ÕP=20 +ÕPETUSSÕNAD=20 +KG=21 +KOGUJA=21 +ÃœL=22 +ÃœLEMLAUL=22 +JS=23 +JESAJA=23 +JR=24 +JEREMIJA=24 +NL=25 +NUTULAULUD=25 +HS=26 +HESEKIEL=26 +TA=27 +TAANIEL=27 +HO=28 +HOOSEA=28 +JL=29 +JOEL=29 +AM=30 +AAMOS=30 +OB=31 +OBADJA=31 +JN=32 +JOONA=32 +MI=33 +MIIKA=33 +NA=34 +NAHUM=34 +HA=35 +HABAKUK=35 +SF=36 +SEFANJA=36 +HG=37 +HAGGAI=37 +SK=38 +SAKARJA=38 +ML=39 +MALAKI=39 +MT=40 +MAT=40 +MATTEUSE=40 +MK=41 +MAR=41 +MARKUSE=41 +LU=42 +LK=42 +LUUKA=42 +JH=43 +JOHANNESE=43 +AP=44 +APT=44 +APOSTLITE TEOD=44 +RO=45 +RM=45 +ROOMLASTELE=45 + +1KO=46 +1KR=46 +1KORINTLASTELE=46 +1. KORINTLASTELE=46 +1 KORINTLASTELE=46 + +2KO=47 +2KR=47 +2KORINTLASTELE=47 +2. KORINTLASTELE=47 +2 KORINTLASTELE=47 + +GL=48 +GALAATLASTELE=48 +EF=49 +EFESLASTELE=49 +FI=50 +FILIPLASTELE=50 +KO=51 +KL=51 +KOLOSLASTELE=51 + +1TS=52 +1TE=52 +1. TESSALOONIKLASTELE=52 +1 TESSALOONIKLASTELE=52 +1TESSALOONIKLASTELE=52 + +2TS=53 +2TE=53 +2. TESSALOONIKLASTELE=53 +2 TESSALOONIKLASTELE=53 +2TESSALOONIKLASTELE=53 + +1TM=54 +1TI=54 +1. TIMOTEOSELE=54 +1 TIMOTEOSELE=54 +1TIMOTEOSELE=54 + +2TM=55 +2TI=55 +2. TIMOTEOSELE=55 +2 TIMOTEOSELE=55 +2TIMOTEOSELE=55 + +TI=56 +TIITUSELE=56 +FL=57 +FM=57 +FILEEMONILE=57 +HE=58 +HB=58 +HEEBREALASTELE=58 +JK=59 +JAAKOBUSE=59 + +1PT=60 +1PE=60 +1. PEETRUSE=60 +1 PEETRUSE=60 +1PEETRUSE=60 + +2PT=61 +2PE=61 +2. PEETRUSE=61 +2 PEETRUSE=61 +2PEETRUSE=61 + +1JH=62 +1. JOHANNESE=62 +1 JOHANNESE=62 +1JOHANNESE=62 + +2JH=63 +2. JOHANNESE=63 +2 JOHANNESE=63 +2JOHANNESE=63 + +3JH=64 +3. JOHANNESE=64 +3 JOHANNESE=64 +3JOHANNESE=64 + +JU=65 +JD=65 +JUUDA=65 +ILM=66 +ILMUTUSE=66 diff --git a/locales.d/et.conf b/locales.d/et.conf new file mode 100644 index 0000000..a97a878 --- /dev/null +++ b/locales.d/et.conf @@ -0,0 +1,494 @@ +[Meta] +Name=et +Description=Estonian +Encoding=ISO8859-1 + +[Text] +Genesis=1. Moosese +Exodus=2. Moosese +Leviticus=3. Moosese +Numbers=4. Moosese +Deuteronomy=5. Moosese +Joshua=Joosua +Judges=Kohtumõistjate +Ruth=Rutt +I Samuel=1. Saamueli +II Samuel=2. Saamueli +I Kings=1. Kuningate +II Kings=2. Kuningate +I Chronicles=1. Ajaraamat +II Chronicles=2. Ajaraamat +Ezra=Esra +Nehemiah=Nehemja +Esther=Ester +Job=Iiob +Psalms=Laulud +Proverbs=Õpetussõnad +Ecclesiastes=Koguja +Song of Solomon=Ülemlaul +Isaiah=Jesaja +Jeremiah=Jeremija +Lamentations=Nutulaulud +Ezekiel=Hesekiel +Daniel=Taaniel +Hosea=Hoosea +Joel=Joel +Amos=Aamos +Obadiah=Obadja +Jonah=Joona +Micah=Miika +Nahum=Nahum +Habakkuk=Habakuk +Zephaniah=Sefanja +Haggai=Haggai +Zechariah=Sakarja +Malachi=Malaki +Matthew=Matteuse +Mark=Markuse +Luke=Luuka +John=Johannese +Acts=Apostlite Teod +Romans=Roomlastele +I Corinthians=1. Korintlastele +II Corinthians=2. Korintlastele +Galatians=Galaatlastele +Ephesians=Efeslastele +Philippians=Filiplastele +Colossians=Koloslastele +I Thessalonians=1. Tessalooniklastele +II Thessalonians=2. Tessalooniklastele +I Timothy=1. Timoteosele +II Timothy=2. Timoteosele +Titus=Tiitusele +Philemon=Fileemonile +Hebrews=Heebrealastele +James=Jaakobuse +I Peter=1. Peetruse +II Peter=2. Peetruse +I John=1. Johannese +II John=2. Johannese +III John=3. Johannese +Jude=Juuda +Revelation of John=Ilmutuse + +[Book Abbrevs] + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1MO=1 +1MS=1 +G=1 +GE=1 +1. MOOSESE=1 +1 MOOSESE=1 +1MOOSESE=1 + +2MO=2 +2MS=2 +EX=2 +2. MOOSESE=2 +2 MOOSESE=2 +2MOOSESE=2 + +3MO=3 +3MS=3 +LEV=3 +3. MOOSESE=3 +3 MOOSESE=3 +3MOOSESE=3 + +4MO=4 +4MS=4 +NU=4 +4. MOOSESE=4 +4 MOOSESE=4 +4MOOSESE=4 + +5MO=5 +5MS=5 +DT=5 +5. MOOSESE=5 +5 MOOSESE=5 +5MOOSESE=5 + +JO=6 +JOOSUA=6 +KM=7 +KOHTUMÕISTJATE=7 +RU=8 +RUTT=8 + +1SM=9 +1. SAAMUELI=9 +1 SAAMUELI=9 +1SAAMUELI=9 + +2SM=10 +2. SAAMUELI=10 +2 SAAMUELI=10 +2SAAMUELI=10 + +1KN=11 +1KU=11 +1. KUNINGATE=11 +1 KUNINGATE=11 +1KUNINGATE=11 + +2KN=12 +2KU=12 +2. KUNINGATE=12 +2 KUNINGATE=12 +2KUNINGATE=12 + +1AJ=13 +1. AJARAAMAT=13 +1 AJARAAMAT=13 +1AJARAAMAT=13 + +2AJ=14 +2. AJARAAMAT=14 +2 AJARAAMAT=14 +2AJARAAMAT=14 + +ES=15 +ESRA=15 +NE=16 +NEHEMJA=16 +EST=17 +ESTER=17 +II=18 +IIOB=18 +PS=19 +LA=19 +PSALMID=19 +LAULUD=19 +ÕP=20 +ÕPETUSSÕNAD=20 +KG=21 +KOGUJA=21 +ÜL=22 +ÜLEMLAUL=22 +JS=23 +JESAJA=23 +JR=24 +JEREMIJA=24 +NL=25 +NUTULAULUD=25 +HS=26 +HESEKIEL=26 +TA=27 +TAANIEL=27 +HO=28 +HOOSEA=28 +JL=29 +JOEL=29 +AM=30 +AAMOS=30 +OB=31 +OBADJA=31 +JN=32 +JOONA=32 +MI=33 +MIIKA=33 +NA=34 +NAHUM=34 +HA=35 +HABAKUK=35 +SF=36 +SEFANJA=36 +HG=37 +HAGGAI=37 +SK=38 +SAKARJA=38 +ML=39 +MALAKI=39 +MT=40 +MAT=40 +MATTEUSE=40 +MK=41 +MAR=41 +MARKUSE=41 +LU=42 +LK=42 +LUUKA=42 +JH=43 +JOHANNESE=43 +AP=44 +APT=44 +APOSTLITE TEOD=44 +RO=45 +RM=45 +ROOMLASTELE=45 + +1KO=46 +1KR=46 +1KORINTLASTELE=46 +1. KORINTLASTELE=46 +1 KORINTLASTELE=46 + +2KO=47 +2KR=47 +2KORINTLASTELE=47 +2. KORINTLASTELE=47 +2 KORINTLASTELE=47 + +GL=48 +GALAATLASTELE=48 +EF=49 +EFESLASTELE=49 +FI=50 +FILIPLASTELE=50 +KO=51 +KL=51 +KOLOSLASTELE=51 + +1TS=52 +1TE=52 +1. TESSALOONIKLASTELE=52 +1 TESSALOONIKLASTELE=52 +1TESSALOONIKLASTELE=52 + +2TS=53 +2TE=53 +2. TESSALOONIKLASTELE=53 +2 TESSALOONIKLASTELE=53 +2TESSALOONIKLASTELE=53 + +1TM=54 +1TI=54 +1. TIMOTEOSELE=54 +1 TIMOTEOSELE=54 +1TIMOTEOSELE=54 + +2TM=55 +2TI=55 +2. TIMOTEOSELE=55 +2 TIMOTEOSELE=55 +2TIMOTEOSELE=55 + +TI=56 +TIITUSELE=56 +FL=57 +FM=57 +FILEEMONILE=57 +HE=58 +HB=58 +HEEBREALASTELE=58 +JK=59 +JAAKOBUSE=59 + +1PT=60 +1PE=60 +1. PEETRUSE=60 +1 PEETRUSE=60 +1PEETRUSE=60 + +2PT=61 +2PE=61 +2. PEETRUSE=61 +2 PEETRUSE=61 +2PEETRUSE=61 + +1JH=62 +1. JOHANNESE=62 +1 JOHANNESE=62 +1JOHANNESE=62 + +2JH=63 +2. JOHANNESE=63 +2 JOHANNESE=63 +2JOHANNESE=63 + +3JH=64 +3. JOHANNESE=64 +3 JOHANNESE=64 +3JOHANNESE=64 + +JU=65 +JD=65 +JUUDA=65 +ILM=66 +ILMUTUSE=66 diff --git a/locales.d/et_abbr-utf8.conf b/locales.d/et_abbr-utf8.conf new file mode 100644 index 0000000..17d05fa --- /dev/null +++ b/locales.d/et_abbr-utf8.conf @@ -0,0 +1,495 @@ +[Meta] +Name=et_abbrev +Description=Estonian abbreviations (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=1Ms +Exodus=2Ms +Leviticus=3Ms +Numbers=4Ms +Deuteronomy=5Ms +Joshua=Jos +Judges=Km +Ruth=Rt +I Samuel=1Sm +II Samuel=2Sm +I Kings=1Kn +II Kings=2Kn +I Chronicles=1Aj +II Chronicles=2Aj +Ezra=Esr +Nehemiah=Ne +Esther=Est +Job=Ii +Psalms=Ps +Proverbs=Õp +Ecclesiastes=Kg +Song of Solomon=Ãœl +Isaiah=Js +Jeremiah=Jr +Lamentations=Nl +Ezekiel=Hs +Daniel=Tn +Hosea=Ho +Joel=Jl +Amos=Am +Obadiah=Ob +Jonah=Jn +Micah=Mi +Nahum=Na +Habakkuk=Ha +Zephaniah=Sf +Haggai=Hg +Zechariah=Sk +Malachi=Ml +Matthew=Mt +Mark=Mk +Luke=Lk +John=Jh +Acts=Ap +Romans=Rm +I Corinthians=1Kr +II Corinthians=2Kr +Galatians=Gl +Ephesians=Ef +Philippians=Fl +Colossians=Kl +I Thessalonians=1Ts +II Thessalonians=2Ts +I Timothy=1Tm +II Timothy=2Tm +Titus=Tt +Philemon=Fm +Hebrews=Hb +James=Jk +I Peter=1Pt +II Peter=2Pt +I John=1Jh +II John=2Jh +III John=3Jh +Jude=Jd +Revelation of John=Ilm + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1MO=1 +1MS=1 +G=1 +GE=1 +1. MOOSESE=1 +1 MOOSESE=1 +1MOOSESE=1 + +2MO=2 +2MS=2 +EX=2 +2. MOOSESE=2 +2 MOOSESE=2 +2MOOSESE=2 + +3MO=3 +3MS=3 +LEV=3 +3. MOOSESE=3 +3 MOOSESE=3 +3MOOSESE=3 + +4MO=4 +4MS=4 +NU=4 +4. MOOSESE=4 +4 MOOSESE=4 +4MOOSESE=4 + +5MO=5 +5MS=5 +DT=5 +5. MOOSESE=5 +5 MOOSESE=5 +5MOOSESE=5 + +JO=6 +JOOSUA=6 +KM=7 +KOHTUMÕISTJATE=7 + +RT=8 +RU=8 +RUTT=8 + +1SM=9 +1. SAAMUELI=9 +1 SAAMUELI=9 +1SAAMUELI=9 + +2SM=10 +2. SAAMUELI=10 +2 SAAMUELI=10 +2SAAMUELI=10 + +1KN=11 +1KU=11 +1. KUNINGATE=11 +1 KUNINGATE=11 +1KUNINGATE=11 + +2KN=12 +2KU=12 +2. KUNINGATE=12 +2 KUNINGATE=12 +2KUNINGATE=12 + +1AJ=13 +1. AJARAAMAT=13 +1 AJARAAMAT=13 +1AJARAAMAT=13 + +2AJ=14 +2. AJARAAMAT=14 +2 AJARAAMAT=14 +2AJARAAMAT=14 + +ES=15 +ESRA=15 +NE=16 +NEHEMJA=16 +EST=17 +ESTER=17 +II=18 +IIOB=18 +PS=19 +LA=19 +PSALMID=19 +LAULUD=19 +ÕP=20 +ÕPETUSSÕNAD=20 +KG=21 +KOGUJA=21 +ÃœL=22 +ÃœLEMLAUL=22 +JS=23 +JESAJA=23 +JR=24 +JEREMIJA=24 +NL=25 +NUTULAULUD=25 +HS=26 +HESEKIEL=26 +TA=27 +TN=27 +TAANIEL=27 +HO=28 +HOOSEA=28 +JL=29 +JOEL=29 +AM=30 +AAMOS=30 +OB=31 +OBADJA=31 +JN=32 +JOONA=32 +MI=33 +MIIKA=33 +NA=34 +NAHUM=34 +HA=35 +HABAKUK=35 +SF=36 +SEFANJA=36 +HG=37 +HAGGAI=37 +SK=38 +SAKARJA=38 +ML=39 +MALAKI=39 +MT=40 +MAT=40 +MATTEUSE=40 +MK=41 +MAR=41 +MARKUSE=41 +LU=42 +LK=42 +LUUKA=42 +JH=43 +JOHANNESE=43 +AP=44 +APT=44 +APOSTLITE TEOD=44 +RO=45 +RM=45 +ROOMLASTELE=45 + +1KO=46 +1KR=46 +1KORINTLASTELE=46 +1. KORINTLASTELE=46 +1 KORINTLASTELE=46 + +2KO=47 +2KR=47 +2KORINTLASTELE=47 +2. KORINTLASTELE=47 +2 KORINTLASTELE=47 + +GL=48 +GALAATLASTELE=48 +EF=49 +EFESLASTELE=49 +FI=50 +FILIPLASTELE=50 +KO=51 +KL=51 +KOLOSLASTELE=51 + +1TS=52 +1TE=52 +1. TESSALOONIKLASTELE=52 +1 TESSALOONIKLASTELE=52 +1TESSALOONIKLASTELE=52 + +2TS=53 +2TE=53 +2. TESSALOONIKLASTELE=53 +2 TESSALOONIKLASTELE=53 +2TESSALOONIKLASTELE=53 + +1TM=54 +1TI=54 +1. TIMOTEOSELE=54 +1 TIMOTEOSELE=54 +1TIMOTEOSELE=54 + +2TM=55 +2TI=55 +2. TIMOTEOSELE=55 +2 TIMOTEOSELE=55 +2TIMOTEOSELE=55 + +TI=56 +TIITUSELE=56 +FL=57 +FM=57 +FILEEMONILE=57 +HE=58 +HB=58 +HEEBREALASTELE=58 +JK=59 +JAAKOBUSE=59 + +1PT=60 +1PE=60 +1. PEETRUSE=60 +1 PEETRUSE=60 +1PEETRUSE=60 + +2PT=61 +2PE=61 +2. PEETRUSE=61 +2 PEETRUSE=61 +2PEETRUSE=61 + +1JH=62 +1. JOHANNESE=62 +1 JOHANNESE=62 +1JOHANNESE=62 + +2JH=63 +2. JOHANNESE=63 +2 JOHANNESE=63 +2JOHANNESE=63 + +3JH=64 +3. JOHANNESE=64 +3 JOHANNESE=64 +3JOHANNESE=64 + +JU=65 +JD=65 +JUUDA=65 +ILM=66 +ILMUTUSE=66 diff --git a/locales.d/et_abbr.conf b/locales.d/et_abbr.conf new file mode 100644 index 0000000..3d21005 --- /dev/null +++ b/locales.d/et_abbr.conf @@ -0,0 +1,492 @@ +[Meta] +Name=et_abbrev +Description=Estonian abbreviations +Encoding=ISO8859-1 + +[Text] +Genesis=1Ms +Exodus=2Ms +Leviticus=3Ms +Numbers=4Ms +Deuteronomy=5Ms +Joshua=Jos +Judges=Km +Ruth=Rt +I Samuel=1Sm +II Samuel=2Sm +I Kings=1Kn +II Kings=2Kn +I Chronicles=1Aj +II Chronicles=2Aj +Ezra=Esr +Nehemiah=Ne +Esther=Est +Job=Ii +Psalms=Ps +Proverbs=Õp +Ecclesiastes=Kg +Song of Solomon=Ül +Isaiah=Js +Jeremiah=Jr +Lamentations=Nl +Ezekiel=Hs +Daniel=Tn +Hosea=Ho +Joel=Jl +Amos=Am +Obadiah=Ob +Jonah=Jn +Micah=Mi +Nahum=Na +Habakkuk=Ha +Zephaniah=Sf +Haggai=Hg +Zechariah=Sk +Malachi=Ml +Matthew=Mt +Mark=Mk +Luke=Lk +John=Jh +Acts=Ap +Romans=Rm +I Corinthians=1Kr +II Corinthians=2Kr +Galatians=Gl +Ephesians=Ef +Philippians=Fl +Colossians=Kl +I Thessalonians=1Ts +II Thessalonians=2Ts +I Timothy=1Tm +II Timothy=2Tm +Titus=Tt +Philemon=Fm +Hebrews=Hb +James=Jk +I Peter=1Pt +II Peter=2Pt +I John=1Jh +II John=2Jh +III John=3Jh +Jude=Jd +Revelation of John=Ilm + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1MO=1 +1MS=1 +G=1 +GE=1 +1. MOOSESE=1 +1 MOOSESE=1 +1MOOSESE=1 + +2MO=2 +2MS=2 +EX=2 +2. MOOSESE=2 +2 MOOSESE=2 +2MOOSESE=2 + +3MO=3 +3MS=3 +LEV=3 +3. MOOSESE=3 +3 MOOSESE=3 +3MOOSESE=3 + +4MO=4 +4MS=4 +NU=4 +4. MOOSESE=4 +4 MOOSESE=4 +4MOOSESE=4 + +5MO=5 +5MS=5 +DT=5 +5. MOOSESE=5 +5 MOOSESE=5 +5MOOSESE=5 + +JO=6 +JOOSUA=6 +KM=7 +KOHTUMÕISTJATE=7 +RU=8 +RUTT=8 + +1SM=9 +1. SAAMUELI=9 +1 SAAMUELI=9 +1SAAMUELI=9 + +2SM=10 +2. SAAMUELI=10 +2 SAAMUELI=10 +2SAAMUELI=10 + +1KN=11 +1KU=11 +1. KUNINGATE=11 +1 KUNINGATE=11 +1KUNINGATE=11 + +2KN=12 +2KU=12 +2. KUNINGATE=12 +2 KUNINGATE=12 +2KUNINGATE=12 + +1AJ=13 +1. AJARAAMAT=13 +1 AJARAAMAT=13 +1AJARAAMAT=13 + +2AJ=14 +2. AJARAAMAT=14 +2 AJARAAMAT=14 +2AJARAAMAT=14 + +ES=15 +ESRA=15 +NE=16 +NEHEMJA=16 +EST=17 +ESTER=17 +II=18 +IIOB=18 +PS=19 +LA=19 +PSALMID=19 +LAULUD=19 +ÕP=20 +ÕPETUSSÕNAD=20 +KG=21 +KOGUJA=21 +ÜL=22 +ÜLEMLAUL=22 +JS=23 +JESAJA=23 +JR=24 +JEREMIJA=24 +NL=25 +NUTULAULUD=25 +HS=26 +HESEKIEL=26 +TA=27 +TAANIEL=27 +HO=28 +HOOSEA=28 +JL=29 +JOEL=29 +AM=30 +AAMOS=30 +OB=31 +OBADJA=31 +JN=32 +JOONA=32 +MI=33 +MIIKA=33 +NA=34 +NAHUM=34 +HA=35 +HABAKUK=35 +SF=36 +SEFANJA=36 +HG=37 +HAGGAI=37 +SK=38 +SAKARJA=38 +ML=39 +MALAKI=39 +MT=40 +MAT=40 +MATTEUSE=40 +MK=41 +MAR=41 +MARKUSE=41 +LU=42 +LK=42 +LUUKA=42 +JH=43 +JOHANNESE=43 +AP=44 +APT=44 +APOSTLITE TEOD=44 +RO=45 +RM=45 +ROOMLASTELE=45 + +1KO=46 +1KR=46 +1KORINTLASTELE=46 +1. KORINTLASTELE=46 +1 KORINTLASTELE=46 + +2KO=47 +2KR=47 +2KORINTLASTELE=47 +2. KORINTLASTELE=47 +2 KORINTLASTELE=47 + +GL=48 +GALAATLASTELE=48 +EF=49 +EFESLASTELE=49 +FI=50 +FILIPLASTELE=50 +KO=51 +KL=51 +KOLOSLASTELE=51 + +1TS=52 +1TE=52 +1. TESSALOONIKLASTELE=52 +1 TESSALOONIKLASTELE=52 +1TESSALOONIKLASTELE=52 + +2TS=53 +2TE=53 +2. TESSALOONIKLASTELE=53 +2 TESSALOONIKLASTELE=53 +2TESSALOONIKLASTELE=53 + +1TM=54 +1TI=54 +1. TIMOTEOSELE=54 +1 TIMOTEOSELE=54 +1TIMOTEOSELE=54 + +2TM=55 +2TI=55 +2. TIMOTEOSELE=55 +2 TIMOTEOSELE=55 +2TIMOTEOSELE=55 + +TI=56 +TIITUSELE=56 +FL=57 +FM=57 +FILEEMONILE=57 +HE=58 +HB=58 +HEEBREALASTELE=58 +JK=59 +JAAKOBUSE=59 + +1PT=60 +1PE=60 +1. PEETRUSE=60 +1 PEETRUSE=60 +1PEETRUSE=60 + +2PT=61 +2PE=61 +2. PEETRUSE=61 +2 PEETRUSE=61 +2PEETRUSE=61 + +1JH=62 +1. JOHANNESE=62 +1 JOHANNESE=62 +1JOHANNESE=62 + +2JH=63 +2. JOHANNESE=63 +2 JOHANNESE=63 +2JOHANNESE=63 + +3JH=64 +3. JOHANNESE=64 +3 JOHANNESE=64 +3JOHANNESE=64 + +JU=65 +JD=65 +JUUDA=65 +ILM=66 +ILMUTUSE=66 diff --git a/locales.d/fa-utf8.conf b/locales.d/fa-utf8.conf new file mode 100644 index 0000000..852ed1c --- /dev/null +++ b/locales.d/fa-utf8.conf @@ -0,0 +1,329 @@ +# Farsi also known as Persian +# Provided by Peter Von Kaehne +# 5 December 2006 + +[Meta] +Name=fa +Description=Farsi +Encoding=UTF-8 + +[Text] +Genesis=پیدایش +Exodus=خروج +Leviticus=لاویان +Numbers=اعداد +Deuteronomy=تثنیه +Joshua=یوشع +Judges=داوران +Ruth=روت +I Samuel=اول سموئیل +II Samuel=دوم سموئیل +I Kings=اول پادشاهان +II Kings=دوم پادشاهان +I Chronicles=اول تواریخ +II Chronicles=دوم تواریخ +Ezra=عزرا +Nehemiah=نحمیا +Esther=استر +Job=ایوب +Psalms=مزامیر +Proverbs=امثال سلیمان +Ecclesiastes=جامعه +Song of Solomon=غزل غزلهای سلیمان +Isaiah=اشعیا +Jeremiah=ارمیا +Lamentations=مراثی ارمیا +Ezekiel=حزقیال +Daniel=دانیال +Hosea=هوشع +Joel=یوییل +Amos=عاموس +Obadiah=عوبدیا +Jonah=یونس +Micah=میکاه +Nahum=ناحوم +Habakkuk=حبقوق +Zephaniah=ضÙنیا +Haggai=حجی +Zechariah=زکریا +Malachi=ملاکی +Matthew=متی +Mark=مرقس +Luke=لوقا +John=یوحنا +Acts=اعمال رسولان +Romans=رومیان +I Corinthians=اول قرنتیان +II Corinthians=دوم قرنتیان +Galatians=غلاطیان +Ephesians=اÙسسیان +Philippians=Ùیلیپیان +Colossians=کولسیان +I Thessalonians=اول تسالونکیان +II Thessalonians=دوم تسالونکیان +I Timothy=اول تیموتاو‌ٔس +II Timothy=اوم تیموتاو‌ٔس +Titus=تیطوس +Philemon=Ùلیمون +Hebrews=عبرانیان +James=یعقوب +I Peter=اول پطرس +II Peter=دوم پطرس +I John=اول یوحنا +II John=دوم یوحنا +III John=سوم یوحنا +Jude=یهودا +Revelation of John=مکاشÙÙ‡ یوحنا + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +پیدا=1 +خرو=2 +لاو=3 +اعد=4 +تث=5 +یوش=6 +داو=7 +روت=8 +Û± سمو‌=9 +Û² سمو=10 +Û± پاد=11 +Û² پاد=12 +Û± توا=13 +Û² توا=14 +عز=15 +نح=16 +است=17 +ایو=18 +مزا=19 +ام=20 +جام=21 +غزل=22 +اش=23 +ار=24 +مراث=25 +حز=26 +دان=27 +هوش=28 +یوی=29 +عامو=30 +عوب=31 +یون=32 +میک=33 +ناحو=34 +حبق=35 +ضÙÙ†=36 +حجی=37 +زکر=38 +ملا=39 +متی=40 +مرق=41 +لوق=42 +یوح=43 +اعمال=44 +روم=45 +Û± قر=46 +Û² قر=47 +غلا=48 +اÙس=49 +Ùیل=50 +کول=51 +Û± تسا=52 +Û² تسا=53 +Û² تیمو=54 +اوم تیمو=55 +تیط=56 +Ùلیم=57 +عبر=58 +یعق=59 +Û± پطر=60 +Û² پطر=61 +Û± یوح=62 +Û² یوح=63 +Û³ یوح=64 +یهو=65 +مکا=66 diff --git a/locales.d/fi-utf8.conf b/locales.d/fi-utf8.conf new file mode 100644 index 0000000..106b011 --- /dev/null +++ b/locales.d/fi-utf8.conf @@ -0,0 +1,514 @@ +[Meta] +Name=fi +Description=Finnish (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=1. Mooseksen kirja +Exodus=2. Mooseksen kirja +Leviticus=3. Mooseksen kirja +Numbers=4. Mooseksen kirja +Deuteronomy=5. Mooseksen kirja +Joshua=Joosua +Judges=Tuomarien kirja +Ruth=Ruut +I Samuel=1. Samuelin kirja +II Samuel=2. Samuelin kirja +I Kings=1. Kuninkaiden kirja +II Kings=2. Kuninkaiden kirja +I Chronicles=1. Aikakirja +II Chronicles=2. Aikakirja +Ezra=Esra +Nehemiah=Nehemia +Esther=Ester +Job=Job +Psalms=Psalmit +Proverbs=Sananlaskut +Ecclesiastes=Saarnaaja +Song of Solomon=Laulujen laulu +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Valitusvirret +Ezekiel=Hesekiel +Daniel=Daniel +Hosea=Hoosea +Joel=Joel +Amos=Aamos +Obadiah=Obadja +Jonah=Joona +Micah=Miika +Nahum=Naahum +Habakkuk=Habakuk +Zephaniah=Sefanja +Haggai=Haggai +Zechariah=Sakarja +Malachi=Malakia +Matthew=Matteus +Mark=Markus +Luke=Luukas +John=Johannes +Acts=Apostolien teot +Romans=Roomalaiskirje +I Corinthians=1. Korinttolaiskirje +II Corinthians=2. Korinttolaiskirje +Galatians=Galatalaiskirje +Ephesians=Efesolaiskirje +Philippians=Filippiläiskirje +Colossians=Kolossalaiskirje +I Thessalonians=1. Tessalonikalaiskirje +II Thessalonians=2. Tessalonikalaiskirje +I Timothy=1. kirje Timoteukselle +II Timothy=2. kirje Timoteukselle +Titus=Kirje Titukselle +Philemon=Kirje Filemonille +Hebrews=Heprealaiskirje +James=Jaakobin kirje +I Peter=1. Pietarin kirje +II Peter=2. Pietarin kirje +I John=1. Johanneksen kirje +II John=2. Johanneksen kirje +III John=3. Johanneksen kirje +Jude=Juudaksen kirje +Revelation of John=Johanneksen ilmestys + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOOSEKSEN KIRJA=1 +1 MOOSEKSEN KIRJA=1 + +2. MOOSEKSEN KIRJA=2 +2 MOOSEKSEN KIRJA=2 + +3. MOOSEKSEN KIRJA=3 +3 MOOSEKSEN KIRJA=3 + +4. MOOSEKSEN KIRJA=4 +4 MOOSEKSEN KIRJA=4 + +5. MOOSEKSEN KIRJA=5 +5 MOOSEKSEN KIRJA=5 + +JOOSUA=6 +TUOMARIEN KIRJA=7 +RUUT=8 + +1. SAMUELIN KIRJA=9 +1 SAMUELIN KIRJA=9 + +2. SAMUELIN KIRJA=10 +2 SAMUELIN KIRJA=10 + +1. KUNINKAIDEN KIRJA=11 +1 KUNINKAIDEN KIRJA=11 + +2. KUNINKAIDEN KIRJA=12 +2 KUNINKAIDEN KIRJA=12 + +1. AIKAKIRJA=13 +1 AIKAKIRJA=13 + +2. AIKAKIRJA=14 +2 AIKAKIRJA=14 + +ESRA=15 +NEHEMIA=16 +ESTER=17 +JOB=18 +PSALMIT=19 +SANANLASKUT=20 +SAARNAAJA=21 +LAULUJEN LAULU=22 +JESAJA=23 +JEREMIA=24 +VALITUSVIRRET=25 +HESEKIEL=26 +DANIEL=27 +HOOSEA=28 +JOEL=29 +AAMOS=30 +OBADJA=31 +JOONA=32 +MIIKA=33 +NAAHUM=34 +HABAKUK=35 +SEFANJA=36 +HAGGAI=37 +SAKARJA=38 +MALAKIA=39 +MATTEUS=40 +MARKUS=41 +LUUKAS=42 +JOHANNES=43 +APOSTOLIEN TEOT=44 +ROOMALAISKIRJE=45 + +1. KORINTTOLAISKIRJE=46 +1 KORINTTOLAISKIRJE=46 + +2. KORINTTOLAISKIRJE=47 +2 KORINTTOLAISKIRJE=47 + +GALATALAISKIRJE=48 +EFESOLAISKIRJE=49 +FILIPPILÄISKIRJE=50 +KOLOSSALAISKIRJE=51 + +1. TESSALONIKALAISKIRJE=52 +1 TESSALONIKALAISKIRJE=52 + +2. TESSALONIKALAISKIRJE=53 +2 TESSALONIKALAISKIRJE=53 + +1. KIRJE TIMOTEUKSELLE=54 +1 KIRJE TIMOTEUKSELLE=54 + +2. KIRJE TIMOTEUKSELLE=55 +2 KIRJE TIMOTEUKSELLE=55 + +KIRJE TITUKSELLE=56 +KIRJE FILEMONILLE=57 +HEPREALAISKIRJE=58 +JAAKOBIN KIRJE=59 + +1. PIETARIN KIRJE=60 +1 PIETARIN KIRJE=60 + +2. PIETARIN KIRJE=61 +2 PIETARIN KIRJE=61 + +1. JOHANNEKSEN KIRJE=62 +1 JOHANNEKSEN KIRJE=62 + +2. JOHANNEKSEN KIRJE=63 +2 JOHANNEKSEN KIRJE=63 + +3. JOHANNEKSEN KIRJE=64 +3 JOHANNEKSEN KIRJE=64 + +JUUDAKSEN KIRJE=65 +JOHANNEKSEN ILMESTYS=66 +1. MOOS=1 +1.MOOS=1 +1 MOOS=1 +1MOOS=1 +2. MOOS=2 +2.MOOS=2 +2 MOOS=2 +2MOOS=2 +3. MOOS=3 +3.MOOS=3 +3 MOOS=3 +3MOOS=3 +4. MOOS=4 +4.MOOS=4 +4 MOOS=4 +4MOOS=4 +5. MOOS=5 +5.MOOS=5 +5 MOOS=5 +5MOOS=5 +JOOS=6 +RUUT=8 +TUOM=7 +1. SAM=9 +1.SAM=9 +1 SAM=9 +1SAM=9 +2. SAM=10 +2.SAM=10 +2 SAM=10 +2SAM=10 +1. KUN=11 +1.KUN=11 +1 KUN=11 +1KUN=11 +2. KUN=12 +2.KUN=12 +2 KUN=12 +2KUN=12 +1. AIK=13 +1.AIK=13 +1 AIK=13 +1AIK=13 +2. AIK=14 +2.AIK=14 +2 AIK=14 +2AIK=14 +NEH=16 +EST=17 +PS=19 +SANANL=20 +SAARN=21 +LAUL. L=22 +LAUL.L=22 +LAUL L=22 +LAULL=22 +KORK. V=22 +KORK.V=22 +KORK V=22 +KORKV=22 +KORKEA VEISU=22 +JES=23 +JER=24 +VALIT=25 +HES=26 +DAN=27 +HOOS=28 +JOEL=29 +AAM=30 +OB=31 +JOONA=32 +MIIKA=33 +NAH=34 +HAB=35 +SEF=36 +HAGG=37 +SAK=38 +MAL=39 +MATT=40 +MARK=41 +LUUK=42 +JOH=43 +AP T=44 +APT=44 +ROOM=45 +1. KOR=46 +1.KOR=46 +1 KOR=46 +1KOR=46 +2. KOR=47 +2.KOR=47 +2 KOR=47 +2KOR=47 +GAL=48 +EF=49 +FIL=50 +KOL=51 +1. TESS=52 +1.TESS=52 +1 TESS=52 +1TESS=52 +2. TESS=53 +2.TESS=53 +2 TESS=53 +2TESS=53 +1. TIM=54 +1.TIM=54 +1 TIM=54 +1TIM=54 +2. TIM=55 +2.TIM=55 +2 TIM=55 +2TIM=55 +TIT=56 +FILEM=57 +HEBR=58 +HEPR=58 +JAAK=59 +1. PIET=60 +1.PIET=60 +1 PIET=60 +1PIET=60 +2. PIET=61 +2.PIET=61 +2 PIET=61 +2PIET=61 +1. JOH=62 +1.JOH=62 +1 JOH=62 +1JOH=62 +2. JOH=63 +2.JOH=63 +2 JOH=63 +2JOH=63 +3. JOH=64 +3.JOH=64 +3 JOH=64 +3JOH=64 +JUUD=65 +ILM=66 + diff --git a/locales.d/fi.conf b/locales.d/fi.conf new file mode 100755 index 0000000..87b6ce1 --- /dev/null +++ b/locales.d/fi.conf @@ -0,0 +1,514 @@ +[Meta] +Name=fi +Description=Finnish +Encoding=ISO8859-1 + +[Text] +Genesis=1. Mooseksen kirja +Exodus=2. Mooseksen kirja +Leviticus=3. Mooseksen kirja +Numbers=4. Mooseksen kirja +Deuteronomy=5. Mooseksen kirja +Joshua=Joosua +Judges=Tuomarien kirja +Ruth=Ruut +I Samuel=1. Samuelin kirja +II Samuel=2. Samuelin kirja +I Kings=1. Kuninkaiden kirja +II Kings=2. Kuninkaiden kirja +I Chronicles=1. Aikakirja +II Chronicles=2. Aikakirja +Ezra=Esra +Nehemiah=Nehemia +Esther=Ester +Job=Job +Psalms=Psalmit +Proverbs=Sananlaskut +Ecclesiastes=Saarnaaja +Song of Solomon=Laulujen laulu +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Valitusvirret +Ezekiel=Hesekiel +Daniel=Daniel +Hosea=Hoosea +Joel=Joel +Amos=Aamos +Obadiah=Obadja +Jonah=Joona +Micah=Miika +Nahum=Naahum +Habakkuk=Habakuk +Zephaniah=Sefanja +Haggai=Haggai +Zechariah=Sakarja +Malachi=Malakia +Matthew=Matteus +Mark=Markus +Luke=Luukas +John=Johannes +Acts=Apostolien teot +Romans=Roomalaiskirje +I Corinthians=1. Korinttolaiskirje +II Corinthians=2. Korinttolaiskirje +Galatians=Galatalaiskirje +Ephesians=Efesolaiskirje +Philippians=Filippiläiskirje +Colossians=Kolossalaiskirje +I Thessalonians=1. Tessalonikalaiskirje +II Thessalonians=2. Tessalonikalaiskirje +I Timothy=1. kirje Timoteukselle +II Timothy=2. kirje Timoteukselle +Titus=Kirje Titukselle +Philemon=Kirje Filemonille +Hebrews=Heprealaiskirje +James=Jaakobin kirje +I Peter=1. Pietarin kirje +II Peter=2. Pietarin kirje +I John=1. Johanneksen kirje +II John=2. Johanneksen kirje +III John=3. Johanneksen kirje +Jude=Juudaksen kirje +Revelation of John=Johanneksen ilmestys + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOOSEKSEN KIRJA=1 +1 MOOSEKSEN KIRJA=1 + +2. MOOSEKSEN KIRJA=2 +2 MOOSEKSEN KIRJA=2 + +3. MOOSEKSEN KIRJA=3 +3 MOOSEKSEN KIRJA=3 + +4. MOOSEKSEN KIRJA=4 +4 MOOSEKSEN KIRJA=4 + +5. MOOSEKSEN KIRJA=5 +5 MOOSEKSEN KIRJA=5 + +JOOSUA=6 +TUOMARIEN KIRJA=7 +RUUT=8 + +1. SAMUELIN KIRJA=9 +1 SAMUELIN KIRJA=9 + +2. SAMUELIN KIRJA=10 +2 SAMUELIN KIRJA=10 + +1. KUNINKAIDEN KIRJA=11 +1 KUNINKAIDEN KIRJA=11 + +2. KUNINKAIDEN KIRJA=12 +2 KUNINKAIDEN KIRJA=12 + +1. AIKAKIRJA=13 +1 AIKAKIRJA=13 + +2. AIKAKIRJA=14 +2 AIKAKIRJA=14 + +ESRA=15 +NEHEMIA=16 +ESTER=17 +JOB=18 +PSALMIT=19 +SANANLASKUT=20 +SAARNAAJA=21 +LAULUJEN LAULU=22 +JESAJA=23 +JEREMIA=24 +VALITUSVIRRET=25 +HESEKIEL=26 +DANIEL=27 +HOOSEA=28 +JOEL=29 +AAMOS=30 +OBADJA=31 +JOONA=32 +MIIKA=33 +NAAHUM=34 +HABAKUK=35 +SEFANJA=36 +HAGGAI=37 +SAKARJA=38 +MALAKIA=39 +MATTEUS=40 +MARKUS=41 +LUUKAS=42 +JOHANNES=43 +APOSTOLIEN TEOT=44 +ROOMALAISKIRJE=45 + +1. KORINTTOLAISKIRJE=46 +1 KORINTTOLAISKIRJE=46 + +2. KORINTTOLAISKIRJE=47 +2 KORINTTOLAISKIRJE=47 + +GALATALAISKIRJE=48 +EFESOLAISKIRJE=49 +FILIPPILÄISKIRJE=50 +KOLOSSALAISKIRJE=51 + +1. TESSALONIKALAISKIRJE=52 +1 TESSALONIKALAISKIRJE=52 + +2. TESSALONIKALAISKIRJE=53 +2 TESSALONIKALAISKIRJE=53 + +1. KIRJE TIMOTEUKSELLE=54 +1 KIRJE TIMOTEUKSELLE=54 + +2. KIRJE TIMOTEUKSELLE=55 +2 KIRJE TIMOTEUKSELLE=55 + +KIRJE TITUKSELLE=56 +KIRJE FILEMONILLE=57 +HEPREALAISKIRJE=58 +JAAKOBIN KIRJE=59 + +1. PIETARIN KIRJE=60 +1 PIETARIN KIRJE=60 + +2. PIETARIN KIRJE=61 +2 PIETARIN KIRJE=61 + +1. JOHANNEKSEN KIRJE=62 +1 JOHANNEKSEN KIRJE=62 + +2. JOHANNEKSEN KIRJE=63 +2 JOHANNEKSEN KIRJE=63 + +3. JOHANNEKSEN KIRJE=64 +3 JOHANNEKSEN KIRJE=64 + +JUUDAKSEN KIRJE=65 +JOHANNEKSEN ILMESTYS=66 +1. MOOS=1 +1.MOOS=1 +1 MOOS=1 +1MOOS=1 +2. MOOS=2 +2.MOOS=2 +2 MOOS=2 +2MOOS=2 +3. MOOS=3 +3.MOOS=3 +3 MOOS=3 +3MOOS=3 +4. MOOS=4 +4.MOOS=4 +4 MOOS=4 +4MOOS=4 +5. MOOS=5 +5.MOOS=5 +5 MOOS=5 +5MOOS=5 +JOOS=6 +RUUT=8 +TUOM=7 +1. SAM=9 +1.SAM=9 +1 SAM=9 +1SAM=9 +2. SAM=10 +2.SAM=10 +2 SAM=10 +2SAM=10 +1. KUN=11 +1.KUN=11 +1 KUN=11 +1KUN=11 +2. KUN=12 +2.KUN=12 +2 KUN=12 +2KUN=12 +1. AIK=13 +1.AIK=13 +1 AIK=13 +1AIK=13 +2. AIK=14 +2.AIK=14 +2 AIK=14 +2AIK=14 +NEH=16 +EST=17 +PS=19 +SANANL=20 +SAARN=21 +LAUL. L=22 +LAUL.L=22 +LAUL L=22 +LAULL=22 +KORK. V=22 +KORK.V=22 +KORK V=22 +KORKV=22 +KORKEA VEISU=22 +JES=23 +JER=24 +VALIT=25 +HES=26 +DAN=27 +HOOS=28 +JOEL=29 +AAM=30 +OB=31 +JOONA=32 +MIIKA=33 +NAH=34 +HAB=35 +SEF=36 +HAGG=37 +SAK=38 +MAL=39 +MATT=40 +MARK=41 +LUUK=42 +JOH=43 +AP T=44 +APT=44 +ROOM=45 +1. KOR=46 +1.KOR=46 +1 KOR=46 +1KOR=46 +2. KOR=47 +2.KOR=47 +2 KOR=47 +2KOR=47 +GAL=48 +EF=49 +FIL=50 +KOL=51 +1. TESS=52 +1.TESS=52 +1 TESS=52 +1TESS=52 +2. TESS=53 +2.TESS=53 +2 TESS=53 +2TESS=53 +1. TIM=54 +1.TIM=54 +1 TIM=54 +1TIM=54 +2. TIM=55 +2.TIM=55 +2 TIM=55 +2TIM=55 +TIT=56 +FILEM=57 +HEBR=58 +HEPR=58 +JAAK=59 +1. PIET=60 +1.PIET=60 +1 PIET=60 +1PIET=60 +2. PIET=61 +2.PIET=61 +2 PIET=61 +2PIET=61 +1. JOH=62 +1.JOH=62 +1 JOH=62 +1JOH=62 +2. JOH=63 +2.JOH=63 +2 JOH=63 +2JOH=63 +3. JOH=64 +3.JOH=64 +3 JOH=64 +3JOH=64 +JUUD=65 +ILM=66 + diff --git a/locales.d/fr-utf8.conf b/locales.d/fr-utf8.conf new file mode 100644 index 0000000..9d172ab --- /dev/null +++ b/locales.d/fr-utf8.conf @@ -0,0 +1,692 @@ +[Meta] +Name=fr +Description=French (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Genèse +Exodus=Exode +Leviticus=Lévitique +Numbers=Nombres +Deuteronomy=Deutéronome +Joshua=Josué +Judges=Juges +Ruth=Ruth +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Rois +II Kings=2 Rois +I Chronicles=1 Chroniques +II Chronicles=2 Chroniques +Ezra=Esdras +Nehemiah=Néhémie +Esther=Esther +Job=Job +Psalms=Psaumes +Proverbs=Proverbes +Ecclesiastes=Ecclésiaste +Song of Solomon=Cantique des cantiques +Isaiah=Ésaïe +Jeremiah=Jérémie +Lamentations=Lamentations de Jérémie +Ezekiel=Ézéchiel +Daniel=Daniel +Hosea=Osée +Joel=Joël +Amos=Amos +Obadiah=Abdias +Jonah=Jonas +Micah=Michée +Nahum=Nahum +Habakkuk=Habakuk +Zephaniah=Sophonie +Haggai=Aggée +Zechariah=Zaccharie +Malachi=Malachie +Matthew=Matthieu +Mark=Marc +Luke=Luc +John=Jean +Acts=Actes +Romans=Romains +I Corinthians=1 Corinthiens +II Corinthians=2 Corinthiens +Galatians=Galates +Ephesians=Éphésiens +Philippians=Philippiens +Colossians=Colossiens +I Thessalonians=1 Thessaloniciens +II Thessalonians=2 Thessaloniciens +I Timothy=1 Timothée +II Timothy=2 Timothée +Titus=Tite +Philemon=Philémon +Hebrews=Hébreux +James=Jacques +I Peter=1 Pierre +II Peter=2 Pierre +I John=1 Jean +II John=2 Jean +III John=3 Jean +Jude=Jude +Revelation of John=Apocalypse + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=2 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=6 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=65 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENÈSE=1 +EXODE=2 +LÉVITIQUE=3 +NOMBRES=4 +DEUTÉRONOME=5 +JOSUÉ=6 +JUGES=7 +RUTH=8 +1 SAMUEL=9 +2 SAMUEL=10 +1 ROIS=11 +2 ROIS=12 +1 CHRONIQUES=13 +2 CHRONIQUES=14 +ESDRAS=15 +NÉHÉMIE=16 +ESTHER=17 +JOB=18 +PSAUMES=19 +PROVERBES=20 +ECCLÉSIASTE=21 +CANTIQUE DES CANTIQUES=22 +ESAÃE=23 +JÉRÉMIE=24 +LAMENTATIONS DE JÉRÉMIE=25 +ÉZÉCHIEL=26 +DANIEL=27 +OSÉE=28 +JOËL=29 +AMOS=30 +ABDIAS=31 +JONAS=32 +MICHÉE=33 +NAHUM=34 +HABAKUK=35 +SOPHONIE=36 +AGGÉE=37 +ZACCHARIE=38 +MALACHIE=39 +MATTHIEU=40 +MARC=41 +LUC=42 +JEAN=43 +ACTES=44 +ROMAINS=45 +1 CORINTHIENS=46 +2 CORINTHIENS=47 +GALATES=48 +EPHÉSIENS=49 +PHILIPPIENS=50 +COLOSSIENS=51 +1 THESSALONICIENS=52 +2 THESSALONICIENS=53 +1 TIMOTHÉE=54 +2 TIMOTHÉE=55 +TITE=56 +PHILÉMON=57 +HÉBREUX=58 +JACQUES=59 +1 PIERRE=60 +2 PIERRE=61 +1 JEAN=62 +2 JEAN=63 +3 JEAN=64 +JUDE=65 +APOCALYPSE=66 + +1 C=46 +1C=46 +1 CH=13 +1CH=13 +1 CHR=13 +1CHR=13 +1 CHRO=13 +1CHRO=13 +1 CO=46 +1CO=46 +1 COR=46 +1COR=46 +1 J=62 +1J=62 +1 JE=62 +1JE=62 +1 JEA=62 +1JEA=62 +1 JN=62 +1JN=62 +1 P=60 +1P=60 +1 PI=60 +1PI=60 +1 PIE=60 +1PIE=60 +1 R=11 +1R=11 +1 RO=11 +1RO=11 +1 ROI=11 +1ROI=11 +1 S=9 +1S=9 +1 SA=9 +1SA=9 +1 SAM=9 +1SAM=9 +1 T=52 +1T=52 +1 TH=52 +1TH=52 +1 THE=52 +1THE=52 +1 TI=54 +1TI=54 +1 TIM=54 +1TIM=54 +1 TIMOTHEE=54 +1TIMOTHEE=54 +1 TM=54 +1TM=54 +2 C=47 +2C=47 +2 CH=14 +2CH=14 +2 CHR=14 +2CHR=14 +2 CHRO=14 +2CHRO=14 +2 CO=47 +2CO=47 +2 COR=47 +2COR=47 +2 J=63 +2J=63 +2 JE=63 +2JE=63 +2 JEA=63 +2JEA=63 +2 JN=63 +2JN=63 +2 P=61 +2P=61 +2 PI=61 +2PI=61 +2 PIE=61 +2PIE=61 +2 R=12 +2R=12 +2 RO=12 +2RO=12 +2 ROI=12 +2ROI=12 +2 S=10 +2S=10 +2 SA=10 +2SA=10 +2 SAM=10 +2SAM=10 +2 T=53 +2T=53 +2 TH=53 +2TH=53 +2 THE=53 +2THE=53 +2 TI=55 +2TI=55 +2 TIM=55 +2TIM=55 +2 TIMOTHEE=55 +2TIMOTHEE=55 +2 TM=55 +2TM=55 +3 J=64 +3J=64 +3 JE=64 +3JE=64 +3 JEA=64 +3JEA=64 +3 JN=64 +3JN=64 +A=44 +AB=31 +ABD=31 +ABDI=31 +AC=44 +ACT=44 +ACTE=44 +AG=37 +AGG=37 +AGGE=37 +AGGÉ=37 +AGGEE=37 +AM=30 +AMO=30 +AP=66 +APO=66 +APOC=66 +B=58 +CA=22 +CAN=22 +CANT=22 +CDC=22 +CO=51 +COL=51 +COLO=51 +CT=22 +DA=27 +DAN=27 +DANI=27 +DE=5 +DEU=5 +DEUT=5 +DEUTERONOME=5 +DN=27 +DT=5 +E=2 +É=49 +EC=21 +ECC=21 +ECCL=21 +ECCLESIASTE=21 +ÉC=21 +ÉCC=21 +ÉCCL=21 +ECL=21 +ÉCL=21 +EP=49 +ÉP=49 +EPH=49 +ÉPH=49 +EPHE=49 +ÉPHE=49 +EPHÉ=49 +ÉPHÉ=49 +EPHESIENS=49 +ÉPHÉSIENS=49 +ES=23 +ÉS=23 +ESA=23 +ÉSA=23 +ESAI=23 +ESAÃ=23 +ÉSAÃ=23 +ESAIE=23 +ÉSAIE=23 +ÉSAÃE=23 +ESD=15 +ESDR=15 +ÉSD=15 +EST=17 +ESTH=17 +ÉST=17 +EX=2 +EXO=2 +EXOD=2 +EZ=26 +EZE=26 +ÉZE=26 +EZÉ=26 +ÉZÉ=26 +EZEC=26 +ÉZEC=26 +EZÉC=26 +ÉZÉC=26 +EZECHIEL=26 +F=49 +G=1 +GA=48 +GAL=48 +GALA=48 +GE=1 +GEN=1 +GENE=1 +GENÈ=1 +GENESE=1 +GÉ=1 +GÉN=1 +GN=1 +H=35 +HA=35 +HAB=35 +HABA=35 +HABACUC=35 +HABAQUQ=35 +HE=58 +HÉ=58 +HEB=58 +HÉB=58 +HEBREUX=58 +I=23 +IS=23 +ISA=23 +ISAI=23 +ISAÃ=23 +ISAIE=23 +J=6 +JA=59 +JAC=59 +JACQ=59 +JB=18 +JC=59 +JD=65 +JÉ=24 +JE=43 +JEA=43 +JER=24 +JÉR=24 +JERE=24 +JÉRE=24 +JERÉ=24 +JÉRÉ=24 +JEREMIE=24 +JG=7 +JL=29 +JN=43 +JOB=18 +JOE=29 +JOË=29 +JOEL=29 +JON=32 +JONA=32 +JOS=6 +JOSUE=6 +JR=24 +JS=6 +JU=7 +JUD=65 +JUG=7 +JUGE=7 +K=35 +L=3 +LA=25 +LAM=25 +LAME=25 +LC=42 +LDJ=25 +LE=3 +LÉ=3 +LEV=3 +LÉV=3 +LEVI=3 +LÉVI=3 +LEVITIQUE=3 +LM=25 +LU=42 +LUC=42 +LV=3 +M=40 +MA=39 +MAL=39 +MALA=39 +MAR=41 +MAT=40 +MATT=40 +MC=41 +MI=33 +MIC=33 +MICH=33 +MICHEE=33 +ML=39 +MR=41 +MT=40 +N=4 +NA=34 +NAH=34 +NAHU=35 +NB=4 +NE=16 +NÉ=16 +NEH=16 +NÉH=16 +NEHE=16 +NÉHE=16 +NEHÉ=16 +NÉHÉ=16 +NEHEMIE=16 +NO=4 +NOM=4 +NOMB=4 +O=28 +OS=28 +OSE=28 +OSÉ=28 +OSEE=28 +P=19 +PH=50 +PHI=50 +PHIL=50 +PHIL=57 +PHILEMON=57 +PHM=57 +PR=20 +PRE=21 +PRÉ=21 +PRED=21 +PRÉD=21 +PREDICATEUR=21 +PRO=20 +PROV=20 +PS=19 +PSA=19 +PSAU=19 +QO=21 +R=45 +RE=66 +RÉ=66 +REV=66 +RÉV=66 +REVE=66 +RÉVE=66 +REVÉ=66 +RÉVÉ=66 +RM=45 +RO=45 +ROM=45 +RT=8 +RU=8 +RUT=8 +S=36 +SO=36 +SOP=36 +SOPH=36 +T=56 +TI=56 +TIT=56 +TT=56 +U=7 +V=3 +Z=38 +ZA=38 +ZAC=38 +ZACH=38 + + diff --git a/locales.d/fr.conf b/locales.d/fr.conf new file mode 100644 index 0000000..2d4a996 --- /dev/null +++ b/locales.d/fr.conf @@ -0,0 +1,690 @@ +[Meta] +Name=fr +Description=French +Encoding=ISO8859-1 + +[Text] +Genesis=Genèse +Exodus=Exode +Leviticus=Lévitique +Numbers=Nombres +Deuteronomy=Deutéronome +Joshua=Josué +Judges=Juges +Ruth=Ruth +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Rois +II Kings=2 Rois +I Chronicles=1 Chroniques +II Chronicles=2 Chroniques +Ezra=Esdras +Nehemiah=Néhémie +Esther=Esther +Job=Job +Psalms=Psaumes +Proverbs=Proverbes +Ecclesiastes=Écclésiaste +Song of Solomon=Cantique des cantiques +Isaiah=Esaïe +Jeremiah=Jérémie +Lamentations=Lamentations de Jérémie +Ezekiel=Ézéchiel +Daniel=Daniel +Hosea=Osée +Joel=Joël +Amos=Amos +Obadiah=Abdias +Jonah=Jonas +Micah=Michée +Nahum=Nahum +Habakkuk=Habakuk +Zephaniah=Sophonie +Haggai=Aggée +Zechariah=Zaccharie +Malachi=Malachie +Matthew=Matthieu +Mark=Marc +Luke=Luc +John=Jean +Acts=Actes +Romans=Romains +I Corinthians=1 Corinthiens +II Corinthians=2 Corinthiens +Galatians=Galates +Ephesians=Éphésiens +Philippians=Philippiens +Colossians=Colossiens +I Thessalonians=1 Thessaloniciens +II Thessalonians=2 Thessaloniciens +I Timothy=1 Timothée +II Timothy=2 Timothée +Titus=Tite +Philemon=Philémon +Hebrews=Hébreux +James=Jacques +I Peter=1 Pierre +II Peter=2 Pierre +I John=1 Jean +II John=2 Jean +III John=3 Jean +Jude=Jude +Revelation of John=Apocalypse + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=2 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=6 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=65 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENÈSE=1 +EXODE=2 +LÉVITIQUE=3 +NOMBRES=4 +DEUTÉRONOME=5 +JOSUÉ=6 +JUGES=7 +RUTH=8 +1 SAMUEL=9 +2 SAMUEL=10 +1 ROIS=11 +2 ROIS=12 +1 CHRONIQUES=13 +2 CHRONIQUES=14 +ESDRAS=15 +NÉHÉMIE=16 +ESTHER=17 +JOB=18 +PSAUMES=19 +PROVERBES=20 +ECCLÉSIASTE=21 +CANTIQUE DES CANTIQUES=22 +ESAÏE=23 +JÉRÉMIE=24 +LAMENTATIONS DE JÉRÉMIE=25 +ÉZÉCHIEL=26 +DANIEL=27 +OSÉE=28 +JOËL=29 +AMOS=30 +ABDIAS=31 +JONAS=32 +MICHÉE=33 +NAHUM=34 +HABAKUK=35 +SOPHONIE=36 +AGGÉE=37 +ZACCHARIE=38 +MALACHIE=39 +MATTHIEU=40 +MARC=41 +LUC=42 +JEAN=43 +ACTES=44 +ROMAINS=45 +1 CORINTHIENS=46 +2 CORINTHIENS=47 +GALATES=48 +EPHÉSIENS=49 +PHILIPPIENS=50 +COLOSSIENS=51 +1 THESSALONICIENS=52 +2 THESSALONICIENS=53 +1 TIMOTHÉE=54 +2 TIMOTHÉE=55 +TITE=56 +PHILÉMON=57 +HÉBREUX=58 +JACQUES=59 +1 PIERRE=60 +2 PIERRE=61 +1 JEAN=62 +2 JEAN=63 +3 JEAN=64 +JUDE=65 +APOCALYPSE=66 + +1 C=46 +1C=46 +1 CH=13 +1CH=13 +1 CHR=13 +1CHR=13 +1 CHRO=13 +1CHRO=13 +1 CO=46 +1CO=46 +1 COR=46 +1COR=46 +1 J=62 +1J=62 +1 JE=62 +1JE=62 +1 JEA=62 +1JEA=62 +1 JN=62 +1JN=62 +1 P=60 +1P=60 +1 PI=60 +1PI=60 +1 PIE=60 +1PIE=60 +1 R=11 +1R=11 +1 RO=11 +1RO=11 +1 ROI=11 +1ROI=11 +1 S=9 +1S=9 +1 SA=9 +1SA=9 +1 SAM=9 +1SAM=9 +1 T=52 +1T=52 +1 TH=52 +1TH=52 +1 THE=52 +1THE=52 +1 TI=54 +1TI=54 +1 TIM=54 +1TIM=54 +1 TIMOTHEE=54 +1TIMOTHEE=54 +1 TM=54 +1TM=54 +2 C=47 +2C=47 +2 CH=14 +2CH=14 +2 CHR=14 +2CHR=14 +2 CHRO=14 +2CHRO=14 +2 CO=47 +2CO=47 +2 COR=47 +2COR=47 +2 J=63 +2J=63 +2 JE=63 +2JE=63 +2 JEA=63 +2JEA=63 +2 JN=63 +2JN=63 +2 P=61 +2P=61 +2 PI=61 +2PI=61 +2 PIE=61 +2PIE=61 +2 R=12 +2R=12 +2 RO=12 +2RO=12 +2 ROI=12 +2ROI=12 +2 S=10 +2S=10 +2 SA=10 +2SA=10 +2 SAM=10 +2SAM=10 +2 T=53 +2T=53 +2 TH=53 +2TH=53 +2 THE=53 +2THE=53 +2 TI=55 +2TI=55 +2 TIM=55 +2TIM=55 +2 TIMOTHEE=55 +2TIMOTHEE=55 +2 TM=55 +2TM=55 +3 J=64 +3J=64 +3 JE=64 +3JE=64 +3 JEA=64 +3JEA=64 +3 JN=64 +3JN=64 +A=44 +AB=31 +ABD=31 +ABDI=31 +AC=44 +ACT=44 +ACTE=44 +AG=37 +AGG=37 +AGGE=37 +AGGÉ=37 +AGGEE=37 +AM=30 +AMO=30 +AP=66 +APO=66 +APOC=66 +B=58 +CA=22 +CAN=22 +CANT=22 +CDC=22 +CO=51 +COL=51 +COLO=51 +CT=22 +DA=27 +DAN=27 +DANI=27 +DE=5 +DEU=5 +DEUT=5 +DEUTERONOME=5 +DN=27 +DT=5 +E=2 +É=49 +EC=21 +ECC=21 +ECCL=21 +ECCLESIASTE=21 +ÉC=21 +ÉCC=21 +ÉCCL=21 +ECL=21 +ÉCL=21 +EP=49 +ÉP=49 +EPH=49 +ÉPH=49 +EPHE=49 +ÉPHE=49 +EPHÉ=49 +ÉPHÉ=49 +EPHESIENS=49 +ES=23 +ÉS=23 +ESA=23 +ÉSA=23 +ESAI=23 +ESAÏ=23 +ÉSAÏ=23 +ESAIE=23 +ÉSAIE=23 +ESD=15 +ESDR=15 +ÉSD=15 +EST=17 +ESTH=17 +ÉST=17 +EX=2 +EXO=2 +EXOD=2 +EZ=26 +EZE=26 +ÉZE=26 +EZÉ=26 +ÉZÉ=26 +EZEC=26 +ÉZEC=26 +EZÉC=26 +ÉZÉC=26 +EZECHIEL=26 +F=49 +G=1 +GA=48 +GAL=48 +GALA=48 +GE=1 +GEN=1 +GENE=1 +GENÈ=1 +GENESE=1 +GÉ=1 +GÉN=1 +GN=1 +H=35 +HA=35 +HAB=35 +HABA=35 +HABACUC=35 +HABAQUQ=35 +HE=58 +HÉ=58 +HEB=58 +HÉB=58 +HEBREUX=58 +I=23 +IS=23 +ISA=23 +ISAI=23 +ISAÏ=23 +ISAIE=23 +J=6 +JA=59 +JAC=59 +JACQ=59 +JB=18 +JC=59 +JD=65 +JÉ=24 +JE=43 +JEA=43 +JER=24 +JÉR=24 +JERE=24 +JÉRE=24 +JERÉ=24 +JÉRÉ=24 +JEREMIE=24 +JG=7 +JL=29 +JN=43 +JOB=18 +JOE=29 +JOË=29 +JOEL=29 +JON=32 +JONA=32 +JOS=6 +JOSUE=6 +JR=24 +JS=6 +JU=7 +JUD=65 +JUG=7 +JUGE=7 +K=35 +L=3 +LA=25 +LAM=25 +LAME=25 +LC=42 +LDJ=25 +LE=3 +LÉ=3 +LEV=3 +LÉV=3 +LEVI=3 +LÉVI=3 +LEVITIQUE=3 +LM=25 +LU=42 +LUC=42 +LV=3 +M=40 +MA=39 +MAL=39 +MALA=39 +MAR=41 +MAT=40 +MATT=40 +MC=41 +MI=33 +MIC=33 +MICH=33 +MICHEE=33 +ML=39 +MR=41 +MT=40 +N=4 +NA=34 +NAH=34 +NAHU=35 +NB=4 +NE=16 +NÉ=16 +NEH=16 +NÉH=16 +NEHE=16 +NÉHE=16 +NEHÉ=16 +NÉHÉ=16 +NEHEMIE=16 +NO=4 +NOM=4 +NOMB=4 +O=28 +OS=28 +OSE=28 +OSÉ=28 +OSEE=28 +P=19 +PH=50 +PHI=50 +PHIL=50 +PHIL=57 +PHILEMON=57 +PHM=57 +PR=20 +PRE=21 +PRÉ=21 +PRED=21 +PRÉD=21 +PREDICATEUR=21 +PRO=20 +PROV=20 +PS=19 +PSA=19 +PSAU=19 +QO=21 +R=45 +RE=66 +RÉ=66 +REV=66 +RÉV=66 +REVE=66 +RÉVE=66 +REVÉ=66 +RÉVÉ=66 +RM=45 +RO=45 +ROM=45 +RT=8 +RU=8 +RUT=8 +S=36 +SO=36 +SOP=36 +SOPH=36 +T=56 +TI=56 +TIT=56 +TT=56 +U=7 +V=3 +Z=38 +ZA=38 +ZAC=38 +ZACH=38 + + diff --git a/locales.d/fr_abbrev-utf8.conf b/locales.d/fr_abbrev-utf8.conf new file mode 100644 index 0000000..e6bf39e --- /dev/null +++ b/locales.d/fr_abbrev-utf8.conf @@ -0,0 +1,333 @@ +# +# French Bible bookname abbreviations -- derived from the "Louis Segond 1910" +# Corrections & Contributions welcome +# +# Dominique Corbex domcox@users.sf.net +# + +[Meta] +Name=fr_abbrev +Description=French abbreviations (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Ge +Exodus=Ex +Leviticus=Lé +Numbers=No +Deuteronomy=De +Joshua=Jos +Judges=Jg +Ruth=Ru +I Samuel=1 S +II Samuel=2 S +I Kings=1 R +II Kings=2 R +I Chronicles=1 Ch +II Chronicles=2 Ch +Ezra=Esd +Nehemiah=Né +Esther=Est +Job=Job +Psalms=Ps +Proverbs=Pr +Ecclesiastes=Ec +Song of Solomon=Ca +Isaiah=Es +Jeremiah=Jé +Lamentations=La +Ezekiel=Ez +Daniel=Da +Hosea=Os +Joel=Joë +Amos=Am +Obadiah=Ab +Jonah=Jon +Micah=Mi +Nahum=Na +Habakkuk=Ha +Zephaniah=So +Haggai=Ag +Zechariah=Za +Malachi=Mal +Matthew=Mt +Mark=Mc +Luke=Lu +John=Jn +Acts=Ac +Romans=Ro +I Corinthians=1 Co +II Corinthians=2 Co +Galatians=Ga +Ephesians=Ep +Philippians=Ph +Colossians=Col +I Thessalonians=1 Th +II Thessalonians=2 Th +I Timothy=1 Ti +II Timothy=2 Ti +Titus=Tit +Philemon=Phm +Hebrews=Hé +James=Ja +I Peter=1 Pi +II Peter=2 Pi +I John=1 Jn +II John=2 Jn +III John=3 Jn +Jude=Jud +Revelation of John=Ap + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GN=1 +EX=2 +LV=3 +NB=4 +DT=5 +JOS=6 +JG=7 +RT=8 +1S=9 +2S=10 +1R=11 +2R=12 +1CH=13 +2CH=14 +ESD=15 +NE=16 +EST=17 +JB=18 +PS=19 +PR=20 +ECC=21 +CT=22 +ÉS=23 +JR=24 +LM=25 +EZ=26 +DN=27 +OS=28 +JL=29 +AM=30 +AB=31 +JON=32 +MI=33 +NA=34 +HA=35 +SO=36 +AG=37 +ZA=38 +ML=39 +MT=40 +MC=41 +LC=42 +JN=43 +AC=44 +RM=45 +1CO=46 +2CO=47 +GA=48 +ÉPH=49 +PH=50 +COL=51 +1TH=52 +2TH=53 +1TM=54 +2TM=55 +TT=56 +PHM=57 +HE=58 +JC=59 +1P=60 +2P=61 +1JN=62 +2JN=63 +3JN=64 +JD=65 +AP=66 + diff --git a/locales.d/fr_abbrev.conf b/locales.d/fr_abbrev.conf new file mode 100644 index 0000000..362dad0 --- /dev/null +++ b/locales.d/fr_abbrev.conf @@ -0,0 +1,333 @@ +# +# French Bible bookname abbreviations -- derived from the "Louis Segond 1910" +# Corrections & Contributions welcome +# +# Dominique Corbex domcox@users.sf.net +# + +[Meta] +Name=fr_abbrev +Description=French abbreviations +Encoding=ISO8859-1 + +[Text] +Genesis=Ge +Exodus=Ex +Leviticus=Lé +Numbers=No +Deuteronomy=De +Joshua=Jos +Judges=Jg +Ruth=Ru +I Samuel=1 S +II Samuel=2 S +I Kings=1 R +II Kings=2 R +I Chronicles=1 Ch +II Chronicles=2 Ch +Ezra=Esd +Nehemiah=Né +Esther=Est +Job=Job +Psalms=Ps +Proverbs=Pr +Ecclesiastes=Ec +Song of Solomon=Ca +Isaiah=Es +Jeremiah=Jé +Lamentations=La +Ezekiel=Ez +Daniel=Da +Hosea=Os +Joel=Joë +Amos=Am +Obadiah=Ab +Jonah=Jon +Micah=Mi +Nahum=Na +Habakkuk=Ha +Zephaniah=So +Haggai=Ag +Zechariah=Za +Malachi=Mal +Matthew=Mt +Mark=Mc +Luke=Lu +John=Jn +Acts=Ac +Romans=Ro +I Corinthians=1 Co +II Corinthians=2 Co +Galatians=Ga +Ephesians=Ep +Philippians=Ph +Colossians=Col +I Thessalonians=1 Th +II Thessalonians=2 Th +I Timothy=1 Ti +II Timothy=2 Ti +Titus=Tit +Philemon=Phm +Hebrews=Hé +James=Ja +I Peter=1 Pi +II Peter=2 Pi +I John=1 Jn +II John=2 Jn +III John=3 Jn +Jude=Jud +Revelation of John=Ap + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GN=1 +EX=2 +LV=3 +NB=4 +DT=5 +JOS=6 +JG=7 +RT=8 +1S=9 +2S=10 +1R=11 +2R=12 +1CH=13 +2CH=14 +ESD=15 +NE=16 +EST=17 +JB=18 +PS=19 +PR=20 +ECC=21 +CT=22 +ÉS=23 +JR=24 +LM=25 +EZ=26 +DN=27 +OS=28 +JL=29 +AM=30 +AB=31 +JON=32 +MI=33 +NA=34 +HA=35 +SO=36 +AG=37 +ZA=38 +ML=39 +MT=40 +MC=41 +LC=42 +JN=43 +AC=44 +RM=45 +1CO=46 +2CO=47 +GA=48 +ÉPH=49 +PH=50 +COL=51 +1TH=52 +2TH=53 +1TM=54 +2TM=55 +TT=56 +PHM=57 +HE=58 +JC=59 +1P=60 +2P=61 +1JN=62 +2JN=63 +3JN=64 +JD=65 +AP=66 + diff --git a/locales.d/he-utf8.conf b/locales.d/he-utf8.conf new file mode 100644 index 0000000..9eeebe3 --- /dev/null +++ b/locales.d/he-utf8.conf @@ -0,0 +1,422 @@ + +# +# Hebrew booknames for the Tanach (OT) and the Berit Chadashah (NT). +# Tanach part was contributed by Alon Bar-Lev . +# +# Maintainer: Martin Gruner +# + +[Meta] +Name=he +Description=Hebrew (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=בר×שית +Exodus=שמות +Leviticus=×•×™×§×¨× +Numbers=במדבר +Deuteronomy=×“×‘×¨×™× +Joshua=יהושוע +Judges=×©×•×¤×˜×™× +Ruth=רות +I Samuel=שמו×ל ×' +II Samuel=שמו×ל ב' +I Kings=מל××›×™× ×' +II Kings=מל××›×™× ×‘' +I Chronicles=דברי ×”×™×ž×™× ×' +II Chronicles=דברי ×”×™×ž×™× ×‘' +Ezra=×¢×–×¨× +Nehemiah=נחמיה +Esther=×סתר +Job=×יוב +Psalms=×ª×”×™×œ×™× +Proverbs=משלי +Ecclesiastes=קוהלת +Song of Solomon=שיר ×”×©×™×¨×™× +Isaiah=ישיעיהו +Jeremiah=ירמיהו +Lamentations=××™×›×” +Ezekiel=יחזק×ל +Daniel=דניי×ל +Hosea=הושע +Joel=יו×ל +Amos=עמוס +Obadiah=עובדיה +Jonah=יונה +Micah=מיכה +Nahum=× ×—×•× +Habakkuk=חבקוק +Zephaniah=צפניה +Haggai=×—×’×™×™ +Zechariah=זכריה +Malachi=מל××›×™ +Matthew=מתי +Mark=×ž×¨×§×•× +Luke=×œ×•×§× +John=יוחנן +Acts=מעשי ×”×©×œ×™×—×™× +Romans=××œÖ¾×”×¨×•×ž×™×™× +I Corinthians=הר×שונה ××œÖ¾×”×§×•×¨×™× ×ª×™× +II Corinthians=השנייה ××œÖ¾×”×§×•×¨×™× ×ª×™× +Galatians=××œÖ¾×”×’×œ×˜×™× +Ephesians=×ל־ה××¤×¡×™×™× +Philippians=××œÖ¾×”×¤×™×œ×™×¤×™×™× +Colossians=××œÖ¾×”×§×•×œ×•×ž×™× +I Thessalonians=הר×שונה ××œÖ¾×”×ª×¡×œ×•× ×™×§×™× +II Thessalonians=השנייה ××œÖ¾×”×ª×¡×œ×•× ×™×§×™× +I Timothy=הר×שונה ××œÖ¾×˜×™×ž×•×ª×™×•× +II Timothy=השנייה ××œÖ¾×˜×™×ž×•×ª×™×•× +Titus=××œÖ¾×˜×™×˜×•× +Philemon=×ל־פילימון +Hebrews=××œÖ¾×”×¢×‘×¨×™× +James=יעקב +I Peter=×¤×˜×¨×•× ×”×¨×שונה +II Peter=×¤×˜×¨×•× ×”×©× ×™×™×” +I John=יוחנן הר×שונה +II John=יוחנן השנייה +III John=יוחנן השלישית +Jude=יהודה +Revelation of John=התגלות + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +בר×שית=1 +שמות=2 +ויקר×=3 +במדבר=4 +דברי×=5 +יהושוע=6 +שופטי×=7 +רות=8 +שמו×ל ×'=9 +שמו×ל×=9 +שמו×ל ×=9 +שמו×ל ב'=10 +שמו×לב=10 +שמו×ל ב=10 +מל××›×™× ×'=11 +מל××›×™××=11 +מל××›×™× ×=11 +מל××›×™× ×‘'=12 +מל××›×™× ×‘=12 +מל××›×™×ב=12 +דברי ×”×™×ž×™× ×'=13 +דבריהימי××=13 +דברי ×”×™×ž×™× ×=13 +דברי ×”×™×ž×™× ×‘'=14 +דבריהימי×ב=14 +דברי ×”×™×ž×™× ×‘=14 +עזר×=15 +נחמיה=16 +×סתר=17 +×יוב=18 +תהילי×=19 +משלי=20- +קוהלת=21 +שיר השירי×=22 +××™×›×”=25 +דניי×ל=27 +ישיעיהו=23 +ירמיהו=24 +יחזק×ל=26 +הושע=28 +יו×ל=29 +עמוס=30 +עובדיה=31 +יונה=32 +מיכה=33 +נחו×=34 +חבקוק=35 +צפניה=36 +×—×’×™×™=37 +זכריה=38 +מל××›×™=39 + +מתי=40 +הבשורה על־פי מתי=40 + +מרקו×=41 +הבשורה על־פי מרקו×=41 + +לוק×=42 +הבשורה על־פי לוק×=42 + +יוחנן=43 +הבשורה על־פי יוחנן=43 + +מעשי השליחי×=44 + +×ל־הרומיי×=45 +×גרת ×ל־הרומיי×=45 +×גרת ×¤×•×œ×•× ×ל־הרומיי×=45 +×גרת ×¤×•×œ×•× ×”×©×œ×™×— ×ל־הרומיי×=45 + +הר×שונה ×ל־הקורינתי×=46 +×גרת הר×שונה ×ל־הקורינתי×=46 +×גרת ×¤×•×œ×•× ×”×¨×שונה ×ל־הקורינתי×=46 + +השנייה ×ל־הקורינתי×=47 +×גרת השנייה ×ל־הקורינתי×=47 +×גרת ×¤×•×œ×•× ×”×©× ×™×™×” ×ל־הקורינתי×=47 + +×ל־הגלטי×=48 +×גרת ×ל־הגלטי×=48 +×גרת ×¤×•×œ×•× ×ל־הגלטי×=48 +×גרת ×¤×•×œ×•× ×”×©×œ×™×— ×ל־הגלטי×=48 + +×ל־ה×פסיי×=49 +×גרת ×ל־ה×פסיי×=49 +×גרת ×¤×•×œ×•× ×ל־ה×פסיי×=49 +×גרת ×¤×•×œ×•× ×”×©×œ×™×— ×ל־ה×פסיי×=49 + +×ל־הפיליפיי×=50 +×גרת ×ל־הפיליפיי×=50 +×גרת ×¤×•×œ×•× ×ל־הפיליפיי×=50 +×גרת ×¤×•×œ×•× ×”×©×œ×™×— ×ל־הפיליפיי×=50 + +×ל־הקולומי×=51 +×גרת ×ל־הקולומי×=51 +×גרת ×¤×•×œ×•× ×ל־הקולומי×=51 +×גר פולומ השליח ×ל־הקולומי×=51 + +הר×שונה ×ל־התסלוניקי×=52 +×גרת הר×שונה ×ל־התסלוניקי×=52 +×גרת ×¤×•×œ×•× ×”×¨×שונה ×ל־התסלוניקי×=52 + +השנייה ×ל־התסלוניקי×=53 +×גרת השנייה ×ל־התסלוניקי×=53 +×גרת ×¤×•×œ×•× ×”×©× ×™×™×” ×ל־התסלוניקי×=53 + +הר×שונה ×ל־טימותיו×=54 +×גרת הר×שונה ×ל־טימותיו×=54 +×גרת ×¤×•×œ×•× ×”×¨×שונה ×ל־טימותיו×=54 + +השנייה ×ל־טימותיו×=55 +×גרת השנייה ×ל־טימותיו×=55 +×גרת ×¤×•×œ×•× ×”×©× ×™×™×” ×ל־טימותיו×=55 + +×ל־טיטו×=56 +×גרת ×ל־טיטו×=56 +×גרת ×¤×•×œ×•× ×ל־טיטו×=56 + +×ל־פילימון=57 +×גרת ×ל־פילימון=57 +×גרת ×¤×•×œ×•× ×ל־פילימון=57 + +×ל־העברי×=58 +×גרת ×ל־העברי×=58 +×”×גרת ×ל־העברי×=58 + +יעקב=59 +×גרת יעקב=59 + +×¤×˜×¨×•× ×”×¨×שונה=60 +×גרת ×¤×˜×¨×•× ×”×¨×שונה=60 +×גרת הרשונה של ×¤×˜×¨×•× ×”×©×œ×™×—=60 + +×¤×˜×¨×•× ×”×©× ×™×™×”=61 +×גרת ×¤×˜×¨×•× ×”×©× ×™×™×”=61 +×גרת השנייה של ×¤×˜×¨×•× ×”×©×œ×™×—=61 + +יוחנן הר×שונה=62 +×גרת יוחנן הר×שונה=62 +×גרת הרשונה של יוחנן השליח=62 + +יוחנן השנייה=63 +×גרת יוחנן השנייה=63 +×גרת השנייה של יוחנן השליח=63 + +יוחנן השלישית=64 +×גרת יוחנן השלישית=64 +×גרת השלישית יוחנן השליח=64 + +יהודה=65 +×גרת יהודה=65 + +התגלות=66 +התגלות יוחנן=66 diff --git a/locales.d/hu-utf8.conf b/locales.d/hu-utf8.conf new file mode 100644 index 0000000..4a12c4c --- /dev/null +++ b/locales.d/hu-utf8.conf @@ -0,0 +1,395 @@ +[Meta] +Name=hu +Description=Magyar (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=1. Mózes +Exodus=2. Mózes +Leviticus=3. Mózes +Numbers=4. Mózes +Deuteronomy=5. Mózes +Joshua=Józsué +Judges=Bírák +Ruth=Ruth +I Samuel=1. Sámuel +II Samuel=2. Sámuel +I Kings=1. Királyok +II Kings=2. Királyok +I Chronicles=1. Krónika +II Chronicles=2. Krónika +Ezra=Ezsdrás +Nehemiah=Nehémiás +Esther=Eszter +Job=Jób +Psalms=Zsoltárok +Proverbs=Példabeszédek +Ecclesiastes=Prédikátor +Song of Solomon=Énekek éneke +Isaiah=Ézsaiás +Jeremiah=Jeremiás +Lamentations=Jeremiás Siralmai +Ezekiel=Ezékiel +Daniel=Dániel +Hosea=Hóseás +Joel=Jóel +Amos=Ãmós +Obadiah=Abdiás +Jonah=Jónás +Micah=Mikeás +Nahum=Náhum +Habakkuk=Habakuk +Zephaniah=Sofóniás +Haggai=Aggeus +Zechariah=Zakariás +Malachi=Malakiás +Matthew=Máté +Mark=Márk +Luke=Lukács +John=János +Acts=Apostolok Cselekedetei +Romans=Róma +I Corinthians=1. Korintus +II Corinthians=2. Korintus +Galatians=Galata +Ephesians=Efézus +Philippians=Filippi +Colossians=Kolossé +I Thessalonians=1. Thessalonika +II Thessalonians=2. Thessalonika +I Timothy=1. Timóteus +II Timothy=2. Timóteus +Titus=Titusz +Philemon=Filemon +Hebrews=Zsidókhoz írt levél +James=Jakab +I Peter=1. Péter +II Peter=2. Péter +I John=1. János +II John=2. János +III John=3. János +Jude=Júdás +Revelation of John=Jelenések + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MÓZES=1 +1 MÓZES=1 +1MÓZES=1 + +2. MÓZES=2 +2 MÓZES=2 +2MÓZES=2 + +3. MÓZES=3 +3 MÓZES=3 +3MÓZES=3 + +4. MÓZES=4 +4 MÓZES=4 +4MÓZES=4 + +5. MÓZES=5 +5 MÓZES=5 +5MÓZES=5 + +JÓZSUÉ=6 +BÃRÃK=7 +RUTH=8 + +1. SÃMUEL=9 +1 SÃMUEL=9 +1SÃMUEL=9 + +2. SÃMUEL=10 +2 SÃMUEL=10 +2SÃMUEL=10 + +1. KIRÃLYOK=11 +1 KIRÃLYOK=11 +1KIRÃLYOK=11 + +2. KIRÃLYOK=12 +2 KIRÃLYOK=12 +2KIRÃLYOK=12 + +1. KRÓNIKA=13 +1 KRÓNIKA=13 +1KRÓNIKA=13 + +2. KRÓNIKA=14 +2 KRÓNIKA=14 +2KRÓNIKA=14 + +EZSDRÃS=15 +NEHÉMIÃS=16 +ESZTER=17 +JÓB=18 +ZSOLTÃROK=19 +PÉLDABESZÉDEK=20 +PRÉDIKÃTOR=21 +ÉNEKEK ÉNEKE=22 +ÉZSAIÃS=23 +JEREMIÃS=24 +JEREMIÃS SIRALMAI=25 +EZÉKIEL=26 +DÃNIEL=27 +HÓSEÃS=28 +JÓEL=29 +ÃMÓS=30 +ABDIÃS=31 +JÓNÃS=32 +MIKEÃS=33 +NÃHUM=34 +HABAKUK=35 +SOFÓNIÃS=36 +AGGEUS=37 +ZAKARIÃS=38 +MALAKIÃS=39 +MÃTÉ=40 +MÃRK=41 +LUKÃCS=42 +JÃNOS=43 +APOSTOLOK CSELEKEDETEI=44 +RÓMA=45 + +1. KORINTUS=46 +1 KORINTUS=46 +1KORINTUS=46 + +2. KORINTUS=47 +2 KORINTUS=47 +2KORINTUS=47 + +GALATA=48 +EFÉZUS=49 +FILIPPI=50 +KOLOSSÉ=51 + +1. THESSALONIKA=52 +1 THESSALONIKA=52 +1THESSALONIKA=52 + +2. THESSALONIKA=53 +2 THESSALONIKA=53 +2THESSALONIKA=53 + +1. TIMÓTEUS=54 +1 TIMÓTEUS=54 +1TIMÓTEUS=54 + +2. TIMÓTEUS=55 +2 TIMÓTEUS=55 +2TIMÓTEUS=55 + +TITUSZ=56 +FILEMON=57 +ZSIDÓKHOZ ÃRT LEVÉL=58 +JAKAB=59 + +1. PÉTER=60 +1 PÉTER=60 +1PÉTER=60 + +2. PÉTER=61 +2 PÉTER=61 +2PÉTER=61 + +1. JÃNOS=62 +1 JÃNOS=62 +1JÃNOS=62 + +2. JÃNOS=63 +2 JÃNOS=63 +2JÃNOS=63 + +3. JÃNOS=64 +3 JÃNOS=64 +3JÃNOS=64 + +JÚDÃS=65 +JELENÉSEK=66 diff --git a/locales.d/hu.conf b/locales.d/hu.conf new file mode 100644 index 0000000..ffb78ba --- /dev/null +++ b/locales.d/hu.conf @@ -0,0 +1,395 @@ +[Meta] +Name=hu +Description=Magyar +Encoding=ISO8859-1 + +[Text] +Genesis=1. Mózes +Exodus=2. Mózes +Leviticus=3. Mózes +Numbers=4. Mózes +Deuteronomy=5. Mózes +Joshua=Józsué +Judges=Bírák +Ruth=Ruth +I Samuel=1. Sámuel +II Samuel=2. Sámuel +I Kings=1. Királyok +II Kings=2. Királyok +I Chronicles=1. Krónika +II Chronicles=2. Krónika +Ezra=Ezsdrás +Nehemiah=Nehémiás +Esther=Eszter +Job=Jób +Psalms=Zsoltárok +Proverbs=Példabeszédek +Ecclesiastes=Prédikátor +Song of Solomon=Énekek éneke +Isaiah=Ézsaiás +Jeremiah=Jeremiás +Lamentations=Jeremiás Siralmai +Ezekiel=Ezékiel +Daniel=Dániel +Hosea=Hóseás +Joel=Jóel +Amos=Ámós +Obadiah=Abdiás +Jonah=Jónás +Micah=Mikeás +Nahum=Náhum +Habakkuk=Habakuk +Zephaniah=Sofóniás +Haggai=Aggeus +Zechariah=Zakariás +Malachi=Malakiás +Matthew=Máté +Mark=Márk +Luke=Lukács +John=János +Acts=Apostolok Cselekedetei +Romans=Róma +I Corinthians=1. Korintus +II Corinthians=2. Korintus +Galatians=Galata +Ephesians=Efézus +Philippians=Filippi +Colossians=Kolossé +I Thessalonians=1. Thessalonika +II Thessalonians=2. Thessalonika +I Timothy=1. Timóteus +II Timothy=2. Timóteus +Titus=Titusz +Philemon=Filemon +Hebrews=Zsidókhoz írt levél +James=Jakab +I Peter=1. Péter +II Peter=2. Péter +I John=1. János +II John=2. János +III John=3. János +Jude=Júdás +Revelation of John=Jelenések + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MÓZES=1 +1 MÓZES=1 +1MÓZES=1 + +2. MÓZES=2 +2 MÓZES=2 +2MÓZES=2 + +3. MÓZES=3 +3 MÓZES=3 +3MÓZES=3 + +4. MÓZES=4 +4 MÓZES=4 +4MÓZES=4 + +5. MÓZES=5 +5 MÓZES=5 +5MÓZES=5 + +JÓZSUÉ=6 +BÍRÁK=7 +RUTH=8 + +1. SÁMUEL=9 +1 SÁMUEL=9 +1SÁMUEL=9 + +2. SÁMUEL=10 +2 SÁMUEL=10 +2SÁMUEL=10 + +1. KIRÁLYOK=11 +1 KIRÁLYOK=11 +1KIRÁLYOK=11 + +2. KIRÁLYOK=12 +2 KIRÁLYOK=12 +2KIRÁLYOK=12 + +1. KRÓNIKA=13 +1 KRÓNIKA=13 +1KRÓNIKA=13 + +2. KRÓNIKA=14 +2 KRÓNIKA=14 +2KRÓNIKA=14 + +EZSDRÁS=15 +NEHÉMIÁS=16 +ESZTER=17 +JÓB=18 +ZSOLTÁROK=19 +PÉLDABESZÉDEK=20 +PRÉDIKÁTOR=21 +ÉNEKEK ÉNEKE=22 +ÉZSAIÁS=23 +JEREMIÁS=24 +JEREMIÁS SIRALMAI=25 +EZÉKIEL=26 +DÁNIEL=27 +HÓSEÁS=28 +JÓEL=29 +ÁMÓS=30 +ABDIÁS=31 +JÓNÁS=32 +MIKEÁS=33 +NÁHUM=34 +HABAKUK=35 +SOFÓNIÁS=36 +AGGEUS=37 +ZAKARIÁS=38 +MALAKIÁS=39 +MÁTÉ=40 +MÁRK=41 +LUKÁCS=42 +JÁNOS=43 +APOSTOLOK CSELEKEDETEI=44 +RÓMA=45 + +1. KORINTUS=46 +1 KORINTUS=46 +1KORINTUS=46 + +2. KORINTUS=47 +2 KORINTUS=47 +2KORINTUS=47 + +GALATA=48 +EFÉZUS=49 +FILIPPI=50 +KOLOSSÉ=51 + +1. THESSALONIKA=52 +1 THESSALONIKA=52 +1THESSALONIKA=52 + +2. THESSALONIKA=53 +2 THESSALONIKA=53 +2THESSALONIKA=53 + +1. TIMÓTEUS=54 +1 TIMÓTEUS=54 +1TIMÓTEUS=54 + +2. TIMÓTEUS=55 +2 TIMÓTEUS=55 +2TIMÓTEUS=55 + +TITUSZ=56 +FILEMON=57 +ZSIDÓKHOZ ÍRT LEVÉL=58 +JAKAB=59 + +1. PÉTER=60 +1 PÉTER=60 +1PÉTER=60 + +2. PÉTER=61 +2 PÉTER=61 +2PÉTER=61 + +1. JÁNOS=62 +1 JÁNOS=62 +1JÁNOS=62 + +2. JÁNOS=63 +2 JÁNOS=63 +2JÁNOS=63 + +3. JÁNOS=64 +3 JÁNOS=64 +3JÁNOS=64 + +JÚDÁS=65 +JELENÉSEK=66 diff --git a/locales.d/id.conf b/locales.d/id.conf new file mode 100644 index 0000000..d8476e0 --- /dev/null +++ b/locales.d/id.conf @@ -0,0 +1,465 @@ +[Meta] +Name=id +Description=Indonesian +Encoding=ASCII + +[Text] +Genesis=Kejadian +Exodus=Keluaran +Leviticus=Imamat +Numbers=Bilangan +Deuteronomy=Ulangan +Joshua=Yosua +Judges=Hakim-hakim +Ruth=Rut +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Raja +II Kings=2 Raja +I Chronicles=1 Tawarikh +II Chronicles=2 Tawarikh +Ezra=Ezra +Nehemiah=Nehemia +Esther=Ester +Job=Ayub +Psalms=Mazmur +Proverbs=Amsal +Ecclesiastes=Pengkhotbah +Song of Solomon=Kidung Agung +Isaiah=Yesaya +Jeremiah=Yeremia +Lamentations=Ratapan +Ezekiel=Yehezkiel +Daniel=Daniel +Hosea=Hosea +Joel=Yoel +Amos=Amos +Obadiah=Obaja +Jonah=Yunus +Micah=Mikha +Nahum=Nahum +Habakkuk=Habakuk +Zephaniah=Zefanya +Haggai=Hagai +Zechariah=Zakharia +Malachi=Maleakhi +Matthew=Matius +Mark=Markus +Luke=Lukas +John=Yohanes +Acts=Kisah Para Rasul +Romans=Roma +I Corinthians=1 Korintus +II Corinthians=2 Korintus +Galatians=Galatia +Ephesians=Efesus +Philippians=Filipi +Colossians=Kolose +I Thessalonians=1 Tesalonika +II Thessalonians=2 Tesalonika +I Timothy=1 Timotius +II Timothy=2 Timotius +Titus=Titus +Philemon=Filemon +Hebrews=Ibrani +James=Yakobus +I Peter=1 Petrus +II Peter=2 Petrus +I John=1 Yohanes +II John=2 Yohanes +III John=3 Yohanes +Jude=Yudas +Revelation of John=Wahyu + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 KOR=46 +1 KORINTUS=46 +1 PE=60 +1 PETER=60 +1 PETRUS=60 +1 PTR=60 +1 RA=11 +1 RAJA=11 +1 RAJA-RAJA=11 +1 SA=9 +1 SAMUEL=9 +1 TA=13 +1 TAWARIKH=13 +1 TE=52 +1 TESALONIKA=52 +1 THESSALONIANS=52 +1 TI=54 +1 TIMOTHY=54 +1 TIMOTIUS=54 +1 YO=62 +1 YOHANES=62 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1KO=46 +1PE=60 +1PETER=60 +1PTR=60 +1RA=11 +1RAJA-RAJA=11 +1SA=9 +1SAMUEL=9 +1TA=13 +1TE=52 +1THESSALONIANS=52 +1TI=54 +1TIMOTHY=54 +1YO=62 +1YOH=62 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 KO=47 +2 KORINTUS=47 +2 PE=61 +2 PETER=61 +2 PETRUS=61 +2 PTR=61 +2 RA=12 +2 RAJA=12 +2 RAJA-RAJA=12 +2 SA=10 +2 SAMUEL=10 +2 TA=14 +2 TAWARIKH=14 +2 TE=53 +2 TESALONIKA=53 +2 THESSALONIANS=53 +2 TI=55 +2 TIMOTHY=55 +2 TIMOTIUS=55 +2 YO=63 +2 YOHANES=63 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2KO=47 +2PE=61 +2PETER=61 +2PTR=61 +2RA=12 +2RAJA-RAJA=12 +2SA=10 +2SAMUEL=10 +2TA=14 +2TE=53 +2THESSALONIANS=53 +2TI=55 +2TIMOTHY=55 +2YO=63 +2YOH=63 +3 JN=64 +3 JOHN=64 +3 YO=64 +3 YOHANES=64 +3JN=64 +3JOHN=64 +3YO=64 +3YOH=64 +A=20 +ACTS=44 +AM=30 +AMO=30 +AMOS=30 +AMS=20 +AMSAL=20 +AYB=18 +AYU=18 +AYUB=18 +BIL=4 +BILANGAN=4 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=27 +DAN=27 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EF=49 +EFESUS=49 +EPHESIANS=49 +EST=17 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZR=15 +EZRA=15 +F=50 +FILE=57 +FILEMON=57 +FILI=50 +FILIPI=50 +FLM=57 +FLP=50 +G=48 +GAL=48 +GALATIA=48 +GALATIANS=48 +GENESIS=1 +H=7 +HA=7 +HAB=35 +HABAKKUK=35 +HABAKUK=35 +HAG=37 +HAGAI=37 +HAGGAI=37 +HAK=7 +HAKIM-HAKIM=7 +HE=58 +HEBREWS=58 +HOS=28 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I KO=46 +I PE=60 +I PETER=60 +I PETRUS=60 +I PTR=60 +I RA=11 +I RAJA-RAJA=11 +I SA=9 +I SAMUEL=9 +I TA=13 +I TE=52 +I THESSALONIANS=52 +I TI=54 +I TIMOTHY=54 +I YO=62 +I=3 +IBR=58 +IBRANI=58 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II KO=47 +II PE=61 +II PETER=61 +II PETRUS=61 +II PTR=61 +II RA=12 +II RAJA-RAJA=12 +II SA=10 +II SAMUEL=10 +II TA=14 +II TE=53 +II THESSALONIANS=53 +II TI=55 +II TIMOTHY=55 +II YO=63 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +III YO=64 +IIIJN=64 +IIIJOHN=64 +IIIYO=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIKO=47 +IIPE=61 +IIPETER=61 +IIPETRUS=61 +IIPTR=61 +IIRA=12 +IIRAJA-RAJA=12 +IISA=10 +IISAMUEL=10 +IITA=14 +IITE=53 +IITHESSALONIANS=53 +IITI=54 +IITI=55 +IITIMOTHY=55 +IIYO=63 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IKO=46 +IM=3 +IMAMAT=3 +IPE=60 +IPETER=60 +IPETRUS=60 +IPTR=60 +IRA=11 +IRAJA-RAJA=11 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITA=13 +ITE=52 +ITHESSALONIANS=52 +ITIMOTHY=54 +IYES=23 +IYO=62 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +KEJ=1 +KEJADIAN=1 +KEL=2 +KELUARAN=2 +KID=22 +KIDUNG AGUNG=22 +KIS=44 +KISAH PARA RASUL=44 +KOL=51 +KOLOSE=51 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUK=42 +LUKAS=42 +LUKE=42 +MA=40 +MAL=39 +MALACHI=39 +MALEAKHI=39 +MARK=41 +MARKUS=41 +MAT=40 +MATIUS=40 +MATTHEW=40 +MAZ=19 +MAZMUR=19 +MICAH=33 +MIK=33 +MIKHA=33 +MK=41 +MR=41 +MRK=41 +MT=40 +MZM=19 +N=16 +NAH=34 +NAHUM=34 +NEH=16 +NEHEMIA=16 +NEHEMIAH=16 +NUMBERS=4 +OB=31 +OBADIAH=31 +OBAJA=31 +P=21 +PENGK=21 +PENGKHOTBAH=21 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PKH=21 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +R=45 +RAT=25 +RATAPAN=25 +REVELATION OF JOHN=66 +REVELATION OF ST. JOHN=66 +REVELATION=66 +RM=45 +ROM=45 +ROMA=45 +ROMANS=45 +RUT=8 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TIT=56 +TITUS=56 +UL=5 +ULANGAN=5 +WAH=66 +WAHYU=66 +WHY=66 +Y=43 +YAK=59 +YAKOBUS=59 +YE=23 +YEH=26 +YEHEZKIEL=26 +YER=24 +YEREMIA=24 +YES=23 +YESAYA=23 +YL=29 +YO=43 +YOE=29 +YOEL=29 +YOH=43 +YOHANES=43 +YOS=6 +YOSUA=6 +YUD=65 +YUDAS=65 +YUN=32 +YUNUS=32 +ZAK=38 +ZAKHARIA=38 +ZECHARIAH=38 +ZEF=36 +ZEFANYA=36 +ZEPHANIAH=36 diff --git a/locales.d/it-utf8.conf b/locales.d/it-utf8.conf new file mode 100644 index 0000000..08be853 --- /dev/null +++ b/locales.d/it-utf8.conf @@ -0,0 +1,674 @@ +[Meta] +Name=it +Description=Italiano +Encoding=UTF-8 + +[Text] +Genesis=Genesi +Exodus=Esodo +Leviticus=Levitico +Numbers=Numeri +Deuteronomy=Deuteronomio +Joshua=Giosuè +Judges=Giudici +Ruth=Ruth +I Samuel=1. Samuele +II Samuel=2. Samuele +I Kings=1. Re +II Kings=2. Re +I Chronicles=1. Cronache +II Chronicles=2. Cronache +Ezra=Esdra +Nehemiah=Nehemia +Esther=Ester +Job=Giobbe +Psalms=Salmi +Proverbs=Proverbi +Ecclesiastes=Ecclesiaste +Song of Solomon=Cantico dei Cantici +Isaiah=Isaia +Jeremiah=Geremia +Lamentations=Lamentazioni +Ezekiel=Ezechiele +Daniel=Daniele +Hosea=Osea +Joel=Gioele +Amos=Amos +Obadiah=Abdia +Jonah=Giona +Micah=Michea +Nahum=Nahum +Habakkuk=Habacuc +Zephaniah=Sofonia +Haggai=Aggeo +Zechariah=Zaccaria +Malachi=Malachia +Matthew=Matteo +Mark=Marco +Luke=Luca +John=Giovanni +Acts=Atti degli Apostoli +Romans=Romani +I Corinthians=1. Corinzi +II Corinthians=2. Corinzi +Galatians=Galati +Ephesians=Efesini +Philippians=Filippesi +Colossians=Colossesi +I Thessalonians=1. Tessalonicesi +II Thessalonians=2. Tessalonicesi +I Timothy=1. Timoteo +II Timothy=2. Timoteo +Titus=Tito +Philemon=Filemone +Hebrews=Ebrei +James=Giacomo +I Peter=1. Pietro +II Peter=2. Pietro +I John=1. Giovanni +II John=2. Giovanni +III John=3. Giovanni +Jude=Giuda +Revelation of John=Apocalisse di Giovanni + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENESI=1 +ESODO=2 +LEVITICO=3 +NUMERI=4 +DEUTERONOMIO=5 +GIOSUÈ=6 +GIUDICI=7 +RUTH=8 + +1. SAMUELE=9 +1 SAMUELE=9 +1SAMUELE=9 + +2. SAMUELE=10 +2 SAMUELE=10 +2SAMUELE=10 + +1. RE=11 +1 RE=11 +1RE=11 + +2. RE=12 +2 RE=12 +2RE=12 + +1. CRONACHE=13 +1 CRONACHE=13 +1CRONACHE=13 + +2. CRONACHE=14 +2 CRONACHE=14 +2CRONACHE=14 + +ESODO=15 +NEHEMIA=16 +ESTER=17 +GIOBBE=18 +SALMI=19 +PROVERBI=20 +ECCLESIASTE=21 +CANTICO DEI CANTICI=22 +ISAIA=23 +GEREMIA=24 +LAMENTAZIONI=25 +EZECHIELE=26 +DANIELE=27 +OSEA=28 +GIOELE=29 +AMOS=30 +ABDIA=31 +GIONA=32 +MICHEA=33 +NAHUM=34 +HABACUC=35 +SOFONIA=36 +AGGEO=37 +ZACCARIA=38 +MALACHIA=39 +MATTEO=40 +MARCO=41 +LUCA=42 +GIOVANNI=43 +ATTI=44 +ROMANI=45 +1. CORINZI=46 +2. CORINZI=47 +GALATI=48 +EFESINI=49 +FILIPPESI=50 +COLOSSESI=51 + +1. TESSALONICESI=52 +1 TESSALONICESI=52 +1TESSALONICESI=52 + +2. TESSALONICESI=53 +2 TESSALONICESI=53 +2TESSALONICESI=53 + +1. TIMOTEO=54 +1 TIMOTEO=54 +1TIMOTEO=54 + +2. TIMOTEO=55 +2 TIMOTEO=55 +2TIMOTEO=55 + +TITO=56 +FILEMONE=57 +EBREI=58 +GIACOMO=59 + +1. PIETRO=60 +1 PIETRO=60 +1PIETRO=60 + +2. PIETRO=61 +2 PIETRO=61 +2PIETRO=61 + +1. GIOVANNI=62 +1 GIOVANNI=62 +1GIOVANNI=62 + +2. GIOVANNI=63 +2 GIOVANNI=63 +2GIOVANNI=63 + +3. GIOVANNI=64 +3 GIOVANNI=64 +3GIOVANNI=64 + +GIUDA=65 +APOCALISSE=66 + +1 C=46 +1 COR=46 +1 CORINZI=46 +1 CR=46 +1 CRO=13 +1 CRON=13 +1 CRONACHE=13 +1 GIOVANNI=62 +1 GV=62 +1 PIETRO=60 +1 PT=60 +1 RE=11 +1 SAM=9 +1 SAMUELE=9 +1 TESS=52 +1 TESSALONICESI=52 +1 TIM=54 +1 TIMOTEO=54 +1 TM=54 +1 TS=52 +1C=46 +1COR=46 +1CORINZI=46 +1CR=46 +1CRO=13 +1CRON=13 +1CRONACHE=13 +1GIOVANNI=62 +1GV=62 +1PIETRO=60 +1PT=60 +1RE=11 +1SAM=9 +1SAMUELE=9 +1TESS=52 +1TESSALONICESI=52 +1TIM=54 +1TIMOTEO=54 +1TM=54 +1TS=52 +2 C=47 +2 COR=47 +2 CORINZI=47 +2 CR=47 +2 CRO=14 +2 CRON=14 +2 CRONACHE=14 +2 GIOVANNI=63 +2 GV=63 +2 PIETRO=61 +2 PT=61 +2 RE=12 +2 SAM=10 +2 SAMUELE=10 +2 TESS=53 +2 TESSALONICESI=53 +2 TIM=55 +2 TIMOTEO=55 +2 TM=55 +2 TS=53 +2C=47 +2COR=47 +2CORINZI=47 +2CR=47 +2CRO=14 +2CRON=14 +2CRONACHE=14 +2GIOVANNI=63 +2GV=63 +2PIETRO=61 +2PT=61 +2RE=12 +2SAM=10 +2SAMUELE=10 +2TESS=53 +2TESSALONICESI=53 +2TIM=55 +2TIMOTEO=55 +2TM=55 +2TS=53 +3 GIOVANNI=64 +3 GV=64 +3GIOVANNI=64 +3GV=64 +AB=35 +ABACUC=35 +ABD=31 +ABDIA=31 +AGG=37 +AGGEO=37 +AM=30 +AMO=30 +AMOS=30 +AP=66 +APOC=66 +APOCALISSE DI GIOVANNI=66 +AT=44 +ATTI DEGLI APOSTOLI=44 +C=51 +CAN=22 +CL=51 +COL=51 +COLOSSESI=51 +D=5 +DAN=27 +DANIELE=27 +DEU=5 +DEUT=5 +DEUTERONOMIO=5 +E=49 +EB=58 +EBR=58 +EBREI=58 +ECC=21 +ECCLE=21 +ECCLESIASTE=21 +EF=49 +EFESINI=49 +ES=2 +ESD=15 +ESDRA=15 +ESO=2 +ESODO=2 +EST=17 +ESTER=17 +EZ=26 +EZE=26 +EZECHIELE=26 +FIL=50 +FILEM=57 +FILEMONE=57 +FILIPPESI=50 +FL=50 +FM=57 +G=1 +GAL=48 +GALATI=48 +GBB=18 +GC=59 +GD=65 +GDC=7 +GEN=1 +GENESI=1 +GER=24 +GEREMIA=24 +GIAC=59 +GIACOMO=59 +GIO=6 +GIOB=18 +GIOBBE=18 +GIOELE=29 +GIONA=32 +GIOS=6 +GIOSUÈ=6 +GIOVANNI=43 +GIUD=7 +GIUDA=65 +GIUDICI=7 +GL=48 +GLE=29 +GNA=32 +GV=43 +HAB=35 +HABACUC=35 +I C=46 +I COR=46 +I CORINZI=46 +I CR=46 +I CRO=13 +I CRON=13 +I CRONACHE=13 +I GIOVANNI=62 +I GV=62 +I PIETRO=60 +I PT=60 +I RE=11 +I SAM=9 +I SAMUEL=9 +I TESS=52 +I TESSALONICESI=52 +I TIM=54 +I TIMOTEO=54 +I TM=54 +I TS=52 +IC=46 +ICOR=46 +ICORINZI=46 +ICR=46 +ICRO=13 +ICRON=13 +ICRONACHE=13 +IGIOVANNI=62 +IGV=62 +II C=47 +II COR=47 +II CORINZI=47 +II CR=47 +II CRO=14 +II CRON=14 +II CRONACHE=14 +II GIOVANNI=63 +II GV=63 +II PIETRO=61 +II PT=61 +II RE=12 +II SAM=10 +II SAMUELE=10 +II TESS=53 +II TESSALONICESI=53 +II TIM=55 +II TIMOTEO=55 +II TM=55 +II TS=53 +IIC=47 +IICOR=47 +IICORINZI=47 +IICR=47 +IICRO=14 +IICRON=14 +IICRONACHE=14 +IIGIOVANNI=63 +IIGV=63 +III GIOVANNI=64 +III GV=64 +IIIGIOVANNI=64 +IIIGV=64 +IIPIETRO=61 +IIPT=61 +IIRE=12 +IISAM=10 +IISAMUELE=10 +IITESS=53 +IITESSALONICESI=53 +IITIM=55 +IITIMOTEO=55 +IITM=55 +IITS=53 +IPIETRO=60 +IPT=60 +IRE=11 +IS=23 +ISA=23 +ISAIA=23 +ISAM=9 +ISAMUELE=9 +ITESS=52 +ITESSALONICESI=52 +ITIM=54 +ITIMOTEO=54 +ITM=54 +ITS=52 +L=42 +LC=42 +LAM=25 +LAMENTATIONS=25 +LEV=3 +LEVITICO=3 +LUCA=42 +MA=40 +MAL=39 +MALACHIA=39 +MARCO=41 +MATTEO=40 +MC=41 +MI=33 +MIC=33 +MICHEA=33 +MT=40 +N=4 +NAH=34 +NAHUM=34 +NEEM=16 +NEH=16 +NEHEMIA=16 +NUM=4 +NUMERI=4 +OS=28 +OSE=28 +OSEA=28 +PRO=20 +PROV=20 +PROVERBI=20 +RM=45 +ROM=45 +ROMANI=45 +RUT=8 +RUTH=8 +SAL=19 +SALMI=19 +SLM=19 +SOF=36 +SOFONIA=36 +TIT=56 +TITO=56 +TT=56 +ZAC=38 +ZACCARIA=38 + + + diff --git a/locales.d/it.conf b/locales.d/it.conf new file mode 100644 index 0000000..f941033 --- /dev/null +++ b/locales.d/it.conf @@ -0,0 +1,674 @@ +[Meta] +Name=it +Description=Italiano +Encoding=ISO8859-1 + +[Text] +Genesis=Genesi +Exodus=Esodo +Leviticus=Levitico +Numbers=Numeri +Deuteronomy=Deuteronomio +Joshua=Giosuè +Judges=Giudici +Ruth=Ruth +I Samuel=1. Samuele +II Samuel=2. Samuele +I Kings=1. Re +II Kings=2. Re +I Chronicles=1. Cronache +II Chronicles=2. Cronache +Ezra=Esdra +Nehemiah=Nehemia +Esther=Ester +Job=Giobbe +Psalms=Salmi +Proverbs=Proverbi +Ecclesiastes=Ecclesiaste +Song of Solomon=Cantico dei Cantici +Isaiah=Isaia +Jeremiah=Geremia +Lamentations=Lamentazioni +Ezekiel=Ezechiele +Daniel=Daniele +Hosea=Osea +Joel=Gioele +Amos=Amos +Obadiah=Abdia +Jonah=Giona +Micah=Michea +Nahum=Nahum +Habakkuk=Habacuc +Zephaniah=Sofonia +Haggai=Aggeo +Zechariah=Zaccaria +Malachi=Malachia +Matthew=Matteo +Mark=Marco +Luke=Luca +John=Giovanni +Acts=Atti degli Apostoli +Romans=Romani +I Corinthians=1. Corinzi +II Corinthians=2. Corinzi +Galatians=Galati +Ephesians=Efesini +Philippians=Filippesi +Colossians=Colossesi +I Thessalonians=1. Tessalonicesi +II Thessalonians=2. Tessalonicesi +I Timothy=1. Timoteo +II Timothy=2. Timoteo +Titus=Tito +Philemon=Filemone +Hebrews=Ebrei +James=Giacomo +I Peter=1. Pietro +II Peter=2. Pietro +I John=1. Giovanni +II John=2. Giovanni +III John=3. Giovanni +Jude=Giuda +Revelation of John=Apocalisse di Giovanni + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENESI=1 +ESODO=2 +LEVITICO=3 +NUMERI=4 +DEUTERONOMIO=5 +GIOSUÈ=6 +GIUDICI=7 +RUTH=8 + +1. SAMUELE=9 +1 SAMUELE=9 +1SAMUELE=9 + +2. SAMUELE=10 +2 SAMUELE=10 +2SAMUELE=10 + +1. RE=11 +1 RE=11 +1RE=11 + +2. RE=12 +2 RE=12 +2RE=12 + +1. CRONACHE=13 +1 CRONACHE=13 +1CRONACHE=13 + +2. CRONACHE=14 +2 CRONACHE=14 +2CRONACHE=14 + +ESODO=15 +NEHEMIA=16 +ESTER=17 +GIOBBE=18 +SALMI=19 +PROVERBI=20 +ECCLESIASTE=21 +CANTICO DEI CANTICI=22 +ISAIA=23 +GEREMIA=24 +LAMENTAZIONI=25 +EZECHIELE=26 +DANIELE=27 +OSEA=28 +GIOELE=29 +AMOS=30 +ABDIA=31 +GIONA=32 +MICHEA=33 +NAHUM=34 +HABACUC=35 +SOFONIA=36 +AGGEO=37 +ZACCARIA=38 +MALACHIA=39 +MATTEO=40 +MARCO=41 +LUCA=42 +GIOVANNI=43 +ATTI=44 +ROMANI=45 +1. CORINZI=46 +2. CORINZI=47 +GALATI=48 +EFESINI=49 +FILIPPESI=50 +COLOSSESI=51 + +1. TESSALONICESI=52 +1 TESSALONICESI=52 +1TESSALONICESI=52 + +2. TESSALONICESI=53 +2 TESSALONICESI=53 +2TESSALONICESI=53 + +1. TIMOTEO=54 +1 TIMOTEO=54 +1TIMOTEO=54 + +2. TIMOTEO=55 +2 TIMOTEO=55 +2TIMOTEO=55 + +TITO=56 +FILEMONE=57 +EBREI=58 +GIACOMO=59 + +1. PIETRO=60 +1 PIETRO=60 +1PIETRO=60 + +2. PIETRO=61 +2 PIETRO=61 +2PIETRO=61 + +1. GIOVANNI=62 +1 GIOVANNI=62 +1GIOVANNI=62 + +2. GIOVANNI=63 +2 GIOVANNI=63 +2GIOVANNI=63 + +3. GIOVANNI=64 +3 GIOVANNI=64 +3GIOVANNI=64 + +GIUDA=65 +APOCALISSE=66 + +1 C=46 +1 COR=46 +1 CORINZI=46 +1 CR=46 +1 CRO=13 +1 CRON=13 +1 CRONACHE=13 +1 GIOVANNI=62 +1 GV=62 +1 PIETRO=60 +1 PT=60 +1 RE=11 +1 SAM=9 +1 SAMUELE=9 +1 TESS=52 +1 TESSALONICESI=52 +1 TIM=54 +1 TIMOTEO=54 +1 TM=54 +1 TS=52 +1C=46 +1COR=46 +1CORINZI=46 +1CR=46 +1CRO=13 +1CRON=13 +1CRONACHE=13 +1GIOVANNI=62 +1GV=62 +1PIETRO=60 +1PT=60 +1RE=11 +1SAM=9 +1SAMUELE=9 +1TESS=52 +1TESSALONICESI=52 +1TIM=54 +1TIMOTEO=54 +1TM=54 +1TS=52 +2 C=47 +2 COR=47 +2 CORINZI=47 +2 CR=47 +2 CRO=14 +2 CRON=14 +2 CRONACHE=14 +2 GIOVANNI=63 +2 GV=63 +2 PIETRO=61 +2 PT=61 +2 RE=12 +2 SAM=10 +2 SAMUELE=10 +2 TESS=53 +2 TESSALONICESI=53 +2 TIM=55 +2 TIMOTEO=55 +2 TM=55 +2 TS=53 +2C=47 +2COR=47 +2CORINZI=47 +2CR=47 +2CRO=14 +2CRON=14 +2CRONACHE=14 +2GIOVANNI=63 +2GV=63 +2PIETRO=61 +2PT=61 +2RE=12 +2SAM=10 +2SAMUELE=10 +2TESS=53 +2TESSALONICESI=53 +2TIM=55 +2TIMOTEO=55 +2TM=55 +2TS=53 +3 GIOVANNI=64 +3 GV=64 +3GIOVANNI=64 +3GV=64 +AB=35 +ABACUC=35 +ABD=31 +ABDIA=31 +AGG=37 +AGGEO=37 +AM=30 +AMO=30 +AMOS=30 +AP=66 +APOC=66 +APOCALISSE DI GIOVANNI=66 +AT=44 +ATTI DEGLI APOSTOLI=44 +C=51 +CAN=22 +CL=51 +COL=51 +COLOSSESI=51 +D=5 +DAN=27 +DANIELE=27 +DEU=5 +DEUT=5 +DEUTERONOMIO=5 +E=49 +EB=58 +EBR=58 +EBREI=58 +ECC=21 +ECCLE=21 +ECCLESIASTE=21 +EF=49 +EFESINI=49 +ES=2 +ESD=15 +ESDRA=15 +ESO=2 +ESODO=2 +EST=17 +ESTER=17 +EZ=26 +EZE=26 +EZECHIELE=26 +FIL=50 +FILEM=57 +FILEMONE=57 +FILIPPESI=50 +FL=50 +FM=57 +G=1 +GAL=48 +GALATI=48 +GBB=18 +GC=59 +GD=65 +GDC=7 +GEN=1 +GENESI=1 +GER=24 +GEREMIA=24 +GIAC=59 +GIACOMO=59 +GIO=6 +GIOB=18 +GIOBBE=18 +GIOELE=29 +GIONA=32 +GIOS=6 +GIOSUÈ=6 +GIOVANNI=43 +GIUD=7 +GIUDA=65 +GIUDICI=7 +GL=48 +GLE=29 +GNA=32 +GV=43 +HAB=35 +HABACUC=35 +I C=46 +I COR=46 +I CORINZI=46 +I CR=46 +I CRO=13 +I CRON=13 +I CRONACHE=13 +I GIOVANNI=62 +I GV=62 +I PIETRO=60 +I PT=60 +I RE=11 +I SAM=9 +I SAMUEL=9 +I TESS=52 +I TESSALONICESI=52 +I TIM=54 +I TIMOTEO=54 +I TM=54 +I TS=52 +IC=46 +ICOR=46 +ICORINZI=46 +ICR=46 +ICRO=13 +ICRON=13 +ICRONACHE=13 +IGIOVANNI=62 +IGV=62 +II C=47 +II COR=47 +II CORINZI=47 +II CR=47 +II CRO=14 +II CRON=14 +II CRONACHE=14 +II GIOVANNI=63 +II GV=63 +II PIETRO=61 +II PT=61 +II RE=12 +II SAM=10 +II SAMUELE=10 +II TESS=53 +II TESSALONICESI=53 +II TIM=55 +II TIMOTEO=55 +II TM=55 +II TS=53 +IIC=47 +IICOR=47 +IICORINZI=47 +IICR=47 +IICRO=14 +IICRON=14 +IICRONACHE=14 +IIGIOVANNI=63 +IIGV=63 +III GIOVANNI=64 +III GV=64 +IIIGIOVANNI=64 +IIIGV=64 +IIPIETRO=61 +IIPT=61 +IIRE=12 +IISAM=10 +IISAMUELE=10 +IITESS=53 +IITESSALONICESI=53 +IITIM=55 +IITIMOTEO=55 +IITM=55 +IITS=53 +IPIETRO=60 +IPT=60 +IRE=11 +IS=23 +ISA=23 +ISAIA=23 +ISAM=9 +ISAMUELE=9 +ITESS=52 +ITESSALONICESI=52 +ITIM=54 +ITIMOTEO=54 +ITM=54 +ITS=52 +L=42 +LC=42 +LAM=25 +LAMENTATIONS=25 +LEV=3 +LEVITICO=3 +LUCA=42 +MA=40 +MAL=39 +MALACHIA=39 +MARCO=41 +MATTEO=40 +MC=41 +MI=33 +MIC=33 +MICHEA=33 +MT=40 +N=4 +NAH=34 +NAHUM=34 +NEEM=16 +NEH=16 +NEHEMIA=16 +NUM=4 +NUMERI=4 +OS=28 +OSE=28 +OSEA=28 +PRO=20 +PROV=20 +PROVERBI=20 +RM=45 +ROM=45 +ROMANI=45 +RUT=8 +RUTH=8 +SAL=19 +SALMI=19 +SLM=19 +SOF=36 +SOFONIA=36 +TIT=56 +TITO=56 +TT=56 +ZAC=38 +ZACCARIA=38 + + + diff --git a/locales.d/ja.conf b/locales.d/ja.conf new file mode 100644 index 0000000..cda897e --- /dev/null +++ b/locales.d/ja.conf @@ -0,0 +1,401 @@ +[Meta] +Name=ja +Description=Japanese[unicode] +Encoding=UTF-8 +[Text] + +# Insert after the = characters the translated booknames. + +Genesis=創世記 +Exodus=出エジプト記 +Leviticus=レビ記 +Numbers=民数記 +Deuteronomy=申命記 +Joshua=ヨシュア記 +Judges=士師記 +Ruth=ルツ記 +I Samuel=サムエル記上 +II Samuel=サムエル記下 +I Kings=列王紀上 +II Kings=列王紀下 +I Chronicles=歴代志上 +II Chronicles=歴代志下 +Ezra=エズラ記 +Nehemiah=ãƒãƒ˜ãƒŸãƒ¤è¨˜ +Esther=エステル記 +Job=ヨブ記 +Psalms=詩篇 +Proverbs=箴言 +Ecclesiastes=ä¼é“ã®æ›¸ +Song of Solomon=é›…æ­Œ +Isaiah=イザヤ書 +Jeremiah=エレミヤ書 +Lamentations=哀歌 +Ezekiel=エゼキエル書 +Daniel=ダニエル書 +Hosea=ホセア書 +Joel=ヨエル書 +Amos=アモス書 +Obadiah=オãƒãƒ‡ãƒ¤æ›¸ +Jonah=ヨナ書 +Micah=ミカ書 +Nahum=ナホム書 +Habakkuk=ãƒãƒã‚¯ã‚¯æ›¸ +Zephaniah=ゼãƒãƒ‹ãƒ¤æ›¸ +Haggai=ãƒã‚¬ã‚¤æ›¸ +Zechariah=ゼカリヤ書 +Malachi=マラキ書 +Matthew=マタイã«ã‚ˆã‚‹ç¦éŸ³æ›¸ +Mark=マルコã«ã‚ˆã‚‹ç¦éŸ³æ›¸ +Luke=ルカã«ã‚ˆã‚‹ç¦éŸ³æ›¸ +John=ヨãƒãƒã«ã‚ˆã‚‹ç¦éŸ³æ›¸ +Acts=ä½¿å¾’è¡Œä¼ +Romans=ローマ人ã¸ã®æ‰‹ç´™ +I Corinthians=コリント人ã¸ã®ç¬¬ä¸€ã®æ‰‹ç´™ +II Corinthians=コリント人ã¸ã®ç¬¬äºŒã®æ‰‹ç´™ +Galatians=ガラテヤ人ã¸ã®æ‰‹ç´™ +Ephesians=エペソ人ã¸ã®æ‰‹ç´™ +Philippians=ピリピ人ã¸ã®æ‰‹ç´™ +Colossians=コロサイ人ã¸ã®æ‰‹ç´™ +I Thessalonians=テサロニケ人ã¸ã®ç¬¬ä¸€ã®æ‰‹ç´™ +II Thessalonians=テサロニケ人ã¸ã®ç¬¬äºŒã®æ‰‹ç´™ +I Timothy=テモテヘã®ç¬¬ä¸€ã®æ‰‹ç´™ +II Timothy=テモテヘã®ç¬¬äºŒã®æ‰‹ç´™ +Titus=テトスヘã®æ‰‹ç´™ +Philemon=ピレモンヘã®æ‰‹ç´™ +Hebrews=ヘブル人ã¸ã®æ‰‹ç´™ +James=ヤコブã®æ‰‹ç´™ +I Peter=ペテロã®ç¬¬ä¸€ã®æ‰‹ç´™ +II Peter=ペテロã®ç¬¬äºŒã®æ‰‹ç´™ +I John=ヨãƒãƒã®ç¬¬ä¸€ã®æ‰‹ç´™ +II John=ヨãƒãƒã®ç¬¬äºŒã®æ‰‹ç´™ +III John=ヨãƒãƒã®ç¬¬ä¸‰ã®æ‰‹ç´™ +Jude=ユダã®æ‰‹ç´™ +Revelation of John=ヨãƒãƒã®é»™ç¤ºéŒ² + +[Book Abbrevs] + +# Here are the standard english booknames and abbrevations. Don't change +# them. Change your own ones below. + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +# here are the booknames and possible abbrevations of your language! The +# names below are german booknames, change them. The number after the names +# are the booknumber (location of book in the Bible). + +GEN=1 +EXOD=2 +LEV=3 +NUM=4 +DEUT=5 +JOSH=6 +JUDG=7 +RUTH=8 +1 SAM=9 +2 SAM=10 +1 KGS=11 +2 KGS=12 +1 CHR=13 +2 CHR=14 +EZRA=15 +NEH=16 +ESTH=17 +JOB=18 +PS=19 +PROV=20 +ECCL=21 +SONG=22 +ISA=23 +JER=24 +LAM=25 +EZEK=26 +DAN=27 +HOS=28 +JOEL=29 +AMOS=30 +OBAD=31 +JONAH=32 +MIC=33 +NAH=34 +HAB=35 +ZEPH=36 +HAG=37 +ZECH=38 +MAL=39 +MATTHEW=40 +MARK=41 +LUKE=42 +JOHN=43 +ACTS=44 +ROM=45 +1 COR=46 +2 COR=47 +GAL=48 +EPH=49 +PHIL=50 +COL=51 +1 THESS=52 +2 THESS=53 +1 TIM=54 +2 TIM=55 +TIT=56 +PHLM=57 +HEB=58 +JAS=59 +1 PET=60 +2 PET=61 +1 JOHN=62 +2 JOHN=63 +3 JOHN=64 +JUDE=65 +REV=66 + +創世記=1 +出エジプト記=2 +レビ記=3 +民数記=4 +申命記=5 +ヨシュア記=6 +士師記=7 +ルツ記=8 +サムエル記上=9 +サムエル記下=10 +列王紀上=11 +列王紀下=12 +歴代志上=13 +歴代志下=14 +エズラ記=15 +ãƒãƒ˜ãƒŸãƒ¤è¨˜=16 +エステル記=17 +ヨブ記=18 +詩篇=19 +箴言=20 +ä¼é“ã®æ›¸=21 +é›…æ­Œ=22 +イザヤ書=23 +エレミヤ書=24 +哀歌=25 +エゼキエル書=26 +ダニエル書=27 +ホセア書=28 +ヨエル書=29 +アモス書=30 +オãƒãƒ‡ãƒ¤æ›¸=31 +ヨナ書=32 +ミカ書=33 +ナホム書=34 +ãƒãƒã‚¯ã‚¯æ›¸=35 +ゼãƒãƒ‹ãƒ¤æ›¸=36 +ãƒã‚¬ã‚¤æ›¸=37 +ゼカリヤ書=38 +マラキ書=39 +マタイã«ã‚ˆã‚‹ç¦éŸ³æ›¸=40 +マルコã«ã‚ˆã‚‹ç¦éŸ³æ›¸=41 +ルカã«ã‚ˆã‚‹ç¦éŸ³æ›¸=42 +ヨãƒãƒã«ã‚ˆã‚‹ç¦éŸ³æ›¸=43 +使徒行ä¼=44 +ローマ人ã¸ã®æ‰‹ç´™=45 +コリント人ã¸ã®ç¬¬ä¸€ã®æ‰‹ç´™=46 +コリント人ã¸ã®ç¬¬äºŒã®æ‰‹ç´™=47 +ガラテヤ人ã¸ã®æ‰‹ç´™=48 +エペソ人ã¸ã®æ‰‹ç´™=49 +ピリピ人ã¸ã®æ‰‹ç´™=50 +コロサイ人ã¸ã®æ‰‹ç´™=51 +テサロニケ人ã¸ã®ç¬¬ä¸€ã®æ‰‹ç´™=52 +テサロニケ人ã¸ã®ç¬¬äºŒã®æ‰‹ç´™=53 +テモテヘã®ç¬¬ä¸€ã®æ‰‹ç´™=54 +テモテヘã®ç¬¬äºŒã®æ‰‹ç´™=55 +テトスヘã®æ‰‹ç´™=56 +ピレモンヘã®æ‰‹ç´™=57 +ヘブル人ã¸ã®æ‰‹ç´™=58 +ヤコブã®æ‰‹ç´™=59 +ペテロã®ç¬¬ä¸€ã®æ‰‹ç´™=60 +ペテロã®ç¬¬äºŒã®æ‰‹ç´™=61 +ヨãƒãƒã®ç¬¬ä¸€ã®æ‰‹ç´™=62 +ヨãƒãƒã®ç¬¬äºŒã®æ‰‹ç´™=63 +ヨãƒãƒã®ç¬¬ä¸‰ã®æ‰‹ç´™=64 +ユダã®æ‰‹ç´™=65 +ヨãƒãƒã®é»™ç¤ºéŒ²=66 diff --git a/locales.d/ko-utf8.conf b/locales.d/ko-utf8.conf new file mode 100644 index 0000000..ef3caa2 --- /dev/null +++ b/locales.d/ko-utf8.conf @@ -0,0 +1,456 @@ +[Meta] +Name=ko +Description=Korean (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=창세기 +Exodus=출애굽기 +Leviticus=레위기 +Numbers=민수기 +Deuteronomy=신명기 +Joshua=여호수아 +Judges=사사기 +Ruth=룻기 +I Samuel=ì‚¬ë¬´ì—˜ìƒ +II Samuel=사무엘하 +I Kings=ì—´ì™•ê¸°ìƒ +II Kings=열왕기하 +I Chronicles=ì—­ëŒ€ìƒ +II Chronicles=역대하 +Ezra=ì—ìŠ¤ë¼ +Nehemiah=ëŠí—¤ë¯¸ì•¼ +Esther=ì—ìŠ¤ë” +Job=욥기 +Psalms=시편 +Proverbs=ìž ì–¸ +Ecclesiastes=ì „ë„ì„œ +Song of Solomon=ì•„ê°€ +Isaiah=ì´ì‚¬ì•¼ +Jeremiah=예레미야 +Lamentations=예레미야애가 +Ezekiel=ì—스겔 +Daniel=다니엘 +Hosea=호세아 +Joel=요엘 +Amos=아모스 +Obadiah=오바댜 +Jonah=요나 +Micah=미가 +Nahum=나훔 +Habakkuk=하박국 +Zephaniah=ìŠ¤ë°”ëƒ +Haggai=학개 +Zechariah=스가랴 +Malachi=ë§ë¼ê¸° +Matthew=ë§ˆíƒœë³µìŒ +Mark=ë§ˆê°€ë³µìŒ +Luke=ëˆ„ê°€ë³µìŒ +John=ìš”í•œë³µìŒ +Acts=사ë„행전 +Romans=로마서 +I Corinthians=고린ë„ì „ì„œ +II Corinthians=고린ë„후서 +Galatians=ê°ˆë¼ë””ì•„ì„œ +Ephesians=ì—베소서 +Philippians=빌립보서 +Colossians=골로새서 +I Thessalonians=ë°ì‚´ë¡œë‹ˆê°€ì „ì„œ +II Thessalonians=ë°ì‚´ë¡œë‹ˆê°€í›„ì„œ +I Timothy=디모ë°ì „ì„œ +II Timothy=디모ë°í›„ì„œ +Titus=ë””ë„ì„œ +Philemon=빌레몬서 +Hebrews=히브리서 +James=야고보서 +I Peter=베드로전서 +II Peter=베드로후서 +I John=요한ì¼ì„œ +II John=요한ì´ì„œ +III John=요한삼서 +Jude=유다서 +Revelation of John=ìš”í•œê³„ì‹œë¡ + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +창세기=1 +ì°½=1 + +출애굽기=2 +츌=2 + +레위기=3 +ë ˆ=3 + +민수기=4 +민=4 + +신명기=5 +ì‹ =5 + +여호수아=6 +수=6 + +사사기=7 +ì‚¿=7 + +룻기=8 +룻=8 + +사무엘ìƒ=9 +삼ìƒ=9 + +사무엘하=10 +삼하=10 + +열왕기ìƒ=11 +왕ìƒ=11 + +열왕기하=12 +왕하=12 + +역대ìƒ=13 +대ìƒ=13 + +역대하=14 +대하=14 + +ì—스ë¼=15 +스=15 + +ëŠí—¤ë¯¸ì•¼=16 +ëŠ=16 + +ì—스ë”=17 +ì—=17 + +욥기=18 +욥=18 + +시편=19 +ì‹œ=19 + +ìž ì–¸=20 +ìž =20 + +ì „ë„ì„œ=21 +ì „=21 + +ì•„ê°€=22 +ì•„=22 + +ì´ì‚¬ì•¼=23 +사=23 + +예레미야=24 +ë ˜=24 + +예레미야애가=25 +ì• =25 + +ì—스겔=26 +ê²”=26 + +다니엘=27 +단=27 + +호세아=28 +호=28 + +요엘=29 +ìšœ=29 + +아모스=30 +ì•”=30 + +오바댜=31 +옵=31 + +요나=32 +욘=32 + +미가=33 +미=33 + +나훔=34 +나=34 + +하박국=35 +í•©=35 + +스바ëƒ=36 +습=36 + +학개=37 +í•™=37 + +스가랴=38 +슥=38 + +ë§ë¼ê¸°=39 +ë§=39 + +마태복ìŒ=40 +마=40 + +마가복ìŒ=41 +막=41 + +누가복ìŒ=42 +눅=42 + +요한복ìŒ=43 +ìš”=43 + +사ë„행전=44 +í–‰=44 + +로마서=45 +롬=45 + +고린ë„ì „ì„œ=46 +ê³ ì „=46 + +고린ë„후서=47 +고후=47 + +ê°ˆë¼ë””ì•„ì„œ=48 +ê°ˆ=48 + +ì—베소서=49 +ì—¡=49 + +빌립보서=50 +빌=50 + +골로새서=51 +골=51 + +ë°ì‚´ë¡œë‹ˆê°€ì „ì„œ=52 +ì‚´ì „=52 + +ë°ì‚´ë¡œë‹ˆê°€í›„ì„œ=53 +살후=53 + +디모ë°ì „ì„œ=54 +딤전=54 + +디모ë°í›„ì„œ=55 +딤후=55 + +ë””ë„ì„œ=56 +ë”›=56 + +빌레몬서=57 +몬=57 + +히브리서=58 +히=58 + +야고보서=59 +약=59 + +베드로전서=60 +벧전=60 + +베드로후서=61 +벧후=61 + +요한ì¼ì„œ=62 +ìš”ì¼=62 + +요한ì´ì„œ=63 +ìš”ì´=63 + +요한삼서=64 +요삼=64 + +유다서=65 +유=65 + +요한계시ë¡=66 +계=66 diff --git a/locales.d/ko.conf b/locales.d/ko.conf new file mode 100644 index 0000000..bdd7736 --- /dev/null +++ b/locales.d/ko.conf @@ -0,0 +1,456 @@ +[Meta] +Name=ko +Description=Korean +Encoding=EUCKR + +[Text] +Genesis=â¼¼±â +Exodus=Ãâ¾Ö±Á±â +Leviticus=·¹À§±â +Numbers=¹Î¼ö±â +Deuteronomy=½Å¸í±â +Joshua=¿©È£¼ö¾Æ +Judges=»ç»ç±â +Ruth=·í±â +I Samuel=»ç¹«¿¤»ó +II Samuel=»ç¹«¿¤ÇÏ +I Kings=¿­¿Õ±â»ó +II Kings=¿­¿Õ±âÇÏ +I Chronicles=¿ª´ë»ó +II Chronicles=¿ª´ëÇÏ +Ezra=¿¡½º¶ó +Nehemiah=´ÀÇì¹Ì¾ß +Esther=¿¡½º´õ +Job=¿é±â +Psalms=½ÃÆí +Proverbs=Àá¾ð +Ecclesiastes=Àüµµ¼­ +Song of Solomon=¾Æ°¡ +Isaiah=ÀÌ»ç¾ß +Jeremiah=¿¹·¹¹Ì¾ß +Lamentations=¿¹·¹¹Ì¾ß¾Ö°¡ +Ezekiel=¿¡½º°Ö +Daniel=´Ù´Ï¿¤ +Hosea=È£¼¼¾Æ +Joel=¿ä¿¤ +Amos=¾Æ¸ð½º +Obadiah=¿À¹Ù´ô +Jonah=¿ä³ª +Micah=¹Ì°¡ +Nahum=³ªÈÉ +Habakkuk=ÇϹڱ¹ +Zephaniah=½º¹Ù³Ä +Haggai=Çа³ +Zechariah=½º°¡·ª +Malachi=¸»¶ó±â +Matthew=¸¶Åº¹À½ +Mark=¸¶°¡º¹À½ +Luke=´©°¡º¹À½ +John=¿äÇѺ¹À½ +Acts=»çµµÇàÀü +Romans=·Î¸¶¼­ +I Corinthians=°í¸°µµÀü¼­ +II Corinthians=°í¸°µµÈļ­ +Galatians=°¥¶óµð¾Æ¼­ +Ephesians=¿¡º£¼Ò¼­ +Philippians=ºô¸³º¸¼­ +Colossians=°ñ·Î»õ¼­ +I Thessalonians=µ¥»ì·Î´Ï°¡Àü¼­ +II Thessalonians=µ¥»ì·Î´Ï°¡Èļ­ +I Timothy=µð¸ðµ¥Àü¼­ +II Timothy=µð¸ðµ¥Èļ­ +Titus=µðµµ¼­ +Philemon=ºô·¹¸ó¼­ +Hebrews=È÷ºê¸®¼­ +James=¾ß°íº¸¼­ +I Peter=º£µå·ÎÀü¼­ +II Peter=º£µå·ÎÈļ­ +I John=¿äÇÑÀϼ­ +II John=¿äÇÑÀ̼­ +III John=¿äÇѻM +Jude=À¯´Ù¼­ +Revelation of John=¿äÇÑ°è½Ã·Ï + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +â¼¼±â=1 +â=1 + +Ãâ¾Ö±Á±â=2 +Ãô=2 + +·¹À§±â=3 +·¹=3 + +¹Î¼ö±â=4 +¹Î=4 + +½Å¸í±â=5 +½Å=5 + +¿©È£¼ö¾Æ=6 +¼ö=6 + +»ç»ç±â=7 +»ñ=7 + +·í±â=8 +·í=8 + +»ç¹«¿¤»ó=9 +»ï»ó=9 + +»ç¹«¿¤ÇÏ=10 +»ïÇÏ=10 + +¿­¿Õ±â»ó=11 +¿Õ»ó=11 + +¿­¿Õ±âÇÏ=12 +¿ÕÇÏ=12 + +¿ª´ë»ó=13 +´ë»ó=13 + +¿ª´ëÇÏ=14 +´ëÇÏ=14 + +¿¡½º¶ó=15 +½º=15 + +´ÀÇì¹Ì¾ß=16 +´À=16 + +¿¡½º´õ=17 +¿¡=17 + +¿é±â=18 +¿é=18 + +½ÃÆí=19 +½Ã=19 + +Àá¾ð=20 +Àá=20 + +Àüµµ¼­=21 +Àü=21 + +¾Æ°¡=22 +¾Æ=22 + +ÀÌ»ç¾ß=23 +»ç=23 + +¿¹·¹¹Ì¾ß=24 +·½=24 + +¿¹·¹¹Ì¾ß¾Ö°¡=25 +¾Ö=25 + +¿¡½º°Ö=26 +°Ö=26 + +´Ù´Ï¿¤=27 +´Ü=27 + +È£¼¼¾Æ=28 +È£=28 + +¿ä¿¤=29 +¿ç=29 + +¾Æ¸ð½º=30 +¾Ï=30 + +¿À¹Ù´ô=31 +¿É=31 + +¿ä³ª=32 +¿æ=32 + +¹Ì°¡=33 +¹Ì=33 + +³ªÈÉ=34 +³ª=34 + +ÇϹڱ¹=35 +ÇÕ=35 + +½º¹Ù³Ä=36 +½À=36 + +Çа³=37 +ÇÐ=37 + +½º°¡·ª=38 +½»=38 + +¸»¶ó±â=39 +¸»=39 + +¸¶Åº¹À½=40 +¸¶=40 + +¸¶°¡º¹À½=41 +¸·=41 + +´©°¡º¹À½=42 +´ª=42 + +¿äÇѺ¹À½=43 +¿ä=43 + +»çµµÇàÀü=44 +Çà=44 + +·Î¸¶¼­=45 +·Ò=45 + +°í¸°µµÀü¼­=46 +°íÀü=46 + +°í¸°µµÈļ­=47 +°íÈÄ=47 + +°¥¶óµð¾Æ¼­=48 +°¥=48 + +¿¡º£¼Ò¼­=49 +¿¦=49 + +ºô¸³º¸¼­=50 +ºô=50 + +°ñ·Î»õ¼­=51 +°ñ=51 + +µ¥»ì·Î´Ï°¡Àü¼­=52 +»ìÀü=52 + +µ¥»ì·Î´Ï°¡Èļ­=53 +»ìÈÄ=53 + +µð¸ðµ¥Àü¼­=54 +µõÀü=54 + +µð¸ðµ¥Èļ­=55 +µõÈÄ=55 + +µðµµ¼­=56 +µó=56 + +ºô·¹¸ó¼­=57 +¸ó=57 + +È÷ºê¸®¼­=58 +È÷=58 + +¾ß°íº¸¼­=59 +¾à=59 + +º£µå·ÎÀü¼­=60 +º¦Àü=60 + +º£µå·ÎÈļ­=61 +º¦ÈÄ=61 + +¿äÇÑÀϼ­=62 +¿äÀÏ=62 + +¿äÇÑÀ̼­=63 +¿äÀÌ=63 + +¿äÇѻM=64 +¿ä»ï=64 + +À¯´Ù¼­=65 +À¯=65 + +¿äÇÑ°è½Ã·Ï=66 +°è=66 diff --git a/locales.d/ko_abbrev-utf8.conf b/locales.d/ko_abbrev-utf8.conf new file mode 100644 index 0000000..9275112 --- /dev/null +++ b/locales.d/ko_abbrev-utf8.conf @@ -0,0 +1,271 @@ +[Meta] +Name=ko_abbrev +Description=Korean abbreviations (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=ì°½ +Exodus=출 +Leviticus=ë ˆ +Numbers=민 +Deuteronomy=ì‹  +Joshua=ì—¬ +Judges=ì‚¿ +Ruth=룻 +I Samuel=ì‚¼ìƒ +II Samuel=삼하 +I Kings=ì™•ìƒ +II Kings=왕하 +I Chronicles=ëŒ€ìƒ +II Chronicles=대하 +Ezra=스 +Nehemiah=ëŠ +Esther=ì— +Job=욥 +Psalms=ì‹œ +Proverbs=ìž  +Ecclesiastes=ì „ +Song of Solomon=ì•„ +Isaiah=사 +Jeremiah=ë ˜ +Lamentations=ì•  +Ezekiel=ê²” +Daniel=단 +Hosea=호 +Joel=ìšœ +Amos=ì•” +Obadiah=옵 +Jonah=욘 +Micah=미 +Nahum=나 +Habakkuk=í•© +Zephaniah=습 +Haggai=í•™ +Zechariah=슥 +Malachi=ë§ +Matthew=마 +Mark=막 +Luke=눅 +John=ìš” +Acts=í–‰ +Romans=롬 +I Corinthians=ê³ ì „ +II Corinthians=고후 +Galatians=ê°ˆ +Ephesians=ì—¡ +Philippians=빌 +Colossians=골 +I Thessalonians=ì‚´ì „ +II Thessalonians=살후 +I Timothy=딤전 +II Timothy=딤후 +Titus=ë”› +Philemon=몬 +Hebrews=히 +James=약 +I Peter=벧전 +II Peter=벧후 +I John=ìš”ì¼ +II John=ìš”ì´ +III John=요삼 +Jude=유 +Revelation of John=계 + +[Book Abbrevs] +창세기=1 +ì°½=1 + +출애굽기=2 +츌=2 + +레위기=3 +ë ˆ=3 + +민수기=4 +민=4 + +신명기=5 +ì‹ =5 + +여호수아=6 +수=6 + +사사기=7 +ì‚¿=7 + +룻기=8 +룻=8 + +사무엘ìƒ=9 +삼ìƒ=9 + +사무엘하=10 +삼하=10 + +열왕기ìƒ=11 +왕ìƒ=11 + +열왕기하=12 +왕하=12 + +역대ìƒ=13 +대ìƒ=13 + +역대하=14 +대하=14 + +ì—스ë¼=15 +스=15 + +ëŠí—¤ë¯¸ì•¼=16 +ëŠ=16 + +ì—스ë”=17 +ì—=17 + +욥기=18 +욥=18 + +시편=19 +ì‹œ=19 + +ìž ì–¸=20 +ìž =20 + +ì „ë„ì„œ=21 +ì „=21 + +ì•„ê°€=22 +ì•„=22 + +ì´ì‚¬ì•¼=23 +사=23 + +예레미야=24 +ë ˜=24 + +예레미야애가=25 +ì• =25 + +ì—스겔=26 +ê²”=26 + +다니엘=27 +단=27 + +호세아=28 +호=28 + +요엘=29 +ìšœ=29 + +아모스=30 +ì•”=30 + +오바댜=31 +옵=31 + +요나=32 +욘=32 + +미가=33 +미=33 + +나훔=34 +나=34 + +하박국=35 +í•©=35 + +스바ëƒ=36 +습=36 + +학개=37 +í•™=37 + +스가랴=38 +슥=38 + +ë§ë¼ê¸°=39 +ë§=39 + +마태복ìŒ=40 +마=40 + +마가복ìŒ=41 +막=41 + +누가복ìŒ=42 +눅=42 + +요한복ìŒ=43 +ìš”=43 + +사ë„행전=44 +í–‰=44 + +로마서=45 +롬=45 + +고린ë„ì „ì„œ=46 +ê³ ì „=46 + +고린ë„후서=47 +고후=47 + +ê°ˆë¼ë””ì•„ì„œ=48 +ê°ˆ=48 + +ì—베소서=49 +ì—¡=49 + +빌립보서=50 +빌=50 + +골로새서=51 +골=51 + +ë°ì‚´ë¡œë‹ˆê°€ì „ì„œ=52 +ì‚´ì „=52 + +ë°ì‚´ë¡œë‹ˆê°€í›„ì„œ=53 +살후=53 + +디모ë°ì „ì„œ=54 +딤전=54 + +디모ë°í›„ì„œ=55 +딤후=55 + +ë””ë„ì„œ=56 +ë”›=56 + +빌레몬서=57 +몬=57 + +히브리서=58 +히=58 + +야고보서=59 +약=59 + +베드로전서=60 +벧전=60 + +베드로후서=61 +벧후=61 + +요한ì¼ì„œ=62 +ìš”ì¼=62 + +요한ì´ì„œ=63 +ìš”ì´=63 + +요한삼서=64 +요삼=64 + +유다서=65 +유=65 + +요한계시ë¡=66 +계=66 \ No newline at end of file diff --git a/locales.d/ko_abbrev.conf b/locales.d/ko_abbrev.conf new file mode 100644 index 0000000..e7c4155 --- /dev/null +++ b/locales.d/ko_abbrev.conf @@ -0,0 +1,271 @@ +[Meta] +Name=ko_abbrev +Description=Korean abbreviations +Encoding=EUCKR + +[Text] +Genesis=â +Exodus=Ãâ +Leviticus=·¹ +Numbers=¹Î +Deuteronomy=½Å +Joshua=¿© +Judges=»ñ +Ruth=·í +I Samuel=»ï»ó +II Samuel=»ïÇÏ +I Kings=¿Õ»ó +II Kings=¿ÕÇÏ +I Chronicles=´ë»ó +II Chronicles=´ëÇÏ +Ezra=½º +Nehemiah=´À +Esther=¿¡ +Job=¿é +Psalms=½Ã +Proverbs=Àá +Ecclesiastes=Àü +Song of Solomon=¾Æ +Isaiah=»ç +Jeremiah=·½ +Lamentations=¾Ö +Ezekiel=°Ö +Daniel=´Ü +Hosea=È£ +Joel=¿ç +Amos=¾Ï +Obadiah=¿É +Jonah=¿æ +Micah=¹Ì +Nahum=³ª +Habakkuk=ÇÕ +Zephaniah=½À +Haggai=ÇÐ +Zechariah=½» +Malachi=¸» +Matthew=¸¶ +Mark=¸· +Luke=´ª +John=¿ä +Acts=Çà +Romans=·Ò +I Corinthians=°íÀü +II Corinthians=°íÈÄ +Galatians=°¥ +Ephesians=¿¦ +Philippians=ºô +Colossians=°ñ +I Thessalonians=»ìÀü +II Thessalonians=»ìÈÄ +I Timothy=µõÀü +II Timothy=µõÈÄ +Titus=µó +Philemon=¸ó +Hebrews=È÷ +James=¾à +I Peter=º¦Àü +II Peter=º¦ÈÄ +I John=¿äÀÏ +II John=¿äÀÌ +III John=¿ä»ï +Jude=À¯ +Revelation of John=°è + +[Book Abbrevs] +â¼¼±â=1 +â=1 + +Ãâ¾Ö±Á±â=2 +Ãô=2 + +·¹À§±â=3 +·¹=3 + +¹Î¼ö±â=4 +¹Î=4 + +½Å¸í±â=5 +½Å=5 + +¿©È£¼ö¾Æ=6 +¼ö=6 + +»ç»ç±â=7 +»ñ=7 + +·í±â=8 +·í=8 + +»ç¹«¿¤»ó=9 +»ï»ó=9 + +»ç¹«¿¤ÇÏ=10 +»ïÇÏ=10 + +¿­¿Õ±â»ó=11 +¿Õ»ó=11 + +¿­¿Õ±âÇÏ=12 +¿ÕÇÏ=12 + +¿ª´ë»ó=13 +´ë»ó=13 + +¿ª´ëÇÏ=14 +´ëÇÏ=14 + +¿¡½º¶ó=15 +½º=15 + +´ÀÇì¹Ì¾ß=16 +´À=16 + +¿¡½º´õ=17 +¿¡=17 + +¿é±â=18 +¿é=18 + +½ÃÆí=19 +½Ã=19 + +Àá¾ð=20 +Àá=20 + +Àüµµ¼­=21 +Àü=21 + +¾Æ°¡=22 +¾Æ=22 + +ÀÌ»ç¾ß=23 +»ç=23 + +¿¹·¹¹Ì¾ß=24 +·½=24 + +¿¹·¹¹Ì¾ß¾Ö°¡=25 +¾Ö=25 + +¿¡½º°Ö=26 +°Ö=26 + +´Ù´Ï¿¤=27 +´Ü=27 + +È£¼¼¾Æ=28 +È£=28 + +¿ä¿¤=29 +¿ç=29 + +¾Æ¸ð½º=30 +¾Ï=30 + +¿À¹Ù´ô=31 +¿É=31 + +¿ä³ª=32 +¿æ=32 + +¹Ì°¡=33 +¹Ì=33 + +³ªÈÉ=34 +³ª=34 + +ÇϹڱ¹=35 +ÇÕ=35 + +½º¹Ù³Ä=36 +½À=36 + +Çа³=37 +ÇÐ=37 + +½º°¡·ª=38 +½»=38 + +¸»¶ó±â=39 +¸»=39 + +¸¶Åº¹À½=40 +¸¶=40 + +¸¶°¡º¹À½=41 +¸·=41 + +´©°¡º¹À½=42 +´ª=42 + +¿äÇѺ¹À½=43 +¿ä=43 + +»çµµÇàÀü=44 +Çà=44 + +·Î¸¶¼­=45 +·Ò=45 + +°í¸°µµÀü¼­=46 +°íÀü=46 + +°í¸°µµÈļ­=47 +°íÈÄ=47 + +°¥¶óµð¾Æ¼­=48 +°¥=48 + +¿¡º£¼Ò¼­=49 +¿¦=49 + +ºô¸³º¸¼­=50 +ºô=50 + +°ñ·Î»õ¼­=51 +°ñ=51 + +µ¥»ì·Î´Ï°¡Àü¼­=52 +»ìÀü=52 + +µ¥»ì·Î´Ï°¡Èļ­=53 +»ìÈÄ=53 + +µð¸ðµ¥Àü¼­=54 +µõÀü=54 + +µð¸ðµ¥Èļ­=55 +µõÈÄ=55 + +µðµµ¼­=56 +µó=56 + +ºô·¹¸ó¼­=57 +¸ó=57 + +È÷ºê¸®¼­=58 +È÷=58 + +¾ß°íº¸¼­=59 +¾à=59 + +º£µå·ÎÀü¼­=60 +º¦Àü=60 + +º£µå·ÎÈļ­=61 +º¦ÈÄ=61 + +¿äÇÑÀϼ­=62 +¿äÀÏ=62 + +¿äÇÑÀ̼­=63 +¿äÀÌ=63 + +¿äÇѻM=64 +¿ä»ï=64 + +À¯´Ù¼­=65 +À¯=65 + +¿äÇÑ°è½Ã·Ï=66 +°è=66 \ No newline at end of file diff --git a/locales.d/la.conf b/locales.d/la.conf new file mode 100644 index 0000000..c3e619a --- /dev/null +++ b/locales.d/la.conf @@ -0,0 +1,332 @@ + +# +# Latin Bible booknames as in the Vulgata +# Still in alpha stage. Contributions are welcome. +# +# Martin Gruner mgruner@crosswire.org + +[Meta] +Name=la +Description=Latin +Encoding=ASCII + +[Text] +Genesis=Genesis +Exodus=Exodus +Leviticus=Leviticus +Numbers=Numeri +Deuteronomy=Deuteronomium +Joshua=Iosue +Judges=Judicum +Ruth=Ruth +I Samuel=I Samuhel +II Samuel=II Samuhel +I Kings=I Regum +II Kings=II Regum +I Chronicles=I Paralipomenon +II Chronicles=II Paralipomenon +Ezra=Ezras +Nehemiah=Neemia +Esther=Hester +Job=Iob +Psalms=Psalmi +Proverbs=Proverbia +Ecclesiastes=Ecclesiastes +Song of Solomon=Canticum +Isaiah=Isaias +Jeremiah=Hieremias +Lamentations=Lamentationes +Ezekiel=Hiezecihel +Daniel=Danihel +Hosea=Osee +Joel=Johel +Amos=Amos +Obadiah=Abdias +Jonah=Ionas +Micah=Micha +Nahum=Naum +Habakkuk=Abacuc +Zephaniah=Sofonias +Haggai=Aggeus +Zechariah=Zaccharias +Malachi=Malachi +Matthew=Secundum Mattheum +Mark=Secundum Marcum +Luke=Secundum Lucam +John=Secundum Iohannem +Acts=Actus Apostolorum +Romans=Ad Romanos +I Corinthians=Ad Corinthios I +II Corinthians=Ad Corinthios II +Galatians=Ad Galatas +Ephesians=Ad Ephesios +Philippians=Ad Philippenses +Colossians=Ad Colossenses +I Thessalonians=Ad Thessalonicenses I +II Thessalonians=Ad Thessalonicenses II +I Timothy=Ad Timotheum I +II Timothy=Ad Timotheum II +Titus=Ad Titum +Philemon=Ad Philemonem +Hebrews=Ad Hebraeos +James=Jacobi +I Peter=Petri I +II Peter=Petri II +I John=Iohannis I +II John=Iohannis II +III John=Iohannis III +Jude=Judae +Revelation of John=Apocalypsis + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENESIS=1 +EXODUS=2 +LEVITICUS=3 +NUMERI=4 +DEUTERONOMIUM=5 +IOSUE=6 +JUDICUM=7 +RUTH=8 +I SAMUHEL=9 +II SAMUHEL=10 +I REGUM=11 +II REGUM=12 +I PARALIPOMENON=13 +II PARALIPOMENON=14 +EZRAS=15 +NEEMIA=16 +HESTER=17 +IOB=18 +PSALMI=19 +PROVERBIA=20 +ECCLESIASTES=21 +CANTICUM=22 +ISAIAS=23 +HIEREMIAS=24 +LAMENTATIONES=25 +HIEZECIHEL=26 +DANIHEL=27 +OSEE=28 +JOHEL=29 +AMOS=30 +ABDIAS=31 +IONAS=32 +MICHA=33 +NAUM=34 +ABACUC=35 +SOFONIAS=36 +AGGEUS=37 +ZACCHARIAS=38 +MALACHI=39 +SECUNDUM MATTHEUM=40 +SECUNDUM MARCUM=41 +SECUNDUM LUCAM=42 +SECUNDUM IOHANNEM=43 +ACTUS APOSTOLORUM=44 +AD ROMANOS=45 +AD CORINTHIOS I=46 +AD CORINTHIOS II=47 +AD GALATAS=48 +AD EPHESIOS=49 +AD PHILIPPENSES=50 +AD COLOSSENSES=51 +AD THESSALONICENSES I=52 +AD THESSALONICENSES II=53 +AD TIMOTHEUM I=54 +AD TIMOTHEUM II=55 +AD TITUM=56 +AD PHILEMONEM=57 +AD HEBRAEOS=58 +JACOBI=59 +PETRI I=60 +PETRI II=61 +IOHANNIS I=62 +IOHANNIS II=63 +IOHANNIS III=64 +JUDAE=65 +APOCALYPSIS=66 diff --git a/locales.d/lt-utf8.conf b/locales.d/lt-utf8.conf new file mode 100644 index 0000000..570cef7 --- /dev/null +++ b/locales.d/lt-utf8.conf @@ -0,0 +1,581 @@ +# Lithunian book locale file in UTF-8 encoding made by Linas Spraunius +# 2004-09-14 + +[Meta] +Name=lt +Description=Lithuanian +Encoding=UTF-8 + +[Text] +Genesis=Pradžios +Exodus=IÅ¡Ä—jimo +Leviticus=Kunigų +Numbers=SkaiÄių +Deuteronomy=Pakartoto įstatymo +Joshua=JozuÄ—s +Judges=TeisÄ—jų +Ruth=Rutos +I Samuel=I Samuelio +II Samuel=II Samuelio +I Kings=I Karalių +II Kings=II Karalių +I Chronicles=I Kronikų +II Chronicles=II Kronikų +Ezra=Ezdro +Nehemiah=Nehemijo +Esther=Esteros +Job=Jobo +Psalms=PsalmÄ—s +Proverbs=PatarlÄ—s +Ecclesiastes=Ekleziasto +Song of Solomon=Giesmių GiesmÄ— +Isaiah=Izaijo +Jeremiah=Jeremijo +Lamentations=Raudų +Ezekiel=Ezekielio +Daniel=Danieliaus +Hosea=OzÄ—jo +Joel=Joelio +Amos=Amoso +Obadiah=Abdijo +Jonah=Jonos +Micah=MichÄ—jo +Nahum=Nahumo +Habakkuk=Habakuko +Zephaniah=Sofonijo +Haggai=AgÄ—jo +Zechariah=Zacharijo +Malachi=Malachijo +Matthew=Mato +Mark=Morkaus +Luke=Luko +John=Jono +Acts=ApaÅ¡talų darbai +Romans=RomieÄiams +I Corinthians=I KorintieÄiams +II Corinthians=II KorintieÄiams +Galatians=Galatams +Ephesians=EfezieÄiams +Philippians=FilipieÄiams +Colossians=KolosieÄiams +I Thessalonians=I TesalonikieÄiams +II Thessalonians=II TesalonikieÄiams +I Timothy=I Timotiejui +II Timothy=II Timotiejui +Titus=Titui +Philemon=Filemonui +Hebrews=Žydams +James=JokÅ«bo +I Peter=I Petro +II Peter=II Petro +I John=I Jono +II John=II Jono +III John=III Jono +Jude=Judo +Revelation of John=ApreiÅ¡kimas Jonui + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +PR=1 +PRAD=1 +PRADŽIOS=1 +IÅ =2 +IÅ Ä–J=2 +IÅ Ä–JIMO=2 +KN=3 +KUN=3 +KUNIGŲ=3 +SK=4 +SKAIÄŒ=4 +SKAIÄŒIŲ=4 +PAK=5 +PAKARTOTO=5 +PAKARTOTO Ä®STATYMO=5 +JOZ=6 +JOZUÄ–S=6 +TS=7 +TEIS=7 +TEISÄ–JŲ=7 +RT=8 +RUT=8 +RUTOS=8 +1SAM=9 +1SAMUELIO=9 +1 SAM=9 +1 SAUELIO=9 +I SAM=9 +I SAMUELIO=9 +2 SAM=10 +2 SAUELIO=10 +II SAM=10 +II SAMUELIO=10 +1KAR=11 +1 KAR=11 +1KARAL=11 +1 KARAL=11 +1KARALIŲ=11 +1 KARALIŲ=11 +I KAR=11 +I KARAL=11 +I KARALIŲ=11 +2KAR=12 +2 KAR=12 +2KARAL=12 +2 KARAL=12 +2KARALIŲ=12 +2 KARALIŲ=12 +II KAR=12 +II KARAL=12 +II KARALIŲ=12 +1KRON=13 +1KRONIKŲ=13 +1 KRON=13 +1KRONIKŲ=13 +I KRON=13 +I KRONIKŲ=13 +2KRON=14 +2KRONIKŲ=14 +2 KRON=14 +2KRONIKŲ=14 +II KRON=14 +II KRONIKŲ=14 +EZ=15 +EZD=15 +EZDRO=15 +NEH=16 +NEHEM=16 +NEHEMIJO=16 +ES=17 +EST=17 +ESTER=17 +ESTEROS=17 +JOB=18 +JOBO=18 +PS=19 +PSALM=19 +PSALMIŲ=19 +PSALMÄ–S=19 +PT=20 +PAT=20 +PATARL=20 +PATARLIŲ=20 +PATARLÄ–S=20 +EK=21 +EKL=21 +EKLEZ=21 +EKLEZIASTO=21 +GG=22 +GIESM=22 +GIESMÄ–=22 +GIESMIŲ GIESMÄ–=22 +IZ=23 +IZAIJO=23 +JER=24 +JEREM=24 +JEREMIJO=24 +RAUD=25 +RAUDŲ=25 +EZE=26 +EZECH=26 +EZECHIELIO=26 +EZEKIELIO=26 +DAN=27 +DANIEL=27 +DANIELIAUS=27 +OZ=28 +OZÄ–JO=28 +JOEL=29 +JOELIO=29 +AM=30 +AMOSO=30 +ABD=31 +ABDIJO=31 +JONOS=32 +MICH=33 +MICHÄ–JO=33 +NAH=34 +NAHUM=34 +NAHUMO=34 +HAB=35 +HABAK=35 +HABAKUK=35 +HABAKUKO=35 +SOF=36 +SOFON=36 +SOFONIJO=36 +AG=37 +AGÄ–JO=37 +ZACH=38 +ZACHAR=38 +ZACHARIJO=38 +MAL=39 +MALACH=39 +MALACHIJO=39 +MT=40 +MAT=40 +MATO=40 +MK=41 +MOR=41 +MORK=41 +MORKAUS=41 +LK=42 +LUK=42 +LUKO=42 +JN=43 +JON=43 +JONO=43 +APD=44 +APAÅ T=44 +APAÅ TALŲ=44 +APAÅ TALŲ DARBAI=44 +RM=45 +ROM=45 +ROMIEÄŒ=45 +ROMIEÄŒIAMS=45 +1KOR=46 +1KORINT=46 +1KORINTIEÄŒIAMS=46 +1 KOR=46 +1 KORINT=46 +1 KORINTIEÄŒIAMS=46 +I KOR=46 +I KORINT=46 +I KORINTIEÄŒIAMS=46 +2KOR=47 +2KORINT=47 +2KORINTIEÄŒIAMS=47 +2 KOR=47 +2 KORINT=47 +2 KORINTIEÄŒIAMS=47 +II KOR=47 +II KORINT=47 +II KORINTIEÄŒIAMS=47 +GL=48 +GAL=48 +GALAT=48 +GALATAMS=48 +EF=49 +EFEZ=49 +EFEZIEÄŒ=49 +EFEZIEÄŒIAMS=49 +FILIP=50 +FILIPIEÄŒ=50 +FILIPIEÄŒIAMS=50 +KOL=51 +KOLOS=51 +KOLOSIEÄŒ=51 +KOLOSIEÄŒIAMS=51 +1TES=52 +1TESAL=52 +1TESALON=52 +1TESALONIK=52 +1TESALONIKIEÄŒ=52 +1TESALONIKIEÄŒIAMS=52 +1 TES=52 +1 TESAL=52 +1 TESALON=52 +1 TESALONIK=52 +1 TESALONIKIEÄŒ=52 +1 TESALONIKIEÄŒIAMS=52 +I TES=52 +I TESAL=52 +I TESALON=52 +I TESALONIK=52 +I TESALONIKIEÄŒ=52 +I TESALONIKIEÄŒIAMS=52 +2TES=53 +2TESAL=53 +2TESALON=53 +2TESALONIK=53 +2TESALONIKIEÄŒ=53 +2TESALONIKIEÄŒIAMS=53 +2 TES=53 +2 TESAL=53 +2 TESALON=53 +2 TESALONIK=53 +2 TESALONIKIEÄŒ=53 +2 TESALONIKIEÄŒIAMS=53 +II TES=53 +II TESAL=53 +II TESALON=53 +II TESALONIK=53 +II TESALONIKIEÄŒ=53 +II TESALONIKIEÄŒIAMS=53 +1TIM=54 +1TIMOT=54 +1TIMOTIEJ=54 +1TIMOTIEJUI=54 +1 TIM=54 +1 TIMOT=54 +1 TIMOTIEJ=54 +1 TIMOTIEJUI=54 +I TIM=54 +I TIMOT=54 +I TIMOTIEJ=54 +I TIMOTIEJUI=54 +2TIM=55 +2TIMOT=55 +2TIMOTIEJ=55 +2TIMOTIEJUI=55 +2 TIM=55 +2 TIMOT=55 +2 TIMOTIEJ=55 +2 TIMOTIEJUI=55 +II TIM=55 +II TIMOT=55 +II TIMOTIEJ=55 +II TIMOTIEJUI=55 +TIT=56 +TITUI=56 +FILEM=57 +FILEMON=57 +FILEMONUI=57 +ŽD=58 +ŽYD=58 +ŽYDAMS=58 +JOK=59 +JOKŪB=59 +JOKŪBO=59 +1PT=60 +1PET=60 +1PETR=60 +1PETRO=60 +1 PT=60 +1 PET=60 +1 PETR=60 +1 PETRO=60 +I PT=60 +I PET=60 +I PETR=60 +I PETRO=60 +2PT=61 +2PET=61 +2PETR=61 +2PETRO=61 +2 PT=61 +2 PET=61 +2 PETR=61 +2 PETRO=61 +II PT=61 +II PET=61 +II PETR=61 +II PETRO=61 +1JN=62 +1JON=62 +1JONO=62 +1 JN=62 +1 JON=62 +1 JONO=62 +I JN=62 +I JON=62 +I JONO=62 +2JN=63 +2JON=63 +2JONO=63 +2 JN=63 +2 JON=63 +2 JONO=63 +II JN=63 +II JON=63 +II JONO=63 +3JN=64 +3JON=64 +3JONO=64 +3 JN=64 +3 JON=64 +3 JONO=64 +III JN=64 +III JON=64 +III JONO=64 +JD=65 +JUD=65 +JUDO=65 +APR=66 +APREIÅ K=66 +APREIÅ KIM=66 +APREIÅ KIMAS=66 +APREIÅ KIMAS JONUI=66 \ No newline at end of file diff --git a/locales.d/nl.conf b/locales.d/nl.conf new file mode 100644 index 0000000..9459bb2 --- /dev/null +++ b/locales.d/nl.conf @@ -0,0 +1,447 @@ +[Meta] +Name=nl +Description=Nederlands +Encoding=ASCII + +[Text] +Genesis=Genesis +Exodus=Exodus +Leviticus=Leviticus +Numbers=Numeri +Deuteronomy=Deuteronomium +Joshua=Jozua +Judges=Richteren +Ruth=Ruth +I Samuel=1Samuel +II Samuel=2Samuel +I Kings=1Koningen +II Kings=2Koningen +I Chronicles=1Kronieken +II Chronicles=2Kronieken +Ezra=Ezra +Nehemiah=Nehemia +Esther=Esther +Job=Job +Psalms=Psalm +Proverbs=Spreuken +Ecclesiastes=Prediker +Song of Solomon=Hooglied +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Klaagliederen +Ezekiel=Ezechiel +Daniel=Daniel +Hosea=Hosea +Joel=Joel +Amos=Amos +Obadiah=Obadja +Jonah=Jona +Micah=Micha +Nahum=Nahum +Habakkuk=Habakkuk +Zephaniah=Zephanja +Haggai=Haggai +Zechariah=Zacharia +Malachi=Maleachi +Matthew=Mattheus +Mark=Markus +Luke=Lukas +John=Johannes +Acts=Handelingen +Romans=Romeinen +I Corinthians=1Corinthe +II Corinthians=2Corinthe +Galatians=Galaten +Ephesians=Efeze +Philippians=Philippensen +Colossians=Kolossensen +I Thessalonians=1Thessalonisensen +II Thessalonians=2Thessalonisensen +I Timothy=1Thimotheus +II Timothy=2Thimotheus +Titus=Titus +Philemon=Philemon +Hebrews=Hebreeen +James=Jacobus +I Peter=1Petrus +II Peter=2Petrus +I John=1Johannes +II John=2Johannes +III John=3Johannes +Jude=Judas +Revelation of John=Openbaring + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENESIS=1 +GE=1 +EXODUS=2 +EX=2 +LEVITICUS=3 +LE=3 +LEV=3 +NUMERI=4 +NUM=4 +NU=4 +DEUTERONOMIUM=5 +DE=5 +DEUT=5 +JOZUA=6 +JOZ=6 +RICHTEREN=7 +RI=7 +RICH=7 +RUTH=8 +1SAMUEL=9 +1SA=9 +1SAM=9 +1 SA=9 +1 SAM=9 +2SAMUEL=10 +2SA=10 +2SAM=10 +2 SA=10 +2 SAM=10 +1KONINGEN=11 +1KO=11 +1 KO=11 +1KON=11 +1 KON=11 +2KONINGEN=12 +2KO=12 +2 KO=12 +2KON=12 +2 KON=12 +1KRONIEKEN=13 +1KR=13 +1 KR=13 +2KRONIEKEN=14 +2KR=14 +2 KR=14 +EZRA=15 +EZR=15 +NEHEMIA=16 +NEH=16 +ESTHER=17 +ESTER=17 +ES=17 +JOB=18 +PSALM=19 +PS=19 +SPREUKEN=20 +SPR=20 +SP=20 +PREDIKER=21 +PR=21 +HOOGLIED=22 +HOOGL=22 +JESAJA=23 +JES=23 +JEREMIA=24 +JER=24 +KLAAGLIEDEREN=25 +KLAAGL=25 +KL=25 +EZECHIEL=26 +EZ=26 +DANIEL=27 +DAN=27 +HOSEA=28 +HOS=28 +JOEL=29 +AMOS=30 +AM=30 +OBADJA=31 +OB=31 +JONA=32 +JON=32 +MICHA=33 +NAHUM=34 +NAH=34 +HABAKKUK=35 +HAB=35 +ZEPHANJA=36 +ZEPH=36 +HAGGAI=37 +HAG=37 +ZACHARIA=38 +ZACH=38 +MALEACHI=39 +MAL=39 +MATTHEUS=40 +MT=40 +MATH=40 +MARKUS=41 +MR=41 +MARK=41 +LUKAS=42 +LUK=42 +JOHANNES=43 +JOH=43 +HANDELINGEN=44 +HAND=44 +AC=44 +ROMEINEN=45 +ROM=45 +RO=45 +1KORINTHE=46 +1CORINTHE=46 +1KOR=46 +2KORINTHE=47 +2CORINTHE=47 +2KORINTIERS=47 +2KOR=47 +GALATEN=48 +GAL=48 +GA=48 +EFEZE=49 +EF=49 +EPH=49 +PHILIPPENSEN=50 +PHLM=57 +PHP=50 +PHIL=50 +PH=50 +KOLOSSENSEN=51 +KOL=51 +1THESSALONISENSEN=52 +1TH=52 +1THES=52 +1 TH=52 +1 THES=52 +2THESSALONISENSEN=53 +2TH=53 +2THES=53 +2 TH=53 +2 THES=53 +1THIMOTHEUS=54 +1TIM=54 +1TI=54 +2THIMOTHEUS=55 +2TIM=55 +2TI=55 +TITUS=56 +TIT=56 +TI=56 +PHILEMON=57 +PHIL=57 +PH=57 +HEBREEEN=58 +HEB=58 +HEBR=58 +JACOBUS=59 +JAC=59 +1PETRUS=60 +1PE=60 +1PETR=60 +1 PE=60 +1 PETR=60 +2PETRUS=61 +2PE=61 +2PETR=61 +2 PE=61 +2 PETR=61 +1JOHANNES=62 +1JO=62 +1 JO=62 +1JOH=62 +1 JOH=62 +2JOHANNES=63 +2JO=63 +2 JO=63 +2JOH=63 +2 JOH=63 +3JOHANNES=64 +3JO=64 +3 JO=64 +3JOH=64 +3 JOH=64 +JUDAS=65 +OPENBARING=66 +OP=66 +OPB=66 +OPENB=66 diff --git a/locales.d/no-utf8.conf b/locales.d/no-utf8.conf new file mode 100644 index 0000000..a8094e3 --- /dev/null +++ b/locales.d/no-utf8.conf @@ -0,0 +1,479 @@ +[Meta] +Name=no +Description=Norwegian (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=1. Mosebok +Exodus=2. Mosebok +Leviticus=3. Mosebok +Numbers=4. Mosebok +Deuteronomy=5. Mosebok +Joshua=Josva +Judges=Dommerne +Ruth=Rut +I Samuel=1. Samuelsbok +II Samuel=2. Samuelsbok +I Kings=1. Kongebok +II Kings=2. Kongebok +I Chronicles=1. Krønikebok +II Chronicles=2. Krønikebok +Ezra=Esra +Nehemiah=Nehemja +Esther=Ester +Job=Job +Psalms=Salmene +Proverbs=OrdsprÃ¥kene +Ecclesiastes=Forkynneren +Song of Solomon=Høysangen +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Klagesangene +Ezekiel=Esekiel +Daniel=Daniel +Hosea=Hosea +Joel=Joel +Amos=Amos +Obadiah=Obadja +Jonah=Jona +Micah=Mika +Nahum=Nahum +Habakkuk=Habakkuk +Zephaniah=Sefanja +Haggai=Haggai +Zechariah=Sakarja +Malachi=Malaki +Matthew=Matteus +Mark=Markus +Luke=Lukas +John=Johannes +Acts=Apostlenes gjerninger +Romans=Romerne +I Corinthians=1. Korinter +II Corinthians=2. Korinter +Galatians=Galaterne +Ephesians=Efeserne +Philippians=Filipperne +Colossians=Kolosserne +I Thessalonians=1. Tessaloniker +II Thessalonians=2. Tessaloniker +I Timothy=1. Timoteus +II Timothy=2. Timoteus +Titus=Titus +Philemon=Filemon +Hebrews=Hebreerne +James=Jakob +I Peter=1. Peter +II Peter=2. Peter +I John=1. Johannes +II John=2. Johannes +III John=3. Johannes +Jude=Judas +Revelation of John=Johannes' Ã¥penbaring + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOSEBOK=1 +1 MOSEBOK=1 +1MOSEBOK=1 + +2. MOSEBOK=2 +2 MOSEBOK=2 +2MOSEBOK=2 + +3. MOSEBOK=3 +3 MOSEBOK=3 +3MOSEBOK=3 + +4. MOSEBOK=4 +4 MOSEBOK=4 +4MOSEBOK=4 + +5. MOSEBOK=5 +5 MOSEBOK=5 +5MOSEBOK=5 + +JOSVA=6 +DOMMERNE=7 +RUT=8 + +1. SAMUELSBOK=9 +1 SAMUELSBOK=9 +1SAMUELSBOK=9 + +2. SAMUELSBOK=10 +2 SAMUELSBOK=10 +2SAMUELSBOK=10 + +1. KONGEBOK=11 +1 KONGEBOK=11 +1KONGEBOK=11 + +2. KONGEBOK=12 +2 KONGEBOK=12 +2KONGEBOK=12 + +1. KRØNIKEBOK=13 +1 KRØNIKEBOK=13 +1KRØNIKEBOK=13 + +2. KRØNIKEBOK=14 +2 KRØNIKEBOK=14 +2KRØNIKEBOK=14 + +ESRA=15 +NEHEMJA=16 +ESTER=17 +JOB=18 +SALMENE=19 +ORDSPRÃ…KENE=20 +FORKYNNEREN=21 +HØYSANGEN=22 +JESAJA=23 +JEREMIA=24 +KLAGESANGENE=25 +ESEKIEL=26 +DANIEL=27 +HOSEA=28 +JOEL=29 +AMOS=30 +OBADJA=31 +JONA=32 +MIKA=33 +NAHUM=34 +HABAKKUK=35 +SEFANJA=36 +HAGGAI=37 +SAKARJA=38 +MALAKI=39 +MATTEUS=40 +MARKUS=41 +LUKAS=42 +JOHANNES=43 +APOSTLENES GJERNINGER=44 +ROMERNE=45 + +1. KORINTER=46 +1 KORINTER=46 +1KORINTER=46 + +2. KORINTER=47 +2 KORINTER=47 +2KORINTER=47 + +GALATERNE=48 +EFESERNE=49 +FILIPPERNE=50 +KOLOSSERNE=51 + +1. TESSALONIKER=52 +1 TESSALONIKER=52 +1TESSALONIKER=52 + +2. TESSALONIKER=53 +2 TESSALONIKER=53 +2TESSALONIKER=53 + +1. TIMOTEUS=54 +1 TIMOTEUS=54 +1TIMOTEUS=54 + +2. TIMOTEUS=55 +2 TIMOTEUS=55 +2TIMOTEUS=55 + +TITUS=56 +FILEMON=57 +HEBREERNE=58 +JAKOB=59 + +1. PETER=60 +1 PETER=60 +1PETER=60 + +2. PETER=61 +2 PETER=61 +2PETER=61 + +1. JOHANNES=62 +1 JOHANNES=62 +1JOHANNES=62 + +2. JOHANNES=63 +2 JOHANNES=63 +2JOHANNES=63 + +3. JOHANNES=64 +3 JOHANNES=64 +3JOHANNES=64 + +JUDAS=65 +JOHANNES' Ã…PENBARING=66 + +1. MOS=1 +1MOS=1 +2. MOS=2 +2MOS=2 +3. MOS=3 +3MOS=3 +4. MOS=4 +4MOS=4 +5. MOS=5 +5MOS=5 +JOS=6 +DOM=7 +1. SAM=9 +1SAM=9 +2. SAM=10 +2SAM=10 +1. KONG=11 +1KONG=11 +2. KONG=12 +2KONG=12 +1. KRØN=13 +1KRØN=13 +2. KRØN=14 +2KRØN=14 +NEH=16 +EST=17 +SAL=19 +ORDSP=20 +FORK=21 +HØYS=22 +JES=23 +JER=24 +KLAG=25 +ESEK=26 +DAN=27 +HOS=28 +AM=30 +OB=31 +MI=33 +NAH=34 +HAB=35 +SEF=36 +HAG=37 +SAK=38 +MAL=39 +MATT=40 +MARK=41 +LUK=42 +JOH=43 +APG=44 +ROM=45 +1. KOR=46 +1KOR=46 +2. KOR=47 +2KOR=47 +GAL=48 +EF=49 +FIL=50 +KOL=51 +1. TESS=52 +1TESS=52 +2. TESS=53 +2TESS=53 +1. TIM=54 +1TIM=54 +2. TIM=55 +2TIM=55 +TIT=56 +FILEM=57 +HEBR=58 +JAK=59 +1. PET=60 +1PET=60 +2. PET=61 +2PET=61 +1. JOH=62 +1JOH=62 +2. JOH=63 +2JOH=63 +3. JOH=64 +3JOH=64 +JUD=65 +Ã…P=66 diff --git a/locales.d/no.conf b/locales.d/no.conf new file mode 100644 index 0000000..8854273 --- /dev/null +++ b/locales.d/no.conf @@ -0,0 +1,479 @@ +[Meta] +Name=no +Description=Norwegian +Encoding=ISO8859-1 + +[Text] +Genesis=1. Mosebok +Exodus=2. Mosebok +Leviticus=3. Mosebok +Numbers=4. Mosebok +Deuteronomy=5. Mosebok +Joshua=Josva +Judges=Dommerne +Ruth=Rut +I Samuel=1. Samuelsbok +II Samuel=2. Samuelsbok +I Kings=1. Kongebok +II Kings=2. Kongebok +I Chronicles=1. Krønikebok +II Chronicles=2. Krønikebok +Ezra=Esra +Nehemiah=Nehemja +Esther=Ester +Job=Job +Psalms=Salmene +Proverbs=Ordspråkene +Ecclesiastes=Forkynneren +Song of Solomon=Høysangen +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Klagesangene +Ezekiel=Esekiel +Daniel=Daniel +Hosea=Hosea +Joel=Joel +Amos=Amos +Obadiah=Obadja +Jonah=Jona +Micah=Mika +Nahum=Nahum +Habakkuk=Habakkuk +Zephaniah=Sefanja +Haggai=Haggai +Zechariah=Sakarja +Malachi=Malaki +Matthew=Matteus +Mark=Markus +Luke=Lukas +John=Johannes +Acts=Apostlenes gjerninger +Romans=Romerne +I Corinthians=1. Korinter +II Corinthians=2. Korinter +Galatians=Galaterne +Ephesians=Efeserne +Philippians=Filipperne +Colossians=Kolosserne +I Thessalonians=1. Tessaloniker +II Thessalonians=2. Tessaloniker +I Timothy=1. Timoteus +II Timothy=2. Timoteus +Titus=Titus +Philemon=Filemon +Hebrews=Hebreerne +James=Jakob +I Peter=1. Peter +II Peter=2. Peter +I John=1. Johannes +II John=2. Johannes +III John=3. Johannes +Jude=Judas +Revelation of John=Johannes' åpenbaring + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOSEBOK=1 +1 MOSEBOK=1 +1MOSEBOK=1 + +2. MOSEBOK=2 +2 MOSEBOK=2 +2MOSEBOK=2 + +3. MOSEBOK=3 +3 MOSEBOK=3 +3MOSEBOK=3 + +4. MOSEBOK=4 +4 MOSEBOK=4 +4MOSEBOK=4 + +5. MOSEBOK=5 +5 MOSEBOK=5 +5MOSEBOK=5 + +JOSVA=6 +DOMMERNE=7 +RUT=8 + +1. SAMUELSBOK=9 +1 SAMUELSBOK=9 +1SAMUELSBOK=9 + +2. SAMUELSBOK=10 +2 SAMUELSBOK=10 +2SAMUELSBOK=10 + +1. KONGEBOK=11 +1 KONGEBOK=11 +1KONGEBOK=11 + +2. KONGEBOK=12 +2 KONGEBOK=12 +2KONGEBOK=12 + +1. KRØNIKEBOK=13 +1 KRØNIKEBOK=13 +1KRØNIKEBOK=13 + +2. KRØNIKEBOK=14 +2 KRØNIKEBOK=14 +2KRØNIKEBOK=14 + +ESRA=15 +NEHEMJA=16 +ESTER=17 +JOB=18 +SALMENE=19 +ORDSPRÅKENE=20 +FORKYNNEREN=21 +HØYSANGEN=22 +JESAJA=23 +JEREMIA=24 +KLAGESANGENE=25 +ESEKIEL=26 +DANIEL=27 +HOSEA=28 +JOEL=29 +AMOS=30 +OBADJA=31 +JONA=32 +MIKA=33 +NAHUM=34 +HABAKKUK=35 +SEFANJA=36 +HAGGAI=37 +SAKARJA=38 +MALAKI=39 +MATTEUS=40 +MARKUS=41 +LUKAS=42 +JOHANNES=43 +APOSTLENES GJERNINGER=44 +ROMERNE=45 + +1. KORINTER=46 +1 KORINTER=46 +1KORINTER=46 + +2. KORINTER=47 +2 KORINTER=47 +2KORINTER=47 + +GALATERNE=48 +EFESERNE=49 +FILIPPERNE=50 +KOLOSSERNE=51 + +1. TESSALONIKER=52 +1 TESSALONIKER=52 +1TESSALONIKER=52 + +2. TESSALONIKER=53 +2 TESSALONIKER=53 +2TESSALONIKER=53 + +1. TIMOTEUS=54 +1 TIMOTEUS=54 +1TIMOTEUS=54 + +2. TIMOTEUS=55 +2 TIMOTEUS=55 +2TIMOTEUS=55 + +TITUS=56 +FILEMON=57 +HEBREERNE=58 +JAKOB=59 + +1. PETER=60 +1 PETER=60 +1PETER=60 + +2. PETER=61 +2 PETER=61 +2PETER=61 + +1. JOHANNES=62 +1 JOHANNES=62 +1JOHANNES=62 + +2. JOHANNES=63 +2 JOHANNES=63 +2JOHANNES=63 + +3. JOHANNES=64 +3 JOHANNES=64 +3JOHANNES=64 + +JUDAS=65 +JOHANNES' ÅPENBARING=66 + +1. MOS=1 +1MOS=1 +2. MOS=2 +2MOS=2 +3. MOS=3 +3MOS=3 +4. MOS=4 +4MOS=4 +5. MOS=5 +5MOS=5 +JOS=6 +DOM=7 +1. SAM=9 +1SAM=9 +2. SAM=10 +2SAM=10 +1. KONG=11 +1KONG=11 +2. KONG=12 +2KONG=12 +1. KRØN=13 +1KRØN=13 +2. KRØN=14 +2KRØN=14 +NEH=16 +EST=17 +SAL=19 +ORDSP=20 +FORK=21 +HØYS=22 +JES=23 +JER=24 +KLAG=25 +ESEK=26 +DAN=27 +HOS=28 +AM=30 +OB=31 +MI=33 +NAH=34 +HAB=35 +SEF=36 +HAG=37 +SAK=38 +MAL=39 +MATT=40 +MARK=41 +LUK=42 +JOH=43 +APG=44 +ROM=45 +1. KOR=46 +1KOR=46 +2. KOR=47 +2KOR=47 +GAL=48 +EF=49 +FIL=50 +KOL=51 +1. TESS=52 +1TESS=52 +2. TESS=53 +2TESS=53 +1. TIM=54 +1TIM=54 +2. TIM=55 +2TIM=55 +TIT=56 +FILEM=57 +HEBR=58 +JAK=59 +1. PET=60 +1PET=60 +2. PET=61 +2PET=61 +1. JOH=62 +1JOH=62 +2. JOH=63 +2JOH=63 +3. JOH=64 +3JOH=64 +JUD=65 +ÅP=66 diff --git a/locales.d/pl-utf8.conf b/locales.d/pl-utf8.conf new file mode 100644 index 0000000..7532279 --- /dev/null +++ b/locales.d/pl-utf8.conf @@ -0,0 +1,337 @@ +[Meta] +Name=pl +Description=Polish (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Rodzaju +Exodus=WyjÅ›cia +Leviticus=KapÅ‚aÅ„ska +Numbers=Liczb +Deuteronomy=Powtórzonego Prawa +Joshua=Jozuego +Judges=SÄ™dziów +Ruth=Rut +I Samuel=1 Samuela +II Samuel=2 Samuela +I Kings=1 Królewska +II Kings=2 Królewska +I Chronicles=1 Kronik +II Chronicles=2 Kronik +Ezra=Ezdrasza +Nehemiah=Nehemiasza +Esther=Estery +Job=Hioba +Psalms=Psalmów +Proverbs=Przysłów +Ecclesiastes=Koheleta +Song of Solomon=PieÅ›ni nad pieÅ›niami +Isaiah=Izajasza +Jeremiah=Jeremiasza +Lamentations=Lamentacje +Ezekiel=Ezechiela +Daniel=Daniela +Hosea=Ozeasza +Joel=Joela +Amos=Amosa +Obadiah=Abdiasza +Jonah=Jonasza +Micah=Micheasza +Nahum=Nahuma +Habakkuk=Habakuka +Zephaniah=Sofoniasza +Haggai=Aggeusza +Zechariah=Zachariasza +Malachi=Malachiasza +Matthew=Mateusza +Mark=Marka +Luke=Åukasza +John=Jana +Acts=Dzieje +Romans=Rzymian +I Corinthians=1 Koryntian +II Corinthians=2 Koryntian +Galatians=Galatów +Ephesians=Efezjan +Philippians=Filipian +Colossians=Kolosan +I Thessalonians=1 Tesaloniczan +II Thessalonians=2 Tesaloniczan +I Timothy=1 Tymoteusza +II Timothy=2 Tymoteusza +Titus=Tytusa +Philemon=Filemona +Hebrews=Hebrajczyków +James=Jakuba +I Peter=1 Piotra +II Peter=2 Piotra +I John=1 Jana +II John=2 Jana +III John=3 Jana +Jude=Judy +Revelation of John=Apokalipsa + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +RODZAJU=1 +WYJÅšCIAJ=2 +KAPÅAŃSKA=3 +LICZB=4 +POWTÓRZONEGO PRAWA=5 +JOZUEGO=6 +SĘDZIÓW=7 +RUT=8 +1 SAMUELA=9 +2 SAMUELA=10 +1 KRÓLEWSKA=11 +2 KRÓLEWSKA=12 +1 KRONIK=13 +2 KRONIK=14 +EZDRASZA=15 +NEHEMIASZA=16 +ESTERY=17 +HIOBA=18 +PSALMÓW=19 +PRZYSÅÓW=20 +KOHELETA=21 +EKLEZJASTESA=21 +PIEÅšNI NAD PIEÅšNIAMI=22 +IZAJASZA=23 +JEREMIASZA=24 +LAMENTACJE=25 +EZECHIELA=26 +DANIELA=27 +OZEASZA=28 +JOELA=29 +AMOSA=30 +ABDIASZA=31 +JONASZA=32 +MICHEASZA=33 +NAHUMA=34 +HABAKUKA=35 +SOFONIASZA=36 +AGGEUSZA=37 +ZACHARIASZA=38 +MALACHIASZA=39 +MATEUSZA=40 +MARKA=41 +ÅUKASZA=42 +JANA=43 +DZIEJE=44 +RZYMIAN=45 +1 KORYNTIAN=46 +1KORYNTIAN=46 +2 KORYNTIAN=47 +2KORYNTIAN=47 +GALATÓW=48 +EFEZJAN=49 +FILIPIAN=50 +KOLOSAN=51 +1 TESALONICZAN=52 +1TESALONICZAN=52 +2 TESALONICZAN=53 +2TESALONICZAN=53 +1 TYMOTEUSZA=54 +1TYMOTEUSZA=54 +2 TYMOTEUSZA=55 +2TYMOTEUSZA=55 +TYTUSA=56 +FILEMONA=57 +HEBRAJCZYKÓW=58 +JAKUBA=59 +1 PIOTRA=60 +1PIOTRA=60 +2 PIOTRA=61 +2PIOTRA=61 +1 JANA=62 +1JANA=62 +2 JANA=63 +2JANA=63 +3 JANA=64 +3JANA=64 +JUDY=65 +APOKALIPSA=66 diff --git a/locales.d/pl.conf b/locales.d/pl.conf new file mode 100644 index 0000000..acfcbfd --- /dev/null +++ b/locales.d/pl.conf @@ -0,0 +1,337 @@ +[Meta] +Name=pl +Description=Polish +Encoding=ISO8859-2 + +[Text] +Genesis=Rodzaju +Exodus=Wyj¶cia +Leviticus=Kap³añska +Numbers=Liczb +Deuteronomy=Powtórzonego Prawa +Joshua=Jozuego +Judges=Sêdziów +Ruth=Rut +I Samuel=1 Samuela +II Samuel=2 Samuela +I Kings=1 Królewska +II Kings=2 Królewska +I Chronicles=1 Kronik +II Chronicles=2 Kronik +Ezra=Ezdrasza +Nehemiah=Nehemiasza +Esther=Estery +Job=Hioba +Psalms=Psalmów +Proverbs=Przys³ów +Ecclesiastes=Koheleta +Song of Solomon=Pie¶ni nad pie¶niami +Isaiah=Izajasza +Jeremiah=Jeremiasza +Lamentations=Lamentacje +Ezekiel=Ezechiela +Daniel=Daniela +Hosea=Ozeasza +Joel=Joela +Amos=Amosa +Obadiah=Abdiasza +Jonah=Jonasza +Micah=Micheasza +Nahum=Nahuma +Habakkuk=Habakuka +Zephaniah=Sofoniasza +Haggai=Aggeusza +Zechariah=Zachariasza +Malachi=Malachiasza +Matthew=Mateusza +Mark=Marka +Luke=£ukasza +John=Jana +Acts=Dzieje +Romans=Rzymian +I Corinthians=1 Koryntian +II Corinthians=2 Koryntian +Galatians=Galatów +Ephesians=Efezjan +Philippians=Filipian +Colossians=Kolosan +I Thessalonians=1 Tesaloniczan +II Thessalonians=2 Tesaloniczan +I Timothy=1 Tymoteusza +II Timothy=2 Tymoteusza +Titus=Tytusa +Philemon=Filemona +Hebrews=Hebrajczyków +James=Jakuba +I Peter=1 Piotra +II Peter=2 Piotra +I John=1 Jana +II John=2 Jana +III John=3 Jana +Jude=Judy +Revelation of John=Apokalipsa + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +RODZAJU=1 +WYJ¶CIAJ=2 +KAP³AÑSKA=3 +LICZB=4 +POWTÓRZONEGO PRAWA=5 +JOZUEGO=6 +SDZÊDZIÓW=7 +RUT=8 +1 SAMUELA=9 +2 SAMUELA=10 +1 KRÓLEWSKA=11 +2 KRÓLEWSKA=12 +1 KRONIK=13 +2 KRONIK=14 +EZDRASZA=15 +NEHEMIASZA=16 +ESTERY=17 +HIOBA=18 +PSALMÓW=19 +PRZYS³ÓW=20 +KOHELETA=21 +EKLEZJASTESA=21 +PIE¶NI NAD PIE¶NIAMI=22 +IZAJASZA=23 +JEREMIASZA=24 +LAMENTACJE=25 +EZECHIEL=26 +DANIEL=27 +OZEASZ=28 +JOEL=29 +AMOS=30 +ABDIASZA=31 +JONASZA=32 +MICHEASZA=33 +NAHUMA=34 +HABAKUKA=35 +SOFONIASZA=36 +AGGEUSZA=37 +ZACHARIASZA=38 +MALACHIASZA=39 +MATEUSZA=40 +MARKA=41 +£UKASZA=42 +JANA=43 +DZIEJE=44 +RZYMIAN=45 +1 KORYNTIAN=46 +1KORYNTIAN=46 +2 KORYNTIAN=47 +2KORYNTIAN=47 +GALATÓW=48 +EFEZJAN=49 +FILIPIAN=50 +KOLOSAN=51 +1 TESALONICZAN=52 +1TESALONICZAN=52 +2 TESALONICZAN=53 +2TESALONICZAN=53 +1 TYMOTEUSZA=54 +1TYMOTEUSZA=54 +2 TYMOTEUSZA=55 +2TYMOTEUSZA=55 +TYTUSA=56 +FILEMONA=57 +HEBRAJCZYKÓW=58 +JAKUBA=59 +1 PIOTRA=60 +1PIOTRA=60 +2 PIOTRA=61 +2PIOTRA=61 +1 JANA=62 +1JANA=62 +2 JANA=63 +2JANA=63 +3 JANA=64 +3JANA=64 +JUDY=65 +APOKALIPSA=66 diff --git a/locales.d/pt-utf8.conf b/locales.d/pt-utf8.conf new file mode 100644 index 0000000..441de46 --- /dev/null +++ b/locales.d/pt-utf8.conf @@ -0,0 +1,392 @@ +[Meta] +Name=pt +Description=Portuguese (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Génesis +Exodus=Êxodo +Leviticus=Levítico +Numbers=Números +Deuteronomy=Deuteronómio +Joshua=Josué +Judges=Juízes +Ruth=Rute +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Reis +II Kings=2 Reis +I Chronicles=1 Crónicas +II Chronicles=2 Crónicas +Ezra=Esdras +Nehemiah=Neemias +Esther=Ester +Job=Jó +Psalms=Salmos +Proverbs=Provérbios +Ecclesiastes=Eclesiastes +Song of Solomon=Cantares de Salomão +Isaiah=Isaías +Jeremiah=Jeremias +Lamentations=Lamentações +Ezekiel=Ezequiel +Daniel=Daniel +Hosea=Oséias +Joel=Joel +Amos=Amós +Obadiah=Obadias +Jonah=Jonas +Micah=Miquéias +Nahum=Naum +Habakkuk=Habacuque +Zephaniah=Sofonias +Haggai=Ageu +Zechariah=Zacarias +Malachi=Malaquias +Matthew=Mateus +Mark=Marcos +Luke=Lucas +John=João +Acts=Actos +Romans=Romanos +I Corinthians=1 Coríntios +II Corinthians=2 Coríntios +Galatians=Gálatas +Ephesians=Efésios +Philippians=Filipenses +Colossians=Colossenses +I Thessalonians=1 Tessalonicenses +II Thessalonians=2 Tessalonicenses +I Timothy=1 Timóteo +II Timothy=2 Timóteo +Titus=Tito +Philemon=Filemon +Hebrews=Hebreus +James=Tiago +I Peter=1 Pedro +II Peter=2 Pedro +I John=1 João +II John=2 João +III John=3 João +Jude=Judas +Revelation of John=Apocalipse + +[Book Abbrevs] + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + + +GÉNESIS=1 +GEN=1 +ÊXODO=2 +EX=2 +LEVÃTICO=3 +LV=3 +NÚMEROS=4 +NM=4 +DEUTERONÓMIO=5 +DT=5 +JOSUÉ=6 +JS=6 +JUÃZES=7 +JZ=7 +RUTE=8 +RT=8 +1 SAMUEL=9 +1SM=9 +2 SAMUEL=10 +2SM=10 +1 REIS=11 +1RE=11 +2 REIS=12 +2RE=12 +1 CRÓNICAS=13 +1CR=13 +2 CRÓNICAS=14 +2CR=14 +ESDRAS=15 +ED=15 +NEEMIAS=16 +NE=16 +ESTER=17 +ET=17 +JÓ=18 +SALMOS=19 +SL=19 +PROVÉRBIOS=20 +PV=20 +ECLESIASTES=21 +EC=21 +CANTARES DE SALOMÃO=22 +CT=22 +ISAÃAS=23 +IS=23 +JEREMIAS=24 +JR=24 +LAMENTAÇÕES=25 +LM=25 +EZEQUIEL=26 +EZ=26 +DANIEL=27 +DN=27 +OSÉIAS=28 +OS=28 +JOEL=29 +JL=29 +AMÓS=30 +AM=30 +OBADIAS=31 +OB=31 +JONAS=32 +JN=32 +MIQUÉIAS=33 +MQ=33 +NAUM=34 +NA=34 +HABACUQUE=35 +HC=35 +SOFONIAS=36 +SF=36 +AGEU=37 +AG=37 +ZACARIAS=38 +ZC=38 +MALAQUIAS=39 +ML=39 +MATEUS=40 +MT=40 +MARCOS=41 +MC=41 +LUCAS=42 +LC=42 +JOÃO=43 +JO=43 +ACTOS=44 +AT=44 +ROMANOS=45 +RM=45 +1 CORÃNTIOS=46 +1CO=46 +2 CORÃNTIOS=47 +2CO=47 +GÃLATAS=48 +GL=48 +EFÉSIOS=49 +EF=49 +FILIPENSES=50 +FL=50 +COLOSSENSES=51 +CL=51 +1 TESSALONICENSES=52 +1TE=52 +2 TESSALONICENSES=53 +2TE=53 +1 TIMÓTEO=54 +1TM=54 +2 TIMÓTEO=55 +2TM=55 +TITO=56 +TT=56 +FILEMON=57 +FM=57 +HEBREUS=58 +HB=58 +TIAGO=59 +TG=59 +1 PEDRO=60 +1PE=60 +2 PEDRO=61 +2PE=61 +1 JOÃO=62 +1JO=62 +2 JOÃO=63 +2JO=63 +3 JOÃO=64 +3JO=64 +JUDAS=65 +JD=65 +APOCALIPSE=66 +AP=66 diff --git a/locales.d/pt.conf b/locales.d/pt.conf new file mode 100644 index 0000000..27a803d --- /dev/null +++ b/locales.d/pt.conf @@ -0,0 +1,392 @@ +[Meta] +Name=pt +Description=Portuguese +Encoding=ISO8859-1 + +[Text] +Genesis=Génesis +Exodus=Êxodo +Leviticus=Levítico +Numbers=Números +Deuteronomy=Deuteronómio +Joshua=Josué +Judges=Juízes +Ruth=Rute +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Reis +II Kings=2 Reis +I Chronicles=1 Crónicas +II Chronicles=2 Crónicas +Ezra=Esdras +Nehemiah=Neemias +Esther=Ester +Job=Jó +Psalms=Salmos +Proverbs=Provérbios +Ecclesiastes=Eclesiastes +Song of Solomon=Cantares de Salomão +Isaiah=Isaías +Jeremiah=Jeremias +Lamentations=Lamentações +Ezekiel=Ezequiel +Daniel=Daniel +Hosea=Oséias +Joel=Joel +Amos=Amós +Obadiah=Obadias +Jonah=Jonas +Micah=Miquéias +Nahum=Naum +Habakkuk=Habacuque +Zephaniah=Sofonias +Haggai=Ageu +Zechariah=Zacarias +Malachi=Malaquias +Matthew=Mateus +Mark=Marcos +Luke=Lucas +John=João +Acts=Actos +Romans=Romanos +I Corinthians=1 Coríntios +II Corinthians=2 Coríntios +Galatians=Gálatas +Ephesians=Efésios +Philippians=Filipenses +Colossians=Colossenses +I Thessalonians=1 Tessalonicenses +II Thessalonians=2 Tessalonicenses +I Timothy=1 Timóteo +II Timothy=2 Timóteo +Titus=Tito +Philemon=Filemon +Hebrews=Hebreus +James=Tiago +I Peter=1 Pedro +II Peter=2 Pedro +I John=1 João +II John=2 João +III John=3 João +Jude=Judas +Revelation of John=Apocalipse + +[Book Abbrevs] + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + + +GÉNESIS=1 +GEN=1 +ÊXODO=2 +EX=2 +LEVÍTICO=3 +LV=3 +NÚMEROS=4 +NM=4 +DEUTERONÓMIO=5 +DT=5 +JOSUÉ=6 +JS=6 +JUÍZES=7 +JZ=7 +RUTE=8 +RT=8 +1 SAMUEL=9 +1SM=9 +2 SAMUEL=10 +2SM=10 +1 REIS=11 +1RE=11 +2 REIS=12 +2RE=12 +1 CRÓNICAS=13 +1CR=13 +2 CRÓNICAS=14 +2CR=14 +ESDRAS=15 +ED=15 +NEEMIAS=16 +NE=16 +ESTER=17 +ET=17 +JÓ=18 +SALMOS=19 +SL=19 +PROVÉRBIOS=20 +PV=20 +ECLESIASTES=21 +EC=21 +CANTARES DE SALOMÃO=22 +CT=22 +ISAÍAS=23 +IS=23 +JEREMIAS=24 +JR=24 +LAMENTAÇÕES=25 +LM=25 +EZEQUIEL=26 +EZ=26 +DANIEL=27 +DN=27 +OSÉIAS=28 +OS=28 +JOEL=29 +JL=29 +AMÓS=30 +AM=30 +OBADIAS=31 +OB=31 +JONAS=32 +JN=32 +MIQUÉIAS=33 +MQ=33 +NAUM=34 +NA=34 +HABACUQUE=35 +HC=35 +SOFONIAS=36 +SF=36 +AGEU=37 +AG=37 +ZACARIAS=38 +ZC=38 +MALAQUIAS=39 +ML=39 +MATEUS=40 +MT=40 +MARCOS=41 +MC=41 +LUCAS=42 +LC=42 +JOÃO=43 +JO=43 +ACTOS=44 +AT=44 +ROMANOS=45 +RM=45 +1 CORÍNTIOS=46 +1CO=46 +2 CORÍNTIOS=47 +2CO=47 +GÁLATAS=48 +GL=48 +EFÉSIOS=49 +EF=49 +FILIPENSES=50 +FL=50 +COLOSSENSES=51 +CL=51 +1 TESSALONICENSES=52 +1TE=52 +2 TESSALONICENSES=53 +2TE=53 +1 TIMÓTEO=54 +1TM=54 +2 TIMÓTEO=55 +2TM=55 +TITO=56 +TT=56 +FILEMON=57 +FM=57 +HEBREUS=58 +HB=58 +TIAGO=59 +TG=59 +1 PEDRO=60 +1PE=60 +2 PEDRO=61 +2PE=61 +1 JOÃO=62 +1JO=62 +2 JOÃO=63 +2JO=63 +3 JOÃO=64 +3JO=64 +JUDAS=65 +JD=65 +APOCALIPSE=66 +AP=66 diff --git a/locales.d/pt_BR-utf8.conf b/locales.d/pt_BR-utf8.conf new file mode 100644 index 0000000..0bff867 --- /dev/null +++ b/locales.d/pt_BR-utf8.conf @@ -0,0 +1,392 @@ +[Meta] +Name=pt_BR +Description=Brazillian Portuguese +Encoding=ISO8859-1 + +[Text] +Genesis=Gênesis +Exodus=Êxodo +Leviticus=Levítico +Numbers=Números +Deuteronomy=Deuteronômio +Joshua=Josué +Judges=Juízes +Ruth=Rute +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Reis +II Kings=2 Reis +I Chronicles=1 Crônicas +II Chronicles=2 Crônicas +Ezra=Esdras +Nehemiah=Neemias +Esther=Ester +Job=Jó +Psalms=Salmos +Proverbs=Provérbios +Ecclesiastes=Eclesiastes +Song of Solomon=Cântico dos Cânticos +Isaiah=Isaías +Jeremiah=Jeremias +Lamentations=Lamentações +Ezekiel=Ezequiel +Daniel=Daniel +Hosea=Oséias +Joel=Joel +Amos=Amós +Obadiah=Obadias +Jonah=Jonas +Micah=Miquéias +Nahum=Naum +Habakkuk=Habacuque +Zephaniah=Sofonias +Haggai=Ageu +Zechariah=Zacarias +Malachi=Malaquias +Matthew=Mateus +Mark=Marcos +Luke=Lucas +John=João +Acts=Atos +Romans=Romanos +I Corinthians=1 Coríntios +II Corinthians=2 Coríntios +Galatians=Gálatas +Ephesians=Efésios +Philippians=Filipenses +Colossians=Colossenses +I Thessalonians=1 Tessalonicenses +II Thessalonians=2 Tessalonicenses +I Timothy=1 Timóteo +II Timothy=2 Timóteo +Titus=Tito +Philemon=Filemon +Hebrews=Hebreus +James=Tiago +I Peter=1 Pedro +II Peter=2 Pedro +I John=1 João +II John=2 João +III John=3 João +Jude=Judas +Revelation of John=Apocalipse + +[Book Abbrevs] + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + + +GÊNESIS=1 +GEN=1 +ÊXODO=2 +EX=2 +LEVÃTICO=3 +LV=3 +NÚMEROS=4 +NM=4 +DEUTERONÔMIO=5 +DT=5 +JOSUÉ=6 +JS=6 +JUÃZES=7 +JZ=7 +RUTE=8 +RT=8 +1 SAMUEL=9 +1SM=9 +2 SAMUEL=10 +2SM=10 +1 REIS=11 +1RE=11 +2 REIS=12 +2RE=12 +1 CRÔNICAS=13 +1CR=13 +2 CRÔNICAS=14 +2CR=14 +ESDRAS=15 +ED=15 +NEEMIAS=16 +NE=16 +ESTER=17 +ET=17 +JÓ=18 +SALMOS=19 +SL=19 +PROVÉRBIOS=20 +PV=20 +ECLESIASTES=21 +EC=21 +Cântico dos Cânticos=22 +CT=22 +ISAÃAS=23 +IS=23 +JEREMIAS=24 +JR=24 +LAMENTAÇÕES=25 +LM=25 +EZEQUIEL=26 +EZ=26 +DANIEL=27 +DN=27 +OSÉIAS=28 +OS=28 +JOEL=29 +JL=29 +AMÓS=30 +AM=30 +OBADIAS=31 +OB=31 +JONAS=32 +JN=32 +MIQUÉIAS=33 +MQ=33 +NAUM=34 +NA=34 +HABACUQUE=35 +HC=35 +SOFONIAS=36 +SF=36 +AGEU=37 +AG=37 +ZACARIAS=38 +ZC=38 +MALAQUIAS=39 +ML=39 +MATEUS=40 +MT=40 +MARCOS=41 +MC=41 +LUCAS=42 +LC=42 +JOÃO=43 +JO=43 +ATOS=44 +AT=44 +ROMANOS=45 +RM=45 +1 CORÃNTIOS=46 +1CO=46 +2 CORÃNTIOS=47 +2CO=47 +GÃLATAS=48 +GL=48 +EFÉSIOS=49 +EF=49 +FILIPENSES=50 +FL=50 +COLOSSENSES=51 +CL=51 +1 TESSALONICENSES=52 +1TE=52 +2 TESSALONICENSES=53 +2TE=53 +1 TIMÓTEO=54 +1TM=54 +2 TIMÓTEO=55 +2TM=55 +TITO=56 +TT=56 +FILEMON=57 +FM=57 +HEBREUS=58 +HB=58 +TIAGO=59 +TG=59 +1 PEDRO=60 +1PE=60 +2 PEDRO=61 +2PE=61 +1 JOÃO=62 +1JO=62 +2 JOÃO=63 +2JO=63 +3 JOÃO=64 +3JO=64 +JUDAS=65 +JD=65 +APOCALIPSE=66 +AP=66 diff --git a/locales.d/pt_BR.conf b/locales.d/pt_BR.conf new file mode 100644 index 0000000..7420d98 --- /dev/null +++ b/locales.d/pt_BR.conf @@ -0,0 +1,392 @@ +[Meta] +Name=pt_BR +Description=Brazillian Portuguese +Encoding=ISO8859-1 + +[Text] +Genesis=Gênesis +Exodus=Êxodo +Leviticus=Levítico +Numbers=Números +Deuteronomy=Deuteronômio +Joshua=Josué +Judges=Juízes +Ruth=Rute +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Reis +II Kings=2 Reis +I Chronicles=1 Crônicas +II Chronicles=2 Crônicas +Ezra=Esdras +Nehemiah=Neemias +Esther=Ester +Job=Jó +Psalms=Salmos +Proverbs=Provérbios +Ecclesiastes=Eclesiastes +Song of Solomon=Cântico dos Cânticos +Isaiah=Isaías +Jeremiah=Jeremias +Lamentations=Lamentações +Ezekiel=Ezequiel +Daniel=Daniel +Hosea=Oséias +Joel=Joel +Amos=Amós +Obadiah=Obadias +Jonah=Jonas +Micah=Miquéias +Nahum=Naum +Habakkuk=Habacuque +Zephaniah=Sofonias +Haggai=Ageu +Zechariah=Zacarias +Malachi=Malaquias +Matthew=Mateus +Mark=Marcos +Luke=Lucas +John=João +Acts=Atos +Romans=Romanos +I Corinthians=1 Coríntios +II Corinthians=2 Coríntios +Galatians=Gálatas +Ephesians=Efésios +Philippians=Filipenses +Colossians=Colossenses +I Thessalonians=1 Tessalonicenses +II Thessalonians=2 Tessalonicenses +I Timothy=1 Timóteo +II Timothy=2 Timóteo +Titus=Tito +Philemon=Filemon +Hebrews=Hebreus +James=Tiago +I Peter=1 Pedro +II Peter=2 Pedro +I John=1 João +II John=2 João +III John=3 João +Jude=Judas +Revelation of John=Apocalipse + +[Book Abbrevs] + +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + + +GÊNESIS=1 +GEN=1 +ÊXODO=2 +EX=2 +LEVÍTICO=3 +LV=3 +NÚMEROS=4 +NM=4 +DEUTERONÔMIO=5 +DT=5 +JOSUÉ=6 +JS=6 +JUÍZES=7 +JZ=7 +RUTE=8 +RT=8 +1 SAMUEL=9 +1SM=9 +2 SAMUEL=10 +2SM=10 +1 REIS=11 +1RE=11 +2 REIS=12 +2RE=12 +1 CRÔNICAS=13 +1CR=13 +2 CRÔNICAS=14 +2CR=14 +ESDRAS=15 +ED=15 +NEEMIAS=16 +NE=16 +ESTER=17 +ET=17 +JÓ=18 +SALMOS=19 +SL=19 +PROVÉRBIOS=20 +PV=20 +ECLESIASTES=21 +EC=21 +Cântico dos Cânticos=22 +CT=22 +ISAÍAS=23 +IS=23 +JEREMIAS=24 +JR=24 +LAMENTAÇÕES=25 +LM=25 +EZEQUIEL=26 +EZ=26 +DANIEL=27 +DN=27 +OSÉIAS=28 +OS=28 +JOEL=29 +JL=29 +AMÓS=30 +AM=30 +OBADIAS=31 +OB=31 +JONAS=32 +JN=32 +MIQUÉIAS=33 +MQ=33 +NAUM=34 +NA=34 +HABACUQUE=35 +HC=35 +SOFONIAS=36 +SF=36 +AGEU=37 +AG=37 +ZACARIAS=38 +ZC=38 +MALAQUIAS=39 +ML=39 +MATEUS=40 +MT=40 +MARCOS=41 +MC=41 +LUCAS=42 +LC=42 +JOÃO=43 +JO=43 +ATOS=44 +AT=44 +ROMANOS=45 +RM=45 +1 CORÍNTIOS=46 +1CO=46 +2 CORÍNTIOS=47 +2CO=47 +GÁLATAS=48 +GL=48 +EFÉSIOS=49 +EF=49 +FILIPENSES=50 +FL=50 +COLOSSENSES=51 +CL=51 +1 TESSALONICENSES=52 +1TE=52 +2 TESSALONICENSES=53 +2TE=53 +1 TIMÓTEO=54 +1TM=54 +2 TIMÓTEO=55 +2TM=55 +TITO=56 +TT=56 +FILEMON=57 +FM=57 +HEBREUS=58 +HB=58 +TIAGO=59 +TG=59 +1 PEDRO=60 +1PE=60 +2 PEDRO=61 +2PE=61 +1 JOÃO=62 +1JO=62 +2 JOÃO=63 +2JO=63 +3 JOÃO=64 +3JO=64 +JUDAS=65 +JD=65 +APOCALIPSE=66 +AP=66 diff --git a/locales.d/ro.conf b/locales.d/ro.conf new file mode 100644 index 0000000..c233431 --- /dev/null +++ b/locales.d/ro.conf @@ -0,0 +1,330 @@ +# +# Numele cartilor Bibliei in versiunea Cornilescu +# +# Artemis State arty@home.ro +# multumiri lui Martin Gruner mg.pub@gmx.net + +[Meta] +Name=ro +Description=Romanian +Encoding=ASCII + +[Text] +Genesis=Genesa +Exodus=Exod +Leviticus=Levitic +Numbers=Numeri +Deuteronomy=Deuteronom +Joshua=Iosua +Judges=Judecatori +Ruth=Rut +I Samuel=I Samuel +II Samuel=II Samuel +I Kings=I Regi +II Kings=II Regi +I Chronicles=I Cronici +II Chronicles=II Cronici +Ezra=Ezra +Nehemiah=Neemia +Esther=Estera +Job=Iov +Psalms=Psalmi +Proverbs=Proverbe +Ecclesiastes=Eclesiastul +Song of Solomon=Cantarea Cantarilor +Isaiah=Isaia +Jeremiah=Ieremia +Lamentations=Plangerile +Ezekiel=Ezechiel +Daniel=Daniel +Hosea=Osea +Joel=Ioel +Amos=Amos +Obadiah=Obadia +Jonah=Iona +Micah=Mica +Nahum=Naum +Habakkuk=Habacuc +Zephaniah=Tefania +Haggai=Hagai +Zechariah=Zaharia +Malachi=Maleachi +Matthew=Matei +Mark=Marcu +Luke=Luca +John=Ioan +Acts=Faptele Apostolilor +Romans=Romani +I Corinthians=I Corinteni +II Corinthians=II Corinteni +Galatians=Galateni +Ephesians=Efeseni +Philippians=Filipeni +Colossians=Coloseni +I Thessalonians=I Tesaloniceni +II Thessalonians=II Tesaloniceni +I Timothy=I Timotei +II Timothy=II Timotei +Titus=Tit +Philemon=Filimon +Hebrews=Evrei +James=Iacov +I Peter=I Petru +II Peter=II Petru +I John=I Ioan +II John=II Ioan +III John=III Ioan +Jude=Iuda +Revelation of John=Apocalipsa + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENESA=1 +EXOD=2 +LEVITIC=3 +NUMERI=4 +DEUTERONOM=5 +IOSUA=6 +JUDECATORI=7 +RUT=8 +I SAMUEL=9 +II SAMUEL=10 +I REGI=11 +II REGI=12 +I CRONICI=13 +II CRONICI=14 +EZRA=15 +NEEMIA=16 +ESTERA=17 +IOV=18 +PSALMI=19 +PROVERBE=20 +ECLESIASTUL=21 +CANTAREA CANTARILOR=22 +ISAIA=23 +IEREMIA=24 +PLANGERILE=25 +EZECHIEL=26 +DANIEL=27 +OSEA=28 +IOEL=29 +AMOS=30 +OBADIA=31 +IONA=32 +MICA=33 +NAUM=34 +HABACUC=35 +TEFANIA=36 +HAGAI=37 +ZAHARIA=38 +MALEACHI=39 +MATEI=40 +MARCU=41 +LUCA=42 +IOAN=43 +FAPTELE APOSTOLILOR=44 +ROMANI=45 +I CORINTENI=46 +II CORINTENI=47 +GALATENI=48 +EFESENI=49 +FILIPENI=50 +COLOSENI=51 +I TESALONICENI=52 +II TESALONICENI=53 +I TIMOTEI=54 +II TIMOTEI=55 +TIT=56 +FILIMON=57 +EVREI=58 +IACOV=59 +I PETRU=60 +II PETRU=61 +I IOAN=62 +II IOAN=63 +III IOAN=64 +IUDA=65 +APOCALIPSA=66 diff --git a/locales.d/ru_RU-cp1251.conf b/locales.d/ru_RU-cp1251.conf new file mode 100755 index 0000000..c93e0ac --- /dev/null +++ b/locales.d/ru_RU-cp1251.conf @@ -0,0 +1,741 @@ +# Russian BIBLE +# ÁÈÁËÈß, ÊÍÈÃÈ ÑÂßÙÅÍÍÎÃÎ ÏÈÑÀÍÈß ÂÅÒÕÎÃÎ È ÍÎÂÎÃÎ ÇÀÂÅÒÀ. +# Ïðàöþº ï³ä Linux ³ Windows âåðñ³¿ ïðîåêòó SWORD +# Pavlo Bohmat bohm@ukr.net + +[Meta] +Name=ru_RU-cp1251 +Description=Russian (cp1251) +Encoding=CP1251 + +[Text] +Genesis=Áûòèå +Exodus=Èñõîä +Leviticus=Ëåâèò +Numbers=×èñëà +Deuteronomy=Âòîðîçàêîíèå +Joshua=Èèñóñ Íàâèí +Judges=Ñóäüè +Ruth=Ðóôü +I Samuel=1. Öàðñòâ +II Samuel=2. Öàðñòâ +I Kings=3. Öàðñòâ +II Kings=4. Öàðñòâ +I Chronicles=1. Ïàðàëèïîìåíîí +II Chronicles=2. Ïàðàëèïîìåíîí +Ezra=Åçäðà +Nehemiah=Íååìèÿ +Esther=Åñôèðü +Job=Èîâ +Psalms=Ïñàëòèðü +Proverbs=Ïðèò÷è +Ecclesiastes=Åêêëåñèàñò +Song of Solomon=Ïåñíÿ Ïåñíåé +Isaiah=Èñàèÿ +Jeremiah=Èåðåìèÿ +Lamentations=Ïëà÷ Èåðåìèè +Ezekiel=Èåçåêèèëü +Daniel=Äàíèèë +Hosea=Îñèÿ +Joel=Èîèëü +Amos=Àìîñ +Obadiah=Àâäèé +Jonah=Èîíà +Micah=Ìèõåé +Nahum=Íàóì +Habakkuk=Àââàêóì +Zephaniah=Ñîôîíèÿ +Haggai=Àããåé +Zechariah=Çàõàðèÿ +Malachi=Ìàëàõèÿ +Matthew=Îò Ìàòôåÿ +Mark=Îò Ìàðêà +Luke=Îò Ëóêè +John=Îò Èîàííà +Acts=Äåÿíèÿ +Romans=Ê Ðèìëÿíàì +I Corinthians=1. Êîðèíôÿíàì +II Corinthians=2. Êîðèíôÿíàì +Galatians=Ê Ãàëàòàì +Ephesians=Ê Åôåñÿíàì +Philippians=Ê Ôèëèïïèéöàì +Colossians=Ê Êîëîññÿíàì +I Thessalonians=1. Ôåññàëîíèêèéöàì +II Thessalonians=2. Ôåññàëîíèêèéöàì +I Timothy=1. Òèìîôåþ +II Timothy=2. Òèìîôåþ +Titus=Ê Òèòó +Philemon=Ê Ôèëèìîíó +Hebrews=Ê Åâðåÿì +James=Èàêîâà +I Peter=1. Ïåòðà +II Peter=2. Ïåòðà +I John=1. Èîàííà +II John=2. Èîàííà +III John=3. Èîàííà +Jude=Èóäû +Revelation of John=Îòêðîâåíèå + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1Ì=1 +1Ì.=1 +áûò=1 +áûò.=1 +Áûò=1 +Áûò.=1 +áûòèå=1 +Áûòèå=1 +2Ì=2 +2Ì.=2 +èñõ=2 +èñõ.=2 +Èñõ=2 +Èñõ.=2 +èñõîä=2 +Èñõîä=2 +3Ì=3 +3Ì.=3 +ëåâ=3 +ëåâ.=3 +Ëåâ=3 +Ëåâ.=3 +ëåâèò=3 +Ëåâèò=3 +4Ì=4 +4Ì.=4 +÷èñ=4 +÷èñ.=4 +×èñ=4 +×èñ.=4 +÷èñëà=4 +×èñëà=4 +5Ì=5 +5Ì.=5 +âòîð=5 +âòîð.=5 +Âòîð=5 +Âòîð.=5 +Âòîðîçàêîíèå=5 +èèñ.íàâ.=6 +åãîøóè=6 +Åãîøóè=6 +åã=6 +åã.=6 +èèñóñ íàâèí=6 +Èèñóñ Íàâèí=6 +ñóä=7 +ñóä.=7 +ñóäüè=7 +Ñóäüè=7 +ðóô=8 +ðóô.=8 +ðóôü=8 +Ðóôü=8 + +1. Öàðñòâ=9 +1 Öàðñòâ=9 +1Öàðñòâ=9 +1öàð=9 +1öàð.=9 +1 öàð=9 +1 öàð.=9 +1Öàð=9 +1Öàð.=9 +1 Öàð=9 +1 Öàð.=9 + +2. Öàðñòâ=10 +2 Öàðñòâ=10 +2Öàðñòâ=10 +2öàð=10 +2öàð.=10 +2 öàð=10 +2 öàð.=10 +2Öàð=10 +2Öàð.=10 +2 Öàð=10 +2 Öàð.=10 + +3. Öàðñòâ=11 +3 Öàðñòâ=11 +3Öàðñòâ=11 +3öàð=11 +3öàð.=11 +3 öàð=11 +3 öàð.=11 +3Öàð=11 +3Öàð.=11 +3 Öàð=11 +3 Öàð.=11 + +4. Öàðñòâ=12 +4 Öàðñòâ=12 +4Öàðñòâ=12 +4öàð=12 +4öàð.=12 +4 öàð=12 +4 öàð.=12 +4Öàð=12 +4Öàð.=12 +4 Öàð=12 +4 Öàð.=12 + +1. Ïàðàëèïîìåíîí=13 +1 Ïàðàëèïîìåíîí=13 +1Ïàðàëèïîìåíîí=13 +1ïàð=13 +1ïàð.=13 +1 ïàð=13 +1 ïàð.=13 +1 Ïàð=13 +1 Ïàð.=13 + +2. Ïàðàëèïîìåíîí=14 +2 Ïàðàëèïîìåíîí=14 +2Ïàðàëèïîìåíîí=14 +2ïàð=14 +2ïàð.=14 +2 ïàð=14 +2 ïàð.=14 +2Ïàð=14 +2Ïàð.=14 +2 Ïàð=14 +2 Ïàð.=14 + +åçäð=15 +åçäð.=15 +Åçäð=15 +Åçäð.=15 +åçä=15 +åçä.=15 +Åçä=15 +Åçä.=15 +Åçäðà=15 +íååì=16 +íååì.=16 +Íååì=16 +Íååì.=16 +Íååìèÿ=16 +åñô=17 +åñô.=17 +Åñô=17 +Åñô.=17 +Åñôèðü=17 +èîâ=18 +èîâ.=18 +Èîâ=18 +ïñ=19 +ïñ.=19 +Ïñ=19 +Ïñ.=19 +Ïñàëòèðü=19 +ïðèò=20 +ïðèò.=20 +Ïðèò=20 +Ïðèò.=20 +Ïðèò÷è=20 +åêêë=21 +åêêë.=21 +Åêêë=21 +Åêêë.=21 +Åêêëåñèàñò=21 +ïåñí=22 +ïåñí.=22 +Ïåñí=22 +Ïåñí.=22 +Ïåñíÿ Ïåñíåé=22 +èñ=23 +èñ.=23 +Èñ=23 +Èñ.=23 +Èñàèÿ=23 +èåð=24 +èåð.=24 +Èåð=24 +Èåð.=24 +Èåðåìèÿ=24 +ïëà÷=25 +ïëà÷.=25 +Ïëà÷=25 +Ïëà÷.=25 +Ïëà÷ Èåðåìèè=25 +èåç=26 +èåç.=26 +Èåç=26 +Èåç.=26 +Èåçåêèèëü=26 +äàí=27 +äàí.=27 +Äàí=27 +Äàí.=27 +Äàíèèë=27 +îñ=28 +îñ.=28 +Îñ=28 +Îñ.=28 +Îñèÿ=28 +èîèë=29 +èîèë.=29 +Èîèë=29 +Èîèë.=29 +Èîèëü=29 +àì=30 +àì.=30 +Àì=30 +Àì.=30 +àìîñ=30 +Àìîñ=30 +àâä.=31 +Àâäèé=31 +àâä=31 +èîí=32 +èîí.=32 +Èîí=32 +Èîí.=32 +Èîíà=32 +ìèõ=33 +ìèõ.=33 +Ìèõ=33 +Ìèõ.=33 +Ìèõåé=33 +íàóì=34 +íàóì.=34 +Íàóì=34 +àââ=35 +àââ.=35 +Àââ=35 +Àââ.=35 +Àââàêóì=35 +ñîô=36 +ñîô.=36 +Ñîô=36 +Ñîô.=36 +Ñîôîíèÿ=36 +àãã=37 +àãã.=37 +Àãã=37 +Àãã.=37 +Àããåé=37 +çàõ=38 +çàõ.=38 +Çàõ=38 +Çàõ.=38 +Çàõàðèÿ=38 +ìàë=39 +ìàë.=39 +Ìàë=39 +Ìàë.=39 +Ìàëàõèÿ=39 +ìàòô=40 +ìàòô.=40 +ìô=40 +ìô.=40 +Ìô=40 +Ìô.=40 +Îò Ìàòôåÿ=40 +ìàð=41 +ìàð.=41 +ìê=41 +ìê.=41 +Ìê=41 +Ìê.=41 +Îò Ìàðêà=41 +ëóê=42 +ëóê.=42 +ëê=42 +ëê.=42 +Ëê=42 +Ëê.=42 +Îò Ëóêè=42 +èîàí=43 +èîàí.=43 +èí=43 +èí.=43 +Èí=43 +Èí.=43 +Îò Èîàííà=43 +äåÿí=44 +äåÿí.=44 +Äåÿí=44 +Äåÿí.=44 +Äåÿíèÿ=44 +ðèì=45 +ðèì.=45 +Ðèì=45 +Ðèì.=45 +Ê Ðèìëÿíàì=45 + +1. Êîðèíôÿíàì=46 +1 Êîðèíôÿíàì=46 +1Êîðèíôÿíàì=46 +1êîð=46 +1êîð.=46 +1 êîð=46 +1 êîð.=46 +1Êîð=46 +1Êîð.=46 +1 Êîð=46 +1 Êîð.=46 + +2. Êîðèíôÿíàì=47 +2 Êîðèíôÿíàì=47 +2Êîðèíôÿíàì=47 +2êîð=47 +2êîð.=47 +2 êîð=47 +2 êîð.=47 +2Êîð=47 +2Êîð.=47 +2 Êîð=47 +2 Êîð.=47 + +ãàë=48 +ãàë.=48 +Ãàë=48 +Ãàë.=48 +Ê Ãàëàòàì=48 +åô=49 +åô.=49 +Åô=49 +Åô.=49 +Ê Åôåñÿíàì=49 +ôèë=50 +ôèë.=50 +Ôèë=50 +Ôèë.=50 +ôëï=50 +ôëï.=50 +Ôëï=50 +Ôëï.=50 +Ê Ôèëèïïèéöàì=50 +Ê Êîëîññÿíàì=51 +êîë=51 +êîë.=51 +Êîë=51 +Êîë.=51 + +1. Ôåññàëîíèêèéöàì=52 +1 Ôåññàëîíèêèéöàì=52 +1Ôåññàëîíèêèéöàì=52 +1ôåñ=52 +1ôåñ.=52 +1 ôåñ=52 +1 ôåñ.=52 +1 Ôåñ=52 +1 Ôåñ.=52 + +2. Ôåññàëîíèêèéöàì=53 +2 Ôåññàëîíèêèéöàì=53 +2Ôåññàëîíèêèéöàì=53 +2ôåñ=53 +2ôåñ.=53 +2 ôåñ=53 +2 ôåñ.=53 +2Ôåñ=53 +2Ôåñ.=53 +2 Ôåñ=53 +2 Ôåñ.=53 + +1. Òèìîôåþ=54 +1 Òèìîôåþ=54 +1Òèìîôåþ=54 +1òèì=54 +1òèì.=54 +1 òèì=54 +1 òèì.=54 +1Òèì=54 +1Òèì.=54 +1 Òèì=54 +1 Òèì.=54 + +2. Òèìîôåþ=55 +2 Òèìîôåþ=55 +2Òèìîôåþ=55 +2òèì=55 +2òèì.=55 +2 òèì=55 +2 òèì.=55 +2Òèì=55 +2Òèì.=55 +2 Òèì=55 +2 Òèì.=55 + +Ê Òèòó=56 +òèò=56 +òèò.=56 +Òèò=56 +Òèò.=56 +ôëì=57 +ôëì.=57 +Ôëì=57 +Ôëì.=57 +Ê Ôèëèìîíó=57 +åâð.=58 +åâð=58 +Åâð=58 +Åâð.=58 +Ê Åâðåÿì=58 +èàê=59 +èàê.=59 +Èàê=59 +Èàê.=59 +èàêîâà=59 +Èàêîâà=59 + +1. Ïåòðà=60 +1 Ïåòðà=60 +1Ïåòðà=60 +1ïåò=60 +1ïåò.=60 +1 ïåò=60 +1 ïåò.=60 +1Ïåò=60 +1Ïåò.=60 +1 Ïåò=60 +1 Ïåò.=60 + +2. Ïåòðà=61 +2 Ïåòðà=61 +2Ïåòðà=61 +2ïåò=61 +2ïåò.=61 +2 ïåò=61 +2 ïåò.=61 +2Ïåò=61 +2Ïåò.=61 +2 Ïåò=61 +2 Ïåò.=61 + +1. Èîàííà=62 +1 Èîàííà=62 +1Èîàííà=62 +1èîàí=62 +1èîàí.=62 +1èí=62 +1èí.=62 +1 èí=62 +1 èí.=62 +1Èí=62 +1Èí.=62 +1 Èí=62 +1 Èí.=62 + +2. Èîàííà=63 +2 Èîàííà=63 +2Èîàííà=63 +2èîàí=63 +2èîàí.=63 +2èí=63 +2èí.=63 +2 èí=63 +2 èí.=63 +2Èí=63 +2Èí.=63 +2 Èí=63 +2 Èí.=63 + +3. Èîàííà=64 +3 Èîàííà=64 +3Èîàííà=64 +3èîàí=64 +3èîàí.=64 +3èí=64 +3èí.=64 +3 èí=64 +3 èí.=64 +3Èí=64 +3Èí.=64 + +èóä=65 +èóä.=65 +Èóäû=65 +îòêð=66 +îòêð.=66 +Îòêð=66 +Îòêð.=66 +Îòêðîâåíèå=66 diff --git a/locales.d/ru_RU-koi8-r.conf b/locales.d/ru_RU-koi8-r.conf new file mode 100755 index 0000000..2c0b88e --- /dev/null +++ b/locales.d/ru_RU-koi8-r.conf @@ -0,0 +1,741 @@ +# Russian BIBLE +# âéâìéñ, ëîéçé ó÷ñýåîîïçï ðéóáîéñ ÷åôèïçï é îï÷ïçï úá÷åôá. +# ðÒÁÃÀ¤ Ð¦Ä Linux ¦ Windows ×ÅÒÓ¦§ ÐÒÏÅËÔÕ SWORD +# Pavlo Bohmat bohm@ukr.net + +[Meta] +Name=ru_RU-koi8-r +Description=Russian (koi8-r) +Encoding=KOI8-R + +[Text] +Genesis=âÙÔÉÅ +Exodus=éÓÈÏÄ +Leviticus=ìÅ×ÉÔ +Numbers=þÉÓÌÁ +Deuteronomy=÷ÔÏÒÏÚÁËÏÎÉÅ +Joshua=éÉÓÕÓ îÁ×ÉÎ +Judges=óÕÄØÉ +Ruth=òÕÆØ +I Samuel=1. ãÁÒÓÔ× +II Samuel=2. ãÁÒÓÔ× +I Kings=3. ãÁÒÓÔ× +II Kings=4. ãÁÒÓÔ× +I Chronicles=1. ðÁÒÁÌÉÐÏÍÅÎÏÎ +II Chronicles=2. ðÁÒÁÌÉÐÏÍÅÎÏÎ +Ezra=åÚÄÒÁ +Nehemiah=îÅÅÍÉÑ +Esther=åÓÆÉÒØ +Job=éÏ× +Psalms=ðÓÁÌÔÉÒØ +Proverbs=ðÒÉÔÞÉ +Ecclesiastes=åËËÌÅÓÉÁÓÔ +Song of Solomon=ðÅÓÎÑ ðÅÓÎÅÊ +Isaiah=éÓÁÉÑ +Jeremiah=éÅÒÅÍÉÑ +Lamentations=ðÌÁÞ éÅÒÅÍÉÉ +Ezekiel=éÅÚÅËÉÉÌØ +Daniel=äÁÎÉÉÌ +Hosea=ïÓÉÑ +Joel=éÏÉÌØ +Amos=áÍÏÓ +Obadiah=á×ÄÉÊ +Jonah=éÏÎÁ +Micah=íÉÈÅÊ +Nahum=îÁÕÍ +Habakkuk=á××ÁËÕÍ +Zephaniah=óÏÆÏÎÉÑ +Haggai=áÇÇÅÊ +Zechariah=úÁÈÁÒÉÑ +Malachi=íÁÌÁÈÉÑ +Matthew=ïÔ íÁÔÆÅÑ +Mark=ïÔ íÁÒËÁ +Luke=ïÔ ìÕËÉ +John=ïÔ éÏÁÎÎÁ +Acts=äÅÑÎÉÑ +Romans=ë òÉÍÌÑÎÁÍ +I Corinthians=1. ëÏÒÉÎÆÑÎÁÍ +II Corinthians=2. ëÏÒÉÎÆÑÎÁÍ +Galatians=ë çÁÌÁÔÁÍ +Ephesians=ë åÆÅÓÑÎÁÍ +Philippians=ë æÉÌÉÐÐÉÊÃÁÍ +Colossians=ë ëÏÌÏÓÓÑÎÁÍ +I Thessalonians=1. æÅÓÓÁÌÏÎÉËÉÊÃÁÍ +II Thessalonians=2. æÅÓÓÁÌÏÎÉËÉÊÃÁÍ +I Timothy=1. ôÉÍÏÆÅÀ +II Timothy=2. ôÉÍÏÆÅÀ +Titus=ë ôÉÔÕ +Philemon=ë æÉÌÉÍÏÎÕ +Hebrews=ë å×ÒÅÑÍ +James=éÁËÏ×Á +I Peter=1. ðÅÔÒÁ +II Peter=2. ðÅÔÒÁ +I John=1. éÏÁÎÎÁ +II John=2. éÏÁÎÎÁ +III John=3. éÏÁÎÎÁ +Jude=éÕÄÙ +Revelation of John=ïÔËÒÏ×ÅÎÉÅ + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1í=1 +1í.=1 +ÂÙÔ=1 +ÂÙÔ.=1 +âÙÔ=1 +âÙÔ.=1 +ÂÙÔÉÅ=1 +âÙÔÉÅ=1 +2í=2 +2í.=2 +ÉÓÈ=2 +ÉÓÈ.=2 +éÓÈ=2 +éÓÈ.=2 +ÉÓÈÏÄ=2 +éÓÈÏÄ=2 +3í=3 +3í.=3 +ÌÅ×=3 +ÌÅ×.=3 +ìÅ×=3 +ìÅ×.=3 +ÌÅ×ÉÔ=3 +ìÅ×ÉÔ=3 +4í=4 +4í.=4 +ÞÉÓ=4 +ÞÉÓ.=4 +þÉÓ=4 +þÉÓ.=4 +ÞÉÓÌÁ=4 +þÉÓÌÁ=4 +5í=5 +5í.=5 +×ÔÏÒ=5 +×ÔÏÒ.=5 +÷ÔÏÒ=5 +÷ÔÏÒ.=5 +÷ÔÏÒÏÚÁËÏÎÉÅ=5 +ÉÉÓ.ÎÁ×.=6 +ÅÇÏÛÕÉ=6 +åÇÏÛÕÉ=6 +ÅÇ=6 +ÅÇ.=6 +ÉÉÓÕÓ ÎÁ×ÉÎ=6 +éÉÓÕÓ îÁ×ÉÎ=6 +ÓÕÄ=7 +ÓÕÄ.=7 +ÓÕÄØÉ=7 +óÕÄØÉ=7 +ÒÕÆ=8 +ÒÕÆ.=8 +ÒÕÆØ=8 +òÕÆØ=8 + +1. ãÁÒÓÔ×=9 +1 ãÁÒÓÔ×=9 +1ãÁÒÓÔ×=9 +1ÃÁÒ=9 +1ÃÁÒ.=9 +1 ÃÁÒ=9 +1 ÃÁÒ.=9 +1ãÁÒ=9 +1ãÁÒ.=9 +1 ãÁÒ=9 +1 ãÁÒ.=9 + +2. ãÁÒÓÔ×=10 +2 ãÁÒÓÔ×=10 +2ãÁÒÓÔ×=10 +2ÃÁÒ=10 +2ÃÁÒ.=10 +2 ÃÁÒ=10 +2 ÃÁÒ.=10 +2ãÁÒ=10 +2ãÁÒ.=10 +2 ãÁÒ=10 +2 ãÁÒ.=10 + +3. ãÁÒÓÔ×=11 +3 ãÁÒÓÔ×=11 +3ãÁÒÓÔ×=11 +3ÃÁÒ=11 +3ÃÁÒ.=11 +3 ÃÁÒ=11 +3 ÃÁÒ.=11 +3ãÁÒ=11 +3ãÁÒ.=11 +3 ãÁÒ=11 +3 ãÁÒ.=11 + +4. ãÁÒÓÔ×=12 +4 ãÁÒÓÔ×=12 +4ãÁÒÓÔ×=12 +4ÃÁÒ=12 +4ÃÁÒ.=12 +4 ÃÁÒ=12 +4 ÃÁÒ.=12 +4ãÁÒ=12 +4ãÁÒ.=12 +4 ãÁÒ=12 +4 ãÁÒ.=12 + +1. ðÁÒÁÌÉÐÏÍÅÎÏÎ=13 +1 ðÁÒÁÌÉÐÏÍÅÎÏÎ=13 +1ðÁÒÁÌÉÐÏÍÅÎÏÎ=13 +1ÐÁÒ=13 +1ÐÁÒ.=13 +1 ÐÁÒ=13 +1 ÐÁÒ.=13 +1 ðÁÒ=13 +1 ðÁÒ.=13 + +2. ðÁÒÁÌÉÐÏÍÅÎÏÎ=14 +2 ðÁÒÁÌÉÐÏÍÅÎÏÎ=14 +2ðÁÒÁÌÉÐÏÍÅÎÏÎ=14 +2ÐÁÒ=14 +2ÐÁÒ.=14 +2 ÐÁÒ=14 +2 ÐÁÒ.=14 +2ðÁÒ=14 +2ðÁÒ.=14 +2 ðÁÒ=14 +2 ðÁÒ.=14 + +ÅÚÄÒ=15 +ÅÚÄÒ.=15 +åÚÄÒ=15 +åÚÄÒ.=15 +ÅÚÄ=15 +ÅÚÄ.=15 +åÚÄ=15 +åÚÄ.=15 +åÚÄÒÁ=15 +ÎÅÅÍ=16 +ÎÅÅÍ.=16 +îÅÅÍ=16 +îÅÅÍ.=16 +îÅÅÍÉÑ=16 +ÅÓÆ=17 +ÅÓÆ.=17 +åÓÆ=17 +åÓÆ.=17 +åÓÆÉÒØ=17 +ÉÏ×=18 +ÉÏ×.=18 +éÏ×=18 +ÐÓ=19 +ÐÓ.=19 +ðÓ=19 +ðÓ.=19 +ðÓÁÌÔÉÒØ=19 +ÐÒÉÔ=20 +ÐÒÉÔ.=20 +ðÒÉÔ=20 +ðÒÉÔ.=20 +ðÒÉÔÞÉ=20 +ÅËËÌ=21 +ÅËËÌ.=21 +åËËÌ=21 +åËËÌ.=21 +åËËÌÅÓÉÁÓÔ=21 +ÐÅÓÎ=22 +ÐÅÓÎ.=22 +ðÅÓÎ=22 +ðÅÓÎ.=22 +ðÅÓÎÑ ðÅÓÎÅÊ=22 +ÉÓ=23 +ÉÓ.=23 +éÓ=23 +éÓ.=23 +éÓÁÉÑ=23 +ÉÅÒ=24 +ÉÅÒ.=24 +éÅÒ=24 +éÅÒ.=24 +éÅÒÅÍÉÑ=24 +ÐÌÁÞ=25 +ÐÌÁÞ.=25 +ðÌÁÞ=25 +ðÌÁÞ.=25 +ðÌÁÞ éÅÒÅÍÉÉ=25 +ÉÅÚ=26 +ÉÅÚ.=26 +éÅÚ=26 +éÅÚ.=26 +éÅÚÅËÉÉÌØ=26 +ÄÁÎ=27 +ÄÁÎ.=27 +äÁÎ=27 +äÁÎ.=27 +äÁÎÉÉÌ=27 +ÏÓ=28 +ÏÓ.=28 +ïÓ=28 +ïÓ.=28 +ïÓÉÑ=28 +ÉÏÉÌ=29 +ÉÏÉÌ.=29 +éÏÉÌ=29 +éÏÉÌ.=29 +éÏÉÌØ=29 +ÁÍ=30 +ÁÍ.=30 +áÍ=30 +áÍ.=30 +ÁÍÏÓ=30 +áÍÏÓ=30 +Á×Ä.=31 +á×ÄÉÊ=31 +Á×Ä=31 +ÉÏÎ=32 +ÉÏÎ.=32 +éÏÎ=32 +éÏÎ.=32 +éÏÎÁ=32 +ÍÉÈ=33 +ÍÉÈ.=33 +íÉÈ=33 +íÉÈ.=33 +íÉÈÅÊ=33 +ÎÁÕÍ=34 +ÎÁÕÍ.=34 +îÁÕÍ=34 +Á××=35 +Á××.=35 +á××=35 +á××.=35 +á××ÁËÕÍ=35 +ÓÏÆ=36 +ÓÏÆ.=36 +óÏÆ=36 +óÏÆ.=36 +óÏÆÏÎÉÑ=36 +ÁÇÇ=37 +ÁÇÇ.=37 +áÇÇ=37 +áÇÇ.=37 +áÇÇÅÊ=37 +ÚÁÈ=38 +ÚÁÈ.=38 +úÁÈ=38 +úÁÈ.=38 +úÁÈÁÒÉÑ=38 +ÍÁÌ=39 +ÍÁÌ.=39 +íÁÌ=39 +íÁÌ.=39 +íÁÌÁÈÉÑ=39 +ÍÁÔÆ=40 +ÍÁÔÆ.=40 +ÍÆ=40 +ÍÆ.=40 +íÆ=40 +íÆ.=40 +ïÔ íÁÔÆÅÑ=40 +ÍÁÒ=41 +ÍÁÒ.=41 +ÍË=41 +ÍË.=41 +íË=41 +íË.=41 +ïÔ íÁÒËÁ=41 +ÌÕË=42 +ÌÕË.=42 +ÌË=42 +ÌË.=42 +ìË=42 +ìË.=42 +ïÔ ìÕËÉ=42 +ÉÏÁÎ=43 +ÉÏÁÎ.=43 +ÉÎ=43 +ÉÎ.=43 +éÎ=43 +éÎ.=43 +ïÔ éÏÁÎÎÁ=43 +ÄÅÑÎ=44 +ÄÅÑÎ.=44 +äÅÑÎ=44 +äÅÑÎ.=44 +äÅÑÎÉÑ=44 +ÒÉÍ=45 +ÒÉÍ.=45 +òÉÍ=45 +òÉÍ.=45 +ë òÉÍÌÑÎÁÍ=45 + +1. ëÏÒÉÎÆÑÎÁÍ=46 +1 ëÏÒÉÎÆÑÎÁÍ=46 +1ëÏÒÉÎÆÑÎÁÍ=46 +1ËÏÒ=46 +1ËÏÒ.=46 +1 ËÏÒ=46 +1 ËÏÒ.=46 +1ëÏÒ=46 +1ëÏÒ.=46 +1 ëÏÒ=46 +1 ëÏÒ.=46 + +2. ëÏÒÉÎÆÑÎÁÍ=47 +2 ëÏÒÉÎÆÑÎÁÍ=47 +2ëÏÒÉÎÆÑÎÁÍ=47 +2ËÏÒ=47 +2ËÏÒ.=47 +2 ËÏÒ=47 +2 ËÏÒ.=47 +2ëÏÒ=47 +2ëÏÒ.=47 +2 ëÏÒ=47 +2 ëÏÒ.=47 + +ÇÁÌ=48 +ÇÁÌ.=48 +çÁÌ=48 +çÁÌ.=48 +ë çÁÌÁÔÁÍ=48 +ÅÆ=49 +ÅÆ.=49 +åÆ=49 +åÆ.=49 +ë åÆÅÓÑÎÁÍ=49 +ÆÉÌ=50 +ÆÉÌ.=50 +æÉÌ=50 +æÉÌ.=50 +ÆÌÐ=50 +ÆÌÐ.=50 +æÌÐ=50 +æÌÐ.=50 +ë æÉÌÉÐÐÉÊÃÁÍ=50 +ë ëÏÌÏÓÓÑÎÁÍ=51 +ËÏÌ=51 +ËÏÌ.=51 +ëÏÌ=51 +ëÏÌ.=51 + +1. æÅÓÓÁÌÏÎÉËÉÊÃÁÍ=52 +1 æÅÓÓÁÌÏÎÉËÉÊÃÁÍ=52 +1æÅÓÓÁÌÏÎÉËÉÊÃÁÍ=52 +1ÆÅÓ=52 +1ÆÅÓ.=52 +1 ÆÅÓ=52 +1 ÆÅÓ.=52 +1 æÅÓ=52 +1 æÅÓ.=52 + +2. æÅÓÓÁÌÏÎÉËÉÊÃÁÍ=53 +2 æÅÓÓÁÌÏÎÉËÉÊÃÁÍ=53 +2æÅÓÓÁÌÏÎÉËÉÊÃÁÍ=53 +2ÆÅÓ=53 +2ÆÅÓ.=53 +2 ÆÅÓ=53 +2 ÆÅÓ.=53 +2æÅÓ=53 +2æÅÓ.=53 +2 æÅÓ=53 +2 æÅÓ.=53 + +1. ôÉÍÏÆÅÀ=54 +1 ôÉÍÏÆÅÀ=54 +1ôÉÍÏÆÅÀ=54 +1ÔÉÍ=54 +1ÔÉÍ.=54 +1 ÔÉÍ=54 +1 ÔÉÍ.=54 +1ôÉÍ=54 +1ôÉÍ.=54 +1 ôÉÍ=54 +1 ôÉÍ.=54 + +2. ôÉÍÏÆÅÀ=55 +2 ôÉÍÏÆÅÀ=55 +2ôÉÍÏÆÅÀ=55 +2ÔÉÍ=55 +2ÔÉÍ.=55 +2 ÔÉÍ=55 +2 ÔÉÍ.=55 +2ôÉÍ=55 +2ôÉÍ.=55 +2 ôÉÍ=55 +2 ôÉÍ.=55 + +ë ôÉÔÕ=56 +ÔÉÔ=56 +ÔÉÔ.=56 +ôÉÔ=56 +ôÉÔ.=56 +ÆÌÍ=57 +ÆÌÍ.=57 +æÌÍ=57 +æÌÍ.=57 +ë æÉÌÉÍÏÎÕ=57 +Å×Ò.=58 +Å×Ò=58 +å×Ò=58 +å×Ò.=58 +ë å×ÒÅÑÍ=58 +ÉÁË=59 +ÉÁË.=59 +éÁË=59 +éÁË.=59 +ÉÁËÏ×Á=59 +éÁËÏ×Á=59 + +1. ðÅÔÒÁ=60 +1 ðÅÔÒÁ=60 +1ðÅÔÒÁ=60 +1ÐÅÔ=60 +1ÐÅÔ.=60 +1 ÐÅÔ=60 +1 ÐÅÔ.=60 +1ðÅÔ=60 +1ðÅÔ.=60 +1 ðÅÔ=60 +1 ðÅÔ.=60 + +2. ðÅÔÒÁ=61 +2 ðÅÔÒÁ=61 +2ðÅÔÒÁ=61 +2ÐÅÔ=61 +2ÐÅÔ.=61 +2 ÐÅÔ=61 +2 ÐÅÔ.=61 +2ðÅÔ=61 +2ðÅÔ.=61 +2 ðÅÔ=61 +2 ðÅÔ.=61 + +1. éÏÁÎÎÁ=62 +1 éÏÁÎÎÁ=62 +1éÏÁÎÎÁ=62 +1ÉÏÁÎ=62 +1ÉÏÁÎ.=62 +1ÉÎ=62 +1ÉÎ.=62 +1 ÉÎ=62 +1 ÉÎ.=62 +1éÎ=62 +1éÎ.=62 +1 éÎ=62 +1 éÎ.=62 + +2. éÏÁÎÎÁ=63 +2 éÏÁÎÎÁ=63 +2éÏÁÎÎÁ=63 +2ÉÏÁÎ=63 +2ÉÏÁÎ.=63 +2ÉÎ=63 +2ÉÎ.=63 +2 ÉÎ=63 +2 ÉÎ.=63 +2éÎ=63 +2éÎ.=63 +2 éÎ=63 +2 éÎ.=63 + +3. éÏÁÎÎÁ=64 +3 éÏÁÎÎÁ=64 +3éÏÁÎÎÁ=64 +3ÉÏÁÎ=64 +3ÉÏÁÎ.=64 +3ÉÎ=64 +3ÉÎ.=64 +3 ÉÎ=64 +3 ÉÎ.=64 +3éÎ=64 +3éÎ.=64 + +ÉÕÄ=65 +ÉÕÄ.=65 +éÕÄÙ=65 +ÏÔËÒ=66 +ÏÔËÒ.=66 +ïÔËÒ=66 +ïÔËÒ.=66 +ïÔËÒÏ×ÅÎÉÅ=66 diff --git a/locales.d/ru_RU-utf8.conf b/locales.d/ru_RU-utf8.conf new file mode 100644 index 0000000..fb1b58e --- /dev/null +++ b/locales.d/ru_RU-utf8.conf @@ -0,0 +1,743 @@ +# Russian BIBLE +# БИБЛИЯ, КÐИГИ СВЯЩЕÐÐОГО ПИСÐÐИЯ ВЕТХОГО И ÐОВОГО ЗÐВЕТÐ. +# Працює під Linux Ñ– Windows верÑÑ–Ñ— проекту SWORD +# Pavlo Bohmat bohm@ukr.net + +# Converted with iconv by Martin Gruner + +[Meta] +Name=ru +Description=Russian (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Бытие +Exodus=ИÑход +Leviticus=Левит +Numbers=ЧиÑла +Deuteronomy=Второзаконие +Joshua=ИиÑÑƒÑ Ðавин +Judges=Судьи +Ruth=Руфь +I Samuel=1. ЦарÑтв +II Samuel=2. ЦарÑтв +I Kings=3. ЦарÑтв +II Kings=4. ЦарÑтв +I Chronicles=1. Паралипоменон +II Chronicles=2. Паралипоменон +Ezra=Ездра +Nehemiah=ÐÐµÐµÐ¼Ð¸Ñ +Esther=ЕÑфирь +Job=Иов +Psalms=ПÑалтирь +Proverbs=Притчи +Ecclesiastes=ЕкклеÑиаÑÑ‚ +Song of Solomon=ПеÑÐ½Ñ ÐŸÐµÑней +Isaiah=ИÑÐ°Ð¸Ñ +Jeremiah=Ð˜ÐµÑ€ÐµÐ¼Ð¸Ñ +Lamentations=Плач Иеремии +Ezekiel=Иезекииль +Daniel=Даниил +Hosea=ОÑÐ¸Ñ +Joel=Иоиль +Amos=ÐÐ¼Ð¾Ñ +Obadiah=Ðвдий +Jonah=Иона +Micah=Михей +Nahum=Ðаум +Habakkuk=Ðввакум +Zephaniah=Ð¡Ð¾Ñ„Ð¾Ð½Ð¸Ñ +Haggai=Ðггей +Zechariah=Ð—Ð°Ñ…Ð°Ñ€Ð¸Ñ +Malachi=ÐœÐ°Ð»Ð°Ñ…Ð¸Ñ +Matthew=От ÐœÐ°Ñ‚Ñ„ÐµÑ +Mark=От Марка +Luke=От Луки +John=От Иоанна +Acts=ДеÑÐ½Ð¸Ñ +Romans=К РимлÑнам +I Corinthians=1. КоринфÑнам +II Corinthians=2. КоринфÑнам +Galatians=К Галатам +Ephesians=К ЕфеÑÑнам +Philippians=К Филиппийцам +Colossians=К КолоÑÑÑнам +I Thessalonians=1. ФеÑÑалоникийцам +II Thessalonians=2. ФеÑÑалоникийцам +I Timothy=1. Тимофею +II Timothy=2. Тимофею +Titus=К Титу +Philemon=К Филимону +Hebrews=К ЕвреÑм +James=Иакова +I Peter=1. Петра +II Peter=2. Петра +I John=1. Иоанна +II John=2. Иоанна +III John=3. Иоанна +Jude=Иуды +Revelation of John=Откровение + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1Ðœ=1 +1Ðœ.=1 +быт=1 +быт.=1 +Быт=1 +Быт.=1 +бытие=1 +Бытие=1 +2Ðœ=2 +2Ðœ.=2 +иÑÑ…=2 +иÑÑ….=2 +ИÑÑ…=2 +ИÑÑ….=2 +иÑход=2 +ИÑход=2 +3Ðœ=3 +3Ðœ.=3 +лев=3 +лев.=3 +Лев=3 +Лев.=3 +левит=3 +Левит=3 +4Ðœ=4 +4Ðœ.=4 +чиÑ=4 +чиÑ.=4 +ЧиÑ=4 +ЧиÑ.=4 +чиÑла=4 +ЧиÑла=4 +5Ðœ=5 +5Ðœ.=5 +втор=5 +втор.=5 +Втор=5 +Втор.=5 +Второзаконие=5 +ииÑ.нав.=6 +егошуи=6 +Егошуи=6 +ег=6 +ег.=6 +ииÑÑƒÑ Ð½Ð°Ð²Ð¸Ð½=6 +ИиÑÑƒÑ Ðавин=6 +Ñуд=7 +Ñуд.=7 +Ñудьи=7 +Судьи=7 +руф=8 +руф.=8 +руфь=8 +Руфь=8 + +1. ЦарÑтв=9 +1 ЦарÑтв=9 +1ЦарÑтв=9 +1цар=9 +1цар.=9 +1 цар=9 +1 цар.=9 +1Цар=9 +1Цар.=9 +1 Цар=9 +1 Цар.=9 + +2. ЦарÑтв=10 +2 ЦарÑтв=10 +2ЦарÑтв=10 +2цар=10 +2цар.=10 +2 цар=10 +2 цар.=10 +2Цар=10 +2Цар.=10 +2 Цар=10 +2 Цар.=10 + +3. ЦарÑтв=11 +3 ЦарÑтв=11 +3ЦарÑтв=11 +3цар=11 +3цар.=11 +3 цар=11 +3 цар.=11 +3Цар=11 +3Цар.=11 +3 Цар=11 +3 Цар.=11 + +4. ЦарÑтв=12 +4 ЦарÑтв=12 +4ЦарÑтв=12 +4цар=12 +4цар.=12 +4 цар=12 +4 цар.=12 +4Цар=12 +4Цар.=12 +4 Цар=12 +4 Цар.=12 + +1. Паралипоменон=13 +1 Паралипоменон=13 +1Паралипоменон=13 +1пар=13 +1пар.=13 +1 пар=13 +1 пар.=13 +1 Пар=13 +1 Пар.=13 + +2. Паралипоменон=14 +2 Паралипоменон=14 +2Паралипоменон=14 +2пар=14 +2пар.=14 +2 пар=14 +2 пар.=14 +2Пар=14 +2Пар.=14 +2 Пар=14 +2 Пар.=14 + +ездр=15 +ездр.=15 +Ездр=15 +Ездр.=15 +езд=15 +езд.=15 +Езд=15 +Езд.=15 +Ездра=15 +неем=16 +неем.=16 +Ðеем=16 +Ðеем.=16 +ÐеемиÑ=16 +еÑÑ„=17 +еÑÑ„.=17 +ЕÑÑ„=17 +ЕÑÑ„.=17 +ЕÑфирь=17 +иов=18 +иов.=18 +Иов=18 +пÑ=19 +пÑ.=19 +ПÑ=19 +ПÑ.=19 +ПÑалтирь=19 +прит=20 +прит.=20 +Прит=20 +Прит.=20 +Притчи=20 +еккл=21 +еккл.=21 +Еккл=21 +Еккл.=21 +ЕкклеÑиаÑÑ‚=21 +пеÑн=22 +пеÑн.=22 +ПеÑн=22 +ПеÑн.=22 +ПеÑÐ½Ñ ÐŸÐµÑней=22 +иÑ=23 +иÑ.=23 +ИÑ=23 +ИÑ.=23 +ИÑаиÑ=23 +иер=24 +иер.=24 +Иер=24 +Иер.=24 +ИеремиÑ=24 +плач=25 +плач.=25 +Плач=25 +Плач.=25 +Плач Иеремии=25 +иез=26 +иез.=26 +Иез=26 +Иез.=26 +Иезекииль=26 +дан=27 +дан.=27 +Дан=27 +Дан.=27 +Даниил=27 +оÑ=28 +оÑ.=28 +ОÑ=28 +ОÑ.=28 +ОÑиÑ=28 +иоил=29 +иоил.=29 +Иоил=29 +Иоил.=29 +Иоиль=29 +ам=30 +ам.=30 +Ðм=30 +Ðм.=30 +амоÑ=30 +ÐмоÑ=30 +авд.=31 +Ðвдий=31 +авд=31 +ион=32 +ион.=32 +Ион=32 +Ион.=32 +Иона=32 +мих=33 +мих.=33 +Мих=33 +Мих.=33 +Михей=33 +наум=34 +наум.=34 +Ðаум=34 +авв=35 +авв.=35 +Ðвв=35 +Ðвв.=35 +Ðввакум=35 +Ñоф=36 +Ñоф.=36 +Соф=36 +Соф.=36 +СофониÑ=36 +агг=37 +агг.=37 +Ðгг=37 +Ðгг.=37 +Ðггей=37 +зах=38 +зах.=38 +Зах=38 +Зах.=38 +ЗахариÑ=38 +мал=39 +мал.=39 +Мал=39 +Мал.=39 +МалахиÑ=39 +матф=40 +матф.=40 +мф=40 +мф.=40 +Мф=40 +Мф.=40 +От МатфеÑ=40 +мар=41 +мар.=41 +мк=41 +мк.=41 +Мк=41 +Мк.=41 +От Марка=41 +лук=42 +лук.=42 +лк=42 +лк.=42 +Лк=42 +Лк.=42 +От Луки=42 +иоан=43 +иоан.=43 +ин=43 +ин.=43 +Ин=43 +Ин.=43 +От Иоанна=43 +деÑн=44 +деÑн.=44 +ДеÑн=44 +ДеÑн.=44 +ДеÑниÑ=44 +рим=45 +рим.=45 +Рим=45 +Рим.=45 +К РимлÑнам=45 + +1. КоринфÑнам=46 +1 КоринфÑнам=46 +1КоринфÑнам=46 +1кор=46 +1кор.=46 +1 кор=46 +1 кор.=46 +1Кор=46 +1Кор.=46 +1 Кор=46 +1 Кор.=46 + +2. КоринфÑнам=47 +2 КоринфÑнам=47 +2КоринфÑнам=47 +2кор=47 +2кор.=47 +2 кор=47 +2 кор.=47 +2Кор=47 +2Кор.=47 +2 Кор=47 +2 Кор.=47 + +гал=48 +гал.=48 +Гал=48 +Гал.=48 +К Галатам=48 +еф=49 +еф.=49 +Еф=49 +Еф.=49 +К ЕфеÑÑнам=49 +фил=50 +фил.=50 +Фил=50 +Фил.=50 +флп=50 +флп.=50 +Флп=50 +Флп.=50 +К Филиппийцам=50 +К КолоÑÑÑнам=51 +кол=51 +кол.=51 +Кол=51 +Кол.=51 + +1. ФеÑÑалоникийцам=52 +1 ФеÑÑалоникийцам=52 +1ФеÑÑалоникийцам=52 +1феÑ=52 +1феÑ.=52 +1 феÑ=52 +1 феÑ.=52 +1 ФеÑ=52 +1 ФеÑ.=52 + +2. ФеÑÑалоникийцам=53 +2 ФеÑÑалоникийцам=53 +2ФеÑÑалоникийцам=53 +2феÑ=53 +2феÑ.=53 +2 феÑ=53 +2 феÑ.=53 +2ФеÑ=53 +2ФеÑ.=53 +2 ФеÑ=53 +2 ФеÑ.=53 + +1. Тимофею=54 +1 Тимофею=54 +1Тимофею=54 +1тим=54 +1тим.=54 +1 тим=54 +1 тим.=54 +1Тим=54 +1Тим.=54 +1 Тим=54 +1 Тим.=54 + +2. Тимофею=55 +2 Тимофею=55 +2Тимофею=55 +2тим=55 +2тим.=55 +2 тим=55 +2 тим.=55 +2Тим=55 +2Тим.=55 +2 Тим=55 +2 Тим.=55 + +К Титу=56 +тит=56 +тит.=56 +Тит=56 +Тит.=56 +флм=57 +флм.=57 +Флм=57 +Флм.=57 +К Филимону=57 +евр.=58 +евр=58 +Евр=58 +Евр.=58 +К ЕвреÑм=58 +иак=59 +иак.=59 +Иак=59 +Иак.=59 +иакова=59 +Иакова=59 + +1. Петра=60 +1 Петра=60 +1Петра=60 +1пет=60 +1пет.=60 +1 пет=60 +1 пет.=60 +1Пет=60 +1Пет.=60 +1 Пет=60 +1 Пет.=60 + +2. Петра=61 +2 Петра=61 +2Петра=61 +2пет=61 +2пет.=61 +2 пет=61 +2 пет.=61 +2Пет=61 +2Пет.=61 +2 Пет=61 +2 Пет.=61 + +1. Иоанна=62 +1 Иоанна=62 +1Иоанна=62 +1иоан=62 +1иоан.=62 +1ин=62 +1ин.=62 +1 ин=62 +1 ин.=62 +1Ин=62 +1Ин.=62 +1 Ин=62 +1 Ин.=62 + +2. Иоанна=63 +2 Иоанна=63 +2Иоанна=63 +2иоан=63 +2иоан.=63 +2ин=63 +2ин.=63 +2 ин=63 +2 ин.=63 +2Ин=63 +2Ин.=63 +2 Ин=63 +2 Ин.=63 + +3. Иоанна=64 +3 Иоанна=64 +3Иоанна=64 +3иоан=64 +3иоан.=64 +3ин=64 +3ин.=64 +3 ин=64 +3 ин.=64 +3Ин=64 +3Ин.=64 + +иуд=65 +иуд.=65 +Иуды=65 +откр=66 +откр.=66 +Откр=66 +Откр.=66 +Откровение=66 diff --git a/locales.d/sk-utf8.conf b/locales.d/sk-utf8.conf new file mode 100644 index 0000000..c81d34c --- /dev/null +++ b/locales.d/sk-utf8.conf @@ -0,0 +1,432 @@ +# +# Slovak Bible books for Sword. +# +# 2001/01/06 (c) zdpo@post.sk, GNU GPL 2.0. +# +# This locale was converted to Unicode by the Sword developers. +# + +[Meta] +Name=sk +Description=Slovak (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Genesis +Exodus=Exodus +Leviticus=Leviticus +Numbers=Numeri +Deuteronomy=Deuteronomium +Joshua=Jozue +Judges=Sudcov +Ruth=Rút +I Samuel=1 Samuelova +II Samuel=2 Samuelova +I Kings=1 Kráľovská +II Kings=2 Kráľovská +I Chronicles=1 Kronická +II Chronicles=2 Kronická +Ezra=Ezdráš +Nehemiah=Nehemiáš +Esther=Ester +Job=Jób +Psalms=Žalmy +Proverbs=Príslovie +Ecclesiastes=Kazateľ +Song of Solomon=Veľpieseň +Isaiah=Izaiáš +Jeremiah=Jeremiáš +Lamentations=PlaÄ Jeremiášov +Ezekiel=Ezechiel +Daniel=Daniel +Hosea=Hozeáš +Joel=Joel +Amos=Ãmos +Obadiah=Obadiáš +Jonah=Jonáš +Micah=Micheáš +Nahum=Náhum +Habakkuk=Habakuk +Zephaniah=Sofoniáš +Haggai=Hageus +Zechariah=Zachariáš +Malachi=Malachiáš +Matthew=Matúš +Mark=Marek +Luke=Lukáš +John=Ján +Acts=Skutky +Romans=Rimanom +I Corinthians=1 KorinÅ¥anom +II Corinthians=2 KorinÅ¥anom +Galatians=GalaÅ¥anom +Ephesians=Efezanom +Philippians=Filipanom +Colossians=Kolosanom +I Thessalonians=1 TesaloniÄanom +II Thessalonians=2 TesaloniÄanom +I Timothy=1 Timotejovi +II Timothy=2 Timotejovi +Titus=Títovi +Philemon=Filemonovi +Hebrews=Hebrejom +James=Jakubov +I Peter=1 Petrov +II Peter=2 Petrov +I John=1 Jánov +II John=2 Jánov +III John=3 Jánov +Jude=Júdov +Revelation of John=Zjavenie Jána + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + + + +GENESIS=1 +GN=1 +1M=1 +1 M=1 +EXODUS=2 +EX=2 +2M=2 +2 M=2 +LEVITICUS=3 +LV=3 +3M=3 +3 M=3 +NUMERI=4 +NU=4 +4M=4 +4 M=4 +DEUTERONOMIUM=5 +DT=5 +5M=5 +5 M=5 +JOZUE=6 +JOZ=6 +SUDCOV=7 +SUD=7 +RÚT=8 +RT=8 +1 SAMUELOVA=9 +1S=9 +1 S=9 +2 SAMUELOVA=10 +2S=10 +2 S=10 +1 KRÃĽOVSKÃ=11 +1KR=11 +1 KR=11 +2 KRÃĽOVSKÃ=12 +2KR=12 +2 KR=12 +1 KRONICKÃ=13 +1PA=13 +1 PA=13 +1 KRO=13 +2 KRONICKÃ=14 +2PA=14 +2 PA=14 +2 KRO=14 +EZDRÃÅ =15 +EZD=15 +NEHEMIÃÅ =16 +NEH=16 +ESTER=17 +EST=17 +JÓB=18 +JB=18 +ŽALMY=19 +Ž=19 +PRÃSLOVIE=20 +PR=20 +KAZATEĽ=21 +KAZ=21 +VEĽPIESEŇ=22 +PIE=22 +VEĽ=22 +IZAIÃÅ =23 +IZ=23 +JEREMIÃÅ =24 +JR=24 +PLAÄŒ JEREMIÃÅ OV=25 +PL=25 +EZECHIEL=26 +EZ=26 +DANIEL=27 +DN=27 +HOZEÃÅ =28 +OZ=28 +JOEL=29 +JL=29 +ÃMOS=30 +AM=30 +OBADIÃÅ =31 +OBA=31 +JONÃÅ =32 +JON=32 +MICHEÃÅ =33 +MI=33 +NÃHUM=34 +NA=34 +HABAKUK=35 +HAB=35 +SOFONIÃÅ =36 +SF=36 +HAGEUS=37 +HAG=37 +ZACHARIÃÅ =38 +ZA=38 +MALACHIÃÅ =39 +MAL=39 +MATÚŠ=40 +MT=40 +MAREK=41 +MK=41 +LUKÃÅ =42 +L=42 +JÃN=43 +J=43 +SKUTKY=44 +SK=44 +RIMANOM=45 +RIM=45 +1 KORINŤANOM=46 +1K=46 +1 K=46 +2 KORINŤANOM=47 +2K=47 +2 K=47 +GALAŤANOM=48 +GA=48 +EFEZANOM=49 +EF=49 +FILIPANOM=50 +FP=50 +KOLOSANOM=51 +KO=51 +1 TESALONIÄŒANOM=52 +1TE=52 +1 TE=52 +2 TESALONIÄŒANOM=53 +2TE=53 +2 TE=53 +1 TIMOTEJOVI=54 +1TM=54 +1 TM=54 +2 TIMOTEJOVI=55 +2TM=55 +2 TM=55 +TÃTOVI=56 +TIT=56 +FILEMONOVI=57 +FM=57 +HEBREJOM=58 +HE=58 +ŽD=58 +JAKUBOV=59 +JK=59 +1 PETROV=60 +1PT=60 +1 PT=60 +2 PETROV=61 +2PT=61 +2 PT=61 +1 JÃNOV=62 +1J=62 +1 J=62 +2 JÃNOV=63 +2J=63 +2 J=63 +3 JÃNOV=64 +3J=64 +3 J=64 +JÚDOV=65 +JÚ=65 +ZJAVENIE JÃNA=66 +ZJ=66 diff --git a/locales.d/sk.conf b/locales.d/sk.conf new file mode 100644 index 0000000..e8a9d84 --- /dev/null +++ b/locales.d/sk.conf @@ -0,0 +1,435 @@ +# +# Slovak Bible books for Sword. +# +# 2001/01/06 (c) zdpo@post.sk, GNU GPL 2.0. +# +# Notice: The locales name of slovak language is sk. For correct +# slovak environment you must set locales to "sk_SK" +# if you are using bash try this: +# export LC_ALL=sk_SK LANG=sk +# + +[Meta] +Name=sk +Description=Slovak +Encoding=ISO8859-2 + +[Text] +Genesis=Genesis +Exodus=Exodus +Leviticus=Leviticus +Numbers=Numeri +Deuteronomy=Deuteronomium +Joshua=Jozue +Judges=Sudcov +Ruth=Rút +I Samuel=1 Samuelova +II Samuel=2 Samuelova +I Kings=1 Kráµovská +II Kings=2 Kráµovská +I Chronicles=1 Kronická +II Chronicles=2 Kronická +Ezra=Ezdrá¹ +Nehemiah=Nehemiá¹ +Esther=Ester +Job=Jób +Psalms=®almy +Proverbs=Príslovie +Ecclesiastes=Kazateµ +Song of Solomon=Veµpieseò +Isaiah=Izaiá¹ +Jeremiah=Jeremiá¹ +Lamentations=Plaè Jeremiá¹ov +Ezekiel=Ezechiel +Daniel=Daniel +Hosea=Hozeá¹ +Joel=Joel +Amos=Ámos +Obadiah=Obadiá¹ +Jonah=Joná¹ +Micah=Micheá¹ +Nahum=Náhum +Habakkuk=Habakuk +Zephaniah=Sofoniá¹ +Haggai=Hageus +Zechariah=Zachariá¹ +Malachi=Malachiá¹ +Matthew=Matú¹ +Mark=Marek +Luke=Luká¹ +John=Ján +Acts=Skutky +Romans=Rimanom +I Corinthians=1 Korin»anom +II Corinthians=2 Korin»anom +Galatians=Gala»anom +Ephesians=Efezanom +Philippians=Filipanom +Colossians=Kolosanom +I Thessalonians=1 Tesalonièanom +II Thessalonians=2 Tesalonièanom +I Timothy=1 Timotejovi +II Timothy=2 Timotejovi +Titus=Títovi +Philemon=Filemonovi +Hebrews=Hebrejom +James=Jakubov +I Peter=1 Petrov +II Peter=2 Petrov +I John=1 Jánov +II John=2 Jánov +III John=3 Jánov +Jude=Júdov +Revelation of John=Zjavenie Jána + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + + + +GENESIS=1 +GN=1 +1M=1 +1 M=1 +EXODUS=2 +EX=2 +2M=2 +2 M=2 +LEVITICUS=3 +LV=3 +3M=3 +3 M=3 +NUMERI=4 +NU=4 +4M=4 +4 M=4 +DEUTERONOMIUM=5 +DT=5 +5M=5 +5 M=5 +JOZUE=6 +JOZ=6 +SUDCOV=7 +SUD=7 +RÚT=8 +RT=8 +1 SAMUELOVA=9 +1S=9 +1 S=9 +2 SAMUELOVA=10 +2S=10 +2 S=10 +1 KRÁµOVSKÁ=11 +1KR=11 +1 KR=11 +2 KRÁµOVSKÁ=12 +2KR=12 +2 KR=12 +1 KRONICKÁ=13 +1PA=13 +1 PA=13 +1 KRO=13 +2 KRONICKÁ=14 +2PA=14 +2 PA=14 +2 KRO=14 +EZDRÁ¹=15 +EZD=15 +NEHEMIÁ¹=16 +NEH=16 +ESTER=17 +EST=17 +JÓB=18 +JB=18 +®ALMY=19 +®=19 +PRÍSLOVIE=20 +PR=20 +KAZATEµ=21 +KAZ=21 +VEµPIESEÒ=22 +PIE=22 +VE¥=22 +IZAIÁ¹=23 +IZ=23 +JEREMIÁ¹=24 +JR=24 +PLAÈ JEREMIÁ¹OV=25 +PL=25 +EZECHIEL=26 +EZ=26 +DANIEL=27 +DN=27 +HOZEÁ¹=28 +OZ=28 +JOEL=29 +JL=29 +ÁMOS=30 +AM=30 +OBADIÁ¹=31 +OBA=31 +JONÁ¹=32 +JON=32 +MICHEÁ¹=33 +MI=33 +NÁHUM=34 +NA=34 +HABAKUK=35 +HAB=35 +SOFONIÁ¹=36 +SF=36 +HAGEUS=37 +HAG=37 +ZACHARIÁ¹=38 +ZA=38 +MALACHIÁ¹=39 +MAL=39 +MATÚ¹=40 +MT=40 +MAREK=41 +MK=41 +LUKÁ¹=42 +L=42 +JÁN=43 +J=43 +SKUTKY=44 +SK=44 +RIMANOM=45 +RIM=45 +1 KORIN»ANOM=46 +1K=46 +1 K=46 +2 KORIN»ANOM=47 +2K=47 +2 K=47 +GALA»ANOM=48 +GA=48 +EFEZANOM=49 +EF=49 +FILIPANOM=50 +FP=50 +KOLOSANOM=51 +KO=51 +1 TESALONIÈANOM=52 +1TE=52 +1 TE=52 +2 TESALONIÈANOM=53 +2TE=53 +2 TE=53 +1 TIMOTEJOVI=54 +1TM=54 +1 TM=54 +2 TIMOTEJOVI=55 +2TM=55 +2 TM=55 +TÍTOVI=56 +TIT=56 +FILEMONOVI=57 +FM=57 +HEBREJOM=58 +HE=58 +®D=58 +JAKUBOV=59 +JK=59 +1 PETROV=60 +1PT=60 +1 PT=60 +2 PETROV=61 +2PT=61 +2 PT=61 +1 JÁNOV=62 +1J=62 +1 J=62 +2 JÁNOV=63 +2J=63 +2 J=63 +3 JÁNOV=64 +3J=64 +3 J=64 +JÚDOV=65 +JÚ=65 +ZJAVENIE JÁNA=66 +ZJ=66 diff --git a/locales.d/sl.conf b/locales.d/sl.conf new file mode 100644 index 0000000..0ef3eac --- /dev/null +++ b/locales.d/sl.conf @@ -0,0 +1,438 @@ +[Meta] +Name=sl +Description=Slovenian +Encoding=ASCII + +[Text] +Genesis=Geneza +Exodus=Eksodus +Leviticus=Levitik +Numbers=Numeri +Deuteronomy=Devteronomij +Joshua=Jozue +Judges=Sodniki +Ruth=Ruta +I Samuel=1 Samuel +II Samuel=2 Samuel +I Kings=1 Kraljev +II Kings=2 Kraljev +I Chronicles=1 Kroniska +II Chronicles=2 Kroniska +Ezra=Ezra +Nehemiah=Nehemija +Esther=Estera +Job=Job +Psalms=Psalmi +Proverbs=Pregovori +Ecclesiastes=Pridigar +Song of Solomon=Visoka pesem +Isaiah=Izaija +Jeremiah=Jeremija +Lamentations=Zalostinke +Ezekiel=Ezekiel +Daniel=Daniel +Hosea=Ozej +Joel=Joel +Amos=Amos +Obadiah=Abdija +Jonah=Jona +Micah=Mihej +Nahum=Nahum +Habakkuk=Habakuk +Zephaniah=Sofonija +Haggai=Agej +Zechariah=Zaharija +Malachi=Malahija +Matthew=Matej +Mark=Marko +Luke=Luka +John=Janez +Acts=Dela +Romans=Rimljanom +I Corinthians=1 Korincanom +II Corinthians=2 Korincanom +Galatians=Galacanom +Ephesians=Efezanom +Philippians=Filipljanom +Colossians=Kolosanom +I Thessalonians=1 Tesalonicanom +II Thessalonians=2 Tesalonicanom +I Timothy=1 Timotej +II Timothy=2 Timotej +Titus=Tit +Philemon=Filemon +Hebrews=Hebrejcem +James=Jakob +I Peter=1 Peter +II Peter=2 Peter +I John=1 Janez +II John=2 Janez +III John=3 Janez +Jude=Juda +Revelation of John=Razodetje + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +GENEZA=1 +GEN=1 +1MZ=1 +1 MZ=1 +EKSODUS=2 +EXO=2 +2MZ=2 +2 MZ=2 +LEVITIK=3 +LEV=3 +3MZ=3 +3 MZ=3 +NUMERI=4 +NUM=4 +4MZ=4 +4 MZ=4 +DEVTERONOMIJ=5 +DEU=5 +5MZ=5 +5 MZ=5 +JOZUE=6 +JOZ=6 +SODNIKI=7 +SOD=7 +RUTA=8 +RUT=8 +1SAMUEL=9 +1 SAMUEL=9 +1SAM=9 +1 SAM=9 +2SAMUEL=10 +2 SAMUEL=10 +2SAM=10 +2 SAM=10 +1KRALJEV=11 +1 KRALJEV=11 +1KR=11 +1 KR=11 +2KRALJEV=12 +2 KRALJEV=12 +2KR=12 +2 KR=12 +1KRONISKA=13 +1 KRONISKA=13 +1KRN=13 +1 KRN=13 +2KRONISKA=14 +2 KRONISKA=14 +2KRN=14 +2 KRN=14 +EZRA=15 +EZR=15 +NEHEMIJA=16 +NEH=16 +ESTERA=17 +EST=17 +JOB=18 +PSALMI=19 +PS=19 +PREGOVORI=20 +PRG=20 +PRIDIGAR=21 +PRD=21 +VISOKA PESEM=22 +VP=22 +IZAIJA=23 +IZ=23 +JEREMIJA=24 +JER=24 +ZALOSTINKE=25 +ZAL=25 +EZEKIEL=26 +EZK=26 +DANIEL=27 +DAN=27 +OZEJ=28 +OZ=28 +JOEL=29 +JL=29 +AMOS=30 +AM=30 +ABDIJA=31 +ABD=31 +JONA=32 +JON=32 +MIHEJ=33 +MIH=33 +NAHUM=34 +NAH=34 +HABAKUK=35 +HAB=35 +SOFONIJA=36 +SOF=36 +AGEJ=37 +AG=37 +ZAHARIJA=38 +ZAH=38 +MALAHIJA=39 +MAL=39 +MATEJ=40 +MT=40 +MARKO=41 +MR=41 +LUKA=42 +LK=42 +JANEZ=43 +JN=43 +APOSTOLSKA DELA=44 +DELA=44 +APD=44 +RIMLJANOM=45 +RIM=45 +1KORINCANOM=46 +1 KORINCANOM=46 +1KOR=46 +1 KOR=46 +2KORINCANOM=47 +2 KORINCANOM=47 +2KOR=47 +2 KOR=47 +GALACANOM=48 +GAL=48 +EFEZANOM=49 +EF=49 +FILIPLJANOM=50 +FLP=50 +KOLOSANOM=51 +KOL=51 +1TESALONICANOM=52 +1 TESALONICANOM=52 +1TES=52 +1 TES=52 +2TESALONICANOM=53 +2 TESALONICANOM=53 +2TES=53 +2 TES=53 +1TIMOTEJ=54 +1 TIMOTEJ=54 +1TIM=54 +1 TIM=54 +2TIMOTEJ=55 +2 TIMOTEJ=55 +2TIM=55 +2 TIM=55 +TIT=56 +FILEMON=57 +FLM=57 +HEBREJCEM=58 +HEB=58 +JAKOB=59 +JAK=59 +1PETER=60 +1 PETER=60 +1PET=60 +1 PET=60 +1PT=60 +1 PT=60 +2PETER=61 +2 PETER=61 +2PET=61 +2 PET=61 +2PT=61 +2 PT=61 +1JANEZ=62 +1 JANEZ=62 +1JN=62 +1 JN=62 +2JANEZ=63 +2 JANEZ=63 +2JN=63 +2 JN=63 +3JANEZ=64 +3 JANEZ=64 +3JN=64 +3 JN=64 +JUDA=65 +JUD=65 +RAZODETJE=66 +RAZ=66 diff --git a/locales.d/sv-utf8.conf b/locales.d/sv-utf8.conf new file mode 100644 index 0000000..bd1bae2 --- /dev/null +++ b/locales.d/sv-utf8.conf @@ -0,0 +1,529 @@ +[Meta] +Name=sv +Description=Swedish (Unicode) +Encoding=UTF-8 + + +[Text] +Genesis=1. Mosebok +Exodus=2. Mosebok +Leviticus=3. Mosebok +Numbers=4. Mosebok +Deuteronomy=5. Mosebok +Joshua=Josua +Judges=Domarboken +Ruth=Rut +I Samuel=1. Samuelsboken +II Samuel=2. Samuelsboken +I Kings=1. Kungaboken +II Kings=2. Kungaboken +I Chronicles=1. Krönikeboken +II Chronicles=2. Krönikeboken +Ezra=Esra +Nehemiah=Nehemja +Esther=Ester +Job=Job +Psalms=Psaltaren +Proverbs=OrdsprÃ¥ksboken +Ecclesiastes=Predikaren +Song of Solomon=Höga Visan +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Klagovisorna +Ezekiel=Hesekiel +Daniel=Daniel +Hosea=Hosea +Joel=Joel +Amos=Amos +Obadiah=Obadja +Jonah=Jona +Micah=Mika +Nahum=Nahum +Habakkuk=Habackuk +Zephaniah=Sefanja +Haggai=Haggai +Zechariah=Sakarja +Malachi=Malaki +Matthew=Matteus +Mark=Markus +Luke=Lukas +John=Johannes +Acts=Apostlagärningarna +Romans=Romarbrevet +I Corinthians=1. Korintierbrevet +II Corinthians=2. Korintierbrevet +Galatians=Galaterbrevet +Ephesians=Efesierbrevet +Philippians=Filipperbrevet +Colossians=Kolosserbrevet +I Thessalonians=1. Tessalonikerbrevet +II Thessalonians=2. Tessalonikerbrevet +I Timothy=1. Timoteusbrevet +II Timothy=2. Timoteusbrevet +Titus=Brevet till Titus +Philemon=Brevet till Filemon +Hebrews=Hebreerbrevet +James=Jakobs brev +I Peter=1. Petrusbrevet +II Peter=2. Petrusbrevet +I John=1. Johannesbrevet +II John=2. Johannesbrevet +III John=3. Johannesbrevet +Jude=Judas brev +Revelation of John=Uppenbarelseboken + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOSEBOK=1 +1 MOSEBOK=1 + +2. MOSEBOK=2 +2 MOSEBOK=2 + +3. MOSEBOK=3 +3 MOSEBOK=3 + +4. MOSEBOK=4 +4 MOSEBOK=4 + +5. MOSEBOK=5 +5 MOSEBOK=5 + +JOSUA=6 +DOMARBOKEN=7 +RUT=8 + +1. SAMUELSBOKEN=9 +1 SAMUELSBOKEN=9 + +2. SAMUELSBOKEN=10 +2 SAMUELSBOKEN=10 + +1. KUNGABOKEN=11 +1 KUNGABOKEN=11 + +2. KUNGABOKEN=12 +2 KUNGABOKEN=12 + +1. KRÖNIKEBOKEN=13 +1 KRÖNIKEBOKEN=13 + +2. KRÖNIKEBOKEN=14 +2 KRÖNIKEBOKEN=14 + +ESRA=15 +NEHEMJA=16 +ESTER=17 +JOB=18 +PSALTAREN=19 +ORDSPRÃ…KSBOKEN=20 +PREDIKAREN=21 +HÖGA VISAN=22 +JESAJA=23 +JEREMIA=24 +KLAGOVISORNA=25 +HESEKIEL=26 +DANIEL=27 +HOSEA=28 +JOEL=29 +AMOS=30 +OBADJA=31 +JONA=32 +MIKA=33 +NAAHUM=34 +HABACKUK=35 +SEFANJA=36 +HAGGAI=37 +SAKARJA=38 +MALAKI=39 +MATTEUS=40 +MARKUS=41 +LUKAS=42 +JOHANNES=43 +APOSTLAGÄRNINGARNA=44 +ROMARBREVET=45 + +1. KORINTIERBREVET=46 +1 KORINTIERBREVET=46 + +2. KORINTIERBREVET=47 +2 KORINTIERBREVET=47 + +GALATERBREVET=48 +EFESIERBREVET=49 +FILIPPERBREVET=50 +KOLOSSERBREVET=51 + +1. TESSALONIKERBREVET=52 +1 TESSALONIKERBREVET=52 + +2. TESSALONIKERBREVET=53 +2 TESSALONIKERBREVET=53 + +1. TIMOTEUSBREVET=54 +1 TIMOTEUSBREVET=54 + +2. TIMOTEUSBREVET=55 +2 TIMOTEUSBREVET=55 + +BREVET TILL TITUS=56 +BREVET TILL FILEMON=57 +HEBREERBREVET=58 +JAKOBS BREV=59 + +1. PETRUSBREVET=60 +1 PETRUSBREVET=60 + +2. PETRUSBREVET=61 +2 PETRUSBREVET=61 + +1. JOHANNESBREVET=62 +1 JOHANNESBREVET=62 + +2. JOHANNESBREVET=63 +2 JOHANNESBREVET=63 + +3. JOHANNESBREVET=64 +3 JOHANNESBREVET=64 + +JUDAS BREV=65 +UPPENBARELSEBOKEN=66 +1. MOS=1 +1.MOS=1 +1 MOS=1 +1MOS=1 +2. MOS=2 +2.MOS=2 +2 MOS=2 +2MOS=2 +3. MOS=3 +3.MOS=3 +3 MOS=3 +3MOS=3 +4. MOS=4 +4.MOS=4 +4 MOS=4 +4MOS=4 +5. MOS=5 +5.MOS=5 +5 MOS=5 +5MOS=5 +JOS=6 +RUT=8 +DOM=7 +1. SAM=9 +1.SAM=9 +1 SAM=9 +1SAM=9 +2. SAM=10 +2.SAM=10 +2 SAM=10 +2SAM=10 +1. KUNG=11 +1.KUNG=11 +1 KUNG=11 +1KUNG=11 +2. KUNG=12 +2.KUNG=12 +2 KUNG=12 +2KUNG=12 +1. KRÖN=13 +1.KRÖN=13 +1 KRÖN=13 +1KRÖN=13 +2. KRÖN=14 +2.KRÖN=14 +2 KRÖN=14 +2KRÖN=14 +NEH=16 +EST=17 +PS=19 +ORDS=20 +PRED=21 +HÖGAV=22 +HÖGAV.=22 +HÖGA V=22 +HÖGA V.=22 +HÖG V=22 +HÖG. V=22 +HÖG. V.=22 +HÖG V.=22 +HV=22 +H.V=22 +H.V.=22 +H V.=22 +H V=22 +HÖGA VISAN=22 +JES=23 +JER=24 +KLAG=25 +HES=26 +DAN=27 +HOS=28 +JOEL=29 +AM=30 +AMOS=30 +OB=31 +JONA=32 +MIK=33 +MIKA=33 +NAH=34 +HAB=35 +SEF=36 +HAGG=37 +SAK=38 +MAL=39 +MATT=40 +MARK=41 +LUK=42 +JOH=43 +APG=44 +AP=44 +ROM=45 +1. KOR=46 +1.KOR=46 +1 KOR=46 +1KOR=46 +2. KOR=47 +2.KOR=47 +2 KOR=47 +2KOR=47 +GAL=48 +EF=49 +FIL=50 +KOL=51 +1. TESS=52 +1.TESS=52 +1 TESS=52 +1TESS=52 +2. TESS=53 +2.TESS=53 +2 TESS=53 +2TESS=53 +1. THESS=52 +1.THESS=52 +1 THESS=52 +1THESS=52 +2. THESS=53 +2.THESS=53 +2 THESS=53 +2THESS=53 +1. TIM=54 +1.TIM=54 +1 TIM=54 +1TIM=54 +2. TIM=55 +2.TIM=55 +2 TIM=55 +2TIM=55 +TIT=56 +FILEM=57 +HEBR=58 +JAK=59 +1. PET=60 +1.PET=60 +1 PET=60 +1PET=60 +2. PET=61 +2.PET=61 +2 PET=61 +2PET=61 +1. JOH=62 +1.JOH=62 +1 JOH=62 +1JOH=62 +2. JOH=63 +2.JOH=63 +2 JOH=63 +2JOH=63 +3. JOH=64 +3.JOH=64 +3 JOH=64 +3JOH=64 +JUD=65 +UPP=66 + diff --git a/locales.d/sv.conf b/locales.d/sv.conf new file mode 100644 index 0000000..a64f67c --- /dev/null +++ b/locales.d/sv.conf @@ -0,0 +1,527 @@ +[Meta] +Name=sv +Description=Swedish + +[Text] +Genesis=1. Mosebok +Exodus=2. Mosebok +Leviticus=3. Mosebok +Numbers=4. Mosebok +Deuteronomy=5. Mosebok +Joshua=Josua +Judges=Domarboken +Ruth=Rut +I Samuel=1. Samuelsboken +II Samuel=2. Samuelsboken +I Kings=1. Kungaboken +II Kings=2. Kungaboken +I Chronicles=1. Krönikeboken +II Chronicles=2. Krönikeboken +Ezra=Esra +Nehemiah=Nehemja +Esther=Ester +Job=Job +Psalms=Psaltaren +Proverbs=Ordspråksboken +Ecclesiastes=Predikaren +Song of Solomon=Höga Visan +Isaiah=Jesaja +Jeremiah=Jeremia +Lamentations=Klagovisorna +Ezekiel=Hesekiel +Daniel=Daniel +Hosea=Hosea +Joel=Joel +Amos=Amos +Obadiah=Obadja +Jonah=Jona +Micah=Mika +Nahum=Nahum +Habakkuk=Habackuk +Zephaniah=Sefanja +Haggai=Haggai +Zechariah=Sakarja +Malachi=Malaki +Matthew=Matteus +Mark=Markus +Luke=Lukas +John=Johannes +Acts=Apostlagärningarna +Romans=Romarbrevet +I Corinthians=1. Korintierbrevet +II Corinthians=2. Korintierbrevet +Galatians=Galaterbrevet +Ephesians=Efesierbrevet +Philippians=Filipperbrevet +Colossians=Kolosserbrevet +I Thessalonians=1. Tessalonikerbrevet +II Thessalonians=2. Tessalonikerbrevet +I Timothy=1. Timoteusbrevet +II Timothy=2. Timoteusbrevet +Titus=Brevet till Titus +Philemon=Brevet till Filemon +Hebrews=Hebreerbrevet +James=Jakobs brev +I Peter=1. Petrusbrevet +II Peter=2. Petrusbrevet +I John=1. Johannesbrevet +II John=2. Johannesbrevet +III John=3. Johannesbrevet +Jude=Judas brev +Revelation of John=Uppenbarelseboken + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +1. MOSEBOK=1 +1 MOSEBOK=1 + +2. MOSEBOK=2 +2 MOSEBOK=2 + +3. MOSEBOK=3 +3 MOSEBOK=3 + +4. MOSEBOK=4 +4 MOSEBOK=4 + +5. MOSEBOK=5 +5 MOSEBOK=5 + +JOSUA=6 +DOMARBOKEN=7 +RUT=8 + +1. SAMUELSBOKEN=9 +1 SAMUELSBOKEN=9 + +2. SAMUELSBOKEN=10 +2 SAMUELSBOKEN=10 + +1. KUNGABOKEN=11 +1 KUNGABOKEN=11 + +2. KUNGABOKEN=12 +2 KUNGABOKEN=12 + +1. KRÖNIKEBOKEN=13 +1 KRÖNIKEBOKEN=13 + +2. KRÖNIKEBOKEN=14 +2 KRÖNIKEBOKEN=14 + +ESRA=15 +NEHEMJA=16 +ESTER=17 +JOB=18 +PSALTAREN=19 +ORDSPRÅKSBOKEN=20 +PREDIKAREN=21 +HÖGA VISAN=22 +JESAJA=23 +JEREMIA=24 +KLAGOVISORNA=25 +HESEKIEL=26 +DANIEL=27 +HOSEA=28 +JOEL=29 +AMOS=30 +OBADJA=31 +JONA=32 +MIKA=33 +NAAHUM=34 +HABACKUK=35 +SEFANJA=36 +HAGGAI=37 +SAKARJA=38 +MALAKI=39 +MATTEUS=40 +MARKUS=41 +LUKAS=42 +JOHANNES=43 +APOSTLAGÄRNINGARNA=44 +ROMARBREVET=45 + +1. KORINTIERBREVET=46 +1 KORINTIERBREVET=46 + +2. KORINTIERBREVET=47 +2 KORINTIERBREVET=47 + +GALATERBREVET=48 +EFESIERBREVET=49 +FILIPPERBREVET=50 +KOLOSSERBREVET=51 + +1. TESSALONIKERBREVET=52 +1 TESSALONIKERBREVET=52 + +2. TESSALONIKERBREVET=53 +2 TESSALONIKERBREVET=53 + +1. TIMOTEUSBREVET=54 +1 TIMOTEUSBREVET=54 + +2. TIMOTEUSBREVET=55 +2 TIMOTEUSBREVET=55 + +BREVET TILL TITUS=56 +BREVET TILL FILEMON=57 +HEBREERBREVET=58 +JAKOBS BREV=59 + +1. PETRUSBREVET=60 +1 PETRUSBREVET=60 + +2. PETRUSBREVET=61 +2 PETRUSBREVET=61 + +1. JOHANNESBREVET=62 +1 JOHANNESBREVET=62 + +2. JOHANNESBREVET=63 +2 JOHANNESBREVET=63 + +3. JOHANNESBREVET=64 +3 JOHANNESBREVET=64 + +JUDAS BREV=65 +UPPENBARELSEBOKEN=66 +1. MOS=1 +1.MOS=1 +1 MOS=1 +1MOS=1 +2. MOS=2 +2.MOS=2 +2 MOS=2 +2MOS=2 +3. MOS=3 +3.MOS=3 +3 MOS=3 +3MOS=3 +4. MOS=4 +4.MOS=4 +4 MOS=4 +4MOS=4 +5. MOS=5 +5.MOS=5 +5 MOS=5 +5MOS=5 +JOS=6 +RUT=8 +DOM=7 +1. SAM=9 +1.SAM=9 +1 SAM=9 +1SAM=9 +2. SAM=10 +2.SAM=10 +2 SAM=10 +2SAM=10 +1. KUNG=11 +1.KUNG=11 +1 KUNG=11 +1KUNG=11 +2. KUNG=12 +2.KUNG=12 +2 KUNG=12 +2KUNG=12 +1. KRÖN=13 +1.KRÖN=13 +1 KRÖN=13 +1KRÖN=13 +2. KRÖN=14 +2.KRÖN=14 +2 KRÖN=14 +2KRÖN=14 +NEH=16 +EST=17 +PS=19 +ORDS=20 +PRED=21 +HÖGAV=22 +HÖGAV.=22 +HÖGA V=22 +HÖGA V.=22 +HÖG V=22 +HÖG. V=22 +HÖG. V.=22 +HÖG V.=22 +HV=22 +H.V=22 +H.V.=22 +H V.=22 +H V=22 +HÖGA VISAN=22 +JES=23 +JER=24 +KLAG=25 +HES=26 +DAN=27 +HOS=28 +JOEL=29 +AM=30 +AMOS=30 +OB=31 +JONA=32 +MIK=33 +MIKA=33 +NAH=34 +HAB=35 +SEF=36 +HAGG=37 +SAK=38 +MAL=39 +MATT=40 +MARK=41 +LUK=42 +JOH=43 +APG=44 +AP=44 +ROM=45 +1. KOR=46 +1.KOR=46 +1 KOR=46 +1KOR=46 +2. KOR=47 +2.KOR=47 +2 KOR=47 +2KOR=47 +GAL=48 +EF=49 +FIL=50 +KOL=51 +1. TESS=52 +1.TESS=52 +1 TESS=52 +1TESS=52 +2. TESS=53 +2.TESS=53 +2 TESS=53 +2TESS=53 +1. THESS=52 +1.THESS=52 +1 THESS=52 +1THESS=52 +2. THESS=53 +2.THESS=53 +2 THESS=53 +2THESS=53 +1. TIM=54 +1.TIM=54 +1 TIM=54 +1TIM=54 +2. TIM=55 +2.TIM=55 +2 TIM=55 +2TIM=55 +TIT=56 +FILEM=57 +HEBR=58 +JAK=59 +1. PET=60 +1.PET=60 +1 PET=60 +1PET=60 +2. PET=61 +2.PET=61 +2 PET=61 +2PET=61 +1. JOH=62 +1.JOH=62 +1 JOH=62 +1JOH=62 +2. JOH=63 +2.JOH=63 +2 JOH=63 +2JOH=63 +3. JOH=64 +3.JOH=64 +3 JOH=64 +3JOH=64 +JUD=65 +UPP=66 + diff --git a/locales.d/th-utf8.conf b/locales.d/th-utf8.conf new file mode 100644 index 0000000..5cabfd1 --- /dev/null +++ b/locales.d/th-utf8.conf @@ -0,0 +1,357 @@ +[Meta] +Name=th +Description=Thai (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=ปà¸à¸¡à¸à¸²à¸¥ + +Exodus=อพยพ + +Leviticus=เลวีนิติ +Numbers=à¸à¸±à¸™à¸”ารวิถี +Deuteronomy=เฉลยธรรมบัà¸à¸à¸±à¸•à¸´ +Joshua=โยชูวา +Judges=ผู้วินิจฉัย +Ruth=นางรูธ +I Samuel=1 ซามูเอล +II Samuel=2 ซามูเอล +I Kings=1 พงศ์à¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ +II Kings=2 พงศ์à¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ +I Chronicles=1 พงศาวดาร +II Chronicles=2 พงศาวดาร +Ezra=เอสรา +Nehemiah=เนหมีย์ +Esther=เอสเธอร์ +Job=โยบ +Psalms=สดุดี +Proverbs=สุภาษิต +Ecclesiastes=ปัà¸à¸à¸²à¸ˆà¸²à¸£à¸¢à¹Œ +Song of Solomon=เพลงซาโลมอน +Isaiah=อิสยาห์ +Jeremiah=เยเรมีย์ +Lamentations=บทเพลงคร่ำครวภ+Ezekiel=เอเสเคียล +Daniel=ดาเนียล +Hosea=โฮเชยา +Joel=โยเอล +Amos=อาโมส +Obadiah=โอบาดีห์ +Jonah=โยนาห์ +Micah=มีคาห์ +Nahum=นาฮูม +Habakkuk=ฮาบาà¸à¸¸à¸ +Zephaniah=เศฟันยาห์ +Haggai=ฮัà¸à¸à¸±à¸¢ +Zechariah=เศคาริยาห์ +Malachi=มาลาคี +Matthew=มัทธิว +Mark=มาระโภ+Luke=ลูà¸à¸² +John=ยอห์น +Acts=à¸à¸´à¸ˆà¸à¸²à¸£ +Romans=โรม +I Corinthians=1 โครินธ์ +II Corinthians=2 โครินธ์ +Galatians=à¸à¸²à¸¥à¸²à¹€à¸—ีย +Ephesians=เอเฟซัส +Philippians=ฟีลิปปี +Colossians=โคโลสี +I Thessalonians=1 เธสะโลนิà¸à¸² +II Thessalonians=2 เธสะโลนิà¸à¸² +I Timothy=1 ทิโมธี +II Timothy=2 ทิโมธี +Titus=ทิตัส +Philemon=ฟีเลโมน +Hebrews=ฮีบรู +James=ยาà¸à¸­à¸š +I Peter=1 เปโตร +II Peter=2 เปโตร +I John=1 ยอห์น +II John=2 ยอห์น +III John=3 ยอห์น +Jude=ยูดาห์ +Revelation of John=วิวรณ์ + +[Book Abbrevs] +ปà¸à¸¡à¸à¸²à¸¥=1 +ปà¸à¸=1 +อพยพ=2 +อพย=2 +เลวีนิติ=3 +ลนต=3 +à¸à¸±à¸™à¸”ารวิถี=4 +à¸à¸”ว=4 +เฉลยธรรมบัà¸à¸à¸±à¸•à¸´=5 + +ฉธบ=5 +โยชูวา=6 + +ยชว=6 +ผู้วินิจฉัย=7 +วนฉ=7 +นางรูธ=8 +นรธ=8 +1 ซามูเอล=9 +1ซมอ=9 +2 ซามูเอล=10 +2ซมอ=10 +1 พงศ์à¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ=11 +1พà¸à¸©=11 +2 พงศ์à¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œ=12 +2พà¸à¸©=12 +1 พงศาวดาร=13 +1พศด=13 +2 พงศาวดาร=14 +2พศด=14 +เอสรา=15 +อสร=15 +เนหมีย์=16 +นหม=16 +เอสเธอร์=17 +อสธ=17 +โยบ=18 +สดุดี=19 +สดด=19 +สุภาษิต=20 +สภษ=20 +ปัà¸à¸à¸²à¸ˆà¸²à¸£à¸¢à¹Œ=21 +ปà¸à¸ˆ=21 +เพลงซาโลมอน=22 +พซม=22 +อิสยาห์=23 +อสย=23 +เยเรมีย์=24 +ยรม=24 +บทเพลงคร่ำครวà¸=25 +พคค=25 +เอเสเคียล=26 +อสค=26 +ดาเนียล=27 +ดนล=27 +โฮเชยา=28 +ฮชย=28 +โยเอล=29 +ยอล=29 +อาโมส=30 +อมส=30 +โอบาดีห์=31 +อบด=31 +โยนาห์=32 +ยนา=32 +มีคาห์=33 +มคา=33 +นาฮูม=34 +นฮม=34 +ฮาบาà¸à¸¸à¸=35 +ฮบà¸=35 +เศฟันยาห์=36 +ศฟย=36 +ฮัà¸à¸à¸±à¸¢=37 +ฮà¸à¸=37 +เศคาริยาห์=38 +ศคย=38 +มาลาคี=39 +มลค=39 +มัทธิว=40 +มธ=40 +มาระโà¸=41 +มà¸=41 +ลูà¸à¸²=42 +ลà¸=42 +ยอห์น=43 +ยน=43 +à¸à¸´à¸ˆà¸à¸²à¸£=44 +à¸à¸ˆ=44 +โรม=45 +รม=45 +1 โครินธ์=46 +1คร=46 +2 โครินธ์=47 +2คร=47 +à¸à¸²à¸¥à¸²à¹€à¸—ีย=48 +à¸à¸—=48 +เอเฟซัส=49 +อฟ=49 +ฟีลิปปี=50 +ฟป=50 +โคโลสี=51 +คส=51 +1 เธสะโลนิà¸à¸²=52 +1ธส=52 +2 เธสะโลนิà¸à¸²=53 +2ธส=53 +1 ทิโมธี=54 +1ทธ=54 +2 ทิโมธี=55 +2ทธ=55 +ทิตัส=56 +ทต=56 +ฟีเลโมน=57 +ฟม=57 +ฮีบรู=58 +ฮบ=58 +ยาà¸à¸­à¸š=59 +ยà¸=59 +1 เปโตร=60 +1ปต=60 +2 เปโตร=61 +2ปต=61 +1 ยอห์น=62 +1ยน=62 +2 ยอห์น=63 +2ยน=63 +3 ยอห์น=64 +3ยน=64 +ยูดาห์=65 +ยด=65 +วิวรณ์=66 +วว=66 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JOHN=62 +1 KINGS=11 +1 PETER=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1CHRONICLES=13 +1CH=13 +1CORINTHIANS=46 +1CO=46 +1JN=62 +1JOHN=62 +1KI=11 +1KINGS=11 +1PE=60 +1PETER=60 +1SA=9 +1SAMUEL=9 +1THESSALONIANS=52 +1TH=52 +1TI=54 +1TIMOTHY=54 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JOHN=63 +2 KINGS=12 +2 PETER=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2CHRONICLES=14 +2CH=14 +2CORINTHIANS=47 +2CO=47 +2JN=63 +2JOHN=63 +2KI=12 +2KINGS=12 +2PE=61 +2PETER=61 +2SA=10 +2SAMUEL=10 +2THESSALONIANS=53 +2TH=53 +2TI=55 +2TIMOTHY=55 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AC=44 +AM=30 +AMOS=30 +COLOSSIANS=51 +COL=51 +DA=27 +DANIEL=27 +DEUTERONOMY=5 +DE=5 +ECCLESIASTES=21 +ECC=21 +EPHESIANS=49 +EPH=40 +EST=17 +ESTHER=17 +EXODUS=2 +EX=2 +EZEKIEL=26 +EZE=26 +EZR=15 +EZRA=15 +GAL=48 +GALATIANS=48 +GENESIS=1 +GE=1 +HAB=35 +HABAKKUK=35 +HAG=37 +HAGGAI=37 +HEBREWS=58 +HEB=58 +HOS=28 +HOSEA=28 +ISA=23 +ISAIAH=23 +JAMES=59 +JAS=59 +JEREMIAH=24 +JER=24 +JOB=18 +JOEL=29 +JOHN=43 +JN=43 +JONAH=32 +JNH=32 +JOSHUA=6 +JOS=6 +JUD=7 +JUDE=65 +JUDGES=7 +JDG=7 +LAMENTATIONS=25 +LA=25 +LEVITICUS=3 +LEV=3 +LK=42 +LUKE=42 +MAL=39 +MALACHI=39 +MARK=41 +MK=41 +MT=40 +MATTHEW=40 +MICAH=33 +MIC=33 +NA=34 +NAHUM=34 +NE=16 +NEHEMIAH=16 +NUMBERS=4 +NU=4 +OBADIAH=31 +OB=31 +PHILEMON=57 +PHM=57 +PHILIPPIANS=50 +PHP=50 +PROVERBS=20 +PR=20 +PSALMS=19 +PS=19 +REVELATION=66 +REV=66 +RO=45 +ROMANS=45 +RU=8 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SS=22 +TIT=56 +TITUS=56 +ZECHARIAH=38 +ZEC=38 +ZEPHANIAH=36 +ZEP=36 \ No newline at end of file diff --git a/locales.d/uk_UA-cp1251.conf b/locales.d/uk_UA-cp1251.conf new file mode 100755 index 0000000..094f870 --- /dev/null +++ b/locales.d/uk_UA-cp1251.conf @@ -0,0 +1,739 @@ +# Ukrainian BIBLE +# Á²ÁË²ß àáî ÊÍÈÃÈ ÑÂßÒÎÃÎ ÏÈÑÜÌÀ ÑÒÀÐÎÃÎ É ÍÎÂÎÃÎ ÇÀÏβÒÓ +# Ïðàöþº ï³ä Linux ³ Windows âåðñ³¿ ïðîåêòó SWORD +# Pavlo Bohmat bohm@ukr.net + +[Meta] +Name=uk_UA-cp1251 +Description=Ukrainian (cp1251) +Encoding=CP1251 + +[Text] +Genesis=Áóòòÿ +Exodus=Âèõ³ä +Leviticus=Ëåâèò +Numbers=×èñëà +Deuteronomy=Ïîâòîðåííÿ Çàêîíó +Joshua=²ñóñ Íàâèí +Judges=Ñóää³â +Ruth=Ðóò +I Samuel=1. Ñàìó¿ëà +II Samuel=2. Ñàìó¿ëà +I Kings=1. Öàð³â +II Kings=2. Öàð³â +I Chronicles=1. Õðîí³êè +II Chronicles=2. Õðîí³êè +Ezra=Åçäðè +Nehemiah=Íåå쳿 +Esther=Eñòåð +Job=Éîâà +Psalms=Ïñàëì³â +Proverbs=Ïðèïîâ³ñòåé +Ecclesiastes=Åêêëåç³ÿñò +Song of Solomon=ϳñíÿ íàä ï³ñíÿìè +Isaiah=²ñà¿ +Jeremiah=ªðå쳿 +Lamentations=Ïëà÷ ªðå쳿 +Ezekiel=ªçå곿ëÿ +Daniel=Äàíè¿ëà +Hosea=Îñ³¿ +Joel=Éî³ëà +Amos=Aìîñà +Obadiah=Îâä³ÿ +Jonah=Éîíè +Micah=Mèõåÿ +Nahum=Íàóìà +Habakkuk=Àâàêóìà +Zephaniah=Ñîôîí³¿ +Haggai=Îã³ÿ +Zechariah=Çàõàð³ÿ +Malachi=Ìàëàõ³¿ +Matthew=Ìàòâ³ÿ +Mark=Ìàðêà +Luke=Ëóêè +John=²âàíà +Acts=ij¿ +Romans=Ðèìëÿí +I Corinthians=1. Êîðèíòÿí +II Corinthians=2. Êîðèíòÿí +Galatians=Ãàëàò³â +Ephesians=Åôåñÿí +Philippians=Ôèëèï'ÿí +Colossians=Êîëîñÿí +I Thessalonians=1. Ñîëóíÿí +II Thessalonians=2. Ñîëóíÿí +I Timothy=1. Òèìîô³ÿ +II Timothy=2. Òèìîô³ÿ +Titus=Òèòà +Philemon=Ôèëèìîíà +Hebrews=ªâðå¿â +James=ßêîâà +I Peter=1. Ïåòðà +II Peter=2. Ïåòðà +I John=1. ²âàíà +II John=2. ²âàíà +III John=3. ²âàíà +Jude=Þäè +Revelation of John=Îá'ÿâëåííÿ + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +Áóòòÿ=1 +Âèõ³ä=2 +Ëåâèò=3 +×èñëà=4 +Ïîâòîðåííÿ Çàêîíó=5 +²ñóñ Íàâèí=6 +Ñóää³â=7 +Ðóò=8 + +1. Ñàìó¿ëà=9 +1 Ñàìó¿ëà=9 +1Ñàìó¿ëà=9 + +2. Ñàìó¿ëà=10 +2 Ñàìó¿ëà=10 +2Ñàìó¿ëà=10 + +1. Öàð³â=11 +1 Öàð³â=11 +1Öàð³â=11 + +2. Öàð³â=12 +2 Öàð³â=12 +2Öàð³â=12 + +1. Õðîí³êè=13 +1 Õðîí³êè=13 +1Õðîí³êè=13 + +2. Õðîí³êè=14 +2 Õðîí³êè=14 +2Õðîí³êè=14 + +Åçäðè=15 +Íåå쳿=16 +Eñòåð=17 +Éîâà=18 +Ïñàëì³â=19 +Ïðèïîâ³ñòåé=20 +Åêêëåç³ÿñò=21 +ϳñíÿ íàä ï³ñíÿìè=22 +²ñà¿=23 +ªðå쳿=24 +Ïëà÷ ªðå쳿=25 +ªçå곿ëÿ=26 +Äàíè¿ëà=27 +Îñ³¿=28 +Éî³ëà=29 +Aìîñà=30 +Îâä³ÿ=31 +Éîíè=32 +Mèõåÿ=33 +Íàóìà=34 +Àâàêóìà=35 +Ñîôîí³¿=36 +Îã³ÿ=37 +Çàõàð³ÿ=38 +Ìàëàõ³¿=39 +Ìàòâ³ÿ=40 +Ìàðêà=41 +Ëóêè=42 +²âàíà=43 +ij¿=44 +Ðèìëÿí=45 + +1. Êîðèíòÿí=46 +1 Êîðèíòÿí=46 +1Êîðèíòÿí=46 + +2. Êîðèíòÿí=47 +2 Êîðèíòÿí=47 +2Êîðèíòÿí=47 + +Ãàëàò³â=48 +Åôåñÿí=49 +Ôèëèï'ÿí=50 +Êîëîñÿí=51 + +1. Ñîëóíÿí=52 +1 Ñîëóíÿí=52 +1Ñîëóíÿí=52 + +2. Ñîëóíÿí=53 +2 Ñîëóíÿí=53 +2Ñîëóíÿí=53 + +1. Òèìîô³ÿ=54 +1 Òèìîô³ÿ=54 +1Òèìîô³ÿ=54 + +2. Òèìîô³ÿ=55 +2 Òèìîô³ÿ=55 +2Òèìîô³ÿ=55 + +Òèòà=56 +Ôèëèìîíà=57 +ªâðå¿â=58 +ßêîâà=59 + +1. Ïåòðà=60 +1 Ïåòðà=60 +1Ïåòðà=60 + +2. Ïåòðà=61 +2 Ïåòðà=61 +2Ïåòðà=61 + +1. ²âàíà=62 +1 ²âàíà=62 +1²âàíà=62 + +2. ²âàíà=63 +2 ²âàíà=63 +2²âàíà=63 + +3. ²âàíà=64 +3 ²âàíà=64 +3²âàíà=64 + +Þäè=65 +Îá'ÿâëåííÿ=66 + +áóò=1 +áóò.=1 +Áóò=1 +Áóò.=1 +1Ì=1 +1Ì.=1 +1 Ì=1 +1 Ì.=1 +âèõ=2 +âèõ.=2 +Âèõ=2 +Âèõ.=2 +2Ì=2 +2Ì.=2 +2 Ì=2 +2 Ì.=2 +ëåâ=3 +ëåâ.=3 +Ëåâ=3 +Ëåâ.=3 +3Ì=3 +3Ì.=3 +3 Ì=3 +3 Ì.=3 +÷èñ=4 +÷èñ.=4 +×èñ=4 +×èñ.=4 +4Ì=4 +4Ì.=4 +4 Ì=4 +4 Ì.=4 +ïîâò. çàê.=5 +ïîâò çàê=5 +Ïîâò Çàê=5 +Ïîâò. Çàê.=5 +5Ì=5 +5Ì.=5 +5 Ì=5 +5 Ì.=5 +³ñóñ íàâèí=6 +Íàâèí=6 +íàâèí=6 +ºãîøó¿=6 +ªãîøó¿=6 +ºã=6 +ºã.=6 +ªã=6 +ªã.=6 +ñóä=7 +ñóä.=7 +Ñóä=7 +Ñóä.=7 +ðóò=8 +Ðóò=8 +1ñàì=9 +1ñàì.=9 +1 ñàì=9 +1 ñàì.=9 +1Ñàì=9 +1Ñàì.=9 +1 Ñàì=9 +1 Ñàì.=9 +2ñàì=10 +2ñàì.=10 +2 ñàì=10 +2 ñàì.=10 +2Ñàì=10 +2Ñàì.=10 +2 Ñàì=10 +2 Ñàì.=10 +1öàð=11 +1öàð.=11 +1 öàð=11 +1 öàð.=11 +1Öàð=11 +1Öàð.=11 +1 Öàð=11 +1 Öàð.=11 +2öàð=12 +2öàð.=12 +2 öàð=12 +2 öàð.=12 +2Öàð=12 +2Öàð.=12 +2 Öàð=12 +2 Öàð.=12 +1õð=13 +1õð.=13 +1 õð=13 +1 õð.=13 +1Õð=13 +1Õð.=13 +1 Õð=13 +1 Õð.=13 +2õð=14 +2õð.=14 +2 õð=14 +2 õð.=14 +2Õð=14 +2Õð.=14 +2 Õð=14 +2 Õð.=14 +åçä=15 +åçä.=15 +Åçä=15 +Åçä.=15 +íååì=16 +íååì.=16 +Íååì=16 +Íååì.=16 +åñò=17 +åñò.=17 +Åñò=17 +Åñò.=17 +éîâ=18 +Éîâ=18 +ïñ=19 +ïñ.=19 +Ïñ=19 +Ïñ.=19 +ïð=20 +ïð.20 +Ïð=20 +Ïð.=20 +ïðèï=20 +ïðèï.=20 +Ïðèï=20 +Ïðèï.=20 +åêë=21 +åêë.=21 +åêêë=21 +åêëë.=21 +Åêêë=21 +Åêêë.=21 +Åêë=21 +Åêë.=21 +ï³ñí=22 +ï³ñí.=22 +ϳñí=22 +ϳñí.=22 +³ñ=23 +³ñ.=23 +²ñ=23 +²ñ.=23 +ºð=24 +ºð.=24 +ªð=24 +ªð.=24 +ïëà÷=25 +ïëà÷.=25 +Ïëà÷=25 +Ïëà÷.=25 +ºç=26 +ºç.=26 +ªç=26 +ªç.=26 +äàí=27 +äàí.=27 +Äàí=27 +Äàí.=27 +îñ=28 +îñ.=28 +Îñ=28 +Îñ.=28 +éî³ë=29 +Éî³ë=29 +àì=30 +àì.=30 +Àì=30 +Àì.=30 +îâä=31 +îâä.=31 +Îâä=31 +Îâä.=31 +éîíà=32 +Éîíà=32 +ìèõ=33 +ìèõ.=33 +Ìèõ=33 +Ìèõ.=33 +íàóì=34 +Íàóì=34 +àâ=35 +àâ.=35 +Àâ=35 +Àâ.=35 +ñîô=36 +ñîô.=36 +Ñîô=36 +Ñîô.=36 +îã=37 +îã.=37 +Îã=37 +Îã.=37 +çàõ=38 +çàõ.=38 +Çàõ=38 +Çàõ.=38 +ìàë=39 +ìàë.=39 +Ìàë=39 +Ìàë.=39 +ìò=40 +ìò.=40 +Ìò=40 +Ìò.=40 +ìð=41 +ìð.=41 +Ìð=41 +Ìð.=41 +ëê=42 +ëê.=42 +Ëê=42 +Ëê.=42 +³â=43 +³â.=43 +²â=43 +²â.=43 +䳿=44 +ij¿=44 +ðèì=45 +ðèì.=45 +Ðèì=45 +Ðèì.=45 +1êîð=46 +1êîð.=46 +1 êîð=46 +1 êîð.=46 +1Êîð=46 +1Êîð.=46 +1 Êîð=46 +1 Êîð.=46 +2êîð=47 +2êîð.=47 +2 êîð=47 +2 êîð.=47 +2Êîð=47 +2Êîð.=47 +2 Êîð=47 +2 Êîð.=47 +ãàë=48 +ãàë.=48 +Ãàë=48 +Ãàë.=48 +åô=49 +åô.=49 +Åô=49 +Åô.=49 +ôèë=50 +ôèë.=50 +Ôèë=50 +Ôèë.=50 +êîë=51 +êîë.=51 +Êîë=51 +Êîë.=51 +1ñîë=52 +1ñîë.=52 +1 ñîë=52 +1 ñîë.=52 +1Ñîë=52 +1Ñîë.=52 +1 Ñîë=52 +1 Ñîë.=52 +2ñîë=53 +2ñîë.=53 +2 ñîë=53 +2 ñîë.=53 +2Ñîë=53 +2Ñîë.=53 +2 Ñîë=53 +2 Ñîë.=53 +1òèì=54 +1òèì.=54 +1 òèì=54 +1 òèì.=54 +1Òèì=54 +1Òèì.=54 +1 Òèì=54 +1 Òèì.=54 +2òèì=55 +2òèì.=55 +2 òèì=55 +2 òèì.=55 +2Òèì=55 +2Òèì.=55 +2 Òèì=55 +2 Òèì.=55 +òèò=56 +òèò.=56 +Òèò=56 +Òèò.=56 +ôèëèì=57 +ôèëèì.=57 +Ôèëèì=57 +Ôèëèì.=57 +ºâð=58 +ºâð.=58 +ªâð=58 +ªâð.=58 +ÿê=59 +ÿê.=59 +ßê=59 +ßê.=59 +1ïåòð=60 +1ïåòð.=60 +1 ïåòð=60 +1 ïåòð.=60 +1Ïåòð=60 +1Ïåòð.=60 +1 Ïåòð=60 +1 Ïåòð.=60 +2ïåòð=61 +2ïåòð.=61 +2 ïåòð=61 +2 ïåòð.=61 +2Ïåòð=61 +2Ïåòð.=61 +2 Ïåòð=61 +2 Ïåòð.=61 +1³â=62 +1³â.=62 +1 ³â=62 +1 ³â.=62 +1²â=62 +1²â.=62 +1 ²â=62 +1 ²â.=62 +2³â=63 +2³â.=63 +2 ³â=63 +2 ³â.=63 +2²â=63 +2²â.=63 +2 ²â=63 +2 ²â.=63 +3³â=64 +3³â.=64 +3 ³â=64 +3 ³â.=64 +3²â=64 +3²â.=64 +3 ²â=64 +3 ²â.=64 +þä=65 +þä.=65 +Þä=65 +Þä.=65 +îá=66 +îá.=66 +Îá=66 +Îá.=66 diff --git a/locales.d/uk_UA-koi8-u.conf b/locales.d/uk_UA-koi8-u.conf new file mode 100755 index 0000000..8e92345 --- /dev/null +++ b/locales.d/uk_UA-koi8-u.conf @@ -0,0 +1,739 @@ +# Ukrainian BIBLE +# â¶âì¶ñ ÁÂÏ ëîéçé ó÷ñôïçï ðéóøíá óôáòïçï ê îï÷ïçï úáðï÷¶ôõ +# ðÒÁÃÀ¤ Ð¦Ä Linux ¦ Windows ×ÅÒÓ¦§ ÐÒÏÅËÔÕ SWORD +# Pavlo Bohmat bohm@ukr.net + +[Meta] +Name=uk_UA-koi8-u +Description=Ukrainian (koi8-u) +Encoding=KOI8-U + +[Text] +Genesis=âÕÔÔÑ +Exodus=÷ÉÈ¦Ä +Leviticus=ìÅ×ÉÔ +Numbers=þÉÓÌÁ +Deuteronomy=ðÏ×ÔÏÒÅÎÎÑ úÁËÏÎÕ +Joshua=¶ÓÕÓ îÁ×ÉÎ +Judges=óÕÄÄ¦× +Ruth=òÕÔ +I Samuel=1. óÁÍÕ§ÌÁ +II Samuel=2. óÁÍÕ§ÌÁ +I Kings=1. ãÁÒ¦× +II Kings=2. ãÁÒ¦× +I Chronicles=1. èÒÏΦËÉ +II Chronicles=2. èÒÏΦËÉ +Ezra=åÚÄÒÉ +Nehemiah=îÅÅͦ§ +Esther=EÓÔÅÒ +Job=êÏ×Á +Psalms=ðÓÁÌÍ¦× +Proverbs=ðÒÉÐÏצÓÔÅÊ +Ecclesiastes=åËËÌÅÚ¦ÑÓÔ +Song of Solomon=ð¦ÓÎÑ ÎÁÄ Ð¦ÓÎÑÍÉ +Isaiah=¶ÓÁ§ +Jeremiah=´ÒÅͦ§ +Lamentations=ðÌÁÞ ´ÒÅͦ§ +Ezekiel=´ÚÅ˦§ÌÑ +Daniel=äÁÎɧÌÁ +Hosea=ïÓ¦§ +Joel=êϦÌÁ +Amos=AÍÏÓÁ +Obadiah=ï×Ä¦Ñ +Jonah=êÏÎÉ +Micah=MÉÈÅÑ +Nahum=îÁÕÍÁ +Habakkuk=á×ÁËÕÍÁ +Zephaniah=óÏÆÏΦ§ +Haggai=ïÇ¦Ñ +Zechariah=úÁÈÁÒ¦Ñ +Malachi=íÁÌÁȦ§ +Matthew=íÁÔ×¦Ñ +Mark=íÁÒËÁ +Luke=ìÕËÉ +John=¶×ÁÎÁ +Acts=䦧 +Romans=òÉÍÌÑÎ +I Corinthians=1. ëÏÒÉÎÔÑÎ +II Corinthians=2. ëÏÒÉÎÔÑÎ +Galatians=çÁÌÁÔ¦× +Ephesians=åÆÅÓÑÎ +Philippians=æÉÌÉÐ'ÑÎ +Colossians=ëÏÌÏÓÑÎ +I Thessalonians=1. óÏÌÕÎÑÎ +II Thessalonians=2. óÏÌÕÎÑÎ +I Timothy=1. ôÉÍÏÆ¦Ñ +II Timothy=2. ôÉÍÏÆ¦Ñ +Titus=ôÉÔÁ +Philemon=æÉÌÉÍÏÎÁ +Hebrews=´×ÒÅ§× +James=ñËÏ×Á +I Peter=1. ðÅÔÒÁ +II Peter=2. ðÅÔÒÁ +I John=1. ¶×ÁÎÁ +II John=2. ¶×ÁÎÁ +III John=3. ¶×ÁÎÁ +Jude=àÄÉ +Revelation of John=ïÂ'Ñ×ÌÅÎÎÑ + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +âÕÔÔÑ=1 +÷ÉȦÄ=2 +ìÅ×ÉÔ=3 +þÉÓÌÁ=4 +ðÏ×ÔÏÒÅÎÎÑ úÁËÏÎÕ=5 +¶ÓÕÓ îÁ×ÉÎ=6 +óÕÄĦ×=7 +òÕÔ=8 + +1. óÁÍÕ§ÌÁ=9 +1 óÁÍÕ§ÌÁ=9 +1óÁÍÕ§ÌÁ=9 + +2. óÁÍÕ§ÌÁ=10 +2 óÁÍÕ§ÌÁ=10 +2óÁÍÕ§ÌÁ=10 + +1. ãÁÒ¦×=11 +1 ãÁÒ¦×=11 +1ãÁÒ¦×=11 + +2. ãÁÒ¦×=12 +2 ãÁÒ¦×=12 +2ãÁÒ¦×=12 + +1. èÒÏΦËÉ=13 +1 èÒÏΦËÉ=13 +1èÒÏΦËÉ=13 + +2. èÒÏΦËÉ=14 +2 èÒÏΦËÉ=14 +2èÒÏΦËÉ=14 + +åÚÄÒÉ=15 +îÅÅͦ§=16 +EÓÔÅÒ=17 +êÏ×Á=18 +ðÓÁÌͦ×=19 +ðÒÉÐÏצÓÔÅÊ=20 +åËËÌÅÚ¦ÑÓÔ=21 +ð¦ÓÎÑ ÎÁÄ Ð¦ÓÎÑÍÉ=22 +¶ÓÁ§=23 +´ÒÅͦ§=24 +ðÌÁÞ ´ÒÅͦ§=25 +´ÚÅ˦§ÌÑ=26 +äÁÎɧÌÁ=27 +ïÓ¦§=28 +êϦÌÁ=29 +AÍÏÓÁ=30 +ï×ĦÑ=31 +êÏÎÉ=32 +MÉÈÅÑ=33 +îÁÕÍÁ=34 +á×ÁËÕÍÁ=35 +óÏÆÏΦ§=36 +ïǦÑ=37 +úÁÈÁÒ¦Ñ=38 +íÁÌÁȦ§=39 +íÁÔצÑ=40 +íÁÒËÁ=41 +ìÕËÉ=42 +¶×ÁÎÁ=43 +䦧=44 +òÉÍÌÑÎ=45 + +1. ëÏÒÉÎÔÑÎ=46 +1 ëÏÒÉÎÔÑÎ=46 +1ëÏÒÉÎÔÑÎ=46 + +2. ëÏÒÉÎÔÑÎ=47 +2 ëÏÒÉÎÔÑÎ=47 +2ëÏÒÉÎÔÑÎ=47 + +çÁÌÁÔ¦×=48 +åÆÅÓÑÎ=49 +æÉÌÉÐ'ÑÎ=50 +ëÏÌÏÓÑÎ=51 + +1. óÏÌÕÎÑÎ=52 +1 óÏÌÕÎÑÎ=52 +1óÏÌÕÎÑÎ=52 + +2. óÏÌÕÎÑÎ=53 +2 óÏÌÕÎÑÎ=53 +2óÏÌÕÎÑÎ=53 + +1. ôÉÍÏƦÑ=54 +1 ôÉÍÏƦÑ=54 +1ôÉÍÏƦÑ=54 + +2. ôÉÍÏƦÑ=55 +2 ôÉÍÏƦÑ=55 +2ôÉÍÏƦÑ=55 + +ôÉÔÁ=56 +æÉÌÉÍÏÎÁ=57 +´×Òŧ×=58 +ñËÏ×Á=59 + +1. ðÅÔÒÁ=60 +1 ðÅÔÒÁ=60 +1ðÅÔÒÁ=60 + +2. ðÅÔÒÁ=61 +2 ðÅÔÒÁ=61 +2ðÅÔÒÁ=61 + +1. ¶×ÁÎÁ=62 +1 ¶×ÁÎÁ=62 +1¶×ÁÎÁ=62 + +2. ¶×ÁÎÁ=63 +2 ¶×ÁÎÁ=63 +2¶×ÁÎÁ=63 + +3. ¶×ÁÎÁ=64 +3 ¶×ÁÎÁ=64 +3¶×ÁÎÁ=64 + +àÄÉ=65 +ïÂ'Ñ×ÌÅÎÎÑ=66 + +ÂÕÔ=1 +ÂÕÔ.=1 +âÕÔ=1 +âÕÔ.=1 +1í=1 +1í.=1 +1 í=1 +1 í.=1 +×ÉÈ=2 +×ÉÈ.=2 +÷ÉÈ=2 +÷ÉÈ.=2 +2í=2 +2í.=2 +2 í=2 +2 í.=2 +ÌÅ×=3 +ÌÅ×.=3 +ìÅ×=3 +ìÅ×.=3 +3í=3 +3í.=3 +3 í=3 +3 í.=3 +ÞÉÓ=4 +ÞÉÓ.=4 +þÉÓ=4 +þÉÓ.=4 +4í=4 +4í.=4 +4 í=4 +4 í.=4 +ÐÏ×Ô. ÚÁË.=5 +ÐÏ×Ô ÚÁË=5 +ðÏ×Ô úÁË=5 +ðÏ×Ô. úÁË.=5 +5í=5 +5í.=5 +5 í=5 +5 í.=5 +¦ÓÕÓ ÎÁ×ÉÎ=6 +îÁ×ÉÎ=6 +ÎÁ×ÉÎ=6 +¤ÇÏÛÕ§=6 +´ÇÏÛÕ§=6 +¤Ç=6 +¤Ç.=6 +´Ç=6 +´Ç.=6 +ÓÕÄ=7 +ÓÕÄ.=7 +óÕÄ=7 +óÕÄ.=7 +ÒÕÔ=8 +òÕÔ=8 +1ÓÁÍ=9 +1ÓÁÍ.=9 +1 ÓÁÍ=9 +1 ÓÁÍ.=9 +1óÁÍ=9 +1óÁÍ.=9 +1 óÁÍ=9 +1 óÁÍ.=9 +2ÓÁÍ=10 +2ÓÁÍ.=10 +2 ÓÁÍ=10 +2 ÓÁÍ.=10 +2óÁÍ=10 +2óÁÍ.=10 +2 óÁÍ=10 +2 óÁÍ.=10 +1ÃÁÒ=11 +1ÃÁÒ.=11 +1 ÃÁÒ=11 +1 ÃÁÒ.=11 +1ãÁÒ=11 +1ãÁÒ.=11 +1 ãÁÒ=11 +1 ãÁÒ.=11 +2ÃÁÒ=12 +2ÃÁÒ.=12 +2 ÃÁÒ=12 +2 ÃÁÒ.=12 +2ãÁÒ=12 +2ãÁÒ.=12 +2 ãÁÒ=12 +2 ãÁÒ.=12 +1ÈÒ=13 +1ÈÒ.=13 +1 ÈÒ=13 +1 ÈÒ.=13 +1èÒ=13 +1èÒ.=13 +1 èÒ=13 +1 èÒ.=13 +2ÈÒ=14 +2ÈÒ.=14 +2 ÈÒ=14 +2 ÈÒ.=14 +2èÒ=14 +2èÒ.=14 +2 èÒ=14 +2 èÒ.=14 +ÅÚÄ=15 +ÅÚÄ.=15 +åÚÄ=15 +åÚÄ.=15 +ÎÅÅÍ=16 +ÎÅÅÍ.=16 +îÅÅÍ=16 +îÅÅÍ.=16 +ÅÓÔ=17 +ÅÓÔ.=17 +åÓÔ=17 +åÓÔ.=17 +ÊÏ×=18 +êÏ×=18 +ÐÓ=19 +ÐÓ.=19 +ðÓ=19 +ðÓ.=19 +ÐÒ=20 +ÐÒ.20 +ðÒ=20 +ðÒ.=20 +ÐÒÉÐ=20 +ÐÒÉÐ.=20 +ðÒÉÐ=20 +ðÒÉÐ.=20 +ÅËÌ=21 +ÅËÌ.=21 +ÅËËÌ=21 +ÅËÌÌ.=21 +åËËÌ=21 +åËËÌ.=21 +åËÌ=21 +åËÌ.=21 +ЦÓÎ=22 +ЦÓÎ.=22 +ð¦ÓÎ=22 +ð¦ÓÎ.=22 +¦Ó=23 +¦Ó.=23 +¶Ó=23 +¶Ó.=23 +¤Ò=24 +¤Ò.=24 +´Ò=24 +´Ò.=24 +ÐÌÁÞ=25 +ÐÌÁÞ.=25 +ðÌÁÞ=25 +ðÌÁÞ.=25 +¤Ú=26 +¤Ú.=26 +´Ú=26 +´Ú.=26 +ÄÁÎ=27 +ÄÁÎ.=27 +äÁÎ=27 +äÁÎ.=27 +ÏÓ=28 +ÏÓ.=28 +ïÓ=28 +ïÓ.=28 +ÊϦÌ=29 +êϦÌ=29 +ÁÍ=30 +ÁÍ.=30 +áÍ=30 +áÍ.=30 +Ï×Ä=31 +Ï×Ä.=31 +ï×Ä=31 +ï×Ä.=31 +ÊÏÎÁ=32 +êÏÎÁ=32 +ÍÉÈ=33 +ÍÉÈ.=33 +íÉÈ=33 +íÉÈ.=33 +ÎÁÕÍ=34 +îÁÕÍ=34 +Á×=35 +Á×.=35 +á×=35 +á×.=35 +ÓÏÆ=36 +ÓÏÆ.=36 +óÏÆ=36 +óÏÆ.=36 +ÏÇ=37 +ÏÇ.=37 +ïÇ=37 +ïÇ.=37 +ÚÁÈ=38 +ÚÁÈ.=38 +úÁÈ=38 +úÁÈ.=38 +ÍÁÌ=39 +ÍÁÌ.=39 +íÁÌ=39 +íÁÌ.=39 +ÍÔ=40 +ÍÔ.=40 +íÔ=40 +íÔ.=40 +ÍÒ=41 +ÍÒ.=41 +íÒ=41 +íÒ.=41 +ÌË=42 +ÌË.=42 +ìË=42 +ìË.=42 +¦×=43 +¦×.=43 +¶×=43 +¶×.=43 +Ħ§=44 +䦧=44 +ÒÉÍ=45 +ÒÉÍ.=45 +òÉÍ=45 +òÉÍ.=45 +1ËÏÒ=46 +1ËÏÒ.=46 +1 ËÏÒ=46 +1 ËÏÒ.=46 +1ëÏÒ=46 +1ëÏÒ.=46 +1 ëÏÒ=46 +1 ëÏÒ.=46 +2ËÏÒ=47 +2ËÏÒ.=47 +2 ËÏÒ=47 +2 ËÏÒ.=47 +2ëÏÒ=47 +2ëÏÒ.=47 +2 ëÏÒ=47 +2 ëÏÒ.=47 +ÇÁÌ=48 +ÇÁÌ.=48 +çÁÌ=48 +çÁÌ.=48 +ÅÆ=49 +ÅÆ.=49 +åÆ=49 +åÆ.=49 +ÆÉÌ=50 +ÆÉÌ.=50 +æÉÌ=50 +æÉÌ.=50 +ËÏÌ=51 +ËÏÌ.=51 +ëÏÌ=51 +ëÏÌ.=51 +1ÓÏÌ=52 +1ÓÏÌ.=52 +1 ÓÏÌ=52 +1 ÓÏÌ.=52 +1óÏÌ=52 +1óÏÌ.=52 +1 óÏÌ=52 +1 óÏÌ.=52 +2ÓÏÌ=53 +2ÓÏÌ.=53 +2 ÓÏÌ=53 +2 ÓÏÌ.=53 +2óÏÌ=53 +2óÏÌ.=53 +2 óÏÌ=53 +2 óÏÌ.=53 +1ÔÉÍ=54 +1ÔÉÍ.=54 +1 ÔÉÍ=54 +1 ÔÉÍ.=54 +1ôÉÍ=54 +1ôÉÍ.=54 +1 ôÉÍ=54 +1 ôÉÍ.=54 +2ÔÉÍ=55 +2ÔÉÍ.=55 +2 ÔÉÍ=55 +2 ÔÉÍ.=55 +2ôÉÍ=55 +2ôÉÍ.=55 +2 ôÉÍ=55 +2 ôÉÍ.=55 +ÔÉÔ=56 +ÔÉÔ.=56 +ôÉÔ=56 +ôÉÔ.=56 +ÆÉÌÉÍ=57 +ÆÉÌÉÍ.=57 +æÉÌÉÍ=57 +æÉÌÉÍ.=57 +¤×Ò=58 +¤×Ò.=58 +´×Ò=58 +´×Ò.=58 +ÑË=59 +ÑË.=59 +ñË=59 +ñË.=59 +1ÐÅÔÒ=60 +1ÐÅÔÒ.=60 +1 ÐÅÔÒ=60 +1 ÐÅÔÒ.=60 +1ðÅÔÒ=60 +1ðÅÔÒ.=60 +1 ðÅÔÒ=60 +1 ðÅÔÒ.=60 +2ÐÅÔÒ=61 +2ÐÅÔÒ.=61 +2 ÐÅÔÒ=61 +2 ÐÅÔÒ.=61 +2ðÅÔÒ=61 +2ðÅÔÒ.=61 +2 ðÅÔÒ=61 +2 ðÅÔÒ.=61 +1¦×=62 +1¦×.=62 +1 ¦×=62 +1 ¦×.=62 +1¶×=62 +1¶×.=62 +1 ¶×=62 +1 ¶×.=62 +2¦×=63 +2¦×.=63 +2 ¦×=63 +2 ¦×.=63 +2¶×=63 +2¶×.=63 +2 ¶×=63 +2 ¶×.=63 +3¦×=64 +3¦×.=64 +3 ¦×=64 +3 ¦×.=64 +3¶×=64 +3¶×.=64 +3 ¶×=64 +3 ¶×.=64 +ÀÄ=65 +ÀÄ.=65 +àÄ=65 +àÄ.=65 +ÏÂ=66 +ÏÂ.=66 +ïÂ=66 +ïÂ.=66 diff --git a/locales.d/uk_UA-utf8.conf b/locales.d/uk_UA-utf8.conf new file mode 100644 index 0000000..08563ad --- /dev/null +++ b/locales.d/uk_UA-utf8.conf @@ -0,0 +1,739 @@ +# Ukrainian BIBLE +# БІБЛІЯ або КÐИГИ СВЯТОГО ПИСЬМРСТÐРОГО Й ÐОВОГО ЗÐПОВІТУ +# Працює під Linux Ñ– Windows верÑÑ–Ñ— проекту SWORD +# Pavlo Bohmat bohm@ukr.net + +[Meta] +Name=uk +Description=Ukrainian (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Ð‘ÑƒÑ‚Ñ‚Ñ +Exodus=Вихід +Leviticus=Левит +Numbers=ЧиÑла +Deuteronomy=ÐŸÐ¾Ð²Ñ‚Ð¾Ñ€ÐµÐ½Ð½Ñ Ð—Ð°ÐºÐ¾Ð½Ñƒ +Joshua=ІÑÑƒÑ Ðавин +Judges=Суддів +Ruth=Рут +I Samuel=1. Самуїла +II Samuel=2. Самуїла +I Kings=1. Царів +II Kings=2. Царів +I Chronicles=1. Хроніки +II Chronicles=2. Хроніки +Ezra=Ездри +Nehemiah=Ðеемії +Esther=EÑтер +Job=Йова +Psalms=ПÑалмів +Proverbs=ПриповіÑтей +Ecclesiastes=ЕкклезіÑÑÑ‚ +Song of Solomon=ПіÑÐ½Ñ Ð½Ð°Ð´ піÑнÑми +Isaiah=ІÑаї +Jeremiah=Єремії +Lamentations=Плач Єремії +Ezekiel=Ð„Ð·ÐµÐºÑ–Ñ—Ð»Ñ +Daniel=Даниїла +Hosea=ОÑÑ–Ñ— +Joel=Йоіла +Amos=AмоÑа +Obadiah=ÐžÐ²Ð´Ñ–Ñ +Jonah=Йони +Micah=MÐ¸Ñ…ÐµÑ +Nahum=Ðаума +Habakkuk=Ðвакума +Zephaniah=Софонії +Haggai=ÐžÐ³Ñ–Ñ +Zechariah=Ð—Ð°Ñ…Ð°Ñ€Ñ–Ñ +Malachi=Малахії +Matthew=ÐœÐ°Ñ‚Ð²Ñ–Ñ +Mark=Марка +Luke=Луки +John=Івана +Acts=Дії +Romans=РимлÑн +I Corinthians=1. КоринтÑн +II Corinthians=2. КоринтÑн +Galatians=Галатів +Ephesians=ЕфеÑÑн +Philippians=Филип'Ñн +Colossians=КолоÑÑн +I Thessalonians=1. СолунÑн +II Thessalonians=2. СолунÑн +I Timothy=1. Ð¢Ð¸Ð¼Ð¾Ñ„Ñ–Ñ +II Timothy=2. Ð¢Ð¸Ð¼Ð¾Ñ„Ñ–Ñ +Titus=Тита +Philemon=Филимона +Hebrews=Євреїв +James=Якова +I Peter=1. Петра +II Peter=2. Петра +I John=1. Івана +II John=2. Івана +III John=3. Івана +Jude=Юди +Revelation of John=Об'ÑÐ²Ð»ÐµÐ½Ð½Ñ + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 + +БуттÑ=1 +Вихід=2 +Левит=3 +ЧиÑла=4 +ÐŸÐ¾Ð²Ñ‚Ð¾Ñ€ÐµÐ½Ð½Ñ Ð—Ð°ÐºÐ¾Ð½Ñƒ=5 +ІÑÑƒÑ Ðавин=6 +Суддів=7 +Рут=8 + +1. Самуїла=9 +1 Самуїла=9 +1Самуїла=9 + +2. Самуїла=10 +2 Самуїла=10 +2Самуїла=10 + +1. Царів=11 +1 Царів=11 +1Царів=11 + +2. Царів=12 +2 Царів=12 +2Царів=12 + +1. Хроніки=13 +1 Хроніки=13 +1Хроніки=13 + +2. Хроніки=14 +2 Хроніки=14 +2Хроніки=14 + +Ездри=15 +Ðеемії=16 +EÑтер=17 +Йова=18 +ПÑалмів=19 +ПриповіÑтей=20 +ЕкклезіÑÑÑ‚=21 +ПіÑÐ½Ñ Ð½Ð°Ð´ піÑнÑми=22 +ІÑаї=23 +Єремії=24 +Плач Єремії=25 +ЄзекіїлÑ=26 +Даниїла=27 +ОÑÑ–Ñ—=28 +Йоіла=29 +AмоÑа=30 +ОвдіÑ=31 +Йони=32 +MихеÑ=33 +Ðаума=34 +Ðвакума=35 +Софонії=36 +ОгіÑ=37 +ЗахаріÑ=38 +Малахії=39 +МатвіÑ=40 +Марка=41 +Луки=42 +Івана=43 +Дії=44 +РимлÑн=45 + +1. КоринтÑн=46 +1 КоринтÑн=46 +1КоринтÑн=46 + +2. КоринтÑн=47 +2 КоринтÑн=47 +2КоринтÑн=47 + +Галатів=48 +ЕфеÑÑн=49 +Филип'Ñн=50 +КолоÑÑн=51 + +1. СолунÑн=52 +1 СолунÑн=52 +1СолунÑн=52 + +2. СолунÑн=53 +2 СолунÑн=53 +2СолунÑн=53 + +1. ТимофіÑ=54 +1 ТимофіÑ=54 +1ТимофіÑ=54 + +2. ТимофіÑ=55 +2 ТимофіÑ=55 +2ТимофіÑ=55 + +Тита=56 +Филимона=57 +Євреїв=58 +Якова=59 + +1. Петра=60 +1 Петра=60 +1Петра=60 + +2. Петра=61 +2 Петра=61 +2Петра=61 + +1. Івана=62 +1 Івана=62 +1Івана=62 + +2. Івана=63 +2 Івана=63 +2Івана=63 + +3. Івана=64 +3 Івана=64 +3Івана=64 + +Юди=65 +Об'ÑвленнÑ=66 + +бут=1 +бут.=1 +Бут=1 +Бут.=1 +1Ðœ=1 +1Ðœ.=1 +1 Ðœ=1 +1 Ðœ.=1 +вих=2 +вих.=2 +Вих=2 +Вих.=2 +2Ðœ=2 +2Ðœ.=2 +2 Ðœ=2 +2 Ðœ.=2 +лев=3 +лев.=3 +Лев=3 +Лев.=3 +3Ðœ=3 +3Ðœ.=3 +3 Ðœ=3 +3 Ðœ.=3 +чиÑ=4 +чиÑ.=4 +ЧиÑ=4 +ЧиÑ.=4 +4Ðœ=4 +4Ðœ.=4 +4 Ðœ=4 +4 Ðœ.=4 +повт. зак.=5 +повт зак=5 +Повт Зак=5 +Повт. Зак.=5 +5Ðœ=5 +5Ðœ.=5 +5 Ðœ=5 +5 Ðœ.=5 +Ñ–ÑÑƒÑ Ð½Ð°Ð²Ð¸Ð½=6 +Ðавин=6 +навин=6 +єгошуї=6 +Єгошуї=6 +єг=6 +єг.=6 +Єг=6 +Єг.=6 +Ñуд=7 +Ñуд.=7 +Суд=7 +Суд.=7 +рут=8 +Рут=8 +1Ñам=9 +1Ñам.=9 +1 Ñам=9 +1 Ñам.=9 +1Сам=9 +1Сам.=9 +1 Сам=9 +1 Сам.=9 +2Ñам=10 +2Ñам.=10 +2 Ñам=10 +2 Ñам.=10 +2Сам=10 +2Сам.=10 +2 Сам=10 +2 Сам.=10 +1цар=11 +1цар.=11 +1 цар=11 +1 цар.=11 +1Цар=11 +1Цар.=11 +1 Цар=11 +1 Цар.=11 +2цар=12 +2цар.=12 +2 цар=12 +2 цар.=12 +2Цар=12 +2Цар.=12 +2 Цар=12 +2 Цар.=12 +1Ñ…Ñ€=13 +1Ñ…Ñ€.=13 +1 Ñ…Ñ€=13 +1 Ñ…Ñ€.=13 +1Хр=13 +1Хр.=13 +1 Хр=13 +1 Хр.=13 +2Ñ…Ñ€=14 +2Ñ…Ñ€.=14 +2 Ñ…Ñ€=14 +2 Ñ…Ñ€.=14 +2Хр=14 +2Хр.=14 +2 Хр=14 +2 Хр.=14 +езд=15 +езд.=15 +Езд=15 +Езд.=15 +неем=16 +неем.=16 +Ðеем=16 +Ðеем.=16 +еÑÑ‚=17 +еÑÑ‚.=17 +ЕÑÑ‚=17 +ЕÑÑ‚.=17 +йов=18 +Йов=18 +пÑ=19 +пÑ.=19 +ПÑ=19 +ПÑ.=19 +пр=20 +пр.20 +Пр=20 +Пр.=20 +прип=20 +прип.=20 +Прип=20 +Прип.=20 +екл=21 +екл.=21 +еккл=21 +еклл.=21 +Еккл=21 +Еккл.=21 +Екл=21 +Екл.=21 +піÑн=22 +піÑн.=22 +ПіÑн=22 +ПіÑн.=22 +Ñ–Ñ=23 +Ñ–Ñ.=23 +ІÑ=23 +ІÑ.=23 +єр=24 +єр.=24 +Єр=24 +Єр.=24 +плач=25 +плач.=25 +Плач=25 +Плач.=25 +єз=26 +єз.=26 +Єз=26 +Єз.=26 +дан=27 +дан.=27 +Дан=27 +Дан.=27 +оÑ=28 +оÑ.=28 +ОÑ=28 +ОÑ.=28 +йоіл=29 +Йоіл=29 +ам=30 +ам.=30 +Ðм=30 +Ðм.=30 +овд=31 +овд.=31 +Овд=31 +Овд.=31 +йона=32 +Йона=32 +мих=33 +мих.=33 +Мих=33 +Мих.=33 +наум=34 +Ðаум=34 +ав=35 +ав.=35 +Ðв=35 +Ðв.=35 +Ñоф=36 +Ñоф.=36 +Соф=36 +Соф.=36 +ог=37 +ог.=37 +Ог=37 +Ог.=37 +зах=38 +зах.=38 +Зах=38 +Зах.=38 +мал=39 +мал.=39 +Мал=39 +Мал.=39 +мт=40 +мт.=40 +Мт=40 +Мт.=40 +мр=41 +мр.=41 +Мр=41 +Мр.=41 +лк=42 +лк.=42 +Лк=42 +Лк.=42 +ів=43 +ів.=43 +Ів=43 +Ів.=43 +дії=44 +Дії=44 +рим=45 +рим.=45 +Рим=45 +Рим.=45 +1кор=46 +1кор.=46 +1 кор=46 +1 кор.=46 +1Кор=46 +1Кор.=46 +1 Кор=46 +1 Кор.=46 +2кор=47 +2кор.=47 +2 кор=47 +2 кор.=47 +2Кор=47 +2Кор.=47 +2 Кор=47 +2 Кор.=47 +гал=48 +гал.=48 +Гал=48 +Гал.=48 +еф=49 +еф.=49 +Еф=49 +Еф.=49 +фил=50 +фил.=50 +Фил=50 +Фил.=50 +кол=51 +кол.=51 +Кол=51 +Кол.=51 +1Ñол=52 +1Ñол.=52 +1 Ñол=52 +1 Ñол.=52 +1Сол=52 +1Сол.=52 +1 Сол=52 +1 Сол.=52 +2Ñол=53 +2Ñол.=53 +2 Ñол=53 +2 Ñол.=53 +2Сол=53 +2Сол.=53 +2 Сол=53 +2 Сол.=53 +1тим=54 +1тим.=54 +1 тим=54 +1 тим.=54 +1Тим=54 +1Тим.=54 +1 Тим=54 +1 Тим.=54 +2тим=55 +2тим.=55 +2 тим=55 +2 тим.=55 +2Тим=55 +2Тим.=55 +2 Тим=55 +2 Тим.=55 +тит=56 +тит.=56 +Тит=56 +Тит.=56 +филим=57 +филим.=57 +Филим=57 +Филим.=57 +євр=58 +євр.=58 +Євр=58 +Євр.=58 +Ñк=59 +Ñк.=59 +Як=59 +Як.=59 +1петр=60 +1петр.=60 +1 петр=60 +1 петр.=60 +1Петр=60 +1Петр.=60 +1 Петр=60 +1 Петр.=60 +2петр=61 +2петр.=61 +2 петр=61 +2 петр.=61 +2Петр=61 +2Петр.=61 +2 Петр=61 +2 Петр.=61 +1ів=62 +1ів.=62 +1 ів=62 +1 ів.=62 +1Ів=62 +1Ів.=62 +1 Ів=62 +1 Ів.=62 +2ів=63 +2ів.=63 +2 ів=63 +2 ів.=63 +2Ів=63 +2Ів.=63 +2 Ів=63 +2 Ів.=63 +3ів=64 +3ів.=64 +3 ів=64 +3 ів.=64 +3Ів=64 +3Ів.=64 +3 Ів=64 +3 Ів.=64 +юд=65 +юд.=65 +Юд=65 +Юд.=65 +об=66 +об.=66 +Об=66 +Об.=66 diff --git a/locales.d/vi-utf8.conf b/locales.d/vi-utf8.conf new file mode 100644 index 0000000..afbc445 --- /dev/null +++ b/locales.d/vi-utf8.conf @@ -0,0 +1,390 @@ +[Meta] +Name=vi +Description=Vietnamese (Unicode) +Encoding=UTF-8 + +[Text] +Genesis=Sáng Thế Ký +Exodus=Xuất Êdíptô Ký +Leviticus=Lêvi Ký +Numbers=Dân Số Ký +Deuteronomy=Phục Truyá»n Luât Lệ Ký +Joshua=Giôsuê +Judges=Các Quan Xét +Ruth=RutÆ¡ +I Samuel=I Samuên +II Samuel=II Samuên +I Kings=I Các Vua +II Kings=II Các Vua +I Chronicles=I Sá»­ ký +II Chronicles=II Sá»­ ký +Ezra=ExÆ¡ra +Nehemiah=Nêhêmi +Esther=ÊxÆ¡tê +Job=Gióp +Psalms=Thi Thiên +Proverbs=Châm Ngôn +Ecclesiastes=Truyá»n Äạo +Song of Solomon=Nhã Ca +Isaiah=Êsai +Jeremiah=Giêrêmi +Lamentations=Ca ThÆ°Æ¡ng +Ezekiel=Êxêchiên +Daniel=Äaniên +Hosea=Ôsê +Joel=Giôên +Amos=Amốt +Obadiah=ÃpÄ‘ia +Jonah=Giôna +Micah=Michê +Nahum=Nahum +Habakkuk=Habacúc +Zephaniah=Sôphôni +Haggai=Aghê +Zechariah=Xachari +Malachi=Malachi +Matthew=MathiÆ¡ +Mark=Mác +Luke=Luca +John=Giăng +Acts=Công Vụ Các Sứ Äồ +Romans=Rôma +I Corinthians=I Côrinhtô +II Corinthians=II Côrinhtô +Galatians=Galati +Ephesians=Êphêsô +Philippians=Philíp +Colossians=Côlôse +I Thessalonians=I Têsalônica +II Thessalonians=II Têsalônica +I Timothy=I Timôthê +II Timothy=II Timôthê +Titus=Tít +Philemon=Philêmôn +Hebrews=HêbÆ¡rÆ¡ +James=GiacÆ¡ +I Peter=I PhierÆ¡ +II Peter=II PhierÆ¡ +I John=I Giăng +II John=II Giăng +III John=III Giăng +Jude=GiuÄ‘e +Revelation of John=Khải Huyá»n + +[Book Abbrevs] +1 C=46 +1 CHRONICLES=13 +1 CORINTHIANS=46 +1 JN=62 +1 JOHN=62 +1 KGS=11 +1 KINGS=11 +1 PETER=60 +1 PTR=60 +1 SAMUEL=9 +1 THESSALONIANS=52 +1 TIMOTHY=54 +1C=46 +1CHRONICLES=13 +1CORINTHIANS=46 +1JN=62 +1JOHN=62 +1KGS=11 +1KINGS=11 +1PETER=60 +1PTR=60 +1SAMUEL=9 +1THESSALONIANS=52 +1TIMOTHY=54 +2 C=47 +2 CHRONICLES=14 +2 CORINTHIANS=47 +2 JN=63 +2 JOHN=63 +2 KGS=12 +2 KINGS=12 +2 PETER=61 +2 PTR=61 +2 SAMUEL=10 +2 THESSALONIANS=53 +2 TIMOTHY=55 +2C=47 +2CHRONICLES=14 +2CORINTHIANS=47 +2JN=63 +2JOHN=63 +2KGS=12 +2KINGS=12 +2PETER=61 +2PTR=61 +2SAMUEL=10 +2THESSALONIANS=53 +2TIMOTHY=55 +3 JN=64 +3 JOHN=64 +3JN=64 +3JOHN=64 +ACTS=44 +AMOS=30 +APOCALYPSE OF ST. JOHN=66 +C=51 +CANTICLE OF CANTICLES=22 +COC=22 +COLOSSIANS=51 +D=5 +DANIEL=27 +DEUTERONOMY=5 +E=49 +ECCLESIASTES=21 +EPHESIANS=49 +ESTER=17 +ESTHER=17 +EXODUS=2 +EZEKIEL=26 +EZRA=15 +G=1 +GALATIANS=48 +GENESIS=1 +H=58 +HABAKKUK=35 +HAGGAI=37 +HEBREWS=58 +HOSEA=28 +I C=46 +I CHRONICLES=13 +I CORINTHIANS=46 +I JN=62 +I JOHN=62 +I KGS=11 +I KINGS=11 +I PETER=60 +I PTR=60 +I SAMUEL=9 +I THESSALONIANS=52 +I TIMOTHY=54 +IC=46 +ICHRONICLES=13 +ICORINTHIANS=46 +II C=47 +II CHRONICLES=14 +II CORINTHIANS=47 +II JN=63 +II JOHN=63 +II KGS=12 +II KINGS=12 +II PETER=61 +II PTR=61 +II SAMUEL=10 +II THESSALONIANS=53 +II TIMOTHY=55 +IIC=47 +IICHRONICLES=14 +IICORINTHIANS=47 +III JN=64 +III JOHN=64 +IIIJN=64 +IIIJOHN=64 +IIJN=63 +IIJOHN=63 +IIKGS=12 +IIKINGS=12 +IIPETER=61 +IIPTR=61 +IISAMUEL=10 +IITHESSALONIANS=53 +IITIMOTHY=55 +IJN=62 +IJOHN=62 +IKGS=11 +IKINGS=11 +IPETER=60 +IPTR=60 +ISA=23 +ISAIAH=23 +ISAMUEL=9 +ITHESSALONIANS=52 +ITIMOTHY=54 +J=43 +JAMES=59 +JAS=59 +JEREMIAH=24 +JN=43 +JO=43 +JOB=18 +JOEL=29 +JOHN=43 +JONAH=32 +JOSHUA=6 +JUD=7 +JUDE=65 +JUDGES=7 +L=42 +LAMENTATIONS=25 +LEVITICUS=3 +LK=42 +LUKE=42 +MA=40 +MALACHI=39 +MARK=41 +MATTHEW=40 +MICAH=33 +MK=41 +MR=41 +MT=40 +N=4 +NAHUM=34 +NEHEMIAH=16 +NUMBERS=4 +OBADIAH=31 +P=19 +PH=50 +PHILEMON=57 +PHILIPPIANS=50 +PHLM=57 +PHM=57 +PHP=50 +PROVERBS=20 +PSALMS=19 +PSM=19 +PSS=19 +REVELATION OF JOHN=66 +ROMANS=45 +RUTH=8 +SONG OF SOLOMON=22 +SONG OF SONGS=22 +SOS=22 +TITUS=56 +ZECHARIAH=38 +ZEPHANIAH=36 +Sáng Thế Ký=1 +Sa=1 +Xuất Êdíptô Ký=2 +Xu=2 +Lêvi Ký=3 +Le=3 +Dân Số Ký=4 +Dan=4 +Phục Truyá»n Luât Lệ Ký=5 +Phu=5 +Giôsuê=6 +Gios=6 +Các Quan Xét=7 +Cac=7 +RutÆ¡=8 +Ru=8 +I Samuên=9 +ISa=9 +II Samuên=10 +IISa=10 +I Các Vua=11 +IVua=11 +II Các Vua=12 +IIVua=12 +I Sá»­ ký=13 +ISu=13 +II Sá»­ ký=14 +IISu=14 +ExÆ¡ra=15 +Exo=15 +Nêhêmi=16 +Ne=16 +ÊxÆ¡tê=17 +Et=17 +Gióp=18 +Giop=18 +Thi Thiên=19 +Thi=19 +Châm Ngôn=20 +Ch=20 +Truyá»n Äạo=21 +Tr=21 +Nhã Ca=22 +Nha=22 +Êsai=23 +Es=23 +Giêrêmi=24 +Gie=24 +Ca ThÆ°Æ¡ng=25 +Ca=25 +Êxêchiên=26 +Exe=26 +Äaniên=27 +Da=27 +Ôsê=28 +Os=28 +Giôên=29 +Gio=29 +Amốt=30 +Am=30 +ÃpÄ‘ia=31 +Ap=31 +Giôna=32 +Gion=32 +Michê=33 +Mi=33 +Nahum=34 +Na=34 +Habacúc=35 +Ha=35 +Sôphôni=36 +So=36 +Aghê=37 +Ag=37 +Xachari=38 +Xa=38 +Malachi=39 +Ma=39 +MathiÆ¡=40 +Mat=40 +Mác=41 +Mac=41 +Luca=42 +Lu=42 +Giăng=43 +Gi=43 +Công Vụ Các Sứ Äồ=44 +Cong=44 +Rôma=45 +Ro=45 +I Côrinhtô=46 +ICo=46 +II Côrinhtô=47 +IICo=47 +Galati=48 +Ga=48 +Êphêsô=49 +Eph=49 +Philíp=50 +Phi=50 +Côlôse=51 +Co=51 +I Têsalônica=52 +ITe=52 +II Têsalônica=53 +IITe=53 +I Timôthê=54 +ITi=54 +II Timôthê=55 +IITi=55 +Tít=56 +Tit=56 +Philêmôn=57 +Phil=57 +HêbÆ¡rÆ¡=58 +He=58 +GiacÆ¡=59 +Gia=59 +I PhierÆ¡=60 +IPhi=60 +II PhierÆ¡=61 +IIPhi=61 +I Giăng=62 +IGi=62 +II Giăng=63 +IIGi=63 +III Giăng=64 +IIIGi=64 +GiuÄ‘e=65 +Giu=65 +Khải Huyá»n=66 +Kh=66 diff --git a/ltmain.sh b/ltmain.sh new file mode 100644 index 0000000..8e5a930 --- /dev/null +++ b/ltmain.sh @@ -0,0 +1,6930 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# 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 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. + +basename="s,^.*/,,g" + +# 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: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.24 +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" + +# Be Bourne compatible (taken from Autoconf:_AS_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 + +# 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 <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# 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 "$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" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# 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 () +{ + 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 -e '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_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 () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + 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. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + 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 + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run 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 + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + 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 + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + 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" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + 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 have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + 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}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $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" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 2007 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." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.[fF][09]?) xform=[fF][09]. ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # 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 + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + 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" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + 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 $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "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." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </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." + + $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 + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </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." + + $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 + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + 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 + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$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" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$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 (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + 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. + libobjs="$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 + non_pic_objects="$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" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + 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 + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + 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 + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -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 + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + 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*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + 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*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$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*) + # 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 -framework System" + 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 + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -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* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # @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*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + 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*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + 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 + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + 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. + libobjs="$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 + non_pic_objects="$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" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_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. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + 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\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + 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 test "X$duplicate_deps" = "Xyes" ; 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 test "X$duplicate_compiler_generated_deps" = "Xyes" ; 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 + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + 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 + 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% $dependency_libs" ;; + esac + 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" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; 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 (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + 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 + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + 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 + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + 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 + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # 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) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 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 used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + 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 + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # 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 + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + 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 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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 test "X$duplicate_deps" = "Xyes" ; 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 + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + 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 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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 + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # 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 + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + 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 + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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" + # 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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + 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 test "X$duplicate_deps" = "Xyes" ; 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 + *" $dir "*) ;; + *" $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 + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if 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 + realname="$2" + shift; 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*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + 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 module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; 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 + 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; 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 + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + 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; 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + 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 test "X$duplicate_deps" = "Xyes" ; 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 + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + 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 "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + 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" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # 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*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + 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 + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # 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="$2" + number_minor="$3" + number_revision="$4" + # + # 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) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + 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]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + 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]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + 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]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + 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 + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + 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 + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi + 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 + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + 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 + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + 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 + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + 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) + ;; + $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 + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + 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 "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -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*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-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. + $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} 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 + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + 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 \"$potent_lib\" 2>/dev/null \ + | ${SED} 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 + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + 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" | ${SED} -e "1s,^X,," -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 is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + 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 + + + # 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 + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac + 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 + realname="$2" + shift; 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` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "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"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$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"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + 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 + $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:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # 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= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$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\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + 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 ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "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" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + 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\" + 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 + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(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 + $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 + $show "${rm}r $gentop" + $run ${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 + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run 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 "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $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" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${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" + # $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" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + 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 / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + 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*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$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 + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$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 arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # 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/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + 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*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + 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" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + 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. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run 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" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + 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" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + 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. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "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}\" || 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 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + 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 our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + 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 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#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 DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# 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 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#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); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +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; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +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; + + DEBUG("(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 * +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); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# 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 (taken from Autoconf:_AS_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 variable: + 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 >> $output "\ + + # 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 + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + 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 >> $output "\ + + # 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 $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + 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 >> $output "\ + # 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 >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + 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*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + 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" + 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" + 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 + # 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 + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$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 + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_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 + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$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= + 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 + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "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}\" || 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 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; 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" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + 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) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + 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) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# 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' + +# Libraries that this one depends upon. +dependency_libs='$dependency_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 + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # 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. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # 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. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + 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. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # 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 + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "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. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run 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 + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run 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 + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run 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 + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + 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 + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo 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. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo 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. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + 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) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + 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. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && 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" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + 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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; 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 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 + 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 + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + 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 + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + 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 (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $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. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $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) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # 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 + $show "$rm $rmfiles" + $run $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 + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [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 + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +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 \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [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: $modename [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 + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always 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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [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 + -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] + +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: $modename [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." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# 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 +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/m4/acx_clucene.m4 b/m4/acx_clucene.m4 new file mode 100644 index 0000000..04bf2c0 --- /dev/null +++ b/m4/acx_clucene.m4 @@ -0,0 +1,88 @@ +dnl CLucene detection m4 +AC_DEFUN([ACX_CLUCENE], [ +AC_LANG_SAVE +AC_LANG(C++) + + +# Ask user for path to clucene-core stuff:. +AC_ARG_WITH(clucene, + AC_HELP_STRING([ --with-clucene=], + [prefix of CLucene-Core installation. e.g. /usr/local or /usr]),,) + +AC_MSG_CHECKING([how to include clucene]) +if test "x$with_clucene" = "xno"; then + AC_MSG_RESULT(excluding support) +else +#try some default locations +if test -z "$with_clucene" || test "x$with_clucene" = "xyes"; then + #use parent of this directory, and some common library paths + with_clucene=$(cd "../" && pwd) + with_clucene="$with_clucene /usr /usr/local" +else + #use an absolute path + with_clucene=$(cd "$with_clucene" && pwd) +fi +clucene_set_failed= +CLUCENE_CXXFLAGS= +CLUCENE_LIBS= +for flag in $with_clucene; do + if test -z "$clucene_set_failed"; then + if test -e "$flag/include/CLucene.h"; then +# 64-bit checks first + if test -e "$flag/lib64/libclucene.la" || test -e "$flag/lib64/libclucene.so"; then + clucene_set_failed=$flag + CLUCENE_LIBS="-L$flag/lib64 -lclucene" + if test -e "$flag/include/CLucene/clucene-config.h"; then + CLUCENE_CXXFLAGS="-I$flag/include" + else + CLUCENE_CXXFLAGS="-I$flag/include -I$flag/lib64" + fi + else +# 32-bit checks + if test -e "$flag/lib/libclucene.la" || test -e "$flag/lib/libclucene.so"; then + clucene_set_failed=$flag + CLUCENE_LIBS="-L$flag/lib -lclucene" + if test -e "$flag/include/CLucene/clucene-config.h"; then + CLUCENE_CXXFLAGS="-I$flag/include" + else + CLUCENE_CXXFLAGS="-I$flag/include -I$flag/lib" + fi + fi + fi + fi + fi + + if test -z "$clucene_set_failed"; then + if test -e "$flag/src/CLucene/StdHeader.h"; then + if test -e "$flag/src/libclucene.la"; then + CLUCENE_LIBS="-L$flag/src/ -lclucene" + CLUCENE_CXXFLAGS="-I$flag/src/" + clucene_set_failed=$flag/src/ + fi + fi + fi +done + +if test -z "$clucene_set_failed"; then + clucene_set_failed="true" + with_clucene="no" + AC_MSG_RESULT(excluding support) +else + AC_MSG_RESULT($clucene_set_failed) +fi + +if test "$clucene_set_failed" = "true"; then + AC_MSG_WARN([Could not detect clucene location. To enable clucene, you must + call configure with the --with-clucene option specifying the location. + This tells configure where to find the CLucene Core library and headers. + e.g. --with-clucene=/usr/local or --with-clucene=/usr]) +fi +AC_SUBST(CLUCENE_LIBS) +AC_SUBST(CLUCENE_CXXFLAGS) +fi + + + +AC_LANG_RESTORE +])dnl ACX_CLUCENE + diff --git a/m4/cppunit.m4 b/m4/cppunit.m4 new file mode 100644 index 0000000..0991d51 --- /dev/null +++ b/m4/cppunit.m4 @@ -0,0 +1,80 @@ +dnl +dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN([AM_PATH_CPPUNIT], +[ + +AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)], + cppunit_config_prefix="$withval", cppunit_config_prefix="") +AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)], + cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="") + + if test x$cppunit_config_exec_prefix != x ; then + cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config + fi + fi + if test x$cppunit_config_prefix != x ; then + cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config + fi + fi + + AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no) + cppunit_version_min=$1 + + AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min) + no_cppunit="" + if test "$CPPUNIT_CONFIG" = "no" ; then + no_cppunit=yes + else + CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` + CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` + cppunit_version=`$CPPUNIT_CONFIG --version` + + cppunit_major_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + cppunit_minor_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + cppunit_micro_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + cppunit_major_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + cppunit_minor_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + cppunit_micro_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + cppunit_version_proper=`expr \ + $cppunit_major_version \> $cppunit_major_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \> $cppunit_minor_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \= $cppunit_minor_min \& \ + $cppunit_micro_version \>= $cppunit_micro_min ` + + if test "$cppunit_version_proper" = "1" ; then + AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version]) + else + AC_MSG_RESULT(no) + no_cppunit=yes + fi + fi + + if test "x$no_cppunit" = x ; then + ifelse([$2], , :, [$2]) + else + CPPUNIT_CFLAGS="" + CPPUNIT_LIBS="" + ifelse([$3], , :, [$3]) + fi + + AC_SUBST(CPPUNIT_CFLAGS) + AC_SUBST(CPPUNIT_LIBS) +]) + + + diff --git a/missing b/missing new file mode 100755 index 0000000..1c8ff70 --- /dev/null +++ b/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# 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, 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. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# 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: diff --git a/obj/Makefile b/obj/Makefile new file mode 100644 index 0000000..3e531d5 --- /dev/null +++ b/obj/Makefile @@ -0,0 +1,8 @@ + +root := .. +subdirs := +pre-targets := +targets := +include ${root}/Makefile.cfg + +include ${root}/Makefile.post diff --git a/olb/Convert.bpr b/olb/Convert.bpr new file mode 100644 index 0000000..6c10406 --- /dev/null +++ b/olb/Convert.bpr @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\src\utilfuns;..\src\keys;$(BCB)\include;$(BCB)\include\vcl;../include +Item1=$(BCB)\include;$(BCB)\include\vcl;../include + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\src\utilfuns;..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/olb/Convert.cpp b/olb/Convert.cpp new file mode 100644 index 0000000..f22eda0 --- /dev/null +++ b/olb/Convert.cpp @@ -0,0 +1,27 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Convert.res"); +USEFORM("Mainfrm.cpp", Form1); +USEUNIT("all.c"); +USEUNIT("..\src\keys\versekey.cpp"); +USEUNIT("..\src\keys\strkey.cpp"); +USEUNIT("..\src\keys\swkey.cpp"); +USEUNIT("..\src\keys\listkey.cpp"); +USEUNIT("..\src\utilfuns\utilstr.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TForm1), &Form1); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/olb/Doinit.c b/olb/Doinit.c new file mode 100644 index 0000000..aa905b6 --- /dev/null +++ b/olb/Doinit.c @@ -0,0 +1,132 @@ +#include +struct zonline online; +struct zversion version; +struct zref ref; +struct zstdindex stdindex; +struct ztrace trace; +/* + Initialises the System + + Inputs: + pointer to path for files + e.g. c:\bible\scholar +*/ +void DOINIT(CHAR *olbpath) +{ + static CHAR *titles[10] = + {"\\id.dat", "\\text.dat", "\\textndx.dat", "\\tokens.dat", + "\\version.dat", "\\xref.dat", "\\xrefndx.dat", "\\xrefndxs.dat", + "\\cxref\\cxref.dat", "\\cxref\\cxrefndx.dat"}; + + CHAR path[64]; + static long int zero ={0}; + + struct + { + CHAR key; + CHAR size[2]; + INT indexsize; + int token_blksize; + } record; + + int i; + int j; + + /* + Open Files + */ + + trace.level = -1; + X("Doinit"); + for (i = 0; i < 8; i++) + { + STRCPY(path, olbpath, 64, "Doinit-1"); + STRCAT(path, titles[i], 64,"Doinit-2"); + call OPEN(i, path); + online.lrecl[i] = 0; + } + + /* + Initialise Version Structure + */ + call READ(fp_version, sizeof(version), &version.version_id); + call CLOSE(fp_version); + call DUMPLINE("VERSION.DAT", 16, &version.version_id); + /* convert PLI strings to C-Weed format */ +/* + for (i = 0; i < 128; i++) + call PLITOC(&(version.hot_words[i][0]), 9); +*/ + for (i = 0; i < 66; i++) + call PLITOC(&(version.books[i][0]), 15); + + /* + setup access to TEXT.DAT file + */ + call DREAD(fp_textndx, 3, &record.key, zero); + call DUMPLINE("TEXTNDX.DAT", 3, &record.key); + + online.textndxsz = record.size[0]; + if (record.key == 0) then + online.lrecl[fp_textndx] = 3; + else + online.lrecl[fp_textndx] = record.size[0]; + + /* + setup access to XREF.DAT file + */ + call DREAD(fp_xrefndx, 7, &record.key, zero); + call DUMPLINE("XREFNDX.DAT", 7, &record.key); + online.lrecl[fp_xrefndx] = record.size[0] + record.size[1]; + online.xrefndxsz[0] = record.size[0]; + online.xrefndxsz[1] = record.size[1]; + if (record.key == 2) then + { + online.indexsize = record.indexsize; + online.tokenblksize = record.token_blksize * 2; + online.tokenarea = &online.tokenwork[0]; + } + else + online.tokenblksize = 0; + /* + setup access to XREFNDXS.DAT file + */ + call DREAD(fp_xrefndxs, 3, &record.key, zero); + call DUMPLINE("XREFNDXS.DAT", 3, &record.key); + if (record.key == 0) then + online.lrecl[fp_xrefndxs] = 3; + else + online.lrecl[fp_xrefndxs] = record.size[0]; + + online.version_mark = 3; + /* + Setup Version ID for multiple versions + */ + call VERINIT(); + + /* + Setup Cross Reference Files + */ + for (i = 8; i < 10; i++) + { + STRCPY(path, olbpath, 64, "Doinit-3"); + j = strlen(path); + while(path[j] != '\\') + j--; + path[j] = 0; + STRCAT(path, titles[i], 64, "Doinit-4"); + call OPEN(i, path); + online.lrecl[i] = 0; + } + /* + setup access to CXREF.DAT file + */ + call DREAD(fp_cxrefndx, 3, &record.key, zero); + call DUMPLINE("CXREFNDX.DAT", 3, &record.key); + if (record.key == 0) then + online.lrecl[fp_cxrefndx] = 3; + else + online.lrecl[fp_cxrefndx] = record.size[0]; + trace.traceflag = 1; + Y(); +} diff --git a/olb/Getstrng.c b/olb/Getstrng.c new file mode 100644 index 0000000..b5e6938 --- /dev/null +++ b/olb/Getstrng.c @@ -0,0 +1,26 @@ +#include + +void GETSTRNG(strongs_no, verse_list, otflg) + + /* get verses for a given strongs no */ + +int strongs_no; /* strongs number to fetch verse list for */ +INT verse_list[MAX_LIST]; /* resultant verse list */ +CHAR otflg; /* Old Testament Number flag */ +{ + extern struct zversion version; + int entry_size; + long int seek_posn; + + X("Getstrng"); + if (strongs_no > 8849 || strongs_no < 0) then + ERROR("Getstrng - Invalid Strong's Number"); + + entry_size = READNDX(strongs_no, fp_xrefndxs, &seek_posn); + call LISTLOAD(fp_xref, entry_size, verse_list, seek_posn); + if (otflg == 0) then + call LISTRANG(verse_list, version.nt_ver, version.total_ver); + else + call LISTRANG(verse_list, 1, version.nt_ver - 1); + Y(); +} diff --git a/olb/Getvrsn.c b/olb/Getvrsn.c new file mode 100644 index 0000000..1990733 --- /dev/null +++ b/olb/Getvrsn.c @@ -0,0 +1,50 @@ +#include + +/* + Get version id for display + + If triple verse A_B_C then + + Inputs: + 1 - returns "A" + 2 - returns "B" + 3 - returns "A_B" + 4 - returns "C" + 5 - returns "A_C" + 6 - returns "B_C" + 7 - returns "A_B_C" +*/ + +CHAR *GETVRSN(int version) +{ + extern struct zonline online; + static CHAR versionid[16]; + + X("Getvrsn"); + if (version < 1 || version > 7) then + call ERROR("Version Id Invalid"); + versionid[0] = 0; + if (version & 1) then + { + strcat(versionid, "_"); + STRCAT(versionid, &online.versions[0][0], 16, "Getrsn-1"); + } + if (version & 2) then + { + if (online.versions[1][0] != 0) then + { + strcat(versionid, "_"); + STRCAT(versionid, &online.versions[1][0], 16, "Getrsn-2"); + } + } + if (version & 4) then + { + if (online.versions[2][0] != 0) then + { + strcat(versionid, "_"); + STRCAT(versionid, &online.versions[2][0], 16, "Getrsn-3"); + } + } + Y(); + return(&versionid[1]); +} diff --git a/olb/Mainfrm.cpp b/olb/Mainfrm.cpp new file mode 100644 index 0000000..9b41c08 --- /dev/null +++ b/olb/Mainfrm.cpp @@ -0,0 +1,310 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "Mainfrm.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" + + + extern "C" { +#include "online.h" +} + +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#include +#else +#include +#endif + +#include +#include + + + + + +TForm1 *Form1; +//--------------------------------------------------------------------------- +__fastcall TForm1::TForm1(TComponent* Owner) + : TForm(Owner) +{ + +} +//--------------------------------------------------------------------------- + +int TForm1::ProcessOLB(char *filepath) +{ + long pos, offset; + int num1, num2, rangemax, curbook = 0, curchap = 0, curverse = 0; + char buf[127]; + short size, tmp; + extern struct zonline online; + +// checkparams(argc, argv); + startflag = 0; + + inckey = key1 = key2 = key3 = "Genesis 1:1"; + olbvnum = 0; + + openfiles(); + + num1 = key1.Chapter(); + num2 = key1.Verse(); + + DOINIT(filepath); /* initialize OLB system */ + + while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) { + if (!startflag) { + startflag = 1; + } + else { + if (num2 < key2.Verse()) { // new chapter + if (num1 <= key2.Chapter()) { // new book + key2.Verse(1); + key2.Chapter(1); + key2.Book(key2.Book()+1); + } + printf("Found Chapter Break: %d ('%s')\n", num1, (const char *)key2); + chapoffset = offset; + chapsize = size; +// continue; + } + } + key2.Verse(1); + key2.Chapter(num1); + key2.Verse(num2); + + key3 = key2; +// key3 += (rangemax - key3.Verse()); + + writeidx(key1, key2, key3, offset, size); + } + close(vfp); + close(cfp); + close(bfp); + close(fp); + DOEND(); // close OLB system +} + + +/************************************************************************** + * ENT: key1 - current location of index + * key2 - minimum keyval for which this offset is valid + * key3 - maximum keyval for which this offset is valid + */ + +void TForm1::writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size) +{ + long pos; + short tmp; + + if (key1.Verse() == 1) { // new chapter + if (key1.Chapter() == 1) { // new book + pos = lseek(cfp, 0, SEEK_CUR); + write(bfp, &pos, 4); + pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */ + write(cfp, &pos, 4); + write(vfp, &chapoffset, 4); /* Book intro (vss) set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/ + write(vfp, &chapsize, 2); + } + pos = lseek(vfp, 0, SEEK_CUR); + write(cfp, &pos, 4); + write(vfp, &chapoffset, 4); /* Chapter intro */ + write(vfp, &chapsize, 2); + } + if (key1 >= key2) { + write(vfp, &offset, 4); + write(vfp, &size, 2); + } + else { + pos = 0; + tmp = 0; + write(vfp, &pos, 4); + write(vfp, &tmp, 2); + } + key1++; +} + + + +char TForm1::findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size) +{ + char buf[7]; + char buf2[20]; + char ch; + char loop; + long offset2; + int ch2, vs2, rm2; + bool flag; + long chapstart = 0; + short versedata[MAX_VERSE]; + char data[MAX_DATA]; + + + if (++olbvnum <= 31102) { + + if (olbvnum == 23146) { // "Matthew 1:1" + close(vfp); + close(cfp); + close(bfp); + close(fp); + key1 = key2 = key3 = inckey = "Matthew 1:1"; + openfiles(); + startflag = 0; + } + + + *offset = lseek(fp, 0, SEEK_CUR); + + if ((olbvnum!=1) && (olbvnum != 23146)) + inckey++; + + *num1 = inckey.Chapter(); + *num2 = inckey.Verse(); + + // output verse from olb +// printf("%s\n", (const char *)inckey); + GETEXT(olbvnum, versedata, 1, 1, 1, 1); + BLDVERSE(versedata, data); + charsetconvert(data); + write(fp, data, strlen(data)); + + *size = lseek(fp, 0, SEEK_CUR) - *offset; + write(fp, "\n", 1); + return 0; + } + return 1; +} + +void TForm1::charsetconvert(char *data) +{ + for (;*data; data++) { +// printf("%c %d", *data, *data); + switch((unsigned char)*data) { + case 129: *data = 252; break; + case 130: *data = 233; break; + case 131: *data = 226; break; + case 133: *data = 224; break; + case 135: *data = 231; break; + case 136: *data = 234; break; + case 137: *data = 235; break; + case 138: *data = 232; break; + case 139: *data = 239; break; + case 140: *data = 238; break; + case 144: *data = 201; break; + case 147: *data = 244; break; + case 150: *data = 251; break; + case 151: *data = 249; break; + case 160: *data = 225; break; + case 161: *data = 237; break; + case 162: *data = 243; break; + case 163: *data = 250; break; + case 164: *data = 241; break; + case 168: *data = 191; break; + case 173: *data = 161; break; + default: + if ((unsigned char)*data > 126) + fprintf(stderr, "Suspicious character: %c (%d); %s\n", *data, (unsigned char )*data, (const char *)inckey); + break; + } + } +} + + +void TForm1::openfiles() +{ + char buf[255]; + char fname[5]; + long pos; + short size; + + testmnt = key1.Testament(); + + strcpy(fname, (testmnt==2) ? "nt" : "ot"); + unlink(fname); + if ((fp = open(fname, O_CREAT|O_RDWR|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + sprintf(buf, "Couldn't open file: %s\n", fname); + MessageBox(this->Handle, buf, "openfiles()", MB_OK); + exit(1); + } + + sprintf(buf, "%s.vss", fname); + unlink(buf); + if ((vfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + fprintf(stderr, "Couldn't open file: %s\n", buf); + exit(1); + } + + sprintf(buf, "%s.cps", fname); + unlink(buf); + if ((cfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + fprintf(stderr, "Couldn't open file: %s\n", buf); + exit(1); + } + + sprintf(buf, "%s.bks", fname); + unlink(buf); + if ((bfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + fprintf(stderr, "Couldn't open file: %s\n", buf); + exit(1); + } + + pos = 0; + write(bfp, &pos, 4); /* Book offset for testament intros */ + pos = 4; + write(cfp, &pos, 4); /* Chapter offset for testament intro */ + + +/* Right now just zero out intros until parsing correctly */ + pos = 0; + size = 0; + write(vfp, &pos, 4); /* Module intro */ + write(vfp, &size, 2); + write(vfp, &pos, 4); /* Testament intro */ + write(vfp, &size, 2); + +} + + +void TForm1::checkparams(int argc, char **argv) +{ + if (argc < 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + exit(1); + } +} +void __fastcall TForm1::FSButtonClick(TObject *Sender) +{ + FSDialog->FileName = "Text.dat"; + char *fname; + + if (FSDialog->Execute()) { + fname = new char [ strlen(FSDialog->FileName.c_str()) + 1 ]; + strcpy(fname, FSDialog->FileName.c_str()); + for (int i = strlen(fname) - 1; i; i--) { + if ((fname[i] != '\\') && (fname[i] != '/')) + fname[i] = 0; + else break; + } + FilePathEdit->Text = fname; + delete [] fname; + try { + RichEdit1->Lines->LoadFromFile(FilePathEdit->Text + "Copyrite.dat"); + } + catch (...) {} + } +} +//--------------------------------------------------------------------------- +void __fastcall TForm1::Button1Click(TObject *Sender) +{ + ProcessOLB(FilePathEdit->Text.c_str()); +} +//--------------------------------------------------------------------------- diff --git a/olb/Mainfrm.dfm b/olb/Mainfrm.dfm new file mode 100644 index 0000000..a92c4b8 Binary files /dev/null and b/olb/Mainfrm.dfm differ diff --git a/olb/Mainfrm.h b/olb/Mainfrm.h new file mode 100644 index 0000000..4be184d --- /dev/null +++ b/olb/Mainfrm.h @@ -0,0 +1,52 @@ +//--------------------------------------------------------------------------- +#ifndef MainfrmH +#define MainfrmH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm1 : public TForm +{ +__published: // IDE-managed Components + TOpenDialog *FSDialog; + TPanel *Panel1; + TPanel *Panel2; + TButton *Button1; + TLabel *Label1; + TEdit *FilePathEdit; + TButton *FSButton; + TRichEdit *RichEdit1; + void __fastcall FSButtonClick(TObject *Sender); + void __fastcall Button1Click(TObject *Sender); +private: // User declarations + +void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size); +char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size); +void openfiles(); +void checkparams(int argc, char **argv); +void charsetconvert(char *data); +int ProcessOLB(char *filepath); + + +VerseKey key1, key2, key3; +int fp, vfp, cfp, bfp; +long chapoffset; +short chapsize; +char testmnt; +char startflag; +VerseKey inckey; +int olbvnum; + +public: // User declarations + __fastcall TForm1(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm1 *Form1; +//--------------------------------------------------------------------------- +#endif diff --git a/olb/Online.c b/olb/Online.c new file mode 100644 index 0000000..66c26f0 --- /dev/null +++ b/olb/Online.c @@ -0,0 +1,97 @@ +#include "online.dcl" + +/* + Online Bible Database Access Routines +*/ + +INT versedata[MAX_VERSE]; +INT verse_list[MAX_LIST]; +CHAR data[MAX_DATA]; + +void main(argc, argv) +int argc; +CHAR *argv[]; +{ + CHAR found, passage[64], *p; + int i, j; + INT word; +short verse_list[MAX_LIST]; + extern struct zonline online; + + if (argc > 1) + call DOINIT(argv[1]); /* initialise system */ + else + call DOINIT("g:\\bible\\av"); /* initialise system */ + + /* get text for Ge 1:1 & Rev 22:21 */ + + for (i = 1; i < 8; i++) + puts(GETVRSN(i)); + + verse_list[0] = 10; + for (i=1; i <= 8; i++) + verse_list[i] = i; + verse_list[9] = 31101; + verse_list[10] = 31102; + for (i = 1; i <= 10; i++) + puts(VRSTOREF(verse_list[i], 0)); + call DUMPVRS(verse_list, versedata, data); + + word = MAPWORD("Aaron", &found); /* map a word into an absolute number */ + call PUTLIST("Aaron=", word); + if (found == 0) then + puts("*Not Found"); + else + puts("*Found"); + call GETWORD(word, verse_list); /* get list of verses for a word */ + call DUMPVRS(verse_list, versedata, (CHAR *) data); + + /* first word in index */ + word = MAPWORD("a", &found); /* map a word into an absolute number */ + call PUTLIST("a=", word); + if (found == 0) then + puts("*Not Found"); + else + puts("*Found"); + call GETWORD(word, verse_list); /* get list of verses for a word */ + call DUMPVRS(verse_list, versedata, (CHAR *) data); + call GETSTRNG(1, verse_list, 0); /* get list of verses for Strong's */ + call DUMPVRS(verse_list, versedata, (CHAR *) data); + + /* last word in index */ + word = MAPWORD("Zuzims", &found); /* map a word into an absolute number */ + call PUTLIST("Zuzims=", word); + if (found == 0) then + puts("*Not Found"); + else + puts("*Found"); + + call GETWORD(word, verse_list); /* get list of verses for a word */ + call DUMPVRS(verse_list, versedata, (CHAR *) data); + + printf("\nCross References for Ge 1:1\n"); + call GETCXREF(1, verse_list); /* get cross-references for a verse */ + verse_list[1] = verse_list[66]; + verse_list[2] = verse_list[67]; + call DUMPVRS(verse_list, versedata, (CHAR *) data); + + for (i = 1; i <= 31102; i++) /* verify conversion routines work */ + { + if ((i % 1000) == 0) then + puts(DECIMAL(i)); + p = VRSTOREF(i, 0); + if (*p < '9' && *(p+1) == ' ') then + { /* fix book names like 1 Timothy -> 1Timothy */ + *(p+1) = *p; + *p = ' '; + } + j = REFTOVRS(p); + if (j != i) then + { + printf("i=%d, j=%d, ref=%s\n", i, j, p); + call ERROR("VRSTOREF - Error"); + } + } + + DOEND(); +} diff --git a/olb/addstrongs.cpp b/olb/addstrongs.cpp new file mode 100644 index 0000000..f7d9ac0 --- /dev/null +++ b/olb/addstrongs.cpp @@ -0,0 +1,101 @@ +#include "online.dcl" +#include +#include +#include + +/* + Online Bible Database Access Routines +*/ + +INT versedata[MAX_VERSE]; +CHAR data[MAX_DATA]; + +void main(argc, argv) +int argc; +CHAR *argv[]; +{ + int fd; + CHAR found, passage[64], *p; + int i, j; + INT word; +short verse_list[MAX_LIST]; + extern struct zonline online; + + if (argc > 1) + call DOINIT(argv[1]); /* initialise system */ + else + call DOINIT("g:\\bible\\av"); /* initialise system */ + fd = open("../modules/texts/rawtext/kjv/ot", O_RDONLY, S_IREAD|S_IWRITE); + + /* get text for Ge 1:1 & Rev 22:21 */ + + for (i = 1; i < 8; i++) + puts(GETVRSN(i)); + + verse_list[0] = 10; + for (i=1; i <= 8; i++) + verse_list[i] = i; + verse_list[9] = 31101; + verse_list[10] = 31102; + for (i = 1; i <= 10; i++) + puts(VRSTOREF(verse_list[i], 0)); + call DUMPVRS(verse_list, versedata, data); + + word = MAPWORD("Aaron", &found); /* map a word into an absolute number */ + call PUTLIST("Aaron=", word); + if (found == 0) then + puts("*Not Found"); + else + puts("*Found"); + call GETWORD(word, verse_list); /* get list of verses for a word */ + call DUMPVRS(verse_list, versedata, (CHAR *) data); + + /* first word in index */ + word = MAPWORD("a", &found); /* map a word into an absolute number */ + call PUTLIST("a=", word); + if (found == 0) then + puts("*Not Found"); + else + puts("*Found"); + call GETWORD(word, verse_list); /* get list of verses for a word */ + call DUMPVRS(verse_list, versedata, (CHAR *) data); + call GETSTRNG(1, verse_list, 0); /* get list of verses for Strong's */ + call DUMPVRS(verse_list, versedata, (CHAR *) data); + + /* last word in index */ + word = MAPWORD("Zuzims", &found); /* map a word into an absolute number */ + call PUTLIST("Zuzims=", word); + if (found == 0) then + puts("*Not Found"); + else + puts("*Found"); + + call GETWORD(word, verse_list); /* get list of verses for a word */ + call DUMPVRS(verse_list, versedata, (CHAR *) data); + + printf("\nCross References for Ge 1:1\n"); + call GETCXREF(1, verse_list); /* get cross-references for a verse */ + verse_list[1] = verse_list[66]; + verse_list[2] = verse_list[67]; + call DUMPVRS(verse_list, versedata, (CHAR *) data); + + for (i = 1; i <= 31102; i++) /* verify conversion routines work */ + { + if ((i % 1000) == 0) then + puts(DECIMAL(i)); + p = VRSTOREF(i, 0); + if (*p < '9' && *(p+1) == ' ') then + { /* fix book names like 1 Timothy -> 1Timothy */ + *(p+1) = *p; + *p = ' '; + } + j = REFTOVRS(p); + if (j != i) then + { + printf("i=%d, j=%d, ref=%s\n", i, j, p); + call ERROR("VRSTOREF - Error"); + } + } + + DOEND(); +} diff --git a/olb/dumpav.cpp b/olb/dumpav.cpp new file mode 100644 index 0000000..a6f7a97 --- /dev/null +++ b/olb/dumpav.cpp @@ -0,0 +1,29 @@ +extern "C" { +#include "online.dcl" +} + +void main(int argc, char **argv) +{ + CHAR found, passage[64], *p; + int i, j; + INT word; + short verse_list[MAX_LIST]; + short versedata[MAX_VERSE]; + char data[MAX_DATA]; + extern struct zonline online; + int versenum = 0; + + + if (argc > 1) + call DOINIT(argv[1]); /* initialise system */ + else call DOINIT("g:\\bible\\av"); /* initialise system */ + + for (versenum = 23146; versenum <= 23147 /*31102*/; versenum++) { + call GETEXT(versenum, versedata, 1, 1, 1, 1); + call BLDVERSE(versedata, data); + printf("%s\n", VRSTOREF(versenum, 1)); +// printf("%s\n", data); + } + + DOEND(); +} \ No newline at end of file diff --git a/olb/olb.bpg b/olb/olb.bpg new file mode 100644 index 0000000..d51af88 --- /dev/null +++ b/olb/olb.bpg @@ -0,0 +1,26 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = Convert.exe olb2sword.exe prn2sword.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +Convert.exe: Convert.bpr + $(MAKE) + +olb2sword.exe: olb2sword.bpr + $(MAKE) + +prn2sword.exe: prn2sword.bpr + $(MAKE) + + diff --git a/olb/olb2sword.bpr b/olb/olb2sword.bpr new file mode 100644 index 0000000..e05b277 --- /dev/null +++ b/olb/olb2sword.bpr @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription=Executable (Console) +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\src\utilfuns;..\src\keys;$(BCB)\include;..\include +Item1=$(BCB)\include;../include + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\src\utilfuns;..\src\keys;$(BCB)\lib +Item1=$(BCB)\lib + +[HistoryLists\hlRunParameters] +Count=2 +Item0=c:\bible\weyItem1=c:\bible\wey[Debugging] +Item1= + +[Debugging] +DebugSourceDirs= + +[Parameters] +RunParams=c:\bible\weyHostApplication= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=1 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/olb/olb2sword.cpp b/olb/olb2sword.cpp new file mode 100644 index 0000000..2fd295f --- /dev/null +++ b/olb/olb2sword.cpp @@ -0,0 +1,295 @@ + +#pragma hdrstop +#include + + +//--------------------------------------------------------------------------- +#pragma argsused +/***************************************************************************** + * + */ + + extern "C" { +#include "online.h" +} + +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include + + +USEUNIT("..\src\keys\listkey.cpp"); +USEUNIT("..\src\keys\strkey.cpp"); +USEUNIT("..\src\keys\swkey.cpp"); +USEUNIT("..\src\keys\versekey.cpp"); +USEUNIT("..\src\utilfuns\utilstr.cpp"); +USEUNIT("all.c"); +//--------------------------------------------------------------------------- +void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size); +char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size); +void openfiles(); +void checkparams(int argc, char **argv); +void charsetconvert(char *data); + + +VerseKey key1, key2, key3; +int fp, vfp, cfp, bfp; +long chapoffset; +short chapsize; +char testmnt; +char startflag = 0; +VerseKey inckey; + + +main(int argc, char **argv) +{ + long pos, offset; + int num1, num2, rangemax, curbook = 0, curchap = 0, curverse = 0; + char buf[127]; + short size, tmp; + extern struct zonline online; + + checkparams(argc, argv); + + inckey = key1 = key2 = key3 = "Genesis 1:1"; + + openfiles(); + + num1 = key1.Chapter(); + num2 = key1.Verse(); + + DOINIT(argv[1]); /* initialize OLB system */ + + while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) { + if (!startflag) { + startflag = 1; + } + else { + if (num2 < key2.Verse()) { // new chapter + if (num1 <= key2.Chapter()) { // new book + key2.Verse(1); + key2.Chapter(1); + key2.Book(key2.Book()+1); + } + printf("Found Chapter Break: %d ('%s')\n", num1, (const char *)key2); + chapoffset = offset; + chapsize = size; +// continue; + } + } + key2.Verse(1); + key2.Chapter(num1); + key2.Verse(num2); + + key3 = key2; +// key3 += (rangemax - key3.Verse()); + + writeidx(key1, key2, key3, offset, size); + } + close(vfp); + close(cfp); + close(bfp); + close(fp); + DOEND(); // close OLB system +} + + +/************************************************************************** + * ENT: key1 - current location of index + * key2 - minimum keyval for which this offset is valid + * key3 - maximum keyval for which this offset is valid + */ + +void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size) +{ + long pos; + short tmp; + + if (key1.Verse() == 1) { // new chapter + if (key1.Chapter() == 1) { // new book + pos = lseek(cfp, 0, SEEK_CUR); + write(bfp, &pos, 4); + pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */ + write(cfp, &pos, 4); + write(vfp, &chapoffset, 4); /* Book intro (vss) set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/ + write(vfp, &chapsize, 2); + } + pos = lseek(vfp, 0, SEEK_CUR); + write(cfp, &pos, 4); + write(vfp, &chapoffset, 4); /* Chapter intro */ + write(vfp, &chapsize, 2); + } + if (key1 >= key2) { + write(vfp, &offset, 4); + write(vfp, &size, 2); + } + else { + pos = 0; + tmp = 0; + write(vfp, &pos, 4); + write(vfp, &tmp, 2); + } + key1++; +} + + + +char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size) +{ + char buf[7]; + char buf2[20]; + char ch; + char loop; + long offset2; + int ch2, vs2, rm2; + bool flag; + long chapstart = 0; + static int olbvnum = 0; + short versedata[MAX_VERSE]; + char data[MAX_DATA]; + int len; + + + if (++olbvnum <= 31102) { + + if (olbvnum == 23146) { // "Matthew 1:1" + close(vfp); + close(cfp); + close(bfp); + close(fp); + key1 = key2 = key3 = inckey = "Matthew 1:1"; + openfiles(); + startflag = 0; + } + + + *offset = lseek(fp, 0, SEEK_CUR); + + if ((olbvnum!=1) && (olbvnum != 23146)) + inckey++; + + *num1 = inckey.Chapter(); + *num2 = inckey.Verse(); + + // output verse from olb +// printf("%s\n", (const char *)inckey); + GETEXT(olbvnum, versedata, 1, 1, 1, 1); + BLDVERSE(versedata, data); + charsetconvert(data); + len = strlen(data); + if (len) + write(fp, data, strlen(data)); + + *size = lseek(fp, 0, SEEK_CUR) - *offset; + write(fp, "\n", 1); + return 0; + } + return 1; +} + +void charsetconvert(char *data) +{ + for (;*data; data++) { +// printf("%c %d", *data, *data); + switch((unsigned char)*data) { + case 129: *data = 252; break; + case 130: *data = 233; break; + case 131: *data = 226; break; + case 133: *data = 224; break; + case 135: *data = 231; break; + case 136: *data = 234; break; + case 137: *data = 235; break; + case 138: *data = 232; break; + case 139: *data = 239; break; + case 140: *data = 238; break; + case 144: *data = 201; break; + case 147: *data = 244; break; + case 150: *data = 251; break; + case 151: *data = 249; break; + case 160: *data = 225; break; + case 161: *data = 237; break; + case 162: *data = 243; break; + case 163: *data = 250; break; + case 164: *data = 241; break; + case 168: *data = 191; break; + case 173: *data = 161; break; + default: + if ((unsigned char)*data > 126) + fprintf(stderr, "Suspicious character: %c (%d); %s\n", *data, (unsigned char )*data, (const char *)inckey); + break; + } + } +} + + +void openfiles() +{ + char buf[255]; + char fname[5]; + long pos; + short size; + + testmnt = key1.Testament(); + + strcpy(fname, (testmnt==2) ? "nt" : "ot"); + unlink(fname); + if ((fp = open(fname, O_CREAT|O_RDWR|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + fprintf(stderr, "Couldn't open file: %s\n", fname); + exit(1); + } + + sprintf(buf, "%s.vss", fname); + unlink(buf); + if ((vfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + fprintf(stderr, "Couldn't open file: %s\n", buf); + exit(1); + } + + sprintf(buf, "%s.cps", fname); + unlink(buf); + if ((cfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + fprintf(stderr, "Couldn't open file: %s\n", buf); + exit(1); + } + + sprintf(buf, "%s.bks", fname); + unlink(buf); + if ((bfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + fprintf(stderr, "Couldn't open file: %s\n", buf); + exit(1); + } + + pos = 0; + write(bfp, &pos, 4); /* Book offset for testament intros */ + pos = 4; + write(cfp, &pos, 4); /* Chapter offset for testament intro */ + + +/* Right now just zero out intros until parsing correctly */ + pos = 0; + size = 0; + write(vfp, &pos, 4); /* Module intro */ + write(vfp, &size, 2); + write(vfp, &pos, 4); /* Testament intro */ + write(vfp, &size, 2); + +} + + +void checkparams(int argc, char **argv) +{ + if (argc < 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + exit(1); + } +} diff --git a/olb/online.ide b/olb/online.ide new file mode 100644 index 0000000..efc10f0 Binary files /dev/null and b/olb/online.ide differ diff --git a/olb/online.prj b/olb/online.prj new file mode 100644 index 0000000..17be6ae --- /dev/null +++ b/olb/online.prj @@ -0,0 +1 @@ +Turbo C Project File \ No newline at end of file diff --git a/olb/prn2sword.bpr b/olb/prn2sword.bpr new file mode 100644 index 0000000..9051810 --- /dev/null +++ b/olb/prn2sword.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..\src\mgr;..\src\utilfuns;..\src\keys;$(BCB)\include;$(BCB)\include\vcl;..\include +Item1=..\src\utilfuns;..\src\keys;$(BCB)\include;$(BCB)\include\vcl;..\include +Item2=$(BCB)\include;$(BCB)\include\vcl;../include + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..\src\mgr;..\src\utilfuns;..\src\keys;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\src\utilfuns;..\src\keys;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/olb/prn2sword.cpp b/olb/prn2sword.cpp new file mode 100644 index 0000000..edf2994 --- /dev/null +++ b/olb/prn2sword.cpp @@ -0,0 +1,32 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("prn2sword.res"); +USEFORM("prn2swordfrm.cpp", Form2); +USEUNIT("..\src\keys\versekey.cpp"); +USEUNIT("..\src\keys\strkey.cpp"); +USEUNIT("..\src\keys\swkey.cpp"); +USEUNIT("..\src\keys\listkey.cpp"); +USEUNIT("..\src\utilfuns\utilstr.cpp"); +USEUNIT("..\src\mgr\localemgr.cpp"); +USEUNIT("..\src\mgr\swlocale.cpp"); +USEUNIT("..\src\mgr\swconfig.cpp"); +USEUNIT("..\src\mgr\swmgr.cpp"); +USEUNIT("..\src\mgr\filemgr.cpp"); +USEUNIT("..\src\utilfuns\roman.c"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TForm2), &Form2); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/olb/prn2swordfrm.cpp b/olb/prn2swordfrm.cpp new file mode 100644 index 0000000..b4bfaad --- /dev/null +++ b/olb/prn2swordfrm.cpp @@ -0,0 +1,484 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "prn2swordfrm.h" +#include +#include +#include +#include +#include + +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TForm2 *Form2; +const MAXVLEN = 8192; +//--------------------------------------------------------------------------- +__fastcall TForm2::TForm2(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TForm2::FSButtonClick(TObject *Sender) +{ + FSDialog->FileName = "*.rtf"; + char *fname; + + if (FSDialog->Execute()) { + FilePathEdit->Text = FSDialog->FileName; + } +} +//--------------------------------------------------------------------------- + + +void TForm2::ProcessFile(char *fileName) +{ + unsigned long pos = 0L; + unsigned short size = 0, tmp; + int verseNum, curbook = 0, curchap = 0, curverse = 0, curTestament = 1; + char buf[127]; + VerseKey mykey; + char verseBuf[MAXVLEN]; + bool fail = false; + char end = 0; + + + if ((fp = open(fileName, O_RDONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + sprintf(buf, "Couldn't open file: %s\n", fileName); + MessageBox(this->Handle, buf, "ProcessFile", MB_OK); + return; + } + + openFiles("ot"); + + mykey = "Genesis 1:1"; + + getVerse(fp, &verseNum, verseBuf, 1); + do { + end = getVerse(fp, &verseNum, verseBuf, mykey.Testament()); + if (mykey.Verse() == 1) { /* if we're at a new chapter */ + if (mykey.Chapter() == 1) { /* if we're at a new book */ + if (mykey.Testament() != curTestament) { // we've made it to new testament + curTestament = mykey.Testament(); + close(vfp); // verse + close(cfp); // chapter + close(bfp); // book + close(dfp); // data + openFiles("nt"); + } + Memo1->Text = ""; + pos = lseek(cfp, 0, SEEK_CUR); + write(bfp, &pos, 4); + pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */ + write(cfp, &pos, 4); + pos = 0L; + tmp = 0; + write(vfp, &pos, 4); /* Book intro (vss) */ + write(vfp, &tmp, 2); + curbook++; + curchap = 0; + } + pos = lseek(vfp, 0, SEEK_CUR); + write(cfp, &pos, 4); + curverse = 1; + pos = 0L; + tmp = 0; + write(vfp, &pos, 4); /* Chapter intro */ + write(vfp, &tmp, 2); + curchap++; + } + else curverse++; + + if (mykey.Chapter() != curchap) { + sprintf(buf, "Error: Found chaptures out of sequence"); + Memo1->Lines->Append(buf); + fail = true; + break; + } + if ((mykey.Verse() != curverse) || (curverse != verseNum)) { + Memo1->Lines->Append("Error: Found verses out of sequence"); + sprintf(buf, "Expected %d (%s), but got %d\n\n", curverse, (const char *)mykey, verseNum); + Memo1->Lines->Append(buf); + Memo1->Lines->Append(" Currently SWORD only supports KJV verse numbering and book ordering."); + Memo1->Lines->Append(" Try combining extra verses with the last valid verse just before, including it in footnote markers (eg. (24) verse text. (25) verse text)"); + Memo1->Lines->Append(" This way, even though they will display in SWORD along with the previous verse, all data will be displayed."); + Memo1->Lines->Append(" Where verses are missing, add a blank entry."); + Memo1->Lines->Append(" Then try rerunning"); + fail = true; + break; + } + + pos = lseek(dfp, 0, SEEK_CUR); + write(vfp, &pos, 4); + size = strlen(verseBuf); + write(vfp, &size, 2); + sprintf(buf, "%2d:%3d:%3d (%s) found at offset: %7ld; size: %d", curbook, mykey.Chapter(), mykey.Verse(), (const char *)mykey, pos, size); + Memo1->Lines->Append(buf); + if ((size < 0) || (size > 1000)) { + Memo1->Lines->Append("WARNING: Strange Size."); + } + write(dfp, verseBuf, size); + mykey++; + } while (!end); + + close(vfp); // verse + close(cfp); // chapter + close(bfp); // book + close(dfp); // data + close(fp); // source + if (!fail) + Memo1->Lines->Append("SUCCESS!!!!!!!"); +} + + +char TForm2::getVerse(int fp, int *verseNum, char *verseBuf, char testament) +{ + char buf[21]; + char retVal = 0; + *verseNum=-1; + char *finalBuf = verseBuf; + int paridx; + const char *parchar = "\\par"; + + memset(buf, 0, 21); + + while (1) { + + if (!memcmp(buf, "\\f1 \\b0 \\fs22 \\f", 17)) { + if (isdigit(buf[18])) { + lseek(fp, -1, SEEK_CUR); + break; + } + else if (isdigit(buf[17])) { + lseek(fp, -2, SEEK_CUR); + break; + } + } + if (!memcmp(buf, "\\f1 \\b0 \\fs22 ", 14)) { + lseek(fp, -7, SEEK_CUR); + break; + } + if (!memcmp(buf, "\\li0\\fi0 \\par \\u", 16)) { + lseek(fp, -4, SEEK_CUR); + while(read(fp, buf, 1) == 1) { + if (*buf == 10) + break; + } + memset(buf, 0, 21); + } + memmove(buf, &buf[1], 20); + if (*buf) { + *verseBuf++ = *buf; + if (*verseNum == -1) { + if (isdigit(*buf)) { + sscanf(buf, "%d", verseNum); + } + } + } + if (read(fp, &buf[20], 1) != 1) { + retVal = 1; + for (int i = 1; i < 12; i++) + *verseBuf++ = buf[i]; + break; + } + } + *--verseBuf = 0; + paridx = 3; + // trim trailing junk + do { + verseBuf--; + if (paridx > -1) { + if (*verseBuf == parchar[paridx]) { + *verseBuf = 0; + paridx--; + continue; + } + if (paridx < 3) { + for (;paridx < 4;paridx++) + *verseBuf++ = parchar[paridx]; + break; + } + } + if ((*verseBuf != ' ') && (*verseBuf != 10) && (*verseBuf != 13) && (*verseBuf != '\\')) + break; + *verseBuf = 0; + } while (verseBuf > finalBuf); + *++verseBuf = 0; + + // check for Paragraph marker on next verse + for (int i = 7; i < 48; i++) { + if (buf[i] == '¶') { + *verseBuf++ = '<'; + *verseBuf++ = 'C'; + *verseBuf++ = 'M'; + *verseBuf++ = '>'; + *verseBuf++ = 0; + break; + } + } + + filterVerse(finalBuf, (testament == 2)?'G':'H'); + + return retVal; +} + + + + + + + +// lang - 'G' | 'H' +void TForm2::filterVerse(char *text, char lang) +{ + char *to, *from, token[MAXVLEN], tokpos = 0; + bool intoken = false; + bool intoken2 = false; + bool deref = false; + bool lastspace = false; + int len; + int maxlen = MAXVLEN - 1; + + + len = strlen(text) + 1; // shift string to right of buffer + if (len < maxlen) { + memmove(&text[maxlen - len], text, len); + from = &text[maxlen - len]; + } + else from = text; // ------------------------------- + + while (*from) { + if ((*from != ' ') && (!isdigit(*from)) && (*from != 10) && (*from !=13)) + break; + from++; + } + + for (to = text; *from; from++) { + if ((*from == '\\') && (!deref)) { + deref = true; + continue; + } + if (*from == '<') { + if (!isdigit(from[1])) { // Not a strongs number + if ((from[1] != 'C') || (from[2] != 'M') || (from[3] != '>')) { + *to++ = '<'; + *to++ = 'F'; + *to++ = 'O'; + *to++ = '>'; + continue; + } + } + } + if (*from == '>') { + if (!isdigit(from[-1])) { // Not a strongs number + if ((from[-2] != 'C') || (from[-1] != 'M') || (from[-3] != '<')) { + *to++ = '<'; + *to++ = 'F'; + *to++ = 'o'; + *to++ = '>'; + continue; + } + } + } + if (deref) { + deref = false; + if (*from == '{') { + *to++ = '<'; + *to++ = 'R'; + *to++ = 'F'; + *to++ = '>'; + continue; + } + + if (*from == '}') { + *to++ = '<'; + *to++ = 'R'; + *to++ = 'f'; + *to++ = '>'; + if (from[1] == '\\' && from[2] == 'i' && from[3] == '0') { + from += 3; + if (from[1] == ' ') { + if (lastspace) + from++; + } + } + continue; + } + if (*from == 'i') { + if (from[1] == '1') { + if (from[2] == ' ' && from[3] == '\\' && from[4] == '{') { + from++; + if (lastspace) + from++; + continue; + } + *to++ = '<'; + *to++ = 'F'; + *to++ = 'I'; + *to++ = '>'; + from++; + if (from[1] == ' ') { + if (lastspace) + from++; + } + continue; + } + if (from[1] == '0') { + *to++ = '<'; + *to++ = 'F'; + *to++ = 'i'; + *to++ = '>'; + from++; + if (from[1] == ' ') { + if (lastspace) + from++; + } + if ((from[1] == ' ') && (from[2] == ' ')){ // dorky, but OLB places 2 spaces after italics off + from++; + } + continue; + } + } + if (*from == 'f' && from[1] == 's') { + from++; + while (isdigit(from[1])) { + from++; + } + if (from[1] == ' ') { + if (lastspace) + from++; + } + continue; + } + *to++ = '\\'; + *to++ = *from; + lastspace = (*from == ' '); + continue; + } + + if (*from == '<') { + if (isdigit(from[1])) { + intoken = true; + tokpos = 0; + memset(token, 0, 20); + continue; + } + } + if (*from == '(') { + if (isdigit(from[1])) { + intoken2 = true; + tokpos = 0; + memset(token, 0, 20); + continue; + } + } + if ((*from == '>') && (intoken)) { + intoken = false; + if (*(to - 1) == ' ') + to--; + *to++ = '<'; + *to++ = 'W'; + *to++ = lang; + for (int i = 0; i < strlen(token); i++) + *to++ = token[i]; + *to++ = '>'; + continue; + } + if ((*from == ')') && (intoken2)) { + intoken2 = false; + if (*(to - 1) == ' ') + to--; + *to++ = '<'; + *to++ = 'W'; + *to++ = 'T'; + *to++ = lang; + for (int i = 0; i < strlen(token); i++) + *to++ = token[i]; + *to++ = '>'; + continue; + } + + if ((*from == 13) || (*from == 10)) { + continue; + } + + if (*from == '¶') { + if (from[1] == ' ') { + from++; + } + continue; + } + + if (intoken || intoken2) + token[tokpos++] = *from; + else + *to++ = *from; + lastspace = (*from == ' '); + } + *to-- = 0; + *++to = '\n'; + *++to = 0; +} + + +void TForm2::openFiles(char *fileName) +{ + char buf[128]; + long pos; + short size; + + unlink(fileName); + if ((dfp = open(fileName, O_CREAT|O_WRONLY, S_IREAD|S_IWRITE)) == -1) { + sprintf(buf, "Couldn't open file: %s\n", fileName); + MessageBox(this->Handle, buf, "ProcessFile", MB_OK); + return; + } + + sprintf(buf, "%s.vss", fileName); + unlink(buf); + if ((vfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + sprintf(buf, "Couldn't open file: %s\n", buf); + MessageBox(this->Handle, buf, "ProcessFile", MB_OK); + return; + } + + sprintf(buf, "%s.cps", fileName); + unlink(buf); + if ((cfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + sprintf(buf, "Couldn't open file: %s\n", buf); + MessageBox(this->Handle, buf, "ProcessFile", MB_OK); + return; + } + + sprintf(buf, "%s.bks", fileName); + unlink(buf); + if ((bfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE)) == -1) { + sprintf(buf, "Couldn't open file: %s\n", buf); + MessageBox(this->Handle, buf, "ProcessFile", MB_OK); + return; + } + pos = 0; + write(bfp, &pos, 4); /* Book offset for testament intros */ + pos = 4; + write(cfp, &pos, 4); /* Chapter offset for testament intro */ + + +/* Right now just zero out intros until parsing correctly */ + pos = 0; + size = 0; + write(vfp, &pos, 4); /* Module intro */ + write(vfp, &size, 2); + write(vfp, &pos, 4); /* Testament intro */ + write(vfp, &size, 2); + + +} + +void __fastcall TForm2::Button1Click(TObject *Sender) +{ + ProcessFile(FilePathEdit->Text.c_str()); +} +//--------------------------------------------------------------------------- + + diff --git a/olb/prn2swordfrm.dfm b/olb/prn2swordfrm.dfm new file mode 100644 index 0000000..0bc45fc Binary files /dev/null and b/olb/prn2swordfrm.dfm differ diff --git a/olb/prn2swordfrm.h b/olb/prn2swordfrm.h new file mode 100644 index 0000000..85fada2 --- /dev/null +++ b/olb/prn2swordfrm.h @@ -0,0 +1,37 @@ +//--------------------------------------------------------------------------- +#ifndef prn2swordfrmH +#define prn2swordfrmH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm2 : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TLabel *Label1; + TEdit *FilePathEdit; + TButton *FSButton; + TPanel *Panel2; + TButton *Button1; + TMemo *Memo1; + TOpenDialog *FSDialog; + void __fastcall FSButtonClick(TObject *Sender); + void __fastcall Button1Click(TObject *Sender); +private: // User declarations + int fp, vfp, cfp, bfp, dfp; + void openFiles(char *fileName); + void filterVerse(char *finalBuf, char lang); +public: // User declarations + __fastcall TForm2(TComponent* Owner); + void ProcessFile(char *fileName); + char getVerse(int fp, int *verseNum, char *verseBuf, char testament); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm2 *Form2; +//--------------------------------------------------------------------------- +#endif diff --git a/pix/sword.gif b/pix/sword.gif new file mode 100644 index 0000000..bb1fa6b Binary files /dev/null and b/pix/sword.gif differ diff --git a/samples/Makefile.am b/samples/Makefile.am new file mode 100644 index 0000000..3f64a8f --- /dev/null +++ b/samples/Makefile.am @@ -0,0 +1,33 @@ +EXTRA_DIST += samples/mods.d/globals.conf + +modsdatadir = $(pkgdatadir)/mods.d + +if INSTCONF +modsDATA = samples/mods.d/globals.conf + +installmodsDATA: $(modsDATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(modsdatadir) + @list='$(modsDATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(modsdatadir)/$$f"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(modsdatadir)/$$f; \ + done + +uninstallmodsDATA: + @$(NORMAL_UNINSTALL) + @list='$(modsDATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(modsdatadir)/$$f"; \ + rm -f $(DESTDIR)$(modsdatadir)/$$f; \ + done +else +installmodsDATA: + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(modsdatadir) \ + done + +uninstallmodsDATA: + +endif diff --git a/samples/mods.conf.large b/samples/mods.conf.large new file mode 100644 index 0000000..91f8fcc --- /dev/null +++ b/samples/mods.conf.large @@ -0,0 +1,466 @@ +[Globals] +AutoInstall=./newmods/ + +[-+*Personal*+-] +DataPath=/usr/local/sword/modules/comments/rawfiles/personal/ +ModDrv=RawFiles +Description=Personal Commentary +About=This module allows you to store your own commentary. + +[SpanishRVA] +DataPath=/usr/local/sword/modules/texts/rawtext/spanishrva/ +ModDrv=RawText +SourceType=GBF +Description=The New International Version +About=\qc El texto b¡blico designado RVA es de LA SANTA BIBLIA, \par \ +VERSION REINA-VALERA ACTUALIZADA. Copyright 1982, 1986, \par \ +1987, 1989 de la Casa Bautista de Publicaciones. \par\par \ +Todos los derechos reservados. \par\par \ +El texto computarizado de la RVA para LA BIBLIA COM- \par \ +PUTARIZADA no puede ser modificado ni copiado sin per- \par \ +miso por escrito por la Casa Bautista de Publicaciones. \par\pard \ + + +[NASB] +DataPath=/usr/local/sword/modules/texts/rawtext/nasb/ +ModDrv=RawText +Description=The New American Standard Bible +About=\qc -=+* see the file errata.doc for important verse descrepencies *+=- \par\par \ +The New American Standard Bible \par \ +Copyright THE LOCKMAN FOUNDATION, 1960, 1962, 1963 \par \ +La Habra, Calif. \par \ +All rights in this book are reserved. \par \ +No part may be reproduced in any manner without \par \ +permission in writing from The Lockman Foundation, \par \ +except brief quotations used in connection with \par \ +a review in a magazine or newspaper. \par\pard + + + + +[NIV] +DataPath=/usr/local/sword/modules/texts/rawtext/niv/ +ModDrv=RawText +Description=The New International Version +About=\qc -=+* see the file errata.doc for important verse descrepencies *+=- \par\par\pard \ +Quotations designated (NIV) are from \par\par \ +THE HOLY BIBLE: NEW INTERNATIONAL VERSION®. \par \ +Copyright © 1973, 1978, 1984 by International Bible Society; \ +Zondervan Publishing House. All rights reserved. \par\par \ +The "NIV" and "New International Version" trademarks are registered in \ +the United States Patent and Trademark Office by International Bible \ +Society. \par\par \ +The NIV text may be quoted in any form (written, visual, electronic, or \ +audio), up to and inclusive of five hundred (500) verses or less without \ +written permission, providing the verses quoted do not amount to a \ +complete book of the Bible, do not comprise 25% or more of the total \ +text of the work in which they are quoted, and the verses are not being \ +quoted in a commentary or other Biblical reference work. This \ +permission is contingent upon an appropriate copyright acknowledgment. \par\par \ +The NIV database is not a shareware program and may not be \ +duplicated. \par\par\pard + + +[JFB] +DataPath=/usr/local/sword/modules/comments/hrefcom/jfb/ +ModDrv=HREFCom +Prefix=http://ccel.wheaton.edu/j/jfb/jfb/ +;External=0 +;Prefix=file:////usr/local/sword/modules/comments/hrefcom/jfb/ +External=1 +Description=Jamison Faucett Brown Bible Commentary +About=\qc Jamison Faucett Brown Commentary + + +[Naves] +DataPath=/usr/local/sword/modules/lexdict/rawld/naves/naves +ModDrv=RawLD +Description=Nave's Topical Bible +About= -=+* see the file 'naves.doc' for more details *+=-\par\par \ +\qc Nave's Topical Bible \par\par \ +Public Domain -- Copy Freely \par\par\pard \ + Nave's Topics were originaly produced by Orville J. Nave, A.M., D.D., \ +LL.D. while serving as a Chaplin in the United States Army. He referred \ +to this work as "the result of fourteen years of delightful and untiring \ +study of the Word of God." Nave's topics were originally published in \ +the early 1900's, and a photo-offset reproduction is currently published \ +by Hendrickson, ISBN 0-917006-02-X. The title page states that this \ +work consists of 20,000+ topics and subtopics, and 100,000 references to \ +the Scriptures. \par\par \ + The most current and correct copies of these files can be obtained from the \ +following. If any errors are located, please ensure you have the latest files, and if so, \ +we would appreciate being informed of the error. \par\par \ + The Bible Foundation \par \ + http://www.bf.org \par\par \ + Or by contacting: \par\par \ + Mark Fuller \par \ + 1129 East Loyola Drive \par \ + Tempe, Arizona, 85282 \par \ + 602-829-8542 (voice) + +[BBE] +DataPath=/usr/local/sword/modules/texts/rawtext/bbe/ +ModDrv=RawText +Description=The Bible in Basic English +About= \qc -=+* see the file 'bbe.doc' for more details *+=-\par\par \ +1949/1964 Bible In Basic English \par \ +Public Domain -- Copy Freely \par\par\pard \ +The Bible In Basic English was printed in 1965 by Cambridge Press in \ +England. Published without any copyright notice and distributed in \ +America, this work fell immediatly and irretrievably into the Public \ +Domain in the United States according to the UCC convention of that \ +time. A call to Cambridge prior to placing this work in etext resulted \ +in an admission of this fact. \par\par \ +For more information about the text, see the file INTRO.BBE which \ +contains the printed introduction page. \par\par \ +The most current and correct copies of these files can be obtained from \ +the following. If any errors are located, please ensure you have the \ +latest files, and if so, we would appreciate being informed of the \ +error. \par\par \ + The Bible Foundation \par \ + http://www.bf.org \par\par \ +Or by contacting: \par \ + Mark Fuller\par \ + 1129 East Loyola Drive \par \ + Tempe, Arizona, 85282 \par \ + 602-829-8542 (voice) + +[IndTB] +DataPath=/usr/local/sword/modules/texts/rawtext/indtb/ +ModDrv=RawText +Description=Indonesian Terjemahan Baru +About=\qc Terjemahan Baru (TB) \par\par \ +Copyright Lembaga Alkitab Indonesia \par \ +(Indonesian Bible Society), 1994. \par \ +Released for non-profit scholarly and personal use. \par \ +Not to be sold for profit. \par \ +When making formal public reference to the materials, \par \ +please acknowlege The Indonesian Bible Society \par \ +(Lembaga Alkitab Indonesia) as the copyright holder. \par \pard + + + +[IndBIS] +DataPath=/usr/local/sword/modules/texts/rawtext/indbis/ +ModDrv=RawText +Description=Indonesian Bahasa Indonesia Sehari-hari (BIS) +About=\qc Bahasa Indonesia Sehari-hari (BIS) \par\par \ +Copyright Lembaga Alkitab Indonesia \par \ +(Indonesian Bible Society), 1994. \par \ +Released for non-profit scholarly and personal use. \par \ +Not to be sold for profit. \par \ +When making formal public reference to the materials, \par \ +please acknowlege The Indonesian Bible Society \par \ +(Lembaga Alkitab Indonesia) as the copyright holder. \par \pard + + + +[Websters] +DataPath=/usr/local/sword/modules/texts/rawtext/websters/ +ModDrv=RawText +Description=The Webster Bible +About= -=+* see the files 'intro.txt' and 'revision.txt' for more details *+=-\par\par \ +\qc THE \par HOLY BIBLE, \par CONTAINING THE \par OLD AND NEW TESTAMENTS, \par IN THE \par \ +COMMON VERSION. \par WITH \par AMENDMENTS OF THE LANGUAGE, \par \ +BY NOAH WEBSTER, LL. D. \par\par ------------- \par NEW HAVEN: \par \ +PUBLISHED BY DURRIE & PECK. \par \ +Sold by HEZEKIAH HOWE & CO., and A. H. MALTBY, New Haven; \par \ +and by N.&J. WHITE, New York. \par\par ------ \par 1833 \par\par \ +Webster Bible Electronic Format.\par \ +PUBLIC DOMAIN\par\par \ +February 1992\par\par\pard \ +Webster Biography:\par \ +Noah Webster: America's first grammarian and founding father of American education.\par\par \ + In 1828 Noah Webster published the 'American Dictionary of the English Language'. This \ +dictionary demonstrates the Christian values which were found in America's educational \ +and scholarly systems. It is from this early dictionary that we have todays popular \ +'Webster Dictionary'. In 1833 Noah Webster, who had mastered 20 languages including \ +Hebrew and Greek, published the King James Authorized Version 'with amendments to the \ +language'. In stating his reasons for producing this version of the Bible, Webster said:\par\par \ + 'In the present version, the language is, in general, correct and perspicuous; \ +... in many passages uniting sublimity with beautiful simplicity. In my view, the general \ +style of the version ought not to be altered. But, in the lapse of two or three centuries, \ +changes have taken place, which, in particular passages, impair the beauty; in others, \ +obscure the sense, of the original languages. ... they do not present to the reader \ +the Word of God. ... My principal aim is to remedy this evil.'\par\par \ +It was with cautious reverence that Webster corrected misused grammar, removed offensive \ +terms and expressions, and substituted commonly understood words for words that had fallen \ +into disuse, or no longer carried the same meaning.\par\par\ + In 1834, the year after completing the Webster Bible, Noah Webster wrote a \ +companion piece titled 'Value of the Bible and Excellence of the Christian Religion - For \ +the Use of Families and Schools'.\par\par\ + Webster, who was considered 'The schoolmaster to a nation' and produced the \ +earliest spellers and textbooks for America's school children, believed Christian religious \ +values and American public education to be inseparable. He believed the Webster Bible to \ +be 'the most important enterprise' of his life, and referred to the Bible as:\par\par \ + '... the chief moral cause of all that is good, and the best corrector of all that \ +is evil, in human society; the best book for regulating the temporal concerns of men, and \ +the only book that can serve as an infallible guide to future felicity.'\par\par \ +Introduction to the Electronic Format:\par \ + Beginning in July of 1991 the task of placing the Webster Bible text in electronic \ +format began. The original purpose was to provide Larry Pierce, who produces the \ +On-Line Bible program, with a more modern *public domain* text, similar in content and \ +style to the AV but with a grammar that would provide better comprehension in todays \ +English.\par\par\ + I plan on maintaining an accurate copy of the Webster text. Anyone finding an \ +error should contact me; Anyone desiring to obtain the latest, most correct text, can find \ +it on the Bible Foundation BBS, or can contact me in the following methods:\par \ + Internet acus10@waccvm.corp.mot.com\par \ + Home phone 602-829-8542\par \ + Address Mark Fuller\par \ + 1129 East Loyola Drive\par \ + Tempe Arizona, 85282\par \ + Bible Foundation http://www.bf.org\par\par \ + I would like to thank the Bible Foundation not only for scanning nearly the entire \ +Webster Bible but for encouraging me to undertake this monumental work; particularly around \ +page 20 when I realized what I had gotten myself into. Special thanks to Jerry Kingery of \ +the Bible Foundation for scanning, and Jerry Hastings for doing some preliminary scan \ +cleaning and making the texts available on the BBS. + + +[Sve] +DataPath=/usr/local/sword/modules/texts/rawtext/sve/ +ModDrv=RawText +Description=Swedish Bible 1917 New Testament +About=\qc BIBELN eller DEN HELIGA SKRIFT \par innehållande \par \ +NYA TESTAMENTETS KANONISKA BÖCKER \par i överensstämmelse med den av \par \ +KONUNGEN ÅR 1917 \par gillade och stadfästa översättningen \par\par \ +THE BIBLE or THE HOLY SCRIPT \par containing \par CANONICAL BOOKS OF NEW TESTAMENT \par \ +in conformity with that of \par THE KING YEAR 1917 \par \ +liked and confirmed translation \par\par\pard \ + Thank you to Roland Nygren for making this work available. For the latest \ +information, to report corrections, or for other correspondence: \par\par \ + Roland Nygren \par \ + qtxrony@aom.ericsson.se + +[VNT] +DataPath=/usr/local/sword/modules/texts/rawtext/vnt/ +ModDrv=RawText +Description=Valera 1858 Spanish New Testament Text +About=\qc-=+* see the file 'intro.rtf' for more details *+=- \par\par \ +El \par NUEVO TESTAMENTO \par DE \par NUESTRO SEÑOR JESU-CRISTO \par \ +QUE CONTIENE \par LOS ESCRITOS EVANGÉLICOS Y APOSTÓLICOS \par \ +ANTIGUA VERSION DE CIPRIANO DE VALERA \par REVISADA \par \ +Con arreglo al original griego. \par MADRID \par \ +SE HALLA EN EL DEPÓSITO CENTRAL DE LA SOCIEDAD BÍBLICA B. Y E. \par \ +Calle de Preciados, número 46. \par 1884 \par EL SANTO EVANGELIO \par DE \par \ +NUESTRO SEÑOR JESU-CRISTO \par SEGUN \par SAN MATEO. \par\par \pard \ + Thank you to Bill Kincaid for making this work available. \ +This New Testament text (Valera 1858) was downloaded from The Word of God in \ +Spanish: Valera 1909 web site. (http://www.west.ga.net/~ForHim/word.html) This text is not \ +copyrighted, you are free to distribute it as you wish. We only ask out of respect for the \ +work we invested in bringing you this text (Finding, scanning, and proofing.), that you \ +leave this notice and the following introduction ([see the file intro.rtf]) in any copies \ +that you might make publish on the Internet. If you have any questions or comments please \ +contact: mnj@acnet.net \par\par \ + Este texto del Nuevo Testamento (Valera 1858) fue bajado del la pagina de \ +web: La Palabra de Dios en Español: Valera 1909. (http://www.west.ga.net/~ForHim/word.html) \ + Este texto no tiene derechos reservados, puedes distribuirlo como quieres. Solamente \ +pedimos que por respeto del trabajo que invertimos en dándote este texto (Encontrando, \ +escaneando, y corrigiendo.), que dejes esta noticia y la siguiente introducción \ +(FILE: intro.rtf) en cualquier copia que publicas sobre el Internet. Si tienes cualquier \ +pregunta o comentario por favor escribe a: mnj@acnet.net. + + +[MHC] +DataPath=/usr/local/sword/modules/comments/rawcom/mhc/ +ModDrv=RawCom +Description=Matthew Henry's Commentary on the Whole Bible +About=\qc Matthew Henry's \par Concise Commentary on the Whole Bible \par\par \ +Public Domain--Copy Freely. \par\par\pard \ + This text matches the printed edition as published by Moody Press, 28th printing, \ +no Copyright displayed. ISBN: 0-8024-5190-X. This text was created from an existing \ +electronic copy, with roughly 1200 errors corrected. The current files can be \ +found at: \par\par \ + The Bible Foundation, \par \ + http://www.bf.org \par\par \ + If any errors are located, please notify me at the above BBS, or at: \par\par \ + Mark Fuller \par \ + 1129 E. Loyola Dr. \par \ + Tempe, Az. 85282 \par \ + (602) 829-8542 + + + +[RWP] +DataPath=/usr/local/sword/modules/comments/rawcom/rwp/ +ModDrv=RawCom +Description=Robertson's Word Pictures +About=\qc -=+* see the files 'about.txt', 'title.pg', 'rwp.int', 'read.me', and \ +'correct.txt' for more details *+=- \par\par \ + Robertson's \par Word Pictures in the \par New Testament \par\par \ +A.T. Robertson, A.M., D.D., LL. D., Litt.D. \par\par\pard \ +Vol 1,2,3,4 Public Domain -- Copy Freely \par\par Volume 5 (c) 1932. \par \ +Renewal 1960 Broadman Press. All rights reserved. \par Used by permission. \par \ +[Copyright expires Dec. 31, 2006.] \par\par Volume 6 (c) 1933. \par \ +Renewal 1960 Broadman Press. All rights reserved. \par Used by permission. \par \ +[Copyright expires Dec. 31, 2007.] \par\par \ ++--------------- Copy Freely --------------+ \par\par \ + The current files can be found at: \par\par \ + The Bible Foundation, \par \ + http://www.bf.org \par\par \ + If any errors are located, please notify me at the above location, or at: \par\par \ + Mark Fuller \par \ + 1129 E. Loyola Dr. \par \ + Tempe, Az. 85282 \par \ + (602) 829-8542 + + +[Eastons] +DataPath=/usr/local/sword/modules/lexdict/rawld/eastons/eastons +ModDrv=RawLD +Description=Easton's Bible Dictionary +About=\qc Easton's 1897 Bible Dictionary \par\par \ +Public Domain -- Copy Freely \par\par\pard \ + These Dictionary topics are from M.G. Easton M.A., D.D., Illustrated Bible \ +Dictionary, Third Edition, published by Thomas Nelson, 1897. Due to the nature of etext, \ +the illustrated portions of the Dictionary have not been included. \par\par \ + The most current and correct copies of these files can be obtained from the \ +following. If any errors are located, please ensure you have the latest files, and if so, \ +we would appreciate being informed of the error. \par\par \ + The Bible Foundation \par \ + http://www.bf.org \par\par \ + Or by contacting: \par\par \ + Mark Fuller \par \ + 1129 East Loyola Drive \par \ + Tempe, Arizona, 85282 \par \ + 602-829-8542 (voice) + +[Vines] +DataPath=/usr/local/sword/modules/lexdict/rawld/vines/vines +ModDrv=RawLD +Description=Vines Bible Dictionary +About=\qc Vine's Expository Dictionary \par of New Testament Words \par\par \ +Public Domain -- Copy Freely \par\par\pard \ + These Dictionary topics are from W.E. Vine's M.A., Expository Dictionary of New Testament \ +Words published in 1940 and without copyright. \par\par \ + The most current and correct copies of these files can be obtained from the \ +following. If any errors are located, please ensure you have the latest files, and if so, \ +we would appreciate being informed of the error. \par\par \ + The Bible Foundation \par \ + http://www.bf.org \par\par \ + Or by contacting: \par\par \ + Mark Fuller \par \ + 1129 East Loyola Drive \par \ + Tempe, Arizona, 85282 \par \ + 602-829-8542 (voice) + + +[Strongs Hebrew (OT)] +DataPath=/usr/local/sword/modules/lexdict/rawld/strongs/hebrew +ModDrv=RawLD +Description=Strong's / Englishman's Hebrew Bible Dictionary +About=\qc Strong's / Englishman's Bible Dictionary \par\par \pard \ +This is a lexicon of Hebrew words keyed off of Strong's numbers. + +[Strongs Greek (NT)] +DataPath=/usr/local/sword/modules/lexdict/rawld/strongs/greek +ModDrv=RawLD +Description=Strong's / Englishman's Greek Bible Dictionary +About=\qc Strong's / Englishman's Bible Dictionary \par\par \pard \ +This is a lexicon of Greek words keyed off of Strong's numbers. + + + +[WEB] +DataPath=/usr/local/sword/modules/texts/rawtext/web/ +ModDrv=RawText +Description=The World English Bible +About= -=+* see the file 'info.txt' for more details *+=-\par\par \ +\qc The World English Bible (WEB) \par\par Public Domain \par\par \pard \ + The World English Bible is a 1997 revision of the American Standard Version of the \ +Holy Bible, first published in 1901. It is in the Public Domain. Please feel free to copy \ +and distribute it freely. \par\par \ + Thank you to Michael Paul Johnson for making this work available. For the latest \ +information, to report corrections, or for other correspondence: \par\par \ + Michael Paul Johnson \par \ + http://www.ebible.org/bible \par \ + mpj@ebible.org + + +[ORTHJBC] +DataPath=/usr/local/sword/modules/texts/rawtext/orthjbc/ +ModDrv=RawText +Description=The Orthodox Jewish Brit Chadasha +About= \qc THE ORTHODOX JEWISH BRIT CHADASHA \par\par \pard \ + A translation from the original language without goyishe and non-frum \ +terminology. \par\par \ +(C)COPYRIGHT, 1996, ARTISTS FOR ISRAEL INTERNATIONAL \par \ +ALL RIGHTS RESERVED \par \ +USED BY PERMISSION \par\par \ + Thank you to Dr. Phil Goble for making this work available. This work is NOT in \ +the public domain. Please honor all applicable copyright laws. Permission to distribute \ +this text in its present electronic format for personal use has been granted by the \ +copyright holder. \par\par \ + Please direct all correspondence to: \par\par \ + Artists for Israel International \par \ + http://www.afii.org \par \ + P. O. Box 2056 \par \ + New York, NY 10163 + + + +[N27U4] +DataPath=/usr/local/sword/modules/texts/rawtext/nu/ +ModDrv=RawText +Font=Greek +Description=Nestle Aland 27th Ed./ UBS 4th Ed. Greek Text +About= \qc Thank you to Barbara Aland, Kurt Aland, Johannes Karavidopoulos, Carlo M. \ +Martini, and Bruce M. Metzger for bringing this work to us. \par\par \pard \ +GREEK.TTF Greek Regular Font (C) Peter J. Gentry & Andrew M. Fountain, 1993. All Rights \ +Reserved. Special thanks to the copyright holders for permission to use these fonts with \ +The SWORD Project for personal use. For a complete list of Greek / Hebrew Utilities or \ +inquiries for other use may be directed to: \par\par \ + Peter J. Gentry \par \ + 55 Ambercroft Blvd. \par \ + Scarborough \par \ + Ontario, Canada \par \ + M1W 2Z6 + + +[KJV] +DataPath=/usr/local/sword/modules/texts/rawtext/kjv/ +ModDrv=RawText +Description=King James Version of 1611 +About= -=+* see the file 'kjvpref.rtf' for more details *+=-\par\par \ + This is the King James Version of the Holy Bible (also known as the Authorized \ +Version) in Rich Text Format (among others, italics and red included). The preface from \ +the translators is in KJVPREF.RTF. These files are in the Public Domain. \par\par \ + May God bless you as you study His Word. \par \ + Michael Paul Johnson \par \ + Sysop, Colorado Catacombs BBS (303-772-1062) \par \ + email: mpj@csn.net \par \ + http://www.csn.net/~mpj + + + + +[KJVSTR] +DataPath=/usr/local/sword/modules/texts/rawtext/kjvstr/ +ModDrv=RawText +Description=King James Version of 1611 w/ Strongs Numbers +About= This is the King James Version of the Holy Bible (also known as the Authorized \ +Version) with embedded Strong's Numbers. This makes useful for looking up the exact \ +original language word in a lexicon that is keyed off of Strong's numbers. \par\par \ +Special thanks to Larry Pierce for extensive work encorporating the embedded \ +Strong's numbers in this module. This feature is not in the public domain. \ +Permission to use this feature for personal use has been granted by the author. \par \ +Inquiries and comments may be directed to: \par\par \ + Larry Pierce \par \ + 103526.2724@compuserve.com \par \ + http://www.online-bible.com + +[FrenchLSG] +DataPath=/usr/local/sword/modules/texts/rawtext/frenchlsg/ +ModDrv=RawText +Description=French 1910 Louis Segond Version +About=The 1910 edition of the Louis Segond Bible is keyed to Strong's numbers. \ +All this material may be freely copied and shared with your friends. \ +If you wish to use this material for other purposes, please contact: \par\par \ + Stg. Publishare \par \ + c/o Transvaalstraat 5 \par \ + 3312 EX DORDRECHT \par \ + The Netherlands \par\par \ +to obtain the latest accurate copy. The Englishman Strong's numbers are \ +not in the public domain and any commercial use requires a licence. + diff --git a/samples/mods.conf.small b/samples/mods.conf.small new file mode 100644 index 0000000..5b966c8 --- /dev/null +++ b/samples/mods.conf.small @@ -0,0 +1,144 @@ +[Globals] + + +[Websters] +DataPath=/usr/local/lib/sword/modules/texts/rawtext/websters/ +ModDrv=RawText +Description=The Webster Bible +About= -=+* see the files 'intro.txt' and 'revision.txt' for more details *+=-\par\par \ +\qc THE \par HOLY BIBLE, \par CONTAINING THE \par OLD AND NEW TESTAMENTS, \par IN THE \par \ +COMMON VERSION. \par WITH \par AMENDMENTS OF THE LANGUAGE, \par \ +BY NOAH WEBSTER, LL. D. \par\par ------------- \par NEW HAVEN: \par \ +PUBLISHED BY DURRIE & PECK. \par \ +Sold by HEZEKIAH HOWE & CO., and A. H. MALTBY, New Haven; \par \ +and by N.&J. WHITE, New York. \par\par ------ \par 1833 \par\par \ +Webster Bible Electronic Format.\par \ +PUBLIC DOMAIN\par\par \ +February 1992\par\par\pard \ +Webster Biography:\par \ +Noah Webster: America's first grammarian and founding father of American education.\par\par \ + In 1828 Noah Webster published the 'American Dictionary of the English Language'. This \ +dictionary demonstrates the Christian values which were found in America's educational \ +and scholarly systems. It is from this early dictionary that we have todays popular \ +'Webster Dictionary'. In 1833 Noah Webster, who had mastered 20 languages including \ +Hebrew and Greek, published the King James Authorized Version 'with amendments to the \ +language'. In stating his reasons for producing this version of the Bible, Webster said:\par\par \ + 'In the present version, the language is, in general, correct and perspicuous; \ +... in many passages uniting sublimity with beautiful simplicity. In my view, the general \ +style of the version ought not to be altered. But, in the lapse of two or three centuries, \ +changes have taken place, which, in particular passages, impair the beauty; in others, \ +obscure the sense, of the original languages. ... they do not present to the reader \ +the Word of God. ... My principal aim is to remedy this evil.'\par\par \ +It was with cautious reverence that Webster corrected misused grammar, removed offensive \ +terms and expressions, and substituted commonly understood words for words that had fallen \ +into disuse, or no longer carried the same meaning.\par\par\ + In 1834, the year after completing the Webster Bible, Noah Webster wrote a \ +companion piece titled 'Value of the Bible and Excellence of the Christian Religion - For \ +the Use of Families and Schools'.\par\par\ + Webster, who was considered 'The schoolmaster to a nation' and produced the \ +earliest spellers and textbooks for America's school children, believed Christian religious \ +values and American public education to be inseparable. He believed the Webster Bible to \ +be 'the most important enterprise' of his life, and referred to the Bible as:\par\par \ + '... the chief moral cause of all that is good, and the best corrector of all that \ +is evil, in human society; the best book for regulating the temporal concerns of men, and \ +the only book that can serve as an infallible guide to future felicity.'\par\par \ +Introduction to the Electronic Format:\par \ + Beginning in July of 1991 the task of placing the Webster Bible text in electronic \ +format began. The original purpose was to provide Larry Pierce, who produces the \ +On-Line Bible program, with a more modern *public domain* text, similar in content and \ +style to the AV but with a grammar that would provide better comprehension in todays \ +English.\par\par\ + I plan on maintaining an accurate copy of the Webster text. Anyone finding an \ +error should contact me; Anyone desiring to obtain the latest, most correct text, can find \ +it on the Bible Foundation BBS, or can contact me in the following methods:\par \ + Internet acus10@waccvm.corp.mot.com\par \ + Home phone 602-829-8542\par \ + Address Mark Fuller\par \ + 1129 East Loyola Drive\par \ + Tempe Arizona, 85282\par \ + Bible Foundation http://www.bf.org\par\par \ + I would like to thank the Bible Foundation not only for scanning nearly the entire \ +Webster Bible but for encouraging me to undertake this monumental work; particularly around \ +page 20 when I realized what I had gotten myself into. Special thanks to Jerry Kingery of \ +the Bible Foundation for scanning, and Jerry Hastings for doing some preliminary scan \ +cleaning and making the texts available on the BBS. + + + +[RWP] +DataPath=/usr/local/lib/sword/modules/comments/rawcom/rwp/ +ModDrv=RawCom +Description=Robertson's Word Pictures +About=\qc -=+* see the files 'about.txt', 'title.pg', 'rwp.int', 'read.me', and \ +'correct.txt' for more details *+=- \par\par \ + Robertson's \par Word Pictures in the \par New Testament \par\par \ +A.T. Robertson, A.M., D.D., LL. D., Litt.D. \par\par\pard \ +Vol 1,2,3,4 Public Domain -- Copy Freely \par\par Volume 5 (c) 1932. \par \ +Renewal 1960 Broadman Press. All rights reserved. \par Used by permission. \par \ +[Copyright expires Dec. 31, 2006.] \par\par Volume 6 (c) 1933. \par \ +Renewal 1960 Broadman Press. All rights reserved. \par Used by permission. \par \ +[Copyright expires Dec. 31, 2007.] \par\par \ ++--------------- Copy Freely --------------+ \par\par \ + The current files can be found at: \par\par \ + The Bible Foundation, \par \ + http://www.bf.org \par\par \ + If any errors are located, please notify me at the above location, or at: \par\par \ + Mark Fuller \par \ + 1129 E. Loyola Dr. \par \ + Tempe, Az. 85282 \par \ + (602) 829-8542 + + +[Vines] +DataPath=/usr/local/lib/sword/modules/lexdict/rawld/vines/vines +ModDrv=RawLD +Description=Vines Bible Dictionary +About=\qc Vine's Expository Dictionary \par of New Testament Words \par\par \ +Public Domain -- Copy Freely \par\par\pard \ + These Dictionary topics are from W.E. Vine's M.A., Expository Dictionary of New Testament \ +Words published in 1940 and without copyright. \par\par \ + The most current and correct copies of these files can be obtained from the \ +following. If any errors are located, please ensure you have the latest files, and if so, \ +we would appreciate being informed of the error. \par\par \ + The Bible Foundation \par \ + http://www.bf.org \par\par \ + Or by contacting: \par\par \ + Mark Fuller \par \ + 1129 East Loyola Drive \par \ + Tempe, Arizona, 85282 \par \ + 602-829-8542 (voice) + + +[Strongs Hebrew (OT)] +DataPath=/usr/local/lib/sword/modules/lexdict/rawld/strongs/hebrew +ModDrv=RawLD +Description=Strong's / Englishman's Hebrew Bible Dictionary +About=\qc Strong's / Englishman's Bible Dictionary \par\par \pard \ +This is a lexicon of Hebrew words keyed off of Strong's numbers. + +[Strongs Greek (NT)] +DataPath=/usr/local/lib/sword/modules/lexdict/rawld/strongs/greek +ModDrv=RawLD +Description=Strong's / Englishman's Greek Bible Dictionary +About=\qc Strong's / Englishman's Bible Dictionary \par\par \pard \ +This is a lexicon of Greek words keyed off of Strong's numbers. + + + +[WEB] +DataPath=/usr/local/lib/sword/modules/texts/rawtext/web/ +ModDrv=RawText +SourceType=GBF +Description=The World English Bible +About= -=+* see the file 'info.txt' for more details *+=-\par\par \ +\qc The World English Bible (WEB) \par\par Public Domain \par\par \pard \ + The World English Bible is a 1997 revision of the American Standard Version of the \ +Holy Bible, first published in 1901. It is in the Public Domain. Please feel free to copy \ +and distribute it freely. \par\par \ + Thank you to Michael Paul Johnson for making this work available. For the latest \ +information, to report corrections, or for other correspondence: \par\par \ + Michael Paul Johnson \par \ + http://www.ebible.org/bible \par \ + mpj@ebible.org + + diff --git a/samples/mods.d/globals.conf b/samples/mods.d/globals.conf new file mode 100644 index 0000000..cd98ab2 --- /dev/null +++ b/samples/mods.d/globals.conf @@ -0,0 +1,2 @@ +[Globals] + diff --git a/samples/mods.d/rwp.conf b/samples/mods.d/rwp.conf new file mode 100644 index 0000000..384a5fc --- /dev/null +++ b/samples/mods.d/rwp.conf @@ -0,0 +1,23 @@ +[RWP] +DataPath=/usr/local/lib/sword/modules/comments/rawcom/rwp/ +ModDrv=RawCom +Description=Robertson's Word Pictures +About=\qc -=+* see the files 'about.txt', 'title.pg', 'rwp.int', 'read.me', and \ +'correct.txt' for more details *+=- \par\par \ + Robertson's \par Word Pictures in the \par New Testament \par\par \ +A.T. Robertson, A.M., D.D., LL. D., Litt.D. \par\par\pard \ +Vol 1,2,3,4 Public Domain -- Copy Freely \par\par Volume 5 (c) 1932. \par \ +Renewal 1960 Broadman Press. All rights reserved. \par Used by permission. \par \ +[Copyright expires Dec. 31, 2006.] \par\par Volume 6 (c) 1933. \par \ +Renewal 1960 Broadman Press. All rights reserved. \par Used by permission. \par \ +[Copyright expires Dec. 31, 2007.] \par\par \ ++--------------- Copy Freely --------------+ \par\par \ + The current files can be found at: \par\par \ + The Bible Foundation, \par \ + http://www.bf.org \par\par \ + If any errors are located, please notify me at the above location, or at: \par\par \ + Mark Fuller \par \ + 1129 E. Loyola Dr. \par \ + Tempe, Az. 85282 \par \ + (602) 829-8542 + diff --git a/samples/mods.d/strongsnt.conf b/samples/mods.d/strongsnt.conf new file mode 100644 index 0000000..4f87cf5 --- /dev/null +++ b/samples/mods.d/strongsnt.conf @@ -0,0 +1,6 @@ +[Strongs Greek (NT)] +DataPath=/usr/local/lib/sword/modules/lexdict/rawld/strongs/greek +ModDrv=RawLD +Description=Strong's / Englishman's Greek Bible Dictionary +About=\qc Strong's / Englishman's Bible Dictionary \par\par \pard \ +This is a lexicon of Greek words keyed off of Strong's numbers. diff --git a/samples/mods.d/strongsot.conf b/samples/mods.d/strongsot.conf new file mode 100644 index 0000000..86b9699 --- /dev/null +++ b/samples/mods.d/strongsot.conf @@ -0,0 +1,6 @@ +[Strongs Hebrew (OT)] +DataPath=/usr/local/lib/sword/modules/lexdict/rawld/strongs/hebrew +ModDrv=RawLD +Description=Strong's / Englishman's Hebrew Bible Dictionary +About=\qc Strong's / Englishman's Bible Dictionary \par\par \pard \ +This is a lexicon of Hebrew words keyed off of Strong's numbers. diff --git a/samples/mods.d/vines.conf b/samples/mods.d/vines.conf new file mode 100644 index 0000000..8cd3a7d --- /dev/null +++ b/samples/mods.d/vines.conf @@ -0,0 +1,18 @@ +[Vines] +DataPath=/usr/local/lib/sword/modules/lexdict/rawld/vines/vines +ModDrv=RawLD +Description=Vines Bible Dictionary +About=\qc Vine's Expository Dictionary \par of New Testament Words \par\par \ +Public Domain -- Copy Freely \par\par\pard \ + These Dictionary topics are from W.E. Vine's M.A., Expository Dictionary of New Testament \ +Words published in 1940 and without copyright. \par\par \ + The most current and correct copies of these files can be obtained from the \ +following. If any errors are located, please ensure you have the latest files, and if so, \ +we would appreciate being informed of the error. \par\par \ + The Bible Foundation \par \ + http://www.bf.org \par\par \ + Or by contacting: \par\par \ + Mark Fuller \par \ + 1129 East Loyola Drive \par \ + Tempe, Arizona, 85282 \par \ + 602-829-8542 (voice) diff --git a/samples/mods.d/web.conf b/samples/mods.d/web.conf new file mode 100644 index 0000000..5b77867 --- /dev/null +++ b/samples/mods.d/web.conf @@ -0,0 +1,17 @@ +[WEB] +DataPath=/usr/local/lib/sword/modules/texts/rawtext/web/ +ModDrv=RawText +SourceType=GBF +Description=The World English Bible +About= -=+* see the file 'info.txt' for more details *+=-\par\par \ +\qc The World English Bible (WEB) \par\par Public Domain \par\par \pard \ + The World English Bible is a 1997 revision of the American Standard Version of the \ +Holy Bible, first published in 1901. It is in the Public Domain. Please feel free to copy \ +and distribute it freely. \par\par \ + Thank you to Michael Paul Johnson for making this work available. For the latest \ +information, to report corrections, or for other correspondence: \par\par \ + Michael Paul Johnson \par \ + http://www.ebible.org/bible \par \ + mpj@ebible.org + + diff --git a/samples/mods.d/websters.conf b/samples/mods.d/websters.conf new file mode 100644 index 0000000..9499517 --- /dev/null +++ b/samples/mods.d/websters.conf @@ -0,0 +1,61 @@ +[Websters] +DataPath=/usr/local/lib/sword/modules/texts/rawtext/websters/ +ModDrv=RawText +Description=The Webster Bible +About= -=+* see the files 'intro.txt' and 'revision.txt' for more details *+=-\par\par \ +\qc THE \par HOLY BIBLE, \par CONTAINING THE \par OLD AND NEW TESTAMENTS, \par IN THE \par \ +COMMON VERSION. \par WITH \par AMENDMENTS OF THE LANGUAGE, \par \ +BY NOAH WEBSTER, LL. D. \par\par ------------- \par NEW HAVEN: \par \ +PUBLISHED BY DURRIE & PECK. \par \ +Sold by HEZEKIAH HOWE & CO., and A. H. MALTBY, New Haven; \par \ +and by N.&J. WHITE, New York. \par\par ------ \par 1833 \par\par \ +Webster Bible Electronic Format.\par \ +PUBLIC DOMAIN\par\par \ +February 1992\par\par\pard \ +Webster Biography:\par \ +Noah Webster: America's first grammarian and founding father of American education.\par\par \ + In 1828 Noah Webster published the 'American Dictionary of the English Language'. This \ +dictionary demonstrates the Christian values which were found in America's educational \ +and scholarly systems. It is from this early dictionary that we have todays popular \ +'Webster Dictionary'. In 1833 Noah Webster, who had mastered 20 languages including \ +Hebrew and Greek, published the King James Authorized Version 'with amendments to the \ +language'. In stating his reasons for producing this version of the Bible, Webster said:\par\par \ + 'In the present version, the language is, in general, correct and perspicuous; \ +... in many passages uniting sublimity with beautiful simplicity. In my view, the general \ +style of the version ought not to be altered. But, in the lapse of two or three centuries, \ +changes have taken place, which, in particular passages, impair the beauty; in others, \ +obscure the sense, of the original languages. ... they do not present to the reader \ +the Word of God. ... My principal aim is to remedy this evil.'\par\par \ +It was with cautious reverence that Webster corrected misused grammar, removed offensive \ +terms and expressions, and substituted commonly understood words for words that had fallen \ +into disuse, or no longer carried the same meaning.\par\par\ + In 1834, the year after completing the Webster Bible, Noah Webster wrote a \ +companion piece titled 'Value of the Bible and Excellence of the Christian Religion - For \ +the Use of Families and Schools'.\par\par\ + Webster, who was considered 'The schoolmaster to a nation' and produced the \ +earliest spellers and textbooks for America's school children, believed Christian religious \ +values and American public education to be inseparable. He believed the Webster Bible to \ +be 'the most important enterprise' of his life, and referred to the Bible as:\par\par \ + '... the chief moral cause of all that is good, and the best corrector of all that \ +is evil, in human society; the best book for regulating the temporal concerns of men, and \ +the only book that can serve as an infallible guide to future felicity.'\par\par \ +Introduction to the Electronic Format:\par \ + Beginning in July of 1991 the task of placing the Webster Bible text in electronic \ +format began. The original purpose was to provide Larry Pierce, who produces the \ +On-Line Bible program, with a more modern *public domain* text, similar in content and \ +style to the AV but with a grammar that would provide better comprehension in todays \ +English.\par\par\ + I plan on maintaining an accurate copy of the Webster text. Anyone finding an \ +error should contact me; Anyone desiring to obtain the latest, most correct text, can find \ +it on the Bible Foundation BBS, or can contact me in the following methods:\par \ + Internet acus10@waccvm.corp.mot.com\par \ + Home phone 602-829-8542\par \ + Address Mark Fuller\par \ + 1129 East Loyola Drive\par \ + Tempe Arizona, 85282\par \ + Bible Foundation http://www.bf.org\par\par \ + I would like to thank the Bible Foundation not only for scanning nearly the entire \ +Webster Bible but for encouraging me to undertake this monumental work; particularly around \ +page 20 when I realized what I had gotten myself into. Special thanks to Jerry Kingery of \ +the Bible Foundation for scanning, and Jerry Hastings for doing some preliminary scan \ +cleaning and making the texts available on the BBS. diff --git a/samples/recommended/README b/samples/recommended/README new file mode 100644 index 0000000..95b49ca --- /dev/null +++ b/samples/recommended/README @@ -0,0 +1,24 @@ +In this configuration, a system-wide file is created +/etc/sword.conf +which points to the installation of common sword modules located under: +/usr/share/sword/ + +To use, as root, copy the sword.conf file located in this directory to /etc + +$ su +Password: ******** +# cp sword.conf /etc + +then create a sword repository under /usr/share + +# mkdir /usr/share/sword + +You may also want to copy the locales directory to your new sword repository + +# cp -R ../../locales.d/ /usr/share/sword + +then install modules in /usr/share/sword + +# cd /usr/share/sword +# unzip ~/DownloadedSwordModule.zip + diff --git a/samples/recommended/sword.conf b/samples/recommended/sword.conf new file mode 100644 index 0000000..49ea7ee --- /dev/null +++ b/samples/recommended/sword.conf @@ -0,0 +1,2 @@ +[Install] +DataPath=/usr/share/sword/ diff --git a/scripts/backupmake.sh b/scripts/backupmake.sh new file mode 100755 index 0000000..8c4db3e --- /dev/null +++ b/scripts/backupmake.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cp Makefile Makefile.sw +cp lib/Makefile lib/Makefile.sw +cp tests/Makefile tests/Makefile.sw +cp utilities/Makefile utilities/Makefile.sw diff --git a/scripts/burncd b/scripts/burncd new file mode 100755 index 0000000..bdd8b37 --- /dev/null +++ b/scripts/burncd @@ -0,0 +1 @@ +cdrecord -v speed=2 dev=0,0 /mnt/server/space/im.iso diff --git a/scripts/demotar b/scripts/demotar new file mode 100755 index 0000000..9093b5b --- /dev/null +++ b/scripts/demotar @@ -0,0 +1 @@ +cd /dosc/usr/troy/src; tar -v -c -p -s -z -f ~/src/multimo4.tgz sword/examples/windoze/delphi20/multimo4/multimod.exe diff --git a/scripts/disttar b/scripts/disttar new file mode 100755 index 0000000..70e1a1d --- /dev/null +++ b/scripts/disttar @@ -0,0 +1,7 @@ +REV=`cd ..;basename \`pwd ..\`|cut -d\- -f2` +cd /; tar cfvz sword-$REV.i386.tar.gz /etc/sword.conf /usr/lib/libsword.* /usr/include/sword/* /usr/bin/cheatah /usr/doc/sword/ /usr/share/sword/mods.d/globals.conf + +echo +echo Did you set legalexport := yes +echo did you set buildshare := yes +echo diff --git a/scripts/dlltar b/scripts/dlltar new file mode 100755 index 0000000..a93fb3c --- /dev/null +++ b/scripts/dlltar @@ -0,0 +1 @@ +cp /dosc/winnt/system32/sword32.dll ../bin; cd /dosc/usr/troy/src; tar -v -c -p -s -z -f ~/src/dlls.tgz sword/bin/sword32.dll diff --git a/scripts/eastonstar b/scripts/eastonstar new file mode 100755 index 0000000..ac3d71a --- /dev/null +++ b/scripts/eastonstar @@ -0,0 +1 @@ +cd /dosc/usr/troy/src/; tar -v -c -p -s -z -f ~/src/eastons.tgz sword/modules/lexdict/rawld/eastons diff --git a/scripts/mhctar b/scripts/mhctar new file mode 100755 index 0000000..eea59c4 --- /dev/null +++ b/scripts/mhctar @@ -0,0 +1 @@ +cd /dosc/usr/troy/src/; tar -v -c -p -s -z -f ~/src/mhc.tgz sword/modules/comments/rawcom/mhc diff --git a/scripts/mkcd b/scripts/mkcd new file mode 100755 index 0000000..6bc7163 --- /dev/null +++ b/scripts/mkcd @@ -0,0 +1,6 @@ +REV=`cd ..;basename \`pwd ..\`|cut -d\- -f2` +chmod +x * +chmod +x ../apps/X11/cheatah/configure +chmod +x ../apps/X11/cheatah/missing +cd ../../..; mkisofs -a -J -o -l -L ./im.iso -r -v -V "SWORD_20000428" /mnt/server/space/swordiso/ + diff --git a/scripts/mkswordbase b/scripts/mkswordbase new file mode 100755 index 0000000..93f5931 --- /dev/null +++ b/scripts/mkswordbase @@ -0,0 +1,14 @@ +#!/bin/sh +cd .. +make distclean +./usrinst.sh +make + +echo +echo Please execute the following commands +echo su +echo cd .. +echo "make install; make distclean; exit" +echo ./mkswordbase2 +echo + diff --git a/scripts/mkswordbase2 b/scripts/mkswordbase2 new file mode 100755 index 0000000..0609181 --- /dev/null +++ b/scripts/mkswordbase2 @@ -0,0 +1,42 @@ +#!/bin/sh +mkdir /tmp/$$ +cd /tmp/$$ +mkdir etc +echo [Install] > etc/sword.conf +echo DataPath=/usr/share/sword >> etc/sword.conf +echo >> etc/sword.conf + +mkdir usr +mkdir usr/include +cp -r /usr/include/sword usr/include/sword + +mkdir usr/lib +cp -r /usr/lib/libsword.a /usr/lib/libsword.la usr/lib + +mkdir usr/share +mkdir usr/share/sword +mkdir usr/share/sword/mods.d + +echo [Globals] > usr/share/sword/mods.d/globals.conf +echo >> usr/share/sword/mods.d/globals.conf +echo >> usr/share/sword/mods.d/globals.conf + +cp -r /usr/share/sword/locales.d usr/share/sword/locales.d + +mkdir usr/share/doc +mkdir usr/share/doc/sword + +cd - +cd .. +cp -r doc/* /tmp/$$/usr/share/doc/sword/ +cp -r ChangeLog README INSTALL LICENSE examples samples /tmp/$$/usr/share/doc/sword/ +cd - +cd /tmp/$$ +find . -name CVS -type d -exec rm -rf {} \; +tar czfv swordbase.tar.gz * +cd - +mv /tmp/$$/swordbase.tar.gz ../../ +rm -rf /tmp/$$ + +cd ../.. +echo swordbase.tar.gz in `pwd` diff --git a/scripts/mkswordtar b/scripts/mkswordtar new file mode 100755 index 0000000..f98fe17 --- /dev/null +++ b/scripts/mkswordtar @@ -0,0 +1,28 @@ +#!/bin/sh + +echo +echo "*** Autogening main sword engine build system" +echo +(cd ..;./autogen.sh) + +REV=`cd ..;basename \`pwd ..\`|cut -d\- -f2` +SWORDVER=`grep "define VERSI" ../include/config.h |cut -f2 -d"\""` + +if test `echo $REV` == `echo $SWORDVER`; then + chmod +x * + + echo + echo "*** Autogening swig bindings build system" + echo + cd ../bindings/swig/package; ./autogen.sh; cd ../../..; + + echo + echo "*** Tarring up" sword-$REV.tar.gz + echo + cd ..; tar -v -c -p -s -z --exclude sword-$REV/bin --exclude sword-$REV/autom4te.cache --exclude sword-$REV/bindings/swig/package/autom4te.cache -X sword-$REV/distignore -f sword-$REV.tar.gz sword-$REV/* + +else + echo $"Directory version is $REV, but config.h has $SWORDVER" + exit 1 + +fi diff --git a/scripts/restoremake.sh b/scripts/restoremake.sh new file mode 100755 index 0000000..e4bd939 --- /dev/null +++ b/scripts/restoremake.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cp Makefile.sw Makefile +cp lib/Makefile.sw lib/Makefile +cp tests/Makefile.sw tests/Makefile +cp utilities/Makefile.sw utilities/Makefile diff --git a/scripts/sapphire.cpp b/scripts/sapphire.cpp new file mode 100755 index 0000000..7010bc7 --- /dev/null +++ b/scripts/sapphire.cpp @@ -0,0 +1,65 @@ +/****************************************************************************** + * + * Placeholder for the REAL SAPPHIRE II Stream Cipher Files + * + * The SAPPHIRE II package may be obtained from within the United States or + * Canada from: + * + * http://cryptography.org/cgi-bin/crypto.cgi/libraries/sapphire.zip + * + * + * These files must be placed accordingly: + * + * .../sword/include/sapphire.h + * .../sword/src/modules/common/sapphire.cpp + * + * If you are outside of these countries, you will have to obtain this package + * elsewhere. + * + */ + + +unsigned char sapphire::keyrand(int limit, + unsigned char *user_key, + unsigned char keysize, + unsigned char *rsum, + unsigned *keypos) + { + return keysize; + } + +void sapphire::initialize(unsigned char *key, unsigned char keysize) + { + } + +void sapphire::hash_init(void) + { + } + +sapphire::sapphire(unsigned char *key, unsigned char keysize) + { + } + +void sapphire::burn(void) + { + } + +sapphire::~sapphire() + { + } + +unsigned char sapphire::encrypt(unsigned char b) + { + return b; + } + +unsigned char sapphire::decrypt(unsigned char b) + { + return b; + } + +void sapphire::hash_final(unsigned char *hash, // Destination + unsigned char hashlength) // Size of hash. + { + } + diff --git a/scripts/svetar b/scripts/svetar new file mode 100755 index 0000000..f6fad43 --- /dev/null +++ b/scripts/svetar @@ -0,0 +1 @@ +cd /dosc/usr/troy/src/; tar -v -c -p -s -z -f ~/src/sve.tgz sword/modules/texts/rawtext/sve sword/modules/texts/rawtext/svetxidx.c diff --git a/scripts/swordenv b/scripts/swordenv new file mode 100755 index 0000000..924c739 --- /dev/null +++ b/scripts/swordenv @@ -0,0 +1 @@ +export PATH=`dirname \`pwd\``/bin:$PATH diff --git a/scripts/swtxtdsp.bat b/scripts/swtxtdsp.bat new file mode 100755 index 0000000..5cb4bf5 --- /dev/null +++ b/scripts/swtxtdsp.bat @@ -0,0 +1,2 @@ +pkzip -r -P -a ..\tmp\swtxtdsp.zip \sword\frontend\windoze\delphi20\swtxtdsp\*.* + diff --git a/scripts/vinestar b/scripts/vinestar new file mode 100755 index 0000000..2783b7d --- /dev/null +++ b/scripts/vinestar @@ -0,0 +1 @@ +cd /dosc/usr/troy/src/; tar -v -c -p -s -z -f ~/src/vines.tgz sword/modules/lexdict/rawld/vines diff --git a/scripts/webtar b/scripts/webtar new file mode 100755 index 0000000..db263f7 --- /dev/null +++ b/scripts/webtar @@ -0,0 +1 @@ +cd /dosc/usr/troy/src/; tar -v -c -p -s -z -f ~/src/webster.tgz sword/modules/texts/rawtext/webster diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..fc04b62 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,5 @@ + +root := .. + +all: + make -C ${root} diff --git a/src/frontend/Makefile b/src/frontend/Makefile new file mode 100644 index 0000000..ef8eccd --- /dev/null +++ b/src/frontend/Makefile @@ -0,0 +1,5 @@ + +root := ../.. + +all: + make -C ${root} diff --git a/src/frontend/Makefile.am b/src/frontend/Makefile.am new file mode 100644 index 0000000..df82518 --- /dev/null +++ b/src/frontend/Makefile.am @@ -0,0 +1,6 @@ +frontenddir = $(top_srcdir)/src/frontend + +libsword_la_SOURCES += $(frontenddir)/swdisp.cpp +libsword_la_SOURCES += $(frontenddir)/swlog.cpp + + diff --git a/src/frontend/X11/Makefile b/src/frontend/X11/Makefile new file mode 100644 index 0000000..1a2d00d --- /dev/null +++ b/src/frontend/X11/Makefile @@ -0,0 +1,5 @@ + +root := ../../.. + +all: + make -C ${root} diff --git a/src/frontend/framework/Makefile b/src/frontend/framework/Makefile new file mode 100644 index 0000000..81f7721 --- /dev/null +++ b/src/frontend/framework/Makefile @@ -0,0 +1,4 @@ +root := ../../.. + +all: + make -C ${root} diff --git a/src/frontend/framework/femain.cpp b/src/frontend/framework/femain.cpp new file mode 100644 index 0000000..415ab6f --- /dev/null +++ b/src/frontend/framework/femain.cpp @@ -0,0 +1,12 @@ +#include + +FEMain::FEMain() { +} + +FEMain::~FEMain() { + list ::iterator it; + + for (it = displays.begin(); it != displays.end(); it++) + delete *it; + +} diff --git a/src/frontend/im/Makefile b/src/frontend/im/Makefile new file mode 100644 index 0000000..1a2d00d --- /dev/null +++ b/src/frontend/im/Makefile @@ -0,0 +1,5 @@ + +root := ../../.. + +all: + make -C ${root} diff --git a/src/frontend/im/hebrewmcim.cpp b/src/frontend/im/hebrewmcim.cpp new file mode 100644 index 0000000..9ec55a9 --- /dev/null +++ b/src/frontend/im/hebrewmcim.cpp @@ -0,0 +1,653 @@ + +/** + * Title: Keyboard mapping for Michigan-Claremont Hebrew input + * Description: + * Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL + * Company: + * @author Troy A. Griffitts + * @version 1.0 + */ + +#include + +HebrewMCIM::HebrewMCIM() + :SWInputMethod() { + + init(); +} + + +int *HebrewMCIM::translate(char in) { + int retVal = 0; + static int retString[5]; + int retStringIndex = 0; + + memset(retString, 0, 5); + + if (getState() > 1) { + if (getState() >= 12) { // serious issue with internal structure + setState(0); + retString[retStringIndex++] = in; + return retString; + } + map::iterator find = subst2[getState()].find(in); + if (find != subst2[getState()].end()) + retVal = find->second; + else retVal = in; + + setState(0); + retString[retStringIndex++] = retVal; + return retString; + } + else { + retVal = subst[in]; + + if (retVal == 0) { + setState(0); + retString[retStringIndex++] = in; + return retString; + } + if (retVal > 100) { + setState(1); + retString[retStringIndex++] = retVal; + return retString; + } + if (retVal == 50) { // multiChar + setState(1); + int *chars = multiChars[in]; + if (chars != 0) { + retString[retStringIndex++] = chars[0]; + retString[retStringIndex++] = chars[1]; + return retString; + } + } + } + setState(retVal); + return 0; +} + + +void HebrewMCIM::init() { + memset(subst, 0, 255); + + subst[')'] = 1488; + subst['B'] = 1489; + subst['G'] = 1490; + subst['D'] = 1491; + subst['H'] = 1492; + subst['W'] = 1493; + subst['Z'] = 1494; + subst['X'] = 1495; + subst['+'] = 1496; + subst['Y'] = 1497; + + subst['k'] = 1498; // finals + subst['m'] = 1501; + subst['n'] = 1503; + subst['c'] = 1509; + + subst['P'] = 1508; + subst['K'] = 1499; + subst['L'] = 1500; + subst['M'] = 1502; + subst['N'] = 1504; + subst['S'] = 1505; + subst['('] = 1506; + subst['p'] = 1507; + subst['C'] = 1510; + subst['Q'] = 1511; + subst['R'] = 1512; + subst['#'] = 1513; + + // special multiChars + subst['&'] = 50; + subst['$'] = 50; + + static int x[] = {1513, 1474}; + multiChars['&'] = x; + static int y[] = {1513, 1473}; + multiChars['$'] = y; + + subst['T'] = 1514; + + // VOWELS + subst['A'] = 1463; + subst['F'] = 1464; + subst['E'] = 1462; + subst['"'] = 1461; + subst['I'] = 1460; + subst['O'] = 1465; + subst['U'] = 1467; + + + + // OTHER DIACRITICS + subst['.'] = 1468; + subst['-'] = 1470; + subst[','] = 1471; + + // Compound input + + // CANTILLATION + + subst[':'] = 2; + subst2[2]['A'] = 1458; + subst2[2]['E'] = 1457; + subst2[2]['F'] = 1459; + + + /* Telisha qetana is postpositive as in '04' above. However, Michigan +# code '24' is for a medial telisha. Graphically, there is no +# difference. + */ + subst['2'] = 5; + subst2[5]['4'] = 1449; + + + /* Note Michigan encoding distinguishes between medial metheg '35' (occuring +# on the left of the vowel), and the ordinary meteg '95' (occuring on the +# right of the vowel). It is also used for silluq. + */ + subst['3'] = 6; + subst2[6]['3'] = 1433; + subst2[6]['5'] = 1469; + + + /* The Michigan code of telisha gedola in medial position. Graphically, +# there is no difference. + */ + subst['4'] = 7; + subst2[7]['4'] = 1440; + + subst['6'] = 8; + subst2[8]['0'] = 1451; + subst2[8]['1'] = 1436; + + subst['1'] = 4; + subst2[4]['0'] = 1434; + + /* In the poetic books, prepositive dehi occurs; it's unclear whether +# tipeha also occurs in the poetic books. Otherwise, we could simply +# check for what book in the Tanach we are in. Michigan uses the same +# code for each. + */ + + subst2[4]['3'] = 1430; + + /* This is the poetic accent mugrash, which also includes rebia, but is +# encoded separately as '81' in the Michigan text. + */ + subst2[4]['1'] = 1437; + subst2[4]['4'] = 1440; + + + subst['0'] = 3; + subst2[3]['0'] = 1475; + subst2[3]['1'] = 1426; + + /* According to BHS, zarqa and sinnor are both postpositive. However, +# the Michigan encoding uses one code for both. The Unicode zarqa +# (0x0598) is definitely NOT postpositive. And further, the shape of +# the symbol is different in BHS and Uniocde. This needs further +# research to determine what's going on here. For now, we follow BHS +# and use the postpositive Unicode zinor or both accents. + */ + + subst2[3]['2'] = 1454; + + /* Pashta is postpositive, and the Unicode equivalent reflects +# this. However, there is a poetic equivalent -- azla legarmeh -- +# which is not postpositive, but no equivalent code point exists in +# Unicode. The Michigan encoding does not distinguish between the two, +# although it could be algorithmically determined. + */ + + subst2[3]['3'] = 1433; + subst2[3]['4'] = 1449; + subst2[3]['5'] = 1472; + + + /* This is the Unicode Hebrew *accent*; there is also another Hebrew +# *punctuation* called GERSHAYIM 0x05F4. I'm using the more +# traditional rounded marks, rather than the alternate straight +# marks. + */ + + subst2[8]['2'] = 1438; + + // Also known as azla + subst2[8]['3'] = 1448; + subst2[8]['4'] = 1452; + subst2[8]['5'] = 1427; + + + subst['8'] = 9; + subst2[9]['0'] = 1428; + subst2[9]['1'] = 1431; + + /* Note, this accent is actually sinnorit, but it does not exist as a +# separate glyph in the Unicode standard. The 'ZINOR' Unicode accent +# is postpositive, while sinnorit is not. ZARQA is as close as I can +# get to this. + */ + subst2[9]['2'] = 1432; + + /* The Unicode form does not match the form used by BHS, but the names +# are the same. + */ + subst2[9]['3'] = 1441; + subst2[9]['4'] = 1439; + subst2[9]['5'] = 1429; + + subst['7'] = 10; + subst2[10]['0'] = 1444; + subst2[10]['1'] = 1445; + subst2[10]['2'] = 1446; + subst2[10]['3'] = 1430; // also '13', '73' also is used for majela + subst2[10]['4'] = 1443; + subst2[10]['5'] = 1469; // this is silluq; should appear to the left of the vowel + + subst['9'] = 11; + subst2[11]['1'] = 1435; + subst2[11]['2'] = 1425; + subst2[11]['3'] = 1450; + subst2[11]['4'] = 1447; + subst2[11]['5'] = 1469; // should appear to the right of the vowel + +} + + /* + + +# CANTILLION MARKS + + my $ETNAHTA = '֑'; +# officially the Unicode name for this symbol was "SEGOL." However, that is +# not a unique name, conflicting with the vowel of the same name. Further, +# the position of the symbol is different. I have changed the name of the +# accent to "SEGOLTA," the traditional name for this accent. + my $SEGOLTA = '֒'; + my $SHALSHELET = '֓'; + my $ZAQEF_QATAN = '֔'; + my $ZAQEF_GADOL = '֕'; + my $TIPEHA = '֖'; + my $REVIA = '֗'; + my $ZARQA = '֘'; + my $PASHTA = '֙'; + my $YETIV = '֚'; + my $TEVIR = '֛'; + my $GERESH = '֜'; + my $GERESH_MUQDAM = '֝'; + my $GERSHAYIM = '֞'; + my $QARNEY_PARA = '֟'; + my $TELISHA_GEDOLA = '֠'; + my $PAZER = '֡'; + my $MUNAH = '֣'; + my $MAHAPAKH = '֤'; + my $MERKHA = '֥'; + my $MERKHA_KEFULA = '֦'; + my $DARGA = '֧'; + my $QADMA = '֨'; + my $TELISHA_QETANA = '֩'; + my $YERAH_BEN_YOMO = '֪'; + my $OLE = '֫'; + my $ILUY = '֬'; + my $DEHI = '֭'; + my $ZINOR = '֮'; +# HEBREW MARK + my $MASORA_CIRCLE = '֯'; +# HEBREW EXTENDED-A points and punctuation + my $SHEVA = 'ְ'; + my $HATAF_SEGOL = 'ֱ'; + my $HATAF_PATAH = 'ֲ'; + my $HATAF_QAMATS = 'ֳ'; + my $HIRIQ = 'ִ'; + my $TSERE = 'ֵ'; + my $SEGOL = 'ֶ'; +# furtive Patah is not a distinct character + my $PATAH = 'ַ'; + my $QAMATS = 'ָ'; + my $HOLAM = 'ֹ'; + my $QUBUTS = 'ֻ'; +# also used as shuruq +# falls within the base letter + my $DAGESH_OR_MAPIQ = 'ּ'; +# also used as siluq + my $METAG = 'ֽ'; + my $MAQAF = '־'; + my $RAFE = 'ֿ'; +# Also used for legarmeh +# may be treated as spacing punctuation, not as a point + my $PASEQ = '׀'; + my $SHIN_DOT = 'ׁ'; + my $SIN_DOT = 'ׂ'; + my $SOF_PASUQ = '׃'; +# HEBREW MARK + my $UPPER_DOT = 'ׄ'; +# HEBREW LETTERS based on ISO 8859-8 +# aleph +# x (alef symbol - 2135) + my $ALEF = 'א'; +# x (bet symbol - 2136) + my $BET = 'ב'; +# x (gimel symbol - 2137) + my $GIMEL = 'ג'; +# x (dalet symbol - 2138) + my $DALET = 'ד'; + my $HE = 'ה'; + my $VAV = 'ו'; + my $ZAYIN = 'ז'; + my $HET = 'ח'; + my $TET = 'ט'; + my $YOD = 'י'; + my $FINAL_KAF = 'ך'; + my $KAF = 'כ'; + my $LAMED = 'ל'; + my $FINAL_MEM = 'ם'; + my $MEM = 'מ'; + my $FINAL_NUN = 'ן'; + my $NUN = 'נ'; + my $SAMEKH = 'ס'; + my $AYIN = 'ע'; + my $FINAL_PE = 'ף'; + my $PE = 'פ'; + my $FINAL_TSADI = 'ץ'; +# also known as zade + my $TSADI = 'צ'; + my $QOF = 'ק'; + my $RESH = 'ר'; + my $SHIN = 'ש'; + my $TAV = 'ת'; +# Yiddish digraphs +# Hebrew Ligature +# tsvey vovn + my $DOUBLE_VAV = 'װ'; + my $VAV_YOD = 'ױ'; +# tsvey yudn + my $DOUBLE_YOD = 'ײ'; + +# Additional punctuation + my $PUNCT_GERESH = '׳'; + my $PUNCT_GERSHAYIM = '״'; +# Reserved: 0x05F5" +# x (hebrew point judeo-spanish varika - FB1E) +#my $JUDEO_SPANISH_VARIKA = pack("U",0xFB1E); # UTF-8 OxFB1E + +############################# +# End of Unicode 2.0 Hebrew # +############################# + +# A hash whose key is a Michagan code, and whose value is a Unicode +# equvalent + + char subst[] = new char [255]; + subst[')'] = 1488; + 'B' => $BET, + 'G' => $GIMEL, + 'D' => $DALET, + 'H' => $HE, + 'W' => $VAV, + 'Z' => $ZAYIN, + 'X' => $HET, + '+' => $TET, + 'Y' => $YOD, + 'K' => $KAF, + 'L' => $LAMED, + 'M' => $MEM, + 'N' => $NUN, + 'S' => $SAMEKH, + '(' => $AYIN, + 'P' => $PE, + 'C' => $TSADI, + 'Q' => $QOF, + 'R' => $RESH, + '#' => $SHIN, # the letter shin without a point + '&' => ($SHIN . $SIN_DOT), + '$' => ($SHIN . $SHIN_DOT), # ' + 'T' => $TAV, +# VOWELS + 'A' => $PATAH, + 'F' => $QAMATS, + 'E' => $SEGOL, + '"' => $TSERE, + 'I' => $HIRIQ, + 'O' => $HOLAM, + 'U' => $QUBUTS, + ':' => $SHEVA, + ':A' => $HATAF_PATAH, + ':E' => $HATAF_SEGOL, + ':F' => $HATAF_QAMATS, +# OTHER DIACRITICS + '.' => $DAGESH_OR_MAPIQ, + '-' => $MAQAF, + ',' => $RAFE, +# CANTILLATION + '00' => $SOF_PASUQ, + '01' => $SEGOLTA, +# According to BHS, zarqa and sinnor are both postpositive. However, +# the Michigan encoding uses one code for both. The Unicode zarqa +# (0x0598) is definitely NOT postpositive. And further, the shape of +# the symbol is different in BHS and Uniocde. This needs further +# research to determine what's going on here. For now, we follow BHS +# and use the postpositive Unicode zinor or both accents. + '02' => $ZINOR, +# Pashta is postpositive, and the Unicode equivalent reflects +# this. However, there is a poetic equivalent -- azla legarmeh -- +# which is not postpositive, but no equivalent code point exists in +# Unicode. The Michigan encoding does not distinguish between the two, +# although it could be algorithmically determined. + '03' => $PASHTA, + '04' => $TELISHA_QETANA, + '05' => $PASEQ, + '10' => $YETIV, +# In the poetic books, prepositive dehi occurs; it's unclear whether +# tipeha also occurs in the poetic books. Otherwise, we could simply +# check for what book in the Tanach we are in. Michigan uses the same +# code for each. + '13' => $TIPEHA, # also $DEHI +# This is the poetic accent mugrash, which also includes rebia, but is +# encoded separately as '81' in the Michigan text. + '11' => $GERESH_MUQDAM, + '14' => $TELISHA_GEDOLA, +# Telisha qetana is postpositive as in '04' above. However, Michigan +# code '24' is for a medial telisha. Graphically, there is no +# difference. + '24' => $TELISHA_QETANA, + '33' => $PASHTA, +# The Michigan code of telisha gedola in medial position. Graphically, +# there is no difference. + '44' => $TELISHA_GEDOLA, + '60' => $OLE, + '61' => $GERESH, +# This is the Unicode Hebrew *accent*; there is also another Hebrew +# *punctuation* called GERSHAYIM 0x05F4. I'm using the more +# traditional rounded marks, rather than the alternate straight +# marks. + '62' => $GERSHAYIM, +# Also known as azla + '63' => $QADMA, + '64' => $ILUY, + '65' => $SHALSHELET, + '80' => $ZAQEF_QATAN, + '81' => $REVIA, +# Note, this accent is actually sinnorit, but it does not exist as a +# separate glyph in the Unicode standard. The 'ZINOR' Unicode accent +# is postpositive, while sinnorit is not. ZARQA is as close as I can +# get to this. + '82' => $ZARQA, +# The Unicode form does not match the form used by BHS, but the names +# are the same. + '83' => $PAZER, + '84' => $QARNEY_PARA, + '85' => $ZAQEF_GADOL, +# Note Michigan encoding distinguishes between medial metheg '35' (occuring +# on the left of the vowel), and the ordinary meteg '95' (occuring on the +# right of the vowel). It is also used for silluq. + '35' => $METAG, + '70' => $MAHAPAKH, + '71' => $MERKHA, + '72' => $MERKHA_KEFULA, + '73' => $TIPEHA, # also '13', '73' also is used for majela + '74' => $MUNAH, + '75' => $METAG, # this is silluq; should appear to the left of the vowel + '91' => $TEVIR, + '92' => $ETNAHTA, + '93' => $YERAH_BEN_YOMO, + '94' => $DARGA, + '95' => $METAG, # should appear to the right of the vowel + +# Not used by the Michigan Encoding +# $UPPER_DOT = '05C4'; + ); + +# declare other variables + my (@bhsLines, + @bhsVerse, + @entity_line) = (); + + my ($i, + $verse, + $word, + $character) = 0; + + my ($element, + $saveGuttural) = ""; + +# read in a line + while (<>) { +# Process one verse +# iterate over every character and change to XML decimal entity + CHAR: for ( $i = 0; ($i < scalar(@bhsVerse)); $i++) { + # find and convert final kaf, mem, nun, pe, tsade + ( # if final form + $bhsVerse[$i] =~ /[KMNPC]/ + ) + && + ( + ( # whitespace or + $bhsVerse[$i+1] =~ /[ \-?]/ + ) + || + ( # EOL or + $i == ( scalar(@bhsVerse) - 1 ) + ) + || + ( # sof pasuq or + ( $bhsVerse[$i+1] =~ /0/ ) && + ( $bhsVerse[$i+2] =~ /0/ ) + ) + || + ( # one accent followed by white, eol or + ( + ( $bhsVerse[$i+1] =~ /\d/ ) && + ( $bhsVerse[$i+2] =~ /\d/ ) + ) && + ( + ( $bhsVerse[$i+3] =~ /[ \-?]/ ) || + ( $i == ( scalar(@bhsVerse) - 1 ) ) + ) + ) + || + ( # two accents followed by white, eol + ( + ( $bhsVerse[$i+1] =~ /\d/ ) && + ( $bhsVerse[$i+2] =~ /\d/ ) && + ( $bhsVerse[$i+3] =~ /\d/ ) && + ( $bhsVerse[$i+4] =~ /\d/ ) + ) && + ( + ( $bhsVerse[$i+5] =~ /[ \-?]/ ) || + ( $i == ( scalar(@bhsVerse) - 1 ) ) + ) + ) + || + ( # followed by a vowel and white, eol, sof pasuq + ( $bhsVerse[$i+1] =~ /[:F]/ ) && + ( # followed by + ( $bhsVerse[$i+2] =~ /[ \-?]/ ) || # whitespace or + ( $i == ( scalar(@bhsVerse) - 1 ) ) || # eol or + ( # sof pasuq + ( $bhsVerse[$i+2] =~ /0/ ) && + ( $bhsVerse[$i+3] =~ /0/ ) + ) + ) + ) + ) # end of what follows after final letter + && + do { + $bhsVerse[$i] =~ /K/ && eval { push @entity_line,$FINAL_KAF; } + && next CHAR; + $bhsVerse[$i] =~ /M/ && eval { push @entity_line,$FINAL_MEM; } + && next CHAR; + $bhsVerse[$i] =~ /N/ && eval { push @entity_line,$FINAL_NUN; } + && next CHAR; + $bhsVerse[$i] =~ /P/ && eval { push @entity_line,$FINAL_PE; } + && next CHAR; + $bhsVerse[$i] =~ /C/ && eval { push @entity_line,$FINAL_TSADI; } + && next CHAR; + }; + # find and convert "furtive patach" + ( $bhsVerse[$i] =~ /A/ ) && # If the letter is a patach + ( $bhsVerse[$i-1] =~ /[)HX(]/ ) && # and is preceeded by a guttural + ( ( $bhsVerse[$i-2] =~ /[AEFOU]/ ) || # and is preceeded by a vowel + ( ( $bhsVerse[$i-2] =~ /\./ ) && # or by suruq + ( $bhsVerse[$i-3] =~ /W/ ) ) || # + ( ( $bhsVerse[$i-2] =~ /W/ ) && # or by holem (written plene) + ( $bhsVerse[$i-3] =~ /O/ ) ) || # + ( ( $bhsVerse[$i-2] =~ /Y/ ) && # or by hiriq-yod + ( $bhsVerse[$i-3] =~ /I/ ) ) ) && + do { + $saveGuttural = pop @entity_line; # snip off the gutteral + push @entity_line,$PATAH; # push on the patach + push @entity_line,$saveGuttural; # push back on the gutteral + next CHAR; + }; + # convert cantillation + # since we have previously dealt with all other cases of + # numbers, two digit patterns are all we have to search for + $bhsVerse[$i] =~ /\d/ && $bhsVerse[$i+1] =~ /\d/ && do { + push @entity_line,$Michigan2XMLentity{"$bhsVerse[$i]$bhsVerse[$i+1]"}; + $i++; # accents are two digits long, so advance past the 2nd digit + next CHAR; + }; + # convert katef vowels, which are two characters long + $bhsVerse[$i] =~ /:/ && $bhsVerse[$i+1] =~ /[AEF]/ && do { + push @entity_line,$Michigan2XMLentity{"$bhsVerse[$i]$bhsVerse[$i+1]"}; + $i++; + next CHAR; + }; + # convert everything else + push @entity_line,$Michigan2XMLentity{"$bhsVerse[$i]"}; + } # end CHAR +# print the line to standard output with XML character-level encoding +# each character has the following format: +# Ӓ + +# set up the verse element + $word = 1; + $character = 1; + print "\n\n"; +# print each character element +# if there is a space, then close the word entity, open a new word +# entity, increment the word number, reset the character number to +# zero. + foreach $element (@entity_line) { + if ( $element =~ " " ) { + $word++; + $character = 1; + print "\n\n"; + next; + } + print "$element\n"; + $character++; + } +# close the verse element + print "\n"; +# reinitialize variables + @bhsVerse = (); + @entity_line = (); + @bhsLines = (); + } # end while +# close the XML document + print "\n"; + */ diff --git a/src/frontend/im/nullim.cpp b/src/frontend/im/nullim.cpp new file mode 100644 index 0000000..a4f4aad --- /dev/null +++ b/src/frontend/im/nullim.cpp @@ -0,0 +1,11 @@ +#include + + +NullIM::NullIM() { +} + +int *NullIM::translate(char ch) { + static int retVal[1]; + *retVal = ch; + return retVal; +} diff --git a/src/frontend/im/swinputmeth.cpp b/src/frontend/im/swinputmeth.cpp new file mode 100644 index 0000000..7f64865 --- /dev/null +++ b/src/frontend/im/swinputmeth.cpp @@ -0,0 +1,26 @@ +/** + * Title: + * Description: + * Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL + * Company: + * @author Troy A. Griffitts + * @version 1.0 + */ + +#include + +SWInputMethod::SWInputMethod() { + state = 0; +} + +void SWInputMethod::setState(int state) { + this->state = state; +} + +int SWInputMethod::getState() { + return state; +} + +void SWInputMethod::clearState() { + state = 0; +} diff --git a/src/frontend/swdisp.cpp b/src/frontend/swdisp.cpp new file mode 100644 index 0000000..e7208e0 --- /dev/null +++ b/src/frontend/swdisp.cpp @@ -0,0 +1,35 @@ +/****************************************************************************** + * swdisp.cpp - code for base class 'swdisp'. swdisp is the basis for all + * types of displays (e.g. raw textout, curses, xwindow, etc.) + */ + +#ifndef _WIN32_WCE +#include +#endif +#include +#include + +SWORD_NAMESPACE_START + +static const char *classes[] = {"SWDisplay", "SWObject", 0}; +SWClass SWDisplay::classdef(classes); + +/****************************************************************************** + * SWDisplay::Display - casts a module to a character pointer and displays it to + * raw output (overriden for different display types and + * module types if necessary) + * + * ENT: imodule - module to display + * + * RET: error status + */ + +char SWDisplay::Display(SWModule &imodule) +{ +#ifndef _WIN32_WCE + std::cout << (const char *)imodule; +#endif + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/frontend/swlog.cpp b/src/frontend/swlog.cpp new file mode 100644 index 0000000..13b025b --- /dev/null +++ b/src/frontend/swlog.cpp @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------------- + +#include +#include +#include +#if defined(_ICU_) && !defined(_ICUSWORD_) +#define _USTDIO_ +#include +#include +#endif +#include "swlog.h" +//--------------------------------------------------------------------------- + +SWORD_NAMESPACE_START + + +SWLog *SWLog::systemLog = 0; + +const int SWLog::LOG_ERROR = 1; +const int SWLog::LOG_WARN = 2; +const int SWLog::LOG_INFO = 3; +const int SWLog::LOG_TIMEDINFO = 4; +const int SWLog::LOG_DEBUG = 5; + +SWLog *SWLog::getSystemLog() { + static class __staticSystemLog { + SWLog **clear; + public: + __staticSystemLog(SWLog **clear) { this->clear = clear; } + ~__staticSystemLog() { delete *clear; *clear = 0; } + } _staticSystemLog(&SWLog::systemLog); + + if (!systemLog) + systemLog = new SWLog(); + + return systemLog; +} + + +void SWLog::setSystemLog(SWLog *newLog) { + delete getSystemLog(); + systemLog = newLog; +} + + +void SWLog::logWarning(const char *fmt, ...) const { + char msg[2048]; + va_list argptr; + + if (logLevel >= LOG_WARN) { + va_start(argptr, fmt); + vsprintf(msg, fmt, argptr); + va_end(argptr); + logMessage(msg, LOG_WARN); + } +} + + +void SWLog::logError(const char *fmt, ...) const { + char msg[2048]; + va_list argptr; + + if (logLevel) { + va_start(argptr, fmt); + vsprintf(msg, fmt, argptr); + va_end(argptr); + logMessage(msg, LOG_ERROR); + } +} + + +void SWLog::logInformation(const char *fmt, ...) const { + char msg[2048]; + va_list argptr; + + if (logLevel >= LOG_INFO) { + va_start(argptr, fmt); + vsprintf(msg, fmt, argptr); + va_end(argptr); + logMessage(msg, LOG_INFO); + } +} + + +void SWLog::logTimedInformation(const char *fmt, ...) const { + char msg[2048]; + va_list argptr; + + if (logLevel >= LOG_TIMEDINFO) { + va_start(argptr, fmt); + vsprintf(msg, fmt, argptr); + va_end(argptr); + logMessage(msg, LOG_TIMEDINFO); + } +} + + +void SWLog::logDebug(const char *fmt, ...) const { + char msg[2048]; + va_list argptr; + + if (logLevel >= LOG_DEBUG) { + va_start(argptr, fmt); + vsprintf(msg, fmt, argptr); + va_end(argptr); + logMessage(msg, LOG_DEBUG); + } +} + +void SWLog::logMessage(const char *message, int level) const { + std::cerr << message; + std::cerr << std::endl; +} +SWORD_NAMESPACE_END diff --git a/src/frontend/windoze/Makefile b/src/frontend/windoze/Makefile new file mode 100644 index 0000000..1a2d00d --- /dev/null +++ b/src/frontend/windoze/Makefile @@ -0,0 +1,5 @@ + +root := ../../.. + +all: + make -C ${root} diff --git a/src/keys/Makefile b/src/keys/Makefile new file mode 100644 index 0000000..339f87a --- /dev/null +++ b/src/keys/Makefile @@ -0,0 +1,4 @@ +root := ../.. + +all: + make -C ${root} diff --git a/src/keys/Makefile.am b/src/keys/Makefile.am new file mode 100644 index 0000000..1eced21 --- /dev/null +++ b/src/keys/Makefile.am @@ -0,0 +1,10 @@ +keysdir = $(top_srcdir)/src/keys + +libsword_la_SOURCES += $(keysdir)/swkey.cpp +libsword_la_SOURCES += $(keysdir)/listkey.cpp +libsword_la_SOURCES += $(keysdir)/strkey.cpp +libsword_la_SOURCES += $(keysdir)/treekey.cpp +libsword_la_SOURCES += $(keysdir)/treekeyidx.cpp +libsword_la_SOURCES += $(keysdir)/versekey.cpp +libsword_la_SOURCES += $(keysdir)/versetreekey.cpp + diff --git a/src/keys/genarray.c b/src/keys/genarray.c new file mode 100644 index 0000000..331d4af --- /dev/null +++ b/src/keys/genarray.c @@ -0,0 +1,33 @@ +#include +#include +#include + +main() +{ + int fd, l1, l2, l3; + char *fnames[] = {"ot.bks", "ot.cps", "nt.bks", "nt.cps"}; + long val; + char buf[64]; + +#ifndef O_BINARY // O_BINARY is needed in Borland C++ 4.53 +#define O_BINARY 0 // If it hasn't been defined than we probably +#endif // don't need it. + + + for (l1 = 0; l1 < 2; l1++) { + for (l2 = 0; l2 < 2; l2++) { + l3 = 1; + sprintf(buf, "%s", fnames[(l1*2)+l2]); + printf(" // %s\n", fnames[(l1*2)+l2]); + fd = open(buf, O_RDONLY|O_BINARY, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH); + while (read(fd, &val, 4) == 4) { + l3++; + printf("%ld, ", val/(4 + (l2*2))); + if (!(l3%7)) + printf("\n"); + } + close(fd); + printf("}, \n"); + } + } +} diff --git a/src/keys/listkey.cpp b/src/keys/listkey.cpp new file mode 100644 index 0000000..ffafdd4 --- /dev/null +++ b/src/keys/listkey.cpp @@ -0,0 +1,332 @@ +/****************************************************************************** + * listkey.cpp - code for base class 'ListKey'. ListKey is the basis for all + * types of keys that have lists of specified indexes + * (e.g. a list of verses, place, etc.) + */ + +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +static const char *classes[] = {"ListKey", "SWKey", "SWObject", 0}; +SWClass ListKey::classdef(classes); + +/****************************************************************************** + * ListKey Constructor - initializes instance of ListKey + * + * ENT: ikey - text key + */ + +ListKey::ListKey(const char *ikey): SWKey(ikey) { + arraymax = 0; + ClearList(); + init(); +} + + +ListKey::ListKey(ListKey const &k) : SWKey(k.keytext) { + arraymax = k.arraymax; + arraypos = k.arraypos; + arraycnt = k.arraycnt; + array = (arraymax)?(SWKey **)malloc(k.arraymax * sizeof(SWKey *)):0; + for (int i = 0; i < arraycnt; i++) + array[i] = k.array[i]->clone(); + init(); +} + + +void ListKey::init() { + myclass = &classdef; +} + + +SWKey *ListKey::clone() const +{ + return new ListKey(*this); +} + +/****************************************************************************** + * ListKey Destructor - cleans up instance of ListKey + */ + +ListKey::~ListKey() +{ + ClearList(); +} + + +/****************************************************************************** + * ListKey::ClearList - Clears out elements of list + */ + +void ListKey::clear() +{ + int loop; + + if (arraymax) { + for (loop = 0; loop < arraycnt; loop++) + delete array[loop]; + + free(array); + arraymax = 0; + } + arraycnt = 0; + arraypos = 0; + array = 0; +} + + +/****************************************************************************** + * ListKey::copyFrom Equates this ListKey to another ListKey object + * + * ENT: ikey - other ListKey object + */ + +void ListKey::copyFrom(const ListKey &ikey) { + ClearList(); + + arraymax = ikey.arraymax; + arraypos = ikey.arraypos; + arraycnt = ikey.arraycnt; + array = (arraymax)?(SWKey **)malloc(ikey.arraymax * sizeof(SWKey *)):0; + for (int i = 0; i < arraycnt; i++) + array[i] = ikey.array[i]->clone(); + + SetToElement(0); +} + + +/****************************************************************************** + * ListKey::add - Adds an element to the list + */ + +void ListKey::add(const SWKey &ikey) { + if (++arraycnt > arraymax) { + array = (SWKey **) ((array) ? realloc(array, (arraycnt + 32) * sizeof(SWKey *)) : calloc(arraycnt + 32, sizeof(SWKey *))); + arraymax = arraycnt + 32; + } + array[arraycnt-1] = ikey.clone(); + SetToElement(arraycnt-1); +} + + + +/****************************************************************************** + * ListKey::setPosition(SW_POSITION) - Positions this key + * + * ENT: p - position + * + * RET: *this + */ + +void ListKey::setPosition(SW_POSITION p) { + switch (p) { + case 1: // GCC won't compile P_TOP + SetToElement(0, p); + break; + case 2: // GCC won't compile P_BOTTOM + SetToElement(arraycnt-1, p); + break; + } +} + + +/****************************************************************************** + * ListKey::increment - Increments a number of elements + */ + +void ListKey::increment(int step) { + if (step < 0) { + decrement(step*-1); + return; + } + Error(); // clear error + for(; step && !Error(); step--) { + if (arraypos < arraycnt) { + if (array[arraypos]->isBoundSet()) + (*(array[arraypos]))++; + if ((array[arraypos]->Error()) || (!array[arraypos]->isBoundSet())) { + SetToElement(arraypos+1); + } + else SWKey::setText((const char *)(*array[arraypos])); + } + else error = KEYERR_OUTOFBOUNDS; + } +} + + +/****************************************************************************** + * ListKey::decrement - Decrements a number of elements + */ + +void ListKey::decrement(int step) { + if (step < 0) { + increment(step*-1); + return; + } + Error(); // clear error + for(; step && !Error(); step--) { + if (arraypos > -1) { + if (array[arraypos]->isBoundSet()) + (*(array[arraypos]))--; + if ((array[arraypos]->Error()) || (!array[arraypos]->isBoundSet())) { + SetToElement(arraypos-1, BOTTOM); + } + else SWKey::setText((const char *)(*array[arraypos])); + } + else error = KEYERR_OUTOFBOUNDS; + } +} + + +/****************************************************************************** + * ListKey::Count - Returns number of elements in list + */ + +int ListKey::Count() { + return arraycnt; +} + + +/****************************************************************************** + * ListKey::SetToElement - Sets key to element number + * + * ENT: ielement - element number to set to + * + * RET: error status + */ + +char ListKey::SetToElement(int ielement, SW_POSITION pos) { + arraypos = ielement; + if (arraypos >= arraycnt) { + arraypos = (arraycnt>0)?arraycnt - 1:0; + error = KEYERR_OUTOFBOUNDS; + } + else { + if (arraypos < 0) { + arraypos = 0; + error = KEYERR_OUTOFBOUNDS; + } + else { + error = 0; + } + } + + if (arraycnt) { + if (array[arraypos]->isBoundSet()) + (*array[arraypos]) = pos; + SWKey::setText((const char *)(*array[arraypos])); + } + else SWKey::setText(""); + + return error; +} + + +/****************************************************************************** + * ListKey::GetElement - Gets a key element number + * + * ENT: pos - element number to get (or default current) + * + * RET: Key or null on error + */ + +SWKey *ListKey::getElement(int pos) { + if (pos < 0) + pos = arraypos; + + if (pos >=arraycnt) + error = KEYERR_OUTOFBOUNDS; + + return (error) ? 0:array[pos]; +} + + +/****************************************************************************** + * ListKey::Remove - Removes current element from list + */ + +void ListKey::Remove() { + if ((arraypos > -1) && (arraypos < arraycnt)) { + delete array[arraypos]; + if (arraypos < arraycnt - 1) + memmove(&array[arraypos], &array[arraypos+1], (arraycnt - arraypos - 1) * sizeof(SWKey *)); + arraycnt--; + + SetToElement((arraypos)?arraypos-1:0); + } +} + + +/****************************************************************************** + * ListKey::getRangeText - returns parsable range text for this key + */ + +const char *ListKey::getRangeText() const { + char *buf = new char[(arraycnt + 1) * 255]; + buf[0] = 0; + for (int i = 0; i < arraycnt; i++) { + strcat(buf, array[i]->getRangeText()); + if (i < arraycnt-1) + strcat(buf, "; "); + } + stdstr(&rangeText, buf); + delete [] buf; + return rangeText; +} + + +/****************************************************************************** + * ListKey::getText - returns text key if (const char *) cast is requested + */ + +const char *ListKey::getText() const { + int pos = arraypos; + SWKey *key = (pos >= arraycnt) ? 0:array[pos]; + return (key) ? key->getText() : keytext; +} + + +void ListKey::setText(const char *ikey) { + // at least try to set the current element to this text + for (arraypos = 0; arraypos < arraycnt; arraypos++) { + SWKey *key = array[arraypos]; + if (key) { + if (key->isTraversable() && key->isBoundSet()) { + key->setText(ikey); + if (!key->Error()) + break; + } + else { + if (!strcmp(key->getText(), ikey)) + break; + } + } + } + if (arraypos >= arraycnt) { + error = 1; + arraypos = arraycnt-1; + } + + SWKey::setText(ikey); +} + +// This sort impl sucks. Let's change it to a quicksort or some other efficient algol +void ListKey::sort() { + for (int i = 0; i < arraycnt; i++) { + for (int j = i; j < arraycnt; j++) { + if (*array[j] < *array[i]) { + SWKey *tmp = array[i]; + array[i] = array[j]; + array[j] = tmp; + } + } + } +} + +SWORD_NAMESPACE_END + diff --git a/src/keys/nt.bks b/src/keys/nt.bks new file mode 100644 index 0000000..6a3cf92 Binary files /dev/null and b/src/keys/nt.bks differ diff --git a/src/keys/nt.cps b/src/keys/nt.cps new file mode 100644 index 0000000..fdaa6f4 Binary files /dev/null and b/src/keys/nt.cps differ diff --git a/src/keys/ot.bks b/src/keys/ot.bks new file mode 100644 index 0000000..512f064 Binary files /dev/null and b/src/keys/ot.bks differ diff --git a/src/keys/ot.cps b/src/keys/ot.cps new file mode 100644 index 0000000..f4bf66b Binary files /dev/null and b/src/keys/ot.cps differ diff --git a/src/keys/strkey.cpp b/src/keys/strkey.cpp new file mode 100644 index 0000000..1d84650 --- /dev/null +++ b/src/keys/strkey.cpp @@ -0,0 +1,42 @@ +/****************************************************************************** + * StrKey.cpp - code for class 'StrKey'- a standard string key class (used + * for modules that index on single strings (eg. cities, + * names, words, etc.) + */ + +#include +#include +#include + +SWORD_NAMESPACE_START + +static const char *classes[] = {"StrKey", "SWKey", "SWObject", 0}; +SWClass StrKey::classdef(classes); + +/****************************************************************************** + * StrKey Constructor - initializes instance of StrKey + * + * ENT: ikey - text key (word, city, name, etc.) + */ + +StrKey::StrKey(const char *ikey) : SWKey(ikey) +{ + init(); +} + + +void StrKey::init() { + myclass = &classdef; +} + + +/****************************************************************************** + * StrKey Destructor - cleans up instance of StrKey + * + * ENT: ikey - text key + */ + +StrKey::~StrKey() { +} + +SWORD_NAMESPACE_END diff --git a/src/keys/swkey.cpp b/src/keys/swkey.cpp new file mode 100644 index 0000000..0557c40 --- /dev/null +++ b/src/keys/swkey.cpp @@ -0,0 +1,216 @@ +/****************************************************************************** + * swkey.cpp - code for base class 'SWKey'. SWKey is the basis for all + * types of keys for indexing into modules (e.g. verse, word, + * place, etc.) + */ + +#include +#include +#include + +SWORD_NAMESPACE_START + +static const char *classes[] = {"SWKey", "SWObject", 0}; +SWClass SWKey::classdef(classes); + +/****************************************************************************** + * SWKey Constructor - initializes instance of SWKey + * + * ENT: ikey - text key + */ + +SWKey::SWKey(const char *ikey) +{ + index = 0; + persist = 0; + keytext = 0; + rangeText = 0; + error = 0; + userData = 0; + stdstr(&keytext, ikey); + init(); +} + +SWKey::SWKey(SWKey const &k) +{ + index = k.index; + persist = k.persist; + userData = k.userData; + keytext = 0; + rangeText = 0; + error = k.error; + setText(k.getText()); + init(); +} + +void SWKey::init() { + myclass = &classdef; + boundSet = false; +} + +SWKey *SWKey::clone() const +{ + return new SWKey(*this); +} + +/****************************************************************************** + * SWKey Destructor - cleans up instance of SWKey + */ + +SWKey::~SWKey() { + if (keytext) + delete [] keytext; + if (rangeText) + delete [] rangeText; +} + + +/****************************************************************************** + * SWKey::Persist - Gets whether this object itself persists within a + * module that it was used to setKey or just a copy. + * (1 - persists in module; 0 - a copy is attempted + * + * RET: value of persist + */ + +char SWKey::Persist() const +{ + return persist; +} + + +/****************************************************************************** + * SWKey::Persist - Set/gets whether this object itself persists within a + * module that it was used to setKey or just a copy. + * (1 - persists in module; 0 - a copy is attempted + * + * ENT: ipersist - value which to set persist + * [-1] - only get + * + * RET: value of persist + */ + +char SWKey::Persist(signed char ipersist) +{ + if (ipersist != -1) + persist = ipersist; + + return persist; +} + + +/****************************************************************************** + * SWKey::Error - Gets and clears error status + * + * RET: error status + */ + +char SWKey::Error() +{ + char retval = error; + + error = 0; + return retval; +} + + +/****************************************************************************** + * SWKey::setText Equates this SWKey to a character string + * + * ENT: ikey - other swkey object + */ + +void SWKey::setText(const char *ikey) { + stdstr(&keytext, ikey); +} + + +/****************************************************************************** + * SWKey::copyFrom Equates this SWKey to another SWKey object + * + * ENT: ikey - other swkey object + */ + +void SWKey::copyFrom(const SWKey &ikey) { +// not desirable Persist(ikey.Persist()); + setText((const char *)ikey); +} + + +/****************************************************************************** + * SWKey::getText - returns text key if (const char *) cast is requested + */ + +const char *SWKey::getText() const { + return keytext; +} + + +/****************************************************************************** + * SWKey::getRangeText - returns parsable range text for this key + */ + +const char *SWKey::getRangeText() const { + stdstr(&rangeText, keytext); + return rangeText; +} + + +/****************************************************************************** + * SWKey::compare - Compares another VerseKey object + * + * ENT: ikey - key to compare with this one + * + * RET: > 0 if this key is greater than compare key + * < 0 + * 0 + */ + +int SWKey::compare(const SWKey &ikey) +{ + return strcmp((const char *)*this, (const char *)ikey); +} + + +/****************************************************************************** + * SWKey::setPosition(SW_POSITION) - Positions this key if applicable + */ + +void SWKey::setPosition(SW_POSITION p) { + switch (p) { + case POS_TOP: +// *this = ""; + break; + case POS_BOTTOM: +// *this = "zzzzzzzzz"; + break; + } +} + + +/****************************************************************************** + * SWKey::increment - Increments key a number of entries + * + * ENT: increment - Number of entries to jump forward + * + * RET: *this + */ + +void SWKey::increment(int) { + error = KEYERR_OUTOFBOUNDS; +} + + +/****************************************************************************** + * SWKey::decrement - Decrements key a number of entries + * + * ENT: decrement - Number of entries to jump backward + * + * RET: *this + */ + +void SWKey::decrement(int) { + error = KEYERR_OUTOFBOUNDS; +} + +SWORD_NAMESPACE_END diff --git a/src/keys/treekey.cpp b/src/keys/treekey.cpp new file mode 100644 index 0000000..2b217ee --- /dev/null +++ b/src/keys/treekey.cpp @@ -0,0 +1,96 @@ +/****************************************************************************** + * versekey.h - code for class 'versekey'- a standard Biblical verse key + * + * $Id: treekey.cpp 1994 2006-11-20 20:24:06Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + + +#include +#include +#include + +SWORD_NAMESPACE_START + +static const char *classes[] = {"TreeKey", "SWKey", "SWObject", 0}; +SWClass TreeKey::classdef(classes); + +void TreeKey::init() { + myclass = &classdef; + unsnappedKeyText = ""; +} + + +void TreeKey::assureKeyPath(const char *keyBuffer) { + + if (!keyBuffer) { + keyBuffer = unsnappedKeyText; + //assert we have something to do before setting root + if (!*keyBuffer) + return; + } + + char *keybuf = 0; + stdstr(&keybuf, keyBuffer); + + root(); + + // TODO: change to NOT use strtok. strtok is dangerous. + SWBuf tok = strtok(keybuf, "/"); + tok.trim(); + while (tok.size()) { + bool foundkey = false; + if (hasChildren()) { + firstChild(); + if (tok == getLocalName()) { + foundkey = true; + } + else { + while (nextSibling()) { + if (getLocalName()) { + if (tok == getLocalName()) { + foundkey = true; + break; + } + } + } + } + if (!foundkey) { + append(); + setLocalName(tok); + save(); + } + } + else { + appendChild(); + setLocalName(tok); + save(); + } + +#ifdef DEBUG +// std::cout << getLocalName() << " : " << tok << std::endl; +#endif + + tok = strtok(0, "/"); + tok.trim(); + + } + delete [] keybuf; +} + + +SWORD_NAMESPACE_END diff --git a/src/keys/treekeyidx.cpp b/src/keys/treekeyidx.cpp new file mode 100644 index 0000000..738d17a --- /dev/null +++ b/src/keys/treekeyidx.cpp @@ -0,0 +1,643 @@ +/****************************************************************************** + * versekey.h - code for class 'versekey'- a standard Biblical verse key + * + * $Id: treekeyidx.cpp 2147 2008-03-14 06:54:18Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + + +#include +#include +#include +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +static const char nl = '\n'; +static const char *classes[] = {"TreeKeyIdx", "TreeKey", "SWKey", "SWObject", 0}; +SWClass TreeKeyIdx::classdef(classes); + + +TreeKeyIdx::TreeKeyIdx(const TreeKeyIdx &ikey) : currentNode() { + init(); + path = 0; + idxfd = 0; + datfd = 0; + copyFrom(ikey); +} + +TreeKeyIdx::TreeKeyIdx(const char *idxPath, int fileMode) : currentNode() { + SWBuf buf; + + init(); + path = 0; + stdstr(&path, idxPath); + + if (fileMode == -1) { // try read/write if possible + fileMode = FileMgr::RDWR; + } + + buf.setFormatted("%s.idx", path); + idxfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + buf.setFormatted("%s.dat", path); + datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + if (datfd <= 0) { + SWLog::getSystemLog()->logError("%d", errno); + error = errno; + } + else { + root(); + } +} + + +void TreeKeyIdx::init() { + myclass = &classdef; +} + + +TreeKeyIdx::~TreeKeyIdx () { + if (path) + delete [] path; + + FileMgr::getSystemFileMgr()->close(idxfd); + FileMgr::getSystemFileMgr()->close(datfd); +} + + +const char *TreeKeyIdx::getLocalName() { + unsnappedKeyText = ""; + return currentNode.name; +} + + +const char *TreeKeyIdx::getUserData(int *size) { + unsnappedKeyText = ""; + if (size) + *size = (int)currentNode.dsize; + return currentNode.userData; +} + + +void TreeKeyIdx::setUserData(const char *userData, int size) { + // this makes sure any unsnapped path exists + assureKeyPath(); + if (currentNode.userData) + delete currentNode.userData; + + if (!size) + size = strlen(userData) + 1; + + currentNode.userData = new char [ size ]; + memcpy(currentNode.userData, userData, size); + currentNode.dsize = size; +} + +const char *TreeKeyIdx::setLocalName(const char *newName) { + unsnappedKeyText = ""; + stdstr(&(currentNode.name), newName); + return currentNode.name; +} + + +void TreeKeyIdx::save() { + saveTreeNode(¤tNode); +} + + +void TreeKeyIdx::root() { + error = getTreeNodeFromIdxOffset(0, ¤tNode); +} + + +bool TreeKeyIdx::parent() { + if (currentNode.parent > -1) { + error = getTreeNodeFromIdxOffset(currentNode.parent, ¤tNode); + return true; + } + return false; +} + + +bool TreeKeyIdx::firstChild() { + if (currentNode.firstChild > -1) { + error = getTreeNodeFromIdxOffset(currentNode.firstChild, ¤tNode); + return true; + } + return false; +} + + +bool TreeKeyIdx::nextSibling() { + if (currentNode.next > -1) { + error = getTreeNodeFromIdxOffset(currentNode.next, ¤tNode); + return true; + } + return false; +} + + +bool TreeKeyIdx::previousSibling() { + TreeNode iterator; + __s32 target = currentNode.offset; + if (currentNode.parent > -1) { + getTreeNodeFromIdxOffset(currentNode.parent, &iterator); + getTreeNodeFromIdxOffset(iterator.firstChild, &iterator); + if (iterator.offset != target) { + while ((iterator.next != target) && (iterator.next > -1)) + getTreeNodeFromIdxOffset(iterator.next, &iterator); + if (iterator.next > -1) { + error = getTreeNodeFromIdxOffset(iterator.offset, ¤tNode); + return true; + } + } + } + return false; +} + + +bool TreeKeyIdx::hasChildren() { + return (currentNode.firstChild > -1); +} + + +void TreeKeyIdx::append() { + TreeNode lastSib; + if (currentNode.offset) { + getTreeNodeFromIdxOffset(currentNode.offset, &lastSib); + while (lastSib.next > -1) { + getTreeNodeFromIdxOffset(lastSib.next, &lastSib); + } + __u32 idxOffset = idxfd->seek(0, SEEK_END); + lastSib.next = idxOffset; + saveTreeNodeOffsets(&lastSib); + __u32 parent = currentNode.parent; + currentNode.clear(); + currentNode.offset = idxOffset; + currentNode.parent = parent; + } +} + + +void TreeKeyIdx::appendChild() { + if (firstChild()) { + append(); + } + else { + __u32 idxOffset = idxfd->seek(0, SEEK_END); + currentNode.firstChild = idxOffset; + saveTreeNodeOffsets(¤tNode); + __u32 parent = currentNode.offset; + currentNode.clear(); + currentNode.offset = idxOffset; + currentNode.parent = parent; + } +} + + +void TreeKeyIdx::insertBefore() { +} + + +void TreeKeyIdx::remove() { + TreeNode node; + bool done = false; + if (currentNode.offset) { + getTreeNodeFromIdxOffset(currentNode.offset, &node); + if (node.parent > -1) { + TreeNode parent; + getTreeNodeFromIdxOffset(node.parent, &parent); + if (parent.firstChild == node.offset) { + parent.firstChild = node.next; + saveTreeNodeOffsets(&parent); + getTreeNodeFromIdxOffset(parent.offset, ¤tNode); + done = true; + } + } + if (!done) { + TreeNode iterator; + __s32 target = currentNode.offset; + if (currentNode.parent > -1) { + getTreeNodeFromIdxOffset(currentNode.parent, &iterator); + getTreeNodeFromIdxOffset(iterator.firstChild, &iterator); + if (iterator.offset != target) { + while ((iterator.next != target) && (iterator.next > -1)) + getTreeNodeFromIdxOffset(iterator.next, &iterator); + if (iterator.next > -1) { + TreeNode prev; + getTreeNodeFromIdxOffset(iterator.offset, &prev); + prev.next = node.next; + saveTreeNodeOffsets(&prev); + getTreeNodeFromIdxOffset(prev.offset, ¤tNode); + } + } + } + } + } +} + + +/****************************************************************************** + * TreeKeyIdx::Create - Creates new key idx/dat files + * + * ENT: path - directory to store module files + * RET: error status + */ + +signed char TreeKeyIdx::create(const char *ipath) { + char *path = 0; + char *buf = new char [ strlen (ipath) + 20 ]; + FileDesc *fd, *fd2; + + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + sprintf(buf, "%s.dat", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s.idx", path); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + FileMgr::getSystemFileMgr()->close(fd2); + + TreeKeyIdx newTree(path); + TreeKeyIdx::TreeNode root; + stdstr(&(root.name), ""); + newTree.saveTreeNode(&root); + + delete [] path; + + return 0; +} + + +/****************************************************************************** + * zStr::getidxbufdat - Gets the index string at the given dat offset + * NOTE: buf is calloc'd, or if not null, realloc'd and must + * be free'd by calling function + * + * ENT: ioffset - offset in dat file to lookup + * node - address of pointer to allocate for storage of string + */ + +void TreeKeyIdx::getTreeNodeFromDatOffset(long ioffset, TreeNode *node) const { + unsnappedKeyText = ""; + char ch; + __s32 tmp; + __u16 tmp2; + + if (datfd > 0) { + + datfd->seek(ioffset, SEEK_SET); + + datfd->read(&tmp, 4); + node->parent = swordtoarch32(tmp); + + datfd->read(&tmp, 4); + node->next = swordtoarch32(tmp); + + datfd->read(&tmp, 4); + node->firstChild = swordtoarch32(tmp); + + SWBuf name; + do { + datfd->read(&ch, 1); + name += ch; + } while (ch); + + stdstr(&(node->name), name.c_str()); + + datfd->read(&tmp2, 2); + node->dsize = swordtoarch16(tmp2); + + if (node->dsize) { + if (node->userData) + delete [] node->userData; + node->userData = new char [node->dsize]; + datfd->read(node->userData, node->dsize); + } + } +} + + +/****************************************************************************** + * zStr::getidxbuf - Gets the index string at the given idx offset + * NOTE: buf is calloc'd, or if not null, realloc'd + * and must be freed by calling function + * + * ENT: ioffset - offset in idx file to lookup + * buf - address of pointer to allocate for storage of string + */ + +char TreeKeyIdx::getTreeNodeFromIdxOffset(long ioffset, TreeNode *node) const { + unsnappedKeyText = ""; + __u32 offset; + char error = KEYERR_OUTOFBOUNDS; + + if (ioffset < 0) { + ioffset = 0; + error = 77; // out of bounds but still position to 0; + } + + node->offset = ioffset; + if (idxfd > 0) { + if (idxfd->getFd() > 0) { + idxfd->seek(ioffset, SEEK_SET); + if (idxfd->read(&offset, 4) == 4) { + offset = swordtoarch32(offset); + error = (error == 77) ? KEYERR_OUTOFBOUNDS : 0; + getTreeNodeFromDatOffset(offset, node); + } + else { + idxfd->seek(-4, SEEK_END); + if (idxfd->read(&offset, 4) == 4) { + offset = swordtoarch32(offset); + getTreeNodeFromDatOffset(offset, node); + } + } + } + } + return error; +} + + +unsigned long TreeKeyIdx::getOffset() const { + unsnappedKeyText = ""; + return currentNode.offset; +} + +void TreeKeyIdx::setOffset(unsigned long offset) { + error = getTreeNodeFromIdxOffset(offset, ¤tNode); +} + + +void TreeKeyIdx::saveTreeNodeOffsets(TreeNode *node) { + unsnappedKeyText = ""; + long datOffset = 0; + __s32 tmp; + + if (idxfd > 0) { + idxfd->seek(node->offset, SEEK_SET); + if (idxfd->read(&tmp, 4) != 4) { + datOffset = datfd->seek(0, SEEK_END); + tmp = archtosword32(datOffset); + idxfd->write(&tmp, 4); + } + else { + datOffset = swordtoarch32(tmp); + datfd->seek(datOffset, SEEK_SET); + } + + tmp = archtosword32(node->parent); + datfd->write(&tmp, 4); + + tmp = archtosword32(node->next); + datfd->write(&tmp, 4); + + tmp = archtosword32(node->firstChild); + datfd->write(&tmp, 4); + } +} + + +void TreeKeyIdx::copyFrom(const TreeKeyIdx &ikey) { + unsnappedKeyText = ""; + + SWKey::copyFrom(ikey); + + currentNode.offset = ikey.currentNode.offset; + currentNode.parent = ikey.currentNode.parent; + currentNode.next = ikey.currentNode.next; + currentNode.firstChild = ikey.currentNode.firstChild; + stdstr(&(currentNode.name), ikey.currentNode.name); + currentNode.dsize = ikey.currentNode.dsize; + + if (currentNode.userData) + delete [] currentNode.userData; + if (currentNode.dsize) { + currentNode.userData = new char [ currentNode.dsize ]; + memcpy(currentNode.userData, ikey.currentNode.userData, currentNode.dsize); + } + else currentNode.userData = 0; + + bool newFiles = true; + + if (path && ikey.path) + newFiles = strcmp(path, ikey.path); + + if (newFiles) { + stdstr(&path, ikey.path); + + if (idxfd) { + FileMgr::getSystemFileMgr()->close(idxfd); + FileMgr::getSystemFileMgr()->close(datfd); + } + idxfd = FileMgr::getSystemFileMgr()->open(ikey.idxfd->path, ikey.idxfd->mode, ikey.idxfd->perms); + datfd = FileMgr::getSystemFileMgr()->open(ikey.datfd->path, ikey.datfd->mode, ikey.datfd->perms); + } +} + + +void TreeKeyIdx::saveTreeNode(TreeNode *node) { + long datOffset = 0; + __s32 tmp; + if (idxfd > 0) { + + idxfd->seek(node->offset, SEEK_SET); + datOffset = datfd->seek(0, SEEK_END); + tmp = archtosword32(datOffset); + idxfd->write(&tmp, 4); + + saveTreeNodeOffsets(node); + + datfd->write(node->name, strlen(node->name)); + char null = 0; + datfd->write(&null, 1); + + __u16 tmp2 = archtosword16(node->dsize); + datfd->write(&tmp2, 2); + + if (node->dsize) { + datfd->write(node->userData, node->dsize); + } + } +} + + +void TreeKeyIdx::setText(const char *ikey) { + char *buf = 0; + stdstr(&buf, ikey); + SWBuf leaf = strtok(buf, "/"); + leaf.trim(); + root(); + while ((leaf.size()) && (!Error())) { + bool ok, inChild = false; + error = KEYERR_OUTOFBOUNDS; + for (ok = firstChild(); ok; ok = nextSibling()) { + inChild = true; + if (leaf == getLocalName()) { + error = 0; + break; + } + } + leaf = strtok(0, "/"); + leaf.trim(); + if (!ok) { + if (inChild) { // if we didn't find a matching child node, default to first child + parent(); + firstChild(); + } + error = KEYERR_OUTOFBOUNDS; + } + } + if (leaf.size()) + error = KEYERR_OUTOFBOUNDS; + delete [] buf; + unsnappedKeyText = ikey; +} + + + +void TreeKeyIdx::copyFrom(const SWKey &ikey) { + unsnappedKeyText = ikey; + SWKey::copyFrom(ikey); +} + +void TreeKeyIdx::setPosition(SW_POSITION p) { + switch (p) { + case POS_TOP: + root(); + break; + case POS_BOTTOM: + error = getTreeNodeFromIdxOffset(idxfd->seek(-4, SEEK_END), ¤tNode); + break; + } + Error(); // clear error from normalize +} + + +int TreeKeyIdx::_compare (const TreeKeyIdx & ikey) { + return (getOffset() - ikey.getOffset()); +} + + +int TreeKeyIdx::compare(const SWKey &ikey) { + TreeKeyIdx *treeKey = SWDYNAMIC_CAST(TreeKeyIdx, (&ikey)); + if (treeKey) + return _compare(*treeKey); + return SWKey::compare(ikey); +} + + +void TreeKeyIdx::decrement(int steps) { + error = getTreeNodeFromIdxOffset(currentNode.offset - (4*steps), ¤tNode); +} + +void TreeKeyIdx::increment(int steps) { + error = getTreeNodeFromIdxOffset(currentNode.offset + (4*steps), ¤tNode); + +/* + // assert positive + if (steps < 0) { + decrement(steps * -1); + return; + } + + while (steps > 0) { + if (!firstChild()) { + if (!nextSibbling() { + error = KEYERR_OUTOFBOUNDS; + return; + } + } + steps--; + } +*/ +} + + + +const char *TreeKeyIdx::getText() const { + TreeNode parent; + static SWBuf fullPath; + fullPath = currentNode.name; + parent.parent = currentNode.parent; + while (parent.parent > -1) { + getTreeNodeFromIdxOffset(parent.parent, &parent); + fullPath = ((SWBuf)parent.name) + (SWBuf) "/" + fullPath; + } + // we've snapped; clear our unsnapped text holder + unsnappedKeyText = ""; + return fullPath.c_str(); +} + + +TreeKeyIdx::TreeNode::TreeNode() { + + name = 0; + stdstr(&name, ""); + userData = 0; + + clear(); +} + + +void TreeKeyIdx::TreeNode::clear() { + offset = 0; + parent = -1; + next = -1; + firstChild = -1; + dsize = 0; + + if (name) + delete [] name; + name = 0; + stdstr(&name, ""); + + if (userData) + delete [] userData; + userData = 0; +} + + +TreeKeyIdx::TreeNode::~TreeNode() { + if (name) + delete [] name; + + if (userData) + delete [] userData; +} + + +SWKey *TreeKeyIdx::clone() const +{ + return new TreeKeyIdx(*this); +} + +SWORD_NAMESPACE_END diff --git a/src/keys/versekey.cpp b/src/keys/versekey.cpp new file mode 100644 index 0000000..cb7bbfc --- /dev/null +++ b/src/keys/versekey.cpp @@ -0,0 +1,1664 @@ +/****************************************************************************** + * VerseKey.cpp - code for class 'VerseKey'- a standard Biblical verse key + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +static const char *classes[] = {"VerseKey", "SWKey", "SWObject", 0}; +SWClass VerseKey::classdef(classes); + +/****************************************************************************** + * Initialize static members of VerseKey + */ + +#include // Initialize static members of canonical books structure + +struct sbook *VerseKey::builtin_books[2] = {0,0}; +const char VerseKey::builtin_BMAX[2] = {39, 27}; +long *VerseKey::offsets[2][2] = {{VerseKey::otbks, VerseKey::otcps}, {VerseKey::ntbks, VerseKey::ntcps}}; +int VerseKey::instance = 0; +VerseKey::LocaleCache VerseKey::localeCache; + + +/****************************************************************************** + * VerseKey::init - initializes instance of VerseKey + */ + +void VerseKey::init() { + myclass = &classdef; + if (!instance) + initstatics(); + + instance++; + autonorm = 1; // default auto normalization to true + headings = 0; // default display headings option is false + upperBound = 0; + lowerBound = 0; + boundSet = false; + testament = 0; + book = 0; + chapter = 0; + verse = 0; + locale = 0; + + setLocale(LocaleMgr::getSystemLocaleMgr()->getDefaultLocaleName()); +} + +/****************************************************************************** + * VerseKey Constructor - initializes instance of VerseKey + * + * ENT: ikey - base key (will take various forms of 'BOOK CH:VS'. See + * VerseKey::parse for more detailed information) + */ + +VerseKey::VerseKey(const SWKey &ikey) : SWKey(ikey) +{ + init(); + copyFrom(ikey); +} + + +VerseKey::VerseKey(const SWKey *ikey) : SWKey(*ikey) +{ + init(); + if (ikey) + copyFrom(*ikey); +} + + +/****************************************************************************** + * VerseKey Constructor - initializes instance of VerseKey + * + * ENT: ikey - text key (will take various forms of 'BOOK CH:VS'. See + * VerseKey::parse for more detailed information) + */ + +VerseKey::VerseKey(const char *ikeyText) : SWKey(ikeyText) +{ + init(); + if (ikeyText) + parse(); +} + + +VerseKey::VerseKey(VerseKey const &k) : SWKey(k) +{ + init(); + copyFrom(k); +} + + +/****************************************************************************** + * VerseKey::copyFrom - Equates this VerseKey to another VerseKey + */ + +void VerseKey::copyFrom(const VerseKey &ikey) { + autonorm = ikey.autonorm; + headings = ikey.headings; + testament = ikey.Testament(); + book = ikey.Book(); + chapter = ikey.Chapter(); + verse = ikey.Verse(); + if (ikey.isBoundSet()) { + LowerBound(ikey.LowerBound()); + UpperBound(ikey.UpperBound()); + } +} + + +/****************************************************************************** + * VerseKey::copyFrom - Equates this VerseKey to another SWKey + */ + +void VerseKey::copyFrom(const SWKey &ikey) { + // check to see if we can do a more specific copy + // plus some optimizations + const SWKey *fromKey = &ikey; + ListKey *tryList = SWDYNAMIC_CAST(ListKey, fromKey); + if (tryList) { + SWKey *k = tryList->getElement(); + if (k) fromKey = k; + } + VerseKey *tryVerse = SWDYNAMIC_CAST(VerseKey, fromKey); + if (tryVerse) { + copyFrom(*tryVerse); + } + else { + SWKey::copyFrom(*fromKey); + parse(); + } +} + + +VerseKey::VerseKey(const char *min, const char *max) : SWKey() +{ + init(); + LowerBound(min); + UpperBound(max); + setPosition(TOP); +} + + +SWKey *VerseKey::clone() const +{ + return new VerseKey(*this); +} + + +/****************************************************************************** + * VerseKey Destructor - cleans up instance of VerseKey + * + * ENT: ikey - text key + */ + +VerseKey::~VerseKey() { + if (upperBound) + delete upperBound; + if (lowerBound) + delete lowerBound; + if (locale) + delete [] locale; + + --instance; +} + + +void VerseKey::setLocale(const char *name) { + char *BMAX; + struct sbook **lbooks; + bool useCache = false; + + if (localeCache.name) + useCache = (!strcmp(localeCache.name, name)); + + if (!useCache) { // if we're setting params for a new locale + stdstr(&(localeCache.name), name); + localeCache.abbrevsCnt = 0; + } + + SWLocale *locale = (useCache) ? localeCache.locale : LocaleMgr::getSystemLocaleMgr()->getLocale(name); + localeCache.locale = locale; + + if (locale) { + locale->getBooks(&BMAX, &lbooks); + setBooks(BMAX, lbooks); + setBookAbbrevs(locale->getBookAbbrevs(), localeCache.abbrevsCnt); + localeCache.abbrevsCnt = abbrevsCnt; + } + else { + setBooks(builtin_BMAX, builtin_books); + setBookAbbrevs(builtin_abbrevs, localeCache.abbrevsCnt); + localeCache.abbrevsCnt = abbrevsCnt; + } + stdstr(&(this->locale), localeCache.name); + + if (lowerBound) + LowerBound().setLocale(name); + if (upperBound) + UpperBound().setLocale(name); +} + +void VerseKey::setBooks(const char *iBMAX, struct sbook **ibooks) { + BMAX = iBMAX; + books = ibooks; +} + + +void VerseKey::setBookAbbrevs(const struct abbrev *bookAbbrevs, unsigned int size) { + abbrevs = bookAbbrevs; + if (!size) { + for (abbrevsCnt = 0; *abbrevs[abbrevsCnt].ab; abbrevsCnt++) { + /* + if (strcmp(abbrevs[abbrevsCnt-1].ab, abbrevs[abbrevsCnt].ab) > 0) { + fprintf(stderr, "ERROR: book abbreviation (canon.h or locale) misordered at entry: %s\n", abbrevs[abbrevsCnt].ab); + exit(-1); + } + */ + } + + if (SWLog::getSystemLog()->getLogLevel() > 0) { //make sure log is wanted, this loop stuff costs a lot of time + for (int t = 0; t < 2; t++) { + for (int i = 0; i < BMAX[t]; i++) { + const int bn = getBookAbbrev(books[t][i].name); + if ((bn-1)%39 != i) { + SWLog::getSystemLog()->logError("VerseKey::Book: %s does not have a matching toupper abbrevs entry! book number returned was: %d(%d). Required entry should be:", + books[t][i].name, bn, i); + char *abbr = 0; + stdstr(&abbr, books[t][i].name, 2); + strstrip(abbr); + + StringMgr* stringMgr = StringMgr::getSystemStringMgr(); + const bool hasUTF8Support = StringMgr::hasUTF8Support(); + if (hasUTF8Support) { //we have support for UTF-8 handling; we expect UTF-8 encoded locales + stringMgr->upperUTF8(abbr, strlen(abbr)*2); + } + else { + stringMgr->upperLatin1(abbr); + } + SWLog::getSystemLog()->logError("%s=%d", abbr, (t*39)+i+1); + } + } + } + } + } + else abbrevsCnt = size; +} + + +/****************************************************************************** + * VerseKey::initstatics - initializes statics. Performed only when first + * instance on VerseKey (or descendent) is created. + */ + +void VerseKey::initstatics() { + int l1, l2, chaptmp = 0; + + builtin_books[0] = otbooks; + builtin_books[1] = ntbooks; + + for (l1 = 0; l1 < 2; l1++) { + for (l2 = 0; l2 < builtin_BMAX[l1]; l2++) { + builtin_books[l1][l2].versemax = &vm[chaptmp]; + chaptmp += builtin_books[l1][l2].chapmax; + } + } +} + + +/****************************************************************************** + * VerseKey::parse - parses keytext into testament|book|chapter|verse + * + * RET: error status + */ + +char VerseKey::parse(bool checkAutoNormalize) +{ + + + testament = 2; + book = BMAX[1]; + chapter = 1; + verse = 1; + int booklen = 0; + + int error = 0; + + if (keytext) { + ListKey tmpListKey = VerseKey::ParseVerseList(keytext); + if (tmpListKey.Count()) { + SWKey::setText((const char *)tmpListKey); + for (int i = 1; i < 3; i++) { + for (int j = 1; j <= BMAX[i-1]; j++) { + int matchlen = strlen(books[i-1][j-1].name); + if (!strncmp(keytext, books[i-1][j-1].name, matchlen)) { + if (matchlen > booklen) { + booklen = matchlen; + testament = i; + book = j; + } + } + } + } + + if (booklen) { + sscanf(&keytext[booklen], "%d:%d", &chapter, &verse); + } + else error = 1; + } else error = 1; + } + if (checkAutoNormalize) { + Normalize(1); + } + freshtext(); + + return (this->error) ? this->error : (this->error = error); +} + + +/****************************************************************************** + * VerseKey::freshtext - refreshes keytext based on + * testament|book|chapter|verse + */ + +void VerseKey::freshtext() const +{ + char buf[2024]; + int realtest = testament; + int realbook = book; + + if (book < 1) { + if (testament < 1) + sprintf(buf, "[ Module Heading ]"); + else sprintf(buf, "[ Testament %d Heading ]", (int)testament); + } + else { + if (realbook > BMAX[realtest-1]) { + realbook -= BMAX[realtest-1]; + if (realtest < 2) + realtest++; + if (realbook > BMAX[realtest-1]) + realbook = BMAX[realtest-1]; + } + sprintf(buf, "%s %d:%d", books[realtest-1][realbook-1].name, chapter, verse); + } + + stdstr((char **)&keytext, buf); +} + + + +/****************************************************************************** + * VerseKey::getBookAbbrev - Attempts to find a book abbreviation for a buffer + * + * ENT: abbr - key for which to search; + * RET: book number or < 0 = not valid + */ + +int VerseKey::getBookAbbrev(const char *iabbr) +{ + int diff, abLen, min, max, target, retVal = -1; + + char *abbr = 0; + + StringMgr* stringMgr = StringMgr::getSystemStringMgr(); + const bool hasUTF8Support = StringMgr::hasUTF8Support(); + + // The first iteration of this loop tries to uppercase + // the string. If we still fail to match, we try + // matching the string without any toupper logic. + // This is useful for, say, Chinese user input + // on a system that doesn't properly support + // a true Unicode-toupper function (!hasUTF8Support) + for (int i = 0; i < 2; i++) { + stdstr(&abbr, iabbr, 2); + strstrip(abbr); + + if (!i) { + if (hasUTF8Support) { //we have support for UTF-8 handling; we expect UTF-8 encoded locales + stringMgr->upperUTF8(abbr, strlen(abbr)*2); + } + else { + stringMgr->upperLatin1(abbr); + } + } + + abLen = strlen(abbr); + + if (abLen) { + min = 0; + max = abbrevsCnt; + + // binary search for a match + while(1) { + target = min + ((max - min) / 2); + diff = strncmp(abbr, abbrevs[target].ab, abLen); + if ((!diff)||(target >= max)||(target <= min)) + break; + if (diff > 0) + min = target; + else max = target; + } + + // lets keep backing up till we find the 'first' valid match + for (; target > 0; target--) { + if (strncmp(abbr, abbrevs[target-1].ab, abLen)) + break; + } + + retVal = (!diff) ? abbrevs[target].book : -1; + } + if (retVal > 0) + break; + } + delete [] abbr; + return retVal; +} + + +/****************************************************************************** + * VerseKey::ParseVerseList - Attempts to parse a buffer into separate + * verse entries returned in a ListKey + * + * ENT: buf - buffer to parse; + * defaultKey - if verse, chap, book, or testament is left off, + * pull info from this key (ie. Gen 2:3; 4:5; + * Gen would be used when parsing the 4:5 section) + * expandRange - whether or not to expand eg. John 1:10-12 or just + * save John 1:10 + * + * RET: ListKey reference filled with verse entries contained in buf + * + * COMMENT: This code works but wreaks. Rewrite to make more maintainable. + */ + +ListKey VerseKey::ParseVerseList(const char *buf, const char *defaultKey, bool expandRange) { + char book[2048]; + char number[2048]; + *book = 0; + *number = 0; + int tobook = 0; + int tonumber = 0; + int chap = -1, verse = -1; + int bookno = 0; + VerseKey curKey, lBound, lastKey; + curKey.setLocale(getLocale()); + lBound.setLocale(getLocale()); + lastKey.setLocale(getLocale()); + int loop; + char comma = 0; + char dash = 0; + const char *orig = buf; + int q; + ListKey tmpListKey; + ListKey internalListKey; + char lastPartial = 0; + bool inTerm = true; + int notAllDigits = 0; + + curKey.AutoNormalize(0); + if (defaultKey) lastKey = defaultKey; + + while (*buf) { + switch (*buf) { + case ':': + if (buf[1] != ' ') { // for silly Mat 1:1: this verse.... + number[tonumber] = 0; + tonumber = 0; + if (*number) + chap = atoi(number); + *number = 0; + comma = 0; + break; + } + // otherwise drop down to next case + case ' ': + inTerm = true; + while (true) { + if ((!*number) || (chap < 0)) + break; + for (q = 1; ((buf[q]) && (buf[q] != ' ')); q++); + if (buf[q] == ':') + break; + inTerm = false; + break; + } + if (inTerm) { + book[tobook++] = ' '; + break; + } + + case '-': + case ',': // on number new verse + case ';': // on number new chapter + number[tonumber] = 0; + tonumber = 0; + if (*number) { + if (chap >= 0) + verse = atoi(number); + else chap = atoi(number); + } + *number = 0; + book[tobook] = 0; + tobook = 0; + bookno = -1; + if (*book) { + for (loop = strlen(book) - 1; loop+1; loop--) { + if ((isdigit(book[loop])) || (book[loop] == ' ')) { + book[loop] = 0; + continue; + } + else { + if ((SW_toupper(book[loop])=='F')&&(loop)) { + if ((isdigit(book[loop-1])) || (book[loop-1] == ' ') || (SW_toupper(book[loop-1]) == 'F')) { + book[loop] = 0; + continue; + } + } + } + break; + } + + for (loop = strlen(book) - 1; loop+1; loop--) { + if (book[loop] == ' ') { + if (isroman(&book[loop+1])) { + if (verse == -1) { + verse = chap; + chap = from_rom(&book[loop+1]); + book[loop] = 0; + } + } + break; + } + } + + if ((!stricmp(book, "V")) || (!stricmp(book, "VER"))) { // Verse abbrev + if (verse == -1) { + verse = chap; + chap = lastKey.Chapter(); + *book = 0; + } + } + if ((!stricmp(book, "ch")) || (!stricmp(book, "chap"))) { // Verse abbrev + strcpy(book, lastKey.getBookName()); + } + bookno = getBookAbbrev(book); + } + if (((bookno > -1) || (!*book)) && ((*book) || (chap >= 0) || (verse >= 0))) { + char partial = 0; + curKey.Verse(1); + curKey.Chapter(1); + curKey.Book(1); + + if (bookno < 0) { + curKey.Testament(lastKey.Testament()); + curKey.Book(lastKey.Book()); + } + else { + curKey.Testament(1); + curKey.Book(bookno); + } + + if (((comma)||((verse < 0)&&(bookno < 0)))&&(!lastPartial)) { +// if (comma) { + curKey.Chapter(lastKey.Chapter()); + curKey.Verse(chap); // chap because this is the first number captured + } + else { + if (chap >= 0) { + curKey.Chapter(chap); + } + else { + partial++; + curKey.Chapter(1); + } + if (verse >= 0) { + curKey.Verse(verse); + } + else { + partial++; + curKey.Verse(1); + } + } + + // check for '-' + for (q = 0; ((buf[q]) && (buf[q] == ' ')); q++); + if ((buf[q] == '-') && (expandRange)) { // if this is a dash save lowerBound and wait for upper + buf+=q; + lastKey.LowerBound(curKey); + lastKey.setPosition(TOP); + tmpListKey << lastKey; + tmpListKey.GetElement()->userData = (void *)buf; + } + else { + if (!dash) { // if last separator was not a dash just add + if (expandRange && partial) { + lastKey.LowerBound(curKey); + if (partial > 1) + curKey.setPosition(MAXCHAPTER); + if (partial > 0) + curKey = MAXVERSE; + lastKey.UpperBound(curKey); + lastKey = TOP; + tmpListKey << lastKey; + tmpListKey.GetElement()->userData = (void *)buf; + } + else { + // we store non-range entries as strings so we don't traverse + // maybe we should consider just setting + // lowerBound and upperBound to the same value + tmpListKey << curKey.getText(); + tmpListKey.GetElement()->userData = (void *)buf; + lastKey = curKey; + } + } + else if (expandRange) { + VerseKey *newElement = SWDYNAMIC_CAST(VerseKey, tmpListKey.GetElement()); + if (newElement) { + if (partial > 1) + curKey = MAXCHAPTER; + if (partial > 0) + curKey = MAXVERSE; + newElement->UpperBound(curKey); + *newElement = TOP; + tmpListKey.GetElement()->userData = (void *)buf; + } + } + } + lastPartial = partial; + } + *book = 0; + chap = -1; + verse = -1; + if (*buf == ',') + comma = 1; + else comma = 0; + if (*buf == '-') + dash = 1; + else dash = 0; + break; + case 10: // ignore these + case 13: + case '[': + case ']': + case '(': + case ')': + case '{': + case '}': + break; + case '.': + if (buf > orig) // ignore (break) if preceeding char is not a digit + for (notAllDigits = tobook; notAllDigits; notAllDigits--) { + if ((!isdigit(book[notAllDigits-1])) && (!strchr(" .", book[notAllDigits-1]))) + break; + } + if (!notAllDigits) + break; + + number[tonumber] = 0; + tonumber = 0; + if (*number) + chap = atoi(number); + *number = 0; + break; + + default: + if (isdigit(*buf)) { + number[tonumber++] = *buf; + } + else { + switch (*buf) { + case ' ': // ignore these and don't reset number + case 'f': + case 'F': + break; + default: + number[tonumber] = 0; + tonumber = 0; + break; + } + } + if (chap == -1) + book[tobook++] = *buf; + } + buf++; + } + number[tonumber] = 0; + tonumber = 0; + if (*number) { + if (chap >= 0) + verse = atoi(number); + else chap = atoi(number); + } + *number = 0; + book[tobook] = 0; + tobook = 0; + if (*book) { + for (loop = strlen(book) - 1; loop+1; loop--) { + if ((isdigit(book[loop])) || (book[loop] == ' ')) { + book[loop] = 0; + continue; + } + else { + if ((SW_toupper(book[loop])=='F')&&(loop)) { + if ((isdigit(book[loop-1])) || (book[loop-1] == ' ') || (SW_toupper(book[loop-1]) == 'F')) { + book[loop] = 0; + continue; + } + } + } + break; + } + + for (loop = strlen(book) - 1; loop+1; loop--) { + if (book[loop] == ' ') { + if (isroman(&book[loop+1])) { + if (verse == -1) { + verse = chap; + chap = from_rom(&book[loop+1]); + book[loop] = 0; + } + } + break; + } + } + + if ((!stricmp(book, "V")) || (!stricmp(book, "VER"))) { // Verse abbrev. + if (verse == -1) { + verse = chap; + chap = lastKey.Chapter(); + *book = 0; + } + } + + if ((!stricmp(book, "ch")) || (!stricmp(book, "chap"))) { // Verse abbrev + strcpy(book, lastKey.getBookName()); + } + bookno = getBookAbbrev(book); + } + if (((bookno > -1) || (!*book)) && ((*book) || (chap >= 0) || (verse >= 0))) { + char partial = 0; + curKey.Verse(1); + curKey.Chapter(1); + curKey.Book(1); + + if (bookno < 0) { + curKey.Testament(lastKey.Testament()); + curKey.Book(lastKey.Book()); + } + else { + curKey.Testament(1); + curKey.Book(bookno); + } + + if (((comma)||((verse < 0)&&(bookno < 0)))&&(!lastPartial)) { + curKey.Chapter(lastKey.Chapter()); + curKey.Verse(chap); // chap because this is the first number captured + } + else { + if (chap >= 0) { + curKey.Chapter(chap); + } + else { + partial++; + curKey.Chapter(1); + } + if (verse >= 0) { + curKey.Verse(verse); + } + else { + partial++; + curKey.Verse(1); + } + } + + if ((*buf == '-') && (expandRange)) { // if this is a dash save lowerBound and wait for upper + lastKey.LowerBound(curKey); + lastKey = TOP; + tmpListKey << lastKey; + tmpListKey.GetElement()->userData = (void *)buf; + } + else { + if (!dash) { // if last separator was not a dash just add + if (expandRange && partial) { + lastKey.LowerBound(curKey); + if (partial > 1) + curKey = MAXCHAPTER; + if (partial > 0) + curKey = MAXVERSE; + lastKey.UpperBound(curKey); + lastKey = TOP; + tmpListKey << lastKey; + tmpListKey.GetElement()->userData = (void *)buf; + } + else { + tmpListKey << curKey.getText(); + tmpListKey.GetElement()->userData = (void *)buf; + lastKey = curKey; + } + } + else if (expandRange) { + VerseKey *newElement = SWDYNAMIC_CAST(VerseKey, tmpListKey.GetElement()); + if (newElement) { + if (partial > 1) + curKey = MAXCHAPTER; + if (partial > 0) + curKey = MAXVERSE; + newElement->UpperBound(curKey); + *newElement = TOP; + tmpListKey.GetElement()->userData = (void *)buf; + } + } + } + } + *book = 0; + tmpListKey = TOP; + internalListKey = tmpListKey; + internalListKey = TOP; // Align internalListKey to first element before passing back; + + return internalListKey; +} + + +/****************************************************************************** + * VerseKey::LowerBound - sets / gets the lower boundary for this key + */ + +VerseKey &VerseKey::LowerBound(const char *lb) +{ + if (!lowerBound) + initBounds(); + + (*lowerBound) = lb; + lowerBound->Normalize(); + lowerBound->setLocale( this->getLocale() ); + boundSet = true; + return (*lowerBound); +} + + +/****************************************************************************** + * VerseKey::UpperBound - sets / gets the upper boundary for this key + */ + +VerseKey &VerseKey::UpperBound(const char *ub) +{ + if (!upperBound) + initBounds(); + +// need to set upperbound parsing to resolve to max verse/chap if not specified + (*upperBound) = ub; + if (*upperBound < *lowerBound) + *upperBound = *lowerBound; + upperBound->Normalize(); + upperBound->setLocale( this->getLocale() ); + +// until we have a proper method to resolve max verse/chap use this kludge + int len = strlen(ub); + bool alpha = false; + bool versespec = false; + bool chapspec = false; + for (int i = 0; i < len; i++) { + if (isalpha(ub[i])) + alpha = true; + if (ub[i] == ':') // if we have a : we assume verse spec + versespec = true; + if ((isdigit(ub[i])) && (alpha)) // if digit after alpha assume chap spec + chapspec = true; + } + if (!chapspec) + *upperBound = MAXCHAPTER; + if (!versespec) + *upperBound = MAXVERSE; + + +// -- end kludge + boundSet = true; + return (*upperBound); +} + + +/****************************************************************************** + * VerseKey::LowerBound - sets / gets the lower boundary for this key + */ + +VerseKey &VerseKey::LowerBound() const +{ + if (!lowerBound) + initBounds(); + + return (*lowerBound); +} + + +/****************************************************************************** + * VerseKey::UpperBound - sets / gets the upper boundary for this key + */ + +VerseKey &VerseKey::UpperBound() const +{ + if (!upperBound) + initBounds(); + + return (*upperBound); +} + + +/****************************************************************************** + * VerseKey::ClearBounds - clears bounds for this VerseKey + */ + +void VerseKey::ClearBounds() +{ + initBounds(); +} + + +void VerseKey::initBounds() const +{ + if (!upperBound) { + upperBound = new VerseKey(); + upperBound->AutoNormalize(0); + upperBound->Headings(1); + } + if (!lowerBound) { + lowerBound = new VerseKey(); + lowerBound->AutoNormalize(0); + lowerBound->Headings(1); + } + + lowerBound->Testament(0); + lowerBound->Book(0); + lowerBound->Chapter(0); + lowerBound->Verse(0); + + upperBound->Testament(2); + upperBound->Book(BMAX[1]); + upperBound->Chapter(books[1][BMAX[1]-1].chapmax); + upperBound->Verse(books[1][BMAX[1]-1].versemax[upperBound->Chapter()-1]); + boundSet = false; +} + + +/****************************************************************************** + * VerseKey::getText - refreshes keytext before returning if cast to + * a (char *) is requested + */ + +const char *VerseKey::getText() const { + freshtext(); + return keytext; +} + + +const char *VerseKey::getShortText() const { + static char *stext = 0; + char buf[2047]; + freshtext(); + if (book < 1) { + if (testament < 1) + sprintf(buf, "[ Module Heading ]"); + else sprintf(buf, "[ Testament %d Heading ]", (int)testament); + } + else { + sprintf(buf, "%s %d:%d", books[testament-1][book-1].prefAbbrev, chapter, verse); + } + stdstr(&stext, buf); + return stext; +} + + +const char *VerseKey::getBookName() const { + return books[testament-1][book-1].name; +} + + +const char *VerseKey::getBookAbbrev() const { + return books[testament-1][book-1].prefAbbrev; +} +/****************************************************************************** + * VerseKey::setPosition(SW_POSITION) - Positions this key + * + * ENT: p - position + * + * RET: *this + */ + +void VerseKey::setPosition(SW_POSITION p) { + switch (p) { + case POS_TOP: + testament = LowerBound().Testament(); + book = LowerBound().Book(); + chapter = LowerBound().Chapter(); + verse = LowerBound().Verse(); + break; + case POS_BOTTOM: + testament = UpperBound().Testament(); + book = UpperBound().Book(); + chapter = UpperBound().Chapter(); + verse = UpperBound().Verse(); + break; + case POS_MAXVERSE: + Normalize(); + verse = books[testament-1][book-1].versemax[chapter-1]; + break; + case POS_MAXCHAPTER: + verse = 1; + Normalize(); + chapter = books[testament-1][book-1].chapmax; + break; + } + Normalize(1); + Error(); // clear error from normalize +} + + +/****************************************************************************** + * VerseKey::increment - Increments key a number of verses + * + * ENT: step - Number of verses to jump forward + * + * RET: *this + */ + +void VerseKey::increment(int step) { + char ierror = 0; + Index(Index() + step); + while ((!verse) && (!headings) && (!ierror)) { + Index(Index() + 1); + ierror = Error(); + } + + error = (ierror) ? ierror : error; +} + + +/****************************************************************************** + * VerseKey::decrement - Decrements key a number of verses + * + * ENT: step - Number of verses to jump backward + * + * RET: *this + */ + +void VerseKey::decrement(int step) { + char ierror = 0; + + Index(Index() - step); + while ((!verse) && (!headings) && (!ierror)) { + Index(Index() - 1); + ierror = Error(); + } + if ((ierror) && (!headings)) + (*this)++; + + error = (ierror) ? ierror : error; +} + + +/****************************************************************************** + * VerseKey::Normalize - checks limits and normalizes if necessary (e.g. + * Matthew 29:47 = Mark 2:2). If last verse is + * exceeded, key is set to last Book CH:VS + * RET: *this + */ + +void VerseKey::Normalize(char autocheck) +{ + error = 0; + + if (((!autocheck) || (autonorm)) // only normalize if we were explicitely called or if autonorm is turned on + && + ((!headings) || ((verse) && (chapter)))) { // this is cheeze and temporary until deciding what actions should be taken; so headings should only be turned on when positioning with Index() or incrementors + + while ((testament < 3) && (testament > 0)) { + + if (book > BMAX[testament-1]) { + book -= BMAX[testament-1]; + testament++; + continue; + } + + if (book < 1) { + if (--testament > 0) { + book += BMAX[testament-1]; + } + continue; + } + + if (chapter > books[testament-1][book-1].chapmax) { + chapter -= books[testament-1][book-1].chapmax; + book++; + continue; + } + + if (chapter < 1) { + if (--book > 0) { + chapter += books[testament-1][book-1].chapmax; + } + else { + if (testament > 1) { + chapter += books[0][BMAX[0]-1].chapmax; + } + } + continue; + } + + if (verse > books[testament-1][book-1].versemax[chapter-1]) { // -1 because e.g chapter 1 of Matthew is books[1][0].versemax[0] + verse -= books[testament-1][book-1].versemax[chapter++ - 1]; + continue; + } + + if (verse < 1) { + if (--chapter > 0) { + verse += books[testament-1][book-1].versemax[chapter-1]; + } + else { + if (book > 1) { + verse += books[testament-1][book-2].versemax[books[testament-1][book-2].chapmax-1]; + } + else { + if (testament > 1) { + verse += books[0][BMAX[0]-1].versemax[books[0][BMAX[0]-1].chapmax-1]; + } + } + } + continue; + } + + break; // If we've made it this far (all failure checks continue) we're ok + } + + if (testament > 2) { + testament = 2; + book = BMAX[testament-1]; + chapter = books[testament-1][book-1].chapmax; + verse = books[testament-1][book-1].versemax[chapter-1]; + error = KEYERR_OUTOFBOUNDS; + } + + if (testament < 1) { + error = ((!headings) || (testament < 0) || (book < 0)) ? KEYERR_OUTOFBOUNDS : 0; + testament = ((headings) ? 0 : 1); + book = ((headings) ? 0 : 1); + chapter = ((headings) ? 0 : 1); + verse = ((headings) ? 0 : 1); + } + + // should we always perform bounds checks? Tried but seems to cause infinite recursion + if (_compare(UpperBound()) > 0) { + setText(UpperBound(), false); + error = KEYERR_OUTOFBOUNDS; + } + if (_compare(LowerBound()) < 0) { + setText(LowerBound(), false); + error = KEYERR_OUTOFBOUNDS; + } + } +} + + +/****************************************************************************** + * VerseKey::Testament - Gets testament + * + * RET: value of testament + */ + +char VerseKey::Testament() const +{ + return testament; +} + + +/****************************************************************************** + * VerseKey::Book - Gets book + * + * RET: value of book + */ + +char VerseKey::Book() const +{ + return book; +} + + +/****************************************************************************** + * VerseKey::Chapter - Gets chapter + * + * RET: value of chapter + */ + +int VerseKey::Chapter() const +{ + return chapter; +} + + +/****************************************************************************** + * VerseKey::Verse - Gets verse + * + * RET: value of verse + */ + +int VerseKey::Verse() const +{ + return verse; +} + + +/****************************************************************************** + * VerseKey::Testament - Sets/gets testament + * + * ENT: itestament - value which to set testament + * [MAXPOS(char)] - only get + * + * RET: if unchanged -> value of testament + * if changed -> previous value of testament + */ + +char VerseKey::Testament(char itestament) +{ + char retval = testament; + + if (itestament != MAXPOS(char)) { + testament = itestament; + Normalize(1); + } + return retval; +} + + +/****************************************************************************** + * VerseKey::Book - Sets/gets book + * + * ENT: ibook - value which to set book + * [MAXPOS(char)] - only get + * + * RET: if unchanged -> value of book + * if changed -> previous value of book + */ + +char VerseKey::Book(char ibook) +{ + char retval = book; + + Chapter(1); + book = ibook; + Normalize(1); + + return retval; +} + + +/****************************************************************************** + * VerseKey::Chapter - Sets/gets chapter + * + * ENT: ichapter - value which to set chapter + * [MAXPOS(int)] - only get + * + * RET: if unchanged -> value of chapter + * if changed -> previous value of chapter + */ + +int VerseKey::Chapter(int ichapter) +{ + int retval = chapter; + + Verse(1); + chapter = ichapter; + Normalize(1); + + return retval; +} + + +/****************************************************************************** + * VerseKey::Verse - Sets/gets verse + * + * ENT: iverse - value which to set verse + * [MAXPOS(int)] - only get + * + * RET: if unchanged -> value of verse + * if changed -> previous value of verse + */ + +int VerseKey::Verse(int iverse) +{ + int retval = verse; + + verse = iverse; + Normalize(1); + + return retval; +} + + +/****************************************************************************** + * VerseKey::AutoNormalize - Sets/gets flag that tells VerseKey to auto- + * matically normalize itself when modified + * + * ENT: iautonorm - value which to set autonorm + * [MAXPOS(char)] - only get + * + * RET: if unchanged -> value of autonorm + * if changed -> previous value of autonorm + */ + +char VerseKey::AutoNormalize(char iautonorm) +{ + char retval = autonorm; + + if (iautonorm != MAXPOS(char)) { + autonorm = iautonorm; + Normalize(1); + } + return retval; +} + + +/****************************************************************************** + * VerseKey::Headings - Sets/gets flag that tells VerseKey to include + * chap/book/testmnt/module headings + * + * ENT: iheadings - value which to set headings + * [MAXPOS(char)] - only get + * + * RET: if unchanged -> value of headings + * if changed -> previous value of headings + */ + +char VerseKey::Headings(char iheadings) +{ + char retval = headings; + + if (iheadings != MAXPOS(char)) { + headings = iheadings; + Normalize(1); + } + return retval; +} + + +/****************************************************************************** + * VerseKey::findindex - binary search to find the index closest, but less + * than the given value. + * + * ENT: array - long * to array to search + * size - number of elements in the array + * value - value to find + * + * RET: the index into the array that is less than but closest to value + */ + +int VerseKey::findindex(long *array, int size, long value) +{ + int lbound, ubound, tval; + + lbound = 0; + ubound = size - 1; + while ((ubound - lbound) > 1) { + tval = lbound + (ubound-lbound)/2; + if (array[tval] <= value) + lbound = tval; + else ubound = tval; + } + return (array[ubound] <= value) ? ubound : lbound; +} + + +/****************************************************************************** + * VerseKey::Index - Gets index based upon current verse + * + * RET: offset + */ + +long VerseKey::Index() const +{ + long offset; + + if (!testament) { // if we want module heading + offset = 0; + verse = 0; + } + else { + if (!book) + chapter = 0; + if (!chapter) + verse = 0; + + offset = offsets[testament-1][0][book]; + offset = offsets[testament-1][1][(int)offset + chapter]; + if (!(offset|verse)) // if we have a testament but nothing else. + offset = 1; + } + return (offset + verse); +} + + +/****************************************************************************** + * VerseKey::Index - Gets index based upon current verse + * + * RET: offset + */ + +long VerseKey::NewIndex() const +{ + static long otMaxIndex = 32300 - 8245; // total positions - new testament positions +// static long otMaxIndex = offsets[0][1][(int)offsets[0][0][BMAX[0]] + books[0][BMAX[0]].chapmax]; + return ((testament-1) * otMaxIndex) + Index(); +} + + +/****************************************************************************** + * VerseKey::Index - Sets index based upon current verse + * + * ENT: iindex - value to set index to + * + * RET: offset + */ + +long VerseKey::Index(long iindex) +{ + long offset; + +// This is the dirty stuff -------------------------------------------- + + if (!testament) + testament = 1; + + if (iindex < 1) { // if (-) or module heading + if (testament < 2) { + if (iindex < 0) { + testament = 0; // previously we changed 0 -> 1 + error = KEYERR_OUTOFBOUNDS; + } + else testament = 0; // we want module heading + } + else { + testament--; + iindex = (offsets[testament-1][1][offsize[testament-1][1]-1] + books[testament-1][BMAX[testament-1]-1].versemax[books[testament-1][BMAX[testament-1]-1].chapmax-1]) + iindex; // What a doozy! ((offset of last chapter + number of verses in the last chapter) + iindex) + } + } + +// -------------------------------------------------------------------- + + + if (testament) { + if ((!error) && (iindex)) { + offset = findindex(offsets[testament-1][1], offsize[testament-1][1], iindex); + verse = iindex - offsets[testament-1][1][offset]; + book = findindex(offsets[testament-1][0], offsize[testament-1][0], offset); + chapter = offset - offsets[testament-1][0][VerseKey::book]; + verse = (chapter) ? verse : 0; // funny check. if we are index=1 (testmt header) all gets set to 0 exept verse. Don't know why. Fix if you figure out. Think its in the offsets table. + if (verse) { // only check if -1 won't give negative + if (verse > books[testament-1][book-1].versemax[chapter-1]) { + if (testament > 1) { + verse = books[testament-1][book-1].versemax[chapter-1]; + error = KEYERR_OUTOFBOUNDS; + } + else { + testament++; + Index(verse - books[testament-2][book-1].versemax[chapter-1]); + } + } + } + } + } + if (_compare(UpperBound()) > 0) { + *this = UpperBound(); + error = KEYERR_OUTOFBOUNDS; + } + if (_compare(LowerBound()) < 0) { + *this = LowerBound(); + error = KEYERR_OUTOFBOUNDS; + } + return Index(); +} + + +/****************************************************************************** + * VerseKey::compare - Compares another SWKey object + * + * ENT: ikey - key to compare with this one + * + * RET: >0 if this versekey is greater than compare versekey + * <0 < + * 0 = + */ + +int VerseKey::compare(const SWKey &ikey) +{ + const SWKey *testKey = &ikey; + const VerseKey *vkey = (const VerseKey *)SWDYNAMIC_CAST(VerseKey, testKey); + if (vkey) { + return _compare(*vkey); + } + const VerseKey ivkey = (const char *)ikey; + return _compare(ivkey); +} + + +/****************************************************************************** + * VerseKey::_compare - Compares another VerseKey object + * + * ENT: ikey - key to compare with this one + * + * RET: >0 if this versekey is greater than compare versekey + * <0 < + * 0 = + */ + +int VerseKey::_compare(const VerseKey &ivkey) +{ + long keyval1 = 0; + long keyval2 = 0; + + keyval1 += Testament() * 1000000000; + keyval2 += ivkey.Testament() * 1000000000; + keyval1 += Book() * 1000000; + keyval2 += ivkey.Book() * 1000000; + keyval1 += Chapter() * 1000; + keyval2 += ivkey.Chapter() * 1000; + keyval1 += Verse(); + keyval2 += ivkey.Verse(); + keyval1 -= keyval2; + keyval1 = (keyval1) ? ((keyval1 > 0) ? 1 : -1) /*keyval1/labs(keyval1)*/:0; // -1 | 0 | 1 + return keyval1; +} + +const char *VerseKey::osisotbooks[] = { + "Gen","Exod","Lev","Num","Deut","Josh","Judg","Ruth","1Sam","2Sam", + "1Kgs","2Kgs","1Chr","2Chr","Ezra","Neh","Esth","Job","Ps", + "Prov", // added this. Was not in OSIS spec + "Eccl", + "Song","Isa","Jer","Lam","Ezek","Dan","Hos","Joel","Amos","Obad", + "Jonah","Mic","Nah","Hab","Zeph","Hag","Zech","Mal","Bar","PrAzar", + "Bel","Sus","1Esd","2Esd","AddEsth","EpJer","Jdt","1Macc","2Macc","3Macc", + "4Macc","PrMan","Ps151","Sir","Tob","Wis"}; +const char *VerseKey::osisntbooks[] = { + "Matt","Mark","Luke","John","Acts","Rom","1Cor","2Cor","Gal","Eph", + "Phil","Col","1Thess","2Thess","1Tim","2Tim","Titus","Phlm","Heb","Jas", + "1Pet","2Pet","1John","2John","3John","Jude","Rev"}; +const char **VerseKey::osisbooks[] = { osisotbooks, osisntbooks }; + + +const char *VerseKey::getOSISRef() const { + static char buf[5][254]; + static int loop = 0; + + if (loop > 4) + loop = 0; + + if (Verse()) + sprintf(buf[loop], "%s.%d.%d", osisbooks[Testament()-1][Book()-1], (int)Chapter(), (int)Verse()); + else if (Chapter()) + sprintf(buf[loop], "%s.%d", osisbooks[Testament()-1][Book()-1], (int)Chapter()); + else if (Book()) + sprintf(buf[loop], "%s", osisbooks[Testament()-1][Book()-1]); + else buf[loop][0] = 0; + return buf[loop++]; +} + +const int VerseKey::getOSISBookNum(const char *bookab) { + int i; + for (i=0; i < 39; i++) + { + if (!strncmp(bookab, osisotbooks[i], strlen(osisotbooks[i]))) + { + //printf("VerseKey::getOSISBookNum %s is OT %d\n", bookab, i+1); + return i+1; + } + } + for (i=0; i < 27; i++) + { + if (!strncmp(bookab, osisntbooks[i], strlen(osisotbooks[i]))) + { + //printf("VerseKey::getOSISBookNum %s is NT %d\n", bookab, i+1); + return i+1; + } + } + return -1; +} + + + +/****************************************************************************** + * VerseKey::getRangeText - returns parsable range text for this key + */ + +const char *VerseKey::getRangeText() const { + if (isBoundSet()) { + char buf[1023]; + sprintf(buf, "%s-%s", (const char *)LowerBound(), (const char *)UpperBound()); + stdstr(&rangeText, buf); + } + else stdstr(&rangeText, getText()); + return rangeText; +} + + +const char *VerseKey::convertToOSIS(const char *inRef, const SWKey *lastKnownKey) { + static SWBuf outRef; + + outRef = ""; + + VerseKey defLanguage; + ListKey verses = defLanguage.ParseVerseList(inRef, (*lastKnownKey), true); + const char *startFrag = inRef; + for (int i = 0; i < verses.Count(); i++) { + VerseKey *element = SWDYNAMIC_CAST(VerseKey, verses.GetElement(i)); + char buf[5120]; + char frag[800]; + char preJunk[800]; + char postJunk[800]; + memset(buf, 0, 5120); + memset(frag, 0, 800); + memset(preJunk, 0, 800); + memset(postJunk, 0, 800); + while ((*startFrag) && (strchr(" {};,()[].", *startFrag))) { + outRef += *startFrag; + startFrag++; + } + if (element) { + memmove(frag, startFrag, ((const char *)element->userData - startFrag) + 1); + frag[((const char *)element->userData - startFrag) + 1] = 0; + int j; + for (j = strlen(frag)-1; j && (strchr(" {};,()[].", frag[j])); j--); + if (frag[j+1]) + strcpy(postJunk, frag+j+1); + frag[j+1]=0; + startFrag += ((const char *)element->userData - startFrag) + 1; + sprintf(buf, "%s%s", element->LowerBound().getOSISRef(), element->UpperBound().getOSISRef(), frag, postJunk); + } + else { + memmove(frag, startFrag, ((const char *)verses.GetElement(i)->userData - startFrag) + 1); + frag[((const char *)verses.GetElement(i)->userData - startFrag) + 1] = 0; + int j; + for (j = strlen(frag)-1; j && (strchr(" {};,()[].", frag[j])); j--); + if (frag[j+1]) + strcpy(postJunk, frag+j+1); + frag[j+1]=0; + startFrag += ((const char *)verses.GetElement(i)->userData - startFrag) + 1; + sprintf(buf, "%s%s", VerseKey(*verses.GetElement(i)).getOSISRef(), frag, postJunk); + } + outRef+=buf; + } + if (startFrag < (inRef + strlen(inRef))) + outRef+=startFrag; + return outRef.c_str(); +} +SWORD_NAMESPACE_END diff --git a/src/keys/versetreekey.cpp b/src/keys/versetreekey.cpp new file mode 100644 index 0000000..b73672d --- /dev/null +++ b/src/keys/versetreekey.cpp @@ -0,0 +1,72 @@ +/****************************************************************************** + * VerseTreeKey.cpp - code for class 'VerseTreeKey'- versekey using treekey + * for data retrieval + */ + +#include + +SWORD_NAMESPACE_START + +static const char *classes[] = {"VerseTreeKey", "VerseKey", "SWKey", "SWObject", 0}; +SWClass VerseTreeKey::classdef(classes); + + +/****************************************************************************** + * VerseTreeKey Constructor - initializes instance of VerseTreeKey + * + * ENT: ikey - base key (will take various forms of 'BOOK CH:VS'. See + * VerseTreeKey::parse for more detailed information) + */ + +VerseTreeKey::VerseTreeKey(TreeKey *treeKey, const SWKey *ikey) : VerseKey(ikey) +{ + this->treeKey = treeKey; + if (ikey) + parse(); +} + + +/****************************************************************************** + * VerseTreeKey Constructor - initializes instance of VerseTreeKey + * + * ENT: ikey - text key (will take various forms of 'BOOK CH:VS'. See + * VerseTreeKey::parse for more detailed information) + */ + +VerseTreeKey::VerseTreeKey(TreeKey *treeKey, const char *ikey) : VerseKey(ikey) +{ + this->treeKey = treeKey; + if (ikey) + parse(); +} + + +VerseTreeKey::VerseTreeKey(VerseTreeKey const &k) : VerseKey(k) +{ + treeKey = k.treeKey; +} + + +VerseTreeKey::VerseTreeKey(TreeKey *treeKey, const char *min, const char *max) : VerseKey(min, max) +{ + this->treeKey = treeKey; +} + + +SWKey *VerseTreeKey::clone() const +{ + return new VerseTreeKey(*this); +} + + +/****************************************************************************** + * VerseTreeKey Destructor - cleans up instance of VerseTreeKey + * + * ENT: ikey - text key + */ + +VerseTreeKey::~VerseTreeKey() { +} + + +SWORD_NAMESPACE_END diff --git a/src/mgr/Makefile b/src/mgr/Makefile new file mode 100644 index 0000000..339f87a --- /dev/null +++ b/src/mgr/Makefile @@ -0,0 +1,4 @@ +root := ../.. + +all: + make -C ${root} diff --git a/src/mgr/Makefile.am b/src/mgr/Makefile.am new file mode 100644 index 0000000..1b1e33b --- /dev/null +++ b/src/mgr/Makefile.am @@ -0,0 +1,33 @@ +mgrdir = $(top_srcdir)/src/mgr + +if CONFDEF +globdef = -DGLOBCONFPATH=\"${globalconfdir}/sword.conf\" +else +globdef = +endif + +AM_CPPFLAGS += $(globdef) +AM_CPPFLAGS += -D_FTPLIB_NO_COMPAT + +if WITHCURL +FTP_SOURCES = $(mgrdir)/curlftpt.cpp +else +FTP_SOURCES = $(mgrdir)/ftplibftpt.cpp +endif + +libsword_la_SOURCES += $(FTP_SOURCES) +libsword_la_SOURCES += $(mgrdir)/swconfig.cpp +libsword_la_SOURCES += $(mgrdir)/swmgr.cpp +libsword_la_SOURCES += $(mgrdir)/swfiltermgr.cpp +libsword_la_SOURCES += $(mgrdir)/encfiltmgr.cpp +libsword_la_SOURCES += $(mgrdir)/markupfiltmgr.cpp +libsword_la_SOURCES += $(mgrdir)/filemgr.cpp +libsword_la_SOURCES += $(mgrdir)/ftptrans.cpp +libsword_la_SOURCES += $(mgrdir)/swlocale.cpp +libsword_la_SOURCES += $(mgrdir)/localemgr.cpp +libsword_la_SOURCES += $(mgrdir)/swcacher.cpp +libsword_la_SOURCES += $(mgrdir)/swsearchable.cpp +libsword_la_SOURCES += $(mgrdir)/installmgr.cpp +libsword_la_SOURCES += $(mgrdir)/stringmgr.cpp + + diff --git a/src/mgr/curlftpt.cpp b/src/mgr/curlftpt.cpp new file mode 100644 index 0000000..bb47958 --- /dev/null +++ b/src/mgr/curlftpt.cpp @@ -0,0 +1,159 @@ + /***************************************************************************** + * CURLFTPTransport functions + * + */ + + +#include + +#include + +#include +#include +#include + +#include + +SWORD_NAMESPACE_START + + +struct FtpFile { + const char *filename; + FILE *stream; + SWBuf *destBuf; +}; + + +int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream); +int my_fprogress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow); + +static CURLFTPTransport_init _CURLFTPTransport_init; + +CURLFTPTransport_init::CURLFTPTransport_init() { + //curl_global_init(CURL_GLOBAL_DEFAULT); // curl_easy_init automatically calls it if needed +} + +CURLFTPTransport_init::~CURLFTPTransport_init() { + curl_global_cleanup(); +} + +int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { + struct FtpFile *out=(struct FtpFile *)stream; + if (out && !out->stream && !out->destBuf) { + /* open file for writing */ + out->stream=fopen(out->filename, "wb"); + if (!out->stream) + return -1; /* failure, can't open file to write */ + } + if (out->destBuf) { + int s = out->destBuf->size(); + out->destBuf->size(s+(size*nmemb)); + memcpy(out->destBuf->getRawData()+s, buffer, size*nmemb); + return nmemb; + } + return fwrite(buffer, size, nmemb, out->stream); +} + + +int my_fprogress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) { + if (clientp) { + ((StatusReporter *)clientp)->statusUpdate(dltotal, dlnow); + } + return 0; +} + + +static int my_trace(CURL *handle, curl_infotype type, unsigned char *data, size_t size, void *userp) { + SWBuf header; + (void)userp; /* prevent compiler warning */ + (void)handle; /* prevent compiler warning */ + + switch (type) { + case CURLINFO_TEXT: header = "TEXT"; break; + case CURLINFO_HEADER_OUT: header = "=> Send header"; break; + case CURLINFO_HEADER_IN: header = "<= Recv header"; break; + + // these we don't want to log (HUGE) + case CURLINFO_DATA_OUT: header = "=> Send data"; + case CURLINFO_SSL_DATA_OUT: header = "=> Send SSL data"; + case CURLINFO_DATA_IN: header = "<= Recv data"; + case CURLINFO_SSL_DATA_IN: header = "<= Recv SSL data"; + default: /* in case a new one is introduced to shock us */ + return 0; + } + + if (size > 120) size = 120; + SWBuf text; + text.size(size); + memcpy(text.getRawData(), data, size); + SWLog::getSystemLog()->logDebug("CURLFTPTransport: %s: %s", header.c_str(), text.c_str()); + return 0; +} + +CURLFTPTransport::CURLFTPTransport(const char *host, StatusReporter *sr) : FTPTransport(host, sr) { + session = (CURL *)curl_easy_init(); +} + + +CURLFTPTransport::~CURLFTPTransport() { + curl_easy_cleanup(session); +} + + +char CURLFTPTransport::getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf) { + signed char retVal = 0; + struct FtpFile ftpfile = {destPath, 0, destBuf}; + + CURLcode res; + + if (session) { + curl_easy_setopt(session, CURLOPT_URL, sourceURL); + + curl_easy_setopt(session, CURLOPT_USERPWD, "ftp:installmgr@user.com"); + curl_easy_setopt(session, CURLOPT_WRITEFUNCTION, my_fwrite); + if (!passive) + curl_easy_setopt(session, CURLOPT_FTPPORT, "-"); + curl_easy_setopt(session, CURLOPT_NOPROGRESS, 0); + curl_easy_setopt(session, CURLOPT_PROGRESSDATA, statusReporter); + curl_easy_setopt(session, CURLOPT_PROGRESSFUNCTION, my_fprogress); + curl_easy_setopt(session, CURLOPT_DEBUGFUNCTION, my_trace); + /* Set a pointer to our struct to pass to the callback */ + curl_easy_setopt(session, CURLOPT_FILE, &ftpfile); + + /* Switch on full protocol/debug output */ + curl_easy_setopt(session, CURLOPT_VERBOSE, true); + + /* FTP connection settings */ + +#if (LIBCURL_VERSION_MAJOR > 7) || \ + ((LIBCURL_VERSION_MAJOR == 7) && (LIBCURL_VERSION_MINOR > 10)) || \ + ((LIBCURL_VERSION_MAJOR == 7) && (LIBCURL_VERSION_MINOR == 10) && (LIBCURL_VERSION_PATCH >= 5)) +# define EPRT_AVAILABLE 1 +#endif + +#ifdef EPRT_AVAILABLE + curl_easy_setopt(session, CURLOPT_FTP_USE_EPRT, 0); + SWLog::getSystemLog()->logDebug("***** using CURLOPT_FTP_USE_EPRT\n"); +#endif + + + SWLog::getSystemLog()->logDebug("***** About to perform curl easy action. \n"); + SWLog::getSystemLog()->logDebug("***** destPath: %s \n", destPath); + SWLog::getSystemLog()->logDebug("***** sourceURL: %s \n", sourceURL); + res = curl_easy_perform(session); + SWLog::getSystemLog()->logDebug("***** Finished performing curl easy action. \n"); + + if(CURLE_OK != res) { + retVal = -1; + } + } + + if (ftpfile.stream) + fclose(ftpfile.stream); /* close the local file */ + + return retVal; +} + + +SWORD_NAMESPACE_END + diff --git a/src/mgr/encfiltmgr.cpp b/src/mgr/encfiltmgr.cpp new file mode 100644 index 0000000..970900c --- /dev/null +++ b/src/mgr/encfiltmgr.cpp @@ -0,0 +1,154 @@ +/****************************************************************************** + * swencodingmgr.cpp - implementaion of class EncodingFilterMgr, subclass of + * used to transcode all module text to a requested + * encoding. + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * EncodingFilterMgr Constructor - initializes instance of EncodingFilterMgr + * + * ENT: + * enc - Encoding format to emit + */ + +EncodingFilterMgr::EncodingFilterMgr (char enc) + : SWFilterMgr() { + + scsuutf8 = new SCSUUTF8(); + latin1utf8 = new Latin1UTF8(); + + encoding = enc; + + switch (encoding) { + case ENC_LATIN1: + targetenc = new UTF8Latin1(); + break; + case ENC_UTF16: + targetenc = new UTF8UTF16(); + break; + case ENC_RTF: + targetenc = new UnicodeRTF(); + break; + case ENC_HTML: + targetenc = new UTF8HTML(); + break; + default: // i.e. case ENC_UTF8 + targetenc = NULL; + } +} + +/****************************************************************************** + * EncodingFilterMgr Destructor - Cleans up instance of EncodingFilterMgr + */ +EncodingFilterMgr::~EncodingFilterMgr() { + if (scsuutf8) + delete scsuutf8; + if (latin1utf8) + delete latin1utf8; + if (targetenc) + delete targetenc; +} + +void EncodingFilterMgr::AddRawFilters(SWModule *module, ConfigEntMap §ion) { + + ConfigEntMap::iterator entry; + + SWBuf encoding = ((entry = section.find("Encoding")) != section.end()) ? (*entry).second : (SWBuf)""; + if (!encoding.length() || !stricmp(encoding.c_str(), "Latin-1")) { + module->AddRawFilter(latin1utf8); + } + else if (!stricmp(encoding.c_str(), "SCSU")) { + module->AddRawFilter(scsuutf8); + } +} + +void EncodingFilterMgr::AddEncodingFilters(SWModule *module, ConfigEntMap §ion) { + if (targetenc) + module->AddEncodingFilter(targetenc); +} + +/****************************************************************************** + * EncodingFilterMgr::Encoding - sets/gets encoding + * + * ENT: enc - new encoding or 0 to simply get the current encoding + * + * RET: encoding + */ +char EncodingFilterMgr::Encoding(char enc) { + if (enc && enc != encoding) { + encoding = enc; + SWFilter * oldfilter = targetenc; + + switch (encoding) { + case ENC_LATIN1: + targetenc = new UTF8Latin1(); + break; + case ENC_UTF16: + targetenc = new UTF8UTF16(); + break; + case ENC_RTF: + targetenc = new UnicodeRTF(); + break; + case ENC_HTML: + targetenc = new UTF8HTML(); + break; + default: // i.e. case ENC_UTF8 + targetenc = NULL; + } + + ModMap::const_iterator module; + + if (oldfilter != targetenc) { + if (oldfilter) { + if (!targetenc) { + for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++) + module->second->RemoveRenderFilter(oldfilter); + } + else { + for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++) + module->second->ReplaceRenderFilter(oldfilter, targetenc); + } + delete oldfilter; + } + else if (targetenc) { + for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++) + module->second->AddRenderFilter(targetenc); + } + } + + } + return encoding; +} + +SWORD_NAMESPACE_END diff --git a/src/mgr/filemgr.cpp b/src/mgr/filemgr.cpp new file mode 100644 index 0000000..4a91dfa --- /dev/null +++ b/src/mgr/filemgr.cpp @@ -0,0 +1,566 @@ +/****************************************************************************** + * filemgr.cpp - implementation of class FileMgr used for pooling file + * handles + * + * $Id: filemgr.cpp 2108 2007-10-13 20:35:02Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#if !defined(__GNUC__) && !defined(_WIN32_WCE) +#include +#include +#else +#include +#endif + + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#ifndef S_IRGRP +#define S_IRGRP 0 +#endif + +#ifndef S_IROTH +#define S_IROTH 0 +#endif + +// Fix for VC6 +#ifndef S_IREAD +#ifdef _S_IREAD +#define S_IREAD _S_IREAD +#define S_IWRITE _S_IWRITE +#endif +#endif +// ----------- + + +SWORD_NAMESPACE_START + + +int FileMgr::CREAT = O_CREAT; +int FileMgr::APPEND = O_APPEND; +int FileMgr::TRUNC = O_TRUNC; +int FileMgr::RDONLY = O_RDONLY; +int FileMgr::RDWR = O_RDWR; +int FileMgr::WRONLY = O_WRONLY; +int FileMgr::IREAD = S_IREAD; +int FileMgr::IWRITE = S_IWRITE; + + +// ---------------- statics ----------------- +FileMgr *FileMgr::systemFileMgr = 0; + +class __staticsystemFileMgr { +public: + __staticsystemFileMgr() { } + ~__staticsystemFileMgr() { delete FileMgr::systemFileMgr; } +} _staticsystemFileMgr; + + +FileMgr *FileMgr::getSystemFileMgr() { + if (!systemFileMgr) + systemFileMgr = new FileMgr(); + + return systemFileMgr; +} + + +void FileMgr::setSystemFileMgr(FileMgr *newFileMgr) { + if (systemFileMgr) + delete systemFileMgr; + systemFileMgr = newFileMgr; +} + +// --------------- end statics -------------- + + +FileDesc::FileDesc(FileMgr *parent, const char *path, int mode, int perms, bool tryDowngrade) { + this->parent = parent; + this->path = 0; + stdstr(&this->path, path); + this->mode = mode; + this->perms = perms; + this->tryDowngrade = tryDowngrade; + offset = 0; + fd = -77; +} + + +FileDesc::~FileDesc() { + if (fd > 0) + close(fd); + + if (path) + delete [] path; +} + + +int FileDesc::getFd() { + if (fd == -77) + fd = parent->sysOpen(this); +// if ((fd < -1) && (fd != -77)) // kludge to hand ce +// return 777; + return fd; +} + + +long FileDesc::seek(long offset, int whence) { + return lseek(getFd(), offset, whence); +} + + +long FileDesc::read(void *buf, long count) { + return ::read(getFd(), buf, count); +} + + +long FileDesc::write(const void *buf, long count) { + return ::write(getFd(), buf, count); +} + + +FileMgr::FileMgr(int maxFiles) { + this->maxFiles = maxFiles; // must be at least 2 + files = 0; +} + + +FileMgr::~FileMgr() { + FileDesc *tmp; + + while(files) { + tmp = files->next; + delete files; + files = tmp; + } +} + + +FileDesc *FileMgr::open(const char *path, int mode, bool tryDowngrade) { + return open(path, mode, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH, tryDowngrade); +} + + +FileDesc *FileMgr::open(const char *path, int mode, int perms, bool tryDowngrade) { + FileDesc **tmp, *tmp2; + + for (tmp = &files; *tmp; tmp = &((*tmp)->next)) { + if ((*tmp)->fd < 0) // insert as first non-system_open file + break; + } + + tmp2 = new FileDesc(this, path, mode, perms, tryDowngrade); + tmp2->next = *tmp; + *tmp = tmp2; + + return tmp2; +} + + +void FileMgr::close(FileDesc *file) { + FileDesc **loop; + + for (loop = &files; *loop; loop = &((*loop)->next)) { + if (*loop == file) { + *loop = (*loop)->next; + delete file; + break; + } + } +} + + +int FileMgr::sysOpen(FileDesc *file) { + FileDesc **loop; + int openCount = 1; // because we are presently opening 1 file, and we need to be sure to close files to accomodate, if necessary + + for (loop = &files; *loop; loop = &((*loop)->next)) { + + if ((*loop)->fd > 0) { + if (++openCount > maxFiles) { + (*loop)->offset = lseek((*loop)->fd, 0, SEEK_CUR); + ::close((*loop)->fd); + (*loop)->fd = -77; + } + } + + if (*loop == file) { + if (*loop != files) { + *loop = (*loop)->next; + file->next = files; + files = file; + } + if ((!access(file->path, 04)) || ((file->mode & O_CREAT) == O_CREAT)) { // check for at least file exists / read access before we try to open + char tries = (((file->mode & O_RDWR) == O_RDWR) && (file->tryDowngrade)) ? 2 : 1; // try read/write if possible + for (int i = 0; i < tries; i++) { + if (i > 0) { + file->mode = (file->mode & ~O_RDWR); // remove write access + file->mode = (file->mode | O_RDONLY);// add read access + } + file->fd = ::open(file->path, file->mode|O_BINARY, file->perms); + + if (file->fd >= 0) + break; + } + + if (file->fd >= 0) + lseek(file->fd, file->offset, SEEK_SET); + } + else file->fd = -1; + if (!*loop) + break; + } + } + return file->fd; +} + + +// to truncate a file at its current position +// leaving byte at current possition intact +// deleting everything afterward. +signed char FileMgr::trunc(FileDesc *file) { + + static const char *writeTest = "x"; + long size = file->seek(1, SEEK_CUR); + if (size == 1) // was empty + size = 0; + char nibble [ 32767 ]; + bool writable = file->write(writeTest, 1); + int bytes = 0; + + if (writable) { + // get tmpfilename + char *buf = new char [ strlen(file->path) + 10 ]; + int i; + for (i = 0; i < 9999; i++) { + sprintf(buf, "%stmp%.4d", file->path, i); + if (!existsFile(buf)) + break; + } + if (i == 9999) + return -2; + + int fd = ::open(buf, O_CREAT|O_RDWR, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH); + if (fd < 0) + return -3; + + file->seek(0, SEEK_SET); + while (size > 0) { + bytes = file->read(nibble, 32767); + write(fd, nibble, (bytes < size)?bytes:size); + size -= bytes; + } + // zero out the file + ::close(file->fd); + file->fd = ::open(file->path, O_TRUNC, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH); + ::close(file->fd); + file->fd = -77; // force file open by filemgr + // copy tmp file back (dumb, but must preserve file permissions) + lseek(fd, 0, SEEK_SET); + do { + bytes = read(fd, nibble, 32767); + file->write(nibble, bytes); + } while (bytes == 32767); + + ::close(fd); + ::close(file->fd); + removeFile(buf); // remove our tmp file + file->fd = -77; // causes file to be swapped out forcing open on next call to getFd() + } + else { // put offset back and return failure + file->seek(-1, SEEK_CUR); + return -1; + } + return 0; +} + + +signed char FileMgr::existsFile(const char *ipath, const char *ifileName) +{ + int len = strlen(ipath) + ((ifileName)?strlen(ifileName):0) + 3; + char *ch; + char *path = new char [ len ]; + strcpy(path, ipath); + + if ((path[strlen(path)-1] == '\\') || (path[strlen(path)-1] == '/')) + path[strlen(path)-1] = 0; + + if (ifileName) { + ch = path + strlen(path); + sprintf(ch, "/%s", ifileName); + } + signed char retVal = !access(path, 04); + delete [] path; + return retVal; +} + + +signed char FileMgr::existsDir(const char *ipath, const char *idirName) +{ + char *ch; + int len = strlen(ipath) + ((idirName)?strlen(idirName):0) + 1; + if (idirName) + len += strlen(idirName); + char *path = new char [ len ]; + strcpy(path, ipath); + + if ((path[strlen(path)-1] == '\\') || (path[strlen(path)-1] == '/')) + path[strlen(path)-1] = 0; + + if (idirName) { + ch = path + strlen(path); + sprintf(ch, "/%s", idirName); + } + signed char retVal = !access(path, 04); + delete [] path; + return retVal; +} + + +int FileMgr::createParent(const char *pName) { + char *buf = new char [ strlen(pName) + 1 ]; + int retCode = 0; + + strcpy(buf, pName); + int end = strlen(buf) - 1; + while (end) { + if ((buf[end] == '/') || (buf[end] == '\\')) + break; + end--; + } + buf[end] = 0; + if (strlen(buf)>0) { + if (access(buf, 02)) { // not exists with write access? + if ((retCode = mkdir(buf +#ifndef WIN32 + , 0755 +#endif + ))) { + createParent(buf); + retCode = mkdir(buf +#ifndef WIN32 + , 0755 +#endif + ); + } + } + } + else retCode = -1; + delete [] buf; + return retCode; +} + + +int FileMgr::openFileReadOnly(const char *fName) { + int fd = ::open(fName, O_RDONLY|O_BINARY, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH); + return fd; +} + + +int FileMgr::createPathAndFile(const char *fName) { + int fd; + + fd = ::open(fName, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH); + if (fd < 1) { + createParent(fName); + fd = ::open(fName, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH); + } + return fd; +} + + +int FileMgr::copyFile(const char *sourceFile, const char *targetFile) { + int sfd, dfd, len; + char buf[4096]; + + if ((sfd = ::open(sourceFile, O_RDONLY|O_BINARY, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH)) < 1) + return -1; + if ((dfd = createPathAndFile(targetFile)) < 1) + return -1; + + do { + len = read(sfd, buf, 4096); + write(dfd, buf, len); + } + while(len == 4096); + ::close(dfd); + ::close(sfd); + + return 0; +} + + +int FileMgr::removeFile(const char *fName) { + return ::remove(fName); +} + +char FileMgr::getLine(FileDesc *fDesc, SWBuf &line) { + int len; + bool more = true; + char chunk[255]; + + line = ""; + + // assert we have a valid file handle + if (fDesc->getFd() < 1) + return 0; + + while (more) { + more = false; + long index = fDesc->seek(0, SEEK_CUR); + len = fDesc->read(chunk, 254); + + // assert we have a readable file (not a directory) + if (len < 1) + break; + + int start = 0; + // clean up any preceding white space if we're at the beginning of line + if (!line.length()) { + for (;start < len; start++) { + if ((chunk[start] != 13) && (chunk[start] != ' ') && (chunk[start] != '\t')) + break; + } + } + + // find the end + int end; + for (end = start; ((end < (len-1)) && (chunk[end] != 10)); end++); + + if ((chunk[end] != 10) && (len == 254)) { + more = true; + } + index += (end + 1); + + // reposition to next valid place to read + fDesc->seek(index, SEEK_SET); + + // clean up any trailing junk on line if we're at the end + if (!more) { + for (; end > start; end--) { + if ((chunk[end] != 10) && (chunk[end] != 13) && (chunk[end] != ' ') && (chunk[end] != '\t')) { + if (chunk[end] == '\\') { + more = true; + end--; + } + break; + } + } + } + + int size = (end - start) + 1; + + if (size > 0) { + // line.appendFormatted("%.*s", size, chunk+start); + line.append(chunk+start, size); + } + } + return ((len>0) || line.length()); +} + + +char FileMgr::isDirectory(const char *path) { + struct stat stats; + if (stat(path, &stats)) + return 0; + return ((stats.st_mode & S_IFDIR) == S_IFDIR); +} + + +int FileMgr::copyDir(const char *srcDir, const char *destDir) { + DIR *dir; + struct dirent *ent; + if ((dir = opendir(srcDir))) { + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + SWBuf srcPath = (SWBuf)srcDir + (SWBuf)"/" + ent->d_name; + SWBuf destPath = (SWBuf)destDir + (SWBuf)"/" + ent->d_name; + if (!isDirectory(srcPath.c_str())) { + copyFile(srcPath.c_str(), destPath.c_str()); + } + else { + copyDir(srcPath.c_str(), destPath.c_str()); + } + } + } + closedir(dir); + } + return 0; +} + + +int FileMgr::removeDir(const char *targetDir) { + DIR *dir = opendir(targetDir); + struct dirent *ent; + if (dir) { + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + SWBuf targetPath = (SWBuf)targetDir + (SWBuf)"/" + ent->d_name; + if (!isDirectory(targetPath.c_str())) { + FileMgr::removeFile(targetPath.c_str()); + } + else { + removeDir(targetPath.c_str()); + } + } + } + closedir(dir); + removeFile(targetDir); + } + return 0; +} + + +void FileMgr::flush() { + FileDesc **loop; + + for (loop = &files; *loop; loop = &((*loop)->next)) { + if ((*loop)->fd > 0) { + (*loop)->offset = lseek((*loop)->fd, 0, SEEK_CUR); + ::close((*loop)->fd); + (*loop)->fd = -77; + } + } +} + +long FileMgr::resourceConsumption() { + long count = 0; + FileDesc **loop; + for (loop = &files; *loop; loop = &((*loop)->next)) { + if ((*loop)->fd > 0) { + count++; + } + } + return count; +} + + +SWORD_NAMESPACE_END diff --git a/src/mgr/ftplibftpt.cpp b/src/mgr/ftplibftpt.cpp new file mode 100644 index 0000000..4921dd5 --- /dev/null +++ b/src/mgr/ftplibftpt.cpp @@ -0,0 +1,108 @@ + /***************************************************************************** + * FTPLibFTPTransport functions + * + */ + +#include +#include + +#include + +#include +#include +#include + + +SWORD_NAMESPACE_START + + +static FTPLibFTPTransport_init _FTPLibFTPTransport_init; + +FTPLibFTPTransport_init::FTPLibFTPTransport_init() { + FtpInit(); +} + +FTPLibFTPTransport_init::~FTPLibFTPTransport_init() { +} + + +FTPLibFTPTransport::FTPLibFTPTransport(const char *host, StatusReporter *sr) : FTPTransport(host, sr) { + + ftpConnection = 0; +} + + +FTPLibFTPTransport::~FTPLibFTPTransport() { + if (ftpConnection) + FtpQuit(ftpConnection); +} + + +char FTPLibFTPTransport::assureLoggedIn() { + char retVal = 0; + if (ftpConnection == 0) { + SWLog::getSystemLog()->logDebug("connecting to host %s\n", host.c_str()); + if (FtpConnect(host, &ftpConnection)) + if (FtpLogin("anonymous", "installmgr@user.com", ftpConnection)) { + retVal = 0; + } + else { + SWLog::getSystemLog()->logError("Failed to login to %s\n", host.c_str()); + retVal = -2; + } + else { + SWLog::getSystemLog()->logError("Failed to connect to %s\n", host.c_str()); + retVal = -1; + } + } + return retVal; +} + + +char FTPLibFTPTransport::getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf) { + + char retVal = 0; + + // assert we can login + retVal = assureLoggedIn(); + if (retVal) return retVal; + + SWBuf sourcePath = sourceURL; + SWBuf outFile = (!destBuf) ? destPath : "swftplib.tmp"; + sourcePath << (6 + host.length()); // shift << "ftp://hostname"; + SWLog::getSystemLog()->logDebug("getting file %s to %s\n", sourcePath.c_str(), outFile.c_str()); + if (passive) + FtpOptions(FTPLIB_CONNMODE, FTPLIB_PASSIVE, ftpConnection); + else + FtpOptions(FTPLIB_CONNMODE, FTPLIB_PORT, ftpConnection); + // !!!WDG also want to set callback options + if (sourcePath.endsWith("/") || sourcePath.endsWith("\\")) { + SWLog::getSystemLog()->logDebug("getting test directory %s\n", sourcePath.c_str()); + FtpDir(NULL, sourcePath, ftpConnection); + SWLog::getSystemLog()->logDebug("getting real directory %s\n", sourcePath.c_str()); + retVal = FtpDir(outFile.c_str(), sourcePath, ftpConnection) - 1; + } + else { + SWLog::getSystemLog()->logDebug("getting file %s\n", sourcePath.c_str()); + retVal = FtpGet(outFile.c_str(), sourcePath, FTPLIB_IMAGE, ftpConnection) - 1; + } + + // Is there a way to FTPGet directly to a buffer? + // If not, we probably want to add x-platform way to open a tmp file with FileMgr + // This wreaks and will easily fail if a user's CWD is not writable. + if (destBuf) { + FileDesc *fd = FileMgr::getSystemFileMgr()->open("swftplib.tmp", FileMgr::RDONLY); + long size = fd->seek(0, SEEK_END); + fd->seek(0, SEEK_SET); + destBuf->size(size); + fd->read(destBuf->getRawData(), size); + FileMgr::getSystemFileMgr()->close(fd); + FileMgr::removeFile("swftplib.tmp"); + } + + return retVal; +} + + +SWORD_NAMESPACE_END + diff --git a/src/mgr/ftptrans.cpp b/src/mgr/ftptrans.cpp new file mode 100644 index 0000000..ab0a605 --- /dev/null +++ b/src/mgr/ftptrans.cpp @@ -0,0 +1,170 @@ + /***************************************************************************** + * FTPTransport functions + * + */ + + +#include +#include + +#include +#include +#include + + +using std::vector; + + +SWORD_NAMESPACE_START + + +namespace { + +void removeTrailingSlash(SWBuf &buf) { + int len = buf.size(); + if ((buf[len-1] == '/') + || (buf[len-1] == '\\')) + buf.size(len-1); +} + +}; + + +void StatusReporter::preStatus(long totalBytes, long completedBytes, const char *message) { +} + +void StatusReporter::statusUpdate(double dtTotal, double dlNow) { +} + + +FTPTransport::FTPTransport(const char *host, StatusReporter *statusReporter) { + this->statusReporter = statusReporter; + this->host = host; + term = false; +} + + +FTPTransport::~FTPTransport() { +} + + +// override this method in your real transport class +char FTPTransport::getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf) { + char retVal = 0; + return retVal; +} + + +vector FTPTransport::getDirList(const char *dirURL) { + + vector dirList; + + SWBuf dirBuf; + if (!getURL("", dirURL, &dirBuf)) { + char *start = dirBuf.getRawData(); + char *end = start; + while (start < (dirBuf.getRawData()+dirBuf.size())) { + struct ftpparse item; + bool looking = true; + for (end = start; *end; end++) { + if (looking) { + if ((*end == 10) || (*end == 13)) { + *end = 0; + looking = false; + } + } + else if ((*end != 10) && (*end != 13)) + break; + } + SWLog::getSystemLog()->logWarning("FTPURLGetDir: parsing item %s(%d)\n", start, end-start); + int status = ftpparse(&item, start, end - start); + SWLog::getSystemLog()->logWarning("FTPURLGetDir: got item %s\n", item.name); + if (status) { + struct DirEntry i; + i.name = item.name; + i.size = item.size; + i.isDirectory = (item.flagtrycwd == 1); + dirList.push_back(i); + } + start = end; + } + } + else + { + SWLog::getSystemLog()->logWarning("FTPURLGetDir: failed to get dir %s\n", dirURL); + } + return dirList; +} + + +int FTPTransport::copyDirectory(const char *urlPrefix, const char *dir, const char *dest, const char *suffix) { + unsigned int i; + int retVal = 0; + + SWBuf url = SWBuf(urlPrefix) + SWBuf(dir); + removeTrailingSlash(url); + url += '/'; + + SWLog::getSystemLog()->logWarning("FTPCopy: getting dir %s\n", url.c_str()); + vector dirList = getDirList(url.c_str()); + + if (!dirList.size()) { + SWLog::getSystemLog()->logWarning("FTPCopy: failed to read dir %s\n", url.c_str()); + return -1; + } + + long totalBytes = 0; + for (i = 0; i < dirList.size(); i++) + totalBytes += dirList[i].size; + long completedBytes = 0; + for (i = 0; i < dirList.size(); i++) { + struct DirEntry &dirEntry = dirList[i]; + SWBuf buffer = (SWBuf)dest; + removeTrailingSlash(buffer); + buffer += "/"; + buffer += dirEntry.name; + if (!strcmp(&buffer.c_str()[buffer.length()-strlen(suffix)], suffix)) { + SWBuf buffer2 = "Downloading ("; + buffer2.appendFormatted("%d", i+1); + buffer2 += " of "; + buffer2.appendFormatted("%d", dirList.size()); + buffer2 += "): "; + buffer2 += dirEntry.name; + if (statusReporter) + statusReporter->preStatus(totalBytes, completedBytes, buffer2.c_str()); + FileMgr::createParent(buffer.c_str()); // make sure parent directory exists + SWTRY { + SWBuf url = (SWBuf)urlPrefix + (SWBuf)dir; + removeTrailingSlash(url); + url += "/"; + url += dirEntry.name; //dont forget the final slash + if (!dirEntry.isDirectory) { + if (getURL(buffer.c_str(), url.c_str())) { + SWLog::getSystemLog()->logWarning("FTPCopy: failed to get file %s\n", url.c_str()); + return -2; + } + completedBytes += dirEntry.size; + } + else { + SWBuf subdir = (SWBuf)dir; + removeTrailingSlash(subdir); + subdir += (SWBuf)"/" + dirEntry.name; + if (copyDirectory(urlPrefix, subdir, buffer.c_str(), suffix)) { + SWLog::getSystemLog()->logWarning("FTPCopy: failed to get file %s\n", subdir.c_str()); + return -2; + } + } + } + SWCATCH (...) {} + if (term) { + retVal = -3; + break; + } + } + } + return retVal; +} + + +SWORD_NAMESPACE_END + diff --git a/src/mgr/installmgr.cpp b/src/mgr/installmgr.cpp new file mode 100644 index 0000000..6a1704f --- /dev/null +++ b/src/mgr/installmgr.cpp @@ -0,0 +1,579 @@ + /***************************************************************************** + * InstallMgr functions to be made into something usefully exposed by + * master Glassey + * + */ + + +#ifndef EXCLUDEZLIB +extern "C" { +#include +} +#endif + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#ifdef CURLAVAILABLE +#include +#else +#include +#endif + +SWORD_NAMESPACE_START + +namespace { + +void removeTrailingSlash(SWBuf &buf) { + int len = buf.size(); + if ((buf[len-1] == '/') + || (buf[len-1] == '\\')) + buf.size(len-1); +} + +}; + + +using std::map; + +const int InstallMgr::MODSTAT_OLDER = 0x001; +const int InstallMgr::MODSTAT_SAMEVERSION = 0x002; +const int InstallMgr::MODSTAT_UPDATED = 0x004; +const int InstallMgr::MODSTAT_NEW = 0x008; +const int InstallMgr::MODSTAT_CIPHERED = 0x010; +const int InstallMgr::MODSTAT_CIPHERKEYPRESENT = 0x020; + +// override this method and provide your own custom FTPTransport subclass +// here we try a couple defaults if sword was compiled with support for them. +// see these classes for examples of how to make your own +FTPTransport *InstallMgr::createFTPTransport(const char *host, StatusReporter *statusReporter) { +#ifdef CURLAVAILABLE + return new CURLFTPTransport(host, statusReporter); +#else + return new FTPLibFTPTransport(host, statusReporter); +#endif +} + + + + +InstallMgr::InstallMgr(const char *privatePath, StatusReporter *sr) { + statusReporter = sr; + this->privatePath = 0; + this->transport = 0; + stdstr(&(this->privatePath), privatePath); + if (this->privatePath) { + int len = strlen(this->privatePath); + if ((this->privatePath[len-1] == '/') + || (this->privatePath[len-1] == '\\')) + this->privatePath[len-1] = 0; + } + SWBuf confPath = (SWBuf)privatePath + "/InstallMgr.conf"; + FileMgr::createParent(confPath.c_str()); + + installConf = new SWConfig(confPath.c_str()); + + SectionMap::iterator sourcesSection; + ConfigEntMap::iterator sourceBegin; + ConfigEntMap::iterator sourceEnd; + + sources.clear(); + + setFTPPassive(stricmp((*installConf)["General"]["PassiveFTP"].c_str(), "false")!=0); + + sourcesSection = installConf->Sections.find("Sources"); + if (sourcesSection != installConf->Sections.end()) { + sourceBegin = sourcesSection->second.lower_bound("FTPSource"); + sourceEnd = sourcesSection->second.upper_bound("FTPSource"); + + while (sourceBegin != sourceEnd) { + InstallSource *is = new InstallSource("FTP", sourceBegin->second.c_str()); + sources[is->caption] = is; + SWBuf parent = (SWBuf)privatePath + "/" + is->source + "/file"; + FileMgr::createParent(parent.c_str()); + is->localShadow = (SWBuf)privatePath + "/" + is->source; + sourceBegin++; + } + } + + defaultMods.clear(); + sourcesSection = installConf->Sections.find("General"); + if (sourcesSection != installConf->Sections.end()) { + sourceBegin = sourcesSection->second.lower_bound("DefaultMod"); + sourceEnd = sourcesSection->second.upper_bound("DefaultMod"); + + while (sourceBegin != sourceEnd) { + defaultMods.insert(sourceBegin->second.c_str()); + sourceBegin++; + } + } +} + + +InstallMgr::~InstallMgr() { + delete [] privatePath; + delete installConf; + + for (InstallSourceMap::iterator it = sources.begin(); it != sources.end(); ++it) { + delete it->second; + } +} + + +void InstallMgr::terminate() { if (transport) transport->terminate(); } + +int InstallMgr::removeModule(SWMgr *manager, const char *moduleName) { + SectionMap::iterator module; + ConfigEntMap::iterator fileBegin; + ConfigEntMap::iterator fileEnd, entry; + + // save our own copy, cuz when we remove the module from the SWMgr + // it's likely we'll free the memory passed to us in moduleName + SWBuf modName = moduleName; + module = manager->config->Sections.find(modName); + + if (module != manager->config->Sections.end()) { + // to be sure all files are closed + // this does not remove the .conf information from SWMgr + manager->deleteModule(modName); + + fileBegin = module->second.lower_bound("File"); + fileEnd = module->second.upper_bound("File"); + + SWBuf modFile; + SWBuf modDir; + entry = module->second.find("AbsoluteDataPath"); + modDir = entry->second.c_str(); + removeTrailingSlash(modDir); + if (fileBegin != fileEnd) { // remove each file + while (fileBegin != fileEnd) { + modFile = modDir; + modFile += "/"; + modFile += fileBegin->second.c_str(); + //remove file + FileMgr::removeFile(modFile.c_str()); + fileBegin++; + } + } + else { //remove all files in DataPath directory + + DIR *dir; + struct dirent *ent; + ConfigEntMap::iterator entry; + + FileMgr::removeDir(modDir.c_str()); + + if ((dir = opendir(manager->configPath))) { // find and remove .conf file + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + modFile = manager->configPath; + removeTrailingSlash(modFile); + modFile += "/"; + modFile += ent->d_name; + SWConfig *config = new SWConfig(modFile.c_str()); + if (config->Sections.find(modName) != config->Sections.end()) { + delete config; + FileMgr::removeFile(modFile.c_str()); + } + else delete config; + } + } + closedir(dir); + } + } + return 0; + } + return 1; +} + + +int InstallMgr::ftpCopy(InstallSource *is, const char *src, const char *dest, bool dirTransfer, const char *suffix) { + int retVal = 0; + FTPTransport *trans = createFTPTransport(is->source, statusReporter); + transport = trans; // set classwide current transport for other thread terminate() call + trans->setPassive(passive); + + SWBuf urlPrefix = (SWBuf)"ftp://" + is->source; + + // let's be sure we can connect. This seems to be necessary but sucks +// SWBuf url = urlPrefix + is->directory.c_str() + "/"; //dont forget the final slash +// if (trans->getURL("swdirlist.tmp", url.c_str())) { +// SWLog::getSystemLog()->logDebug("FTPCopy: failed to get dir %s\n", url.c_str()); +// return -1; +// } + + + if (dirTransfer) { + SWBuf dir = (SWBuf)is->directory.c_str(); + removeTrailingSlash(dir); + dir += (SWBuf)"/" + src; //dont forget the final slash + + retVal = trans->copyDirectory(urlPrefix, dir, dest, suffix); + + + } + else { + SWTRY { + SWBuf url = urlPrefix + is->directory.c_str(); + removeTrailingSlash(url); + url += (SWBuf)"/" + src; //dont forget the final slash + if (trans->getURL(dest, url.c_str())) { + SWLog::getSystemLog()->logDebug("FTPCopy: failed to get file %s", url.c_str()); + retVal = -1; + } + } + SWCATCH (...) { + retVal = -1; + } + } + SWTRY { + FTPTransport *deleteMe = trans; + // do this order for threadsafeness + // (see terminate()) + trans = transport = 0; + delete deleteMe; + } + SWCATCH (...) {} + return retVal; +} + + +int InstallMgr::installModule(SWMgr *destMgr, const char *fromLocation, const char *modName, InstallSource *is) { + SectionMap::iterator module, section; + ConfigEntMap::iterator fileBegin; + ConfigEntMap::iterator fileEnd; + ConfigEntMap::iterator entry; + SWBuf sourceDir; + SWBuf buffer; + bool aborted = false; + bool cipher = false; + DIR *dir; + struct dirent *ent; + SWBuf modFile; + + SWLog::getSystemLog()->logDebug("***** InstallMgr::installModule\n"); + if (fromLocation) + SWLog::getSystemLog()->logDebug("***** fromLocation: %s \n", fromLocation); + SWLog::getSystemLog()->logDebug("***** modName: %s \n", modName); + + if (is) + sourceDir = (SWBuf)privatePath + "/" + is->source; + else sourceDir = fromLocation; + + removeTrailingSlash(sourceDir); + sourceDir += '/'; + + SWMgr mgr(sourceDir.c_str()); + + module = mgr.config->Sections.find(modName); + + if (module != mgr.config->Sections.end()) { + + entry = module->second.find("CipherKey"); + if (entry != module->second.end()) + cipher = true; + + // + // This first check is a method to allow a module to specify each + // file that needs to be copied + // + fileEnd = module->second.upper_bound("File"); + fileBegin = module->second.lower_bound("File"); + + if (fileBegin != fileEnd) { // copy each file + if (is) { + while (fileBegin != fileEnd) { // ftp each file first + buffer = sourceDir + fileBegin->second.c_str(); + if (ftpCopy(is, fileBegin->second.c_str(), buffer.c_str())) { + aborted = true; + break; // user aborted + } + fileBegin++; + } + fileBegin = module->second.lower_bound("File"); + } + + if (!aborted) { + // DO THE INSTALL + while (fileBegin != fileEnd) { + SWBuf sourcePath = sourceDir; + sourcePath += fileBegin->second.c_str(); + SWBuf dest = destMgr->prefixPath; + removeTrailingSlash(dest); + dest += '/'; + dest += fileBegin->second.c_str(); + FileMgr::copyFile(sourcePath.c_str(), dest.c_str()); + + fileBegin++; + } + } + //--------------- + + if (is) { + fileBegin = module->second.lower_bound("File"); + while (fileBegin != fileEnd) { // delete each tmp ftp file + buffer = sourceDir + fileBegin->second.c_str(); + FileMgr::removeFile(buffer.c_str()); + fileBegin++; + } + } + } + + // This is the REAL install code, the above code I don't think has + // ever been used + // + // Copy all files in DataPath directory + // + else { + ConfigEntMap::iterator entry; + + entry = module->second.find("AbsoluteDataPath"); + if (entry != module->second.end()) { + SWBuf absolutePath = entry->second.c_str(); + SWBuf relativePath = absolutePath; + entry = module->second.find("PrefixPath"); + if (entry != module->second.end()) { + relativePath << strlen(entry->second.c_str()); + } + else { + relativePath << strlen(mgr.prefixPath); + } + SWLog::getSystemLog()->logDebug("***** mgr.prefixPath: %s \n", mgr.prefixPath); + SWLog::getSystemLog()->logDebug("***** destMgr->prefixPath: %s \n", destMgr->prefixPath); + SWLog::getSystemLog()->logDebug("***** absolutePath: %s \n", absolutePath.c_str()); + SWLog::getSystemLog()->logDebug("***** relativePath: %s \n", relativePath.c_str()); + + if (is) { + if (ftpCopy(is, relativePath.c_str(), absolutePath.c_str(), true)) { + aborted = true; // user aborted + } + } + if (!aborted) { + SWBuf destPath = (SWBuf)destMgr->prefixPath + relativePath; + FileMgr::copyDir(absolutePath.c_str(), destPath.c_str()); + } + if (is) { // delete tmp ftp files +// mgr->deleteModule(modName); + FileMgr::removeDir(absolutePath.c_str()); + } + } + } + if (!aborted) { + SWBuf confDir = sourceDir + "mods.d/"; + if ((dir = opendir(confDir.c_str()))) { // find and copy .conf file + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + modFile = confDir; + modFile += ent->d_name; + SWConfig *config = new SWConfig(modFile.c_str()); + if (config->Sections.find(modName) != config->Sections.end()) { + SWBuf targetFile = destMgr->configPath; //"./mods.d/"; + removeTrailingSlash(targetFile); + targetFile += "/"; + targetFile += ent->d_name; + FileMgr::copyFile(modFile.c_str(), targetFile.c_str()); + if (cipher) { + if (getCipherCode(modName, config)) { + SWMgr newDest(destMgr->prefixPath); + removeModule(&newDest, modName); + aborted = true; + } + else { + config->Save(); + FileMgr::copyFile(modFile.c_str(), targetFile.c_str()); + } + } + } + delete config; + } + } + closedir(dir); + } + } + return (aborted) ? -1 : 0; + } + return 1; +} + + +// override this and provide an input mechanism to allow your users +// to enter the decipher code for a module. +// return true you added the cipher code to the config. +// default to return 'aborted' +bool InstallMgr::getCipherCode(const char *modName, SWConfig *config) { + return false; + +/* a sample implementation, roughly taken from the windows installmgr + + SectionMap::iterator section; + ConfigEntMap::iterator entry; + SWBuf tmpBuf; + section = config->Sections.find(modName); + if (section != config->Sections.end()) { + entry = section->second.find("CipherKey"); + if (entry != section->second.end()) { + entry->second = GET_USER_INPUT(); + config->Save(); + + // LET'S SHOW THE USER SOME SAMPLE TEXT FROM THE MODULE + SWMgr *mgr = new SWMgr(); + SWModule *mod = mgr->Modules[modName]; + mod->setKey("Ipet 2:12"); + tmpBuf = mod->StripText(); + mod->setKey("gen 1:10"); + tmpBuf += "\n\n"; + tmpBuf += mod->StripText(); + SOME_DIALOG_CONTROL->SETTEXT(tmpBuf.c_str()); + delete mgr; + + // if USER CLICKS OK means we should return true + return true; + } + } + return false; +*/ + +} + + +int InstallMgr::refreshRemoteSource(InstallSource *is) { + SWBuf root = (SWBuf)privatePath + (SWBuf)"/" + is->source.c_str(); + removeTrailingSlash(root); + SWBuf target = root + "/mods.d"; + int errorCode = -1; //0 means successful + + FileMgr::removeDir(target.c_str()); + + if (!FileMgr::existsDir(target)) + FileMgr::createPathAndFile(target+"/globals.conf"); + +#ifndef EXCLUDEZLIB + SWBuf archive = root + "/mods.d.tar.gz"; + + errorCode = ftpCopy(is, "mods.d.tar.gz", archive.c_str(), false); + if (!errorCode) { //sucessfully downloaded the tar,gz of module configs + FileDesc *fd = FileMgr::getSystemFileMgr()->open(archive.c_str(), FileMgr::RDONLY); + untargz(fd->getFd(), root.c_str()); + FileMgr::getSystemFileMgr()->close(fd); + } + else if (!term) //if the tar.gz download was canceled don't continue with another download +#endif + errorCode = ftpCopy(is, "mods.d", target.c_str(), true, ".conf"); //copy the whole directory + + is->flush(); + return errorCode; +} + + +bool InstallMgr::isDefaultModule(const char *modName) { + return defaultMods.count(modName); +} + +/************************************************************************ + * getModuleStatus - compare the modules of two SWMgrs and return a + * vector describing the status of each. See MODSTAT_* + */ +map InstallMgr::getModuleStatus(const SWMgr &base, const SWMgr &other) { + map retVal; + SWBuf targetVersion; + SWBuf sourceVersion; + SWBuf softwareVersion; + bool cipher; + bool keyPresent; + int modStat; + + for (ModMap::const_iterator mod = other.Modules.begin(); mod != other.Modules.end(); mod++) { + + modStat = 0; + + cipher = false; + keyPresent = false; + + const char *v = mod->second->getConfigEntry("CipherKey"); + if (v) { + cipher = true; + keyPresent = *v; + } + + targetVersion = "0.0"; + sourceVersion = "1.0"; + softwareVersion = (const char *)SWVersion::currentVersion; + + v = mod->second->getConfigEntry("Version"); + if (v) sourceVersion = v; + + v = mod->second->getConfigEntry("MinimumVersion"); + if (v) softwareVersion = v; + + const SWModule *baseMod = base.getModule(mod->first); + if (baseMod) { + targetVersion = "1.0"; + v = baseMod->getConfigEntry("Version"); + if (v) targetVersion = v; + modStat |= (SWVersion(sourceVersion.c_str()) > SWVersion(targetVersion.c_str())) ? MODSTAT_UPDATED : (SWVersion(sourceVersion.c_str()) < SWVersion(targetVersion.c_str())) ? MODSTAT_OLDER : MODSTAT_SAMEVERSION; + } + else modStat |= MODSTAT_NEW; + + if (cipher) modStat |= MODSTAT_CIPHERED; + if (keyPresent) modStat |= MODSTAT_CIPHERKEYPRESENT; + retVal[mod->second] = modStat; + } + return retVal; +} + + +InstallSource::InstallSource(const char *type, const char *confEnt) { + this->type = type; + mgr = 0; + userData = 0; + if (confEnt) { + char *buf = 0; + stdstr(&buf, confEnt); + + caption = strtok(buf, "|"); + source = strtok(0, "|"); + directory = strtok(0, "|"); + removeTrailingSlash(directory); + delete [] buf; + } +} + + +InstallSource::~InstallSource() { + if (mgr) + delete mgr; +} + + +void InstallSource::flush() { + if (mgr) { + delete mgr; + mgr = 0; + } +} + + +SWMgr *InstallSource::getMgr() { + if (!mgr) + // ..., false = don't augment ~home directory. + mgr = new SWMgr(localShadow.c_str(), true, 0, false, false); + return mgr; +} + + +SWORD_NAMESPACE_END + diff --git a/src/mgr/localemgr.cpp b/src/mgr/localemgr.cpp new file mode 100644 index 0000000..ead076a --- /dev/null +++ b/src/mgr/localemgr.cpp @@ -0,0 +1,257 @@ +/****************************************************************************** + * localemgr.cpp - implementation of class LocaleMgr used to interact with + * registered locales for a sword installation + * + * $Id: localemgr.cpp 2080 2007-09-17 06:21:29Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + + +SWORD_NAMESPACE_START + +LocaleMgr *LocaleMgr::systemLocaleMgr = 0; + +class __staticsystemLocaleMgr { +public: + __staticsystemLocaleMgr() { } + ~__staticsystemLocaleMgr() { delete LocaleMgr::systemLocaleMgr; } +} _staticsystemLocaleMgr; + + +LocaleMgr *LocaleMgr::getSystemLocaleMgr() { + if (!systemLocaleMgr) + systemLocaleMgr = new LocaleMgr(); + + return systemLocaleMgr; +} + + +void LocaleMgr::setSystemLocaleMgr(LocaleMgr *newLocaleMgr) { + if (systemLocaleMgr) + delete systemLocaleMgr; + systemLocaleMgr = newLocaleMgr; +} + + +LocaleMgr::LocaleMgr(const char *iConfigPath) { + locales = new LocaleMap(); + char *prefixPath = 0; + char *configPath = 0; + char configType = 0; + SWBuf path; + std::list augPaths; + + defaultLocaleName = 0; + + if (!iConfigPath) { + SWLog::getSystemLog()->logDebug("LOOKING UP LOCALE DIRECTORY..."); + SWMgr::findConfig(&configType, &prefixPath, &configPath, &augPaths); + SWLog::getSystemLog()->logDebug("LOOKING UP LOCALE DIRECTORY COMPLETE."); + } + else configPath = (char *)iConfigPath; + + if (prefixPath) { + switch (configType) { + case 2: + int i; + for (i = strlen(configPath)-1; ((i) && (configPath[i] != '/') && (configPath[i] != '\\')); i--); + configPath[i] = 0; + path = configPath; + path += "/"; + break; + default: + path = prefixPath; + if ((prefixPath[strlen(prefixPath)-1] != '\\') && (prefixPath[strlen(prefixPath)-1] != '/')) + path += "/"; + + break; + } + if (FileMgr::existsDir(path.c_str(), "locales.d")) { + path += "locales.d"; + loadConfigDir(path.c_str()); + } + } + + if (augPaths.size()) { //load locale files from all augmented paths + std::list::iterator it = augPaths.begin(); + std::list::iterator end = augPaths.end(); + + for (;it != end; ++it) { + if (FileMgr::existsDir((*it).c_str(), "locales.d")) { + SWBuf path = (*it) + "locales.d"; + loadConfigDir(path.c_str()); + } + } + } + + // Locales will be invalidated if you change the StringMgr + // So only use the default hardcoded locale and let the + // frontends change the locale if they want + stdstr(&defaultLocaleName, "en_US"); + + if (prefixPath) + delete [] prefixPath; + + if (configPath) + delete [] configPath; +} + + +LocaleMgr::~LocaleMgr() { + if (defaultLocaleName) + delete [] defaultLocaleName; + deleteLocales(); + delete locales; +} + + +void LocaleMgr::loadConfigDir(const char *ipath) { + DIR *dir; + struct dirent *ent; + SWBuf newmodfile; + LocaleMap::iterator it; + SWLog::getSystemLog()->logInformation("LocaleMgr::loadConfigDir loading %s", ipath); + + if ((dir = opendir(ipath))) { + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + newmodfile = ipath; + if ((ipath[strlen(ipath)-1] != '\\') && (ipath[strlen(ipath)-1] != '/')) + newmodfile += "/"; + newmodfile += ent->d_name; + SWLocale *locale = new SWLocale(newmodfile.c_str()); + + if (locale->getName()) { + bool supported = false; + if (StringMgr::hasUTF8Support()) { + supported = (locale->getEncoding() && (!strcmp(locale->getEncoding(), "UTF-8") || !strcmp(locale->getEncoding(), "ASCII")) ); + } + else { + supported = !locale->getEncoding() || (locale->getEncoding() && (strcmp(locale->getEncoding(), "UTF-8") != 0)); //exclude UTF-8 locales + } + + if (!supported) { //not supported + delete locale; + continue; + } + + it = locales->find(locale->getName()); + if (it != locales->end()) { // already present + *((*it).second) += *locale; + delete locale; + } + else locales->insert(LocaleMap::value_type(locale->getName(), locale)); + } + else delete locale; + } + } + closedir(dir); + } +} + + +void LocaleMgr::deleteLocales() { + + LocaleMap::iterator it; + + for (it = locales->begin(); it != locales->end(); it++) + delete (*it).second; + + locales->erase(locales->begin(), locales->end()); +} + + +SWLocale *LocaleMgr::getLocale(const char *name) { + LocaleMap::iterator it; + + it = locales->find(name); + if (it != locales->end()) + return (*it).second; + + SWLog::getSystemLog()->logWarning("LocaleMgr::getLocale failed to find %s\n", name); + return 0; +} + + +std::list LocaleMgr::getAvailableLocales() { + std::list retVal; + for (LocaleMap::iterator it = locales->begin(); it != locales->end(); it++) + retVal.push_back((*it).second->getName()); + + return retVal; +} + + +const char *LocaleMgr::translate(const char *text, const char *localeName) { + SWLocale *target; + if (!localeName) { + localeName = getDefaultLocaleName(); + } + target = getLocale(localeName); + if (target) + return target->translate(text); + return text; +} + + +const char *LocaleMgr::getDefaultLocaleName() { + return defaultLocaleName; +} + + +void LocaleMgr::setDefaultLocaleName(const char *name) { + char *tmplang=0; + stdstr(&tmplang, name); + // discard everything after '.' usually encoding e.g. .UTF-8 + strtok(tmplang, "."); + // also discard after '@' so e.g. @euro locales are found + strtok(tmplang, "@"); + + stdstr(&defaultLocaleName, tmplang); + + // First check for what we ask for + if (!getLocale(tmplang)) { + // check for locale without country + char *nocntry=0; + stdstr(&nocntry, tmplang); + strtok(nocntry, "_"); + if (getLocale(nocntry)) { + stdstr(&defaultLocaleName, nocntry); + } + delete [] nocntry; + } + delete [] tmplang; +} + +SWORD_NAMESPACE_END diff --git a/src/mgr/markupfiltmgr.cpp b/src/mgr/markupfiltmgr.cpp new file mode 100644 index 0000000..5dca845 --- /dev/null +++ b/src/mgr/markupfiltmgr.cpp @@ -0,0 +1,295 @@ +/****************************************************************************** + * swmarkupmgr.cpp - implementaion of class MarkupFilterMgr, subclass of + * used to transcode all module text to a requested + * markup. + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#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 + +SWORD_NAMESPACE_START + +/****************************************************************************** + * MarkupFilterMgr Constructor - initializes instance of MarkupFilterMgr + * + * ENT: + * enc - Encoding format to emit + * mark - Markup format to emit + */ + +MarkupFilterMgr::MarkupFilterMgr (char mark, char enc) + : EncodingFilterMgr(enc) { + + markup = mark; + + CreateFilters(markup); +} + + +/****************************************************************************** + * MarkupFilterMgr Destructor - Cleans up instance of MarkupFilterMgr + */ + +MarkupFilterMgr::~MarkupFilterMgr() { + if (fromthml) + delete (fromthml); + if (fromgbf) + delete (fromgbf); + if (fromplain) + delete (fromplain); + if (fromosis) + delete (fromosis); + if (fromtei) + delete (fromtei); +} + +/****************************************************************************** + * MarkupFilterMgr::Markup - sets/gets markup + * + * ENT: mark - new encoding or 0 to simply get the current markup + * + * RET: markup + */ +char MarkupFilterMgr::Markup(char mark) { + if (mark && mark != markup) { + markup = mark; + ModMap::const_iterator module; + + SWFilter * oldplain = fromplain; + SWFilter * oldthml = fromthml; + SWFilter * oldgbf = fromgbf; + SWFilter * oldosis = fromosis; + SWFilter * oldtei = fromtei; + + CreateFilters(markup); + + for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++) + switch (module->second->Markup()) { + case FMT_THML: + if (oldthml != fromthml) { + if (oldthml) { + if (!fromthml) { + module->second->RemoveRenderFilter(oldthml); + } + else { + module->second->ReplaceRenderFilter(oldthml, fromthml); + } + } + else if (fromthml) { + module->second->AddRenderFilter(fromthml); + } + } + break; + case FMT_GBF: + if (oldgbf != fromgbf) { + if (oldgbf) { + if (!fromgbf) { + module->second->RemoveRenderFilter(oldgbf); + } + else { + module->second->ReplaceRenderFilter(oldgbf, fromgbf); + } + } + else if (fromgbf) { + module->second->AddRenderFilter(fromgbf); + } + break; + } + case FMT_PLAIN: + if (oldplain != fromplain) { + if (oldplain) { + if (!fromplain) { + module->second->RemoveRenderFilter(oldplain); + } + else { + module->second->ReplaceRenderFilter(oldplain, fromplain); + } + } + else if (fromplain) { + module->second->AddRenderFilter(fromplain); + } + break; + } + case FMT_OSIS: + if (oldosis != fromosis) { + if (oldosis) { + if (!fromosis) { + module->second->RemoveRenderFilter(oldosis); + } + else { + module->second->ReplaceRenderFilter(oldosis, fromosis); + } + } + else if (fromosis) { + module->second->AddRenderFilter(fromosis); + } + break; + } + case FMT_TEI: + if (oldtei != fromtei) { + if (oldtei) { + if (!fromtei) { + module->second->RemoveRenderFilter(oldtei); + } + else { + module->second->ReplaceRenderFilter(oldtei, fromtei); + } + } + else if (fromtei) { + module->second->AddRenderFilter(fromtei); + } + break; + } + } + + if (oldthml) + delete oldthml; + if (oldgbf) + delete oldgbf; + if (oldplain) + delete oldplain; + if (oldosis) + delete oldosis; + if (oldtei) + delete oldtei; + } + return markup; +} + +void MarkupFilterMgr::AddRenderFilters(SWModule *module, ConfigEntMap §ion) { + switch (module->Markup()) { + case FMT_THML: + if (fromthml) + module->AddRenderFilter(fromthml); + break; + case FMT_GBF: + if (fromgbf) + module->AddRenderFilter(fromgbf); + break; + case FMT_PLAIN: + if (fromplain) + module->AddRenderFilter(fromplain); + break; + case FMT_OSIS: + if (fromosis) + module->AddRenderFilter(fromosis); + break; + case FMT_TEI: + if (fromtei) + module->AddRenderFilter(fromtei); + break; + } +} + +void MarkupFilterMgr::CreateFilters(char markup) { + + switch (markup) { + case FMT_PLAIN: + fromplain = NULL; + fromthml = new ThMLPlain(); + fromgbf = new GBFPlain(); + fromosis = new OSISPlain(); + fromtei = new TEIPlain(); + break; + case FMT_THML: + fromplain = NULL; + fromthml = NULL; + fromgbf = new GBFThML(); + fromosis = NULL; + fromtei = NULL; + break; + case FMT_GBF: + fromplain = NULL; + fromthml = new ThMLGBF(); + fromgbf = NULL; + fromosis = NULL; + fromtei = NULL; + break; + case FMT_HTML: + fromplain = new PLAINHTML(); + fromthml = new ThMLHTML(); + fromgbf = new GBFHTML(); + fromosis = NULL; + fromtei = NULL; + break; + case FMT_HTMLHREF: + fromplain = new PLAINHTML(); + fromthml = new ThMLHTMLHREF(); + fromgbf = new GBFHTMLHREF(); + fromosis = new OSISHTMLHREF(); + fromtei = new TEIHTMLHREF(); + break; + case FMT_RTF: + fromplain = NULL; + fromthml = new ThMLRTF(); + fromgbf = new GBFRTF(); + fromosis = new OSISRTF(); + fromtei = new TEIRTF(); + break; + case FMT_OSIS: + fromplain = NULL; + fromthml = new ThMLOSIS(); + fromgbf = new GBFOSIS(); + fromosis = new OSISOSIS(); + fromtei = NULL; + break; + case FMT_WEBIF: + fromplain = NULL; + fromthml = new ThMLWEBIF(); + fromgbf = new GBFWEBIF(); + fromosis = new OSISWEBIF(); + fromtei = NULL; + break; + case FMT_TEI: + fromplain = NULL; + fromthml = NULL; + fromgbf = NULL; + fromosis = NULL; + fromtei = NULL; + break; + } + +} + +SWORD_NAMESPACE_END diff --git a/src/mgr/stringmgr.cpp b/src/mgr/stringmgr.cpp new file mode 100644 index 0000000..c4a994e --- /dev/null +++ b/src/mgr/stringmgr.cpp @@ -0,0 +1,280 @@ +/****************************************************************************** + * stringmgr.cpp - implementation of class StringMgr + * + * $Id: stringmgr.cpp 2115 2007-10-16 18:29:00Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include +#include +#include + +#ifdef _ICU_ + +#include +#include +#include +#include + +#include +#include + +#include + +#endif + +SWORD_NAMESPACE_START + +StringMgr *StringMgr::systemStringMgr = 0; + +class __staticsystemStringMgr { +public: + __staticsystemStringMgr() { } + ~__staticsystemStringMgr() { if (StringMgr::systemStringMgr) delete StringMgr::systemStringMgr; StringMgr::systemStringMgr = 0; } +} _staticsystemStringMgr; + +/** + * Determine whether the string contains a valid unicode sequence. The following table give the pattern of a valid UTF-8 character. + * Unicode Range 1st 2nd 3rd 4th 5th 6th + * U-00000000 - U-0000007F 0nnnnnnn + * U-00000080 - U-000007FF 110nnnnn 10nnnnnn + * U-00000800 - U-0000FFFF 1110nnnn 10nnnnnn 10nnnnnn + * U-00010000 - U-001FFFFF 11110nnn 10nnnnnn 10nnnnnn 10nnnnnn + * U-00200000 - U-03FFFFFF 111110nn 10nnnnnn 10nnnnnn 10nnnnnn 10nnnnnn + * U-04000000 - U-7FFFFFFF 1111110n 10nnnnnn 10nnnnnn 10nnnnnn 10nnnnnn 10nnnnnn + * Note: + * The latest UTF-8 RFC allows for a max of 4 bytes. Earlier allowed 6. + * The number of bits of the leading byte before the first 0 is the total number of bytes + * The "n" are the bits of the unicode codepoint. + * + * This routine does not check to see if the code point is in the range. It could. + * + * @param txt the text to check + * @return 1 if all high order characters form a valid unicode sequence + * -1 if there are no high order characters + * 0 if there are high order characters that do not form a valid unicode sequence + * @author DM Smith [dmsmith555 at yahoo dot com] + */ +int isValidUTF8(unsigned char *txt) { + unsigned int countUTF8 = 0; +#if 0 + unsigned char parts = 0; + + + unsigned char *p = txt; + while (*p) { + // Is the high order bit set? + if (*p & 0x80) { + // then count the number of high order bits that are set + // this determines the number of following bytes need to have high order bits set + unsigned char i = *p; + for (parts = 0; i & 0x80; parts++) { + i <<= 1; + } + + + // The pattern 10nnnnnn is not a unicode character + if (parts == 1) { + return 0; + } + else { + while (--parts && ++*p) { + // The pattern of each following character must be: 10nnnnnn + if (0xc0 & *p != 0x80) { + return 0; + } + } + + // Oops, we've run out of bytes too soon: Cannot be UTF-8 + if (parts) { + return 0; + } + } + countUTF8++; + } + } + + // At this point it is either UTF-8 or ascii +#endif + return countUTF8 ? 1 : -1; +} + + +#ifdef _ICU_ + +//here comes our ICUStringMgr reimplementation +class ICUStringMgr : public StringMgr { +public: + virtual char *upperUTF8(char *, unsigned int maxlen = 0) const; + +protected: + virtual bool supportsUnicode() const { return true; }; +}; + +#endif + + +/** Default constructor +*/ +StringMgr::StringMgr() { +} + +/** Copy constructor +*/ +StringMgr::StringMgr(const StringMgr &m) { +} + +/** Destructor +*/ +StringMgr::~StringMgr() { +} + +/** Sets the global StringMgr handle +* @param newStringMgr The new global StringMgr. This pointer will be deleted by this StringMgr +*/ +void StringMgr::setSystemStringMgr(StringMgr *newStringMgr) { + if (systemStringMgr) + delete systemStringMgr; + + systemStringMgr = newStringMgr; + + // TODO: this is magic. apparently we have to reset the system localemgr upon changing stringmgr. + // setting system stringmgr should be set before localemgr and not possible to change. + // rework this design. + LocaleMgr::getSystemLocaleMgr()->setSystemLocaleMgr(new LocaleMgr()); +} + +/** Returns the global StringMgr handle +* @return The global string handle +*/ +StringMgr* StringMgr::getSystemStringMgr() { + if (!systemStringMgr) { +#ifdef _ICU_ + systemStringMgr = new ICUStringMgr(); +// SWLog::getSystemLog()->logInformation("created default ICUStringMgr"); +#else + systemStringMgr = new StringMgr(); +// SWLog::getSystemLog()->logInformation("created default StringMgr"); +#endif + } + + return systemStringMgr; +} + + +/** + * This is a fallback method. It should never be called. + * If UTF8 support is desired, then a UTF8 StringMgr needs + * to be used. + * + * Here we just do our best. + * + * Converts the param to an upper case UTF8 string + * @param t - The text encoded in utf8 which should be turned into an upper case string + * + */ +char *StringMgr::upperUTF8(char *t, unsigned int maxlen) const { + // try to decide if it's worth trying to toupper. Do we have more + // characters which are probably lower latin than not? + // we still don't use isValidUTF8 optimally. what if we have 1 unicode + // character in the string? should we not try to upper any of the string? + // dunno. Best solution is to upper all other characters. Don't have + // time to write that before release. + long performOp = 0; + if (!isValidUTF8((unsigned char *)t)) { + performOp = 1; + } + else { + for (const char *ch = t; *ch; ch++) { + performOp += (*ch > 0) ? 1 : -1; + } + } + + if (performOp > 0) { + return upperLatin1(t); + } + + return t; +} + + +/** + * Converts the param to an uppercase latin1 string + * @param The text encoded in latin1 which should be turned into an upper case string + */ +char *StringMgr::upperLatin1(char *buf, unsigned int maxlen) const { + if (!buf) + return 0; + + char *ret = buf; + bool checkMax = maxlen; + + while (*buf && (!checkMax || maxlen--)) { + *buf = SW_toupper(*buf); + buf++; + } + + return ret; +} + +bool StringMgr::supportsUnicode() const { + return false; //default impl has no UTF8 support +} + + +#ifdef _ICU_ + +char *ICUStringMgr::upperUTF8(char *buf, unsigned int maxlen) const { + char *ret = buf; + int max = (maxlen) ? maxlen : strlen(buf); + + UErrorCode err = U_ZERO_ERROR; + + if (!buf || !max) { + return ret; + } + + UChar *lowerStr = new UChar[max+10]; + UChar *upperStr = new UChar[max+10]; + + u_strFromUTF8(lowerStr, max+9, 0, buf, -1, &err); + if (err != U_ZERO_ERROR) { +// SWLog::getSystemLog()->logError("from: %s", u_errorName(err)); + delete [] lowerStr; + delete [] upperStr; + return ret; + } + + u_strToUpper(upperStr, max+9, lowerStr, -1, 0, &err); + if (err != U_ZERO_ERROR) { +// SWLog::getSystemLog()->logError("upperCase: %s", u_errorName(err)); + delete [] lowerStr; + delete [] upperStr; + return ret; + } + + ret = u_strToUTF8(ret, max, 0, upperStr, -1, &err); + + delete [] lowerStr; + delete [] upperStr; + return ret; +} + +#endif + +SWORD_NAMESPACE_END diff --git a/src/mgr/swcacher.cpp b/src/mgr/swcacher.cpp new file mode 100644 index 0000000..57d0817 --- /dev/null +++ b/src/mgr/swcacher.cpp @@ -0,0 +1,47 @@ +/****************************************************************************** + * swcacher.h - definition of class SWCacher used to provide an interface for + * objects that cache and want a standard interface for cleaning up. + * + * $Id: swcacher.cpp 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include + +SWORD_NAMESPACE_START + + +SWCacher::SWCacher() { +} + + +SWCacher::~SWCacher() { +} + + +void SWCacher::flush() { +} + +long SWCacher::resourceConsumption() { + return 0; +} + +long SWCacher::lastAccess() { + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/mgr/swconfig.cpp b/src/mgr/swconfig.cpp new file mode 100644 index 0000000..376c206 --- /dev/null +++ b/src/mgr/swconfig.cpp @@ -0,0 +1,155 @@ +/****************************************************************************** + * swconfig.cpp - implementation of Class SWConfig used for saving and + * retrieval of configuration information + * + * $Id: swconfig.cpp 1828 2005-06-10 16:24:46Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include +#include +#include + + +SWORD_NAMESPACE_START + +SWConfig::SWConfig(const char * ifilename) { + filename = ifilename; + Load(); +} + + +SWConfig::~SWConfig() { +} + +void SWConfig::Load() { + FileDesc *cfile; + char *buf, *data; + SWBuf line; + ConfigEntMap cursect; + SWBuf sectname; + bool first = true; + + Sections.erase(Sections.begin(), Sections.end()); + + cfile = FileMgr::getSystemFileMgr()->open(filename.c_str(), FileMgr::RDONLY); + if (cfile->getFd() > 0) { + bool goodLine = FileMgr::getLine(cfile, line); + + // clean UTF encoding tags at start of file + while (goodLine && line.length() && + ((((unsigned char)line[0]) == 0xEF) || + (((unsigned char)line[0]) == 0xBB) || + (((unsigned char)line[0]) == 0xBF))) { + line << 1; + } + + while (goodLine) { + buf = new char [ line.length() + 1 ]; + strcpy(buf, line.c_str()); + if (*strstrip(buf) == '[') { + if (!first) + Sections.insert(SectionMap::value_type(sectname, cursect)); + else first = false; + + cursect.erase(cursect.begin(), cursect.end()); + + strtok(buf, "]"); + sectname = buf+1; + } + else { + strtok(buf, "="); + if ((*buf) && (*buf != '=')) { + if ((data = strtok(NULL, ""))) + cursect.insert(ConfigEntMap::value_type(buf, strstrip(data))); + else cursect.insert(ConfigEntMap::value_type(buf, "")); + } + } + delete [] buf; + goodLine = FileMgr::getLine(cfile, line); + } + if (!first) + Sections.insert(SectionMap::value_type(sectname, cursect)); + + FileMgr::getSystemFileMgr()->close(cfile); + } +} + + +void SWConfig::Save() { + FileDesc *cfile; + SWBuf buf; + SectionMap::iterator sit; + ConfigEntMap::iterator entry; + SWBuf sectname; + + cfile = FileMgr::getSystemFileMgr()->open(filename.c_str(), FileMgr::RDWR|FileMgr::CREAT|FileMgr::TRUNC); + if (cfile->getFd() > 0) { + + for (sit = Sections.begin(); sit != Sections.end(); sit++) { + buf = "\n["; + buf += (*sit).first.c_str(); + buf += "]\n"; + cfile->write(buf.c_str(), buf.length()); + for (entry = (*sit).second.begin(); entry != (*sit).second.end(); entry++) { + buf = (*entry).first.c_str(); + buf += "="; + buf += (*entry).second.c_str(); + buf += "\n"; + cfile->write(buf.c_str(), buf.length()); + } + } + buf = "\n"; + cfile->write(buf.c_str(), buf.length()); + FileMgr::getSystemFileMgr()->close(cfile); + } +} + + +void SWConfig::augment(SWConfig &addFrom) { + + SectionMap::iterator section; + ConfigEntMap::iterator entry, start, end; + + for (section = addFrom.Sections.begin(); section != addFrom.Sections.end(); section++) { + for (entry = (*section).second.begin(); entry != (*section).second.end(); entry++) { + start = Sections[section->first].lower_bound(entry->first); + end = Sections[section->first].upper_bound(entry->first); + if (start != end) { + if (((++start) != end) + || ((++(addFrom.Sections[section->first].lower_bound(entry->first))) != addFrom.Sections[section->first].upper_bound(entry->first))) { + for (--start; start != end; start++) { + if (!strcmp(start->second.c_str(), entry->second.c_str())) + break; + } + if (start == end) + Sections[(*section).first].insert(ConfigEntMap::value_type((*entry).first, (*entry).second)); + } + else Sections[section->first][entry->first.c_str()] = entry->second.c_str(); + } + else Sections[section->first][entry->first.c_str()] = entry->second.c_str(); + } + } +} + + +ConfigEntMap & SWConfig::operator [] (const char *section) { + return Sections[section]; +} + +SWORD_NAMESPACE_END diff --git a/src/mgr/swfiltermgr.cpp b/src/mgr/swfiltermgr.cpp new file mode 100644 index 0000000..434f2e0 --- /dev/null +++ b/src/mgr/swfiltermgr.cpp @@ -0,0 +1,93 @@ +/****************************************************************************** + * swfiltermgr.cpp - definition of class SWFilterMgr used as an interface to + * manage filters on a module + * + * $Id: swfiltermgr.cpp 1688 2005-01-01 04:42:26Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include + +SWORD_NAMESPACE_START + + +SWFilterMgr::SWFilterMgr() { +} + + +SWFilterMgr::~SWFilterMgr() { +} + + +void SWFilterMgr::setParentMgr(SWMgr *parentMgr) { + this->parentMgr = parentMgr; +} + + +SWMgr *SWFilterMgr::getParentMgr() { + return parentMgr; +} + + +void SWFilterMgr::AddGlobalOptions(SWModule * module, ConfigEntMap & section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) { +} + + +void SWFilterMgr::AddLocalOptions(SWModule * module, ConfigEntMap & section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) { +} + + +/** +* Adds the encoding filters which are defined in "section" to the SWModule object "module". +* @param module To this module the encoding filter(s) are added +* @param section We use this section to get a list of filters we should apply to the module +*/ + +void SWFilterMgr::AddEncodingFilters(SWModule * module, ConfigEntMap & section) { +} + + +/** +* Adds the render filters which are defined in "section" to the SWModule object "module". +* @param module To this module the render filter(s) are added +* @param section We use this section to get a list of filters we should apply to the module +*/ + +void SWFilterMgr::AddRenderFilters(SWModule * module, ConfigEntMap & section) { +} + + +/** +* Adds the strip filters which are defined in "section" to the SWModule object "module". +* @param module To this module the strip filter(s) are added +* @param section We use this section to get a list of filters we should apply to the module +*/ + +void SWFilterMgr::AddStripFilters(SWModule * module, ConfigEntMap & section) { +} + + +/** +* Adds the raw filters which are defined in "section" to the SWModule object "module". +* @param module To this module the raw filter(s) are added +* @param section We use this section to get a list of filters we should apply to the module +*/ + +void SWFilterMgr::AddRawFilters(SWModule * module, ConfigEntMap & section) { +} + +SWORD_NAMESPACE_END diff --git a/src/mgr/swlocale.cpp b/src/mgr/swlocale.cpp new file mode 100644 index 0000000..facb1ee --- /dev/null +++ b/src/mgr/swlocale.cpp @@ -0,0 +1,204 @@ +/****************************************************************************** + * swlocale.cpp - implementation of Class SWLocale used for retrieval + * of locale lookups + * + * $Id: swlocale.cpp 1864 2005-11-20 06:06:40Z scribe $ + * + * Copyright 2000 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +typedef std::map < SWBuf, SWBuf, std::less < SWBuf > >LookupMap; + +// I have bridge patterns, but this hides swconfig and map from lots o stuff +class SWLocale::Private { +public: + LookupMap lookupTable; +}; + + +SWLocale::SWLocale(const char * ifilename) { + p = new Private; + ConfigEntMap::iterator confEntry; + + name = 0; + description = 0; + encoding = 0; + bookAbbrevs = 0; + BMAX = 0; + books = 0; + localeSource = new SWConfig(ifilename); + + confEntry = localeSource->Sections["Meta"].find("Name"); + if (confEntry != localeSource->Sections["Meta"].end()) + stdstr(&name, (*confEntry).second.c_str()); + + confEntry = localeSource->Sections["Meta"].find("Description"); + if (confEntry != localeSource->Sections["Meta"].end()) + stdstr(&description, (*confEntry).second.c_str()); + + confEntry = localeSource->Sections["Meta"].find("Encoding"); //Either empty (==Latin1) or UTF-8 + if (confEntry != localeSource->Sections["Meta"].end()) + stdstr(&encoding, (*confEntry).second.c_str()); +} + + +SWLocale::~SWLocale() { + + delete localeSource; + + if (encoding) + delete [] encoding; + + if (description) + delete [] description; + + if (name) + delete [] name; + + if (bookAbbrevs) + delete [] bookAbbrevs; + + if (BMAX) { + for (int i = 0; i < 2; i++) + delete [] books[i]; + delete [] BMAX; + delete [] books; + } + delete p; +} + + +const char *SWLocale::translate(const char *text) { + LookupMap::iterator entry; + + entry = p->lookupTable.find(text); + + if (entry == p->lookupTable.end()) { + ConfigEntMap::iterator confEntry; + confEntry = localeSource->Sections["Text"].find(text); + if (confEntry == localeSource->Sections["Text"].end()) + p->lookupTable.insert(LookupMap::value_type(text, text)); + else {//valid value found + /* + - If Encoding==Latin1 and we have a StringHelper, convert to UTF-8 + - If StringHelper present and Encoding is UTF-8, use UTF8 + - If StringHelper not present and Latin1, use Latin1 + - If StringHelper not present and UTF-8, no idea what to do. Should't happen + */ +/* if (StringHelper::getSystemStringHelper()) { + if (!strcmp(encoding, "UTF-8")) { + p->lookupTable.insert(LookupMap::value_type(text, (*confEntry).second.c_str())); + } + else { //latin1 expected, convert to UTF-8 + SWBuf t((*confEntry).second.c_str()); + t = StringHelper::getSystemStringHelper()->latin2unicode( t ); + + p->lookupTable.insert(LookupMap::value_type(text, t.c_str())); + } + } + else { //no stringhelper, just insert. Nothing we can do*/ + p->lookupTable.insert(LookupMap::value_type(text, (*confEntry).second.c_str())); +// } + + } + entry = p->lookupTable.find(text); + } + return (*entry).second.c_str(); +} + + +const char *SWLocale::getName() { + return name; +} + + +const char *SWLocale::getDescription() { + return description; +} + +const char *SWLocale::getEncoding() { + return encoding; +} + +void SWLocale::augment(SWLocale &addFrom) { + *localeSource += *addFrom.localeSource; +} + +//#define NONNUMERICLOCALETHING 1 + +const struct abbrev *SWLocale::getBookAbbrevs() { + static const char *nullstr = ""; + if (!bookAbbrevs) { + ConfigEntMap::iterator it; + int i, j; + int size = localeSource->Sections["Book Abbrevs"].size(); + bookAbbrevs = new struct abbrev[size + 1]; + for (i = 0, j = 0, it = localeSource->Sections["Book Abbrevs"].begin(); it != localeSource->Sections["Book Abbrevs"].end(); it++, i++) { + #ifdef NONNUMERICLOCALETHING + int booknum = VerseKey::getOSISBookNum((*it).second.c_str()); + if (booknum != -1) { + bookAbbrevs[j].ab = (*it).first.c_str(); + bookAbbrevs[j].book = booknum; + j++; + } + #else + bookAbbrevs[i].ab = (*it).first.c_str(); + bookAbbrevs[i].book = atoi((*it).second.c_str()); + j++; + #endif + //printf("SWLocale::getBookAbbrevs %s:%s %d\n",bookAbbrevs[i].ab, + // (*it).second.c_str(), bookAbbrevs[i].book); + } + bookAbbrevs[j].ab = nullstr; + bookAbbrevs[j].book = -1; + } + + return bookAbbrevs; +} + + +void SWLocale::getBooks(char **iBMAX, struct sbook ***ibooks) { + if (!BMAX) { + BMAX = new char [2]; + BMAX[0] = VerseKey::builtin_BMAX[0]; + BMAX[1] = VerseKey::builtin_BMAX[1]; + + books = new struct sbook *[2]; + books[0] = new struct sbook[BMAX[0]]; + books[1] = new struct sbook[BMAX[1]]; + + for (int i = 0; i < 2; i++) { + for (int j = 0; j < BMAX[i]; j++) { + books[i][j] = VerseKey::builtin_books[i][j]; + books[i][j].name = translate(VerseKey::builtin_books[i][j].name); + } + } + } + + *iBMAX = BMAX; + *ibooks = books; +} + + +SWORD_NAMESPACE_END diff --git a/src/mgr/swmgr.cpp b/src/mgr/swmgr.cpp new file mode 100644 index 0000000..86c04d7 --- /dev/null +++ b/src/mgr/swmgr.cpp @@ -0,0 +1,1275 @@ +/****************************************************************************** + * swmgr.cpp - implementaion of class SWMgr used to interact with an install + * base of sword modules. + * + * $Id: swmgr.cpp 2169 2008-05-18 02:50:53Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include +#include + +#include +#ifndef _MSC_VER +#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 + +#ifndef EXCLUDEZLIB +#include "zipcomprs.h" +#endif + + +#ifdef _ICU_ +#include +#endif + +SWORD_NAMESPACE_START + +#ifdef _ICU_ +bool SWMgr::isICU = true; +#else +bool SWMgr::isICU = false; +#endif + + +#ifdef GLOBCONFPATH +const char *SWMgr::globalConfPath = GLOBCONFPATH; +#else +const char *SWMgr::globalConfPath = "/etc/sword.conf:/usr/local/etc/sword.conf"; +#endif + +void SWMgr::init() { + SWOptionFilter *tmpFilter = 0; + configPath = 0; + prefixPath = 0; + configType = 0; + myconfig = 0; + mysysconfig = 0; + homeConfig = 0; + augmentHome = true; + + cipherFilters.clear(); + optionFilters.clear(); + cleanupFilters.clear(); + tmpFilter = new ThMLVariants(); + optionFilters.insert(OptionFilterMap::value_type("ThMLVariants", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new GBFStrongs(); + optionFilters.insert(OptionFilterMap::value_type("GBFStrongs", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new GBFFootnotes(); + optionFilters.insert(OptionFilterMap::value_type("GBFFootnotes", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new GBFRedLetterWords(); + optionFilters.insert(OptionFilterMap::value_type("GBFRedLetterWords", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new GBFMorph(); + optionFilters.insert(OptionFilterMap::value_type("GBFMorph", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new GBFHeadings(); + optionFilters.insert(OptionFilterMap::value_type("GBFHeadings", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new OSISHeadings(); + optionFilters.insert(OptionFilterMap::value_type("OSISHeadings", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new OSISStrongs(); + optionFilters.insert(OptionFilterMap::value_type("OSISStrongs", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new OSISMorph(); + optionFilters.insert(OptionFilterMap::value_type("OSISMorph", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new OSISLemma(); + optionFilters.insert(OptionFilterMap::value_type("OSISLemma", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new OSISFootnotes(); + optionFilters.insert(OptionFilterMap::value_type("OSISFootnotes", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new OSISScripref(); + optionFilters.insert(OptionFilterMap::value_type("OSISScripref", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new OSISRedLetterWords(); + optionFilters.insert(OptionFilterMap::value_type("OSISRedLetterWords", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new OSISMorphSegmentation(); + optionFilters.insert(OptionFilterMap::value_type("OSISMorphSegmentation", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new ThMLStrongs(); + optionFilters.insert(OptionFilterMap::value_type("ThMLStrongs", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new ThMLFootnotes(); + optionFilters.insert(OptionFilterMap::value_type("ThMLFootnotes", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new ThMLMorph(); + optionFilters.insert(OptionFilterMap::value_type("ThMLMorph", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new ThMLHeadings(); + optionFilters.insert(OptionFilterMap::value_type("ThMLHeadings", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new ThMLLemma(); + optionFilters.insert(OptionFilterMap::value_type("ThMLLemma", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new ThMLScripref(); + optionFilters.insert(OptionFilterMap::value_type("ThMLScripref", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new UTF8GreekAccents(); + optionFilters.insert(OptionFilterMap::value_type("UTF8GreekAccents", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new UTF8HebrewPoints(); + optionFilters.insert(OptionFilterMap::value_type("UTF8HebrewPoints", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new UTF8Cantillation(); + optionFilters.insert(OptionFilterMap::value_type("UTF8Cantillation", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new GreekLexAttribs(); + optionFilters.insert(OptionFilterMap::value_type("GreekLexAttribs", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + + tmpFilter = new PapyriPlain(); + optionFilters.insert(OptionFilterMap::value_type("PapyriPlain", tmpFilter)); + cleanupFilters.push_back(tmpFilter); + +// UTF8Transliterator needs to be handled differently because it should always available as an option, for all modules +#ifdef _ICU_ + transliterator = new UTF8Transliterator(); + optionFilters.insert(OptionFilterMap::value_type("UTF8Transliterator", transliterator)); + options.push_back(transliterator->getOptionName()); + cleanupFilters.push_back(transliterator); +#endif + + gbfplain = new GBFPlain(); + cleanupFilters.push_back(gbfplain); + + thmlplain = new ThMLPlain(); + cleanupFilters.push_back(thmlplain); + + osisplain = new OSISPlain(); + cleanupFilters.push_back(osisplain); + + teiplain = new TEIPlain(); + cleanupFilters.push_back(teiplain); +//#endif +} + + +void SWMgr::commonInit(SWConfig *iconfig, SWConfig *isysconfig, bool autoload, SWFilterMgr *filterMgr, bool multiMod) { + + init(); + + mgrModeMultiMod = multiMod; + this->filterMgr = filterMgr; + if (filterMgr) + filterMgr->setParentMgr(this); + + if (iconfig) { + config = iconfig; + myconfig = 0; + } + else config = 0; + if (isysconfig) { + sysconfig = isysconfig; + mysysconfig = 0; + } + else sysconfig = 0; + + if (autoload) + Load(); +} + + +SWMgr::SWMgr(SWFilterMgr *filterMgr, bool multiMod) { + commonInit(0, 0, true, filterMgr, multiMod); +} + + +SWMgr::SWMgr(SWConfig *iconfig, SWConfig *isysconfig, bool autoload, SWFilterMgr *filterMgr, bool multiMod) { + commonInit(iconfig, isysconfig, autoload, filterMgr, multiMod); +} + + +SWMgr::SWMgr(const char *iConfigPath, bool autoload, SWFilterMgr *filterMgr, bool multiMod, bool augmentHome) { + + init(); + + mgrModeMultiMod = multiMod; + SWBuf path; + + this->filterMgr = filterMgr; + if (filterMgr) + filterMgr->setParentMgr(this); + + this->augmentHome = augmentHome; + + path = iConfigPath; + int len = path.length(); + if ((len < 1) || ((iConfigPath[len-1] != '\\') && (iConfigPath[len-1] != '/'))) + path += "/"; + if (FileMgr::existsFile(path.c_str(), "mods.conf")) { + stdstr(&prefixPath, path.c_str()); + path += "mods.conf"; + stdstr(&configPath, path.c_str()); + } + else { + if (FileMgr::existsDir(path.c_str(), "mods.d")) { + stdstr(&prefixPath, path.c_str()); + path += "mods.d"; + stdstr(&configPath, path.c_str()); + configType = 1; + } + } + + config = 0; + sysconfig = 0; + + if (autoload && configPath) + Load(); +} + + +SWMgr::~SWMgr() { + + DeleteMods(); + + for (FilterList::iterator it = cleanupFilters.begin(); it != cleanupFilters.end(); it++) + delete (*it); + + if (homeConfig) + delete homeConfig; + + if (mysysconfig) + delete mysysconfig; + + if (myconfig) + delete myconfig; + + if (prefixPath) + delete [] prefixPath; + + if (configPath) + delete [] configPath; + + if (filterMgr) + delete filterMgr; +} + + +void SWMgr::findConfig(char *configType, char **prefixPath, char **configPath, std::list *augPaths, SWConfig *providedSysConf) { + SWBuf path; + SWBuf sysConfPath; + ConfigEntMap::iterator entry; + ConfigEntMap::iterator lastEntry; + + char *envsworddir = getenv("SWORD_PATH"); + char *envhomedir = getenv("HOME"); + SWConfig *sysConf = 0; + + *configType = 0; + + // check for a sysConf passed in to us + SWLog::getSystemLog()->logDebug("Checking for provided SWConfig(\"sword.conf\")..."); + if (providedSysConf) { + sysConf = providedSysConf; + SWLog::getSystemLog()->logDebug("found."); + } + else { + // check working directory + SWLog::getSystemLog()->logDebug("Checking working directory for sword.conf..."); + if (FileMgr::existsFile(".", "sword.conf")) { + SWLog::getSystemLog()->logDebug("Overriding any systemwide or ~/.sword/ sword.conf with one found in current directory."); + sysConfPath = "./sword.conf"; + } + else { + SWLog::getSystemLog()->logDebug("Checking working directory for mods.conf..."); + if (FileMgr::existsFile(".", "mods.conf")) { + SWLog::getSystemLog()->logDebug("found."); + stdstr(prefixPath, "./"); + stdstr(configPath, "./mods.conf"); + return; + } + + SWLog::getSystemLog()->logDebug("Checking working directory for mods.d..."); + if (FileMgr::existsDir(".", "mods.d")) { + SWLog::getSystemLog()->logDebug("found."); + stdstr(prefixPath, "./"); + stdstr(configPath, "./mods.d"); + *configType = 1; + return; + } + + // check working directory ../library/ + SWLog::getSystemLog()->logDebug("Checking working directory ../library/ for mods.d..."); + if (FileMgr::existsDir("../library", "mods.d")) { + SWLog::getSystemLog()->logDebug("found."); + stdstr(prefixPath, "../library/"); + stdstr(configPath, "../library/mods.d"); + *configType = 1; + return; + } + + // check environment variable SWORD_PATH + SWLog::getSystemLog()->logDebug("Checking SWORD_PATH..."); + + if (envsworddir != NULL) { + + SWLog::getSystemLog()->logDebug("found (%s).", envsworddir); + path = envsworddir; + if ((envsworddir[strlen(envsworddir)-1] != '\\') && (envsworddir[strlen(envsworddir)-1] != '/')) + path += "/"; + + SWLog::getSystemLog()->logDebug("Checking $SWORD_PATH for mods.conf..."); + if (FileMgr::existsFile(path.c_str(), "mods.conf")) { + SWLog::getSystemLog()->logDebug("found."); + stdstr(prefixPath, path.c_str()); + path += "mods.conf"; + stdstr(configPath, path.c_str()); + return; + } + + SWLog::getSystemLog()->logDebug("Checking $SWORD_PATH for mods.d..."); + if (FileMgr::existsDir(path.c_str(), "mods.d")) { + SWLog::getSystemLog()->logDebug("found."); + stdstr(prefixPath, path.c_str()); + path += "mods.d"; + stdstr(configPath, path.c_str()); + *configType = 1; + return; + } + } + + + // check for systemwide globalConfPath + + SWLog::getSystemLog()->logDebug("Parsing %s...", globalConfPath); + char *globPaths = 0; + char *gfp; + stdstr(&globPaths, globalConfPath); + for (gfp = strtok(globPaths, ":"); gfp; gfp = strtok(0, ":")) { + SWLog::getSystemLog()->logDebug("Checking for %s...", gfp); + if (FileMgr::existsFile(gfp)) { + SWLog::getSystemLog()->logDebug("found."); + break; + } + } + if (gfp) + sysConfPath = gfp; + delete [] globPaths; + + SWBuf homeDir = envhomedir; + if (homeDir.size() > 0) { + if ((homeDir[homeDir.size()-1] != '\\') && (homeDir[homeDir.size()-1] != '/')) + homeDir += "/"; + homeDir += ".sword/sword.conf"; + if (FileMgr::existsFile(homeDir)) { + SWLog::getSystemLog()->logDebug("Overriding any systemwide sword.conf with one found in users home directory."); + sysConfPath = homeDir; + } + } + } + } + + if (sysConfPath.size()) { + sysConf = new SWConfig(sysConfPath); + } + + if (sysConf) { + if ((entry = sysConf->Sections["Install"].find("DataPath")) != sysConf->Sections["Install"].end()) { + path = (*entry).second; + if (((*entry).second.c_str()[strlen((*entry).second.c_str())-1] != '\\') && ((*entry).second.c_str()[strlen((*entry).second.c_str())-1] != '/')) + path += "/"; + + SWLog::getSystemLog()->logDebug("DataPath in %s is set to %s.", sysConfPath.c_str(), path.c_str()); + SWLog::getSystemLog()->logDebug("Checking for mods.conf in DataPath..."); + + if (FileMgr::existsFile(path.c_str(), "mods.conf")) { + SWLog::getSystemLog()->logDebug("found."); + stdstr(prefixPath, path.c_str()); + path += "mods.conf"; + stdstr(configPath, path.c_str()); + *configType = 1; + } + + SWLog::getSystemLog()->logDebug("Checking for mods.d in DataPath..."); + + if (FileMgr::existsDir(path.c_str(), "mods.d")) { + SWLog::getSystemLog()->logDebug("found."); + stdstr(prefixPath, path.c_str()); + path += "mods.d"; + stdstr(configPath, path.c_str()); + *configType = 1; + } + } + if (augPaths) { + augPaths->clear(); + entry = sysConf->Sections["Install"].lower_bound("AugmentPath"); + lastEntry = sysConf->Sections["Install"].upper_bound("AugmentPath"); + for (;entry != lastEntry; entry++) { + path = entry->second; + if ((entry->second.c_str()[strlen(entry->second.c_str())-1] != '\\') && (entry->second.c_str()[strlen(entry->second.c_str())-1] != '/')) + path += "/"; + augPaths->push_back(path); + } + } + } + + if ((sysConf) && (!providedSysConf)) { + delete sysConf; + } + + if (*configType) + return; + + // check ~/.sword/ + + SWLog::getSystemLog()->logDebug("Checking home directory for ~/.sword..."); + + if (envhomedir != NULL) { + path = envhomedir; + if ((envhomedir[strlen(envhomedir)-1] != '\\') && (envhomedir[strlen(envhomedir)-1] != '/')) + path += "/"; + path += ".sword/"; + SWLog::getSystemLog()->logDebug(" Checking for %smods.conf...", path.c_str()); + if (FileMgr::existsFile(path.c_str(), "mods.conf")) { + SWLog::getSystemLog()->logDebug("found."); + stdstr(prefixPath, path.c_str()); + path += "mods.conf"; + stdstr(configPath, path.c_str()); + return; + } + + SWLog::getSystemLog()->logDebug(" Checking for %smods.d...", path.c_str()); + if (FileMgr::existsDir(path.c_str(), "mods.d")) { + SWLog::getSystemLog()->logDebug("found."); + stdstr(prefixPath, path.c_str()); + path += "mods.d"; + stdstr(configPath, path.c_str()); + *configType = 2; + return; + } + } +} + + +void SWMgr::loadConfigDir(const char *ipath) +{ + DIR *dir; + struct dirent *ent; + SWBuf newmodfile; + + if ((dir = opendir(ipath))) { + rewinddir(dir); + while ((ent = readdir(dir))) { + //check whether it ends with .conf, if it doesn't skip it! + if (ent->d_name && (strlen(ent->d_name) > 5) && strncmp(".conf", (ent->d_name + strlen(ent->d_name) - 5), 5 )) { + continue; + } + + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + newmodfile = ipath; + if ((ipath[strlen(ipath)-1] != '\\') && (ipath[strlen(ipath)-1] != '/')) + newmodfile += "/"; + newmodfile += ent->d_name; + if (config) { + SWConfig tmpConfig(newmodfile.c_str()); + *config += tmpConfig; + } + else config = myconfig = new SWConfig(newmodfile.c_str()); + } + } + closedir(dir); + + if (!config) { // if no .conf file exist yet, create a default + newmodfile = ipath; + if ((ipath[strlen(ipath)-1] != '\\') && (ipath[strlen(ipath)-1] != '/')) + newmodfile += "/"; + newmodfile += "globals.conf"; + config = myconfig = new SWConfig(newmodfile.c_str()); + } + } +} + + +void SWMgr::augmentModules(const char *ipath, bool multiMod) { + SWBuf path = ipath; + if ((ipath[strlen(ipath)-1] != '\\') && (ipath[strlen(ipath)-1] != '/')) + path += "/"; + if (FileMgr::existsDir(path.c_str(), "mods.d")) { + char *savePrefixPath = 0; + char *saveConfigPath = 0; + SWConfig *saveConfig = 0; + stdstr(&savePrefixPath, prefixPath); + stdstr(&prefixPath, path.c_str()); + path += "mods.d"; + stdstr(&saveConfigPath, configPath); + stdstr(&configPath, path.c_str()); + saveConfig = config; + config = myconfig = 0; + loadConfigDir(configPath); + + if (multiMod) { + // fix config's Section names to rename modules which are available more than once + // find out which sections are in both config objects + // inserting all configs first is not good because that overwrites old keys and new modules would share the same config + for (SectionMap::iterator it = config->Sections.begin(); it != config->Sections.end(); ++it) { + if (saveConfig->Sections.find( (*it).first ) != saveConfig->Sections.end()) { //if the new section is already present rename it + ConfigEntMap entMap((*it).second); + + SWBuf name; + int i = 1; + do { //module name already used? + name.setFormatted("%s_%d", (*it).first.c_str(), i); + i++; + } while (config->Sections.find(name) != config->Sections.end()); + + config->Sections.insert(SectionMap::value_type(name, entMap) ); + config->Sections.erase(it); + } + } + } + + CreateMods(multiMod); + + stdstr(&prefixPath, savePrefixPath); + delete []savePrefixPath; + stdstr(&configPath, saveConfigPath); + delete []saveConfigPath; + + (*saveConfig) += *config; + + homeConfig = myconfig; + config = myconfig = saveConfig; + } +} + + +/*********************************************************************** + * SWMgr::Load - loads actual modules + * + * RET: status - 0 = ok; -1 no config found; 1 = no modules installed + * + */ + +signed char SWMgr::Load() { + signed char ret = 0; + + if (!config) { // If we weren't passed a config object at construction, find a config file + if (!configPath) { // If we weren't passed a config path at construction... + SWLog::getSystemLog()->logDebug("LOOKING UP MODULE CONFIGURATION..."); + findConfig(&configType, &prefixPath, &configPath, &augPaths, sysconfig); + SWLog::getSystemLog()->logDebug("LOOKING UP MODULE CONFIGURATION COMPLETE."); + } + if (configPath) { + if (configType) + loadConfigDir(configPath); + else config = myconfig = new SWConfig(configPath); + } + } + + if (config) { + SectionMap::iterator Sectloop, Sectend; + ConfigEntMap::iterator Entryloop, Entryend; + + DeleteMods(); + + for (Sectloop = config->Sections.lower_bound("Globals"), Sectend = config->Sections.upper_bound("Globals"); Sectloop != Sectend; Sectloop++) { // scan thru all 'Globals' sections + for (Entryloop = (*Sectloop).second.lower_bound("AutoInstall"), Entryend = (*Sectloop).second.upper_bound("AutoInstall"); Entryloop != Entryend; Entryloop++) // scan thru all AutoInstall entries + InstallScan((*Entryloop).second.c_str()); // Scan AutoInstall entry directory for new modules and install + } + if (configType) { // force reload on config object because we may have installed new modules + delete myconfig; + config = myconfig = 0; + loadConfigDir(configPath); + } + else config->Load(); + + CreateMods(mgrModeMultiMod); + + for (std::list::iterator pathIt = augPaths.begin(); pathIt != augPaths.end(); pathIt++) { + augmentModules(pathIt->c_str(), mgrModeMultiMod); + } + if (augmentHome) { + // augment config with ~/.sword/mods.d if it exists --------------------- + char *envhomedir = getenv("HOME"); + if (envhomedir != NULL && configType != 2) { // 2 = user only + SWBuf path = envhomedir; + if ((envhomedir[strlen(envhomedir)-1] != '\\') && (envhomedir[strlen(envhomedir)-1] != '/')) + path += "/"; + path += ".sword/"; + augmentModules(path.c_str(), mgrModeMultiMod); + } + } +// ------------------------------------------------------------------------- + if ( !Modules.size() ) // config exists, but no modules + ret = 1; + + } + else { + SWLog::getSystemLog()->logError("SWMgr: Can't find 'mods.conf' or 'mods.d'. Try setting:\n\tSWORD_PATH=\n\tOr see the README file for a full description of setup options (%s)", (configPath) ? configPath : ""); + ret = -1; + } + + return ret; +} + +SWModule *SWMgr::CreateMod(const char *name, const char *driver, ConfigEntMap §ion) +{ + SWBuf description, datapath, misc1; + ConfigEntMap::iterator entry; + SWModule *newmod = 0; + SWBuf lang, sourceformat, encoding; + signed char direction, enc, markup; + + description = ((entry = section.find("Description")) != section.end()) ? (*entry).second : (SWBuf)""; + lang = ((entry = section.find("Lang")) != section.end()) ? (*entry).second : (SWBuf)"en"; + sourceformat = ((entry = section.find("SourceType")) != section.end()) ? (*entry).second : (SWBuf)""; + encoding = ((entry = section.find("Encoding")) != section.end()) ? (*entry).second : (SWBuf)""; + datapath = prefixPath; + if ((prefixPath[strlen(prefixPath)-1] != '\\') && (prefixPath[strlen(prefixPath)-1] != '/')) + datapath += "/"; + + // DataPath - relative path to data used by module driver. May be a directory, may be a File. + // Typically not useful by outside world. See AbsoluteDataPath, PrefixPath, and RelativePrefixPath + // below. + misc1 += ((entry = section.find("DataPath")) != section.end()) ? (*entry).second : (SWBuf)""; + char *buf = new char [ strlen(misc1.c_str()) + 1 ]; + char *buf2 = buf; + strcpy(buf, misc1.c_str()); +// for (; ((*buf2) && ((*buf2 == '.') || (*buf2 == '/') || (*buf2 == '\\'))); buf2++); + for (; ((*buf2) && ((*buf2 == '/') || (*buf2 == '\\'))); buf2++); + if (!strncmp(buf2, "./", 2)) { //remove the leading ./ in the module data path to make it look better + buf2 += 2; + } + // PrefixPath - absolute directory path to the repository in which this module was found + section["PrefixPath"] = datapath; + if (*buf2) + datapath += buf2; + delete [] buf; + + section["AbsoluteDataPath"] = datapath; + + if (!stricmp(sourceformat.c_str(), "GBF")) + markup = FMT_GBF; + else if (!stricmp(sourceformat.c_str(), "ThML")) + markup = FMT_THML; + else if (!stricmp(sourceformat.c_str(), "OSIS")) + markup = FMT_OSIS; + else if (!stricmp(sourceformat.c_str(), "TEI")) + markup = FMT_TEI; + else + markup = FMT_GBF; + + if (!stricmp(encoding.c_str(), "SCSU")) + enc = ENC_SCSU; + else if (!stricmp(encoding.c_str(), "UTF-8")) { + enc = ENC_UTF8; + } + else enc = ENC_LATIN1; + + if ((entry = section.find("Direction")) == section.end()) { + direction = DIRECTION_LTR; + } + else if (!stricmp((*entry).second.c_str(), "rtol")) { + direction = DIRECTION_RTL; + } + else if (!stricmp((*entry).second.c_str(), "bidi")) { + direction = DIRECTION_BIDI; + } + else { + direction = DIRECTION_LTR; + } + + if ((!stricmp(driver, "zText")) || (!stricmp(driver, "zCom"))) { + SWCompress *compress = 0; + int blockType = CHAPTERBLOCKS; + int blockNum = 1; + misc1 = ((entry = section.find("BlockType")) != section.end()) ? (*entry).second : (SWBuf)"CHAPTER"; + if (!stricmp(misc1.c_str(), "VERSE")) + blockType = VERSEBLOCKS; + else if (!stricmp(misc1.c_str(), "CHAPTER")) + blockType = CHAPTERBLOCKS; + else if (!stricmp(misc1.c_str(), "BOOK")) + blockType = BOOKBLOCKS; + + misc1 = ((entry = section.find("BlockNumber")) != section.end()) ? (*entry).second : (SWBuf)"1"; + blockNum = atoi(misc1.c_str()); + + misc1 = ((entry = section.find("CompressType")) != section.end()) ? (*entry).second : (SWBuf)"LZSS"; +#ifndef EXCLUDEZLIB + if (!stricmp(misc1.c_str(), "ZIP")) + compress = new ZipCompress(); + else +#endif + if (!stricmp(misc1.c_str(), "LZSS")) + compress = new LZSSCompress(); + + if (compress) { + if (!stricmp(driver, "zText")) + newmod = new zText(datapath.c_str(), name, description.c_str(), blockType, compress, 0, enc, direction, markup, lang.c_str()); + else newmod = new zCom(datapath.c_str(), name, description.c_str(), blockType, compress, 0, enc, direction, markup, lang.c_str()); + } + } + + if (!stricmp(driver, "RawText")) { + newmod = new RawText(datapath.c_str(), name, description.c_str(), 0, enc, direction, markup, lang.c_str()); + } + + if (!stricmp(driver, "RawText4")) { + newmod = new RawText4(datapath.c_str(), name, description.c_str(), 0, enc, direction, markup, lang.c_str()); + } + + // backward support old drivers + if (!stricmp(driver, "RawGBF")) { + newmod = new RawText(datapath.c_str(), name, description.c_str(), 0, enc, direction, markup, lang.c_str()); + } + + if (!stricmp(driver, "RawCom")) { + newmod = new RawCom(datapath.c_str(), name, description.c_str(), 0, enc, direction, markup, lang.c_str()); + } + + if (!stricmp(driver, "RawCom4")) { + newmod = new RawCom4(datapath.c_str(), name, description.c_str(), 0, enc, direction, markup, lang.c_str()); + } + + if (!stricmp(driver, "RawFiles")) { + newmod = new RawFiles(datapath.c_str(), name, description.c_str(), 0, enc, direction, markup, lang.c_str()); + } + + if (!stricmp(driver, "HREFCom")) { + misc1 = ((entry = section.find("Prefix")) != section.end()) ? (*entry).second : (SWBuf)""; + newmod = new HREFCom(datapath.c_str(), misc1.c_str(), name, description.c_str()); + } + + int pos = 0; //used for position of final / in AbsoluteDataPath, but also set to 1 for modules types that need to strip module name + if (!stricmp(driver, "RawLD")) { + newmod = new RawLD(datapath.c_str(), name, description.c_str(), 0, enc, direction, markup, lang.c_str()); + pos = 1; + } + + if (!stricmp(driver, "RawLD4")) { + newmod = new RawLD4(datapath.c_str(), name, description.c_str(), 0, enc, direction, markup, lang.c_str()); + pos = 1; + } + + if (!stricmp(driver, "zLD")) { + SWCompress *compress = 0; + int blockCount; + misc1 = ((entry = section.find("BlockCount")) != section.end()) ? (*entry).second : (SWBuf)"200"; + blockCount = atoi(misc1.c_str()); + blockCount = (blockCount) ? blockCount : 200; + + misc1 = ((entry = section.find("CompressType")) != section.end()) ? (*entry).second : (SWBuf)"LZSS"; +#ifndef EXCLUDEZLIB + if (!stricmp(misc1.c_str(), "ZIP")) + compress = new ZipCompress(); + else +#endif + if (!stricmp(misc1.c_str(), "LZSS")) + compress = new LZSSCompress(); + + if (compress) { + newmod = new zLD(datapath.c_str(), name, description.c_str(), blockCount, compress, 0, enc, direction, markup, lang.c_str()); + } + pos = 1; + } + + if (!stricmp(driver, "RawGenBook")) { + misc1 = ((entry = section.find("KeyType")) != section.end()) ? (*entry).second : (SWBuf)"TreeKey"; + newmod = new RawGenBook(datapath.c_str(), name, description.c_str(), 0, enc, direction, markup, lang.c_str(), misc1.c_str()); + pos = 1; + } + + if (pos == 1) { + SWBuf &dp = section["AbsoluteDataPath"]; + for (int i = dp.length() - 1; i; i--) { + if (dp[i] == '/') { + dp.setSize(i); + break; + } + } +/* + SWBuf &rdp = section["RelativeDataPath"]; + for (int i = rdp.length() - 1; i; i--) { + if (rdp[i] == '/') { + rdp.setSize(i); + break; + } + } +*/ + } + + // if a specific module type is set in the config, use this + if ((entry = section.find("Type")) != section.end()) + newmod->Type(entry->second.c_str()); + + if (newmod){ + newmod->setConfig(§ion); + } + + return newmod; +} + + +void SWMgr::AddGlobalOptions(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, ConfigEntMap::iterator end) { + for (;start != end; start++) { + OptionFilterMap::iterator it; + it = optionFilters.find((*start).second); + if (it != optionFilters.end()) { + module->AddOptionFilter((*it).second); // add filter to module and option as a valid option + StringList::iterator loop; + for (loop = options.begin(); loop != options.end(); loop++) { + if (!strcmp((*loop).c_str(), (*it).second->getOptionName())) + break; + } + if (loop == options.end()) // if we have not yet included the option + options.push_back((*it).second->getOptionName()); + } + } + if (filterMgr) + filterMgr->AddGlobalOptions(module, section, start, end); +#ifdef _ICU_ + module->AddOptionFilter(transliterator); +#endif +} + + +char SWMgr::filterText(const char *filterName, SWBuf &text, const SWKey *key, const SWModule *module) + { + char retVal = -1; + for (OptionFilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) { + if ((*it).second->getOptionName()) { + if (!stricmp(filterName, (*it).second->getOptionName())) + retVal = it->second->processText(text, key, module); // add filter to module + } + } + return retVal; +} + + +void SWMgr::AddLocalOptions(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, ConfigEntMap::iterator end) +{ + for (;start != end; start++) { + OptionFilterMap::iterator it; + it = optionFilters.find((*start).second); + if (it != optionFilters.end()) { + module->AddOptionFilter((*it).second); // add filter to module + } + } + + if (filterMgr) + filterMgr->AddLocalOptions(module, section, start, end); +} + + +// manually specified StripFilters for special cases, like Papyri marks and such +void SWMgr::AddStripFilters(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, ConfigEntMap::iterator end) +{ + for (;start != end; start++) { + OptionFilterMap::iterator it; + it = optionFilters.find((*start).second); + if (it != optionFilters.end()) { + module->AddStripFilter((*it).second); // add filter to module + } + } +} + + +void SWMgr::AddRawFilters(SWModule *module, ConfigEntMap §ion) { + SWBuf sourceformat, cipherKey; + ConfigEntMap::iterator entry; + + cipherKey = ((entry = section.find("CipherKey")) != section.end()) ? (*entry).second : (SWBuf)""; + if (cipherKey.length()) { + SWFilter *cipherFilter = new CipherFilter(cipherKey.c_str()); + cipherFilters.insert(FilterMap::value_type(module->Name(), cipherFilter)); + cleanupFilters.push_back(cipherFilter); + module->AddRawFilter(cipherFilter); + } + + if (filterMgr) + filterMgr->AddRawFilters(module, section); +} + + +void SWMgr::AddEncodingFilters(SWModule *module, ConfigEntMap §ion) { + if (filterMgr) + filterMgr->AddEncodingFilters(module, section); +} + + +void SWMgr::AddRenderFilters(SWModule *module, ConfigEntMap §ion) { + SWBuf sourceformat; + ConfigEntMap::iterator entry; + + sourceformat = ((entry = section.find("SourceType")) != section.end()) ? (*entry).second : (SWBuf)""; + + // Temporary: To support old module types + // TODO: Remove at 1.6.0 release? + if (!sourceformat.length()) { + sourceformat = ((entry = section.find("ModDrv")) != section.end()) ? (*entry).second : (SWBuf)""; + if (!stricmp(sourceformat.c_str(), "RawGBF")) + sourceformat = "GBF"; + else sourceformat = ""; + } + +// process module - eg. follows +// if (!stricmp(sourceformat.c_str(), "GBF")) { +// module->AddRenderFilter(gbftortf); +// } + + if (filterMgr) + filterMgr->AddRenderFilters(module, section); + +} + + +void SWMgr::AddStripFilters(SWModule *module, ConfigEntMap §ion) +{ + SWBuf sourceformat; + ConfigEntMap::iterator entry; + + sourceformat = ((entry = section.find("SourceType")) != section.end()) ? (*entry).second : (SWBuf)""; + // Temporary: To support old module types + if (!sourceformat.length()) { + sourceformat = ((entry = section.find("ModDrv")) != section.end()) ? (*entry).second : (SWBuf)""; + if (!stricmp(sourceformat.c_str(), "RawGBF")) + sourceformat = "GBF"; + else sourceformat = ""; + } + + if (!stricmp(sourceformat.c_str(), "GBF")) { + module->AddStripFilter(gbfplain); + } + else if (!stricmp(sourceformat.c_str(), "ThML")) { + module->AddStripFilter(thmlplain); + } + else if (!stricmp(sourceformat.c_str(), "OSIS")) { + module->AddStripFilter(osisplain); + } + else if (!stricmp(sourceformat.c_str(), "TEI")) { + module->AddStripFilter(teiplain); + } + + if (filterMgr) + filterMgr->AddStripFilters(module, section); + +} + + +void SWMgr::CreateMods(bool multiMod) { + SectionMap::iterator it; + ConfigEntMap::iterator start; + ConfigEntMap::iterator end; + ConfigEntMap::iterator entry; + SWModule *newmod; + SWBuf driver, misc1; + for (it = config->Sections.begin(); it != config->Sections.end(); it++) { + ConfigEntMap §ion = (*it).second; + newmod = 0; + + driver = ((entry = section.find("ModDrv")) != section.end()) ? (*entry).second : (SWBuf)""; + if (driver.length()) { + newmod = CreateMod((*it).first, driver, section); + if (newmod) { + // Filters to add for this module and globally announce as an option to the user + // e.g. translit, strongs, redletterwords, etc, so users can turn these on and off globally + start = (*it).second.lower_bound("GlobalOptionFilter"); + end = (*it).second.upper_bound("GlobalOptionFilter"); + AddGlobalOptions(newmod, section, start, end); + + // Only add the option to the module, don't announce it's availability + // These are useful for like: filters that parse special entryAttribs in a text + // or whatever you might want to happen on entry lookup + start = (*it).second.lower_bound("LocalOptionFilter"); + end = (*it).second.upper_bound("LocalOptionFilter"); + AddLocalOptions(newmod, section, start, end); + + //STRIP FILTERS + + // add all basic ones for for the modtype + AddStripFilters(newmod, section); + + // Any special processing for this module when searching: + // e.g. for papyri, removed all [](). notation + start = (*it).second.lower_bound("LocalStripFilter"); + end = (*it).second.upper_bound("LocalStripFilter"); + AddStripFilters(newmod, section, start, end); + + AddRawFilters(newmod, section); + AddRenderFilters(newmod, section); + AddEncodingFilters(newmod, section); + + SWModule *oldmod = Modules[newmod->Name()]; + if (oldmod) { + delete oldmod; + } + + Modules[newmod->Name()] = newmod; + } + } + } +} + + +void SWMgr::DeleteMods() { + + ModMap::iterator it; + + for (it = Modules.begin(); it != Modules.end(); it++) + delete (*it).second; + + Modules.clear(); +} + + +void SWMgr::deleteModule(const char *modName) { + ModMap::iterator it = Modules.find(modName); + if (it != Modules.end()) { + delete (*it).second; + Modules.erase(it); + } +} + + +void SWMgr::InstallScan(const char *dirname) +{ + DIR *dir; + struct dirent *ent; + FileDesc *conffd = 0; + SWBuf newmodfile; + SWBuf targetName; + + if (FileMgr::existsDir(dirname)) { + if ((dir = opendir(dirname))) { + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + newmodfile = dirname; + if ((dirname[strlen(dirname)-1] != '\\') && (dirname[strlen(dirname)-1] != '/')) + newmodfile += "/"; + newmodfile += ent->d_name; + + // mods.d + if (configType) { + if (conffd) + FileMgr::getSystemFileMgr()->close(conffd); + targetName = configPath; + if ((configPath[strlen(configPath)-1] != '\\') && (configPath[strlen(configPath)-1] != '/')) + targetName += "/"; + targetName += ent->d_name; + conffd = FileMgr::getSystemFileMgr()->open(targetName.c_str(), FileMgr::WRONLY|FileMgr::CREAT, FileMgr::IREAD|FileMgr::IWRITE); + } + + // mods.conf + else { + if (!conffd) { + conffd = FileMgr::getSystemFileMgr()->open(config->filename.c_str(), FileMgr::WRONLY|FileMgr::APPEND); + if (conffd > 0) + conffd->seek(0L, SEEK_END); + else { + FileMgr::getSystemFileMgr()->close(conffd); + conffd = 0; + } + } + } + AddModToConfig(conffd, newmodfile.c_str()); + FileMgr::removeFile(newmodfile.c_str()); + } + } + if (conffd) + FileMgr::getSystemFileMgr()->close(conffd); + closedir(dir); + } + } +} + + +char SWMgr::AddModToConfig(FileDesc *conffd, const char *fname) +{ + FileDesc *modfd; + char ch; + + SWLog::getSystemLog()->logTimedInformation("Found new module [%s]. Installing...", fname); + modfd = FileMgr::getSystemFileMgr()->open(fname, FileMgr::RDONLY); + ch = '\n'; + conffd->write(&ch, 1); + while (modfd->read(&ch, 1) == 1) + conffd->write(&ch, 1); + ch = '\n'; + conffd->write(&ch, 1); + FileMgr::getSystemFileMgr()->close(modfd); + return 0; +} + + +void SWMgr::setGlobalOption(const char *option, const char *value) +{ + for (OptionFilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) { + if ((*it).second->getOptionName()) { + if (!stricmp(option, (*it).second->getOptionName())) + (*it).second->setOptionValue(value); + } + } +} + + +const char *SWMgr::getGlobalOption(const char *option) +{ + for (OptionFilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) { + if ((*it).second->getOptionName()) { + if (!stricmp(option, (*it).second->getOptionName())) + return (*it).second->getOptionValue(); + } + } + return 0; +} + + +const char *SWMgr::getGlobalOptionTip(const char *option) +{ + for (OptionFilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) { + if ((*it).second->getOptionName()) { + if (!stricmp(option, (*it).second->getOptionName())) + return (*it).second->getOptionTip(); + } + } + return 0; +} + + +StringList SWMgr::getGlobalOptions() +{ + return options; +} + + +StringList SWMgr::getGlobalOptionValues(const char *option) +{ + StringList options; + for (OptionFilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) { + if ((*it).second->getOptionName()) { + if (!stricmp(option, (*it).second->getOptionName())) { + options = (*it).second->getOptionValues(); + break; // just find the first one. All option filters with the same option name should expect the same values + } + } + } + return options; +} + + +signed char SWMgr::setCipherKey(const char *modName, const char *key) { + FilterMap::iterator it; + ModMap::iterator it2; + + // check for filter that already exists + it = cipherFilters.find(modName); + if (it != cipherFilters.end()) { + ((CipherFilter *)(*it).second)->getCipher()->setCipherKey(key); + return 0; + } + // check if module exists + else { + it2 = Modules.find(modName); + if (it2 != Modules.end()) { + SWFilter *cipherFilter = new CipherFilter(key); + cipherFilters.insert(FilterMap::value_type(modName, cipherFilter)); + cleanupFilters.push_back(cipherFilter); + (*it2).second->AddRawFilter(cipherFilter); + return 0; + } + } + return -1; +} + +SWORD_NAMESPACE_END diff --git a/src/mgr/swsearchable.cpp b/src/mgr/swsearchable.cpp new file mode 100644 index 0000000..48ae556 --- /dev/null +++ b/src/mgr/swsearchable.cpp @@ -0,0 +1,53 @@ +/****************************************************************************** + * swsearchable.h - definition of class SWSearchable used to provide an + * interface for objects that be searched. + * + * $Id: swsearchable.cpp 1959 2006-08-28 00:39:56Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include + +SWORD_NAMESPACE_START + +void SWSearchable::nullPercent(char percent, void *percentUserData) {} + +SWSearchable::SWSearchable() { +} + + +SWSearchable::~SWSearchable() { +} + + // special search framework +signed char SWSearchable::createSearchFramework(void (*percent)(char, void *), void *percentUserData) { + return 0; +} + + +void SWSearchable::deleteSearchFramework() { +} + + +bool SWSearchable::isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope) { + bool retVal = false; + search(istr, searchType, flags, scope, &retVal); + return retVal; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/Makefile b/src/modules/Makefile new file mode 100644 index 0000000..ef8eccd --- /dev/null +++ b/src/modules/Makefile @@ -0,0 +1,5 @@ + +root := ../.. + +all: + make -C ${root} diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am new file mode 100644 index 0000000..944dc18 --- /dev/null +++ b/src/modules/Makefile.am @@ -0,0 +1,10 @@ +modulesdir = $(top_srcdir)/src/modules + +libsword_la_SOURCES += $(modulesdir)/swmodule.cpp + +include ../src/modules/common/Makefile.am +include ../src/modules/filters/Makefile.am +include ../src/modules/genbook/Makefile.am +include ../src/modules/texts/Makefile.am +include ../src/modules/comments/Makefile.am +include ../src/modules/lexdict/Makefile.am diff --git a/src/modules/comments/Makefile b/src/modules/comments/Makefile new file mode 100644 index 0000000..1a2d00d --- /dev/null +++ b/src/modules/comments/Makefile @@ -0,0 +1,5 @@ + +root := ../../.. + +all: + make -C ${root} diff --git a/src/modules/comments/Makefile.am b/src/modules/comments/Makefile.am new file mode 100644 index 0000000..7139cf8 --- /dev/null +++ b/src/modules/comments/Makefile.am @@ -0,0 +1,9 @@ +commentsdir = $(top_srcdir)/src/modules/comments + +libsword_la_SOURCES += $(commentsdir)/swcom.cpp + +include ../src/modules/comments/rawcom/Makefile.am +include ../src/modules/comments/rawcom4/Makefile.am +include ../src/modules/comments/rawfiles/Makefile.am +include ../src/modules/comments/zcom/Makefile.am +include ../src/modules/comments/hrefcom/Makefile.am diff --git a/src/modules/comments/hrefcom/Makefile b/src/modules/comments/hrefcom/Makefile new file mode 100644 index 0000000..35d6648 --- /dev/null +++ b/src/modules/comments/hrefcom/Makefile @@ -0,0 +1,5 @@ + +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/comments/hrefcom/Makefile.am b/src/modules/comments/hrefcom/Makefile.am new file mode 100644 index 0000000..dba4294 --- /dev/null +++ b/src/modules/comments/hrefcom/Makefile.am @@ -0,0 +1,2 @@ +hrefcomdir = $(top_srcdir)/src/modules/comments/hrefcom +libsword_la_SOURCES += $(hrefcomdir)/hrefcom.cpp diff --git a/src/modules/comments/hrefcom/hrefcom.cpp b/src/modules/comments/hrefcom/hrefcom.cpp new file mode 100644 index 0000000..7791da2 --- /dev/null +++ b/src/modules/comments/hrefcom/hrefcom.cpp @@ -0,0 +1,82 @@ +/****************************************************************************** + * hrefcom.cpp - code for class 'HREFCom'- a module that produces HTML HREFs + * pointing to actual text desired. Uses standard + * files: ot and nt using indexs ??.bks ??.cps ??.vss + */ + + +#include +#include +#include + +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + + /****************************************************************************** + * HREFCom Constructor - Initializes data for instance of HREFCom + * + * ENT: iname - Internal name for module + * iprefix - string to prepend to each HREF (e.g. "file://mods/com/jfb/") + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +HREFCom::HREFCom(const char *ipath, const char *iprefix, const char *iname, const char *idesc, SWDisplay *idisp) : RawVerse(ipath), SWCom(iname, idesc, idisp) +{ + prefix = 0; + stdstr(&prefix, iprefix); +} + + +/****************************************************************************** + * HREFCom Destructor - Cleans up instance of HREFCom + */ + +HREFCom::~HREFCom() +{ + if (prefix) + delete [] prefix; +} + + +/****************************************************************************** + * HREFCom::operator char * - Returns the correct verse when char * cast + * is requested + * + * RET: string buffer with verse + */ + +SWBuf &HREFCom::getRawEntryBuf() { + long start; + unsigned short size; + VerseKey *key = 0; + + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + + findOffset(key->Testament(), key->Index(), &start, &size); + entrySize = size; // support getEntrySize call + + SWBuf tmpbuf; + + readText(key->Testament(), start, size, tmpbuf); + entryBuf = prefix; + entryBuf += tmpbuf.c_str(); + prepText(entryBuf); + + if (key != this->key) + delete key; + + return entryBuf; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/comments/rawcom/Makefile b/src/modules/comments/rawcom/Makefile new file mode 100644 index 0000000..35d6648 --- /dev/null +++ b/src/modules/comments/rawcom/Makefile @@ -0,0 +1,5 @@ + +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/comments/rawcom/Makefile.am b/src/modules/comments/rawcom/Makefile.am new file mode 100644 index 0000000..116d706 --- /dev/null +++ b/src/modules/comments/rawcom/Makefile.am @@ -0,0 +1,2 @@ +rawcomdir = $(top_srcdir)/src/modules/comments/rawcom +libsword_la_SOURCES += $(rawcomdir)/rawcom.cpp diff --git a/src/modules/comments/rawcom/rawcom.cpp b/src/modules/comments/rawcom/rawcom.cpp new file mode 100644 index 0000000..fd01c24 --- /dev/null +++ b/src/modules/comments/rawcom/rawcom.cpp @@ -0,0 +1,153 @@ +/****************************************************************************** + * rawcom.cpp - code for class 'RawCom'- a module that reads raw commentary + * files: ot and nt using indexs ??.bks ??.cps ??.vss + */ + + +#include +#include +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + + /****************************************************************************** + * RawCom Constructor - Initializes data for instance of RawCom + * + * ENT: iname - Internal name for module + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +RawCom::RawCom(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding encoding, SWTextDirection dir, SWTextMarkup markup, const char* ilang) + : RawVerse(ipath), + SWCom(iname, idesc, idisp, encoding, dir, markup, ilang){ +} + + +/****************************************************************************** + * RawCom Destructor - Cleans up instance of RawCom + */ + +RawCom::~RawCom() +{ +} + + +bool RawCom::isWritable() { + return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} +/****************************************************************************** + * RawCom::getRawEntry() - Returns the correct verse when char * cast + * is requested + * + * RET: string buffer with verse + */ + +SWBuf &RawCom::getRawEntryBuf() { + long start = 0; + unsigned short size = 0; + VerseKey *key = &getVerseKey(); + + findOffset(key->Testament(), key->Index(), &start, &size); + entrySize = size; // support getEntrySize call + + entryBuf = ""; + readText(key->Testament(), start, size, entryBuf); + + rawFilter(entryBuf, 0); // hack, decipher + rawFilter(entryBuf, key); + +// if (!isUnicode()) + prepText(entryBuf); + + return entryBuf; +} + + +/****************************************************************************** + * RawCom::increment - Increments module key a number of entries + * + * ENT: steps - Number of entries to jump forward + * + * RET: *this + */ + +void RawCom::increment(int steps) { + long start; + unsigned short size; + VerseKey *tmpkey = &getVerseKey(); + + findOffset(tmpkey->Testament(), tmpkey->Index(), &start, &size); + + SWKey lastgood = *tmpkey; + while (steps) { + long laststart = start; + unsigned short lastsize = size; + SWKey lasttry = *tmpkey; + (steps > 0) ? (*key)++ : (*key)--; + tmpkey = &getVerseKey(); + + if ((error = key->Error())) { + *key = lastgood; + break; + } + long index = tmpkey->Index(); + findOffset(tmpkey->Testament(), index, &start, &size); + if ( + (((laststart != start) || (lastsize != size)) // we're a different entry +// && (start > 0) + && (size)) // and we actually have a size + ||(!skipConsecutiveLinks)) { // or we don't want to skip consecutive links + steps += (steps < 0) ? 1 : -1; + lastgood = *tmpkey; + } + } + error = (error) ? KEYERR_OUTOFBOUNDS : 0; +} + + +void RawCom::setEntry(const char *inbuf, long len) { + VerseKey *key = &getVerseKey(); + doSetText(key->Testament(), key->Index(), inbuf, len); +} + + +void RawCom::linkEntry(const SWKey *inkey) { + VerseKey *destkey = &getVerseKey(); + const VerseKey *srckey = 0; + + // see if we have a VerseKey * or decendant + SWTRY { + srckey = SWDYNAMIC_CAST(VerseKey, inkey); + } + SWCATCH ( ... ) {} + // if we don't have a VerseKey * decendant, create our own + if (!srckey) + srckey = new VerseKey(inkey); + + doLinkEntry(destkey->Testament(), destkey->Index(), srckey->Index()); + + if (inkey != srckey) // free our key if we created a VerseKey + delete srckey; +} + + +/****************************************************************************** + * RawCom::deleteEntry - deletes this entry + * + * RET: *this + */ + +void RawCom::deleteEntry() { + + VerseKey *key = &getVerseKey(); + doSetText(key->Testament(), key->Index(), ""); +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/comments/rawcom4/Makefile.am b/src/modules/comments/rawcom4/Makefile.am new file mode 100644 index 0000000..346dbc5 --- /dev/null +++ b/src/modules/comments/rawcom4/Makefile.am @@ -0,0 +1,2 @@ +rawcom4dir = $(top_srcdir)/src/modules/comments/rawcom4 +libsword_la_SOURCES += $(rawcom4dir)/rawcom4.cpp diff --git a/src/modules/comments/rawcom4/rawcom4.cpp b/src/modules/comments/rawcom4/rawcom4.cpp new file mode 100644 index 0000000..e59ee39 --- /dev/null +++ b/src/modules/comments/rawcom4/rawcom4.cpp @@ -0,0 +1,153 @@ +/****************************************************************************** + * rawcom4.cpp - code for class 'RawCom4'- a module that reads raw commentary + * files: ot and nt using indexs ??.bks ??.cps ??.vss + */ + + +#include +#include +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + + /****************************************************************************** + * RawCom4 Constructor - Initializes data for instance of RawCom4 + * + * ENT: iname - Internal name for module + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +RawCom4::RawCom4(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding encoding, SWTextDirection dir, SWTextMarkup markup, const char* ilang) + : RawVerse4(ipath), + SWCom(iname, idesc, idisp, encoding, dir, markup, ilang){ +} + + +/****************************************************************************** + * RawCom4 Destructor - Cleans up instance of RawCom4 + */ + +RawCom4::~RawCom4() +{ +} + + +bool RawCom4::isWritable() { + return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} +/****************************************************************************** + * RawCom4::getRawEntry() - Returns the correct verse when char * cast + * is requested + * + * RET: string buffer with verse + */ + +SWBuf &RawCom4::getRawEntryBuf() { + long start = 0; + unsigned long size = 0; + VerseKey *key = &getVerseKey(); + + findOffset(key->Testament(), key->Index(), &start, &size); + entrySize = size; // support getEntrySize call + + entryBuf = ""; + readText(key->Testament(), start, size, entryBuf); + + rawFilter(entryBuf, 0); // hack, decipher + rawFilter(entryBuf, key); + +// if (!isUnicode()) + prepText(entryBuf); + + return entryBuf; +} + + +/****************************************************************************** + * RawCom4::increment - Increments module key a number of entries + * + * ENT: steps - Number of entries to jump forward + * + * RET: *this + */ + +void RawCom4::increment(int steps) { + long start; + unsigned long size; + VerseKey *tmpkey = &getVerseKey(); + + findOffset(tmpkey->Testament(), tmpkey->Index(), &start, &size); + + SWKey lastgood = *tmpkey; + while (steps) { + long laststart = start; + unsigned long lastsize = size; + SWKey lasttry = *tmpkey; + (steps > 0) ? (*key)++ : (*key)--; + tmpkey = &getVerseKey(); + + if ((error = key->Error())) { + *key = lastgood; + break; + } + long index = tmpkey->Index(); + findOffset(tmpkey->Testament(), index, &start, &size); + if ( + (((laststart != start) || (lastsize != size)) // we're a different entry +// && (start > 0) + && (size)) // and we actually have a size + ||(!skipConsecutiveLinks)) { // or we don't want to skip consecutive links + steps += (steps < 0) ? 1 : -1; + lastgood = *tmpkey; + } + } + error = (error) ? KEYERR_OUTOFBOUNDS : 0; +} + + +void RawCom4::setEntry(const char *inbuf, long len) { + VerseKey *key = &getVerseKey(); + doSetText(key->Testament(), key->Index(), inbuf, len); +} + + +void RawCom4::linkEntry(const SWKey *inkey) { + VerseKey *destkey = &getVerseKey(); + const VerseKey *srckey = 0; + + // see if we have a VerseKey * or decendant + SWTRY { + srckey = SWDYNAMIC_CAST(VerseKey, inkey); + } + SWCATCH ( ... ) {} + // if we don't have a VerseKey * decendant, create our own + if (!srckey) + srckey = new VerseKey(inkey); + + doLinkEntry(destkey->Testament(), destkey->Index(), srckey->Index()); + + if (inkey != srckey) // free our key if we created a VerseKey + delete srckey; +} + + +/****************************************************************************** + * RawCom4::deleteEntry - deletes this entry + * + * RET: *this + */ + +void RawCom4::deleteEntry() { + + VerseKey *key = &getVerseKey(); + doSetText(key->Testament(), key->Index(), ""); +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/comments/rawfiles/Makefile b/src/modules/comments/rawfiles/Makefile new file mode 100644 index 0000000..35d6648 --- /dev/null +++ b/src/modules/comments/rawfiles/Makefile @@ -0,0 +1,5 @@ + +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/comments/rawfiles/Makefile.am b/src/modules/comments/rawfiles/Makefile.am new file mode 100644 index 0000000..a9b7dbe --- /dev/null +++ b/src/modules/comments/rawfiles/Makefile.am @@ -0,0 +1,2 @@ +rawfilesdir = $(top_srcdir)/src/modules/comments/rawfiles +libsword_la_SOURCES += $(rawfilesdir)/rawfiles.cpp diff --git a/src/modules/comments/rawfiles/rawfiles.cpp b/src/modules/comments/rawfiles/rawfiles.cpp new file mode 100644 index 0000000..3b614d9 --- /dev/null +++ b/src/modules/comments/rawfiles/rawfiles.cpp @@ -0,0 +1,257 @@ +/****************************************************************************** + * rawfiles.cpp - code for class 'RawFiles'- a module that produces HTML HREFs + * pointing to actual text desired. Uses standard + * files: ot and nt using indexs ??.bks ??.cps ??.vss + */ + + +#include +#include +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + + /****************************************************************************** + * RawFiles Constructor - Initializes data for instance of RawFiles + * + * ENT: iname - Internal name for module + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +RawFiles::RawFiles(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : RawVerse(ipath, FileMgr::RDWR), SWCom(iname, idesc, idisp, enc, dir, mark, ilang) +{ +} + + +/****************************************************************************** + * RawFiles Destructor - Cleans up instance of RawFiles + */ + +RawFiles::~RawFiles() +{ +} + + +/** Is the module writable? :) +* @return yes or no +*/ +bool RawFiles::isWritable() { + return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} + + +/****************************************************************************** + * RawFiles::getRawEntry - Returns the correct verse when char * cast + * is requested + * + * RET: string buffer with verse + */ + +SWBuf &RawFiles::getRawEntryBuf() { + FileDesc *datafile; + long start = 0; + unsigned short size = 0; + VerseKey *key = 0; + + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + + findOffset(key->Testament(), key->Index(), &start, &size); + + entryBuf = ""; + if (size) { + SWBuf tmpbuf = path; + tmpbuf += '/'; + readText(key->Testament(), start, size, entryBuf); + tmpbuf += entryBuf; + entryBuf = ""; + datafile = FileMgr::getSystemFileMgr()->open(tmpbuf.c_str(), FileMgr::RDONLY); + if (datafile->getFd() > 0) { + size = datafile->seek(0, SEEK_END); + char *tmpBuf = new char [ size + 1 ]; + memset(tmpBuf, 0, size + 1); + datafile->seek(0, SEEK_SET); + datafile->read(tmpBuf, size); + entryBuf = tmpBuf; + delete [] tmpBuf; +// preptext(entrybuf); + } + FileMgr::getSystemFileMgr()->close(datafile); + } + + if (key != this->key) + delete key; + + return entryBuf; +} + + +/****************************************************************************** + * RawFiles::setEntry(char *)- Update the modules current key entry with + * provided text + */ + +void RawFiles::setEntry(const char *inbuf, long len) { + FileDesc *datafile; + long start; + unsigned short size; + VerseKey *key = 0; + + len = (len<0)?strlen(inbuf):len; + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + + findOffset(key->Testament(), key->Index(), &start, &size); + + if (size) { + SWBuf tmpbuf; + entryBuf = path; + entryBuf += '/'; + readText(key->Testament(), start, size, tmpbuf); + entryBuf += tmpbuf; + } + else { + SWBuf tmpbuf; + entryBuf = path; + entryBuf += '/'; + tmpbuf = getNextFilename(); + doSetText(key->Testament(), key->Index(), tmpbuf); + entryBuf += tmpbuf; + } + datafile = FileMgr::getSystemFileMgr()->open(entryBuf, FileMgr::CREAT|FileMgr::WRONLY|FileMgr::TRUNC); + if (datafile->getFd() > 0) { + datafile->write(inbuf, len); + } + FileMgr::getSystemFileMgr()->close(datafile); + + if (key != this->key) + delete key; +} + + +/****************************************************************************** + * RawFiles::linkEntry(SWKey *)- Link the modules current key entry with + * another module entry + * + * RET: *this + */ + +void RawFiles::linkEntry(const SWKey *inkey) { + + long start; + unsigned short size; + const VerseKey *key = 0; + + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, inkey); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + + findOffset(key->Testament(), key->Index(), &start, &size); + + if (size) { + SWBuf tmpbuf; + readText(key->Testament(), start, size + 2, tmpbuf); + + if (key != inkey) + delete key; + key = 0; + + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, inkey); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + doSetText(key->Testament(), key->Index(), tmpbuf.c_str()); + } + + if (key != inkey) + delete key; +} + + +/****************************************************************************** + * RawFiles::deleteEntry - deletes this entry + * + * RET: *this + */ + +void RawFiles::deleteEntry() { + + VerseKey *key = 0; + + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + + doSetText(key->Testament(), key->Index(), ""); + + if (key != this->key) + delete key; +} + + +/****************************************************************************** + * RawFiles::getNextfilename - generates a valid filename in which to store + * an entry + * + * RET: filename + */ + +char *RawFiles::getNextFilename() { + static char incfile[255]; + long number; + FileDesc *datafile; + + sprintf(incfile, "%s/incfile", path); + datafile = FileMgr::getSystemFileMgr()->open(incfile, FileMgr::RDONLY); + if (datafile->read(&number, 4) != 4) + number = 0; + number++; + FileMgr::getSystemFileMgr()->close(datafile); + + datafile = FileMgr::getSystemFileMgr()->open(incfile, FileMgr::CREAT|FileMgr::WRONLY|FileMgr::TRUNC); + datafile->write(&number, 4); + FileMgr::getSystemFileMgr()->close(datafile); + sprintf(incfile, "%.7ld", number-1); + return incfile; +} + + +char RawFiles::createModule (const char *path) { + char *incfile = new char [ strlen (path) + 16 ]; + static long zero = 0; + FileDesc *datafile; + + sprintf(incfile, "%s/incfile", path); + datafile = FileMgr::getSystemFileMgr()->open(incfile, FileMgr::CREAT|FileMgr::WRONLY|FileMgr::TRUNC); + delete [] incfile; + datafile->write(&zero, 4); + FileMgr::getSystemFileMgr()->close(datafile); + + return RawVerse::createModule (path); +} + + + +SWORD_NAMESPACE_END diff --git a/src/modules/comments/swcom.cpp b/src/modules/comments/swcom.cpp new file mode 100644 index 0000000..94f92c9 --- /dev/null +++ b/src/modules/comments/swcom.cpp @@ -0,0 +1,105 @@ +/****************************************************************************** + * swcom.cpp - code for base class 'SWCom'- The basis for all commentary + * modules + */ + +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * SWCom Constructor - Initializes data for instance of SWCom + * + * ENT: imodname - Internal name for module + * imoddesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +SWCom::SWCom(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang): SWModule(imodname, imoddesc, idisp, (char *)"Commentaries", enc, dir, mark, ilang) { + delete key; + key = CreateKey(); + tmpVK = new VerseKey(); +} + + +/****************************************************************************** + * SWCom Destructor - Cleans up instance of SWCom + */ + +SWCom::~SWCom() { + delete tmpVK; +} + + +SWKey *SWCom::CreateKey() { return new VerseKey(); } + + +long SWCom::Index() const { + VerseKey *key = 0; + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + + entryIndex = key->NewIndex(); + + if (key != this->key) + delete key; + + return entryIndex; +} + +long SWCom::Index(long iindex) { + VerseKey *key = 0; + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + + key->Testament(1); + key->Index(iindex); + + if (key != this->key) { + this->key->copyFrom(*key); + delete key; + } + + return Index(); +} + + +VerseKey &SWCom::getVerseKey() const { + VerseKey *key = NULL; + // see if we have a VerseKey * or decendant + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) { } + if (!key) { + ListKey *lkTest = 0; + SWTRY { + lkTest = SWDYNAMIC_CAST(ListKey, this->key); + } + SWCATCH ( ... ) { } + if (lkTest) { + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, lkTest->GetElement()); + } + SWCATCH ( ... ) { } + } + } + if (!key) { + tmpVK->setLocale(LocaleMgr::getSystemLocaleMgr()->getDefaultLocaleName()); + (*tmpVK) = *(this->key); + return (*tmpVK); + } + else return *key; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/comments/zcom/Makefile b/src/modules/comments/zcom/Makefile new file mode 100644 index 0000000..35d6648 --- /dev/null +++ b/src/modules/comments/zcom/Makefile @@ -0,0 +1,5 @@ + +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/comments/zcom/Makefile.am b/src/modules/comments/zcom/Makefile.am new file mode 100644 index 0000000..f22700c --- /dev/null +++ b/src/modules/comments/zcom/Makefile.am @@ -0,0 +1,2 @@ +zcomdir = $(top_srcdir)/src/modules/comments/zcom +libsword_la_SOURCES += $(zcomdir)/zcom.cpp diff --git a/src/modules/comments/zcom/zcom.cpp b/src/modules/comments/zcom/zcom.cpp new file mode 100644 index 0000000..cdaea02 --- /dev/null +++ b/src/modules/comments/zcom/zcom.cpp @@ -0,0 +1,188 @@ +/****************************************************************************** + * rawcom.cpp - code for class 'zCom'- a module that reads raw commentary + * files: ot and nt using indexs ??.bks ??.cps ??.vss + */ + + +#include +#include +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * zCom Constructor - Initializes data for instance of zCom + * + * ENT: ipath - path to data files + * iname - Internal name for module + * idesc - Name to display to user for module + * iblockType - verse, chapter, book, etc. of index chunks + * icomp - Compressor object + * idisp - Display object to use for displaying + */ + +zCom::zCom(const char *ipath, const char *iname, const char *idesc, int iblockType, SWCompress *icomp, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : zVerse(ipath, -1, iblockType, icomp), SWCom(iname, idesc, idisp, enc, dir, mark, ilang)/*, SWCompress()*/ +{ + blockType = iblockType; + lastWriteKey = 0; +} + +/****************************************************************************** + * zCom Destructor - Cleans up instance of zCom + */ + +zCom::~zCom() { + flushCache(); + + if (lastWriteKey) + delete lastWriteKey; +} + + +bool zCom::isWritable() { + return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} + + +/****************************************************************************** + * zCom::getRawEntry - Returns the correct verse when char * cast + * is requested + * + * RET: string buffer with verse + */ +SWBuf &zCom::getRawEntryBuf() { + long start = 0; + unsigned short size = 0; + VerseKey *key = &getVerseKey(); + + findOffset(key->Testament(), key->Index(), &start, &size); + entrySize = size; // support getEntrySize call + + entryBuf = ""; + zReadText(key->Testament(), start, size, entryBuf); + + rawFilter(entryBuf, key); + +// if (!isUnicode()) + prepText(entryBuf); + + return entryBuf; +} + + +bool zCom::sameBlock(VerseKey *k1, VerseKey *k2) { + if (k1->Testament() != k2->Testament()) + return false; + + switch (blockType) { + case VERSEBLOCKS: + if (k1->Verse() != k2->Verse()) + return false; + case CHAPTERBLOCKS: + if (k1->Chapter() != k2->Chapter()) + return false; + case BOOKBLOCKS: + if (k1->Book() != k2->Book()) + return false; + } + return true; +} + +void zCom::setEntry(const char *inbuf, long len) { + VerseKey *key = &getVerseKey(); + + // see if we've jumped across blocks since last write + if (lastWriteKey) { + if (!sameBlock(lastWriteKey, key)) { + flushCache(); + } + delete lastWriteKey; + } + + doSetText(key->Testament(), key->Index(), inbuf, len); + + lastWriteKey = (VerseKey *)key->clone(); // must delete +} + + +void zCom::linkEntry(const SWKey *inkey) { + VerseKey *destkey = &getVerseKey(); + const VerseKey *srckey = 0; + + // see if we have a VerseKey * or decendant + SWTRY { + srckey = (const VerseKey *) SWDYNAMIC_CAST(VerseKey, inkey); + } + SWCATCH ( ... ) { + } + // if we don't have a VerseKey * decendant, create our own + if (!srckey) + srckey = new VerseKey(inkey); + + doLinkEntry(destkey->Testament(), destkey->Index(), srckey->Index()); + + if (inkey != srckey) // free our key if we created a VerseKey + delete srckey; +} + +/****************************************************************************** + * zCom::deleteEntry - deletes this entry + * + * RET: *this + */ + +void zCom::deleteEntry() { + + VerseKey *key = &getVerseKey(); + doSetText(key->Testament(), key->Index(), ""); +} + + +/****************************************************************************** + * zCom::increment - Increments module key a number of entries + * + * ENT: increment - Number of entries to jump forward + * + * RET: *this + */ + +void zCom::increment(int steps) { + long start; + unsigned short size; + VerseKey *tmpkey = &getVerseKey(); + + findOffset(tmpkey->Testament(), tmpkey->Index(), &start, &size); + + SWKey lastgood = *tmpkey; + while (steps) { + long laststart = start; + unsigned short lastsize = size; + SWKey lasttry = *tmpkey; + (steps > 0) ? (*key)++ : (*key)--; + tmpkey = &getVerseKey(); + + if ((error = key->Error())) { + *key = lastgood; + break; + } + long index = tmpkey->Index(); + findOffset(tmpkey->Testament(), index, &start, &size); + if ( + (((laststart != start) || (lastsize != size)) // we're a different entry +// && (start > 0) + && (size)) // and we actually have a size + ||(!skipConsecutiveLinks)) { // or we don't want to skip consecutive links + steps += (steps < 0) ? 1 : -1; + lastgood = *tmpkey; + } + } + error = (error) ? KEYERR_OUTOFBOUNDS : 0; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/common/Makefile b/src/modules/common/Makefile new file mode 100644 index 0000000..81f7721 --- /dev/null +++ b/src/modules/common/Makefile @@ -0,0 +1,4 @@ +root := ../../.. + +all: + make -C ${root} diff --git a/src/modules/common/Makefile.am b/src/modules/common/Makefile.am new file mode 100644 index 0000000..e688094 --- /dev/null +++ b/src/modules/common/Makefile.am @@ -0,0 +1,21 @@ +commondir = $(top_srcdir)/src/modules/common + +libsword_la_SOURCES += $(commondir)/rawstr.cpp +libsword_la_SOURCES += $(commondir)/rawstr4.cpp +libsword_la_SOURCES += $(commondir)/swcomprs.cpp +libsword_la_SOURCES += $(commondir)/lzsscomprs.cpp + +if ZLIB +SWZLIB = $(commondir)/zipcomprs.cpp +else +SWZLIB = +endif +libsword_la_SOURCES += $(SWZLIB) +libsword_la_SOURCES += $(commondir)/rawverse.cpp +libsword_la_SOURCES += $(commondir)/rawverse4.cpp +libsword_la_SOURCES += $(commondir)/swcipher.cpp +libsword_la_SOURCES += $(commondir)/zverse.cpp +libsword_la_SOURCES += $(commondir)/zstr.cpp +libsword_la_SOURCES += $(commondir)/entriesblk.cpp +libsword_la_SOURCES += $(commondir)/sapphire.cpp + diff --git a/src/modules/common/compress.cpp.txt b/src/modules/common/compress.cpp.txt new file mode 100644 index 0000000..5031adb --- /dev/null +++ b/src/modules/common/compress.cpp.txt @@ -0,0 +1,767 @@ +Compression Info, 10-11-95 +Jeff Wheeler + +Source of Algorithm +------------------- + +The compression algorithms used here are based upon the algorithms developed and published by Haruhiko Okumura in a paper entitled "Data Compression Algorithms of LARC and LHarc." This paper discusses three compression algorithms, LSZZ, LZARI, and LZHUF. LZSS is described as the "first" of these, and is described as providing moderate compression with good speed. LZARI is described as an improved LZSS, a combination of the LZSS algorithm with adaptive arithmetic compression. It is described as being slower than LZSS but with better compression. LZHUF (the basis of the common LHA compression program) was included in the paper, however, a free usage license was not included. + +The following are copies of the statements included at the beginning of each source code listing that was supplied in the working paper. + + LZSS, dated 4/6/89, marked as "Use, distribute and + modify this program freely." + + LZARI, dated 4/7/89, marked as "Use, distribute and + modify this program freely." + + LZHUF, dated 11/20/88, written by Haruyasu Yoshizaki, + translated by Haruhiko Okumura on 4/7/89. Not + expressly marked as redistributable or modifiable. + +Since both LZSS and LZARI are marked as "use, distribute and modify freely" we have felt at liberty basing our compression algorithm on either of these. + +Selection of Algorithm +---------------------- + +Working samples of three possible compression algorithms are supplied in Okumura's paper. Which should be used? + +LZSS is the fastest at decompression, but does not generated as small a compressed file as the other methods. The other two methods provided, perhaps, a 15% improvement in compression. Or, put another way, on a 100K file, LZSS might compress it to 50K while the others might approach 40-45K. For STEP purposes, it was decided that decoding speed was of more importance than tighter compression. For these reasons, the first compression algorithm implemented is the LZSS algorithm. + +About LZSS Encoding +------------------- + +(adapted from Haruhiko Okumura's paper) + +This scheme was proposed by Ziv and Lempel [1]. A slightly modified version is described by Storer and Szymanski [2]. An implementation using a binary tree has been proposed by Bell [3]. + +The algorithm is quite simple. +1. Keep a ring buffer which initially contains all space characters. +2. Read several letters from the file to the buffer. +3. Search the buffer for the longest string that matches the letters just read, and send its length and position into the buffer. + +If the ring buffer is 4096 bytes, the position can be stored in 12 bits. If the length is represented in 4 bits, the pair is two bytes long. If the longest match is no more than two characters, then just one character is sent without encoding. The process starts again with the next character. An extra bit is sent each time to tell the decoder whether the next item is a character of a pair. + +[1] J. Ziv and A. Lempel, IEEE Transactions IT-23, 337-343 (1977). +[2] J. A. Storer and T. G. Szymanski, J. ACM, 29, 928-951 (1982). +[3] T.C. Gell, IEEE Transactions COM-34, 1176-1182 (1986). + +void InitTree( // no return value + void); // no parameters + +void InsertNode( // no return value + short int Pos); // position in the buffer + +void DeleteNode( // no return value + short int Node); // node to be removed + +void Encode( // no return value + void); // no parameters + +void Decode( // no return value + void); // no parameters + +// The following are constant sizes used by the compression algorithm. +// +// N - This is the size of the ring buffer. It is set +// to 4K. It is important to note that a position +// within the ring buffer requires 12 bits. +// +// F - This is the maximum length of a character sequence +// that can be taken from the ring buffer. It is set +// to 18. Note that a length must be 3 before it is +// worthwhile to store a position/length pair, so the +// length can be encoded in only 4 bits. Or, put yet +// another way, it is not necessary to encode a length +// of 0-18, it is necessary to encode a length of +// 3-18, which requires 4 bits. +// +// THRESHOLD - It takes 2 bytes to store an offset and +// a length. If a character sequence only +// requires 1 or 2 characters to store +// uncompressed, then it is better to store +// it uncompressed than as an offset into +// the ring buffer. +// +// Note that the 12 bits used to store the position and the 4 bits +// used to store the length equal a total of 16 bits, or 2 bytes. + +#define N 4096 +#define F 18 +#define THRESHOLD 3 +#define NOT_USED N + +// m_ring_buffer is a text buffer. It contains "nodes" of +// uncompressed text that can be indexed by position. That is, +// a substring of the ring buffer can be indexed by a position +// and a length. When decoding, the compressed text may contain +// a position in the ring buffer and a count of the number of +// bytes from the ring buffer that are to be moved into the +// uncompressed buffer. +// +// This ring buffer is not maintained as part of the compressed +// text. Instead, it is reconstructed dynamically. That is, +// it starts out empty and gets built as the text is decompressed. +// +// The ring buffer contain N bytes, with an additional F - 1 bytes +// to facilitate string comparison. + +unsigned char m_ring_buffer[N + F - 1]; + +// m_match_position and m_match_length are set by InsertNode(). +// +// These variables indicate the position in the ring buffer +// and the number of characters at that position that match +// a given string. + +short int m_match_position; +short int m_match_length; + +// m_lson, m_rson, and m_dad are the Japanese way of referring to +// a tree structure. The dad is the parent and it has a right and +// left son (child). +// +// For i = 0 to N-1, m_rson[i] and m_lson[i] will be the right +// and left children of node i. +// +// For i = 0 to N-1, m_dad[i] is the parent of node i. +// +// For i = 0 to 255, rson[N + i + 1] is the root of the tree for +// strings that begin with the character i. Note that this requires +// one byte characters. +// +// These nodes store values of 0...(N-1). Memory requirements +// can be reduces by using 2-byte integers instead of full 4-byte +// integers (for 32-bit applications). Therefore, these are +// defined as "short ints." + +short int m_lson[N + 1]; +short int m_rson[N + 257]; +short int m_dad[N + 1]; + +/* + ------------------------------------------------------------------------- + cLZSS::InitTree + + This function initializes the tree nodes to "empty" states. + ------------------------------------------------------------------------- +*/ + +void cLZSS::InitTree( // no return value + void) // no parameters + throw() // exception list + + { + int i; + + // For i = 0 to N - 1, m_rson[i] and m_lson[i] will be the right + // and left children of node i. These nodes need not be + // initialized. However, for debugging purposes, it is nice to + // have them initialized. Since this is only used for compression + // (not decompression), I don't mind spending the time to do it. + // + // For the same range of i, m_dad[i] is the parent of node i. + // These are initialized to a known value that can represent + // a "not used" state. + + for (i = 0; i < N; i++) + { + m_lson[i] = NOT_USED; + m_rson[i] = NOT_USED; + m_dad[i] = NOT_USED; + } + + // For i = 0 to 255, m_rson[N + i + 1] is the root of the tree + // for strings that begin with the character i. This is why + // the right child array is larger than the left child array. + // These are also initialzied to a "not used" state. + // + // Note that there are 256 of these, one for each of the possible + // 256 characters. + + for (i = N + 1; i <= (N + 256); i++) + { + m_rson[i] = NOT_USED; + } + + // Done. + } + +/* + ------------------------------------------------------------------------- + cLZSS::InsertNode + + This function inserts a string from the ring buffer into one of + the trees. It loads the match position and length member variables + for the longest match. + + The string to be inserted is identified by the parameter Pos, + A full F bytes are inserted. So, m_ring_buffer[Pos ... Pos+F-1] + are inserted. + + If the matched length is exactly F, then an old node is removed + in favor of the new one (because the old one will be deleted + sooner). + + Note that Pos plays a dual role. It is used as both a position + in the ring buffer and also as a tree node. m_ring_buffer[Pos] + defines a character that is used to identify a tree node. + ------------------------------------------------------------------------- +*/ + +void cLZSS::InsertNode( // no return value + short int Pos) // position in the buffer + throw() // exception list + + { + short int i; + short int p; + int cmp; + unsigned char * key; + + ASSERT(Pos >= 0); + ASSERT(Pos < N); + + cmp = 1; + key = &(m_ring_buffer[Pos]); + + // The last 256 entries in m_rson contain the root nodes for + // strings that begin with a letter. Get an index for the + // first letter in this string. + + p = (short int) (N + 1 + key[0]); + + // Set the left and right tree nodes for this position to "not + // used." + + m_lson[Pos] = NOT_USED; + m_rson[Pos] = NOT_USED; + + // Haven't matched anything yet. + + m_match_length = 0; + + for ( ; ; ) + { + if (cmp >= 0) + { + if (m_rson[p] != NOT_USED) + { + p = m_rson[p]; + } + else + { + m_rson[p] = Pos; + m_dad[Pos] = p; + return; + } + } + else + { + if (m_lson[p] != NOT_USED) + { + p = m_lson[p]; + } + else + { + m_lson[p] = Pos; + m_dad[Pos] = p; + return; + } + } + + // Should we go to the right or the left to look for the + // next match? + + for (i = 1; i < F; i++) + { + cmp = key[i] - m_ring_buffer[p + i]; + if (cmp != 0) + break; + } + + if (i > m_match_length) + { + m_match_position = p; + m_match_length = i; + + if (i >= F) + break; + } + } + + m_dad[Pos] = m_dad[p]; + m_lson[Pos] = m_lson[p]; + m_rson[Pos] = m_rson[p]; + + m_dad[ m_lson[p] ] = Pos; + m_dad[ m_rson[p] ] = Pos; + + if (m_rson[ m_dad[p] ] == p) + { + m_rson[ m_dad[p] ] = Pos; + } + else + { + m_lson[ m_dad[p] ] = Pos; + } + + // Remove "p" + + m_dad[p] = NOT_USED; + } + +/* + ------------------------------------------------------------------------- + cLZSS::DeleteNode + + This function removes the node "Node" from the tree. + ------------------------------------------------------------------------- +*/ + +void cLZSS::DeleteNode( // no return value + short int Node) // node to be removed + throw() // exception list + + { + short int q; + + ASSERT(Node >= 0); + ASSERT(Node < (N+1)); + + if (m_dad[Node] == NOT_USED) + { + // not in tree, nothing to do + return; + } + + if (m_rson[Node] == NOT_USED) + { + q = m_lson[Node]; + } + else if (m_lson[Node] == NOT_USED) + { + q = m_rson[Node]; + } + else + { + q = m_lson[Node]; + if (m_rson[q] != NOT_USED) + { + do + { + q = m_rson[q]; + } + while (m_rson[q] != NOT_USED); + + m_rson[ m_dad[q] ] = m_lson[q]; + m_dad[ m_lson[q] ] = m_dad[q]; + m_lson[q] = m_lson[Node]; + m_dad[ m_lson[Node] ] = q; + } + + m_rson[q] = m_rson[Node]; + m_dad[ m_rson[Node] ] = q; + } + + m_dad[q] = m_dad[Node]; + + if (m_rson[ m_dad[Node] ] == Node) + { + m_rson[ m_dad[Node] ] = q; + } + else + { + m_lson[ m_dad[Node] ] = q; + } + + m_dad[Node] = NOT_USED; + } + +/* + ------------------------------------------------------------------------- + cLZSS::Encode + + This function "encodes" the input stream into the output stream. + The GetChars() and SendChars() functions are used to separate + this method from the actual i/o. + ------------------------------------------------------------------------- +*/ + +void cLZSS::Encode( // no return value + void) // no parameters + + { + short int i; // an iterator + short int r; // node number in the binary tree + short int s; // position in the ring buffer + unsigned short int len; // len of initial string + short int last_match_length; // length of last match + short int code_buf_pos; // position in the output buffer + unsigned char code_buf[17]; // the output buffer + unsigned char mask; // bit mask for byte 0 of out buf + unsigned char c; // character read from string + + // Start with a clean tree. + + InitTree(); + + // code_buf[0] works as eight flags. A "1" represents that the + // unit is an unencoded letter (1 byte), and a "0" represents + // that the next unit is a pair (2 bytes). + // + // code_buf[1..16] stores eight units of code. Since the best + // we can do is store eight pairs, at most 16 + // bytes are needed to store this. + // + // This is why the maximum size of the code buffer is 17 bytes. + + code_buf[0] = 0; + code_buf_pos = 1; + + // Mask iterates over the 8 bits in the code buffer. The first + // character ends up being stored in the low bit. + // + // bit 8 7 6 5 4 3 2 1 + // | | + // | first sequence in code buffer + // | + // last sequence in code buffer + + mask = 1; + + s = 0; + r = (short int) N - (short int) F; + + // Initialize the ring buffer with spaces... + + // Note that the last F bytes of the ring buffer are not filled. + // This is because those F bytes will be filled in immediately + // with bytes from the input stream. + + memset(m_ring_buffer, ' ', N - F); + + // Read F bytes into the last F bytes of the ring buffer. + // + // This function loads the buffer with X characters and returns + // the actual amount loaded. + + len = GetChars(&(m_ring_buffer[r]), F); + + // Make sure there is something to be compressed. + + if (len == 0) + return; + + // Insert the F strings, each of which begins with one or more + // 'space' characters. Note the order in which these strings + // are inserted. This way, degenerate trees will be less likely + // to occur. + + for (i = 1; i <= F; i++) + { + InsertNode((short int) (r - i)); + } + + // Finally, insert the whole string just read. The + // member variables match_length and match_position are set. + + InsertNode(r); + + // Now that we're preloaded, continue till done. + + do + { + + // m_match_length may be spuriously long near the end of + // text. + + if (m_match_length > len) + { + m_match_length = len; + } + + // Is it cheaper to store this as a single character? If so, + // make it so. + + if (m_match_length < THRESHOLD) + { + // Send one character. Remember that code_buf[0] is the + // set of flags for the next eight items. + + m_match_length = 1; + code_buf[0] |= mask; + code_buf[code_buf_pos++] = m_ring_buffer[r]; + } + + // Otherwise, we do indeed have a string that can be stored + // compressed to save space. + + else + { + // The next 16 bits need to contain the position (12 bits) + // and the length (4 bits). + + code_buf[code_buf_pos++] = (unsigned char) m_match_position; + code_buf[code_buf_pos++] = (unsigned char) ( + ((m_match_position >> 4) & 0xf0) | + (m_match_length - THRESHOLD) ); + } + + // Shift the mask one bit to the left so that it will be ready + // to store the new bit. + + mask = (unsigned char) (mask << 1); + + // If the mask is now 0, then we know that we have a full set + // of flags and items in the code buffer. These need to be + // output. + + if (mask == 0) + { + // code_buf is the buffer of characters to be output. + // code_buf_pos is the number of characters it contains. + + SendChars(code_buf, code_buf_pos); + + // Reset for next buffer... + + code_buf[0] = 0; + code_buf_pos = 1; + mask = 1; + } + + last_match_length = m_match_length; + + // Delete old strings and read new bytes... + + for (i = 0; i < last_match_length; i++) + { + + // Get next character... + + if (GetChars(&c, 1) != 1) + break; + + // Delete "old strings" + + DeleteNode(s); + + // Put this character into the ring buffer. + // + // The original comment here says "If the position is near + // the end of the buffer, extend the buffer to make + // string comparison easier." + // + // That's a little misleading, because the "end" of the + // buffer is really what we consider to be the "beginning" + // of the buffer, that is, positions 0 through F. + // + // The idea is that the front end of the buffer is duplicated + // into the back end so that when you're looking at characters + // at the back end of the buffer, you can index ahead (beyond + // the normal end of the buffer) and see the characters + // that are at the front end of the buffer wihtout having + // to adjust the index. + // + // That is... + // + // 1234xxxxxxxxxxxxxxxxxxxxxxxxxxxxx1234 + // | | | + // position 0 end of buffer | + // | + // duplicate of front of buffer + + m_ring_buffer[s] = c; + + if (s < F - 1) + { + m_ring_buffer[s + N] = c; + } + + // Increment the position, and wrap around when we're at + // the end. Note that this relies on N being a power of 2. + + s = (short int) ( (s + 1) & (N - 1) ); + r = (short int) ( (r + 1) & (N - 1) ); + + // Register the string that is found in + // m_ring_buffer[r..r+F-1]. + + InsertNode(r); + } + + // If we didn't quit because we hit the last_match_length, + // then we must have quit because we ran out of characters + // to process. + + while (i++ < last_match_length) + { + DeleteNode(s); + + s = (short int) ( (s + 1) & (N - 1) ); + r = (short int) ( (r + 1) & (N - 1) ); + + // Note that len hitting 0 is the key that causes the + // do...while() to terminate. This is the only place + // within the loop that len is modified. + // + // Its original value is F (or a number less than F for + // short strings). + + if (--len) + { + InsertNode(r); /* buffer may not be empty. */ + } + } + + // End of do...while() loop. Continue processing until there + // are no more characters to be compressed. The variable + // "len" is used to signal this condition. + } + while (len > 0); + + // There could still be something in the output buffer. Send it + // now. + + if (code_buf_pos > 1) + { + // code_buf is the encoded string to send. + // code_buf_ptr is the number of characters. + + SendChars(code_buf, code_buf_pos); + } + + // Done! + } + +/* + ------------------------------------------------------------------------- + cLZSS::Decode + + This function "decodes" the input stream into the output stream. + The GetChars() and SendChars() functions are used to separate + this method from the actual i/o. + ------------------------------------------------------------------------- +*/ + +void cLZSS::Decode( // no return value + void) // no parameters + + { + int k; + int r; // node number + unsigned char c[F]; // an array of chars + unsigned char flags; // 8 bits of flags + int flag_count; // which flag we're on + short int pos; // position in the ring buffer + short int len; // number of chars in ring buffer + + // Initialize the ring buffer with a common string. + // + // Note that the last F bytes of the ring buffer are not filled. + + memset(m_ring_buffer, ' ', N - F); + + r = N - F; + + flags = (char) 0; + flag_count = 0; + + for ( ; ; ) + { + + // If there are more bits of interest in this flag, then + // shift that next interesting bit into the 1's position. + // + // If this flag has been exhausted, the next byte must + // be a flag. + + if (flag_count > 0) + { + flags = (unsigned char) (flags >> 1); + flag_count--; + } + else + { + // Next byte must be a flag. + + if (GetChars(&flags, 1) != 1) + break; + + // Set the flag counter. While at first it might appear + // that this should be an 8 since there are 8 bits in the + // flag, it should really be a 7 because the shift must + // be performed 7 times in order to see all 8 bits. + + flag_count = 7; + } + + // If the low order bit of the flag is now set, then we know + // that the next byte is a single, unencoded character. + + if (flags & 1) + { + if (GetChars(c, 1) != 1) + break; + + if (SendChars(c, 1) != 1) + break; + + // Add to buffer, and increment to next spot. Wrap at end. + + m_ring_buffer[r] = c[0]; + r = (short int) ( (r + 1) & (N - 1) ); + } + + // Otherwise, we know that the next two bytes are a + // pair. The position is in 12 bits and + // the length is in 4 bits. + + else + { + // Original code: + // if ((i = getc(infile)) == EOF) + // break; + // if ((j = getc(infile)) == EOF) + // break; + // i |= ((j & 0xf0) << 4); + // j = (j & 0x0f) + THRESHOLD; + // + // I've modified this to only make one input call, and + // have changed the variable names to something more + // obvious. + + if (GetChars(c, 2) != 2) + break; + + // Convert these two characters into the position and + // length. Note that the length is always at least + // THRESHOLD, which is why we're able to get a length + // of 18 out of only 4 bits. + + pos = (short int) ( c[0] | ((c[1] & 0xf0) << 4) ); + + len = (short int) ( (c[1] & 0x0f) + THRESHOLD ); + + // There are now "len" characters at position "pos" in + // the ring buffer that can be pulled out. Note that + // len is never more than F. + + for (k = 0; k < len; k++) + { + c[k] = m_ring_buffer[(pos + k) & (N - 1)]; + + // Add to buffer, and increment to next spot. Wrap at end. + + m_ring_buffer[r] = c[k]; + r = (short int) ( (r + 1) & (N - 1) ); + } + + // Add the "len" characters to the output stream. + + if (SendChars(c, len) != len) + break; + } + } + } + diff --git a/src/modules/common/entriesblk.cpp b/src/modules/common/entriesblk.cpp new file mode 100644 index 0000000..216abd8 --- /dev/null +++ b/src/modules/common/entriesblk.cpp @@ -0,0 +1,172 @@ +#include +#include +#include + +SWORD_NAMESPACE_START + +const int EntriesBlock::METAHEADERSIZE = 4; + // count(4); +const int EntriesBlock::METAENTRYSIZE = 8; + // offset(4); size(4); + +EntriesBlock::EntriesBlock(const char *iBlock, unsigned long size) { + if (size) { + block = (char *)calloc(1, size); + memcpy(block, iBlock, size); + } + else { + block = (char *)calloc(1, sizeof(__u32)); + } +} + + +EntriesBlock::EntriesBlock() { + block = (char *)calloc(1, sizeof(__u32)); +} + + +EntriesBlock::~EntriesBlock() { + free(block); +} + + +void EntriesBlock::setCount(int count) { + __u32 rawCount = archtosword32(count); + memcpy(block, &rawCount, sizeof(__u32)); +} + + +int EntriesBlock::getCount() { + __u32 count = 0; + memcpy(&count, block, sizeof(__u32)); + count = swordtoarch32(count); + return count; +} + + +void EntriesBlock::getMetaEntry(int index, unsigned long *offset, unsigned long *size) { + __u32 rawOffset = 0; + __u32 rawSize = 0; + *offset = 0; + *size = 0; + if (index >= getCount()) // assert index < count + return; + + // first 4 bytes is count, each 6 bytes after is each meta entry + memcpy(&rawOffset, block + METAHEADERSIZE + (index * METAENTRYSIZE), sizeof(rawOffset)); + memcpy(&rawSize, block + METAHEADERSIZE + (index * METAENTRYSIZE) + sizeof(rawOffset), sizeof(rawSize)); + + *offset = (unsigned long)swordtoarch32(rawOffset); + *size = (unsigned long)swordtoarch32(rawSize); +} + + +void EntriesBlock::setMetaEntry(int index, unsigned long offset, unsigned long size) { + __u32 rawOffset = archtosword32(offset); + __u32 rawSize = archtosword32(size); + + if (index >= getCount()) // assert index < count + return; + + // first 4 bytes is count, each 6 bytes after is each meta entry + memcpy(block + METAHEADERSIZE + (index * METAENTRYSIZE), &rawOffset, sizeof(rawOffset)); + memcpy(block + METAHEADERSIZE + (index * METAENTRYSIZE) + sizeof(rawOffset), &rawSize, sizeof(rawSize)); +} + + +const char *EntriesBlock::getRawData(unsigned long *retSize) { + unsigned long max = 4; + int loop; + unsigned long offset; + unsigned long size; + for (loop = 0; loop < getCount(); loop++) { + getMetaEntry(loop, &offset, &size); + max = ((offset + size) > max) ? (offset + size) : max; + } + *retSize = max; + return block; +} + + +int EntriesBlock::addEntry(const char *entry) { + unsigned long dataSize; + getRawData(&dataSize); + unsigned long len = strlen(entry); + unsigned long offset; + unsigned long size; + int count = getCount(); + unsigned long dataStart = METAHEADERSIZE + (count * METAENTRYSIZE); + // new meta entry + new data size + 1 because null + block = (char *)realloc(block, dataSize + METAENTRYSIZE + len + 1); + // shift right to make room for new meta entry + memmove(block + dataStart + METAENTRYSIZE, block + dataStart, dataSize - dataStart); + + for (int loop = 0; loop < count; loop++) { + getMetaEntry(loop, &offset, &size); + if (offset) { // if not a deleted entry + offset += METAENTRYSIZE; + setMetaEntry(loop, offset, size); + } + } + + offset = dataSize; // original dataSize before realloc + size = len + 1; + // add our text to the end + memcpy(block + offset + METAENTRYSIZE, entry, size); + // increment count + setCount(count + 1); + // add our meta entry + setMetaEntry(count, offset + METAENTRYSIZE, size); + // return index of our new entry + return count; +} + + +const char *EntriesBlock::getEntry(int entryIndex) { + unsigned long offset; + unsigned long size; + static const char *empty = ""; + + getMetaEntry(entryIndex, &offset, &size); + return (offset) ? block+offset : empty; +} + + +unsigned long EntriesBlock::getEntrySize(int entryIndex) { + unsigned long offset; + unsigned long size; + + getMetaEntry(entryIndex, &offset, &size); + return (offset) ? size : 0; +} + + +void EntriesBlock::removeEntry(int entryIndex) { + unsigned long offset; + unsigned long size, size2; + unsigned long dataSize; + getRawData(&dataSize); + getMetaEntry(entryIndex, &offset, &size); + int count = getCount(); + + if (!offset) // already deleted + return; + + // shift left to retrieve space used for old entry + memmove(block + offset, block + offset + size, dataSize - (offset + size)); + + // fix offset for all entries after our entry that were shifted left + for (int loop = entryIndex + 1; loop < count; loop++) { + getMetaEntry(loop, &offset, &size2); + if (offset) { // if not a deleted entry + offset -= size; + setMetaEntry(loop, offset, size2); + } + } + + // zero out our meta entry + setMetaEntry(entryIndex, 0L, 0); +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/common/lzsscomprs.cpp b/src/modules/common/lzsscomprs.cpp new file mode 100644 index 0000000..bd8f768 --- /dev/null +++ b/src/modules/common/lzsscomprs.cpp @@ -0,0 +1,668 @@ +/****************************************************************************** + * lzsscomprs.cpp - code for class 'LZSSCompress'- a driver class that + * provides LZSS compression + */ + +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * LZSSCompress Statics + */ + +// m_ring_buffer is a text buffer. It contains "nodes" of +// uncompressed text that can be indexed by position. That is, +// a substring of the ring buffer can be indexed by a position +// and a length. When decoding, the compressed text may contain +// a position in the ring buffer and a count of the number of +// bytes from the ring buffer that are to be moved into the +// uncompressed buffer. +// +// This ring buffer is not maintained as part of the compressed +// text. Instead, it is reconstructed dynamically. That is, +// it starts out empty and gets built as the text is decompressed. +// +// The ring buffer contain N bytes, with an additional F - 1 bytes +// to facilitate string comparison. + +unsigned char LZSSCompress::m_ring_buffer[N + F - 1]; + +// m_match_position and m_match_length are set by InsertNode(). +// +// These variables indicate the position in the ring buffer +// and the number of characters at that position that match +// a given string. + +short int LZSSCompress::m_match_position; +short int LZSSCompress::m_match_length; + +// m_lson, m_rson, and m_dad are the Japanese way of referring to +// a tree structure. The dad is the parent and it has a right and +// left son (child). +// +// For i = 0 to N-1, m_rson[i] and m_lson[i] will be the right +// and left children of node i. +// +// For i = 0 to N-1, m_dad[i] is the parent of node i. +// +// For i = 0 to 255, rson[N + i + 1] is the root of the tree for +// strings that begin with the character i. Note that this requires +// one byte characters. +// +// These nodes store values of 0...(N-1). Memory requirements +// can be reduces by using 2-byte integers instead of full 4-byte +// integers (for 32-bit applications). Therefore, these are +// defined as "short ints." + +short int LZSSCompress::m_lson[N + 1]; +short int LZSSCompress::m_rson[N + 257]; +short int LZSSCompress::m_dad[N + 1]; + + +/****************************************************************************** + * LZSSCompress Constructor - Initializes data for instance of LZSSCompress + * + */ + +LZSSCompress::LZSSCompress() : SWCompress() { +} + + +/****************************************************************************** + * LZSSCompress Destructor - Cleans up instance of LZSSCompress + */ + +LZSSCompress::~LZSSCompress() { +} + + +/****************************************************************************** + * LZSSCompress::InitTree - This function initializes the tree nodes to + * "empty" states. + */ + +void LZSSCompress::InitTree(void) { + int i; + + // For i = 0 to N - 1, m_rson[i] and m_lson[i] will be the right + // and left children of node i. These nodes need not be + // initialized. However, for debugging purposes, it is nice to + // have them initialized. Since this is only used for compression + // (not decompression), I don't mind spending the time to do it. + // + // For the same range of i, m_dad[i] is the parent of node i. + // These are initialized to a known value that can represent + // a "not used" state. + + for (i = 0; i < N; i++) { + m_lson[i] = NOT_USED; + m_rson[i] = NOT_USED; + m_dad[i] = NOT_USED; + } + + // For i = 0 to 255, m_rson[N + i + 1] is the root of the tree + // for strings that begin with the character i. This is why + // the right child array is larger than the left child array. + // These are also initialzied to a "not used" state. + // + // Note that there are 256 of these, one for each of the possible + // 256 characters. + + for (i = N + 1; i <= (N + 256); i++) { + m_rson[i] = NOT_USED; + } +} + + +/****************************************************************************** + * LZSSCompress::InsertNode - This function inserts a string from the ring + * buffer into one of the trees. It loads the + * match position and length member variables + * for the longest match. + * + * The string to be inserted is identified by + * the parameter Pos, A full F bytes are + * inserted. So, + * m_ring_buffer[Pos ... Pos+F-1] + * are inserted. + * + * If the matched length is exactly F, then an + * old node is removed in favor of the new one + * (because the old one will be deleted + * sooner). + * + * Note that Pos plays a dual role. It is + * used as both a position in the ring buffer + * and also as a tree node. + * m_ring_buffer[Pos] defines a character that + * is used to identify a tree node. + * + * ENT: pos - position in the buffer + */ + +void LZSSCompress::InsertNode(short int Pos) +{ + short int i; + short int p; + int cmp; + unsigned char * key; + +/* + ASSERT(Pos >= 0); + ASSERT(Pos < N); +*/ + + cmp = 1; + key = &(m_ring_buffer[Pos]); + + // The last 256 entries in m_rson contain the root nodes for + // strings that begin with a letter. Get an index for the + // first letter in this string. + + p = (short int) (N + 1 + key[0]); + + // Set the left and right tree nodes for this position to "not + // used." + + m_lson[Pos] = NOT_USED; + m_rson[Pos] = NOT_USED; + + // Haven't matched anything yet. + + m_match_length = 0; + + for ( ; ; ) { + if (cmp >= 0) { + if (m_rson[p] != NOT_USED) { + p = m_rson[p]; + } + else { + m_rson[p] = Pos; + m_dad[Pos] = p; + return; + } + } + else { + if (m_lson[p] != NOT_USED) { + p = m_lson[p]; + } + else { + m_lson[p] = Pos; + m_dad[Pos] = p; + return; + } + } + + // Should we go to the right or the left to look for the + // next match? + + for (i = 1; i < F; i++) { + cmp = key[i] - m_ring_buffer[p + i]; + if (cmp != 0) + break; + } + + if (i > m_match_length) { + m_match_position = p; + m_match_length = i; + + if (i >= F) + break; + } + } + + m_dad[Pos] = m_dad[p]; + m_lson[Pos] = m_lson[p]; + m_rson[Pos] = m_rson[p]; + + m_dad[ m_lson[p] ] = Pos; + m_dad[ m_rson[p] ] = Pos; + + if (m_rson[ m_dad[p] ] == p) { + m_rson[ m_dad[p] ] = Pos; + } + else { + m_lson[ m_dad[p] ] = Pos; + } + + // Remove "p" + + m_dad[p] = NOT_USED; +} + + +/****************************************************************************** + * LZSSCompress::DeleteNode - This function removes the node "Node" from the + * tree. + * + * ENT: node - node to be removed + */ + +void LZSSCompress::DeleteNode(short int Node) +{ + short int q; + +/* + ASSERT(Node >= 0); + ASSERT(Node < (N+1)); +*/ + + if (m_dad[Node] == NOT_USED) { // not in tree, nothing to do + return; + } + + if (m_rson[Node] == NOT_USED) { + q = m_lson[Node]; + } + else if (m_lson[Node] == NOT_USED) { + q = m_rson[Node]; + } + else { + q = m_lson[Node]; + if (m_rson[q] != NOT_USED) { + do { + q = m_rson[q]; + } while (m_rson[q] != NOT_USED); + + m_rson[ m_dad[q] ] = m_lson[q]; + m_dad[ m_lson[q] ] = m_dad[q]; + m_lson[q] = m_lson[Node]; + m_dad[ m_lson[Node] ] = q; + } + + m_rson[q] = m_rson[Node]; + m_dad[ m_rson[Node] ] = q; + } + + m_dad[q] = m_dad[Node]; + + if (m_rson[ m_dad[Node] ] == Node) { + m_rson[ m_dad[Node] ] = q; + } + else { + m_lson[ m_dad[Node] ] = q; + } + + m_dad[Node] = NOT_USED; +} + + +/****************************************************************************** + * LZSSCompress::Encode - This function "encodes" the input stream into the + * output stream. + * The GetChars() and SendChars() functions are + * used to separate this method from the actual + * i/o. + * NOTE: must set zlen for parent class to know length of + * compressed buffer. + */ + +void LZSSCompress::Encode(void) +{ + short int i; // an iterator + short int r; // node number in the binary tree + short int s; // position in the ring buffer + unsigned short int len; // len of initial string + short int last_match_length; // length of last match + short int code_buf_pos; // position in the output buffer + unsigned char code_buf[17]; // the output buffer + unsigned char mask; // bit mask for byte 0 of out buf + unsigned char c; // character read from string + + // Start with a clean tree. + + InitTree(); + direct = 0; // set direction needed by parent [Get|Send]Chars() + + // code_buf[0] works as eight flags. A "1" represents that the + // unit is an unencoded letter (1 byte), and a "0" represents + // that the next unit is a pair (2 bytes). + // + // code_buf[1..16] stores eight units of code. Since the best + // we can do is store eight pairs, at most 16 + // bytes are needed to store this. + // + // This is why the maximum size of the code buffer is 17 bytes. + + code_buf[0] = 0; + code_buf_pos = 1; + + // Mask iterates over the 8 bits in the code buffer. The first + // character ends up being stored in the low bit. + // + // bit 8 7 6 5 4 3 2 1 + // | | + // | first sequence in code buffer + // | + // last sequence in code buffer + + mask = 1; + + s = 0; + r = (short int) N - (short int) F; + + // Initialize the ring buffer with spaces... + + // Note that the last F bytes of the ring buffer are not filled. + // This is because those F bytes will be filled in immediately + // with bytes from the input stream. + + memset(m_ring_buffer, ' ', N - F); + + // Read F bytes into the last F bytes of the ring buffer. + // + // This function loads the buffer with X characters and returns + // the actual amount loaded. + + len = GetChars((char *) &(m_ring_buffer[r]), F); + + // Make sure there is something to be compressed. + + if (len == 0) + return; + + // Insert the F strings, each of which begins with one or more + // 'space' characters. Note the order in which these strings + // are inserted. This way, degenerate trees will be less likely + // to occur. + + for (i = 1; i <= F; i++) { + InsertNode((short int) (r - i)); + } + + // Finally, insert the whole string just read. The + // member variables match_length and match_position are set. + + InsertNode(r); + + // Now that we're preloaded, continue till done. + + do { + + // m_match_length may be spuriously long near the end of + // text. + + if (m_match_length > len) { + m_match_length = len; + } + + // Is it cheaper to store this as a single character? If so, + // make it so. + + if (m_match_length < THRESHOLD) { + // Send one character. Remember that code_buf[0] is the + // set of flags for the next eight items. + + m_match_length = 1; + code_buf[0] |= mask; + code_buf[code_buf_pos++] = m_ring_buffer[r]; + } + + // Otherwise, we do indeed have a string that can be stored + // compressed to save space. + + else { + // The next 16 bits need to contain the position (12 bits) + // and the length (4 bits). + + code_buf[code_buf_pos++] = (unsigned char) m_match_position; + code_buf[code_buf_pos++] = (unsigned char) ( + ((m_match_position >> 4) & 0xf0) | + (m_match_length - THRESHOLD) ); + } + + // Shift the mask one bit to the left so that it will be ready + // to store the new bit. + + mask = (unsigned char) (mask << 1); + + // If the mask is now 0, then we know that we have a full set + // of flags and items in the code buffer. These need to be + // output. + + if (!mask) { + // code_buf is the buffer of characters to be output. + // code_buf_pos is the number of characters it contains. + + SendChars((char *) code_buf, code_buf_pos); + + // Reset for next buffer... + + code_buf[0] = 0; + code_buf_pos = 1; + mask = 1; + } + + last_match_length = m_match_length; + + // Delete old strings and read new bytes... + + for (i = 0; i < last_match_length; i++) { + // Get next character... + + if (GetChars((char *) &c, 1) != 1) + break; + + // Delete "old strings" + + DeleteNode(s); + + // Put this character into the ring buffer. + // + // The original comment here says "If the position is near + // the end of the buffer, extend the buffer to make + // string comparison easier." + // + // That's a little misleading, because the "end" of the + // buffer is really what we consider to be the "beginning" + // of the buffer, that is, positions 0 through F. + // + // The idea is that the front end of the buffer is duplicated + // into the back end so that when you're looking at characters + // at the back end of the buffer, you can index ahead (beyond + // the normal end of the buffer) and see the characters + // that are at the front end of the buffer wihtout having + // to adjust the index. + // + // That is... + // + // 1234xxxxxxxxxxxxxxxxxxxxxxxxxxxxx1234 + // | | | + // position 0 end of buffer | + // | + // duplicate of front of buffer + + m_ring_buffer[s] = c; + + if (s < F - 1) { + m_ring_buffer[s + N] = c; + } + + // Increment the position, and wrap around when we're at + // the end. Note that this relies on N being a power of 2. + + s = (short int) ( (s + 1) & (N - 1) ); + r = (short int) ( (r + 1) & (N - 1) ); + + // Register the string that is found in + // m_ring_buffer[r..r+F-1]. + + InsertNode(r); + } + + // If we didn't quit because we hit the last_match_length, + // then we must have quit because we ran out of characters + // to process. + + while (i++ < last_match_length) { + DeleteNode(s); + + s = (short int) ( (s + 1) & (N - 1) ); + r = (short int) ( (r + 1) & (N - 1) ); + + // Note that len hitting 0 is the key that causes the + // do...while() to terminate. This is the only place + // within the loop that len is modified. + // + // Its original value is F (or a number less than F for + // short strings). + + if (--len) { + InsertNode(r); /* buffer may not be empty. */ + } + } + + // End of do...while() loop. Continue processing until there + // are no more characters to be compressed. The variable + // "len" is used to signal this condition. + } while (len > 0); + + // There could still be something in the output buffer. Send it + // now. + + if (code_buf_pos > 1) { + // code_buf is the encoded string to send. + // code_buf_ptr is the number of characters. + + SendChars((char *) code_buf, code_buf_pos); + } + + + // must set zlen for parent class to know length of compressed buffer + zlen = zpos; +} + + +/****************************************************************************** + * LZSSCompress::Decode - This function "decodes" the input stream into the + * output stream. + * The GetChars() and SendChars() functions are + * used to separate this method from the actual + * i/o. + */ + +void LZSSCompress::Decode(void) +{ + int k; + int r; // node number + unsigned char c[F]; // an array of chars + unsigned char flags; // 8 bits of flags + int flag_count; // which flag we're on + short int pos; // position in the ring buffer + short int len; // number of chars in ring buffer + unsigned long totalLen = 0; + + direct = 1; // set direction needed by parent [Get|Send]Chars() + + // Initialize the ring buffer with a common string. + // + // Note that the last F bytes of the ring buffer are not filled. + + memset(m_ring_buffer, ' ', N - F); + + r = N - F; + + flags = (char) 0; + flag_count = 0; + + for ( ; ; ) { + + // If there are more bits of interest in this flag, then + // shift that next interesting bit into the 1's position. + // + // If this flag has been exhausted, the next byte must + // be a flag. + + if (flag_count > 0) { + flags = (unsigned char) (flags >> 1); + flag_count--; + } + else { + // Next byte must be a flag. + + if (GetChars((char *) &flags, 1) != 1) + break; + + // Set the flag counter. While at first it might appear + // that this should be an 8 since there are 8 bits in the + // flag, it should really be a 7 because the shift must + // be performed 7 times in order to see all 8 bits. + + flag_count = 7; + } + + // If the low order bit of the flag is now set, then we know + // that the next byte is a single, unencoded character. + + if (flags & 1) { + if (GetChars((char *) c, 1) != 1) + break; + + if (SendChars((char *) c, 1) != 1) { + totalLen++; + break; + } + + // Add to buffer, and increment to next spot. Wrap at end. + + m_ring_buffer[r] = c[0]; + r = (short int) ( (r + 1) & (N - 1) ); + } + + // Otherwise, we know that the next two bytes are a + // pair. The position is in 12 bits and + // the length is in 4 bits. + + else { + // Original code: + // if ((i = getc(infile)) == EOF) + // break; + // if ((j = getc(infile)) == EOF) + // break; + // i |= ((j & 0xf0) << 4); + // j = (j & 0x0f) + THRESHOLD; + // + // I've modified this to only make one input call, and + // have changed the variable names to something more + // obvious. + + if (GetChars((char *) c, 2) != 2) + break; + + // Convert these two characters into the position and + // length. Note that the length is always at least + // THRESHOLD, which is why we're able to get a length + // of 18 out of only 4 bits. + + pos = (short int) ( c[0] | ((c[1] & 0xf0) << 4) ); + + len = (short int) ( (c[1] & 0x0f) + THRESHOLD ); + + // There are now "len" characters at position "pos" in + // the ring buffer that can be pulled out. Note that + // len is never more than F. + + for (k = 0; k < len; k++) { + c[k] = m_ring_buffer[(pos + k) & (N - 1)]; + + // Add to buffer, and increment to next spot. Wrap at end. + + m_ring_buffer[r] = c[k]; + r = (short int) ( (r + 1) & (N - 1) ); + } + + // Add the "len" :characters to the output stream. + + if (SendChars((char *) c, len) != (unsigned int)len) { + totalLen += len; + break; + } + } + } + slen = totalLen; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/common/rawstr.cpp b/src/modules/common/rawstr.cpp new file mode 100644 index 0000000..d2da1e9 --- /dev/null +++ b/src/modules/common/rawstr.cpp @@ -0,0 +1,565 @@ +/****************************************************************************** + * rawstr.cpp - code for class 'RawStr'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class StrKey + */ + + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * RawStr Statics + */ + +int RawStr::instance = 0; +char RawStr::nl = '\n'; + + +/****************************************************************************** + * RawStr Constructor - Initializes data for instance of RawStr + * + * ENT: ipath - path of the directory where data and index files are located. + * be sure to include the trailing separator (e.g. '/' or '\') + * (e.g. 'modules/texts/rawtext/webster/') + */ + +RawStr::RawStr(const char *ipath, int fileMode) +{ + SWBuf buf; + + lastoff = -1; + path = 0; + stdstr(&path, ipath); + + if (fileMode == -1) { // try read/write if possible + fileMode = FileMgr::RDWR; + } + + buf.setFormatted("%s.idx", path); + idxfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s.dat", path); + datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + if (datfd < 0) { + SWLog::getSystemLog()->logError("%d", errno); + } + + instance++; +} + + +/****************************************************************************** + * RawStr Destructor - Cleans up instance of RawStr + */ + +RawStr::~RawStr() +{ + if (path) + delete [] path; + + --instance; + + FileMgr::getSystemFileMgr()->close(idxfd); + FileMgr::getSystemFileMgr()->close(datfd); +} + + +/****************************************************************************** + * RawStr::getidxbufdat - Gets the index string at the given idx offset + * NOTE: buf is allocated and must be freed by + * calling function + * + * ENT: ioffset - offset in dat file to lookup + * buf - address of pointer to allocate for storage of string + */ + +void RawStr::getIDXBufDat(long ioffset, char **buf) +{ + int size; + char ch; + if (datfd > 0) { + datfd->seek(ioffset, SEEK_SET); + for (size = 0; datfd->read(&ch, 1) == 1; size++) { + if ((ch == '\\') || (ch == 10) || (ch == 13)) + break; + } + *buf = (*buf) ? (char *)realloc(*buf, size*2 + 1) : (char *)malloc(size*2 + 1); + if (size) { + datfd->seek(ioffset, SEEK_SET); + datfd->read(*buf, size); + } + (*buf)[size] = 0; + toupperstr_utf8(*buf, size*2); + } + else { + *buf = (*buf) ? (char *)realloc(*buf, 1) : (char *)malloc(1); + **buf = 0; + } +} + + +/****************************************************************************** + * RawStr::getidxbuf - Gets the index string at the given idx offset + * NOTE: buf is allocated and must be freed by + * calling function + * + * ENT: ioffset - offset in idx file to lookup + * buf - address of pointer to allocate for storage of string + */ + +void RawStr::getIDXBuf(long ioffset, char **buf) +{ + long offset; + + if (idxfd > 0) { + idxfd->seek(ioffset, SEEK_SET); + idxfd->read(&offset, 4); + + offset = swordtoarch32(offset); + + getIDXBufDat(offset, buf); + } +} + + +/****************************************************************************** + * RawStr::findoffset - Finds the offset of the key string from the indexes + * + * ENT: key - key string to lookup + * start - address to store the starting offset + * size - address to store the size of the entry + * away - number of entries before of after to jump + * (default = 0) + * + * RET: error status -1 general error; -2 new file + */ + +signed char RawStr::findOffset(const char *ikey, long *start, unsigned short *size, long away, long *idxoff) +{ + char *trybuf, *maxbuf, *key = 0, quitflag = 0; + signed char retval = -1; + long headoff, tailoff, tryoff = 0, maxoff = 0; + int diff = 0; + + if (idxfd->getFd() >=0) { + tailoff = maxoff = idxfd->seek(0, SEEK_END) - 6; + retval = (tailoff >= 0) ? 0 : -2; // if NOT new file + if (*ikey) { + headoff = 0; + + stdstr(&key, ikey, 3); + toupperstr_utf8(key, strlen(key)*3); + + int keylen = strlen(key); + bool substr = false; + + trybuf = maxbuf = 0; + getIDXBuf(maxoff, &maxbuf); + + while (headoff < tailoff) { + tryoff = (lastoff == -1) ? headoff + ((((tailoff / 6) - (headoff / 6))) / 2) * 6 : lastoff; + lastoff = -1; + getIDXBuf(tryoff, &trybuf); + + if (!*trybuf && tryoff) { // In case of extra entry at end of idx (not first entry) + tryoff += (tryoff > (maxoff / 2))?-6:6; + retval = -1; + break; + } + + diff = strcmp(key, trybuf); + + if (!diff) + break; + + if (!strncmp(trybuf, key, keylen)) substr = true; + + if (diff < 0) + tailoff = (tryoff == headoff) ? headoff : tryoff; + else headoff = tryoff; + + if (tailoff == headoff + 6) { + if (quitflag++) + headoff = tailoff; + } + } + + // didn't find exact match + if (headoff >= tailoff) { + tryoff = headoff; + if (!substr && ((tryoff != maxoff)||(strncmp(key, maxbuf, keylen)<0))) { + away--; // if our entry doesn't startwith our key, prefer the previous entry over the next + } + } + if (trybuf) + free(trybuf); + delete [] key; + if (maxbuf) + free(maxbuf); + } + else tryoff = 0; + + idxfd->seek(tryoff, SEEK_SET); + + *start = *size = 0; + idxfd->read(start, 4); + idxfd->read(size, 2); + if (idxoff) + *idxoff = tryoff; + + *start = swordtoarch32(*start); + *size = swordtoarch16(*size); + + while (away) { + long laststart = *start; + unsigned short lastsize = *size; + long lasttry = tryoff; + tryoff += (away > 0) ? 6 : -6; + + bool bad = false; + if (((tryoff + (away*6)) < -6) || (tryoff + (away*6) > (maxoff+6))) + bad = true; + else if (idxfd->seek(tryoff, SEEK_SET) < 0) + bad = true; + if (bad) { + retval = -1; + *start = laststart; + *size = lastsize; + tryoff = lasttry; + if (idxoff) + *idxoff = tryoff; + break; + } + idxfd->read(start, 4); + idxfd->read(size, 2); + if (idxoff) + *idxoff = tryoff; + + *start = swordtoarch32(*start); + *size = swordtoarch16(*size); + + if (((laststart != *start) || (lastsize != *size)) && (*start >= 0) && (*size)) + away += (away < 0) ? 1 : -1; + } + + lastoff = tryoff; + } + else { + *start = 0; + *size = 0; + if (idxoff) + *idxoff = 0; + retval = -1; + } + return retval; +} + + +/****************************************************************************** + * RawStr::preptext - Prepares the text before returning it to external + * objects + * + * ENT: buf - buffer where text is stored and where to store the prep'd + * text. + */ + +void RawStr::prepText(SWBuf &buf) { + unsigned int to, from; + char space = 0, cr = 0, realdata = 0, nlcnt = 0; + char *rawBuf = buf.getRawData(); + for (to = from = 0; rawBuf[from]; from++) { + switch (rawBuf[from]) { + case 10: + if (!realdata) + continue; + space = (cr) ? 0 : 1; + cr = 0; + nlcnt++; + if (nlcnt > 1) { +// *to++ = nl; + rawBuf[to++] = 10; +// *to++ = nl[1]; +// nlcnt = 0; + } + continue; + case 13: + if (!realdata) + continue; +// *to++ = nl[0]; + rawBuf[to++] = 10; + space = 0; + cr = 1; + continue; + } + realdata = 1; + nlcnt = 0; + if (space) { + space = 0; + if (rawBuf[from] != ' ') { + rawBuf[to++] = ' '; + from--; + continue; + } + } + rawBuf[to++] = rawBuf[from]; + } + buf.setSize(to); + + while (to > 1) { // remove trailing excess + to--; + if ((rawBuf[to] == 10) || (rawBuf[to] == ' ')) + buf.setSize(to); + else break; + } +} + + +/****************************************************************************** + * RawStr::readtext - gets text at a given offset + * + * ENT: + * start - starting offset where the text is located in the file + * size - size of text entry + * buf - buffer to store text + * + */ + +void RawStr::readText(long istart, unsigned short *isize, char **idxbuf, SWBuf &buf) +{ + unsigned int ch; + char *idxbuflocal = 0; + getIDXBufDat(istart, &idxbuflocal); + long start = istart; + + do { + if (*idxbuf) + delete [] *idxbuf; + + buf = ""; + buf.setFillByte(0); + buf.setSize(++(*isize)); + + *idxbuf = new char [ (*isize) ]; + + datfd->seek(start, SEEK_SET); + datfd->read(buf.getRawData(), (int)((*isize) - 1)); + + for (ch = 0; buf[ch]; ch++) { // skip over index string + if (buf[ch] == 10) { + ch++; + break; + } + } + buf = SWBuf(buf.c_str()+ch); + // resolve link + if (!strncmp(buf.c_str(), "@LINK", 5)) { + for (ch = 0; buf[ch]; ch++) { // null before nl + if (buf[ch] == 10) { + buf[ch] = 0; + break; + } + } + findOffset(buf.c_str() + 6, &start, isize); + } + else break; + } + while (true); // while we're resolving links + + if (idxbuflocal) { + int localsize = strlen(idxbuflocal); + localsize = (localsize < (*isize - 1)) ? localsize : (*isize - 1); + strncpy(*idxbuf, idxbuflocal, localsize); + (*idxbuf)[localsize] = 0; + free(idxbuflocal); + } +} + + +/****************************************************************************** + * RawLD::settext - Sets text for current offset + * + * ENT: key - key for this entry + * buf - buffer to store + * len - length of buffer (0 - null terminated) + */ + +void RawStr::doSetText(const char *ikey, const char *buf, long len) +{ + + long start, outstart; + long idxoff; + long endoff; + long shiftSize; + unsigned short size; + unsigned short outsize; + static const char nl[] = {13, 10}; + char *tmpbuf = 0; + char *key = 0; + char *dbKey = 0; + char *idxBytes = 0; + char *outbuf = 0; + char *ch = 0; + + char errorStatus = findOffset(ikey, &start, &size, 0, &idxoff); + stdstr(&key, ikey, 2); + toupperstr_utf8(key, strlen(key)*2); + + len = (len < 0) ? strlen(buf) : len; + + getIDXBufDat(start, &dbKey); + + if (strcmp(key, dbKey) < 0) { + } + else if (strcmp(key, dbKey) > 0) { + if (errorStatus != (char)-2) // not a new file + idxoff += 6; + else idxoff = 0; + } + else if ((!strcmp(key, dbKey)) && (len>0 /*we're not deleting*/)) { // got absolute entry + do { + tmpbuf = new char [ size + 2 ]; + memset(tmpbuf, 0, size + 2); + datfd->seek(start, SEEK_SET); + datfd->read(tmpbuf, (int)(size - 1)); + + for (ch = tmpbuf; *ch; ch++) { // skip over index string + if (*ch == 10) { + ch++; + break; + } + } + memmove(tmpbuf, ch, size - (unsigned short)(ch-tmpbuf)); + + // resolve link + if (!strncmp(tmpbuf, "@LINK", 5) && (len)) { + for (ch = tmpbuf; *ch; ch++) { // null before nl + if (*ch == 10) { + *ch = 0; + break; + } + } + findOffset(tmpbuf + 6, &start, &size, 0, &idxoff); + } + else break; + } + while (true); // while we're resolving links + } + + endoff = idxfd->seek(0, SEEK_END); + + shiftSize = endoff - idxoff; + + if (shiftSize > 0) { + idxBytes = new char [ shiftSize ]; + idxfd->seek(idxoff, SEEK_SET); + idxfd->read(idxBytes, shiftSize); + } + + outbuf = new char [ len + strlen(key) + 5 ]; + sprintf(outbuf, "%s%c%c", key, 13, 10); + size = strlen(outbuf); + memcpy(outbuf + size, buf, len); + size = outsize = size + (len); + + start = outstart = datfd->seek(0, SEEK_END); + + outstart = archtosword32(start); + outsize = archtosword16(size); + + idxfd->seek(idxoff, SEEK_SET); + if (len > 0) { + datfd->seek(start, SEEK_SET); + datfd->write(outbuf, (int)size); + + // add a new line to make data file easier to read in an editor + datfd->write(&nl, 2); + + idxfd->write(&outstart, 4); + idxfd->write(&outsize, 2); + if (idxBytes) { + idxfd->write(idxBytes, shiftSize); + delete [] idxBytes; + } + } + else { // delete entry + if (idxBytes) { + idxfd->write(idxBytes+6, shiftSize-6); + idxfd->seek(-1, SEEK_CUR); // last valid byte + FileMgr::getSystemFileMgr()->trunc(idxfd); // truncate index + delete [] idxBytes; + } + } + + delete [] key; + delete [] outbuf; + free(dbKey); +} + + +/****************************************************************************** + * RawLD::linkentry - links one entry to another + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * destidxoff - dest offset into .vss + * srcidxoff - source offset into .vss + */ + +void RawStr::doLinkEntry(const char *destkey, const char *srckey) { + char *text = new char [ strlen(destkey) + 7 ]; + sprintf(text, "@LINK %s", destkey); + doSetText(srckey, text); + delete [] text; +} + + +/****************************************************************************** + * RawLD::CreateModule - Creates new module files + * + * ENT: path - directory to store module files + * RET: error status + */ + +signed char RawStr::createModule(const char *ipath) +{ + char *path = 0; + char *buf = new char [ strlen (ipath) + 20 ]; + FileDesc *fd, *fd2; + + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + sprintf(buf, "%s.dat", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s.idx", path); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + FileMgr::getSystemFileMgr()->close(fd2); + + delete [] path; + + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/common/rawstr4.cpp b/src/modules/common/rawstr4.cpp new file mode 100644 index 0000000..cbc8384 --- /dev/null +++ b/src/modules/common/rawstr4.cpp @@ -0,0 +1,572 @@ +/****************************************************************************** + * rawstr.cpp - code for class 'RawStr'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class StrKey + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * RawStr Statics + */ + +int RawStr4::instance = 0; + + +/****************************************************************************** + * RawStr Constructor - Initializes data for instance of RawStr + * + * ENT: ipath - path of the directory where data and index files are located. + * be sure to include the trailing separator (e.g. '/' or '\') + * (e.g. 'modules/texts/rawtext/webster/') + */ + +RawStr4::RawStr4(const char *ipath, int fileMode) +{ + SWBuf buf; + + nl = '\n'; + lastoff = -1; + path = 0; + stdstr(&path, ipath); + + if (fileMode == -1) { // try read/write if possible + fileMode = FileMgr::RDWR; + } + + buf.setFormatted("%s.idx", path); + idxfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s.dat", path); + datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + if (datfd < 0) { + SWLog::getSystemLog()->logError("%d", errno); + } + + instance++; +} + + +/****************************************************************************** + * RawStr Destructor - Cleans up instance of RawStr + */ + +RawStr4::~RawStr4() +{ + if (path) + delete [] path; + + --instance; + + FileMgr::getSystemFileMgr()->close(idxfd); + FileMgr::getSystemFileMgr()->close(datfd); +} + + +/****************************************************************************** + * RawStr4::getidxbufdat - Gets the index string at the given idx offset + * NOTE: buf is allocated and must be freed by + * calling function + * + * ENT: ioffset - offset in dat file to lookup + * buf - address of pointer to allocate for storage of string + */ + +void RawStr4::getIDXBufDat(long ioffset, char **buf) { + int size; + char ch; + if (datfd > 0) { + datfd->seek(ioffset, SEEK_SET); + for (size = 0; datfd->read(&ch, 1) == 1; size++) { + if ((ch == '\\') || (ch == 10) || (ch == 13)) + break; + } + *buf = (*buf) ? (char *)realloc(*buf, size*2 + 1) : (char *)malloc(size*2 + 1); + if (size) { + datfd->seek(ioffset, SEEK_SET); + datfd->read(*buf, size); + } + (*buf)[size] = 0; + toupperstr_utf8(*buf, size*2); + } + else { + *buf = (*buf) ? (char *)realloc(*buf, 1) : (char *)malloc(1); + **buf = 0; + } +} + + +/****************************************************************************** + * RawStr4::getidxbuf - Gets the index string at the given idx offset + * NOTE: buf is allocated and must be freed by + * calling function + * + * ENT: ioffset - offset in idx file to lookup + * buf - address of pointer to allocate for storage of string + */ + +void RawStr4::getIDXBuf(long ioffset, char **buf) +{ + long offset; + + if (idxfd > 0) { + idxfd->seek(ioffset, SEEK_SET); + idxfd->read(&offset, 4); + + offset = swordtoarch32(offset); + + getIDXBufDat(offset, buf); + +/* What the heck is this supposed to do?????? + for (trybuf = targetbuf = *buf; *trybuf; trybuf++, targetbuf++) { + *targetbuf = *trybuf; + } + *targetbuf = 0; + trybuf = 0; + toupperstr_utf8(targetbuf); +*/ + } +} + + +/****************************************************************************** + * RawStr4::findoffset - Finds the offset of the key string from the indexes + * + * ENT: key - key string to lookup + * start - address to store the starting offset + * size - address to store the size of the entry + * away - number of entries before of after to jump + * (default = 0) + * + * RET: error status -1 general error; -2 new file + */ + +signed char RawStr4::findOffset(const char *ikey, long *start, unsigned long *size, long away, long *idxoff) +{ + char *trybuf, *maxbuf, *key = 0, quitflag = 0; + signed char retval = -1; + long headoff, tailoff, tryoff = 0, maxoff = 0; + int diff = 0; + + if (idxfd->getFd() >=0) { + tailoff = maxoff = idxfd->seek(0, SEEK_END) - 8; + retval = (tailoff >= 0) ? 0 : -2; // if NOT new file + if (*ikey) { + headoff = 0; + + stdstr(&key, ikey, 3); + toupperstr_utf8(key, strlen(key)*3); + + int keylen = strlen(key); + bool substr = false; + + trybuf = maxbuf = 0; + getIDXBuf(maxoff, &maxbuf); + + while (headoff < tailoff) { + tryoff = (lastoff == -1) ? headoff + ((((tailoff / 8) - (headoff / 8))) / 2) * 8 : lastoff; + lastoff = -1; + getIDXBuf(tryoff, &trybuf); + + if (!*trybuf && tryoff) { // In case of extra entry at end of idx (not first entry) + tryoff += (tryoff > (maxoff / 2))?-8:8; + retval = -1; + break; + } + + diff = strcmp(key, trybuf); + + if (!diff) + break; + + if (!strncmp(trybuf, key, keylen)) substr = true; + + if (diff < 0) + tailoff = (tryoff == headoff) ? headoff : tryoff; + else headoff = tryoff; + + if (tailoff == headoff + 8) { + if (quitflag++) + headoff = tailoff; + } + } + + // didn't find exact match + if (headoff >= tailoff) { + tryoff = headoff; + if (!substr && ((tryoff != maxoff)||(strncmp(key, maxbuf, keylen)<0))) { + away--; // if our entry doesn't startwith our key, prefer the previous entry over the next + } + } + if (trybuf) + free(trybuf); + delete [] key; + if (maxbuf) + free(maxbuf); + } + else tryoff = 0; + + idxfd->seek(tryoff, SEEK_SET); + + *start = *size = 0; + idxfd->read(start, 4); + idxfd->read(size, 4); + if (idxoff) + *idxoff = tryoff; + + *start = swordtoarch32(*start); + *size = swordtoarch32(*size); + + while (away) { + long laststart = *start; + unsigned long lastsize = *size; + long lasttry = tryoff; + tryoff += (away > 0) ? 8 : -8; + + bool bad = false; + if (((tryoff + (away*8)) < -8) || (tryoff + (away*8) > (maxoff+8))) + bad = true; + else if (idxfd->seek(tryoff, SEEK_SET) < 0) + bad = true; + if (bad) { + retval = -1; + *start = laststart; + *size = lastsize; + tryoff = lasttry; + if (idxoff) + *idxoff = tryoff; + break; + } + idxfd->read(start, 4); + idxfd->read(size, 4); + if (idxoff) + *idxoff = tryoff; + + *start = swordtoarch32(*start); + *size = swordtoarch32(*size); + + if (((laststart != *start) || (lastsize != *size)) && (*start >= 0) && (*size)) + away += (away < 0) ? 1 : -1; + } + + lastoff = tryoff; + } + else { + *start = 0; + *size = 0; + if (idxoff) + *idxoff = 0; + retval = -1; + } + return retval; +} + + +/****************************************************************************** + * RawStr4::preptext - Prepares the text before returning it to external + * objects + * + * ENT: buf - buffer where text is stored and where to store the prep'd + * text. + */ + +void RawStr4::prepText(SWBuf &buf) { + unsigned int to, from; + char space = 0, cr = 0, realdata = 0, nlcnt = 0; + char *rawBuf = buf.getRawData(); + for (to = from = 0; rawBuf[from]; from++) { + switch (rawBuf[from]) { + case 10: + if (!realdata) + continue; + space = (cr) ? 0 : 1; + cr = 0; + nlcnt++; + if (nlcnt > 1) { +// *to++ = nl; + rawBuf[to++] = 10; +// *to++ = nl[1]; +// nlcnt = 0; + } + continue; + case 13: + if (!realdata) + continue; +// *to++ = nl[0]; + rawBuf[to++] = 10; + space = 0; + cr = 1; + continue; + } + realdata = 1; + nlcnt = 0; + if (space) { + space = 0; + if (rawBuf[from] != ' ') { + rawBuf[to++] = ' '; + from--; + continue; + } + } + rawBuf[to++] = rawBuf[from]; + } + buf.setSize(to); + + while (to > 1) { // remove trailing excess + to--; + if ((rawBuf[to] == 10) || (rawBuf[to] == ' ')) + buf.setSize(to); + else break; + } +} + + +/****************************************************************************** + * RawStr4::readtext - gets text at a given offset + * + * ENT: + * start - starting offset where the text is located in the file + * size - size of text entry + * buf - buffer to store text + * + */ + +void RawStr4::readText(long istart, unsigned long *isize, char **idxbuf, SWBuf &buf) +{ + unsigned int ch; + char *idxbuflocal = 0; + getIDXBufDat(istart, &idxbuflocal); + long start = istart; + + do { + if (*idxbuf) + delete [] *idxbuf; + + buf = ""; + buf.setFillByte(0); + buf.setSize(++(*isize)); + + *idxbuf = new char [ (*isize) ]; + + datfd->seek(start, SEEK_SET); + datfd->read(buf.getRawData(), (int)((*isize) - 1)); + + for (ch = 0; buf[ch]; ch++) { // skip over index string + if (buf[ch] == 10) { + ch++; + break; + } + } + buf = SWBuf(buf.c_str()+ch); + // resolve link + if (!strncmp(buf.c_str(), "@LINK", 5)) { + for (ch = 0; buf[ch]; ch++) { // null before nl + if (buf[ch] == 10) { + buf[ch] = 0; + break; + } + } + findOffset(buf.c_str() + 6, &start, isize); + } + else break; + } + while (true); // while we're resolving links + + if (idxbuflocal) { + unsigned int localsize = strlen(idxbuflocal); + localsize = (localsize < (*isize - 1)) ? localsize : (*isize - 1); + strncpy(*idxbuf, idxbuflocal, localsize); + (*idxbuf)[localsize] = 0; + free(idxbuflocal); + } +} + + +/****************************************************************************** + * RawLD::settext - Sets text for current offset + * + * ENT: key - key for this entry + * buf - buffer to store + * len - length of buffer (0 - null terminated) + */ + +void RawStr4::doSetText(const char *ikey, const char *buf, long len) { + + long start, outstart; + long idxoff; + long endoff; + long shiftSize; + unsigned long size; + unsigned long outsize; + static const char nl[] = {13, 10}; + char *tmpbuf = 0; + char *key = 0; + char *dbKey = 0; + char *idxBytes = 0; + char *outbuf = 0; + char *ch = 0; + + char errorStatus = findOffset(ikey, &start, &size, 0, &idxoff); + stdstr(&key, ikey, 3); + toupperstr_utf8(key, strlen(key)*3); + + len = (len < 0) ? strlen(buf) : len; + getIDXBufDat(start, &dbKey); + + if (strcmp(key, dbKey) < 0) { + } + else if (strcmp(key, dbKey) > 0) { + if (errorStatus != (char)-2) // not a new file + idxoff += 8; + else idxoff = 0; + } + else if ((!strcmp(key, dbKey)) && (len>0/*we're not deleting*/)) { // got absolute entry + do { + tmpbuf = new char [ size + 2 ]; + memset(tmpbuf, 0, size + 2); + datfd->seek(start, SEEK_SET); + datfd->read(tmpbuf, (int)(size - 1)); + + for (ch = tmpbuf; *ch; ch++) { // skip over index string + if (*ch == 10) { + ch++; + break; + } + } + memmove(tmpbuf, ch, size - (unsigned long)(ch-tmpbuf)); + + // resolve link + if (!strncmp(tmpbuf, "@LINK", 5) && (len > 0)) { + for (ch = tmpbuf; *ch; ch++) { // null before nl + if (*ch == 10) { + *ch = 0; + break; + } + } + findOffset(tmpbuf + 8, &start, &size, 0, &idxoff); + ++size; + } + else break; + } + while (true); // while we're resolving links + } + + endoff = idxfd->seek(0, SEEK_END); + + shiftSize = endoff - idxoff; + + if (shiftSize > 0) { + idxBytes = new char [ shiftSize ]; + idxfd->seek(idxoff, SEEK_SET); + idxfd->read(idxBytes, shiftSize); + } + + outbuf = new char [ len + strlen(key) + 5 ]; + sprintf(outbuf, "%s%c%c", key, 13, 10); + size = strlen(outbuf); + memcpy(outbuf + size, buf, len); + size = outsize = size + len; + + start = outstart = datfd->seek(0, SEEK_END); + + outstart = archtosword32(start); + outsize = archtosword32(size); + + idxfd->seek(idxoff, SEEK_SET); + if (len>0) { + datfd->seek(start, SEEK_SET); + datfd->write(outbuf, (long)size); + + // add a new line to make data file easier to read in an editor + datfd->write(&nl, 2); + + idxfd->write(&outstart, 4); + idxfd->write(&outsize, 4); + if (idxBytes) { + idxfd->write(idxBytes, shiftSize); + delete [] idxBytes; + } + } + else { // delete entry + if (idxBytes) { + idxfd->write(idxBytes+8, shiftSize-8); + idxfd->seek(-1, SEEK_CUR); // last valid byte + FileMgr::getSystemFileMgr()->trunc(idxfd); // truncate index + delete [] idxBytes; + } + } + + delete [] key; + delete [] outbuf; + free(dbKey); +} + + +/****************************************************************************** + * RawLD::linkentry - links one entry to another + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * destidxoff - dest offset into .vss + * srcidxoff - source offset into .vss + */ + +void RawStr4::doLinkEntry(const char *destkey, const char *srckey) { + char *text = new char [ strlen(destkey) + 7 ]; + sprintf(text, "@LINK %s", destkey); + doSetText(srckey, text); + delete [] text; +} + + +/****************************************************************************** + * RawLD::CreateModule - Creates new module files + * + * ENT: path - directory to store module files + * RET: error status + */ + +signed char RawStr4::createModule(const char *ipath) +{ + char *path = 0; + char *buf = new char [ strlen (ipath) + 20 ]; + FileDesc *fd, *fd2; + + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + sprintf(buf, "%s.dat", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s.idx", path); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + FileMgr::getSystemFileMgr()->close(fd2); + + delete [] path; + + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/common/rawverse.cpp b/src/modules/common/rawverse.cpp new file mode 100644 index 0000000..934082c --- /dev/null +++ b/src/modules/common/rawverse.cpp @@ -0,0 +1,350 @@ +/****************************************************************************** + * rawverse.cpp - code for class 'RawVerse'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class VerseKey + */ + + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + + +SWORD_NAMESPACE_START + +/****************************************************************************** + * RawVerse Statics + */ + +int RawVerse::instance = 0; +const char *RawVerse::nl = "\r\n"; + + +/****************************************************************************** + * RawVerse Constructor - Initializes data for instance of RawVerse + * + * ENT: ipath - path of the directory where data and index files are located. + * be sure to include the trailing separator (e.g. '/' or '\') + * (e.g. 'modules/texts/rawtext/webster/') + */ + +RawVerse::RawVerse(const char *ipath, int fileMode) +{ + SWBuf buf; + + path = 0; + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + if (fileMode == -1) { // try read/write if possible + fileMode = FileMgr::RDWR; + } + + buf.setFormatted("%s/ot.vss", path); + idxfp[0] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/nt.vss", path); + idxfp[1] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/ot", path); + textfp[0] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/nt", path); + textfp[1] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + instance++; +} + + +/****************************************************************************** + * RawVerse Destructor - Cleans up instance of RawVerse + */ + +RawVerse::~RawVerse() +{ + int loop1; + + if (path) + delete [] path; + + --instance; + + for (loop1 = 0; loop1 < 2; loop1++) { + FileMgr::getSystemFileMgr()->close(idxfp[loop1]); + FileMgr::getSystemFileMgr()->close(textfp[loop1]); + } +} + + +/****************************************************************************** + * RawVerse::findoffset - Finds the offset of the key verse from the indexes + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * idxoff - offset into .vss + * start - address to store the starting offset + * size - address to store the size of the entry + */ + +void RawVerse::findOffset(char testmt, long idxoff, long *start, unsigned short *size) { + idxoff *= 6; + if (!testmt) + testmt = ((idxfp[1]) ? 1:2); + + if (idxfp[testmt-1]->getFd() >= 0) { + idxfp[testmt-1]->seek(idxoff, SEEK_SET); + idxfp[testmt-1]->read(start, 4); + long len = idxfp[testmt-1]->read(size, 2); // read size + + *start = swordtoarch32(*start); + *size = swordtoarch16(*size); + + if (len < 2) { + *size = (unsigned short)((*start) ? (textfp[testmt-1]->seek(0, SEEK_END) - (long)*start) : 0); // if for some reason we get an error reading size, make size to end of file + } + } + else { + *start = 0; + *size = 0; + } +} + + +/****************************************************************************** + * RawVerse::preptext - Prepares the text before returning it to external + * objects + * + * ENT: buf - buffer where text is stored and where to store the prep'd + * text. + */ + +void RawVerse::prepText(SWBuf &buf) { + unsigned int to, from; + char space = 0, cr = 0, realdata = 0, nlcnt = 0; + char *rawBuf = buf.getRawData(); + for (to = from = 0; rawBuf[from]; from++) { + switch (rawBuf[from]) { + case 10: + if (!realdata) + continue; + space = (cr) ? 0 : 1; + cr = 0; + nlcnt++; + if (nlcnt > 1) { +// *to++ = nl; + rawBuf[to++] = 10; +// *to++ = nl[1]; +// nlcnt = 0; + } + continue; + case 13: + if (!realdata) + continue; +// *to++ = nl[0]; + rawBuf[to++] = 10; + space = 0; + cr = 1; + continue; + } + realdata = 1; + nlcnt = 0; + if (space) { + space = 0; + if (rawBuf[from] != ' ') { + rawBuf[to++] = ' '; + from--; + continue; + } + } + rawBuf[to++] = rawBuf[from]; + } + buf.setSize(to); + + while (to > 1) { // remove trailing excess + to--; + if ((rawBuf[to] == 10) || (rawBuf[to] == ' ')) + buf.setSize(to); + else break; + } +} + + +/****************************************************************************** + * RawVerse::readtext - gets text at a given offset + * + * ENT: testmt - testament file to search in (0 - Old; 1 - New) + * start - starting offset where the text is located in the file + * size - size of text entry + 2 (null)(null) + * buf - buffer to store text + * + */ + +void RawVerse::readText(char testmt, long start, unsigned short size, SWBuf &buf) { + buf = ""; + buf.setFillByte(0); + buf.setSize(size + 1); + if (!testmt) + testmt = ((idxfp[1]) ? 1:2); + if (size) { + if (textfp[testmt-1]->getFd() >= 0) { + textfp[testmt-1]->seek(start, SEEK_SET); + textfp[testmt-1]->read(buf.getRawData(), (int)size); + } + } +} + + +/****************************************************************************** + * RawVerse::settext - Sets text for current offset + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * idxoff - offset into .vss + * buf - buffer to store + * len - length of buffer (0 - null terminated) + */ + +void RawVerse::doSetText(char testmt, long idxoff, const char *buf, long len) +{ + long start, outstart; + unsigned short size; + unsigned short outsize; + + idxoff *= 6; + if (!testmt) + testmt = ((idxfp[1]) ? 1:2); + + size = outsize = (len < 0) ? strlen(buf) : len; + + start = outstart = textfp[testmt-1]->seek(0, SEEK_END); + idxfp[testmt-1]->seek(idxoff, SEEK_SET); + + if (size) { + textfp[testmt-1]->seek(start, SEEK_SET); + textfp[testmt-1]->write(buf, (int)size); + + // add a new line to make data file easier to read in an editor + textfp[testmt-1]->write(nl, 2); + } + else { + start = 0; + } + + outstart = archtosword32(start); + outsize = archtosword16(size); + + idxfp[testmt-1]->write(&outstart, 4); + idxfp[testmt-1]->write(&outsize, 2); + + +} + + +/****************************************************************************** + * RawVerse::linkentry - links one entry to another + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * destidxoff - dest offset into .vss + * srcidxoff - source offset into .vss + */ + +void RawVerse::doLinkEntry(char testmt, long destidxoff, long srcidxoff) { + long start; + unsigned short size; + + destidxoff *= 6; + srcidxoff *= 6; + + if (!testmt) + testmt = ((idxfp[1]) ? 1:2); + + // get source + idxfp[testmt-1]->seek(srcidxoff, SEEK_SET); + idxfp[testmt-1]->read(&start, 4); + idxfp[testmt-1]->read(&size, 2); + + // write dest + idxfp[testmt-1]->seek(destidxoff, SEEK_SET); + idxfp[testmt-1]->write(&start, 4); + idxfp[testmt-1]->write(&size, 2); +} + + +/****************************************************************************** + * RawVerse::CreateModule - Creates new module files + * + * ENT: path - directory to store module files + * RET: error status + */ + +char RawVerse::createModule(const char *ipath) +{ + char *path = 0; + char *buf = new char [ strlen (ipath) + 20 ]; + FileDesc *fd, *fd2; + + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + sprintf(buf, "%s/ot", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s/nt", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s/ot.vss", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + + sprintf(buf, "%s/nt.vss", path); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + + VerseKey vk; + vk.Headings(1); + long offset = 0; + short size = 0; + for (vk = TOP; !vk.Error(); vk++) { + if (vk.Testament() == 1) { + fd->write(&offset, 4); + fd->write(&size, 2); + } + else { + fd2->write(&offset, 4); + fd2->write(&size, 2); + } + } + + FileMgr::getSystemFileMgr()->close(fd); + FileMgr::getSystemFileMgr()->close(fd2); + + delete [] path; + delete [] buf; +/* + RawVerse rv(path); + VerseKey mykey("Rev 22:21"); +*/ + + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/common/rawverse4.cpp b/src/modules/common/rawverse4.cpp new file mode 100644 index 0000000..bd438ec --- /dev/null +++ b/src/modules/common/rawverse4.cpp @@ -0,0 +1,350 @@ +/****************************************************************************** + * rawverse.cpp - code for class 'RawVerse4'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class VerseKey + */ + + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + + +SWORD_NAMESPACE_START + +/****************************************************************************** + * RawVerse4 Statics + */ + +int RawVerse4::instance = 0; +const char *RawVerse4::nl = "\r\n"; + + +/****************************************************************************** + * RawVerse4 Constructor - Initializes data for instance of RawVerse4 + * + * ENT: ipath - path of the directory where data and index files are located. + * be sure to include the trailing separator (e.g. '/' or '\') + * (e.g. 'modules/texts/rawtext/webster/') + */ + +RawVerse4::RawVerse4(const char *ipath, int fileMode) +{ + SWBuf buf; + + path = 0; + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + if (fileMode == -1) { // try read/write if possible + fileMode = FileMgr::RDWR; + } + + buf.setFormatted("%s/ot.vss", path); + idxfp[0] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/nt.vss", path); + idxfp[1] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/ot", path); + textfp[0] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/nt", path); + textfp[1] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + instance++; +} + + +/****************************************************************************** + * RawVerse4 Destructor - Cleans up instance of RawVerse4 + */ + +RawVerse4::~RawVerse4() +{ + int loop1; + + if (path) + delete [] path; + + --instance; + + for (loop1 = 0; loop1 < 2; loop1++) { + FileMgr::getSystemFileMgr()->close(idxfp[loop1]); + FileMgr::getSystemFileMgr()->close(textfp[loop1]); + } +} + + +/****************************************************************************** + * RawVerse4::findoffset - Finds the offset of the key verse from the indexes + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * idxoff - offset into .vss + * start - address to store the starting offset + * size - address to store the size of the entry + */ + +void RawVerse4::findOffset(char testmt, long idxoff, long *start, unsigned long *size) { + idxoff *= 8; + if (!testmt) + testmt = ((idxfp[1]) ? 1:2); + + if (idxfp[testmt-1]->getFd() >= 0) { + idxfp[testmt-1]->seek(idxoff, SEEK_SET); + idxfp[testmt-1]->read(start, 4); + long len = idxfp[testmt-1]->read(size, 4); // read size + + *start = swordtoarch32(*start); + *size = swordtoarch32(*size); + + if (len < 2) { + *size = (unsigned long)((*start) ? (textfp[testmt-1]->seek(0, SEEK_END) - (long)*start) : 0); // if for some reason we get an error reading size, make size to end of file + } + } + else { + *start = 0; + *size = 0; + } +} + + +/****************************************************************************** + * RawVerse4::preptext - Prepares the text before returning it to external + * objects + * + * ENT: buf - buffer where text is stored and where to store the prep'd + * text. + */ + +void RawVerse4::prepText(SWBuf &buf) { + unsigned int to, from; + char space = 0, cr = 0, realdata = 0, nlcnt = 0; + char *rawBuf = buf.getRawData(); + for (to = from = 0; rawBuf[from]; from++) { + switch (rawBuf[from]) { + case 10: + if (!realdata) + continue; + space = (cr) ? 0 : 1; + cr = 0; + nlcnt++; + if (nlcnt > 1) { +// *to++ = nl; + rawBuf[to++] = 10; +// *to++ = nl[1]; +// nlcnt = 0; + } + continue; + case 13: + if (!realdata) + continue; +// *to++ = nl[0]; + rawBuf[to++] = 10; + space = 0; + cr = 1; + continue; + } + realdata = 1; + nlcnt = 0; + if (space) { + space = 0; + if (rawBuf[from] != ' ') { + rawBuf[to++] = ' '; + from--; + continue; + } + } + rawBuf[to++] = rawBuf[from]; + } + buf.setSize(to); + + while (to > 1) { // remove trailing excess + to--; + if ((rawBuf[to] == 10) || (rawBuf[to] == ' ')) + buf.setSize(to); + else break; + } +} + + +/****************************************************************************** + * RawVerse4::readtext - gets text at a given offset + * + * ENT: testmt - testament file to search in (0 - Old; 1 - New) + * start - starting offset where the text is located in the file + * size - size of text entry + 2 (null)(null) + * buf - buffer to store text + * + */ + +void RawVerse4::readText(char testmt, long start, unsigned long size, SWBuf &buf) { + buf = ""; + buf.setFillByte(0); + buf.setSize(size + 1); + if (!testmt) + testmt = ((idxfp[1]) ? 1:2); + if (size) { + if (textfp[testmt-1]->getFd() >= 0) { + textfp[testmt-1]->seek(start, SEEK_SET); + textfp[testmt-1]->read(buf.getRawData(), (int)size); + } + } +} + + +/****************************************************************************** + * RawVerse4::settext - Sets text for current offset + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * idxoff - offset into .vss + * buf - buffer to store + * len - length of buffer (0 - null terminated) + */ + +void RawVerse4::doSetText(char testmt, long idxoff, const char *buf, long len) +{ + long start, outstart; + unsigned long size; + unsigned long outsize; + + idxoff *= 8; + if (!testmt) + testmt = ((idxfp[1]) ? 1:2); + + size = outsize = (len < 0) ? strlen(buf) : len; + + start = outstart = textfp[testmt-1]->seek(0, SEEK_END); + idxfp[testmt-1]->seek(idxoff, SEEK_SET); + + if (size) { + textfp[testmt-1]->seek(start, SEEK_SET); + textfp[testmt-1]->write(buf, (int)size); + + // add a new line to make data file easier to read in an editor + textfp[testmt-1]->write(nl, 2); + } + else { + start = 0; + } + + outstart = archtosword32(start); + outsize = archtosword32(size); + + idxfp[testmt-1]->write(&outstart, 4); + idxfp[testmt-1]->write(&outsize, 4); + + +} + + +/****************************************************************************** + * RawVerse4::linkentry - links one entry to another + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * destidxoff - dest offset into .vss + * srcidxoff - source offset into .vss + */ + +void RawVerse4::doLinkEntry(char testmt, long destidxoff, long srcidxoff) { + long start; + unsigned long size; + + destidxoff *= 8; + srcidxoff *= 8; + + if (!testmt) + testmt = ((idxfp[1]) ? 1:2); + + // get source + idxfp[testmt-1]->seek(srcidxoff, SEEK_SET); + idxfp[testmt-1]->read(&start, 4); + idxfp[testmt-1]->read(&size, 4); + + // write dest + idxfp[testmt-1]->seek(destidxoff, SEEK_SET); + idxfp[testmt-1]->write(&start, 4); + idxfp[testmt-1]->write(&size, 4); +} + + +/****************************************************************************** + * RawVerse4::CreateModule - Creates new module files + * + * ENT: path - directory to store module files + * RET: error status + */ + +char RawVerse4::createModule(const char *ipath) +{ + char *path = 0; + char *buf = new char [ strlen (ipath) + 20 ]; + FileDesc *fd, *fd2; + + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + sprintf(buf, "%s/ot", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s/nt", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s/ot.vss", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + + sprintf(buf, "%s/nt.vss", path); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + + VerseKey vk; + vk.Headings(1); + long offset = 0; + long size = 0; + for (vk = TOP; !vk.Error(); vk++) { + if (vk.Testament() == 1) { + fd->write(&offset, 4); + fd->write(&size, 4); + } + else { + fd2->write(&offset, 4); + fd2->write(&size, 4); + } + } + + FileMgr::getSystemFileMgr()->close(fd); + FileMgr::getSystemFileMgr()->close(fd2); + + delete [] path; + delete [] buf; +/* + RawVerse4 rv(path); + VerseKey mykey("Rev 22:21"); +*/ + + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/common/sapphire.cpp b/src/modules/common/sapphire.cpp new file mode 100644 index 0000000..a2c5ce0 --- /dev/null +++ b/src/modules/common/sapphire.cpp @@ -0,0 +1,216 @@ +/* sapphire.cpp -- the Saphire II stream cipher class. + Dedicated to the Public Domain the author and inventor: + (Michael Paul Johnson). This code comes with no warranty. + Use it at your own risk. + Ported from the Pascal implementation of the Sapphire Stream + Cipher 9 December 1994. + Added hash pre- and post-processing 27 December 1994. + Modified initialization to make index variables key dependent, + made the output function more resistant to cryptanalysis, + and renamed to Sapphire II 2 January 1995 +*/ + + +#include + +#include "sapphire.h" + +SWORD_NAMESPACE_START + +unsigned char sapphire::keyrand(int limit, + unsigned char *user_key, + unsigned char keysize, + unsigned char *rsum, + unsigned *keypos) + { + unsigned u, // Value from 0 to limit to return. + retry_limiter, // No infinite loops allowed. + mask; // Select just enough bits. + + if (!limit) return 0; // Avoid divide by zero error. + retry_limiter = 0; + mask = 1; // Fill mask with enough bits to cover + while (mask < (unsigned)limit) // the desired range. + mask = (mask << 1) + 1; + do + { + *rsum = cards[*rsum] + user_key[(*keypos)++]; + if (*keypos >= keysize) + { + *keypos = 0; // Recycle the user key. + *rsum += keysize; // key "aaaa" != key "aaaaaaaa" + } + u = mask & *rsum; + if (++retry_limiter > 11) + u %= limit; // Prevent very rare long loops. + } + while (u > (unsigned)limit); + return u; + } + +void sapphire::initialize(unsigned char *key, unsigned char keysize) + { + // Key size may be up to 256 bytes. + // Pass phrases may be used directly, with longer length + // compensating for the low entropy expected in such keys. + // Alternatively, shorter keys hashed from a pass phrase or + // generated randomly may be used. For random keys, lengths + // of from 4 to 16 bytes are recommended, depending on how + // secure you want this to be. + + int i; + unsigned char toswap, swaptemp, rsum; + unsigned keypos; + + // If we have been given no key, assume the default hash setup. + + if (keysize < 1) + { + hash_init(); + return; + } + + // Start with cards all in order, one of each. + + for (i=0;i<256;i++) + cards[i] = i; + + // Swap the card at each position with some other card. + + toswap = 0; + keypos = 0; // Start with first byte of user key. + rsum = 0; + for (i=255;i>=0;i--) + { + toswap = keyrand(i, key, keysize, &rsum, &keypos); + swaptemp = cards[i]; + cards[i] = cards[toswap]; + cards[toswap] = swaptemp; + } + + // Initialize the indices and data dependencies. + // Indices are set to different values instead of all 0 + // to reduce what is known about the state of the cards + // when the first byte is emitted. + + rotor = cards[1]; + ratchet = cards[3]; + avalanche = cards[5]; + last_plain = cards[7]; + last_cipher = cards[rsum]; + + toswap = swaptemp = rsum = 0; + keypos = 0; + } + +void sapphire::hash_init(void) + { + // This function is used to initialize non-keyed hash + // computation. + + int i, j; + + // Initialize the indices and data dependencies. + + rotor = 1; + ratchet = 3; + avalanche = 5; + last_plain = 7; + last_cipher = 11; + + // Start with cards all in inverse order. + + for (i=0, j=255;i<256;i++,j--) + cards[i] = (unsigned char) j; + } + +sapphire::sapphire(unsigned char *key, unsigned char keysize) + { + if (key && keysize) + initialize(key, keysize); + } + +void sapphire::burn(void) + { + // Destroy the key and state information in RAM. + memset(cards, 0, 256); + rotor = ratchet = avalanche = last_plain = last_cipher = 0; + } + +sapphire::~sapphire() + { + burn(); + } + +unsigned char sapphire::encrypt(unsigned char b) + { +#ifdef USBINARY + // Picture a single enigma rotor with 256 positions, rewired + // on the fly by card-shuffling. + + // This cipher is a variant of one invented and written + // by Michael Paul Johnson in November, 1993. + + unsigned char swaptemp; + + // Shuffle the deck a little more. + + ratchet += cards[rotor++]; + swaptemp = cards[last_cipher]; + cards[last_cipher] = cards[ratchet]; + cards[ratchet] = cards[last_plain]; + cards[last_plain] = cards[rotor]; + cards[rotor] = swaptemp; + avalanche += cards[swaptemp]; + + // Output one byte from the state in such a way as to make it + // very hard to figure out which one you are looking at. + + last_cipher = b^cards[(cards[ratchet] + cards[rotor]) & 0xFF] ^ + cards[cards[(cards[last_plain] + + cards[last_cipher] + + cards[avalanche])&0xFF]]; + last_plain = b; + return last_cipher; +#else + return b; +#endif + } + +unsigned char sapphire::decrypt(unsigned char b) + { + unsigned char swaptemp; + + // Shuffle the deck a little more. + + ratchet += cards[rotor++]; + swaptemp = cards[last_cipher]; + cards[last_cipher] = cards[ratchet]; + cards[ratchet] = cards[last_plain]; + cards[last_plain] = cards[rotor]; + cards[rotor] = swaptemp; + avalanche += cards[swaptemp]; + + // Output one byte from the state in such a way as to make it + // very hard to figure out which one you are looking at. + + last_plain = b^cards[(cards[ratchet] + cards[rotor]) & 0xFF] ^ + cards[cards[(cards[last_plain] + + cards[last_cipher] + + cards[avalanche])&0xFF]]; + last_cipher = b; + return last_plain; + } + +void sapphire::hash_final(unsigned char *hash, // Destination + unsigned char hashlength) // Size of hash. + { + int i; + + for (i=255;i>=0;i--) + encrypt((unsigned char) i); + for (i=0;i +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * SWCipher Constructor - Initializes data for instance of SWCipher + * + */ + +SWCipher::SWCipher(unsigned char *key) { + master.initialize(key, strlen((char *)key)); + buf = 0; +} + + +/****************************************************************************** + * SWCipher Destructor - Cleans up instance of SWCipher + */ + +SWCipher::~SWCipher() +{ + if (buf) + free(buf); +} + + +char *SWCipher::Buf(const char *ibuf, unsigned long ilen) +{ + if (ibuf) { + + if (buf) + free(buf); + + if (!ilen) { + len = strlen(buf); + ilen = len + 1; + } + else len = ilen; + + buf = (char *) malloc(ilen); + memcpy(buf, ibuf, ilen); + cipher = false; + } + + Decode(); + + return buf; +} + + +char *SWCipher::cipherBuf(unsigned long *ilen, const char *ibuf) +{ + if (ibuf) { + + if (buf) + free(buf); + + buf = (char *) malloc(*ilen+1); + memcpy(buf, ibuf, *ilen); + len = *ilen; + cipher = true; + } + + Encode(); + + *ilen = len; + return buf; +} + + +/****************************************************************************** + * SWCipher::Encode - This function "encodes" the input stream into the + * output stream. + * The GetChars() and SendChars() functions are + * used to separate this method from the actual + * i/o. + */ + +void SWCipher::Encode(void) +{ + if (!cipher) { + work = master; + for (unsigned long i = 0; i < len; i++) + buf[i] = work.encrypt(buf[i]); + cipher = true; + } +} + + +/****************************************************************************** + * SWCipher::Decode - This function "decodes" the input stream into the + * output stream. + * The GetChars() and SendChars() functions are + * used to separate this method from the actual + * i/o. + */ + +void SWCipher::Decode(void) +{ + if (cipher) { + work = master; + unsigned long i; + for (i = 0; i < len; i++) + buf[i] = work.decrypt(buf[i]); + buf[i] = 0; + cipher = false; + } +} + + +/****************************************************************************** + * SWCipher::setCipherKey - setter for a new CipherKey + * + */ + +void SWCipher::setCipherKey(const char *ikey) { + unsigned char *key = (unsigned char *)ikey; + master.initialize(key, strlen((char *)key)); +} + +SWORD_NAMESPACE_END diff --git a/src/modules/common/swcomprs.cpp b/src/modules/common/swcomprs.cpp new file mode 100644 index 0000000..02d7d7b --- /dev/null +++ b/src/modules/common/swcomprs.cpp @@ -0,0 +1,193 @@ +/****************************************************************************** + * swcomprs.cpp - code for class 'SWCompress'- a driver class that provides + * compression utilities. + */ + +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * SWCompress Constructor - Initializes data for instance of SWCompress + * + */ + +SWCompress::SWCompress() +{ + buf = zbuf = 0; + Init(); +} + + +/****************************************************************************** + * SWCompress Destructor - Cleans up instance of SWCompress + */ + +SWCompress::~SWCompress() +{ + if (zbuf) + free(zbuf); + + if (buf) + free(buf); +} + + +void SWCompress::Init() +{ + if (buf) + free(buf); + + if (zbuf) + free(zbuf); + + buf = 0; + zbuf = 0; + direct = 0; + zlen = 0; + slen = 0; + zpos = 0; + pos = 0; +} + + +char *SWCompress::Buf(const char *ibuf, unsigned long *len) { + // setting an uncompressed buffer + if (ibuf) { + Init(); + slen = (len) ? *len : strlen(ibuf); + buf = (char *) calloc(slen + 1, 1); + memcpy(buf, ibuf, slen); + } + + // getting an uncompressed buffer + if (!buf) { + buf = (char *)calloc(1,1); // be sure we at least allocate an empty buf for return; + direct = 1; + Decode(); +// slen = strlen(buf); + if (len) + *len = slen; + } + return buf; +} + + +char *SWCompress::zBuf(unsigned long *len, char *ibuf) +{ + // setting a compressed buffer + if (ibuf) { + Init(); + zbuf = (char *) malloc(*len); + memcpy(zbuf, ibuf, *len); + zlen = *len; + } + + // getting a compressed buffer + if (!zbuf) { + direct = 0; + Encode(); + } + + *len = zlen; + return zbuf; +} + + +unsigned long SWCompress::GetChars(char *ibuf, unsigned long len) +{ + if (direct) { + len = (((zlen - zpos) > (unsigned)len) ? len : zlen - zpos); + if (len > 0) { + memmove(ibuf, &zbuf[zpos], len); + zpos += len; + } + } + else { +// slen = strlen(buf); + len = (((slen - pos) > (unsigned)len) ? len : slen - pos); + if (len > 0) { + memmove(ibuf, &buf[pos], len); + pos += len; + } + } + return len; +} + + +unsigned long SWCompress::SendChars(char *ibuf, unsigned long len) +{ + if (direct) { + if (buf) { +// slen = strlen(buf); + if ((pos + len) > (unsigned)slen) { + buf = (char *) realloc(buf, pos + len + 1024); + memset(&buf[pos], 0, len + 1024); + } + } + else buf = (char *)calloc(1, len + 1024); + memmove(&buf[pos], ibuf, len); + pos += len; + } + else { + if (zbuf) { + if ((zpos + len) > zlen) { + zbuf = (char *) realloc(zbuf, zpos + len + 1024); + zlen = zpos + len + 1024; + } + } + else { + zbuf = (char *)calloc(1, len + 1024); + zlen = len + 1024; + } + memmove(&zbuf[zpos], ibuf, len); + zpos += len; + } + return len; +} + + +/****************************************************************************** + * SWCompress::Encode - This function "encodes" the input stream into the + * output stream. + * The GetChars() and SendChars() functions are + * used to separate this method from the actual + * i/o. + */ + +void SWCompress::Encode(void) +{ + cycleStream(); +} + + +/****************************************************************************** + * SWCompress::Decode - This function "decodes" the input stream into the + * output stream. + * The GetChars() and SendChars() functions are + * used to separate this method from the actual + * i/o. + */ + +void SWCompress::Decode(void) +{ + cycleStream(); +} + + +void SWCompress::cycleStream() { + char buf[1024]; + unsigned long len, totlen = 0; + + do { + len = GetChars(buf, 1024); + if (len) + totlen += SendChars(buf, len); + } while (len == 1024); + + zlen = slen = totlen; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/common/swcomprs.doc b/src/modules/common/swcomprs.doc new file mode 100644 index 0000000..b6817f2 --- /dev/null +++ b/src/modules/common/swcomprs.doc @@ -0,0 +1,802 @@ +The following is the original information send from Parson's Technologies via +Craig Rairden. +_______________________________________________________________________________ +Compression Info, 10-11-95 +Jeff Wheeler + +Source of Algorithm +------------------- + +The compression algorithms used here are based upon the algorithms developed +and published by Haruhiko Okumura in a paper entitled "Data Compression +Algorithms of LARC and LHarc." This paper discusses three compression +algorithms, LSZZ, LZARI, and LZHUF. LZSS is described as the "first" of +these, and is described as providing moderate compression with good speed. +LZARI is described as an improved LZSS, a combination of the LZSS algorithm +with adaptive arithmetic compression. It is described as being slower than +LZSS but with better compression. LZHUF (the basis of the common LHA +compression program) was included in the paper, however, a free usage license +was not included. + +The following are copies of the statements included at the beginning of each +source code listing that was supplied in the working paper. + + LZSS, dated 4/6/89, marked as "Use, distribute and + modify this program freely." + + LZARI, dated 4/7/89, marked as "Use, distribute and + modify this program freely." + + LZHUF, dated 11/20/88, written by Haruyasu Yoshizaki, + translated by Haruhiko Okumura on 4/7/89. Not + expressly marked as redistributable or modifiable. + +Since both LZSS and LZARI are marked as "use, distribute and modify freely" we +have felt at liberty basing our compression algorithm on either of these. + +Selection of Algorithm +---------------------- + +Working samples of three possible compression algorithms are supplied in +Okumura's paper. Which should be used? + +LZSS is the fastest at decompression, but does not generated as small a +compressed file as the other methods. The other two methods provided, perhaps, +a 15% improvement in compression. Or, put another way, on a 100K file, LZSS +might compress it to 50K while the others might approach 40-45K. For STEP +purposes, it was decided that decoding speed was of more importance than +tighter compression. For these reasons, the first compression algorithm +implemented is the LZSS algorithm. + +About LZSS Encoding +------------------- + +(adapted from Haruhiko Okumura's paper) + +This scheme was proposed by Ziv and Lempel [1]. A slightly modified version +is described by Storer and Szymanski [2]. An implementation using a binary +tree has been proposed by Bell [3]. + +The algorithm is quite simple. +1. Keep a ring buffer which initially contains all space characters. +2. Read several letters from the file to the buffer. +3. Search the buffer for the longest string that matches the letters just + read, and send its length and position into the buffer. + +If the ring buffer is 4096 bytes, the position can be stored in 12 bits. If the +length is represented in 4 bits, the pair is two bytes +long. If the longest match is no more than two characters, then just one +character is sent without encoding. The process starts again with the next +character. An extra bit is sent each time to tell the decoder whether the +next item is a character of a pair. + +[1] J. Ziv and A. Lempel, IEEE Transactions IT-23, 337-343 (1977). +[2] J. A. Storer and T. G. Szymanski, J. ACM, 29, 928-951 (1982). +[3] T.C. Gell, IEEE Transactions COM-34, 1176-1182 (1986). + +class SWCompress { +public: +void InitTree( // no return value + void); // no parameters + +void InsertNode( // no return value + short int Pos); // position in the buffer + +void DeleteNode( // no return value + short int Node); // node to be removed + +void Encode( // no return value + void); // no parameters + +void Decode( // no return value + void); // no parameters +}; + +// The following are constant sizes used by the compression algorithm. +// +// N - This is the size of the ring buffer. It is set +// to 4K. It is important to note that a position +// within the ring buffer requires 12 bits. +// +// F - This is the maximum length of a character sequence +// that can be taken from the ring buffer. It is set +// to 18. Note that a length must be 3 before it is +// worthwhile to store a position/length pair, so the +// length can be encoded in only 4 bits. Or, put yet +// another way, it is not necessary to encode a length +// of 0-18, it is necessary to encode a length of +// 3-18, which requires 4 bits. +// +// THRESHOLD - It takes 2 bytes to store an offset and +// a length. If a character sequence only +// requires 1 or 2 characters to store +// uncompressed, then it is better to store +// it uncompressed than as an offset into +// the ring buffer. +// +// Note that the 12 bits used to store the position and the 4 bits +// used to store the length equal a total of 16 bits, or 2 bytes. + +#define N 4096 +#define F 18 +#define THRESHOLD 3 +#define NOT_USED N + +// m_ring_buffer is a text buffer. It contains "nodes" of +// uncompressed text that can be indexed by position. That is, +// a substring of the ring buffer can be indexed by a position +// and a length. When decoding, the compressed text may contain +// a position in the ring buffer and a count of the number of +// bytes from the ring buffer that are to be moved into the +// uncompressed buffer. +// +// This ring buffer is not maintained as part of the compressed +// text. Instead, it is reconstructed dynamically. That is, +// it starts out empty and gets built as the text is decompressed. +// +// The ring buffer contain N bytes, with an additional F - 1 bytes +// to facilitate string comparison. + +unsigned char m_ring_buffer[N + F - 1]; + +// m_match_position and m_match_length are set by InsertNode(). +// +// These variables indicate the position in the ring buffer +// and the number of characters at that position that match +// a given string. + +short int m_match_position; +short int m_match_length; + +// m_lson, m_rson, and m_dad are the Japanese way of referring to +// a tree structure. The dad is the parent and it has a right and +// left son (child). +// +// For i = 0 to N-1, m_rson[i] and m_lson[i] will be the right +// and left children of node i. +// +// For i = 0 to N-1, m_dad[i] is the parent of node i. +// +// For i = 0 to 255, rson[N + i + 1] is the root of the tree for +// strings that begin with the character i. Note that this requires +// one byte characters. +// +// These nodes store values of 0...(N-1). Memory requirements +// can be reduces by using 2-byte integers instead of full 4-byte +// integers (for 32-bit applications). Therefore, these are +// defined as "short ints." + +short int m_lson[N + 1]; +short int m_rson[N + 257]; +short int m_dad[N + 1]; + + + + +/* + ------------------------------------------------------------------------- + cLZSS::InitTree + + This function initializes the tree nodes to "empty" states. + ------------------------------------------------------------------------- +*/ + +void cLZSS::InitTree( // no return value + void) // no parameters + throw() // exception list + + { + int i; + + // For i = 0 to N - 1, m_rson[i] and m_lson[i] will be the right + // and left children of node i. These nodes need not be + // initialized. However, for debugging purposes, it is nice to + // have them initialized. Since this is only used for compression + // (not decompression), I don't mind spending the time to do it. + // + // For the same range of i, m_dad[i] is the parent of node i. + // These are initialized to a known value that can represent + // a "not used" state. + + for (i = 0; i < N; i++) + { + m_lson[i] = NOT_USED; + m_rson[i] = NOT_USED; + m_dad[i] = NOT_USED; + } + + // For i = 0 to 255, m_rson[N + i + 1] is the root of the tree + // for strings that begin with the character i. This is why + // the right child array is larger than the left child array. + // These are also initialzied to a "not used" state. + // + // Note that there are 256 of these, one for each of the possible + // 256 characters. + + for (i = N + 1; i <= (N + 256); i++) + { + m_rson[i] = NOT_USED; + } + + // Done. + } + +/* + ------------------------------------------------------------------------- + cLZSS::InsertNode + + This function inserts a string from the ring buffer into one of + the trees. It loads the match position and length member variables + for the longest match. + + The string to be inserted is identified by the parameter Pos, + A full F bytes are inserted. So, m_ring_buffer[Pos ... Pos+F-1] + are inserted. + + If the matched length is exactly F, then an old node is removed + in favor of the new one (because the old one will be deleted + sooner). + + Note that Pos plays a dual role. It is used as both a position + in the ring buffer and also as a tree node. m_ring_buffer[Pos] + defines a character that is used to identify a tree node. + ------------------------------------------------------------------------- +*/ + +void cLZSS::InsertNode( // no return value + short int Pos) // position in the buffer + throw() // exception list + + { + short int i; + short int p; + int cmp; + unsigned char * key; + + ASSERT(Pos >= 0); + ASSERT(Pos < N); + + cmp = 1; + key = &(m_ring_buffer[Pos]); + + // The last 256 entries in m_rson contain the root nodes for + // strings that begin with a letter. Get an index for the + // first letter in this string. + + p = (short int) (N + 1 + key[0]); + + // Set the left and right tree nodes for this position to "not + // used." + + m_lson[Pos] = NOT_USED; + m_rson[Pos] = NOT_USED; + + // Haven't matched anything yet. + + m_match_length = 0; + + for ( ; ; ) + { + if (cmp >= 0) + { + if (m_rson[p] != NOT_USED) + { + p = m_rson[p]; + } + else + { + m_rson[p] = Pos; + m_dad[Pos] = p; + return; + } + } + else + { + if (m_lson[p] != NOT_USED) + { + p = m_lson[p]; + } + else + { + m_lson[p] = Pos; + m_dad[Pos] = p; + return; + } + } + + // Should we go to the right or the left to look for the + // next match? + + for (i = 1; i < F; i++) + { + cmp = key[i] - m_ring_buffer[p + i]; + if (cmp != 0) + break; + } + + if (i > m_match_length) + { + m_match_position = p; + m_match_length = i; + + if (i >= F) + break; + } + } + + m_dad[Pos] = m_dad[p]; + m_lson[Pos] = m_lson[p]; + m_rson[Pos] = m_rson[p]; + + m_dad[ m_lson[p] ] = Pos; + m_dad[ m_rson[p] ] = Pos; + + if (m_rson[ m_dad[p] ] == p) + { + m_rson[ m_dad[p] ] = Pos; + } + else + { + m_lson[ m_dad[p] ] = Pos; + } + + // Remove "p" + + m_dad[p] = NOT_USED; + } + +/* + ------------------------------------------------------------------------- + cLZSS::DeleteNode + + This function removes the node "Node" from the tree. + ------------------------------------------------------------------------- +*/ + +void cLZSS::DeleteNode( // no return value + short int Node) // node to be removed + throw() // exception list + + { + short int q; + + ASSERT(Node >= 0); + ASSERT(Node < (N+1)); + + if (m_dad[Node] == NOT_USED) + { + // not in tree, nothing to do + return; + } + + if (m_rson[Node] == NOT_USED) + { + q = m_lson[Node]; + } + else if (m_lson[Node] == NOT_USED) + { + q = m_rson[Node]; + } + else + { + q = m_lson[Node]; + if (m_rson[q] != NOT_USED) + { + do + { + q = m_rson[q]; + } + while (m_rson[q] != NOT_USED); + + m_rson[ m_dad[q] ] = m_lson[q]; + m_dad[ m_lson[q] ] = m_dad[q]; + m_lson[q] = m_lson[Node]; + m_dad[ m_lson[Node] ] = q; + } + + m_rson[q] = m_rson[Node]; + m_dad[ m_rson[Node] ] = q; + } + + m_dad[q] = m_dad[Node]; + + if (m_rson[ m_dad[Node] ] == Node) + { + m_rson[ m_dad[Node] ] = q; + } + else + { + m_lson[ m_dad[Node] ] = q; + } + + m_dad[Node] = NOT_USED; + } + +/* + ------------------------------------------------------------------------- + cLZSS::Encode + + This function "encodes" the input stream into the output stream. + The GetChars() and SendChars() functions are used to separate + this method from the actual i/o. + ------------------------------------------------------------------------- +*/ + +void cLZSS::Encode( // no return value + void) // no parameters + + { + short int i; // an iterator + short int r; // node number in the binary tree + short int s; // position in the ring buffer + unsigned short int len; // len of initial string + short int last_match_length; // length of last match + short int code_buf_pos; // position in the output buffer + unsigned char code_buf[17]; // the output buffer + unsigned char mask; // bit mask for byte 0 of out buf + unsigned char c; // character read from string + + // Start with a clean tree. + + InitTree(); + + // code_buf[0] works as eight flags. A "1" represents that the + // unit is an unencoded letter (1 byte), and a "0" represents + // that the next unit is a pair (2 bytes). + // + // code_buf[1..16] stores eight units of code. Since the best + // we can do is store eight pairs, at most 16 + // bytes are needed to store this. + // + // This is why the maximum size of the code buffer is 17 bytes. + + code_buf[0] = 0; + code_buf_pos = 1; + + // Mask iterates over the 8 bits in the code buffer. The first + // character ends up being stored in the low bit. + // + // bit 8 7 6 5 4 3 2 1 + // | | + // | first sequence in code buffer + // | + // last sequence in code buffer + + mask = 1; + + s = 0; + r = (short int) N - (short int) F; + + // Initialize the ring buffer with spaces... + + // Note that the last F bytes of the ring buffer are not filled. + // This is because those F bytes will be filled in immediately + // with bytes from the input stream. + + memset(m_ring_buffer, ' ', N - F); + + // Read F bytes into the last F bytes of the ring buffer. + // + // This function loads the buffer with X characters and returns + // the actual amount loaded. + + len = GetChars(&(m_ring_buffer[r]), F); + + // Make sure there is something to be compressed. + + if (len == 0) + return; + + // Insert the F strings, each of which begins with one or more + // 'space' characters. Note the order in which these strings + // are inserted. This way, degenerate trees will be less likely + // to occur. + + for (i = 1; i <= F; i++) + { + InsertNode((short int) (r - i)); + } + + // Finally, insert the whole string just read. The + // member variables match_length and match_position are set. + + InsertNode(r); + + // Now that we're preloaded, continue till done. + + do + { + + // m_match_length may be spuriously long near the end of + // text. + + if (m_match_length > len) + { + m_match_length = len; + } + + // Is it cheaper to store this as a single character? If so, + // make it so. + + if (m_match_length < THRESHOLD) + { + // Send one character. Remember that code_buf[0] is the + // set of flags for the next eight items. + + m_match_length = 1; + code_buf[0] |= mask; + code_buf[code_buf_pos++] = m_ring_buffer[r]; + } + + // Otherwise, we do indeed have a string that can be stored + // compressed to save space. + + else + { + // The next 16 bits need to contain the position (12 bits) + // and the length (4 bits). + + code_buf[code_buf_pos++] = (unsigned char) m_match_position; + code_buf[code_buf_pos++] = (unsigned char) ( + ((m_match_position >> 4) & 0xf0) | + (m_match_length - THRESHOLD) ); + } + + // Shift the mask one bit to the left so that it will be ready + // to store the new bit. + + mask = (unsigned char) (mask << 1); + + // If the mask is now 0, then we know that we have a full set + // of flags and items in the code buffer. These need to be + // output. + + if (mask == 0) + { + // code_buf is the buffer of characters to be output. + // code_buf_pos is the number of characters it contains. + + SendChars(code_buf, code_buf_pos); + + // Reset for next buffer... + + code_buf[0] = 0; + code_buf_pos = 1; + mask = 1; + } + + last_match_length = m_match_length; + + // Delete old strings and read new bytes... + + for (i = 0; i < last_match_length; i++) + { + + // Get next character... + + if (GetChars(&c, 1) != 1) + break; + + // Delete "old strings" + + DeleteNode(s); + + // Put this character into the ring buffer. + // + // The original comment here says "If the position is near + // the end of the buffer, extend the buffer to make + // string comparison easier." + // + // That's a little misleading, because the "end" of the + // buffer is really what we consider to be the "beginning" + // of the buffer, that is, positions 0 through F. + // + // The idea is that the front end of the buffer is duplicated + // into the back end so that when you're looking at characters + // at the back end of the buffer, you can index ahead (beyond + // the normal end of the buffer) and see the characters + // that are at the front end of the buffer wihtout having + // to adjust the index. + // + // That is... + // + // 1234xxxxxxxxxxxxxxxxxxxxxxxxxxxxx1234 + // | | | + // position 0 end of buffer | + // | + // duplicate of front of buffer + + m_ring_buffer[s] = c; + + if (s < F - 1) + { + m_ring_buffer[s + N] = c; + } + + // Increment the position, and wrap around when we're at + // the end. Note that this relies on N being a power of 2. + + s = (short int) ( (s + 1) & (N - 1) ); + r = (short int) ( (r + 1) & (N - 1) ); + + // Register the string that is found in + // m_ring_buffer[r..r+F-1]. + + InsertNode(r); + } + + // If we didn't quit because we hit the last_match_length, + // then we must have quit because we ran out of characters + // to process. + + while (i++ < last_match_length) + { + DeleteNode(s); + + s = (short int) ( (s + 1) & (N - 1) ); + r = (short int) ( (r + 1) & (N - 1) ); + + // Note that len hitting 0 is the key that causes the + // do...while() to terminate. This is the only place + // within the loop that len is modified. + // + // Its original value is F (or a number less than F for + // short strings). + + if (--len) + { + InsertNode(r); /* buffer may not be empty. */ + } + } + + // End of do...while() loop. Continue processing until there + // are no more characters to be compressed. The variable + // "len" is used to signal this condition. + } + while (len > 0); + + // There could still be something in the output buffer. Send it + // now. + + if (code_buf_pos > 1) + { + // code_buf is the encoded string to send. + // code_buf_ptr is the number of characters. + + SendChars(code_buf, code_buf_pos); + } + + // Done! + } + +/* + ------------------------------------------------------------------------- + cLZSS::Decode + + This function "decodes" the input stream into the output stream. + The GetChars() and SendChars() functions are used to separate + this method from the actual i/o. + ------------------------------------------------------------------------- +*/ + +void cLZSS::Decode( // no return value + void) // no parameters + + { + int k; + int r; // node number + unsigned char c[F]; // an array of chars + unsigned char flags; // 8 bits of flags + int flag_count; // which flag we're on + short int pos; // position in the ring buffer + short int len; // number of chars in ring buffer + + // Initialize the ring buffer with a common string. + // + // Note that the last F bytes of the ring buffer are not filled. + + memset(m_ring_buffer, ' ', N - F); + + r = N - F; + + flags = (char) 0; + flag_count = 0; + + for ( ; ; ) + { + + // If there are more bits of interest in this flag, then + // shift that next interesting bit into the 1's position. + // + // If this flag has been exhausted, the next byte must + // be a flag. + + if (flag_count > 0) + { + flags = (unsigned char) (flags >> 1); + flag_count--; + } + else + { + // Next byte must be a flag. + + if (GetChars(&flags, 1) != 1) + break; + + // Set the flag counter. While at first it might appear + // that this should be an 8 since there are 8 bits in the + // flag, it should really be a 7 because the shift must + // be performed 7 times in order to see all 8 bits. + + flag_count = 7; + } + + // If the low order bit of the flag is now set, then we know + // that the next byte is a single, unencoded character. + + if (flags & 1) + { + if (GetChars(c, 1) != 1) + break; + + if (SendChars(c, 1) != 1) + break; + + // Add to buffer, and increment to next spot. Wrap at end. + + m_ring_buffer[r] = c[0]; + r = (short int) ( (r + 1) & (N - 1) ); + } + + // Otherwise, we know that the next two bytes are a + // pair. The position is in 12 bits and + // the length is in 4 bits. + + else + { + // Original code: + // if ((i = getc(infile)) == EOF) + // break; + // if ((j = getc(infile)) == EOF) + // break; + // i |= ((j & 0xf0) << 4); + // j = (j & 0x0f) + THRESHOLD; + // + // I've modified this to only make one input call, and + // have changed the variable names to something more + // obvious. + + if (GetChars(c, 2) != 2) + break; + + // Convert these two characters into the position and + // length. Note that the length is always at least + // THRESHOLD, which is why we're able to get a length + // of 18 out of only 4 bits. + + pos = (short int) ( c[0] | ((c[1] & 0xf0) << 4) ); + + len = (short int) ( (c[1] & 0x0f) + THRESHOLD ); + + // There are now "len" characters at position "pos" in + // the ring buffer that can be pulled out. Note that + // len is never more than F. + + for (k = 0; k < len; k++) + { + c[k] = m_ring_buffer[(pos + k) & (N - 1)]; + + // Add to buffer, and increment to next spot. Wrap at end. + + m_ring_buffer[r] = c[k]; + r = (short int) ( (r + 1) & (N - 1) ); + } + + // Add the "len" characters to the output stream. + + if (SendChars(c, len) != len) + break; + } + } + } + diff --git a/src/modules/common/zipcomprs.cpp b/src/modules/common/zipcomprs.cpp new file mode 100644 index 0000000..21726bf --- /dev/null +++ b/src/modules/common/zipcomprs.cpp @@ -0,0 +1,164 @@ +/****************************************************************************** + * swcomprs.cpp - code for class 'ZipCompress'- a driver class that provides + * compression utilities. - using zlib + */ + +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * ZipCompress Constructor - Initializes data for instance of ZipCompress + * + */ + +ZipCompress::ZipCompress() : SWCompress() +{ +// fprintf(stderr, "init compress\n"); +} + + +/****************************************************************************** + * ZipCompress Destructor - Cleans up instance of ZipCompress + */ + +ZipCompress::~ZipCompress() { +} + + +/****************************************************************************** + * ZipCompress::Encode - This function "encodes" the input stream into the + * output stream. + * The GetChars() and SendChars() functions are + * used to separate this method from the actual + * i/o. + * NOTE: must set zlen for parent class to know length of + * compressed buffer. + */ + +void ZipCompress::Encode(void) +{ +/* +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be at least 0.1% larger than + sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the + compressed buffer. + This function can be used to compress a whole file at once if the + input file is mmap'ed. + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + direct = 0; // set direction needed by parent [Get|Send]Chars() + + // get buffer + char chunk[1024]; + char *buf = (char *)calloc(1, 1024); + char *chunkbuf = buf; + unsigned long chunklen; + unsigned long len = 0; + while((chunklen = GetChars(chunk, 1023))) { + memcpy(chunkbuf, chunk, chunklen); + len += chunklen; + if (chunklen < 1023) + break; + else buf = (char *)realloc(buf, len + 1024); + chunkbuf = buf+len; + } + + + zlen = (long) (len*1.001)+15; + char *zbuf = new char[zlen+1]; + if (len) + { + //printf("Doing compress\n"); + if (compress((Bytef*)zbuf, &zlen, (const Bytef*)buf, len) != Z_OK) + { + printf("ERROR in compression\n"); + } + else { + SendChars(zbuf, zlen); + } + } + else + { + fprintf(stderr, "ERROR: no buffer to compress\n"); + } + delete [] zbuf; + free (buf); +} + + +/****************************************************************************** + * ZipCompress::Decode - This function "decodes" the input stream into the + * output stream. + * The GetChars() and SendChars() functions are + * used to separate this method from the actual + * i/o. + */ + +void ZipCompress::Decode(void) +{ +/* +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +*/ + + // get buffer + char chunk[1024]; + char *zbuf = (char *)calloc(1, 1024); + char *chunkbuf = zbuf; + int chunklen; + unsigned long zlen = 0; + while((chunklen = GetChars(chunk, 1023))) { + memcpy(chunkbuf, chunk, chunklen); + zlen += chunklen; + if (chunklen < 1023) + break; + else zbuf = (char *)realloc(zbuf, zlen + 1024); + chunkbuf = zbuf + zlen; + } + + //printf("Decoding complength{%ld} uncomp{%ld}\n", zlen, blen); + if (zlen) { + unsigned long blen = zlen*20; // trust compression is less than 1000% + char *buf = new char[blen]; + //printf("Doing decompress {%s}\n", zbuf); + slen = 0; + switch (uncompress((Bytef*)buf, &blen, (Bytef*)zbuf, zlen)){ + case Z_OK: SendChars(buf, blen); slen = blen; break; + case Z_MEM_ERROR: fprintf(stderr, "ERROR: not enough memory during decompression.\n"); break; + case Z_BUF_ERROR: fprintf(stderr, "ERROR: not enough room in the out buffer during decompression.\n"); break; + case Z_DATA_ERROR: fprintf(stderr, "ERROR: corrupt data during decompression.\n"); break; + default: fprintf(stderr, "ERROR: an unknown error occured during decompression.\n"); break; + } + delete [] buf; + } + else { + fprintf(stderr, "ERROR: no buffer to decompress!\n"); + } + //printf("Finished decoding\n"); + free (zbuf); +} + +SWORD_NAMESPACE_END diff --git a/src/modules/common/zstr.cpp b/src/modules/common/zstr.cpp new file mode 100644 index 0000000..2539ff0 --- /dev/null +++ b/src/modules/common/zstr.cpp @@ -0,0 +1,731 @@ +/****************************************************************************** + * zstr.cpp - code for class 'zStr'- a module that reads compressed text + * files and provides lookup and parsing functions based on + * class StrKey + */ + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * zStr Statics + */ + +int zStr::instance = 0; +const int zStr::IDXENTRYSIZE = 8; +const int zStr::ZDXENTRYSIZE = 8; + + +/****************************************************************************** + * zStr Constructor - Initializes data for instance of zStr + * + * ENT: ipath - path of the directory where data and index files are located. + */ + +zStr::zStr(const char *ipath, int fileMode, long blockCount, SWCompress *icomp) +{ + SWBuf buf; + + nl = '\n'; + lastoff = -1; + path = 0; + stdstr(&path, ipath); + + compressor = (icomp) ? icomp : new SWCompress(); + this->blockCount = blockCount; + + if (fileMode == -1) { // try read/write if possible + fileMode = FileMgr::RDWR; + } + + buf.setFormatted("%s.idx", path); + idxfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s.dat", path); + datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s.zdx", path); + zdxfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s.zdt", path); + zdtfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + if (datfd <= 0) { + SWLog::getSystemLog()->logError("%d", errno); + } + + cacheBlock = 0; + cacheBlockIndex = -1; + cacheDirty = false; + + instance++; +} + + +/****************************************************************************** + * zStr Destructor - Cleans up instance of zStr + */ + +zStr::~zStr() { + + flushCache(); + + if (path) + delete [] path; + + --instance; + + FileMgr::getSystemFileMgr()->close(idxfd); + FileMgr::getSystemFileMgr()->close(datfd); + FileMgr::getSystemFileMgr()->close(zdxfd); + FileMgr::getSystemFileMgr()->close(zdtfd); + + + if (compressor) + delete compressor; + +} + + +/****************************************************************************** + * zStr::getidxbufdat - Gets the index string at the given dat offset + * NOTE: buf is calloc'd, or if not null, realloc'd and must + * be free'd by calling function + * + * ENT: ioffset - offset in dat file to lookup + * buf - address of pointer to allocate for storage of string + */ + +void zStr::getKeyFromDatOffset(long ioffset, char **buf) { + int size; + char ch; + if (datfd > 0) { + datfd->seek(ioffset, SEEK_SET); + for (size = 0; datfd->read(&ch, 1) == 1; size++) { + if ((ch == '\\') || (ch == 10) || (ch == 13)) + break; + } + *buf = (*buf) ? (char *)realloc(*buf, size*2 + 1) : (char *)malloc(size*2 + 1); + if (size) { + datfd->seek(ioffset, SEEK_SET); + datfd->read(*buf, size); + } + (*buf)[size] = 0; + toupperstr_utf8(*buf, size*2); + } + else { + *buf = (*buf) ? (char *)realloc(*buf, 1) : (char *)malloc(1); + **buf = 0; + } +} + + +/****************************************************************************** + * zStr::getidxbuf - Gets the index string at the given idx offset + * NOTE: buf is calloc'd, or if not null, realloc'd + * and must be freed by calling function + * + * ENT: ioffset - offset in idx file to lookup + * buf - address of pointer to allocate for storage of string + */ + +void zStr::getKeyFromIdxOffset(long ioffset, char **buf) { + __u32 offset; + + if (idxfd > 0) { + idxfd->seek(ioffset, SEEK_SET); + idxfd->read(&offset, sizeof(__u32)); + offset = swordtoarch32(offset); + getKeyFromDatOffset(offset, buf); + } +} + + +/****************************************************************************** + * zStr::findoffset - Finds the offset of the key string from the indexes + * + * ENT: key - key string to lookup + * offset - address to store the starting offset + * size - address to store the size of the entry + * away - number of entries before of after to jump + * (default = 0) + * + * RET: error status + */ + +signed char zStr::findKeyIndex(const char *ikey, long *idxoff, long away) { + char *maxbuf = 0, *trybuf = 0, *key = 0, quitflag = 0; + signed char retval = 0; + __s32 headoff, tailoff, tryoff = 0, maxoff = 0; + __u32 start, size; + int diff = 0; + + if (idxfd->getFd() >= 0) { + tailoff = maxoff = idxfd->seek(0, SEEK_END) - IDXENTRYSIZE; + if (*ikey) { + headoff = 0; + stdstr(&key, ikey, 3); + toupperstr_utf8(key, strlen(key)*3); + + int keylen = strlen(key); + bool substr = false; + + getKeyFromIdxOffset(maxoff, &maxbuf); + + while (headoff < tailoff) { + tryoff = (lastoff == -1) ? headoff + (((((tailoff / IDXENTRYSIZE) - (headoff / IDXENTRYSIZE))) / 2) * IDXENTRYSIZE) : lastoff; + lastoff = -1; + + getKeyFromIdxOffset(tryoff, &trybuf); + + if (!*trybuf && tryoff) { // In case of extra entry at end of idx (not first entry) + tryoff += (tryoff > (maxoff / 2))?-IDXENTRYSIZE:IDXENTRYSIZE; + retval = -1; + break; + } + + diff = strcmp(key, trybuf); + + if (!diff) + break; + + if (!strncmp(trybuf, key, keylen)) substr = true; + + if (diff < 0) + tailoff = (tryoff == headoff) ? headoff : tryoff; + else headoff = tryoff; + + if (tailoff == headoff + IDXENTRYSIZE) { + if (quitflag++) + headoff = tailoff; + } + } + + // didn't find exact match + if (headoff >= tailoff) { + tryoff = headoff; + if (!substr && ((tryoff != maxoff)||(strncmp(key, maxbuf, keylen)<0))) { + away--; // if our entry doesn't startwith our key, prefer the previous entry over the next + } + } + if (trybuf) + free(trybuf); + delete [] key; + if (maxbuf) + free(maxbuf); + } + else { tryoff = 0; } + + idxfd->seek(tryoff, SEEK_SET); + + start = size = 0; + retval = (idxfd->read(&start, sizeof(__u32))==sizeof(__u32)) ? retval : -1; + retval = (idxfd->read(&size, sizeof(__u32))==sizeof(__u32)) ? retval : -1; + start = swordtoarch32(start); + size = swordtoarch32(size); + + if (idxoff) + *idxoff = tryoff; + + while (away) { + __u32 laststart = start; + __u32 lastsize = size; + __s32 lasttry = tryoff; + tryoff += (away > 0) ? IDXENTRYSIZE : -IDXENTRYSIZE; + + bool bad = false; + if (((long)(tryoff + (away*IDXENTRYSIZE)) < -IDXENTRYSIZE) || (tryoff + (away*IDXENTRYSIZE) > (maxoff+IDXENTRYSIZE))) + bad = true; + else if (idxfd->seek(tryoff, SEEK_SET) < 0) + bad = true; + if (bad) { + retval = -1; + start = laststart; + size = lastsize; + tryoff = lasttry; + if (idxoff) + *idxoff = tryoff; + break; + } + idxfd->read(&start, sizeof(__u32)); + idxfd->read(&size, sizeof(__u32)); + start = swordtoarch32(start); + size = swordtoarch32(size); + + if (idxoff) + *idxoff = tryoff; + + + if (((laststart != start) || (lastsize != size)) && (start >= 0) && (size)) + away += (away < 0) ? 1 : -1; + } + + lastoff = tryoff; + } + else { + if (idxoff) + *idxoff = 0; + retval = -1; + } + return retval; +} + + +/****************************************************************************** + * zStr::preptext - Prepares the text before returning it to external + * objects + * + * ENT: buf - buffer where text is stored and where to store the prep'd + * text. + */ + +void zStr::prepText(SWBuf &buf) { + unsigned int to, from; + char space = 0, cr = 0, realdata = 0, nlcnt = 0; + char *rawBuf = buf.getRawData(); + for (to = from = 0; rawBuf[from]; from++) { + switch (rawBuf[from]) { + case 10: + if (!realdata) + continue; + space = (cr) ? 0 : 1; + cr = 0; + nlcnt++; + if (nlcnt > 1) { +// *to++ = nl; + rawBuf[to++] = 10; +// *to++ = nl[1]; +// nlcnt = 0; + } + continue; + case 13: + if (!realdata) + continue; +// *to++ = nl[0]; + rawBuf[to++] = 10; + space = 0; + cr = 1; + continue; + } + realdata = 1; + nlcnt = 0; + if (space) { + space = 0; + if (rawBuf[from] != ' ') { + rawBuf[to++] = ' '; + from--; + continue; + } + } + rawBuf[to++] = rawBuf[from]; + } + buf.setSize(to); + + while (to > 1) { // remove trailing excess + to--; + if ((rawBuf[to] == 10) || (rawBuf[to] == ' ')) + buf.setSize(to); + else break; + } +} + + +/****************************************************************************** + * zStr::getText - gets text at a given offset + * + * ENT: + * offset - idxoffset where the key is located. + * buf - buffer to store text + * idxbuf - buffer to store index key + * NOTE: buffer will be alloc'd / realloc'd and + * should be free'd by the client + * + */ + +void zStr::getText(long offset, char **idxbuf, char **buf) { + char *ch; + char *idxbuflocal = 0; + getKeyFromIdxOffset(offset, &idxbuflocal); + __u32 start; + __u32 size; + + do { + idxfd->seek(offset, SEEK_SET); + idxfd->read(&start, sizeof(__u32)); + idxfd->read(&size, sizeof(__u32)); + start = swordtoarch32(start); + size = swordtoarch32(size); + + *buf = (*buf) ? (char *)realloc(*buf, size*2 + 1) : (char *)malloc(size*2 + 1); + *idxbuf = (*idxbuf) ? (char *)realloc(*idxbuf, size*2 + 1) : (char *)malloc(size*2 + 1); + memset(*buf, 0, size + 1); + memset(*idxbuf, 0, size + 1); + datfd->seek(start, SEEK_SET); + datfd->read(*buf, (int)(size)); + + for (ch = *buf; *ch; ch++) { // skip over index string + if (*ch == 10) { + ch++; + break; + } + } + memmove(*buf, ch, size - (unsigned long)(ch-*buf)); + + // resolve link + if (!strncmp(*buf, "@LINK", 5)) { + for (ch = *buf; *ch; ch++) { // null before nl + if (*ch == 10) { + *ch = 0; + break; + } + } + findKeyIndex(*buf + 6, &offset); + } + else break; + } + while (true); // while we're resolving links + + if (idxbuflocal) { + __u32 localsize = strlen(idxbuflocal); + localsize = (localsize < (size - 1)) ? localsize : (size - 1); + strncpy(*idxbuf, idxbuflocal, localsize); + (*idxbuf)[localsize] = 0; + free(idxbuflocal); + } + __u32 block = 0; + __u32 entry = 0; + memmove(&block, *buf, sizeof(__u32)); + memmove(&entry, *buf + sizeof(__u32), sizeof(__u32)); + block = swordtoarch32(block); + entry = swordtoarch32(entry); + getCompressedText(block, entry, buf); +} + + +/****************************************************************************** + * zStr::getCompressedText - Get text entry from a compressed index / zdata + * file. + */ + +void zStr::getCompressedText(long block, long entry, char **buf) { + + __u32 size = 0; + + if (cacheBlockIndex != block) { + __u32 start = 0; + + zdxfd->seek(block * ZDXENTRYSIZE, SEEK_SET); + zdxfd->read(&start, sizeof(__u32)); + zdxfd->read(&size, sizeof(__u32)); + start = swordtoarch32(start); + size = swordtoarch32(size); + + SWBuf buf; + buf.setSize(size + 5); + zdtfd->seek(start, SEEK_SET); + zdtfd->read(buf.getRawData(), size); + + flushCache(); + + unsigned long len = size; + buf.setSize(size); + rawZFilter(buf, 0); // 0 = decipher + + compressor->zBuf(&len, buf.getRawData()); + char *rawBuf = compressor->Buf(0, &len); + cacheBlock = new EntriesBlock(rawBuf, len); + cacheBlockIndex = block; + } + size = cacheBlock->getEntrySize(entry); + *buf = (*buf) ? (char *)realloc(*buf, size*2 + 1) : (char *)malloc(size*2 + 1); + strcpy(*buf, cacheBlock->getEntry(entry)); +} + + +/****************************************************************************** + * zLD::settext - Sets text for current offset + * + * ENT: key - key for this entry + * buf - buffer to store + * len - length of buffer (0 - null terminated) + */ + +void zStr::setText(const char *ikey, const char *buf, long len) { + + __u32 start, outstart; + __u32 size, outsize; + __s32 endoff; + long idxoff = 0; + __s32 shiftSize; + static const char nl[] = {13, 10}; + char *tmpbuf = 0; + char *key = 0; + char *dbKey = 0; + char *idxBytes = 0; + char *outbuf = 0; + char *ch = 0; + + len = (len < 0) ? strlen(buf) : len; + stdstr(&key, ikey, 3); + toupperstr_utf8(key, strlen(key)*3); + + char notFound = findKeyIndex(ikey, &idxoff, 0); + if (!notFound) { + getKeyFromIdxOffset(idxoff, &dbKey); + int diff = strcmp(key, dbKey); + if (diff < 0) { + } + else if (diff > 0) { + idxoff += IDXENTRYSIZE; + } + else if ((!diff) && (len > 0 /*we're not deleting*/)) { // got absolute entry + do { + idxfd->seek(idxoff, SEEK_SET); + idxfd->read(&start, sizeof(__u32)); + idxfd->read(&size, sizeof(__u32)); + start = swordtoarch32(start); + size = swordtoarch32(size); + + tmpbuf = new char [ size + 2 ]; + memset(tmpbuf, 0, size + 2); + datfd->seek(start, SEEK_SET); + datfd->read(tmpbuf, size); + + for (ch = tmpbuf; *ch; ch++) { // skip over index string + if (*ch == 10) { + ch++; + break; + } + } + memmove(tmpbuf, ch, size - (unsigned long)(ch-tmpbuf)); + + // resolve link + if (!strncmp(tmpbuf, "@LINK", 5) && (len)) { + for (ch = tmpbuf; *ch; ch++) { // null before nl + if (*ch == 10) { + *ch = 0; + break; + } + } + findKeyIndex(tmpbuf + IDXENTRYSIZE, &idxoff); + delete [] tmpbuf; + } + else break; + } + while (true); // while we're resolving links + } + } + + endoff = idxfd->seek(0, SEEK_END); + + shiftSize = endoff - idxoff; + + if (shiftSize > 0) { + idxBytes = new char [ shiftSize ]; + idxfd->seek(idxoff, SEEK_SET); + idxfd->read(idxBytes, shiftSize); + } + + outbuf = new char [ len + strlen(key) + 5 ]; + sprintf(outbuf, "%s%c%c", key, 13, 10); + size = strlen(outbuf); + if (len > 0) { // NOT a link + if (!cacheBlock) { + flushCache(); + cacheBlock = new EntriesBlock(); + cacheBlockIndex = (zdxfd->seek(0, SEEK_END) / ZDXENTRYSIZE); + } + else if (cacheBlock->getCount() >= blockCount) { + flushCache(); + cacheBlock = new EntriesBlock(); + cacheBlockIndex = (zdxfd->seek(0, SEEK_END) / ZDXENTRYSIZE); + } + __u32 entry = cacheBlock->addEntry(buf); + cacheDirty = true; + outstart = archtosword32(cacheBlockIndex); + outsize = archtosword32(entry); + memcpy (outbuf + size, &outstart, sizeof(__u32)); + memcpy (outbuf + size + sizeof(__u32), &outsize, sizeof(__u32)); + size += (sizeof(__u32) * 2); + } + else { // link + memcpy(outbuf + size, buf, len); + size += len; + } + + start = datfd->seek(0, SEEK_END); + + outstart = archtosword32(start); + outsize = archtosword32(size); + + idxfd->seek(idxoff, SEEK_SET); + if (len > 0) { + datfd->seek(start, SEEK_SET); + datfd->write(outbuf, size); + + // add a new line to make data file easier to read in an editor + datfd->write(&nl, 2); + + idxfd->write(&outstart, sizeof(__u32)); + idxfd->write(&outsize, sizeof(__u32)); + if (idxBytes) { + idxfd->write(idxBytes, shiftSize); + } + } + else { // delete entry + if (idxBytes) { + idxfd->write(idxBytes+IDXENTRYSIZE, shiftSize-IDXENTRYSIZE); + idxfd->seek(-1, SEEK_CUR); // last valid byte + FileMgr::getSystemFileMgr()->trunc(idxfd); // truncate index + } + } + + if (idxBytes) + delete [] idxBytes; + delete [] key; + delete [] outbuf; + free(dbKey); +} + + +/****************************************************************************** + * zLD::linkentry - links one entry to another + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * destidxoff - dest offset into .vss + * srcidxoff - source offset into .vss + */ + +void zStr::linkEntry(const char *destkey, const char *srckey) { + char *text = new char [ strlen(destkey) + 7 ]; + sprintf(text, "@LINK %s", destkey); + setText(srckey, text); + delete [] text; +} + + +void zStr::flushCache() { + if (cacheBlock) { + if (cacheDirty) { + __u32 start = 0; + unsigned long size = 0; + __u32 outstart = 0, outsize = 0; + + const char *rawBuf = cacheBlock->getRawData(&size); + compressor->Buf(rawBuf, &size); + compressor->zBuf(&size); + + SWBuf buf; + buf.setSize(size + 5); + memcpy(buf.getRawData(), compressor->zBuf(&size), size); // 1 = encipher + buf.setSize(size); + rawZFilter(buf, 1); // 1 = encipher + + long zdxSize = zdxfd->seek(0, SEEK_END); + unsigned long zdtSize = zdtfd->seek(0, SEEK_END); + + if ((cacheBlockIndex * ZDXENTRYSIZE) > (zdxSize - ZDXENTRYSIZE)) { // New Block + start = zdtSize; + } + else { + zdxfd->seek(cacheBlockIndex * ZDXENTRYSIZE, SEEK_SET); + zdxfd->read(&start, sizeof(__u32)); + zdxfd->read(&outsize, sizeof(__u32)); + start = swordtoarch32(start); + outsize = swordtoarch32(outsize); + if (start + outsize >= zdtSize) { // last entry, just overwrite + // start is already set + } + else if (size < outsize) { // middle entry, but smaller, that's fine and let's preserve bigger size + size = outsize; + } + else { // middle and bigger-- we have serious problems, for now let's put it at the end = lots of wasted space + start = zdtSize; + } + } + + + + outstart = archtosword32(start); + outsize = archtosword32((__u32)size); + + zdxfd->seek(cacheBlockIndex * ZDXENTRYSIZE, SEEK_SET); + zdtfd->seek(start, SEEK_SET); + zdtfd->write(buf, size); + + // add a new line to make data file easier to read in an editor + zdtfd->write(&nl, 2); + + zdxfd->write(&outstart, sizeof(__u32)); + zdxfd->write(&outsize, sizeof(__u32)); + } + delete cacheBlock; + cacheBlock = 0; + } + cacheBlockIndex = -1; + cacheDirty = false; +} + + +/****************************************************************************** + * zLD::CreateModule - Creates new module files + * + * ENT: path - directory to store module files + * RET: error status + */ + +signed char zStr::createModule(const char *ipath) { + char *path = 0; + char *buf = new char [ strlen (ipath) + 20 ]; + FileDesc *fd, *fd2; + + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + sprintf(buf, "%s.dat", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s.idx", path); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + FileMgr::getSystemFileMgr()->close(fd2); + + sprintf(buf, "%s.zdt", path); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + FileMgr::getSystemFileMgr()->close(fd2); + + sprintf(buf, "%s.zdx", path); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + FileMgr::getSystemFileMgr()->close(fd2); + + delete [] path; + + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/common/zverse.cpp b/src/modules/common/zverse.cpp new file mode 100644 index 0000000..3f91918 --- /dev/null +++ b/src/modules/common/zverse.cpp @@ -0,0 +1,538 @@ +/****************************************************************************** + * zverse.h - code for class 'zVerse'- a module that reads raw text + * files: ot and nt using indexs ??.bks ??.cps ??.vss + * and provides lookup and parsing functions based on + * class VerseKey for compressed modules + */ + + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +SWORD_NAMESPACE_START + +/****************************************************************************** + * zVerse Statics + */ + +int zVerse::instance = 0; + +const char zVerse::uniqueIndexID[] = {'X', 'r', 'v', 'c', 'b'}; + +/****************************************************************************** + * zVerse Constructor - Initializes data for instance of zVerse + * + * ENT: ipath - path of the directory where data and index files are located. + * be sure to include the trailing separator (e.g. '/' or '\') + * (e.g. 'modules/texts/rawtext/webster/') + * fileMode - open mode for the files (FileMgr::RDONLY, etc.) + * blockType - verse, chapter, book, etc. + */ + +zVerse::zVerse(const char *ipath, int fileMode, int blockType, SWCompress *icomp) +{ + // this line, instead of just defaulting, to keep FileMgr out of header + if (fileMode == -1) fileMode = FileMgr::RDONLY; + + SWBuf buf; + + nl = '\n'; + path = 0; + cacheBufIdx = -1; + cacheTestament = 0; + cacheBuf = 0; + dirtyCache = false; + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + compressor = (icomp) ? icomp : new SWCompress(); + + if (fileMode == -1) { // try read/write if possible + fileMode = FileMgr::RDWR; + } + + buf.setFormatted("%s/ot.%czs", path, uniqueIndexID[blockType]); + idxfp[0] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/nt.%czs", path, uniqueIndexID[blockType]); + idxfp[1] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/ot.%czz", path, uniqueIndexID[blockType]); + textfp[0] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/nt.%czz", path, uniqueIndexID[blockType]); + textfp[1] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/ot.%czv", path, uniqueIndexID[blockType]); + compfp[0] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + buf.setFormatted("%s/nt.%czv", path, uniqueIndexID[blockType]); + compfp[1] = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); + + instance++; +} + + +/****************************************************************************** + * zVerse Destructor - Cleans up instance of zVerse + */ + +zVerse::~zVerse() +{ + int loop1; + + if (cacheBuf) { + flushCache(); + free(cacheBuf); + } + + if (path) + delete [] path; + + if (compressor) + delete compressor; + + --instance; + + for (loop1 = 0; loop1 < 2; loop1++) { + FileMgr::getSystemFileMgr()->close(idxfp[loop1]); + FileMgr::getSystemFileMgr()->close(textfp[loop1]); + FileMgr::getSystemFileMgr()->close(compfp[loop1]); + } +} + + +/****************************************************************************** + * zVerse::findoffset - Finds the offset of the key verse from the indexes + * + * + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * book - book to find (0 - testament introduction) + * chapter - chapter to find (0 - book introduction) + * verse - verse to find (0 - chapter introduction) + * start - address to store the starting offset + * size - address to store the size of the entry + */ + +void zVerse::findOffset(char testmt, long idxoff, long *start, unsigned short *size) +{ + // set start to offset in + // set size to + // set + unsigned long ulBuffNum=0; // buffer number + unsigned long ulVerseStart=0; // verse offset within buffer + unsigned short usVerseSize=0; // verse size + unsigned long ulCompOffset=0; // compressed buffer start + unsigned long ulCompSize=0; // buffer size compressed + unsigned long ulUnCompSize=0; // buffer size uncompressed + + *start = *size = 0; + //printf ("Finding offset %ld\n", idxoff); + idxoff *= 10; + if (!testmt) { + testmt = ((idxfp[0]) ? 1:2); + } + + // assert we have and valid file descriptor + if (compfp[testmt-1]->getFd() < 1) + return; + + long newOffset = compfp[testmt-1]->seek(idxoff, SEEK_SET); + if (newOffset == idxoff) { + if (compfp[testmt-1]->read(&ulBuffNum, 4) != 4) { + printf ("Error reading ulBuffNum\n"); + return; + } + } + else return; + + ulBuffNum = swordtoarch32(ulBuffNum); + + if (compfp[testmt-1]->read(&ulVerseStart, 4) < 2) + { + printf ("Error reading ulVerseStart\n"); + return; + } + if (compfp[testmt-1]->read(&usVerseSize, 2) < 2) + { + printf ("Error reading usVerseSize\n"); + return; + } + + *start = swordtoarch32(ulVerseStart); + *size = swordtoarch16(usVerseSize); + + if (*size) { + if (((long) ulBuffNum == cacheBufIdx) && (testmt == cacheTestament) && (cacheBuf)) { + // have the text buffered + return; + } + + //printf ("Got buffer number{%ld} versestart{%ld} versesize{%d}\n", ulBuffNum, ulVerseStart, usVerseSize); + + + if (idxfp[testmt-1]->seek(ulBuffNum*12, SEEK_SET)!=(long) ulBuffNum*12) + { + printf ("Error seeking compressed file index\n"); + return; + } + if (idxfp[testmt-1]->read(&ulCompOffset, 4)<4) + { + printf ("Error reading ulCompOffset\n"); + return; + } + if (idxfp[testmt-1]->read(&ulCompSize, 4)<4) + { + printf ("Error reading ulCompSize\n"); + return; + } + if (idxfp[testmt-1]->read(&ulUnCompSize, 4)<4) + { + printf ("Error reading ulUnCompSize\n"); + return; + } + + ulCompOffset = swordtoarch32(ulCompOffset); + ulCompSize = swordtoarch32(ulCompSize); + ulUnCompSize = swordtoarch32(ulUnCompSize); + + if (textfp[testmt-1]->seek(ulCompOffset, SEEK_SET)!=(long)ulCompOffset) + { + printf ("Error: could not seek to right place in compressed text\n"); + return; + } + SWBuf pcCompText; + pcCompText.setSize(ulCompSize+5); + + if (textfp[testmt-1]->read(pcCompText.getRawData(), ulCompSize)<(long)ulCompSize) { + printf ("Error reading compressed text\n"); + return; + } + pcCompText.setSize(ulCompSize); + rawZFilter(pcCompText, 0); // 0 = decipher + + compressor->zBuf(&ulCompSize, pcCompText.getRawData()); + + if (cacheBuf) { + flushCache(); + free(cacheBuf); + } + + unsigned long len = 0; + compressor->Buf(0, &len); + cacheBuf = (char *)calloc(len + 1, 1); + memcpy(cacheBuf, compressor->Buf(), len); + + cacheTestament = testmt; + cacheBufIdx = ulBuffNum; + } +} + + +/****************************************************************************** + * zVerse::zreadtext - gets text at a given offset + * + * ENT: testmt - testament file to search in (0 - Old; 1 - New) + * start - starting offset where the text is located in the file + * size - size of text entry + 1 (null) + * buf - buffer to store text + * + */ + +void zVerse::zReadText(char testmt, long start, unsigned short size, SWBuf &inBuf) { + inBuf = ""; + if ( (size > 0) && cacheBuf && ((unsigned)start < strlen(cacheBuf)) ){ //TODO: optimize this, remove strlen + inBuf.setFillByte(0); + inBuf.setSize(size+1); + strncpy(inBuf.getRawData(), &(cacheBuf[start]), size); + inBuf.setSize(strlen(inBuf.c_str())); + } +} + + +/****************************************************************************** + * zVerse::settext - Sets text for current offset + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * idxoff - offset into .vss + * buf - buffer to store + * len - length of buffer (0 - null terminated) + */ + +void zVerse::doSetText(char testmt, long idxoff, const char *buf, long len) { + + len = (len < 0) ? strlen(buf) : len; + if (!testmt) + testmt = ((idxfp[0]) ? 1:2); + if ((!dirtyCache) || (cacheBufIdx < 0)) { + cacheBufIdx = idxfp[testmt-1]->seek(0, SEEK_END) / 12; + cacheTestament = testmt; + if (cacheBuf) + free(cacheBuf); + cacheBuf = (char *)calloc(len + 1, 1); + } + else cacheBuf = (char *)((cacheBuf)?realloc(cacheBuf, strlen(cacheBuf)+(len + 1)):calloc((len + 1), 1)); + + dirtyCache = true; + + unsigned long start, outstart; + unsigned long outBufIdx = cacheBufIdx; + unsigned short size; + unsigned short outsize; + + idxoff *= 10; + size = outsize = len; + + start = strlen(cacheBuf); + + if (!size) + start = outBufIdx = 0; + + outBufIdx = archtosword32(outBufIdx); + outstart = archtosword32(start); + outsize = archtosword16(size); + + compfp[testmt-1]->seek(idxoff, SEEK_SET); + compfp[testmt-1]->write(&outBufIdx, 4); + compfp[testmt-1]->write(&outstart, 4); + compfp[testmt-1]->write(&outsize, 2); + strcat(cacheBuf, buf); +} + + +void zVerse::flushCache() { + if (dirtyCache) { + unsigned long idxoff; + unsigned long start, outstart; + unsigned long size, outsize; + unsigned long zsize, outzsize; + + idxoff = cacheBufIdx * 12; + if (cacheBuf) { + size = outsize = zsize = outzsize = strlen(cacheBuf); + if (size) { + // if (compressor) { + // delete compressor; + // compressor = new LZSSCompress(); + // } + compressor->Buf(cacheBuf); + compressor->zBuf(&zsize); + outzsize = zsize; + + SWBuf buf; + buf.setSize(zsize + 5); + memcpy(buf.getRawData(), compressor->zBuf(&zsize), zsize); + buf.setSize(zsize); + rawZFilter(buf, 1); // 1 = encipher + + start = outstart = textfp[cacheTestament-1]->seek(0, SEEK_END); + + outstart = archtosword32(start); + outsize = archtosword32(size); + outzsize = archtosword32(zsize); + + textfp[cacheTestament-1]->write(buf, zsize); + + idxfp[cacheTestament-1]->seek(idxoff, SEEK_SET); + idxfp[cacheTestament-1]->write(&outstart, 4); + idxfp[cacheTestament-1]->write(&outzsize, 4); + idxfp[cacheTestament-1]->write(&outsize, 4); + } + free(cacheBuf); + cacheBuf = 0; + } + dirtyCache = false; + } +} + +/****************************************************************************** + * RawVerse::linkentry - links one entry to another + * + * ENT: testmt - testament to find (0 - Bible/module introduction) + * destidxoff - dest offset into .vss + * srcidxoff - source offset into .vss + */ + +void zVerse::doLinkEntry(char testmt, long destidxoff, long srcidxoff) { + long bufidx; + long start; + unsigned short size; + + destidxoff *= 10; + srcidxoff *= 10; + + if (!testmt) + testmt = ((idxfp[1]) ? 1:2); + + // get source + compfp[testmt-1]->seek(srcidxoff, SEEK_SET); + compfp[testmt-1]->read(&bufidx, 4); + compfp[testmt-1]->read(&start, 4); + compfp[testmt-1]->read(&size, 2); + + // write dest + compfp[testmt-1]->seek(destidxoff, SEEK_SET); + compfp[testmt-1]->write(&bufidx, 4); + compfp[testmt-1]->write(&start, 4); + compfp[testmt-1]->write(&size, 2); +} + + +/****************************************************************************** + * RawVerse::CreateModule - Creates new module files + * + * ENT: path - directory to store module files + * RET: error status + */ + +char zVerse::createModule(const char *ipath, int blockBound) +{ + char *path = 0; + char *buf = new char [ strlen (ipath) + 20 ]; + FileDesc *fd, *fd2; + + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + sprintf(buf, "%s/ot.%czs", path, uniqueIndexID[blockBound]); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s/nt.%czs", path, uniqueIndexID[blockBound]); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s/ot.%czz", path, uniqueIndexID[blockBound]); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s/nt.%czz", path, uniqueIndexID[blockBound]); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + sprintf(buf, "%s/ot.%czv", path, uniqueIndexID[blockBound]); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + + sprintf(buf, "%s/nt.%czv", path, uniqueIndexID[blockBound]); + FileMgr::removeFile(buf); + fd2 = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd2->getFd(); + + VerseKey vk; + vk.Headings(1); + long offset = 0; + short size = 0; + for (vk = TOP; !vk.Error(); vk++) { + if (vk.Testament() == 1) { + fd->write(&offset, 4); //compBufIdxOffset + fd->write(&offset, 4); + fd->write(&size, 2); + } + else { + fd2->write(&offset, 4); //compBufIdxOffset + fd2->write(&offset, 4); + fd2->write(&size, 2); + } + } + + FileMgr::getSystemFileMgr()->close(fd); + FileMgr::getSystemFileMgr()->close(fd2); + + delete [] path; + delete [] buf; +/* + RawVerse rv(path); + VerseKey mykey("Rev 22:21"); +*/ + + return 0; +} + + +/****************************************************************************** + * zVerse::preptext - Prepares the text before returning it to external + * objects + * + * ENT: buf - buffer where text is stored and where to store the prep'd + * text. + */ + +void zVerse::prepText(SWBuf &buf) { + unsigned int to, from; + char space = 0, cr = 0, realdata = 0, nlcnt = 0; + char *rawBuf = buf.getRawData(); + for (to = from = 0; rawBuf[from]; from++) { + switch (rawBuf[from]) { + case 10: + if (!realdata) + continue; + space = (cr) ? 0 : 1; + cr = 0; + nlcnt++; + if (nlcnt > 1) { +// *to++ = nl; + rawBuf[to++] = 10; +// *to++ = nl[1]; +// nlcnt = 0; + } + continue; + case 13: + if (!realdata) + continue; +// *to++ = nl[0]; + rawBuf[to++] = 10; + space = 0; + cr = 1; + continue; + } + realdata = 1; + nlcnt = 0; + if (space) { + space = 0; + if (rawBuf[from] != ' ') { + rawBuf[to++] = ' '; + from--; + continue; + } + } + rawBuf[to++] = rawBuf[from]; + } + buf.setSize(to); + + while (to > 1) { // remove trailing excess + to--; + if ((rawBuf[to] == 10) || (rawBuf[to] == ' ')) + buf.setSize(to); + else break; + } +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/Makefile b/src/modules/filters/Makefile new file mode 100644 index 0000000..1a2d00d --- /dev/null +++ b/src/modules/filters/Makefile @@ -0,0 +1,5 @@ + +root := ../../.. + +all: + make -C ${root} diff --git a/src/modules/filters/Makefile.am b/src/modules/filters/Makefile.am new file mode 100644 index 0000000..7092c73 --- /dev/null +++ b/src/modules/filters/Makefile.am @@ -0,0 +1,105 @@ +filtersdir = $(top_srcdir)/src/modules/filters + +libsword_la_SOURCES += $(filtersdir)/swbasicfilter.cpp +libsword_la_SOURCES += $(filtersdir)/swoptfilter.cpp + +GBFFIL = $(filtersdir)/gbfhtml.cpp +GBFFIL += $(filtersdir)/gbfhtmlhref.cpp +GBFFIL += $(filtersdir)/gbfwebif.cpp +GBFFIL += $(filtersdir)/gbfplain.cpp +GBFFIL += $(filtersdir)/gbfrtf.cpp +GBFFIL += $(filtersdir)/gbfstrongs.cpp +GBFFIL += $(filtersdir)/gbffootnotes.cpp +GBFFIL += $(filtersdir)/gbfheadings.cpp +GBFFIL += $(filtersdir)/gbfredletterwords.cpp +GBFFIL += $(filtersdir)/gbfmorph.cpp +GBFFIL += $(filtersdir)/gbfwordjs.cpp + +THMLFIL = $(filtersdir)/thmlstrongs.cpp +THMLFIL += $(filtersdir)/thmlfootnotes.cpp +THMLFIL += $(filtersdir)/thmlheadings.cpp +THMLFIL += $(filtersdir)/thmlmorph.cpp +THMLFIL += $(filtersdir)/thmllemma.cpp +THMLFIL += $(filtersdir)/thmlscripref.cpp +THMLFIL += $(filtersdir)/thmlvariants.cpp +THMLFIL += $(filtersdir)/thmlgbf.cpp +THMLFIL += $(filtersdir)/thmlrtf.cpp +THMLFIL += $(filtersdir)/thmlhtml.cpp +THMLFIL += $(filtersdir)/thmlhtmlhref.cpp +THMLFIL += $(filtersdir)/thmlwebif.cpp +THMLFIL += $(filtersdir)/thmlwordjs.cpp + +TEIFIL = $(filtersdir)/teiplain.cpp +TEIFIL += $(filtersdir)/teirtf.cpp +TEIFIL += $(filtersdir)/teihtmlhref.cpp + +CONVFIL = $(filtersdir)/gbfthml.cpp +CONVFIL += $(filtersdir)/gbfosis.cpp +CONVFIL += $(filtersdir)/thmlosis.cpp +CONVFIL += $(filtersdir)/thmlplain.cpp +CONVFIL += $(filtersdir)/osisosis.cpp + +OSISFIL = $(filtersdir)/osisheadings.cpp +OSISFIL += $(filtersdir)/osisfootnotes.cpp +OSISFIL += $(filtersdir)/osishtmlhref.cpp +OSISFIL += $(filtersdir)/osiswebif.cpp +OSISFIL += $(filtersdir)/osismorph.cpp +OSISFIL += $(filtersdir)/osisstrongs.cpp +OSISFIL += $(filtersdir)/osisplain.cpp +OSISFIL += $(filtersdir)/osisrtf.cpp +OSISFIL += $(filtersdir)/osislemma.cpp +OSISFIL += $(filtersdir)/osisredletterwords.cpp +OSISFIL += $(filtersdir)/osisscripref.cpp +OSISFIL += $(filtersdir)/osisvariants.cpp +OSISFIL += $(filtersdir)/osiswordjs.cpp +OSISFIL += $(filtersdir)/osismorphsegmentation.cpp + +libsword_la_SOURCES += $(filtersdir)/latin1utf8.cpp +libsword_la_SOURCES += $(filtersdir)/latin1utf16.cpp +libsword_la_SOURCES += $(filtersdir)/utf8utf16.cpp +libsword_la_SOURCES += $(filtersdir)/utf16utf8.cpp +libsword_la_SOURCES += $(filtersdir)/scsuutf8.cpp +libsword_la_SOURCES += $(filtersdir)/utf8html.cpp +libsword_la_SOURCES += $(filtersdir)/utf8latin1.cpp + +libsword_la_SOURCES += $(filtersdir)/utf8cantillation.cpp +libsword_la_SOURCES += $(filtersdir)/utf8hebrewpoints.cpp +libsword_la_SOURCES += $(filtersdir)/utf8greekaccents.cpp + +libsword_la_SOURCES += $(filtersdir)/cipherfil.cpp + +PLFIL = $(filtersdir)/rtfhtml.cpp +PLFIL += $(filtersdir)/plainfootnotes.cpp +PLFIL += $(filtersdir)/plainhtml.cpp +PLFIL += $(filtersdir)/greeklexattribs.cpp +PLFIL += $(filtersdir)/unicodertf.cpp +PLFIL += $(filtersdir)/papyriplain.cpp + + +SWICUSRC = $(filtersdir)/utf8transliterator.cpp +SWICUSRC += $(filtersdir)/utf8nfc.cpp +SWICUSRC += $(filtersdir)/utf8nfkd.cpp +SWICUSRC += $(filtersdir)/utf8arshaping.cpp +SWICUSRC += $(filtersdir)/utf8bidireorder.cpp + +if ICU +ICUDEFS = -D_ICU_ +DISTSWICUSRC = +SWREALICUSRC = $(SWICUSRC) +else +if ICUSWORD +ICUDEFS = -D_ICU_ -D_ICUSWORD_ +DISTSWICUSRC = +SWREALICUSRC = $(SWICUSRC) +else +DISTSWICUSRC = $(SWICUSRC) +SWREALICUSRC = +endif +endif + +AM_CPPFLAGS += $(ICUDEFS) +libsword_la_SOURCES += $(SWREALICUSRC) +EXTRA_DIST = $(DISTSWICUSRC) + +libsword_la_SOURCES += $(OSISFIL) $(GBFFIL) \ + $(THMLFIL) $(CONVFIL) $(PLFIL) $(TEIFIL) diff --git a/src/modules/filters/cipherfil.cpp b/src/modules/filters/cipherfil.cpp new file mode 100644 index 0000000..24c665e --- /dev/null +++ b/src/modules/filters/cipherfil.cpp @@ -0,0 +1,46 @@ +/****************************************************************************** + * + * cipherfil - SWFilter descendant to decipher a module + */ + + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +CipherFilter::CipherFilter(const char *key) { + cipher = new SWCipher((unsigned char *)key); +} + + +CipherFilter::~CipherFilter() { + delete cipher; +} + + +SWCipher *CipherFilter::getCipher() { + return cipher; +} + + +char CipherFilter::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (text.length() > 2) { //check if it's large enough to substract 2 in the next step. + unsigned long len = text.length(); + if (!key) { // hack, using key to determine encipher, or decipher + cipher->cipherBuf(&len, text.getRawData()); //set buffer to enciphered text + memcpy(text.getRawData(), cipher->Buf(), len); +// text = cipher->Buf(); //get the deciphered buffer + } + else if ((unsigned long)key == 1) { + cipher->Buf(text.getRawData(), len); + memcpy(text.getRawData(), cipher->cipherBuf(&len), len); +// text = cipher->cipherBuf(&len); + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbffootnotes.cpp b/src/modules/filters/gbffootnotes.cpp new file mode 100644 index 0000000..bef29b8 --- /dev/null +++ b/src/modules/filters/gbffootnotes.cpp @@ -0,0 +1,193 @@ +/****************************************************************************** + * + * gbffootnotes - SWFilter descendant to hide or show footnotes + * in a GBF module. + */ + + +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Footnotes"; +const char oTip[] = "Toggles Footnotes On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + + +GBFFootnotes::GBFFootnotes() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +GBFFootnotes::~GBFFootnotes() { +} + + +char GBFFootnotes::processText (SWBuf &text, const SWKey *key, const SWModule *module) +{ + + SWBuf token; + bool intoken = false; + bool hide = false; + SWBuf tagText; + XMLTag startTag; + SWBuf refs = ""; + int footnoteNum = 1; + char buf[254]; + VerseKey parser = key->getText(); + + SWBuf orig = text; + const char *from = orig.c_str(); + + //XMLTag tag; + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + + //XMLTag tag(token); + if (!strncmp(token, "RF",2)) { +// tag = token; + + refs = ""; + startTag = token; + hide = true; + tagText = ""; + continue; + } + else if (!strncmp(token, "Rf",2)) { + if (module->isProcessEntryAttributes()) { + //tag = token; + + if((tagText.length() == 1) || !strcmp(module->Name(), "IGNT")) { + if (option) { // for ASV marks text in verse then put explanation at end of verse + text.append(" ["); + text.append(tagText); + text.append("]"); + hide = false; + continue; + } + } + SWBuf fc = module->getEntryAttributes()["Footnote"]["count"]["value"]; + footnoteNum = (fc.length()) ? atoi(fc.c_str()) : 0; + sprintf(buf, "%i", ++footnoteNum); + module->getEntryAttributes()["Footnote"]["count"]["value"] = buf; + StringList attributes = startTag.getAttributeNames(); + for (StringList::const_iterator it = attributes.begin(); it != attributes.end(); it++) { + module->getEntryAttributes()["Footnote"][buf][it->c_str()] = startTag.getAttribute(it->c_str()); + } + module->getEntryAttributes()["Footnote"][buf]["body"] = tagText; + startTag.setAttribute("swordFootnote", buf); + } + hide = false; + if (option) { + text.append(startTag); + text.append(tagText); + } + else continue; + } + if (!hide) { + text.append('<'); + text.append(token); + text.append('>'); + } + else { + tagText.append('<'); + tagText.append(token); + tagText.append('>'); + } + continue; + } + if (intoken) { //copy token + token.append(*from); + } + else if (!hide) { //copy text which is not inside a token + text.append(*from); + } + else tagText.append(*from); + } + return 0; + + /* + if (!option) { // if we don't want footnotes + char token[4096]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + int len; + bool hide = false; + + const char *from; + SWBuf orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; +// memset(token, 0, 4096); + token[0] = 0; + token[1] = 0; + token[2] = 0; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + switch (*token) { + case 'R': // Reference + switch(token[1]) { + case 'F': // Begin footnote + hide = true; + break; + case 'f': // end footnote + hide = false; + break; + } + continue; // skip token + case 'W': + if (token[1] == 'T') { + switch (token[2]) { + case 'P': + case 'S': + case 'A': + continue; // remove this token + default: + break; + } + } + } + // if not a footnote token, keep token in text + if (!hide) { + text += '<'; + text += token; + text += '>'; + } + continue; + } + if (intoken) { + if (tokpos < 4090) + token[tokpos++] = *from; + token[tokpos+2] = 0; // +2 cuz we init token with 2 extra '0' because of switch statement + } + else { + if (!hide) { + text += *from; + } + } + } + } + return 0;*/ +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfheadings.cpp b/src/modules/filters/gbfheadings.cpp new file mode 100644 index 0000000..81a4d94 --- /dev/null +++ b/src/modules/filters/gbfheadings.cpp @@ -0,0 +1,87 @@ +/****************************************************************************** + * + * gbfheadings - SWFilter descendant to hide or show headings + * in a GBF module. + */ + + +#include +#include + +SWORD_NAMESPACE_START + + +const char oName[] = "Headings"; +const char oTip[] = "Toggles Headings On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +GBFHeadings::GBFHeadings() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +GBFHeadings::~GBFHeadings() { +} + + +char GBFHeadings::processText (SWBuf &text, const SWKey *key, const SWModule *module) { + if (!option) { // if we don't want headings + char token[2048]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + bool hide = false; + + const char *from; + SWBuf orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; +// memset(token, 0, 2048); + token[0] = 0; + token[1] = 0; + token[2] = 0; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + switch (*token) { + case 'T': // Reference + switch(token[1]) { + case 'S': // Begin heading + hide = true; + break; + case 's': // end heading + hide = false; + break; + } + continue; // skip token + } + // if not a heading token, keep token in text + if (!hide) { + text += '<'; + for (char *tok = token; *tok; tok++) + text += *tok; + text += '>'; + } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else { + if (!hide) { + text += *from; + } + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfhtml.cpp b/src/modules/filters/gbfhtml.cpp new file mode 100644 index 0000000..a9d8434 --- /dev/null +++ b/src/modules/filters/gbfhtml.cpp @@ -0,0 +1,181 @@ +/*************************************************************************** + gbfhtml.cpp - GBF to HTML filter + ------------------- + begin : 2001-09-03 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include + +SWORD_NAMESPACE_START + +GBFHTML::GBFHTML() { + setTokenStart("<"); + setTokenEnd(">"); + + setTokenCaseSensitive(true); + + addTokenSubstitute("Rf", ")"); + addTokenSubstitute("Rx", ""); + addTokenSubstitute("FI", ""); // italics begin + addTokenSubstitute("Fi", ""); + addTokenSubstitute("FB", ""); // bold begin + addTokenSubstitute("Fb", ""); + addTokenSubstitute("FR", ""); // words of Jesus begin + addTokenSubstitute("Fr", ""); + addTokenSubstitute("FU", ""); // underline begin + addTokenSubstitute("Fu", ""); + addTokenSubstitute("FO", ""); // Old Testament quote begin + addTokenSubstitute("Fo", ""); + addTokenSubstitute("FS", ""); // Superscript begin// Subscript begin + addTokenSubstitute("Fs", ""); + addTokenSubstitute("FV", ""); // Subscript begin + addTokenSubstitute("Fv", ""); + addTokenSubstitute("TT", ""); // Book title begin + addTokenSubstitute("Tt", ""); + addTokenSubstitute("PP", ""); // poetry begin + addTokenSubstitute("Pp", ""); + addTokenSubstitute("Fn", ""); // font end + addTokenSubstitute("CL", "
"); // new line + addTokenSubstitute("CM", "
"); // paragraph is a non showing comment that can be changed in the front end to

if desired + addTokenSubstitute("CG", ""); // ??? + addTokenSubstitute("CT", ""); // ??? + addTokenSubstitute("JR", "

"); // right align begin + addTokenSubstitute("JC", "
"); // center align begin + addTokenSubstitute("JL", "
"); // align end + +} + + +bool GBFHTML::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + const char *tok; + char val[128]; + char *valto; + const char *num; + MyUserData *u = (MyUserData *)userData; + + if (!substituteToken(buf, token)) { + // deal with OSIS note tags. Just hide till OSISRTF + if (!strncmp(token, "note ", 5)) { + // let's stop text from going to output + u->suspendTextPassThru = true; + } + + else if (!strncmp(token, "/note", 5)) { + u->suspendTextPassThru = false; + } + + else if (!strncmp(token, "w", 1)) { + // OSIS Word (temporary until OSISRTF is done) + valto = val; + num = strstr(token, "lemma=\"x-Strongs:"); + if (num) { + for (num+=17; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + buf += " <"; + for (tok = (!isdigit(*val))?val+1:val; *tok; tok++) + buf += *tok; + buf += "> "; + } + } else { + num = strstr(token, "lemma=\"strong:"); + if (num) { + for (num+=14; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + buf += " <"; + for (tok = (!isdigit(*val))?val+1:val; *tok; tok++) + buf += *tok; + buf += "> "; + } + } + } + valto = val; + num = strstr(token, "morph=\"x-Robinson:"); + if (num) { + for (num+=18; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + // normal robinsons tense + buf += " ("; + for (tok = val; *tok; tok++) + buf += *tok; + buf += ") "; + } + } + + else if (!strncmp(token, "WG", 2) || !strncmp(token, "WH", 2)) { // strong's numbers + buf += " <"; + for (tok = token + 2; *tok; tok++) + buf += *tok; + buf += "> "; + } + + else if (!strncmp(token, "WTG", 3) || !strncmp(token, "WTH", 3)) { // strong's numbers tense + buf += " <"; + for (tok = token + 3; *tok; tok++) + if(*tok != '\"') + buf += *tok; + buf += ") "; + } + + else if (!strncmp(token, "RX", 2)) { + buf += ""; + for (tok = token + 3; *tok; tok++) { + if(*tok != '<' && *tok+1 != 'R' && *tok+2 != 'x') { + buf += *tok; + } + else { + break; + } + } + buf += ""; + } + + else if (!strncmp(token, "RB", 2)) { + buf += ""; + u->hasFootnotePreTag = true; + } + + else if (!strncmp(token, "RF", 2)) { + if (u->hasFootnotePreTag) { + u->hasFootnotePreTag = false; + buf += " "; + } + buf += " ("; + } + + else if (!strncmp(token, "FN", 2)) { + buf += ""; + } + + else if (!strncmp(token, "CA", 2)) { // ASCII value + buf += (char)atoi(&token[2]); + } + + else { + return false; + } + } + return true; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfhtmlhref.cpp b/src/modules/filters/gbfhtmlhref.cpp new file mode 100644 index 0000000..7f1c254 --- /dev/null +++ b/src/modules/filters/gbfhtmlhref.cpp @@ -0,0 +1,288 @@ +/*************************************************************************** + gbfhtmlhref.cpp - GBF to HTML filter with hrefs + for strongs and morph tags + ------------------- + begin : 2001-09-03 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +GBFHTMLHREF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { + if (module) { + version = module->Name(); + } +} + +GBFHTMLHREF::GBFHTMLHREF() { + setTokenStart("<"); + setTokenEnd(">"); + + setTokenCaseSensitive(true); + + //addTokenSubstitute("Rf", ")"); + addTokenSubstitute("FA", ""); // for ASV footnotes to mark text + addTokenSubstitute("Rx", ""); + addTokenSubstitute("FI", ""); // italics begin + addTokenSubstitute("Fi", ""); + addTokenSubstitute("FB", ""); // bold begin + addTokenSubstitute("Fb", ""); + addTokenSubstitute("FR", ""); // words of Jesus begin + addTokenSubstitute("Fr", ""); + addTokenSubstitute("FU", ""); // underline begin + addTokenSubstitute("Fu", ""); + addTokenSubstitute("FO", ""); // Old Testament quote begin + addTokenSubstitute("Fo", ""); + addTokenSubstitute("FS", ""); // Superscript begin// Subscript begin + addTokenSubstitute("Fs", ""); + addTokenSubstitute("FV", ""); // Subscript begin + addTokenSubstitute("Fv", ""); + addTokenSubstitute("TT", ""); // Book title begin + addTokenSubstitute("Tt", ""); + addTokenSubstitute("PP", ""); // poetry begin + addTokenSubstitute("Pp", ""); + addTokenSubstitute("Fn", ""); // font end + addTokenSubstitute("CL", "
"); // new line + addTokenSubstitute("CM", "
"); // paragraph is a non showing comment that can be changed in the front end to

if desired + addTokenSubstitute("CG", ""); // ??? + addTokenSubstitute("CT", ""); // ??? + addTokenSubstitute("JR", "

"); // right align begin + addTokenSubstitute("JC", "
"); // center align begin + addTokenSubstitute("JL", "
"); // align end + +} + + +bool GBFHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + const char *tok; + MyUserData *u = (MyUserData *)userData; + + if (!substituteToken(buf, token)) { + XMLTag tag(token); + /*if (!strncmp(token, "w", 1)) { + // OSIS Word (temporary until OSISRTF is done) + valto = val; + num = strstr(token, "lemma=\"x-Strongs:"); + if (num) { + for (num+=17; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + buf += " <"; + for (tok = (!isdigit(*val))?val+1:val; *tok; tok++) + buf += *tok; + buf += "> "; + //cout << buf; + + } + // forget these for now + //else { + // verb morph + //sprintf(wordstr, "%03d", word-1); + //module->getEntryAttributes()["Word"][wordstr]["Morph"] = val; + //} + } + else { + num = strstr(token, "lemma=\"strong:"); + if (num) { + for (num+=14; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + buf += " <"; + for (tok = (!isdigit(*val))?val+1:val; *tok; tok++) + buf += *tok; + buf += "> "; + //cout << buf; + + } + // forget these for now + //else { + // verb morph + //sprintf(wordstr, "%03d", word-1); + //module->getEntryAttributes()["Word"][wordstr]["Morph"] = val; + //} + } + } + valto = val; + num = strstr(token, "morph=\"x-Robinson:"); + if (num) { + for (num+=18; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + buf += " ("; + for (tok = val; *tok; tok++) + //if(*tok != '\"') + buf += *tok; + buf += ") "; + } + }*/ + + // else + if (!strncmp(token, "WG", 2)) { // strong's numbers + //buf += " <<"; + for (tok = token + 2; *tok; tok++) + //if(token[i] != '\"') + buf += *tok; + buf += ">"; + } + else if (!strncmp(token, "WH", 2)) { // strong's numbers + //buf += " <<"; + for (tok = token + 2; *tok; tok++) + //if(token[i] != '\"') + buf += *tok; + buf += ">"; + } + else if (!strncmp(token, "WTG", 3)) { // strong's numbers tense + //buf += " (("; + for (tok = token + 3; *tok; tok++) + if(*tok != '\"') + buf += *tok; + buf += ")"; + } + else if (!strncmp(token, "WTH", 3)) { // strong's numbers tense + //buf += " (("; + for (tok = token + 3; *tok; tok++) + if(*tok != '\"') + buf += *tok; + buf += ")"; + } + + else if (!strncmp(token, "WT", 2) && strncmp(token, "WTH", 3) && strncmp(token, "WTG", 3)) { // morph tags + //buf += " (("; + for (tok = token + 2; *tok; tok++) + if(*tok != '\"') + buf += *tok; + buf += ")"; + } + + else if (!strcmp(tag.getName(), "RX")) { + buf += ""; + } + else if (!strcmp(tag.getName(), "RF")) { + SWBuf type = tag.getAttribute("type"); + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + VerseKey *vkey = NULL; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) { } + if (vkey) { + // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt. + //char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); + buf.appendFormatted("*n ", + URL::encode(footnoteNumber.c_str()).c_str(), + URL::encode(u->version.c_str()).c_str(), + URL::encode(vkey->getText()).c_str()); + } + u->suspendTextPassThru = true; + } + else if (!strcmp(tag.getName(), "Rf")) { + u->suspendTextPassThru = false; + } +/* + else if (!strncmp(token, "RB", 2)) { + buf += " "; + u->hasFootnotePreTag = true; + } + + else if (!strncmp(token, "Rf", 2)) { + buf += " lastTextNode.c_str(); + buf += "\">"; + buf += "*n "; + // let's let text resume to output again + u->suspendTextPassThru = false; + } + + else if (!strncmp(token, "RF", 2)) { + if (u->hasFootnotePreTag) { + u->hasFootnotePreTag = false; + buf += " "; + } + u->suspendTextPassThru = true; + } +*/ + else if (!strncmp(token, "FN", 2)) { + buf += ""; + } + + else if (!strncmp(token, "CA", 2)) { // ASCII value + buf += (char)atoi(&token[2]); + } + + else { + return false; + } + } + return true; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfmorph.cpp b/src/modules/filters/gbfmorph.cpp new file mode 100644 index 0000000..5226db7 --- /dev/null +++ b/src/modules/filters/gbfmorph.cpp @@ -0,0 +1,77 @@ +/****************************************************************************** + * + * gbfmorph - SWFilter descendant to hide or show morph tags + * in a GBF module. + */ + + +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Morphological Tags"; +const char oTip[] = "Toggles Morphological Tags On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +GBFMorph::GBFMorph() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +GBFMorph::~GBFMorph() { +} + + +char GBFMorph::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (!option) { // if we don't want morph tags + const char *from; + char token[2048]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + bool lastspace = false; + + SWBuf orig = text; + from = orig.c_str(); + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if (*token == 'W' && token[1] == 'T') { // Morph + if ((from[1] == ' ') || (from[1] == ',') || (from[1] == ';') || (from[1] == '.') || (from[1] == '?') || (from[1] == '!') || (from[1] == ')') || (from[1] == '\'') || (from[1] == '\"')) { + if (lastspace) + text--; + } + continue; + } + // if not a morph tag token, keep token in text + text += '<'; + text += token; + text += '>'; + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else { + text += *from; + lastspace = (*from == ' '); + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfosis.cpp b/src/modules/filters/gbfosis.cpp new file mode 100644 index 0000000..00443f9 --- /dev/null +++ b/src/modules/filters/gbfosis.cpp @@ -0,0 +1,420 @@ +/****************************************************************************** + * + * gbfstrongs - SWFilter descendant to hide or show strongs number + * in a GBF module. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +GBFOSIS::GBFOSIS() { +} + + +GBFOSIS::~GBFOSIS() { +} + + +char GBFOSIS::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + char token[2048]; //cheesy, we seem to like cheese :) + int tokpos = 0; + bool intoken = false; + bool keepToken = false; + +// static QuoteStack quoteStack; + + SWBuf orig = text; + SWBuf tmp; + SWBuf value; + + bool suspendTextPassThru = false; + bool handled = false; + bool newWord = false; + bool newText = false; + bool lastspace = false; + + const char *wordStart = text.c_str(); + const char *wordEnd = NULL; + + const char *textStart = NULL; + const char *textEnd = NULL; + + SWBuf textNode = ""; + + SWBuf buf; + + text = ""; + for (const char* from = orig.c_str(); *from; ++from) { + if (*from == '<') { //start of new token detected + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + textEnd = from-1; //end of last text node found + wordEnd = text.c_str() + text.length();//not good, instead of wordEnd = to! + + continue; + } + + if (*from == '>') { // process tokens + intoken = false; + keepToken = false; + suspendTextPassThru = false; + newWord = true; + handled = false; + + while (wordStart < (text.c_str() + text.length())) { //hack + if (strchr(";,. :?!()'\"", *wordStart) && wordStart[0] && wordStart[1]) + wordStart++; + else break; + } + while (wordEnd > wordStart) { + if (strchr(" ,;:.?!()'\"", *wordEnd)) + wordEnd--; + else break; + } + + // Scripture Reference + if (!strncmp(token, "scripRef", 8)) { + suspendTextPassThru = true; + newText = true; + handled = true; + } + else if (!strncmp(token, "/scripRef", 9)) { + tmp = ""; + tmp.append(textStart, (int)(textEnd - textStart)+1); + text += VerseKey::convertToOSIS(tmp.c_str(), key); + + lastspace = false; + suspendTextPassThru = false; + handled = true; + } + + // Footnote + if (!strcmp(token, "RF") || !strncmp(token, "RF ", 3)) { //the GBFFootnotes filter adds the attribute "swordFootnote", we want to catch that, too + // pushString(buf, ""; + newText = true; + lastspace = false; + handled = true; + } + else if (!strcmp(token, "Rf")) { + text += ""; + lastspace = false; + handled = true; + } + // hebrew titles + if (!strcmp(token, "TH")) { + text += ""; + newText = true; + lastspace = false; + handled = true; + } + else if (!strcmp(token, "Th")) { + text += ""; + lastspace = false; + handled = true; + } + // Italics assume transchange + if (!strcmp(token, "FI")) { + text += ""; + newText = true; + lastspace = false; + handled = true; + } + else if (!strcmp(token, "Fi")) { + text += ""; + lastspace = false; + handled = true; + } + // less than + if (!strcmp(token, "CT")) { + text += "<"; + newText = true; + lastspace = false; + handled = true; + } + // greater than + if (!strcmp(token, "CG")) { + text += ">"; + newText = true; + lastspace = false; + handled = true; + } + // Paragraph break. For now use empty paragraph element + if (!strcmp(token, "CM")) { + text += ""; + newText = true; + lastspace = false; + handled = true; + } + + // Figure + else if (!strncmp(token, "img ", 4)) { + const char *src = strstr(token, "src"); + if (!src) // assert we have a src attribute + continue; +// return false; + + text += "
getConfigEntry("AbsoluteDataPath")); +// if (*((*buf)-1) == '/') +// c++; // skip '/' +// } +// end of uncomment for asolute path logic + + for (c++;((*c) && (*c != '"')); c++) { + text += *c; + } + text += "\" />"; + + lastspace = false; + handled = true; + } + + // Strongs numbers + else if (*token == 'W' && (token[1] == 'G' || token[1] == 'H')) { // Strongs + bool divineName = false; + value = token+1; + + // normal strongs number + //strstrip(val); + if (!strncmp(wordStart, " attribute! + if (!strcmp(value.c_str(), "H03068")) { //divineName + buf = ""; + buf.appendFormatted("", value.c_str()); + + divineName = true; + } + else { + buf = ""; + buf.appendFormatted("", value.c_str()); + } + + text.insert(wordStart - text.c_str(), buf); + + if (divineName) { + wordStart += 12; + text += ""; + } + else text += ""; + + lastspace = false; + } + handled = true; + } + + // Morphology + else if (*token == 'W' && token[1] == 'T') { + if (token[2] == 'G' || token[2] == 'H') { // Strongs + value = token+2; + } + else value = token+1; + + if (!strncmp(wordStart, " attribute fond + buf = ""; + buf.appendFormatted("", "robinson", value.c_str()); + text.insert(wordStart - text.c_str(), buf); + text += ""; + lastspace = false; + + } + handled = true; + } + + if (!keepToken) { + if (!handled) { + SWLog::getSystemLog()->logError("Unprocessed Token: <%s> in key %s", token, key ? (const char*)*key : ""); +// exit(-1); + } + if (from[1] && strchr(" ,;.:?!()'\"", from[1])) { + if (lastspace) { + text--; + } + } + if (newText) { + textStart = from+1; + newText = false; + } + continue; + } + + // if not a strongs token, keep token in text + text.appendFormatted("<%s>", token); + + if (newText) { + textStart = text.c_str() + text.length(); + newWord = false; + } + continue; + } + if (intoken) { + if ((tokpos < 2045) && ((*from != 10)&&(*from != 13))) { + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + } + else { + switch (*from) { + case '\'': + case '\"': + case '`': +// quoteStack.handleQuote(fromStart, from, &to); + text += *from; + //from++; //this line removes chars after an apostrophe! Needs fixing. + break; + default: + if (newWord && (*from != ' ')) { + wordStart = text.c_str() + text.length(); + newWord = false; + + //fix this if required? + //memset(to, 0, 10); + + } + + if (!suspendTextPassThru) { + text += (*from); + lastspace = (*from == ' '); + } + } + } + } + + VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, key); + if (vkey) { + SWBuf ref = ""; + if (vkey->Verse()) { + ref.appendFormatted("\t\t", vkey->getOSISRef()); + } + + if (ref.length() > 0) { + + text = ref + text; + + if (vkey->Verse()) { + VerseKey tmp; + tmp = *vkey; + tmp.AutoNormalize(0); + tmp.Headings(1); + + text += ""; + + tmp = MAXVERSE; + if (*vkey == tmp) { + tmp.Verse(0); +// sprintf(ref, "\t
"); +// pushString(&to, ref); + tmp = MAXCHAPTER; + tmp = MAXVERSE; + if (*vkey == tmp) { + tmp.Chapter(0); + tmp.Verse(0); +// sprintf(ref, "\t
"); +// pushString(&to, ref); +/* + if (!quoteStack.empty()) { + SWLog::getSystemLog()->logError("popping unclosed quote at end of book"); + quoteStack.clear(); + } +*/ + } + } + } +// else if (vkey->Chapter()) { +// sprintf(ref, "\t
", vkey->getOSISRef()); +// } +// else sprintf(ref, "\t
", vkey->getOSISRef()); + } + } + return 0; +} + + +QuoteStack::QuoteStack() { + clear(); +} + + +void QuoteStack::clear() { + while (!quotes.empty()) quotes.pop(); +} + + +QuoteStack::~QuoteStack() { + clear(); +} + + +void QuoteStack::handleQuote(char *buf, char *quotePos, SWBuf &text) { +//QuoteInstance(char startChar = '\"', char level = 1, string uniqueID = "", char continueCount = 0) { + if (!quotes.empty()) { + QuoteInstance last = quotes.top(); + if (last.startChar == *quotePos) { + text += ""; + quotes.pop(); + } + else { + quotes.push(QuoteInstance(*quotePos, last.level+1)); + quotes.top().pushStartStream(text); + } + } + else { + quotes.push(QuoteInstance(*quotePos)); + quotes.top().pushStartStream(text); + } +} + +void QuoteStack::QuoteInstance::pushStartStream(SWBuf &text) { + text.appendFormatted("", level); +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfplain.cpp b/src/modules/filters/gbfplain.cpp new file mode 100644 index 0000000..5657e20 --- /dev/null +++ b/src/modules/filters/gbfplain.cpp @@ -0,0 +1,97 @@ +/****************************************************************************** + * + * gbfplain - SWFilter descendant to strip out all GBF tags or convert to + * ASCII rendered symbols. + */ + + +#include +#include +#include + +SWORD_NAMESPACE_START + +GBFPlain::GBFPlain() { +} + + +char GBFPlain::processText (SWBuf &text, const SWKey *key, const SWModule *module) +{ + char token[2048]; + int tokpos = 0; + bool intoken = false; + SWBuf orig = text; + const char* from = orig.c_str(); + + for (text = ""; *from; ++from) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + continue; + } + if (*from == '>') { + intoken = false; + // process desired tokens + switch (*token) { + case 'W': // Strongs + switch(token[1]) { + case 'G': // Greek + case 'H': // Hebrew + case 'T': // Tense + text.append(" <"); + //for (char *tok = token + 2; *tok; tok++) + // text += *tok; + text.append(token+2); + text.append("> "); + continue; + } + break; + case 'R': + switch(token[1]) { + case 'F': // footnote begin + text.append(" ["); + continue; + case 'f': // footnote end + text.append("] "); + continue; + } + break; + case 'C': + switch(token[1]) { + case 'A': // ASCII value + text.append((char)atoi(&token[2])); + continue; + case 'G': + text.append('>'); + continue; +/* Bug in WEB + case 'L': + *to++ = '<'; + continue; +*/ + case 'L': // Bug in WEB. Use above entry when fixed + case 'N': // new line + text.append('\n'); + continue; + case 'M': // new paragraph + text.append("\n\n"); + continue; + } + break; + } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else text.append(*from); + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfredletterwords.cpp b/src/modules/filters/gbfredletterwords.cpp new file mode 100644 index 0000000..a79802d --- /dev/null +++ b/src/modules/filters/gbfredletterwords.cpp @@ -0,0 +1,93 @@ +/****************************************************************************** + * + * GBFRedLetterWords - SWFilter descendant to toggle red coloring of words of + * Christ in a GBF module. + */ + + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Words of Christ in Red"; +const char oTip[] = "Toggles Red Coloring for Words of Christ On and Off if they are marked"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +GBFRedLetterWords::GBFRedLetterWords() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +GBFRedLetterWords::~GBFRedLetterWords() { +} + + +char GBFRedLetterWords::processText(SWBuf &text, const SWKey *key, const SWModule *module) { +/** This function removes the red letter words in Bible like the WEB +* The words are marked by as start and as end tag. +*/ + if (!option) { // if we don't want footnotes + char token[4096]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + bool hide = false; + + const char *from; + SWBuf orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; +// memset(token, 0, 4096); + token[0] = 0; + token[1] = 0; + token[2] = 0; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + /*switch (*token) { + case 'F': // Font attribute + switch(token[1]) { + case 'R': // Begin red letter words + hide = true; + break; + case 'r': // end red letter words + hide = false; + break; + } + continue; // skip token + }*/ + + //hide the token if either FR or Fr was detected + hide = (token[0] == 'F' && ( (token[1] == 'R') || (token[1] == 'r') )); + + // if not a red letter word token, keep token in text + if (!hide) { + text += '<'; + for (char *tok = token; *tok; tok++) + text += *tok; + text += '>'; + } + continue; + } + if (intoken) { + if (tokpos < 4090) + token[tokpos++] = *from; + token[tokpos+2] = 0; // +2 cuz we init token with 2 extra '0' because of switch statement + } + else { + text += *from; + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfrtf.cpp b/src/modules/filters/gbfrtf.cpp new file mode 100644 index 0000000..eb39612 --- /dev/null +++ b/src/modules/filters/gbfrtf.cpp @@ -0,0 +1,311 @@ +/****************************************************************************** + * + * gbfrtf - SWFilter descendant to convert all GBF tags to RTF tags + */ + + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +GBFRTF::GBFRTF() { +} + + +char GBFRTF::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + char token[2048]; + char val[128]; + char *valto; + char *num; + int tokpos = 0; + bool intoken = false; + const char *tok; + SWBuf strongnum; + SWBuf strongtense; + bool hideText = false; + int wordLen = 0; + int wordCount = 0; + + const char *from; + SWBuf orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { + if (*from == '<') { + wordLen = wordCount; + wordCount = 0; + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + continue; + } + if (*from == '>') { + intoken = false; + // process desired tokens + // deal with OSIS note tags. Just hide till OSISRTF + if (!strncmp(token, "note ", 5)) { + hideText = true; + } + if (!strncmp(token, "/note", 5)) { + hideText = false; + } + + switch (*token) { + case 'w': // OSIS Word (temporary until OSISRTF is done) + strongnum = ""; + strongtense = ""; + valto = val; + num = strstr(token, "lemma=\"x-Strongs:"); + if (num) { + for (num+=17; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + // normal strongs number + strongnum += "{\\cf3 \\sub <"; + for (tok = (!isdigit(*val))?val+1:val; *tok; tok++) + strongnum += *tok; + strongnum += ">}"; + } + /* forget these for now + else { + // verb morph + sprintf(wordstr, "%03d", word-1); + module->getEntryAttributes()["Word"][wordstr]["Morph"] = val; + } + */ + } + else { + num = strstr(token, "lemma=\"strong:"); + if (num) { + for (num+=14; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + // normal strongs number + strongnum += "{\\cf3 \\sub <"; + for (tok = (!isdigit(*val))?val+1:val; *tok; tok++) + strongnum += *tok; + strongnum += ">}"; + } + /* forget these for now + else { + // verb morph + sprintf(wordstr, "%03d", word-1); + module->getEntryAttributes()["Word"][wordstr]["Morph"] = val; + } + */ + } + } + valto = val; + num = strstr(token, "morph=\"x-Robinson:"); + if (num) { + for (num+=18; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + // normal robinsons tense + strongtense += "{\\cf4 \\sub ("; + for (tok = val; *tok; tok++) + strongtense += *tok; + strongtense += ")}"; + } + continue; + + case '/': + if (token[1] == 'w') { + if ((wordCount > 0) || (strongnum != "{\\cf3 \\sub <3588>}")) { + //for (i = 0; i < strongnum.length(); i++) + text += strongnum; + //for (i = 0; i < strongtense.length(); i++) + text += strongtense; + } + } + continue; + + case 'W': // Strongs + switch(token[1]) { + case 'G': // Greek + case 'H': // Hebrew + text += "{\\cf3 \\sub <"; + for (tok = token + 2; *tok; tok++) + text += *tok; + text += ">}"; + continue; + + case 'T': // Tense + text += "{\\cf4 \\sub ("; + bool separate = false; + for (tok = token + 2; *tok; tok++) { + if (separate) { + text += "; "; + separate = false; + } + switch (*tok) { + case 'G': + case 'H': + for (tok++; *tok; tok++) { + if (isdigit(*tok)) { + text += *tok; + separate = true; + } + else { + tok--; + break; + } + } + break; + default: + for (; *tok; tok++) { + text += *tok; + } + } + } + text += ")}"; + continue; + } + break; + case 'R': + switch(token[1]) { + case 'X': + text += ""; + continue; + case 'x': + text += ""; + continue; + case 'F': // footnote begin + text += "{\\i1 \\sub [ "; + continue; + case 'f': // footnote end + text += " ] }"; + continue; + } + break; + case 'F': // font tags + switch(token[1]) { + case 'I': // italic start + text += "\\i1 "; + continue; + case 'i': // italic end + text += "\\i0 "; + continue; + case 'B': // bold start + text += "\\b1 "; + continue; + case 'b': // bold end + text += "\\b0 "; + continue; + case 'N': + text += '{'; + if (!strnicmp(token+2, "Symbol", 6)) + text += "\\f7 "; + if (!strnicmp(token+2, "Courier", 7)) + text += "\\f8 "; + continue; + case 'n': + text += '}'; + continue; + case 'S': + text += "{\\super "; + continue; + case 's': + text += '}'; + continue; + case 'R': + text += "{\\cf6 "; + continue; + case 'r': + text += '}'; + continue; + case 'O': + case 'C': + text += "\\scaps1 "; + continue; + case 'o': + case 'c': + text += "\\scaps0 "; + continue; + case 'V': + text += "{\\sub "; + continue; + case 'v': + text += '}'; + continue; + case 'U': + text += "\\ul1 "; + continue; + case 'u': + text += "\\ul0 "; + continue; + } + break; + case 'C': // special character tags + switch(token[1]) { + case 'A': // ASCII value + text += (char)atoi(&token[2]); + continue; + case 'G': + text += '>'; + continue; + case 'L': // line break + text += "\\line "; + continue; + case 'M': // new paragraph + text += "\\par "; + continue; + case 'T': + text += '<'; + } + break; + case 'T': // title formatting + switch(token[1]) + { + case 'T': // Book title begin + text += "{\\large "; + continue; + case 't': + text += '}'; + continue; + case 'S': + text += "\\par {\\i1\\b1 "; + continue; + case 's': + text += "}\\par "; + continue; + } + break; + case 'J': // Strongs + switch(token[1]) { + case 'L': + text += "\\ql "; + case 'C': + text += "\\qc "; + case 'R': + text += "\\qr "; + case 'F': + text += "\\qj "; + } + } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else { + if (!hideText) { + wordCount++; + text += *from; + } + } + } + return 0; +} + +SWORD_NAMESPACE_END + diff --git a/src/modules/filters/gbfstrongs.cpp b/src/modules/filters/gbfstrongs.cpp new file mode 100644 index 0000000..610edb5 --- /dev/null +++ b/src/modules/filters/gbfstrongs.cpp @@ -0,0 +1,126 @@ +/****************************************************************************** + * + * gbfstrongs - SWFilter descendant to hide or show strongs number + * in a GBF module. + */ + + +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Strong's Numbers"; +const char oTip[] = "Toggles Strong's Numbers On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +GBFStrongs::GBFStrongs() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +GBFStrongs::~GBFStrongs() { +} + + +char GBFStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + char token[2048]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + bool lastspace = false; + int word = 1; + char val[128]; + char wordstr[5]; + char *valto; + unsigned int textStart = 0, textEnd = 0; + bool newText = false; + SWBuf tmp; + const char *from; + + SWBuf orig = text; + from = orig.c_str(); + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + textEnd = text.size(); + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if (*token == 'W' && (token[1] == 'G' || token[1] == 'H')) { // Strongs + if (module->isProcessEntryAttributes()) { + valto = val; + for (unsigned int i = 1; ((token[i]) && (i < 150)); i++) + *valto++ = token[i]; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + // normal strongs number + sprintf(wordstr, "%03d", word++); + module->getEntryAttributes()["Word"][wordstr]["PartsCount"] = "1"; + module->getEntryAttributes()["Word"][wordstr]["Lemma"] = val; + module->getEntryAttributes()["Word"][wordstr]["LemmaClass"] = "strong"; + tmp = ""; + tmp.append(text.c_str()+textStart, (int)(textEnd - textStart)); + module->getEntryAttributes()["Word"][wordstr]["Text"] = tmp; + newText = true; + } + else { + // verb morph + sprintf(wordstr, "%03d", word-1); + module->getEntryAttributes()["Word"][wordstr]["Morph"] = val; + module->getEntryAttributes()["Word"][wordstr]["MorphClass"] = "OLBMorph"; + } + } + + if (!option) { + if ((from[1] == ' ') || (from[1] == ',') || (from[1] == ';') || (from[1] == '.') || (from[1] == '?') || (from[1] == '!') || (from[1] == ')') || (from[1] == '\'') || (from[1] == '\"')) { + if (lastspace) + text--; + } + if (newText) {textStart = text.size(); newText = false; } + continue; + } + } + if (module->isProcessEntryAttributes()) { + if ((*token == 'W') && (token[1] == 'T')) { // Morph + valto = val; + for (unsigned int i = 2; ((token[i]) && (i < 150)); i++) + *valto++ = token[i]; + *valto = 0; + sprintf(wordstr, "%03d", word-1); + module->getEntryAttributes()["Word"][wordstr]["MorphClass"] = "GBFMorph"; + module->getEntryAttributes()["Word"][wordstr]["Morph"] = val; + newText = true; + } + } + // if not a strongs token, keep token in text + text += '<'; + text += token; + text += '>'; + if (newText) {textStart = text.size(); newText = false; } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else { + text += *from; + lastspace = (*from == ' '); + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfthml.cpp b/src/modules/filters/gbfthml.cpp new file mode 100644 index 0000000..2664f48 --- /dev/null +++ b/src/modules/filters/gbfthml.cpp @@ -0,0 +1,216 @@ +/*************************************************************************** + gbfthml.cpp - GBF to ThML filter + ------------------- + begin : 1999-10-27 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include + +SWORD_NAMESPACE_START + +GBFThML::GBFThML() +{ +} + + +char GBFThML::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + const char *from; + char token[2048]; + int tokpos = 0; + bool intoken = false; + const char *tok; + + SWBuf orig = text; + from = orig.c_str(); + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + continue; + } + if (*from == '>') + { + intoken = false; + // process desired tokens + switch (*token) { + case 'W': // Strongs + switch(token[1]) { + case 'G': + case 'H': + text += ""; + continue; + + case 'T': // Tense + text += ""; + continue; + } + break; + case 'R': + switch(token[1]) + { + case 'X': + text += ""; + continue; + case 'x': + text += ""; + continue; + case 'F': // footnote begin + text += ""; + continue; + case 'f': // footnote end + text += ""; + continue; + } + break; + case 'F': // font tags + switch(token[1]) + { + case 'N': + text += ""; + continue; + case 'n': + text += ""; + continue; + case 'I': // italic start + text += ""; + continue; + case 'i': // italic end + text += ""; + continue; + case 'B': // bold start + text += ""; + continue; + case 'b': // bold end + text += ""; + continue; + + case 'R': // words of Jesus begin + text += ""; + continue; + case 'r': // words of Jesus end + text += ""; + continue; + case 'U': // Underline start + text += ""; + continue; + case 'u': // Underline end + text += ""; + continue; + case 'O': // Old Testament quote begin + text += ""; + continue; + case 'o': // Old Testament quote end + text += ""; + continue; + case 'S': // Superscript begin + text += ""; + continue; + case 's': // Superscript end + text += ""; + continue; + case 'V': // Subscript begin + text += ""; + continue; + case 'v': // Subscript end + text += ""; + continue; + } + break; + case 'C': // special character tags + switch(token[1]) + { + case 'A': // ASCII value + text += (char)atoi(&token[2]); + continue; + case 'G': + //*to++ = ' '; + continue; + case 'L': // line break + text += "
"; + continue; + case 'M': // new paragraph + text += "

"; + continue; + case 'T': + //*to++ = ' '; + continue; + } + break; + case 'T': // title formatting + switch(token[1]) + { + case 'T': // Book title begin + text += ""; + continue; + case 't': + text += ""; + continue; + case 'S': + text += "

"; + continue; + case 's': + text += "
"; + continue; + } + break; + + case 'P': // special formatting + switch(token[1]) { + case 'P': // Poetry begin + text += ""; + continue; + case 'p': + text += ""; + continue; + } + break; + } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else text += *from; + } + return 0; +} + + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfwebif.cpp b/src/modules/filters/gbfwebif.cpp new file mode 100644 index 0000000..e651db6 --- /dev/null +++ b/src/modules/filters/gbfwebif.cpp @@ -0,0 +1,191 @@ +/*************************************************************************** + GBFWEBIF.cpp - GBF to HTML filter with hrefs + for strongs and morph tags + ------------------- + begin : 2001-09-03 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include + +SWORD_NAMESPACE_START + +GBFWEBIF::GBFWEBIF() : baseURL(""), passageStudyURL(baseURL + "passagestudy.jsp") { +//all is done in GBFHTMLHREF since it inherits form this class + addTokenSubstitute("FR", ""); // words of Jesus begin + addTokenSubstitute("Fr", ""); +} + +bool GBFWEBIF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + const char *tok; + char val[128]; + char *valto; + const char *num; + SWBuf url; + + if (!substituteToken(buf, token)) { + if (!strncmp(token, "w", 1)) { + // OSIS Word (temporary until OSISRTF is done) + valto = val; + num = strstr(token, "lemma=\"x-Strongs:"); + if (num) { + for (num+=17; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + buf += " <"; + url = ""; + for (tok = val; *tok; tok++) { + url += *tok; + } + if ((url.length() > 1) && strchr("GH", url[0])) { + if (isdigit(url[1])) + url = url.c_str()+1; + } + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(url).c_str()); + + for (tok = (!isdigit(*val))?val+1:val; *tok; tok++) { + buf += *tok; + } + buf += "> "; + } + } + else { + num = strstr(token, "lemma=\"strong:"); + if (num) { + for (num+=14; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + buf += " <"; + url = ""; + for (tok = val; *tok; tok++) { + url += *tok; + } + if ((url.length() > 1) && strchr("GH", url[0])) { + if (isdigit(url[1])) + url = url.c_str()+1; + } + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(url).c_str()); + + for (tok = (!isdigit(*val))?val+1:val; *tok; tok++) { + buf += *tok; + } + buf += "> "; + } + } + } + valto = val; + num = strstr(token, "morph=\"x-Robinson:"); + if (num) { + for (num+=18; ((*num) && (*num != '\"')); num++) + *valto++ = *num; + *valto = 0; + buf += " ("; + url = ""; + for (tok = val; *tok; tok++) { + // normal robinsons tense + buf += *tok; + } + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(url).c_str()); + + for (tok = val; *tok; tok++) { + buf += *tok; + } + buf += ") "; + } + } + + else if (!strncmp(token, "WG", 2) || !strncmp(token, "WH", 2)) { // strong's numbers + buf += " <"; + url = ""; + + for (tok = token+1; *tok; tok++) { + url += *tok; + } + if ((url.length() > 1) && strchr("GH", url[0])) { + if (isdigit(url[1])) + url = url.c_str()+1; + } + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(url).c_str()); + + for (tok = token + 2; *tok; tok++) { + buf += *tok; + } + buf += ">"; + } + + else if (!strncmp(token, "WTG", 3) || !strncmp(token, "WTH", 3)) { // strong's numbers tense + buf += " ("; + url = ""; + for (tok = token + 2; *tok; tok++) { + if(*tok != '\"') + url += *tok; + } + if ((url.length() > 1) && strchr("GH", url[0])) { + if (isdigit(url[1])) + url = url.c_str()+1; + } + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(url).c_str()); + + for (tok = token + 3; *tok; tok++) + if(*tok != '\"') + buf += *tok; + buf += ")"; + } + + else if (!strncmp(token, "WT", 2) && strncmp(token, "WTH", 3) && strncmp(token, "WTG", 3)) { // morph tags + buf += " ("; + for (tok = token + 2; *tok; tok++) { + if(*tok != '\"') + buf += *tok; + } + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(url).c_str()); + + for (tok = token + 2; *tok; tok++) { + if(*tok != '\"') + buf += *tok; + } + buf += ")"; + } + + else if (!strncmp(token, "RX", 2)) { + buf += "", passageStudyURL.c_str(), URL::encode(url).c_str()); + } + // ok to leave these in + else if ((!strncmp(token, "span", 4)) + || (!strncmp(token, "/span", 5))) { + buf.appendFormatted("<%s>", token); + } + + else { + return GBFHTMLHREF::handleToken(buf, token, userData); + } + } + return true; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/gbfwordjs.cpp b/src/modules/filters/gbfwordjs.cpp new file mode 100644 index 0000000..f81ffac --- /dev/null +++ b/src/modules/filters/gbfwordjs.cpp @@ -0,0 +1,282 @@ +/****************************************************************************** + * + * gbfstrongs - SWFilter descendant to hide or show strongs number + * in a GBF module. + */ + + +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Word Javascript"; +const char oTip[] = "Toggles Word Javascript data"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + + +GBFWordJS::GBFWordJS() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); + + defaultGreekLex = 0; + defaultHebLex = 0; + defaultGreekParse = 0; + defaultHebParse = 0; + mgr = 0; +} + + +GBFWordJS::~GBFWordJS() { +} + + +char GBFWordJS::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (option) { + char token[2112]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + bool lastspace = false; + int word = 1; + char val[128]; + char wordstr[5]; + unsigned int textStart = 0, lastAppendLen = 0, textEnd = 0; + SWBuf tmp; + bool newText = false; + bool needWordOut = false; + AttributeValue *wordAttrs = 0; + SWBuf modName = (module)?module->Name():""; + SWBuf wordSrcPrefix = modName; + + const SWBuf orig = text; + const char * from = orig.c_str(); + VerseKey *vkey = 0; + if (key) { + vkey = SWDYNAMIC_CAST(VerseKey, key); + } + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + textEnd = text.length(); + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if (*token == 'W' && (token[1] == 'G' || token[1] == 'H')) { // Strongs + strcpy(val,token+1); + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + // normal strongs number + sprintf(wordstr, "%03d", word++); + needWordOut = (word > 2); + wordAttrs = &(module->getEntryAttributes()["Word"][wordstr]); + (*wordAttrs)["Lemma"] = val; + //printf("Adding: [\"Word\"][%s][\"Strongs\"] = %s\n", wordstr, val); + tmp = ""; + tmp.append(text.c_str()+textStart, (int)(textEnd - textStart)); + (*wordAttrs)["Text"] = tmp; + text.append(""); + SWBuf ts; + ts.appendFormatted("%d", textStart); + (*wordAttrs)["TextStart"] = ts; + //printf("Adding: [\"Word\"][%s][\"Text\"] = %s\n", wordstr, tmp.c_str()); + newText = true; + } + else { + // verb morph + if (wordAttrs) { + (*wordAttrs)["Morph"] = val; + } + //printf("Adding: [\"Word\"][%s][\"Morph\"] = %s\n", wordstr, val); + } + + } + if (*token == 'W' && token[1] == 'T') { // Morph + if (token[2] == 'G' || token[2] == 'H') { + strcpy(val, token+2); + } + else strcpy(val, token+1); + if (wordAttrs) { + (*wordAttrs)["Morph"] = val; + (*wordAttrs)["MorphClass"] = "StrongsMorph"; + } + newText = true; + } + // if not a strongs token, keep token in text + text += '<'; + text += token; + text += '>'; + if (needWordOut) { + char wstr[10]; + sprintf(wstr, "%03d", word-2); + AttributeValue *wAttrs = &(module->getEntryAttributes()["Word"][wstr]); + needWordOut = false; + SWBuf strong = (*wAttrs)["Lemma"]; + SWBuf morph = (*wAttrs)["Morph"]; + SWBuf morphClass = (*wAttrs)["MorphClass"]; + SWBuf wordText = (*wAttrs)["Text"]; + SWBuf textSt = (*wAttrs)["TextStart"]; + if (strong.size()) { + char gh = 0; + gh = isdigit(strong[0]) ? 0:strong[0]; + if (!gh) { + if (vkey) { + gh = vkey->Testament() ? 'H' : 'G'; + } + } + else strong << 1; + + SWModule *sLex = 0; + SWModule *sMorph = 0; + if (gh == 'G') { + sLex = defaultGreekLex; + sMorph = defaultGreekParse; + } + if (gh == 'H') { + sLex = defaultHebLex; + sMorph = defaultHebParse; + } + SWBuf lexName = ""; + if (sLex) { + // we can pass the real lex name in, but we have some + // aliases in the javascript to optimize bandwidth + lexName = sLex->Name(); + if (lexName == "StrongsGreek") + lexName = "G"; + if (lexName == "StrongsHebrew") + lexName = "H"; + } + SWBuf wordID; + if (vkey) { + // optimize for bandwidth and use only the verse as the unique entry id + wordID.appendFormatted("%d", vkey->Verse()); + } + else { + wordID = key->getText(); + } + for (unsigned int i = 0; i < wordID.size(); i++) { + if ((!isdigit(wordID[i])) && (!isalpha(wordID[i]))) { + wordID[i] = '_'; + } + } + wordID.appendFormatted("_%s%d", wordSrcPrefix.c_str(), atoi(wstr)); + if (textSt.size()) { + int textStr = atoi(textSt.c_str()); + textStr += lastAppendLen; + SWBuf spanStart = ""; + + + +/* + if (sMorph) { + SWBuf popMorph = "%s", sMorph->Name(), morph.c_str(), wordID.c_str(), morph.c_str()); + morph = popMorph; + } +*/ + + // 'p' = 'fillpop' to save bandwidth + const char *m = strchr(morph.c_str(), ':'); + if (m) m++; + else m = morph.c_str(); + spanStart.appendFormatted("", lexName.c_str(), strong.c_str(), wordID.c_str(), m, modName.c_str()); + text.insert(textStr, spanStart); + lastAppendLen = spanStart.length(); + } + } + + } + if (newText) { + textStart = text.length(); newText = false; + } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else { + text += *from; + lastspace = (*from == ' '); + } + } + + char wstr[10]; + sprintf(wstr, "%03d", word-1); + AttributeValue *wAttrs = &(module->getEntryAttributes()["Word"][wstr]); + needWordOut = false; + SWBuf strong = (*wAttrs)["Lemma"]; + SWBuf morph = (*wAttrs)["Morph"]; + SWBuf morphClass = (*wAttrs)["MorphClass"]; + SWBuf wordText = (*wAttrs)["Text"]; + SWBuf textSt = (*wAttrs)["TextStart"]; + if (strong.size()) { + char gh = 0; + gh = isdigit(strong[0]) ? 0:strong[0]; + if (!gh) { + if (vkey) { + gh = vkey->Testament() ? 'H' : 'G'; + } + } + else strong << 1; + + SWModule *sLex = 0; + if (gh == 'G') { + sLex = defaultGreekLex; + } + if (gh == 'H') { + sLex = defaultHebLex; + } + SWBuf lexName = ""; + if (sLex) { + // we can pass the real lex name in, but we have some + // aliases in the javascript to optimize bandwidth + lexName = sLex->Name(); + if (lexName == "StrongsGreek") + lexName = "G"; + if (lexName == "StrongsHebrew") + lexName = "H"; + } + SWBuf wordID; + if (vkey) { + // optimize for bandwidth and use only the verse as the unique entry id + wordID.appendFormatted("%d", vkey->Verse()); + } + else { + wordID = key->getText(); + } + for (unsigned int i = 0; i < wordID.size(); i++) { + if ((!isdigit(wordID[i])) && (!isalpha(wordID[i]))) { + wordID[i] = '_'; + } + } + wordID.appendFormatted("_%s%d", wordSrcPrefix.c_str(), atoi(wstr)); + if (textSt.size()) { + int textStr = atoi(textSt.c_str()); + textStr += lastAppendLen; + SWBuf spanStart = ""; + // 'p' = 'fillpop' to save bandwidth + const char *m = strchr(morph.c_str(), ':'); + if (m) m++; + else m = morph.c_str(); + spanStart.appendFormatted("", lexName.c_str(), strong.c_str(), wordID.c_str(), m, modName.c_str()); + text.insert(textStr, spanStart); + } + } + } + + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/greeklexattribs.cpp b/src/modules/filters/greeklexattribs.cpp new file mode 100644 index 0000000..1e82305 --- /dev/null +++ b/src/modules/filters/greeklexattribs.cpp @@ -0,0 +1,101 @@ +/****************************************************************************** + * + * greeklexattribs - SWFilter descendant to set entry attributes for greek + * lexicons + */ + + +#include +#include +#include +#include +#include +#include + +using std::string; + +SWORD_NAMESPACE_START + +GreekLexAttribs::GreekLexAttribs() { +} + + +char GreekLexAttribs::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + + if (module->isProcessEntryAttributes()) { + const char *from; + bool inAV = false; + string phrase; + string freq; + char val[128], *valto; + char wordstr[7]; + const char *currentPhrase = 0; + const char *currentPhraseEnd = 0; + int number = 0; + + + for (from = text.c_str(); *from; from++) { + if (inAV) { + if (currentPhrase == 0) { + if (isalpha(*from)) + currentPhrase = from; + } + else { + if ((!isalpha(*from)) && (*from != ' ') && (*from != '+') && (*from !='(') && (*from != ')') && (*from != '\'')) { + if (*from == '<') { + if (!currentPhraseEnd) + currentPhraseEnd = from - 1; + for (; *from && *from != '>'; from++) { + if (!strncmp(from, "value=\"", 7)) { + valto = val; + from += 7; + for (unsigned int i = 0; from[i] != '\"' && i < 127; i++) + *valto++ = from[i]; + *valto = 0; + sprintf(wordstr, "%03d", number+1); + module->getEntryAttributes()["AVPhrase"][wordstr]["CompoundedWith"] = val; + from += strlen(val); + } + } + continue; + } + + phrase = ""; + phrase.append(currentPhrase, (int)(((currentPhraseEnd>currentPhrase)?currentPhraseEnd:from) - currentPhrase)-1); + currentPhrase = from; + while (*from && isdigit(*from)) from++; + freq = ""; + freq.append(currentPhrase, (int)(from - currentPhrase)); + if ((freq.length() > 0) && (phrase.length() > 0)) { + sprintf(wordstr, "%03d", ++number); + if ((strchr(phrase.c_str(), '(') > phrase.c_str()) && (strchr(phrase.c_str(), ')') > phrase.c_str() + 1)) { + string tmp = phrase.substr(0, phrase.find_first_of("(")); + phrase.erase(phrase.find_first_of("("), 1); + phrase.erase(phrase.find_first_of(")"), 1); + phrase.erase(0,phrase.find_first_not_of("\r\n\v\t ")); phrase.erase(phrase.find_last_not_of("\r\n\v\t ")+1); + module->getEntryAttributes()["AVPhrase"][wordstr]["Alt"] = phrase.c_str(); + phrase = tmp; + } + phrase.erase(0,phrase.find_first_not_of("\r\n\v\t ")); phrase.erase(phrase.find_last_not_of("\r\n\v\t ")+1); + freq.erase(0,freq.find_first_not_of("\r\n\v\t ")); freq.erase(freq.find_last_not_of("\r\n\v\t ")+1); + module->getEntryAttributes()["AVPhrase"][wordstr]["Phrase"] = phrase.c_str(); + module->getEntryAttributes()["AVPhrase"][wordstr]["Frequency"] = freq.c_str(); + currentPhrase = 0; + currentPhraseEnd = 0; + } + } + } + if (*from == ';') inAV = false; + + } + else if (!strncmp(from, "AV-", 3)) { + inAV = true; + from+=2; + } + } + } + return 0; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/latin1utf16.cpp b/src/modules/filters/latin1utf16.cpp new file mode 100644 index 0000000..1392750 --- /dev/null +++ b/src/modules/filters/latin1utf16.cpp @@ -0,0 +1,119 @@ +/****************************************************************************** + * + * Latin1UTF16 - SWFilter descendant to convert a Latin-1 character to UTF-16 + * + */ + + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +Latin1UTF16::Latin1UTF16() { +} + + +char Latin1UTF16::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + const unsigned char *from; + if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering + return (char)-1; + + + SWBuf orig = text; + from = (const unsigned char *)orig.c_str(); + + for (text = ""; *from; from++) { + text.setSize(text.size()+2); + switch (*from) { + case 0x80: // '€' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x20AC; + break; + case 0x82: // '‚' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x201A; + break; + case 0x83: // 'ƒ' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x0192; + break; + case 0x84: // '„' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x201E; + break; + case 0x85: // '…' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2026; + break; + case 0x86: // '†' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2020; + break; + case 0x87: // '‡' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2021; + break; + case 0x88: // 'ˆ' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x02C6; + break; + case 0x89: // '‰' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2030; + break; + case 0x8A: // 'Š' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x0160; + break; + case 0x8B: // '‹' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2039; + break; + case 0x8C: // 'Œ' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x0152; + break; + case 0x8E: // 'Ž' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x017D; + break; + case 0x91: // '‘' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2018; + break; + case 0x92: // '’' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2019; + break; + case 0x93: // '“' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x201C; + break; + case 0x94: // '”' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x201D; + break; + case 0x95: // '•' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2022; + break; + case 0x96: // '–' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2013; + break; + case 0x97: // '—' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2014; + break; + case 0x98: // '˜' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x02DC; + break; + case 0x99: // '™' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x2122; + break; + case 0x9A: // 'š' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x0161; + break; + case 0x9B: // '›' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x203A; + break; + case 0x9C: // 'œ' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x0153; + break; + case 0x9E: // 'ž' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x017E; + break; + case 0x9F: // 'Ÿ' + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) 0x0178; + break; + default: + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short) *from; + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/latin1utf8.cpp b/src/modules/filters/latin1utf8.cpp new file mode 100644 index 0000000..6c0d7f1 --- /dev/null +++ b/src/modules/filters/latin1utf8.cpp @@ -0,0 +1,173 @@ +/****************************************************************************** + * + * Latin1UTF8 - SWFilter descendant to convert a Latin-1 character to UTF-8 + * + */ + + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +Latin1UTF8::Latin1UTF8() { +} + + +char Latin1UTF8::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + const unsigned char *from; + + if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering + return (char)-1; + + SWBuf orig = text; + from = (const unsigned char *)orig.c_str(); + + for (text = ""; *from; from++) { + if (*from < 0x80) { + text += *from; + } + else if (*from < 0xc0) { + switch(*from) { + case 0x80: // '€' + text += 0xe2; // 'â' + text += 0x82; // '‚' + text += 0xac; // '¬' + break; + case 0x82: // '‚' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0x9a; // 'š' + break; + case 0x83: // 'ƒ' + text += 0xc6; // 'Æ' + text += 0x92; // '’' + break; + case 0x84: // '„' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0x9e; // 'ž' + break; + case 0x85: // '…' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0xa6; // '¦' + break; + case 0x86: // '†' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0xa0; // ' ' + break; + case 0x87: // '‡' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0xa1; // '¡' + break; + case 0x88: // 'ˆ' + text += 0xcb; // 'Ë' + text += 0x86; // '†' + break; + case 0x89: // '‰' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0xb0; // '°' + break; + case 0x8A: // 'Š' + text += 0xc5; // 'Å' + text += 0xa0; // ' ' + break; + case 0x8B: // '‹' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0xb9; // '¹' + break; + case 0x8C: // 'Œ' + text += 0xc5; // 'Å' + text += 0x92; // '’' + break; + case 0x8E: // 'Ž' + text += 0xc5; // 'Å' + text += 0xbd; // '½' + break; + case 0x91: // '‘' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0x98; // '˜' + break; + case 0x92: // '’' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0x99; // '™' + break; + case 0x93: // '“' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0x9c; // 'œ' + break; + case 0x94: // '”' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0x9d; // '' + break; + case 0x95: // '•' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0xa2; // '¢' + break; + case 0x96: // '–' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0x93; // '“' + break; + case 0x97: // '—' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0x94; // '”' + break; + case 0x98: // '˜' + text += 0xcb; // 'Ë' + text += 0x9c; // 'œ' + break; + case 0x99: // '™' + text += 0xe2; // 'â' + text += 0x84; // '„' + text += 0xa2; // '¢' + break; + case 0x9A: // 'š' + text += 0xc5; // 'Å' + text += 0xa1; // '¡' + break; + case 0x9B: // '›' + text += 0xe2; // 'â' + text += 0x80; // '€' + text += 0xba; // 'º' + break; + case 0x9C: // 'œ' + text += 0xc5; // 'Å' + text += 0x93; // '“' + break; + case 0x9E: // 'ž' + text += 0xc5; // 'Å' + text += 0xbe; // '¾' + break; + case 0x9F: // 'Ÿ' + text += 0xc5; // 'Å' + text += 0xb8; // '¸' + break; + default: + text += 0xC2; + text += *from; + } + } + else { + text += 0xC3; + text += (*from - 0x40); + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osisfootnotes.cpp b/src/modules/filters/osisfootnotes.cpp new file mode 100644 index 0000000..89c9c40 --- /dev/null +++ b/src/modules/filters/osisfootnotes.cpp @@ -0,0 +1,157 @@ +/****************************************************************************** + * + * osisfootnotes - SWFilter descendant to hide or show footnotes + * in an OSIS module. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Footnotes"; +const char oTip[] = "Toggles Footnotes On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + + +OSISFootnotes::OSISFootnotes() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +OSISFootnotes::~OSISFootnotes() { +} + + +char OSISFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + SWBuf token; + bool intoken = false; + bool hide = false; + SWBuf tagText; + XMLTag startTag; + SWBuf refs = ""; + int footnoteNum = 1; + char buf[254]; + VerseKey parser(key->getText()); + + SWBuf orig = text; + const char *from = orig.c_str(); + + XMLTag tag; + bool strongsMarkup = false; + + + for (text = ""; *from; ++from) { + + // remove all newlines temporarily to fix kjv2003 module + if ((*from == 10) || (*from == 13)) { + if ((text.length()>1) && (text[text.length()-2] != ' ') && (*(from+1) != ' ')) + text.append(' '); + continue; + } + + + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + + + + if (*from == '>') { // process tokens + intoken = false; + if (!strncmp(token, "note", 4) || !strncmp(token.c_str(), "/note", 5)) { + tag = token; + + if (!tag.isEndTag()) { + if (tag.getAttribute("type") && (!strcmp("x-strongsMarkup", tag.getAttribute("type")) + || !strcmp("strongsMarkup", tag.getAttribute("type"))) // deprecated + ) { + tag.setEmpty(false); // handle bug in KJV2003 module where some note open tags were + strongsMarkup = true; + } + + if (!tag.isEmpty()) { +// if ((!tag.isEmpty()) || (SWBuf("strongsMarkup") == tag.getAttribute("type"))) { + refs = ""; + startTag = tag; + hide = true; + tagText = ""; + continue; + } + } + if (hide && tag.isEndTag()) { + if (module->isProcessEntryAttributes() && !strongsMarkup) { //don`t parse strongsMarkup to EntryAttributes as Footnote + sprintf(buf, "%i", footnoteNum++); + StringList attributes = startTag.getAttributeNames(); + for (StringList::const_iterator it = attributes.begin(); it != attributes.end(); it++) { + module->getEntryAttributes()["Footnote"][buf][it->c_str()] = startTag.getAttribute(it->c_str()); + } + module->getEntryAttributes()["Footnote"][buf]["body"] = tagText; + startTag.setAttribute("swordFootnote", buf); + if ((startTag.getAttribute("type")) && (!strcmp(startTag.getAttribute("type"), "crossReference"))) { + if (!refs.length()) + refs = parser.ParseVerseList(tagText.c_str(), parser, true).getRangeText(); + module->getEntryAttributes()["Footnote"][buf]["refList"] = refs.c_str(); + } + } + hide = false; + if (option || (startTag.getAttribute("type") && !strcmp(startTag.getAttribute("type"), "crossReference"))) { // we want the tag in the text; crossReferences are handled by another filter + text.append(startTag); +// text.append(tagText); // we don't put the body back in because it is retrievable from EntryAttributes["Footnotes"][]["body"]. + } + else continue; + } + strongsMarkup = false; + } + + // if not a heading token, keep token in text + //if ((!strcmp(tag.getName(), "reference")) && (!tag.isEndTag())) { + // SWBuf osisRef = tag.getAttribute("osisRef"); + if (!strncmp(token, "reference", 9)) { + if (refs.length()) { + refs.append("; "); + } + + const char* attr = strstr(token.c_str() + 9, "osisRef=\""); + const char* end = attr ? strchr(attr+9, '"') : 0; + + if (attr && end) { + refs.append(attr+9, end-(attr+9)); + } + } + if (!hide) { + text.append('<'); + text.append(token); + text.append('>'); + } + else { + tagText.append('<'); + tagText.append(token); + tagText.append('>'); + } + continue; + } + if (intoken) { //copy token + token.append(*from); + } + else if (!hide) { //copy text which is not inside a token + text.append(*from); + } + else tagText.append(*from); + } + return 0; +} + +SWORD_NAMESPACE_END + diff --git a/src/modules/filters/osisheadings.cpp b/src/modules/filters/osisheadings.cpp new file mode 100644 index 0000000..a072335 --- /dev/null +++ b/src/modules/filters/osisheadings.cpp @@ -0,0 +1,144 @@ +/****************************************************************************** + * + *osisheadings - SWFilter descendant to hide or show headings + * in an OSIS module. + */ + + +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Headings"; +const char oTip[] = "Toggles Headings On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +OSISHeadings::OSISHeadings() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +OSISHeadings::~OSISHeadings() { +} + + +char OSISHeadings::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + SWBuf token; + bool intoken = false; + bool hide = false; + bool preverse = false; + bool withinTitle = false; + bool canonical = false; + SWBuf header; + int headerNum = 0; + int pvHeaderNum = 0; + char buf[254]; + XMLTag startTag; + + SWBuf orig = text; + const char *from = orig.c_str(); + + XMLTag tag; + + for (text = ""; *from; ++from) { + if (*from == '<') { + intoken = true; + token = ""; + + continue; + } + if (*from == '>') { // process tokens + intoken = false; + + if (!strncmp(token.c_str(), "title", 5) || !strncmp(token.c_str(), "/title", 6)) { + withinTitle = (!strnicmp(token.c_str(), "title", 5)); + tag = token; + + if (!tag.isEndTag()) { //start tag + if (!tag.isEmpty()) { + startTag = tag; + } + } + + if ( (tag.getAttribute("subType") && !stricmp(tag.getAttribute("subType"), "x-preverse")) + || (tag.getAttribute("subtype") && !stricmp(tag.getAttribute("subtype"), "x-preverse")) // deprecated + ) { + hide = true; + preverse = true; + header = ""; + canonical = (tag.getAttribute("canonical") && (!stricmp(tag.getAttribute("canonical"), "true"))); + continue; + } + if (!tag.isEndTag()) { //start tag + hide = true; + header = ""; + if (option || canonical) { // we want the tag in the text + text.append('<'); + text.append(token); + text.append('>'); + } + continue; + } + if (hide && tag.isEndTag()) { + if (module->isProcessEntryAttributes() && ((option || canonical) || (!preverse))) { + if (preverse) { + sprintf(buf, "%i", pvHeaderNum++); + module->getEntryAttributes()["Heading"]["Preverse"][buf] = header; + } + else { + sprintf(buf, "%i", headerNum++); + module->getEntryAttributes()["Heading"]["Interverse"][buf] = header; + if (option || canonical) { // we want the tag in the text + text.append(header); + } + } + + StringList attributes = startTag.getAttributeNames(); + for (StringList::const_iterator it = attributes.begin(); it != attributes.end(); it++) { + module->getEntryAttributes()["Heading"][buf][it->c_str()] = startTag.getAttribute(it->c_str()); + } + } + + hide = false; + if (!(option || canonical) || preverse) { // we don't want the tag in the text anymore + preverse = false; + continue; + } + preverse = false; + } + } + + if (withinTitle) { + header.append('<'); + header.append(token); + header.append('>'); + } else { + // if not a heading token, keep token in text + if (!hide) { + text.append('<'); + text.append(token); + text.append('>'); + } + } + continue; + } + if (intoken) { //copy token + token.append(*from); + } + else if (!hide) { //copy text which is not inside a token + text.append(*from); + } + else header.append(*from); + } + return 0; +} + +SWORD_NAMESPACE_END + diff --git a/src/modules/filters/osishtmlhref.cpp b/src/modules/filters/osishtmlhref.cpp new file mode 100644 index 0000000..fe3e058 --- /dev/null +++ b/src/modules/filters/osishtmlhref.cpp @@ -0,0 +1,561 @@ +/*************************************************************************** + osishtmlhref.cpp - OSIS to HTML with hrefs filter + ------------------- + begin : 2003-06-24 + copyright : 2003 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 version 2 of the License. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +class OSISHTMLHREF::QuoteStack : public std::stack { +}; + +OSISHTMLHREF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { + inBold = false; + inXRefNote = false; + suspendLevel = 0; + quoteStack = new QuoteStack(); + wordsOfChristStart = " "; + wordsOfChristEnd = " "; + if (module) { + osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false"))); + version = module->Name(); + BiblicalText = (!strcmp(module->Type(), "Biblical Texts")); + } + else { + osisQToTick = true; // default + version = ""; + } +} + +OSISHTMLHREF::MyUserData::~MyUserData() { + // Just in case the quotes are not well formed + while (!quoteStack->empty()) { + char *tagData = quoteStack->top(); + quoteStack->pop(); + delete [] tagData; + } + delete quoteStack; +} + +OSISHTMLHREF::OSISHTMLHREF() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + setPassThruNumericEscapeString(true); + + addAllowedEscapeString("quot"); + addAllowedEscapeString("apos"); + addAllowedEscapeString("amp"); + addAllowedEscapeString("lt"); + addAllowedEscapeString("gt"); + + setTokenCaseSensitive(true); + + addTokenSubstitute("lg", "
"); + addTokenSubstitute("/lg", "
"); + + morphFirst = false; +} + +// though this might be slightly slower, possibly causing an extra bool check, this is a renderFilter +// so speed isn't the absolute highest priority, and this is a very minor possible hit +static inline void outText(const char *t, SWBuf &o, BasicFilterUserData *u) { if (!u->suspendTextPassThru) o += t; else u->lastSuspendSegment += t; } +static inline void outText(char t, SWBuf &o, BasicFilterUserData *u) { if (!u->suspendTextPassThru) o += t; else u->lastSuspendSegment += t; } + +void processLemma(bool suspendTextPassThru, XMLTag &tag, SWBuf &buf) { + const char *attrib; + const char *val; + if ((attrib = tag.getAttribute("lemma"))) { + int count = tag.getAttributePartCount("lemma", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + attrib = tag.getAttribute("lemma", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + SWBuf gh; + if(*val == 'G') + gh = "Greek"; + if(*val == 'H') + gh = "Hebrew"; + const char *val2 = val; + if ((strchr("GH", *val)) && (isdigit(val[1]))) + val2++; + //if ((!strcmp(val2, "3588")) && (lastText.length() < 1)) + // show = false; + //else { + if (!suspendTextPassThru) { + buf.appendFormatted("<%s>", + (gh.length()) ? gh.c_str() : "", + URL::encode(val2).c_str(), + val2); + } + //} + + } while (++i < count); + } +} + +void processMorph(bool suspendTextPassThru, XMLTag &tag, SWBuf &buf) { + const char * attrib; + const char *val; + if ((attrib = tag.getAttribute("morph"))) { // && (show)) { + SWBuf savelemma = tag.getAttribute("savlm"); + //if ((strstr(savelemma.c_str(), "3588")) && (lastText.length() < 1)) + // show = false; + //if (show) { + int count = tag.getAttributePartCount("morph", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + attrib = tag.getAttribute("morph", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + const char *val2 = val; + if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2]))) + val2+=2; + if (!suspendTextPassThru) { + buf.appendFormatted("(%s)", + URL::encode(tag.getAttribute("morph")).c_str(), + URL::encode(val).c_str(), + val2); + } + } while (++i < count); + //} + } +} + +bool OSISHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + MyUserData *u = (MyUserData *)userData; + SWBuf scratch; + bool sub = (u->suspendTextPassThru) ? substituteToken(scratch, token) : substituteToken(buf, token); + if (!sub) { + // manually process if it wasn't a simple substitution + XMLTag tag(token); + + // tag + if (!strcmp(tag.getName(), "w")) { + + // start tag + if ((!tag.isEmpty()) && (!tag.isEndTag())) { + u->w = token; + } + + // end or empty tag + else { + bool endTag = tag.isEndTag(); + SWBuf lastText; + //bool show = true; // to handle unplaced article in kjv2003-- temporary till combined + + if (endTag) { + tag = u->w.c_str(); + lastText = u->lastTextNode.c_str(); + } + else lastText = "stuff"; + + const char *attrib; + const char *val; + if ((attrib = tag.getAttribute("xlit"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + outText(" ", buf, u); + outText(val, buf, u); + } + if ((attrib = tag.getAttribute("gloss"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + outText(" ", buf, u); + outText(val, buf, u); + } + if (!morphFirst) { + processLemma(u->suspendTextPassThru, tag, buf); + processMorph(u->suspendTextPassThru, tag, buf); + } + else { + processMorph(u->suspendTextPassThru, tag, buf); + processLemma(u->suspendTextPassThru, tag, buf); + } + if ((attrib = tag.getAttribute("POS"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + outText(" ", buf, u); + outText(val, buf, u); + } + + /*if (endTag) + buf += "}";*/ + } + } + + // tag + else if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + SWBuf type = tag.getAttribute("type"); + bool strongsMarkup = (type == "x-strongsMarkup" || type == "strongsMarkup"); // the latter is deprecated + if (strongsMarkup) { + tag.setEmpty(false); // handle bug in KJV2003 module where some note open tags were + } + + if (!tag.isEmpty()) { + + if (!strongsMarkup) { // leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + VerseKey *vkey = NULL; + char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); + + u->inXRefNote = true; // Why this change? Ben Morgan: Any note can have references in, so we need to set this to true for all notes +// u->inXRefNote = (ch == 'x'); + + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) { } + if (vkey) { + //printf("URL = %s\n",URL::encode(vkey->getText()).c_str()); + buf.appendFormatted("*%c", + ch, + URL::encode(footnoteNumber.c_str()).c_str(), + URL::encode(u->version.c_str()).c_str(), + URL::encode(vkey->getText()).c_str(), + ch); + } + else { + buf.appendFormatted("*%c", + ch, + URL::encode(footnoteNumber.c_str()).c_str(), + URL::encode(u->version.c_str()).c_str(), + URL::encode(u->key->getText()).c_str(), + ch); + } + } + } + u->suspendTextPassThru = (++u->suspendLevel); + } + if (tag.isEndTag()) { + u->suspendTextPassThru = (--u->suspendLevel); + u->inXRefNote = false; + u->lastSuspendSegment = ""; // fix/work-around for nasb devineName in note bug + } + } + + //

paragraph tag + else if (!strcmp(tag.getName(), "p")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { // non-empty start tag + outText("
", buf, u); + } + else if (tag.isEndTag()) { // end tag + outText("
", buf, u); + userData->supressAdjacentWhitespace = true; + } + else { // empty paragraph break marker + outText("
", buf, u); + userData->supressAdjacentWhitespace = true; + } + } + + // tag + else if (!strcmp(tag.getName(), "reference")) { + if (!u->inXRefNote) { // only show these if we're not in an xref note + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + u->suspendTextPassThru = (++u->suspendLevel); + } + if (tag.isEndTag()) { + if (!u->BiblicalText) { + SWBuf refList = tag.getAttribute("passage"); + if (!refList.length()) + refList = u->lastTextNode; + SWBuf version = tag.getAttribute("version"); + + buf.appendFormatted(" ", + (refList.length()) ? URL::encode(refList.c_str()).c_str() : "", + (version.length()) ? URL::encode(version.c_str()).c_str() : ""); + buf += u->lastTextNode.c_str(); + buf += " "; + } + else { + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + VerseKey *vkey = NULL; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) {} + if (vkey) { + // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt. + //buf.appendFormatted("*x ", vkey->getText(), footnoteNumber.c_str()); + buf.appendFormatted("*x", + URL::encode(footnoteNumber.c_str()).c_str(), + URL::encode(u->version.c_str()).c_str(), + URL::encode(vkey->getText()).c_str()); + + } + } + u->suspendTextPassThru = (--u->suspendLevel); + } + }/* + if (tag.isEndTag()) { + u->suspendTextPassThru = false; + }*/ + } + + // poetry, etc + else if (!strcmp(tag.getName(), "l")) { + // end line marker + if (tag.getAttribute("eID")) { + outText("
", buf, u); + } + // without eID or sID + // Note: this is improper osis. This should be + else if (tag.isEmpty() && !tag.getAttribute("sID")) { + outText("
", buf, u); + } + // end of the line + else if (tag.isEndTag()) { + outText("
", buf, u); + } + } + + // + else if (!strcmp(tag.getName(), "lb")) { + outText("
", buf, u); + userData->supressAdjacentWhitespace = true; + } + // + // + // + else if ((!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type"))) { + if(!strcmp(tag.getAttribute("type"), "line")) { + outText("
", buf, u); + userData->supressAdjacentWhitespace = true; + } + else if(!strcmp(tag.getAttribute("type"),"x-p")) { + if( tag.getAttribute("marker")) + outText(tag.getAttribute("marker"), buf, u); + else outText("", buf, u); + } + else if (!strcmp(tag.getAttribute("type"), "cQuote")) { + const char *tmp = tag.getAttribute("marker"); + bool hasMark = tmp; + SWBuf mark = tmp; + tmp = tag.getAttribute("level"); + int level = (tmp) ? atoi(tmp) : 1; + + // first check to see if we've been given an explicit mark + if (hasMark) + outText(mark, buf, u); + // finally, alternate " and ', if config says we should supply a mark + else if (u->osisQToTick) + outText((level % 2) ? '\"' : '\'', buf, u); + } + } + + // + else if (!strcmp(tag.getName(), "title")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + outText("<b>", buf, u); + } + else if (tag.isEndTag()) { + outText("</b><br />", buf, u); + } + } + + // <catchWord> & <rdg> tags (italicize) + else if (!strcmp(tag.getName(), "rdg") || !strcmp(tag.getName(), "catchWord")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + outText("<i>", buf, u); + } + else if (tag.isEndTag()) { + outText("</i>", buf, u); + } + } + + // divineName + else if (!strcmp(tag.getName(), "divineName")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + u->suspendTextPassThru = (++u->suspendLevel); + } + else if (tag.isEndTag()) { + SWBuf lastText = u->lastSuspendSegment.c_str(); + u->suspendTextPassThru = (--u->suspendLevel); + if (lastText.size()) { + toupperstr(lastText); + scratch.setFormatted("%c<font size=\"-1\">%s</font>", lastText[0], lastText.c_str()+1); + outText(scratch.c_str(), buf, u); + } + } + } + + // <hi> text highlighting + else if (!strcmp(tag.getName(), "hi")) { + SWBuf type = tag.getAttribute("type"); + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + if (type == "b" || type == "x-b") { + outText("<b>", buf, u); + u->inBold = true; + } + else { // all other types + outText("<i>", buf, u); + u->inBold = false; + } + } + else if (tag.isEndTag()) { + if(u->inBold) { + outText("</b>", buf, u); + u->inBold = false; + } + else outText("</i>", buf, u); + } + } + + // <q> quote + // Rules for a quote element: + // If the tag is empty with an sID or an eID then use whatever it specifies for quoting. + // Note: empty elements without sID or eID are ignored. + // If the tag is <q> then use it's specifications and push it onto a stack for </q> + // If the tag is </q> then use the pushed <q> for specification + // If there is a marker attribute, possibly empty, this overrides osisQToTick. + // If osisQToTick, then output the marker, using level to determine the type of mark. + else if (!strcmp(tag.getName(), "q")) { + SWBuf type = tag.getAttribute("type"); + SWBuf who = tag.getAttribute("who"); + const char *tmp = tag.getAttribute("level"); + int level = (tmp) ? atoi(tmp) : 1; + tmp = tag.getAttribute("marker"); + bool hasMark = tmp; + SWBuf mark = tmp; + + // open <q> or <q sID... /> + if ((!tag.isEmpty() && !tag.isEndTag()) || (tag.isEmpty() && tag.getAttribute("sID"))) { + // if <q> then remember it for the </q> + if (!tag.isEmpty()) { + char *tagData = 0; + stdstr(&tagData, tag.toString()); + u->quoteStack->push(tagData); + } + + // Do this first so quote marks are included as WoC + if (who == "Jesus") + outText(u->wordsOfChristStart, buf, u); + + // first check to see if we've been given an explicit mark + if (hasMark) + outText(mark, buf, u); + //alternate " and ' + else if (u->osisQToTick) + outText((level % 2) ? '\"' : '\'', buf, u); + } + // close </q> or <q eID... /> + else if ((tag.isEndTag()) || (tag.isEmpty() && tag.getAttribute("eID"))) { + // if it is </q> then pop the stack for the attributes + if (tag.isEndTag() && !u->quoteStack->empty()) { + char *tagData = u->quoteStack->top(); + u->quoteStack->pop(); + XMLTag qTag(tagData); + delete [] tagData; + + type = qTag.getAttribute("type"); + who = qTag.getAttribute("who"); + tmp = qTag.getAttribute("level"); + level = (tmp) ? atoi(tmp) : 1; + tmp = qTag.getAttribute("marker"); + hasMark = tmp; + mark = tmp; + } + + // first check to see if we've been given an explicit mark + if (hasMark) + outText(mark, buf, u); + // finally, alternate " and ', if config says we should supply a mark + else if (u->osisQToTick) + outText((level % 2) ? '\"' : '\'', buf, u); + + // Do this last so quote marks are included as WoC + if (who == "Jesus") + outText(u->wordsOfChristEnd, buf, u); + } + } + + // <transChange> + else if (!strcmp(tag.getName(), "transChange")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + SWBuf type = tag.getAttribute("type"); + u->lastTransChange = type; + + // just do all transChange tags this way for now + if ((type == "added") || (type == "supplied")) + outText("<i>", buf, u); + else if (type == "tenseChange") + buf += "*"; + } + else if (tag.isEndTag()) { + SWBuf type = u->lastTransChange; + if ((type == "added") || (type == "supplied")) + outText("</i>", buf, u); + } + else { // empty transChange marker? + } + } + + // image + else if (!strcmp(tag.getName(), "figure")) { + const char *src = tag.getAttribute("src"); + if (!src) // assert we have a src attribute + return false; + + SWBuf filepath; + if (userData->module) { + filepath = userData->module->getConfigEntry("AbsoluteDataPath"); + if ((filepath.size()) && (filepath[filepath.size()-1] != '/') && (src[0] != '/')) + filepath += '/'; + } + filepath += src; + + // images become clickable, if the UI supports showImage. + outText("<a href=\"passagestudy.jsp?action=showImage&value=", buf, u); + outText(URL::encode(filepath.c_str()).c_str(), buf, u); + outText("&module=", buf, u); + outText(URL::encode(u->version.c_str()).c_str(), buf, u); + outText("\">", buf, u); + +// we do this because BibleCS looks for this EXACT format for an image tag + outText("<image border=0 src=\"", buf, u); + outText(filepath, buf, u); + outText("\" />", buf, u); + + outText("</a>", buf, u); + } + + else { + return false; // we still didn't handle token + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osislemma.cpp b/src/modules/filters/osislemma.cpp new file mode 100644 index 0000000..f5e6ff6 --- /dev/null +++ b/src/modules/filters/osislemma.cpp @@ -0,0 +1,85 @@ +/****************************************************************************** + * + * osislemma - SWFilter descendant to hide or show lemmata + * in a OSIS module. + */ + + +#include <stdlib.h> +#include <osislemma.h> +#include <utilxml.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Lemmas"; +const char oTip[] = "Toggles Lemmas On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +OSISLemma::OSISLemma() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +OSISLemma::~OSISLemma() { +} + + +char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + SWBuf token; + bool intoken = false; + bool lastspace = false; + + const SWBuf orig = text; + const char * from = orig.c_str(); + + if (!option) { + for (text = ""; *from; ++from) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if (token.startsWith("w ")) { // Word + XMLTag wtag(token); + int count = wtag.getAttributePartCount("lemma", ' '); + for (int i = 0; i < count; i++) { + SWBuf a = wtag.getAttribute("lemma", i, ' '); + const char *prefix = a.stripPrefix(':'); + if ((!prefix) || ((SWBuf)prefix).startsWith("lemma.")) { + // remove attribute part + wtag.setAttribute("lemma", 0, i, ' '); + i--; + count--; + } + } + token = wtag; + token.trim(); + // drop <> + token << 1; + token--; + } + + // keep token in text + text.append('<'); + text.append(token); + text.append('>'); + + continue; + } + if (intoken) { + token += *from; + } + else { + text.append(*from); + lastspace = (*from == ' '); + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osismorph.cpp b/src/modules/filters/osismorph.cpp new file mode 100644 index 0000000..69d44d5 --- /dev/null +++ b/src/modules/filters/osismorph.cpp @@ -0,0 +1,85 @@ +/****************************************************************************** + * + * osismorph - SWFilter descendant to hide or show morph tags + * in a OSIS module. + */ + + +#include <stdlib.h> +#include <osismorph.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Morphological Tags"; +const char oTip[] = "Toggles Morphological Tags On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +OSISMorph::OSISMorph() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +OSISMorph::~OSISMorph() { +} + + +char OSISMorph::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (!option) { // if we don't want morph tags + char token[2048]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + bool lastspace = false; + SWBuf orig = text; + const char *from = orig.c_str(); + + //taken out of the loop for speed + const char* start = 0; + const char* end = 0; + + for (text = ""; *from; ++from) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + + if ((*token == 'w') && (token[1] == ' ')) { + start = strstr(token+2, "morph=\""); //we leave out "w " at the start + end = start ? strchr(start+7, '"') : 0; //search the end of the morph value + + if (start && end) { //start and end of the morph tag found + text.append('<'); + text.append(token, start-token); //the text before the morph attr + text.append(end+1); //text after the morph attr + text.append('>'); + + continue; //next loop + } + } + + text.append('<'); + text.append(token); + text.append('>'); + + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos] = 0; + } + else { + text.append(*from); + lastspace = (*from == ' '); + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osismorphsegmentation.cpp b/src/modules/filters/osismorphsegmentation.cpp new file mode 100644 index 0000000..bf32581 --- /dev/null +++ b/src/modules/filters/osismorphsegmentation.cpp @@ -0,0 +1,106 @@ +/****************************************************************************** + * + * osismorphsegmentation - SWFilter descendant to toggle splitting of morphemes + * (for morpheme segmented Hebrew in the WLC) + */ + + +#include <osismorphsegmentation.h> +#include <stdlib.h> +#include <utilxml.h> +#include <swmodule.h> +#include <swbuf.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Morpheme Segmentation"; +const char oTip[] = "Toggles Morpheme Segmentation On and Off, when present"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +OSISMorphSegmentation::OSISMorphSegmentation() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +OSISMorphSegmentation::~OSISMorphSegmentation() {} + + +char OSISMorphSegmentation::processText(SWBuf &text, const SWKey * /*key*/, const SWModule *module) { + SWBuf token; + bool intoken = false; + bool hide = false; + + SWBuf orig( text ); + const char *from = orig.c_str(); + + XMLTag tag; + SWBuf tagText = ""; + unsigned int morphemeNum = 0; + bool inMorpheme = false; + SWBuf buf; + + for (text = ""; *from; ++from) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + + if (*from == '>') { // process tokens + intoken = false; + + if (!strncmp(token.c_str(), "seg ", 4) || !strncmp(token.c_str(), "/seg", 4)) { + tag = token; + + if (!tag.isEndTag() && tag.getAttribute("type") && !strcmp("morph", tag.getAttribute("type"))) { //<seg type="morph"> start tag + hide = !option; //only hide if option is Off + tagText = ""; + inMorpheme = true; + } + + if (tag.isEndTag()) { + buf.setFormatted("%.3d", morphemeNum++); + module->getEntryAttributes()["Morpheme"][buf]["body"] = tagText; + inMorpheme = false; + } + if (hide) { //hides start and end tags as long as hide is set + + if (tag.isEndTag()) { //</seg> + hide = false; + } + + continue; //leave out the current token + } + } //end of seg tag handling + + text.append('<'); + text.append(token); + text.append('>'); + + if (inMorpheme) { + tagText.append('<'); + tagText.append(token); + tagText.append('>'); + } + + hide = false; + + continue; + } //end of intoken part + + if (intoken) { //copy token + token.append(*from); + } + else { //copy text which is not inside of a tag + text.append(*from); + if (inMorpheme) { + tagText.append(*from); + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osisosis.cpp b/src/modules/filters/osisosis.cpp new file mode 100644 index 0000000..7da6089 --- /dev/null +++ b/src/modules/filters/osisosis.cpp @@ -0,0 +1,173 @@ +/*************************************************************************** + osisosis.cpp - internal OSIS to public OSIS filter + ------------------- + begin : 2004-03-13 + copyright : 2003 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 version 2 of the License. + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <osisosis.h> +#include <utilxml.h> +#include <versekey.h> +#include <swmodule.h> + +SWORD_NAMESPACE_START + + +OSISOSIS::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { + osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false"))); +} + + +OSISOSIS::OSISOSIS() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + setPassThruNumericEscapeString(true); + + addAllowedEscapeString("quot"); + addAllowedEscapeString("apos"); + addAllowedEscapeString("amp"); + addAllowedEscapeString("lt"); + addAllowedEscapeString("gt"); + + setTokenCaseSensitive(true); +} + + +char OSISOSIS::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + char status = SWBasicFilter::processText(text, key, module); + VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, key); + if (vkey) { + SWBuf ref = ""; + if (vkey->Verse()) { + ref.appendFormatted("\t\t<verse osisID=\"%s\">", vkey->getOSISRef()); + } + + if (ref.length() > 0) { + + text = ref + text; + + if (vkey->Verse()) { + VerseKey tmp; + tmp = *vkey; + tmp.AutoNormalize(0); + tmp.Headings(1); + + text += "</verse>"; + + tmp = MAXVERSE; + if (*vkey == tmp) { + tmp.Verse(0); +// sprintf(ref, "\t</div>"); +// pushString(&to, ref); + tmp = MAXCHAPTER; + tmp = MAXVERSE; + if (*vkey == tmp) { + tmp.Chapter(0); + tmp.Verse(0); +// sprintf(ref, "\t</div>"); +// pushString(&to, ref); + } + } + } + +// +// else if (vkey->Chapter()) { +// sprintf(ref, "\t<div type=\"chapter\" osisID=\"%s\">", vkey->getOSISRef()); +// } +// else sprintf(ref, "\t<div type=\"book\" osisID=\"%s\">", vkey->getOSISRef()); +// + } + } + return status; +} + +bool OSISOSIS::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + // manually process if it wasn't a simple substitution + if (!substituteToken(buf, token)) { + MyUserData *u = (MyUserData *)userData; + XMLTag tag(token); + + if (!tag.isEmpty() && (!tag.isEndTag())) + u->startTag = tag; + + // <w> tag + if (!strcmp(tag.getName(), "w")) { + + // start <w> tag + if ((!tag.isEmpty()) && (!tag.isEndTag())) { + SWBuf attr = tag.getAttribute("lemma"); + if (attr.length()) { + if (!strncmp(attr.c_str(), "x-Strongs:", 10)) { + memcpy(attr.getRawData()+3, "strong", 6); + attr << 3; + tag.setAttribute("lemma", attr); + } + } + attr = tag.getAttribute("morph"); + if (attr.length()) { + if (!strncmp(attr.c_str(), "x-StrongsMorph:", 15)) { + memcpy(attr.getRawData()+3, "strong", 6); + attr << 3; + tag.setAttribute("lemma", attr); + } + if (!strncmp(attr.c_str(), "x-Robinson:", 11)) { + attr[2] = 'r'; + attr << 2; + tag.setAttribute("lemma", attr); + } + } + tag.setAttribute("wn", 0); + tag.setAttribute("savlm", 0); + tag.setAttribute("splitID", 0); + } + buf += tag; + } + + // <note> tag + else if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + SWBuf type = tag.getAttribute("type"); + bool strongsMarkup = (type == "x-strongsMarkup" || type == "strongsMarkup"); // the latter is deprecated + if (strongsMarkup) { + tag.setEmpty(false); // handle bug in KJV2003 module where some note open tags were <note ... /> + } + + if (!tag.isEmpty()) { + tag.setAttribute("swordFootnote", 0); + + if (!strongsMarkup) { + buf += tag; + } + else u->suspendTextPassThru = true; + } + } + if (tag.isEndTag()) { + if (u->suspendTextPassThru == false) + buf+=tag; + else u->suspendTextPassThru = false; + } + } + + else { + return false; // we still didn't handle token + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osisplain.cpp b/src/modules/filters/osisplain.cpp new file mode 100644 index 0000000..62841a6 --- /dev/null +++ b/src/modules/filters/osisplain.cpp @@ -0,0 +1,192 @@ +/*************************************************************************** + osisplain.cpp - OSIS to Plaintext filter + ------------------- + begin : 2003-02-15 + copyright : 2003 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <osisplain.h> +#include <ctype.h> +#include <versekey.h> +#include <stringmgr.h> + +SWORD_NAMESPACE_START + +OSISPlain::OSISPlain() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + + addEscapeStringSubstitute("amp", "&"); + addEscapeStringSubstitute("apos", "'"); + addEscapeStringSubstitute("lt", "<"); + addEscapeStringSubstitute("gt", ">"); + addEscapeStringSubstitute("quot", "\""); + + setTokenCaseSensitive(true); + addTokenSubstitute("title", "\n"); + addTokenSubstitute("/title", "\n"); + addTokenSubstitute("/l", "\n"); + addTokenSubstitute("lg", "\n"); + addTokenSubstitute("/lg", "\n"); +} + + +bool OSISPlain::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + // manually process if it wasn't a simple substitution + if (!substituteToken(buf, token)) { + MyUserData *u = (MyUserData *)userData; + VerseKey *vk = SWDYNAMIC_CAST(VerseKey, u->key); + char testament = (vk) ? vk ->Testament() : 2; // default to NT + if (((*token == 'w') && (token[1] == ' ')) || + ((*token == '/') && (token[1] == 'w') && (!token[2]))) { + u->tag = token; + + bool start = false; + if (*token == 'w') { + if (token[strlen(token)-1] != '/') { + u->w = token; + return true; + } + start = true; + } + u->tag = (start) ? token : u->w.c_str(); + bool show = true; // to handle unplaced article in kjv2003-- temporary till combined + + SWBuf lastText = (start) ? "stuff" : u->lastTextNode.c_str(); + + const char *attrib; + const char *val; + if ((attrib = u->tag.getAttribute("xlit"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + buf.append(" <"); + buf.append(val); + buf.append('>'); + } + if ((attrib = u->tag.getAttribute("gloss"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + buf.append(" <"); + buf.append(val); + buf.append('>'); + } + if ((attrib = u->tag.getAttribute("lemma"))) { + int count = u->tag.getAttributePartCount("lemma", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + char gh; + attrib = u->tag.getAttribute("lemma", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + if ((strchr("GH", *val)) && (isdigit(val[1]))) { + gh = *val; + val++; + } + else { + gh = (testament>1) ? 'G' : 'H'; + } + if ((!strcmp(val, "3588")) && (lastText.length() < 1)) + show = false; + else { + buf.append(" <"); + buf.append(gh); + buf.append(val); + buf.append(">"); + } + } while (++i < count); + } + if ((attrib = u->tag.getAttribute("morph")) && (show)) { + int count = u->tag.getAttributePartCount("morph", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + attrib = u->tag.getAttribute("morph", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2]))) + val+=2; + buf.append(" ("); + buf.append(val); + buf.append(')'); + } while (++i < count); + } + if ((attrib = u->tag.getAttribute("POS"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + + buf.append(" <"); + buf.append(val); + buf.append('>'); + } + } + + // <note> tag + else if (!strncmp(token, "note", 4)) { + if (!strstr(token, "strongsMarkup")) { // leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off + buf.append(" ("); + } + else u->suspendTextPassThru = true; + } + else if (!strncmp(token, "/note", 5)) { + if (!u->suspendTextPassThru) + buf.append(')'); + else u->suspendTextPassThru = false; + } + + // <p> paragraph tag + else if (((*token == 'p') && ((token[1] == ' ') || (!token[1]))) || + ((*token == '/') && (token[1] == 'p') && (!token[2]))) { + userData->supressAdjacentWhitespace = true; + buf.append('\n'); + } + + // <lb .../> + else if (!strncmp(token, "lb", 2)) { + userData->supressAdjacentWhitespace = true; + buf.append('\n'); + } + else if (!strncmp(token, "l", 1) && strstr(token, "eID")) { + userData->supressAdjacentWhitespace = true; + buf.append('\n'); + } + else if (!strncmp(token, "/divineName", 11)) { + // Get the end portion of the string, and upper case it + char* end = buf.getRawData(); + end += buf.size() - u->lastTextNode.size(); + toupperstr(end); + } + + // <milestone type="line"/> + else if (!strncmp(token, "milestone", 9)) { + const char* type = strstr(token+10, "type=\""); + if (type && strncmp(type+6, "line", 4)) { //we check for type != line + userData->supressAdjacentWhitespace = true; + buf.append('\n'); + } + } + + else { + return false; // we still didn't handle token + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osisredletterwords.cpp b/src/modules/filters/osisredletterwords.cpp new file mode 100644 index 0000000..727332d --- /dev/null +++ b/src/modules/filters/osisredletterwords.cpp @@ -0,0 +1,85 @@ +/****************************************************************************** + * + * OSISRedLetterWords - SWFilter descendant to toggle red coloring for words + * of Christ in an OSIS module. + */ + + +#include <stdlib.h> +#include <osisredletterwords.h> +#include <swmodule.h> + + +SWORD_NAMESPACE_START + +const char oName[] = "Words of Christ in Red"; +const char oTip[] = "Toggles Red Coloring for Words of Christ On and Off if they are marked"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +OSISRedLetterWords::OSISRedLetterWords() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("On"); +} + + +OSISRedLetterWords::~OSISRedLetterWords() { +} + + +char OSISRedLetterWords::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (option) //leave in the red lettered words + return 0; + + SWBuf token; + bool intoken = false; + + SWBuf orig = text; + const char *from = orig.c_str(); + + //taken out of the loop + const char* start = 0; + const char* end = 0; + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + else if (*from == '>') { // process tokens + intoken = false; + + if ((token[0] == 'q') && (token[1] == ' ')) { //q tag + start = strstr(token.c_str(), " who=\"Jesus\""); + if (start && (strlen(start) >= 12)) { //we found a quote of Jesus Christ + end = start+12; //marks the end of the who attribute value + + text.append('<'); + text.append(token, start - (token.c_str())); //the text before the who attr + text.append(end, token.c_str() + token.length() - end); //text after the who attr + text.append('>'); + + continue; + } + } + + //token not processed, append it. We don't want to alter the text + text.append('<'); + text.append(token); + text.append('>'); + continue; + } + + if (intoken) { //copy token + token.append(*from); + } + else { //copy text which is not inside a token + text.append(*from); + } + } + return 0; +} + +SWORD_NAMESPACE_END + diff --git a/src/modules/filters/osisrtf.cpp b/src/modules/filters/osisrtf.cpp new file mode 100644 index 0000000..0352335 --- /dev/null +++ b/src/modules/filters/osisrtf.cpp @@ -0,0 +1,520 @@ +/*************************************************************************** + osisrtf.cpp - OSIS to RTF filter + ------------------- + begin : 2003-02-15 + copyright : 2003 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 version 2 of the License. * + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <ctype.h> +#include <osisrtf.h> +#include <utilxml.h> +#include <utilstr.h> +#include <versekey.h> +#include <swmodule.h> +#include <stringmgr.h> +#include <stack> + +SWORD_NAMESPACE_START + +namespace { + class MyUserData : public BasicFilterUserData { + public: + bool osisQToTick; + bool BiblicalText; + bool inXRefNote; + int suspendLevel; + std::stack<char *> quoteStack; + SWBuf w; + SWBuf version; + MyUserData(const SWModule *module, const SWKey *key); + ~MyUserData(); + }; + + + MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { + inXRefNote = false; + BiblicalText = false; + suspendLevel = 0; + if (module) { + version = module->Name(); + BiblicalText = (!strcmp(module->Type(), "Biblical Texts")); + } + osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false"))); + } + + + MyUserData::~MyUserData() { + // Just in case the quotes are not well formed + while (!quoteStack.empty()) { + char *tagData = quoteStack.top(); + quoteStack.pop(); + delete [] tagData; + } + } +static inline void outText(const char *t, SWBuf &o, BasicFilterUserData *u) { if (!u->suspendTextPassThru) o += t; else u->lastSuspendSegment += t; } +static inline void outText(char t, SWBuf &o, BasicFilterUserData *u) { if (!u->suspendTextPassThru) o += t; else u->lastSuspendSegment += t; } +}; + + +OSISRTF::OSISRTF() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + + addEscapeStringSubstitute("amp", "&"); + addEscapeStringSubstitute("apos", "'"); + addEscapeStringSubstitute("lt", "<"); + addEscapeStringSubstitute("gt", ">"); + addEscapeStringSubstitute("quot", "\""); + addTokenSubstitute("lg", "{\\par}"); + addTokenSubstitute("/lg", "{\\par}"); + + setTokenCaseSensitive(true); +} + + +BasicFilterUserData *OSISRTF::createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); +} + + +char OSISRTF::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + + // preprocess text buffer to escape RTF control codes + const char *from; + SWBuf orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { //loop to remove extra spaces + switch (*from) { + case '{': + case '}': + case '\\': + text += "\\"; + text += *from; + break; + default: + text += *from; + } + } + text += (char)0; + + SWBasicFilter::processText(text, key, module); //handle tokens as usual + + orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { //loop to remove extra spaces + if ((strchr(" \t\n\r", *from))) { + while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) { + from++; + } + text += " "; + } + else { + text += *from; + } + } + text += (char)0; // probably not needed, but don't want to remove without investigating (same as above) + return 0; +} + + +bool OSISRTF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + // manually process if it wasn't a simple substitution + MyUserData *u = (MyUserData *)userData; + SWBuf scratch; + bool sub = (u->suspendTextPassThru) ? substituteToken(scratch, token) : substituteToken(buf, token); + if (!sub) { + XMLTag tag(token); + + // <w> tag + if (!strcmp(tag.getName(), "w")) { + + // start <w> tag + if ((!tag.isEmpty()) && (!tag.isEndTag())) { + outText('{', buf, u); + u->w = token; + } + + // end or empty <w> tag + else { + bool endTag = tag.isEndTag(); + SWBuf lastText; + bool show = true; // to handle unplaced article in kjv2003-- temporary till combined + + if (endTag) { + tag = u->w.c_str(); + lastText = u->lastTextNode.c_str(); + } + else lastText = "stuff"; + + const char *attrib; + const char *val; + if ((attrib = tag.getAttribute("xlit"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + scratch.setFormatted(" {\\fs15 <%s>}", val); + outText(scratch.c_str(), buf, u); + } + if ((attrib = tag.getAttribute("gloss"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + scratch.setFormatted(" {\\fs15 <%s>}", val); + outText(scratch.c_str(), buf, u); + } + if ((attrib = tag.getAttribute("lemma"))) { + int count = tag.getAttributePartCount("lemma", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + attrib = tag.getAttribute("lemma", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + const char *val2 = val; + if ((strchr("GH", *val)) && (isdigit(val[1]))) + val2++; + if ((!strcmp(val2, "3588")) && (lastText.length() < 1)) + show = false; + else { + scratch.setFormatted(" {\\cf3 \\sub <%s>}", val2); + outText(scratch.c_str(), buf, u); + } + } while (++i < count); + } + if ((attrib = tag.getAttribute("morph")) && (show)) { + SWBuf savelemma = tag.getAttribute("savlm"); + if ((strstr(savelemma.c_str(), "3588")) && (lastText.length() < 1)) + show = false; + if (show) { + int count = tag.getAttributePartCount("morph", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + attrib = tag.getAttribute("morph", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + const char *val2 = val; + if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2]))) + val2+=2; + scratch.setFormatted(" {\\cf4 \\sub (%s)}", val2); + outText(scratch.c_str(), buf, u); + } while (++i < count); + } + } + if ((attrib = tag.getAttribute("POS"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + scratch.setFormatted(" {\\fs15 <%s>}", val); + outText(scratch.c_str(), buf, u); + } + + if (endTag) + outText('}', buf, u); + } + } + + // <note> tag + else if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + SWBuf type = tag.getAttribute("type"); + + if ( (type != "x-strongsMarkup") // leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off + && (type != "strongsMarkup") // deprecated + ) { + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + VerseKey *vkey = NULL; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) { } + if (vkey) { + char ch = ((!strcmp(type.c_str(), "crossReference")) || (!strcmp(type.c_str(), "x-cross-ref"))) ? 'x':'n'; + scratch.setFormatted("{\\super <a href=\"\">*%c%i.%s</a>} ", ch, vkey->Verse(), footnoteNumber.c_str()); + outText(scratch.c_str(), buf, u); + u->inXRefNote = (ch == 'x'); + } + } + u->suspendTextPassThru = (++u->suspendLevel); + } + } + if (tag.isEndTag()) { + u->suspendTextPassThru = (--u->suspendLevel); + u->inXRefNote = false; + } + } + + // <p> paragraph tag + else if (!strcmp(tag.getName(), "p")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { // non-empty start tag + outText("{\\fi200\\par}", buf, u); + } + else if (tag.isEndTag()) { // end tag + outText("{\\par}", buf, u); + userData->supressAdjacentWhitespace = true; + } + else { // empty paragraph break marker + outText("{\\pard\\par\\par}", buf, u); + userData->supressAdjacentWhitespace = true; + } + } + + // <reference> tag + else if (!strcmp(tag.getName(), "reference")) { + if (!u->inXRefNote) { // only show these if we're not in an xref note + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + outText("{<a href=\"\">", buf, u); + } + else if (tag.isEndTag()) { + outText("</a>}", buf, u); + } + } + } + + // <l> poetry + else if (!strcmp(tag.getName(), "l")) { + // end line marker + if (tag.getAttribute("eID")) { + outText("{\\par}", buf, u); + } + // <l/> without eID or sID + // Note: this is improper osis. This should be <lb/> + else if (tag.isEmpty() && !tag.getAttribute("sID")) { + outText("{\\par}", buf, u); + } + // end of the line + else if (tag.isEndTag()) { + outText("{\\par}", buf, u); + } + } + + // <milestone type="line"/> or <lb.../> + else if ((!strcmp(tag.getName(), "lb")) || ((!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line")))) { + outText("{\\par}", buf, u); + userData->supressAdjacentWhitespace = true; + } + + // <title> + else if (!strcmp(tag.getName(), "title")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + outText("{\\par\\i1\\b1 ", buf, u); + } + else if (tag.isEndTag()) { + outText("\\par}", buf, u); + } + } + + // <catchWord> & <rdg> tags (italicize) + else if (!strcmp(tag.getName(), "rdg") || !strcmp(tag.getName(), "catchWord")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + outText("{\\i1 ", buf, u); + } + else if (tag.isEndTag()) { + outText('}', buf, u); + } + } + + // <hi> + else if (!strcmp(tag.getName(), "hi")) { + SWBuf type = tag.getAttribute("type"); + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + if (type == "b" || type == "x-b") + outText("{\\b1 ", buf, u); + else // all other types + outText("{\\i1 ", buf, u); + } + else if (tag.isEndTag()) { + outText('}', buf, u); + } + } + + // <q> quote + // Rules for a quote element: + // If the tag is empty with an sID or an eID then use whatever it specifies for quoting. + // Note: empty elements without sID or eID are ignored. + // If the tag is <q> then use it's specifications and push it onto a stack for </q> + // If the tag is </q> then use the pushed <q> for specification + // If there is a marker attribute, possibly empty, this overrides osisQToTick. + // If osisQToTick, then output the marker, using level to determine the type of mark. + else if (!strcmp(tag.getName(), "q")) { + SWBuf type = tag.getAttribute("type"); + SWBuf who = tag.getAttribute("who"); + const char *tmp = tag.getAttribute("level"); + int level = (tmp) ? atoi(tmp) : 1; + tmp = tag.getAttribute("marker"); + bool hasMark = tmp; + SWBuf mark = tmp; + + // open <q> or <q sID... /> + if ((!tag.isEmpty() && !tag.isEndTag()) || (tag.isEmpty() && tag.getAttribute("sID"))) { + // if <q> then remember it for the </q> + if (!tag.isEmpty()) { + char *tagData = 0; + stdstr(&tagData, tag.toString()); + u->quoteStack.push(tagData); + } + + // Do this first so quote marks are included as WoC + if (who == "Jesus") + outText("\\cf6 ", buf, u); + + // first check to see if we've been given an explicit mark + if (hasMark) + outText(mark, buf, u); + //alternate " and ' + else if (u->osisQToTick) + outText((level % 2) ? '\"' : '\'', buf, u); + } + // close </q> or <q eID... /> + else if ((tag.isEndTag()) || (tag.getAttribute("eID"))) { + // if it is </q> then pop the stack for the attributes + if (tag.isEndTag() && !u->quoteStack.empty()) { + char *tagData = u->quoteStack.top(); + u->quoteStack.pop(); + XMLTag qTag(tagData); + delete [] tagData; + + type = qTag.getAttribute("type"); + who = qTag.getAttribute("who"); + tmp = qTag.getAttribute("level"); + level = (tmp) ? atoi(tmp) : 1; + tmp = qTag.getAttribute("marker"); + hasMark = tmp; + mark = tmp; + } + + // first check to see if we've been given an explicit mark + if (hasMark) + outText(mark, buf, u); + // finally, alternate " and ', if config says we should supply a mark + else if (u->osisQToTick) + outText((level % 2) ? '\"' : '\'', buf, u); + + // Do this last so quote marks are included as WoC + if (who == "Jesus") + outText("\\cf0 ", buf, u); + } + } + + + // <milestone type="cQuote" marker="x"/> + else if (!strcmp(tag.getName(), "milestone") && tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "cQuote")) { + const char *tmp = tag.getAttribute("marker"); + bool hasMark = tmp; + SWBuf mark = tmp; + tmp = tag.getAttribute("level"); + int level = (tmp) ? atoi(tmp) : 1; + + // first check to see if we've been given an explicit mark + if (hasMark) + outText(mark, buf, u); + // finally, alternate " and ', if config says we should supply a mark + else if (u->osisQToTick) + outText((level % 2) ? '\"' : '\'', buf, u); + } + + // <transChange> + else if (!strcmp(tag.getName(), "transChange")) { + SWBuf type = tag.getAttribute("type"); + + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + +// just do all transChange tags this way for now +// if (type == "supplied") + outText("{\\i1 ", buf, u); + } + else if (tag.isEndTag()) { + outText('}', buf, u); + } + } + + // <divineName> + else if (!strcmp(tag.getName(), "divineName")) { + + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + u->suspendTextPassThru = (++u->suspendLevel); + } + else if (tag.isEndTag()) { + SWBuf lastText = u->lastSuspendSegment.c_str(); + u->suspendTextPassThru = (--u->suspendLevel); + if (lastText.size()) { + toupperstr(lastText); + scratch.setFormatted("{\\fs19%c\\fs16%s}", lastText[0], lastText.c_str()+1); + outText(scratch.c_str(), buf, u); + } + } + } + + // <div> + else if (!strcmp(tag.getName(), "div")) { + + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + outText("\\par\\par\\pard ", buf, u); + } + else if (tag.isEndTag()) { + } + } + + // image + else if (!strcmp(tag.getName(), "figure")) { + const char *src = tag.getAttribute("src"); + if (!src) // assert we have a src attribute + return false; + + char* filepath = new char[strlen(u->module->getConfigEntry("AbsoluteDataPath")) + strlen(token)]; + *filepath = 0; + strcpy(filepath, userData->module->getConfigEntry("AbsoluteDataPath")); + strcat(filepath, src); + +// we do this because BibleCS looks for this EXACT format for an image tag + outText("<img src=\"", buf, u); + outText(filepath, buf, u); + outText("\" />", buf, u); +/* + char imgc; + for (c = filepath + strlen(filepath); c > filepath && *c != '.'; c--); + c++; + FILE* imgfile; + if (stricmp(c, "jpg") || stricmp(c, "jpeg")) { + imgfile = fopen(filepath, "r"); + if (imgfile != NULL) { + outText("{\\nonshppict {\\pict\\jpegblip ", buf, u); + while (feof(imgfile) != EOF) { + scratch.setFormatted("%2x", fgetc(imgfile)); + outText(scratch.c_str(), buf, u); + + } + fclose(imgfile); + outText("}}", buf, u); + } + } + else if (stricmp(c, "png")) { + outText("{\\*\\shppict {\\pict\\pngblip ", buf, u); + + outText("}}", buf, u); + } +*/ + delete [] filepath; + } + else { + return false; // we still didn't handle token + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osisscripref.cpp b/src/modules/filters/osisscripref.cpp new file mode 100644 index 0000000..437f5f5 --- /dev/null +++ b/src/modules/filters/osisscripref.cpp @@ -0,0 +1,100 @@ +/****************************************************************************** + * + * OSISScripref - SWFilter descendant to hide or show scripture references + * in an OSIS module. + */ + + +#include <stdlib.h> +#include <osisscripref.h> +#include <swmodule.h> +#include <utilxml.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Cross-references"; +const char oTip[] = "Toggles Scripture Cross-references On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +OSISScripref::OSISScripref() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("On"); +} + + +OSISScripref::~OSISScripref() { +} + + +char OSISScripref::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + SWBuf token; + bool intoken = false; + bool hide = false; + SWBuf tagText; + XMLTag startTag; + + SWBuf orig = text; + const char *from = orig.c_str(); + + XMLTag tag; + + for (text = ""; *from; ++from) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + + tag = token; + + if (!strncmp(token.c_str(), "note", 4) || !strncmp(token.c_str(), "/note", 5)) { + if (!tag.isEndTag() && !tag.isEmpty()) { + startTag = tag; + if ((tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "crossReference"))) { + hide = true; + tagText = ""; + if (option) { // we want the tag in the text + text.append('<'); + text.append(token); + text.append('>'); + } + continue; + } + } + if (hide && tag.isEndTag()) { + hide = false; + if (option) { // we want the tag in the text + text.append(tagText); // end tag gets added further down + } + else continue; // don't let the end tag get added to the text + } + } + + // if not a heading token, keep token in text + if (!hide) { + text.append('<'); + text.append(token); + text.append('>'); + } + else { + tagText.append('<'); + tagText.append(token); + tagText.append('>'); + } + continue; + } + if (intoken) { //copy token + token.append(*from); + } + else if (!hide) { //copy text which is not inside a token + text.append(*from); + } + else tagText.append(*from); + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osisstrongs.cpp b/src/modules/filters/osisstrongs.cpp new file mode 100644 index 0000000..922f7fd --- /dev/null +++ b/src/modules/filters/osisstrongs.cpp @@ -0,0 +1,257 @@ +/****************************************************************************** + * + * osisstrongs - SWFilter descendant to hide or show strongs number + * in a OSIS module. + */ + + +#include <stdlib.h> +#include <stdio.h> +#include <ctype.h> +#include <osisstrongs.h> +#include <swmodule.h> +#include <versekey.h> +#include <utilxml.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Strong's Numbers"; +const char oTip[] = "Toggles Strong's Numbers On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + + +OSISStrongs::OSISStrongs() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +OSISStrongs::~OSISStrongs() { +} + + +char OSISStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + SWBuf token; + bool intoken = false; + bool lastspace = false; + int wordNum = 1; + char wordstr[5]; + const char *wordStart = 0; + + const SWBuf orig = text; + const char * from = orig.c_str(); + + for (text = ""; *from; ++from) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if (token.startsWith("w ")) { // Word + XMLTag wtag(token); + if (module->isProcessEntryAttributes()) { + wordStart = from+1; + char gh = 0; + VerseKey *vkey = 0; + if (key) { + vkey = SWDYNAMIC_CAST(VerseKey, key); + } + SWBuf lemma = ""; + SWBuf morph = ""; + SWBuf src = ""; + SWBuf morphClass = ""; + SWBuf lemmaClass = ""; + + const char *attrib; + sprintf(wordstr, "%03d", wordNum); + + // why is morph entry attribute processing done in here? Well, it's faster. It makes more local sense to place this code in osismorph. + // easier to keep lemma and morph in same wordstr number too maybe. + if ((attrib = wtag.getAttribute("morph"))) { + int count = wtag.getAttributePartCount("morph", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + SWBuf mClass = ""; + SWBuf mp = ""; + attrib = wtag.getAttribute("morph", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + + const char *m = strchr(attrib, ':'); + if (m) { + int len = m-attrib; + mClass.append(attrib, len); + attrib += (len+1); + } + if ((mClass == "x-Robinsons") || (mClass == "x-Robinson") || (mClass == "Robinson")) { + mClass = "robinson"; + } + if (i) { morphClass += " "; morph += " "; } + mp += attrib; + morphClass += mClass; + morph += mp; + if (count > 1) { + SWBuf tmp; + tmp.setFormatted("Morph.%d", i+1); + module->getEntryAttributes()["Word"][wordstr][tmp] = mp; + tmp.setFormatted("MorphClass.%d", i+1); + module->getEntryAttributes()["Word"][wordstr][tmp] = mClass; + } + } while (++i < count); + } + + if ((attrib = wtag.getAttribute("lemma"))) { + int count = wtag.getAttributePartCount("lemma", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + gh = 0; + SWBuf lClass = ""; + SWBuf l = ""; + attrib = wtag.getAttribute("lemma", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + + const char *m = strchr(attrib, ':'); + if (m) { + int len = m-attrib; + lClass.append(attrib, len); + attrib += (len+1); + } + if ((lClass == "x-Strongs") || (lClass == "strong") || (lClass == "Strong")) { + if (isdigit(attrib[0])) { + if (vkey) { + gh = vkey->Testament() ? 'H' : 'G'; + } + } + else { + gh = *attrib; + attrib++; + } + lClass = "strong"; + } + if (gh) l += gh; + l += attrib; + if (i) { lemmaClass += " "; lemma += " "; } + lemma += l; + lemmaClass += lClass; + if (count > 1) { + SWBuf tmp; + tmp.setFormatted("Lemma.%d", i+1); + module->getEntryAttributes()["Word"][wordstr][tmp] = l; + tmp.setFormatted("LemmaClass.%d", i+1); + module->getEntryAttributes()["Word"][wordstr][tmp] = lClass; + } + } while (++i < count); + module->getEntryAttributes()["Word"][wordstr]["PartCount"].setFormatted("%d", count); + } + + if ((attrib = wtag.getAttribute("src"))) { + int count = wtag.getAttributePartCount("src", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + SWBuf mp = ""; + attrib = wtag.getAttribute("src", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + + if (i) src += " "; + mp += attrib; + src += mp; + if (count > 1) { + SWBuf tmp; + tmp.setFormatted("Src.%d", i+1); + module->getEntryAttributes()["Word"][wordstr][tmp] = mp; + } + } while (++i < count); + } + + + if (lemma.length()) + module->getEntryAttributes()["Word"][wordstr]["Lemma"] = lemma; + if (lemmaClass.length()) + module->getEntryAttributes()["Word"][wordstr]["LemmaClass"] = lemmaClass; + if (morph.length()) + module->getEntryAttributes()["Word"][wordstr]["Morph"] = morph; + if (morphClass.length()) + module->getEntryAttributes()["Word"][wordstr]["MorphClass"] = morphClass; + if (src.length()) + module->getEntryAttributes()["Word"][wordstr]["Src"] = src; + + if (wtag.isEmpty()) { + int j; + for (j = token.length()-1; ((j>0) && (strchr(" /", token[j]))); j--); + token.size(j+1); + } + + token += " wn=\""; + token += wordstr; + token += "\""; + + if (wtag.isEmpty()) { + token += "/"; + } + + wordNum++; + } + + if (!option) { +/* + * Code which handles multiple lemma types. Kindof works but breaks at least WEBIF filters for strongs. + * + int count = wtag.getAttributePartCount("lemma", ' '); + for (int i = 0; i < count; i++) { + SWBuf a = wtag.getAttribute("lemma", i, ' '); + const char *prefix = a.stripPrefix(':'); + if ((prefix) && (!strcmp(prefix, "x-Strongs") || !strcmp(prefix, "strong") || !strcmp(prefix, "Strong"))) { + // remove attribute part + wtag.setAttribute("lemma", 0, i, ' '); + i--; + count--; + } + } +* Instead the codee below just removes the lemma attribute +*****/ + const char *l = wtag.getAttribute("lemma"); + if (l) { + SWBuf savlm = l; + wtag.setAttribute("lemma", 0); + wtag.setAttribute("savlm", savlm); + token = wtag; + token.trim(); + // drop <> + token << 1; + token--; + } + } + } + if (token.startsWith("/w")) { // Word End + if (module->isProcessEntryAttributes()) { + if (wordStart) { + SWBuf tmp; + tmp.append(wordStart, (from-wordStart)-3); + sprintf(wordstr, "%03d", wordNum-1); + module->getEntryAttributes()["Word"][wordstr]["Text"] = tmp; + } + } + wordStart = 0; + } + + // keep token in text + text.append('<'); + text.append(token); + text.append('>'); + + continue; + } + if (intoken) { + token += *from; + } + else { + text.append(*from); + lastspace = (*from == ' '); + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osisvariants.cpp b/src/modules/filters/osisvariants.cpp new file mode 100644 index 0000000..91d700c --- /dev/null +++ b/src/modules/filters/osisvariants.cpp @@ -0,0 +1,118 @@ +/****************************************************************************** + * + * osisvariants - SWFilter descendant to hide or show textual variants + * in an OSIS module. + */ + + +#include <stdlib.h> +#include <osisvariants.h> +#include <utilstr.h> + +SWORD_NAMESPACE_START + +const char OSISVariants::primary[] = "Primary Reading"; +const char OSISVariants::secondary[] = "Secondary Reading"; +const char OSISVariants::all[] = "All Readings"; + +const char OSISVariants::optName[] = "Textual Variants"; +const char OSISVariants::optTip[] = "Switch between Textual Variants modes"; + + +OSISVariants::OSISVariants() { + option = false; + options.push_back(primary); + options.push_back(secondary); + options.push_back(all); +} + + +OSISVariants::~OSISVariants() { +} + +void OSISVariants::setOptionValue(const char *ival) +{ + if (!stricmp(ival, primary)) option = 0; + else if (!stricmp(ival, secondary)) option = 1; + else option = 2; +} + +const char *OSISVariants::getOptionValue() +{ + if (option == 0) { + return primary; + } + else if (option == 1) { + return secondary; + } + else { + return all; + } +} + +char OSISVariants::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + if (option == 0 || option == 1) { //we want primary or variant only + bool intoken = false; + bool hide = false; + bool invar = false; + + SWBuf token; + SWBuf orig = text; + const char *from = orig.c_str(); + + //we use a fixed comparision string to make sure the loop is as fast as the original two blocks with almost the same code + //const char* variantCompareString = (option == 0) ? "div type=\"variant\" class=\"1\"" : "div type=\"variant\" class=\"2\""; + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + else if (*from == '>') { // process tokens + intoken = false; + + if (!strncmp(token.c_str(), "seg ", 4)) { //only one of the variants + invar = true; + hide = true; + continue; + } + if (!strncmp(token.c_str(), "div type=\"variant\"", 18)) { + invar = true; + continue; + } + if (!strncmp(token.c_str(), "/div", 4)) { + hide = false; + if (invar) { + invar = false; + continue; + } + } + if (!hide) { + text += '<'; + text.append(token); + text += '>'; + } + + continue; + } + if (intoken) { + token += *from; + } + else if (!hide) { + text += *from; + } + } + + } + + return 0; +} + + + + + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/osiswebif.cpp b/src/modules/filters/osiswebif.cpp new file mode 100644 index 0000000..ecc58f7 --- /dev/null +++ b/src/modules/filters/osiswebif.cpp @@ -0,0 +1,198 @@ +/*************************************************************************** + OSISWEBIF.cpp - OSIS to HTML filter with hrefs + for strongs and morph tags + ------------------- + begin : 2003-10-23 + copyright : 2003 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <osiswebif.h> +#include <utilxml.h> +#include <url.h> +#include <versekey.h> +#include <swmodule.h> +#include <ctype.h> + + +SWORD_NAMESPACE_START + + +OSISWEBIF::OSISWEBIF() : baseURL(""), passageStudyURL(baseURL + "passagestudy.jsp"), javascript(false) { +} + + +BasicFilterUserData *OSISWEBIF::createUserData(const SWModule *module, const SWKey *key) { + MyUserData *u = new MyUserData(module, key); + u->wordsOfChristStart = "<span class=\"wordsOfJesus\"> "; + u->wordsOfChristEnd = "</span> "; + return u; +} + + +bool OSISWEBIF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + MyUserData *u = (MyUserData *)userData; + SWBuf scratch; + bool sub = (u->suspendTextPassThru) ? substituteToken(scratch, token) : substituteToken(buf, token); + if (!sub) { + // manually process if it wasn't a simple substitution + XMLTag tag(token); + + // <w> tag + if (!strcmp(tag.getName(), "w")) { + + // start <w> tag + if ((!tag.isEmpty()) && (!tag.isEndTag())) { + u->w = token; + } + + // end or empty <w> tag + else { + bool endTag = tag.isEndTag(); + SWBuf lastText; + bool show = true; // to handle unplaced article in kjv2003-- temporary till combined + + if (endTag) { + tag = u->w.c_str(); + lastText = u->lastTextNode.c_str(); + } + else lastText = "stuff"; + + const char *attrib; + const char *val; + if ((attrib = tag.getAttribute("xlit"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; +// buf.appendFormatted(" %s", val); + } + if ((attrib = tag.getAttribute("gloss"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + buf.appendFormatted(" %s", val); + } + if ((attrib = tag.getAttribute("lemma"))) { + int count = tag.getAttributePartCount("lemma", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + attrib = tag.getAttribute("lemma", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + const char *val2 = val; + if ((strchr("GH", *val)) && (isdigit(val[1]))) + val2++; + if ((!strcmp(val2, "3588")) && (lastText.length() < 1)) + show = false; + else buf.appendFormatted(" <small><em><<a href=\"%s?showStrong=%s#cv\">%s</a>></em></small> ", passageStudyURL.c_str(), URL::encode(val2).c_str(), val2); + } while (++i < count); + } + if ((attrib = tag.getAttribute("morph")) && (show)) { + SWBuf savelemma = tag.getAttribute("savlm"); + if ((strstr(savelemma.c_str(), "3588")) && (lastText.length() < 1)) + show = false; + if (show) { + int count = tag.getAttributePartCount("morph", ' '); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + attrib = tag.getAttribute("morph", i, ' '); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + const char *val2 = val; + if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2]))) + val2+=2; + buf.appendFormatted(" <small><em>(<a href=\"%s?showMorph=%s#cv\">%s</a>)</em></small> ", passageStudyURL.c_str(), URL::encode(val2).c_str(), val2); + } while (++i < count); + } + } + if ((attrib = tag.getAttribute("POS"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + buf.appendFormatted(" %s", val); + } + + /*if (endTag) + buf += "}";*/ + } + } + + // <note> tag + else if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + SWBuf type = tag.getAttribute("type"); + bool strongsMarkup = (type == "x-strongsMarkup" || type == "strongsMarkup"); // the latter is deprecated + if (strongsMarkup) { + tag.setEmpty(false); // handle bug in KJV2003 module where some note open tags were <note ... /> + } + + if (!tag.isEmpty()) { + if (!strongsMarkup) { // leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + SWBuf modName = (u->module) ? u->module->Name() : ""; + VerseKey *vkey = NULL; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) { } + if (vkey) { + char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); +// buf.appendFormatted("<a href=\"noteID=%s.%c.%s\"><small><sup>*%c</sup></small></a> ", vkey->getText(), ch, footnoteNumber.c_str(), ch); + buf.appendFormatted("<span class=\"fn\" onclick=\"f(\'%s\',\'%s\',\'%s\');\" >%c</span>", modName.c_str(), u->key->getText(), footnoteNumber.c_str(), ch); + } + } + u->suspendTextPassThru = (++u->suspendLevel); + } + } + if (tag.isEndTag()) { + u->suspendTextPassThru = (--u->suspendLevel); + + } + } + + // <title> + else if (!strcmp(tag.getName(), "title")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "<h3>"; + } + else if (tag.isEndTag()) { + buf += "</h3>"; + } + } + + // ok to leave these in + else if (!strcmp(tag.getName(), "div")) { + buf += tag; + } + else if (!strcmp(tag.getName(), "span")) { + buf += tag; + } + else if (!strcmp(tag.getName(), "br")) { + buf += tag; + } + + // handled appropriately in base class + // <catchWord> & <rdg> tags (italicize) + // <hi> text highlighting + // <q> quote + // <milestone type="cQuote" marker="x"/> + // <transChange> + else { + return OSISHTMLHREF::handleToken(buf, token, userData); + } + } + return true; +} + + +SWORD_NAMESPACE_END + diff --git a/src/modules/filters/osiswordjs.cpp b/src/modules/filters/osiswordjs.cpp new file mode 100644 index 0000000..dc805b4 --- /dev/null +++ b/src/modules/filters/osiswordjs.cpp @@ -0,0 +1,178 @@ +/****************************************************************************** + * + * osisstrongs - SWFilter descendant to hide or show strongs number + * in a OSIS module. + */ + + +#include <stdlib.h> +#include <stdio.h> +#include <osiswordjs.h> +#include <swmodule.h> +#include <ctype.h> +#include <utilxml.h> +#include <utilstr.h> +#include <versekey.h> +#include <stdio.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Word Javascript"; +const char oTip[] = "Toggles Word Javascript data"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + + +OSISWordJS::OSISWordJS() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); + + defaultGreekLex = 0; + defaultHebLex = 0; + defaultGreekParse = 0; + defaultHebParse = 0; + mgr = 0; +} + + +OSISWordJS::~OSISWordJS() { +} + + +char OSISWordJS::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (option) { + char token[2112]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + bool lastspace = false; + int wordNum = 1; + char wordstr[5]; + SWBuf modName = (module)?module->Name():""; + // add TR to w src in KJV then remove this next line + SWBuf wordSrcPrefix = (modName == "KJV")?SWBuf("TR"):modName; + + VerseKey *vkey = 0; + if (key) { + vkey = SWDYNAMIC_CAST(VerseKey, key); + } + + const SWBuf orig = text; + const char * from = orig.c_str(); + + for (text = ""; *from; ++from) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if ((*token == 'w') && (token[1] == ' ')) { // Word + XMLTag wtag(token); + sprintf(wordstr, "%03d", wordNum); + SWBuf lemmaClass; + SWBuf lemma; + SWBuf morph; + SWBuf src; + char gh = 0; + int count = atoi(module->getEntryAttributes()["Word"][wordstr]["PartCount"].c_str()); + for (int i = 0; i < count; i++) { + + // for now, lemma class can just be equal to last lemma class in multi part word + SWBuf tmp = "LemmaClass"; + if (count > 1) tmp.appendFormatted(".%d", i+1); + lemmaClass = module->getEntryAttributes()["Word"][wordstr][tmp]; + + tmp = "Lemma"; + if (count > 1) tmp.appendFormatted(".%d", i+1); + tmp = (module->getEntryAttributes()["Word"][wordstr][tmp].c_str()); + + // if we're strongs, + if (lemmaClass == "strong") { + gh = tmp[0]; + tmp << 1; + } + if (lemma.size()) lemma += "|"; + lemma += tmp; + + tmp = "Morph"; + if (count > 1) tmp.appendFormatted(".%d", i+1); + tmp = (module->getEntryAttributes()["Word"][wordstr][tmp].c_str()); + if (morph.size()) morph += "|"; + morph += tmp; + + tmp = "Src"; + if (count > 1) tmp.appendFormatted(".%d", i+1); + tmp = (module->getEntryAttributes()["Word"][wordstr][tmp].c_str()); + if (!tmp.length()) tmp.appendFormatted("%d", wordNum); + tmp.insert(0, wordSrcPrefix); + if (src.size()) src += "|"; + src += tmp; + } + + SWBuf lexName = ""; + // we can pass the real lex name in, but we have some + // aliases in the javascript to optimize bandwidth + if ((gh == 'G') && (defaultGreekLex)) { + lexName = (!strcmp(defaultGreekLex->Name(), "StrongsGreek"))?"G":defaultGreekLex->Name(); + } + else if ((gh == 'H') && (defaultHebLex)) { + lexName = (!strcmp(defaultHebLex->Name(), "StrongsHebrew"))?"H":defaultHebLex->Name(); + } + + SWBuf xlit = wtag.getAttribute("xlit"); + + if ((lemmaClass != "strong") && (xlit.startsWith("betacode:"))) { + lexName = "betacode"; +// const char *m = strchr(xlit.c_str(), ':'); +// strong = ++m; + } + SWBuf wordID; + if (vkey) { + // optimize for bandwidth and use only the verse as the unique entry id + wordID.appendFormatted("%d", vkey->Verse()); + } + else { + wordID = key->getText(); + } + wordID.appendFormatted("_%s", src.c_str()); + // clean up our word ID for XHTML + for (unsigned int i = 0; i < wordID.size(); i++) { + if ((!isdigit(wordID[i])) && (!isalpha(wordID[i]))) { + wordID[i] = '_'; + } + } + // 'p' = 'fillpop' to save bandwidth + text.appendFormatted("<span class=\"clk\" onclick=\"p('%s','%s','%s','%s','','%s');\" >", lexName.c_str(), lemma.c_str(), wordID.c_str(), morph.c_str(), modName.c_str()); + wordNum++; + } + if ((*token == '/') && (token[1] == 'w') && option) { // Word + text += "</w></span>"; + continue; + } + + // if not a strongs token, keep token in text + text.append('<'); + text.append(token); + text.append('>'); + + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else { + text.append(*from); + lastspace = (*from == ' '); + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/papyriplain.cpp b/src/modules/filters/papyriplain.cpp new file mode 100644 index 0000000..423bfda --- /dev/null +++ b/src/modules/filters/papyriplain.cpp @@ -0,0 +1,71 @@ +/****************************************************************************** + * + * papyriplain - SWFilter descendant to strip out all Papyri tags + */ + + +#include <stdlib.h> +#include <papyriplain.h> + +SWORD_NAMESPACE_START + +PapyriPlain::PapyriPlain() { +} + + +char PapyriPlain::processText (SWBuf &text, const SWKey *key, const SWModule *module) +{ + SWBuf orig = text; + const char *from = orig.c_str(); + + for (text = ""; *from; ++from) { + + // remove hyphen and whitespace if that is all that separates words + // also be sure we're not a double hyphen '--' + if ((*from == '-') && (text.length() > 0) && (text[text.length()-1] != '-')) { + char remove = 0; + const char *c; + for (c = from+1; *c; c++) { + if ((*c == 10) || (*c == 13)) { + remove = 1; + } + if (!strchr(" \t\n", *c)) { + if (remove) remove++; + break; + } + } + if (remove > 1) { + from = c-1; + continue; + } + } + + // remove all newlines + if ((*from == 10) || (*from == 13)) { + if ((text.length()>1) && (text[text.length()-2] != ' ') && (*(from+1) != ' ')) + text.append(' '); + continue; + } + + + // strip odd characters + switch (*from) { + case '(': + case ')': + case '[': + case ']': + case '{': + case '}': + case '<': + case '>': + continue; + } + + // if we've made it this far + text.append(*from); + + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/plainfootnotes.cpp b/src/modules/filters/plainfootnotes.cpp new file mode 100644 index 0000000..0baf313 --- /dev/null +++ b/src/modules/filters/plainfootnotes.cpp @@ -0,0 +1,79 @@ +/*************************************************************************** + plainfootnotes.cpp - description + ------------------- + begin : Wed Oct 13 1999 + copyright : (C) 1999 by The team of BibleTime + email : info@bibletime.de + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <plainfootnotes.h> +#include <swkey.h> + +#include <stdlib.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Footnotes"; +const char oTip[] = "Toggles Footnotes On and Off In Bible Texts If They Exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +PLAINFootnotes::PLAINFootnotes() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + +PLAINFootnotes::~PLAINFootnotes(){ +} + + +char PLAINFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (!option) { // if we don't want footnotes + //char token[2048]; + //SWBuf token; + //int tokpos = 0; + //bool intoken = false; + //bool lastspace = false; + + bool hide = false; + + SWBuf orig = text; + const char *from = orig.c_str(); + for (text = ""; *from; from++) { + if (*from == '{') // Footnote start + { + hide = true; + continue; + } + else if (*from == '}') // Footnote end + { + hide = false; + continue; + } + + //if (intoken) { + //if (tokpos < 2045) + // token += *from; + // token[tokpos+2] = 0; + //} + //else { + if (!hide) { + text = *from; + //lastspace = (*from == ' '); + } + //} + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/plainhtml.cpp b/src/modules/filters/plainhtml.cpp new file mode 100644 index 0000000..f5f2a5c --- /dev/null +++ b/src/modules/filters/plainhtml.cpp @@ -0,0 +1,83 @@ +/*************************************************************************** + plainhtml.cpp - description + ------------------- + begin : Thu Jun 24 1999 + copyright : (C) 1999 by Torsten Uhlmann + email : TUhlmann@gmx.de + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <plainhtml.h> +#include <swbuf.h> + +SWORD_NAMESPACE_START + +PLAINHTML::PLAINHTML() +{ +} + + +char PLAINHTML::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + int count = 0; + + SWBuf orig = text; + const char *from = orig.c_str(); + for (text = ""; *from; from++) + { + if ((*from == '\n') && (from[1] == '\n')) // two newlinea are a paragraph + { + text += "<P>"; + from++; + continue; + } else { + if ((*from == '\n')) // && (from[1] != '\n')) // only one new line + { + text += "<BR>"; + continue; + } + } + + if (*from == '{') { //footnote start + text += "<FONT COLOR=\"#80000\"><SMALL> ("; + continue; + } + else if (*from == '}') //footnote end + { + text += ") </SMALL></FONT>"; + continue; + } + else if (*from == '<') { + text += "<"; + continue; + } + else if (*from == '>') { + text += ">"; + continue; + } + else if (*from == '&') { + text += "&"; + continue; + } + else if ((*from == ' ') && (count > 5000)) + { + text += "<WBR>"; + count = 0; + continue; + } + + text += *from; + count++; + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/rtfhtml.cpp b/src/modules/filters/rtfhtml.cpp new file mode 100644 index 0000000..cac5068 --- /dev/null +++ b/src/modules/filters/rtfhtml.cpp @@ -0,0 +1,81 @@ +/*************************************************************************** + rtfhtml.cpp - description + ------------------- + begin : Wed Oct 13 1999 + copyright : (C) 1999 by The team of BibleTime + email : info@bibletime.de + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <rtfhtml.h> +#include <swbuf.h> + +SWORD_NAMESPACE_START + +RTFHTML::RTFHTML() { + +} + + +char RTFHTML::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + bool center = false; + + const char *from; + SWBuf orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) + { + if (*from == '\\') // a RTF command + { + if ( !strncmp(from+1, "pard", 4) ) + //(from[1] == 'p') && (from[2] == 'a') && (from[3] == 'r') && (from[4] == 'd')) + { // switch all modifiers off + if (center) + { + text += "</CENTER>"; + center = false; + } + from += 4; + continue; + } + if ( !strncmp(from+1, "par", 3) ) + //(from[1] == 'p') && (from[2] == 'a') && (from[3] == 'r')) + { + text += "<P>\n"; + from += 3; + continue; + } + if (from[1] == ' ') + { + from += 1; + continue; + } + if ( !strncmp(from+1, "qc", 2) ) + //(from[1] == 'q') && (from[2] == 'c')) // center on + { + if (!center) + { + text += "<CENTER>"; + center = true; + } + from += 2; + continue; + } + } + + text += *from; + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/scsuutf8.cpp b/src/modules/filters/scsuutf8.cpp new file mode 100644 index 0000000..0daff4a --- /dev/null +++ b/src/modules/filters/scsuutf8.cpp @@ -0,0 +1,226 @@ +/****************************************************************************** + * + * SCSUUTF8 - SWFilter descendant to convert a SCSU character to UTF-8 + * + */ + + +/* This class is based on: + * http://czyborra.com/scsu/scsu.c written by Roman Czyborra@dds.nl + * on Andrea's balcony in North Amsterdam on 1998-08-04 + * Thanks to Richard Verhoeven <rcb5@win.tue.nl> for his suggestion + * to correct the haphazard "if" after UQU to "else if" on 1998-10-01 + * + * This is a deflator to UTF-8 output for input compressed in SCSU, + * the (Reuters) Standard Compression Scheme for Unicode as described + * in http://www.unicode.org/unicode/reports/tr6.html + */ + +#include <stdlib.h> +#include <stdio.h> +#include <swmodule.h> + +#include <scsuutf8.h> + +SWORD_NAMESPACE_START + +SCSUUTF8::SCSUUTF8() { +} + + +unsigned char* SCSUUTF8::UTF8Output(unsigned long uchar, unsigned char* text) +{ + /* join UTF-16 surrogates without any pairing sanity checks */ + + static int d; + + if (uchar >= 0xd800 && uchar <= 0xdbff) { d = uchar & 0x3f; return text; } + if (uchar >= 0xdc00 && uchar <= 0xdfff) { uchar = uchar + 0x2400 + d * 0x400; } + + /* output one character as UTF-8 multibyte sequence */ + + if (uchar < 0x80) { + *text++ = c; + } + else if (uchar < 0x800) { + *text++ = 0xc0 | uchar >> 6; + *text++ = 0x80 | (uchar & 0x3f); + } + else if (uchar < 0x10000) { + *text++ = 0xe0 | uchar >> 12; + *text++ = 0x80 | (uchar >> 6 & 0x3f); + *text++ = 0x80 | (uchar & 0x3f); + } + else if (uchar < 0x200000) { + *text++ = 0xf0 | uchar >> 18; + *text++ = 0x80 | (uchar >> 12 & 0x3f); + *text++ = 0x80 | (uchar >> 6 & 0x3f); + *text++ = 0x80 | (uchar & 0x3f); + } + + return text; +} + +char SCSUUTF8::processText(SWBuf &text, const SWKey *key, const SWModule *module) { +/* + unsigned char *to, *from; + unsigned long buflen = len * FILTERPAD; + char active = 0, mode = 0; + if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering + return -1; + + static unsigned short start[8] = {0x0000,0x0080,0x0100,0x0300,0x2000,0x2080,0x2100,0x3000}; + static unsigned short slide[8] = {0x0080,0x00C0,0x0400,0x0600,0x0900,0x3040,0x30A0,0xFF00}; + static unsigned short win[256] = { + 0x0000, 0x0080, 0x0100, 0x0180, 0x0200, 0x0280, 0x0300, 0x0380, + 0x0400, 0x0480, 0x0500, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, + 0x0800, 0x0880, 0x0900, 0x0980, 0x0A00, 0x0A80, 0x0B00, 0x0B80, + 0x0C00, 0x0C80, 0x0D00, 0x0D80, 0x0E00, 0x0E80, 0x0F00, 0x0F80, + 0x1000, 0x1080, 0x1100, 0x1180, 0x1200, 0x1280, 0x1300, 0x1380, + 0x1400, 0x1480, 0x1500, 0x1580, 0x1600, 0x1680, 0x1700, 0x1780, + 0x1800, 0x1880, 0x1900, 0x1980, 0x1A00, 0x1A80, 0x1B00, 0x1B80, + 0x1C00, 0x1C80, 0x1D00, 0x1D80, 0x1E00, 0x1E80, 0x1F00, 0x1F80, + 0x2000, 0x2080, 0x2100, 0x2180, 0x2200, 0x2280, 0x2300, 0x2380, + 0x2400, 0x2480, 0x2500, 0x2580, 0x2600, 0x2680, 0x2700, 0x2780, + 0x2800, 0x2880, 0x2900, 0x2980, 0x2A00, 0x2A80, 0x2B00, 0x2B80, + 0x2C00, 0x2C80, 0x2D00, 0x2D80, 0x2E00, 0x2E80, 0x2F00, 0x2F80, + 0x3000, 0x3080, 0x3100, 0x3180, 0x3200, 0x3280, 0x3300, 0x3800, + 0xE000, 0xE080, 0xE100, 0xE180, 0xE200, 0xE280, 0xE300, 0xE380, + 0xE400, 0xE480, 0xE500, 0xE580, 0xE600, 0xE680, 0xE700, 0xE780, + 0xE800, 0xE880, 0xE900, 0xE980, 0xEA00, 0xEA80, 0xEB00, 0xEB80, + 0xEC00, 0xEC80, 0xED00, 0xED80, 0xEE00, 0xEE80, 0xEF00, 0xEF80, + 0xF000, 0xF080, 0xF100, 0xF180, 0xF200, 0xF280, 0xF300, 0xF380, + 0xF400, 0xF480, 0xF500, 0xF580, 0xF600, 0xF680, 0xF700, 0xF780, + 0xF800, 0xF880, 0xF900, 0xF980, 0xFA00, 0xFA80, 0xFB00, 0xFB80, + 0xFC00, 0xFC80, 0xFD00, 0xFD80, 0xFE00, 0xFE80, 0xFF00, 0xFF80, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x00C0, 0x0250, 0x0370, 0x0530, 0x3040, 0x30A0, 0xFF60 + }; + + if (!len) + return 0; + + memmove(&text[buflen - len], text, len); + from = (unsigned char*)&text[buflen - len]; + to = (unsigned char *)text; + + // ------------------------------- + + for (int i = 0; i < len;) { + + + if (i >= len) break; + c = from[i++]; + + if (c >= 0x80) + { + to = UTF8Output (c - 0x80 + slide[active], to); + } + else if (c >= 0x20 && c <= 0x7F) + { + to = UTF8Output (c, to); + } + else if (c == 0x0 || c == 0x9 || c == 0xA || c == 0xC || c == 0xD) + { + to = UTF8Output (c, to); + } + else if (c >= 0x1 && c <= 0x8) // SQn + { + if (i >= len) break; + d = from[i++]; // single quote + + to = UTF8Output (d < 0x80 ? d + start [c - 0x1] : + d - 0x80 + slide [c - 0x1], to); + } + else if (c >= 0x10 && c <= 0x17) // SCn + { + active = c - 0x10; // change window + } + else if (c >= 0x18 && c <= 0x1F) // SDn + { + active = c - 0x18; // define window + if (i >= len) break; + slide [active] = win [from[i++]]; + } + else if (c == 0xB) // SDX + { + if (i >= len) break; + c = from[i++]; + + if (i >= len) break; + d = from[i++]; + + slide [active = c>>5] = 0x10000 + (((c & 0x1F) << 8 | d) << 7); + } + else if (c == 0xE) // SQU + { + if (i >= len) break; + c = from[i++]; // SQU + + if (i >= len) break; + to = UTF8Output (c << 8 | from[i++], to); + } + else if (c == 0xF) // SCU + { + mode = 1; // change to Unicode mode + + while (mode) + { + if (i >= len) break; + c = from[i++]; + + if (c <= 0xDF || c >= 0xF3) + { + if (i >= len) break; + to = UTF8Output (c << 8 | from[i++], to); + } + else if (c == 0xF0) // UQU + { + if (i >= len) break; + c = from[i++]; + + if (i >= len) break; + to = UTF8Output (c << 8 | from[i++], to); + } + else if (c >= 0xE0 && c <= 0xE7) // UCn + { + active = c - 0xE0; mode = 0; + } + else if (c >= 0xE8 && c <= 0xEF) // UDn + { + if (i >= len) break; + slide [active=c-0xE8] = win [from[i++]]; mode = 0; + } + else if (c == 0xF1) // UDX + { + if (i >= len) break; + c = from[i++]; + + if (i >= len) break; + d = from[i++]; + + slide [active = c>>5] = + 0x10000 + (((c & 0x1F) << 8 | d) << 7); mode = 0; + } + } + } + + + } + + *to++ = 0; + *to = 0; +*/ + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/swbasicfilter.cpp b/src/modules/filters/swbasicfilter.cpp new file mode 100644 index 0000000..ef10e45 --- /dev/null +++ b/src/modules/filters/swbasicfilter.cpp @@ -0,0 +1,406 @@ +/****************************************************************************** + * swbasicfilter.h - definition of class SWBasicFilter. An SWFilter + * impl that provides some basic methods that + * many filters will need and can use as a starting + * point. + * + * $Id: swbasicfilter.cpp 2167 2008-05-16 23:23:39Z scribe $ + * + * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include <stdlib.h> +#include <swbasicfilter.h> +#include <stdio.h> +#include <stdarg.h> +#include <utilstr.h> +#include <stringmgr.h> +#include <map> +#include <set> + +SWORD_NAMESPACE_START + +typedef std::map<SWBuf, SWBuf> DualStringMap; +typedef std::set<SWBuf> StringSet; + +// I hate bridge patterns but this isolates std::map from a ton of filters +class SWBasicFilter::Private { +public: + DualStringMap tokenSubMap; + DualStringMap escSubMap; + StringSet escPassSet; +}; + +const char SWBasicFilter::INITIALIZE = 1; +const char SWBasicFilter::PRECHAR = 2; +const char SWBasicFilter::POSTCHAR = 4; +const char SWBasicFilter::FINALIZE = 8; + +SWBasicFilter::SWBasicFilter() { + + p = new Private; + + processStages = 0; + tokenStart = 0; + tokenEnd = 0; + escStart = 0; + escEnd = 0; + + setTokenStart("<"); + setTokenEnd(">"); + setEscapeStart("&"); + setEscapeEnd(";"); + + escStringCaseSensitive = false; + tokenCaseSensitive = false; + passThruUnknownToken = false; + passThruUnknownEsc = false; + passThruNumericEsc = false; +} + + +SWBasicFilter::~SWBasicFilter() { + if (tokenStart) + delete [] tokenStart; + + if (tokenEnd) + delete [] tokenEnd; + + if (escStart) + delete [] escStart; + + if (escEnd) + delete [] escEnd; + + delete p; +} + + +void SWBasicFilter::setPassThruUnknownToken(bool val) { + passThruUnknownToken = val; +} + + +void SWBasicFilter::setPassThruUnknownEscapeString(bool val) { + passThruUnknownEsc = val; +} + +void SWBasicFilter::setPassThruNumericEscapeString(bool val) { + passThruUnknownEsc = val; +} + + +void SWBasicFilter::setTokenCaseSensitive(bool val) { + tokenCaseSensitive = val; +} + + +void SWBasicFilter::setEscapeStringCaseSensitive(bool val) { + escStringCaseSensitive = val; +} + + +void SWBasicFilter::addTokenSubstitute(const char *findString, const char *replaceString) { + char *buf = 0; + + if (!tokenCaseSensitive) { + stdstr(&buf, findString); + toupperstr(buf); + p->tokenSubMap[buf] = replaceString; + delete [] buf; + } + else p->tokenSubMap[findString] = replaceString; +} + + +void SWBasicFilter::removeTokenSubstitute(const char *findString) { + if (p->tokenSubMap.find(findString) != p->tokenSubMap.end()) { + p->tokenSubMap.erase( p->tokenSubMap.find(findString) ); + } +} + +void SWBasicFilter::addAllowedEscapeString(const char *findString) { + char *buf = 0; + + if (!escStringCaseSensitive) { + stdstr(&buf, findString); + toupperstr(buf); + p->escPassSet.insert(StringSet::value_type(buf)); + delete [] buf; + } + else p->escPassSet.insert(StringSet::value_type(findString)); +} + +void SWBasicFilter::removeAllowedEscapeString(const char *findString) { + if (p->escPassSet.find(findString) != p->escPassSet.end()) { + p->escPassSet.erase( p->escPassSet.find(findString) ); + } +} + +void SWBasicFilter::addEscapeStringSubstitute(const char *findString, const char *replaceString) { + char *buf = 0; + + if (!escStringCaseSensitive) { + stdstr(&buf, findString); + toupperstr(buf); + p->escSubMap.insert(DualStringMap::value_type(buf, replaceString)); + delete [] buf; + } + else p->escSubMap.insert(DualStringMap::value_type(findString, replaceString)); +} + +void SWBasicFilter::removeEscapeStringSubstitute(const char *findString) { + if (p->escSubMap.find(findString) != p->escSubMap.end()) { + p->escSubMap.erase( p->escSubMap.find(findString) ); + } +} + +bool SWBasicFilter::substituteToken(SWBuf &buf, const char *token) { + DualStringMap::iterator it; + + if (!tokenCaseSensitive) { + char *tmp = 0; + stdstr(&tmp, token); + toupperstr(tmp); + it = p->tokenSubMap.find(tmp); + delete [] tmp; + } else + it = p->tokenSubMap.find(token); + + if (it != p->tokenSubMap.end()) { + buf += it->second.c_str(); + return true; + } + return false; +} + +void SWBasicFilter::appendEscapeString(SWBuf &buf, const char *escString) { + buf += escStart; + buf += escString; + buf += escEnd; +} + +bool SWBasicFilter::passAllowedEscapeString(SWBuf &buf, const char *escString) { + StringSet::iterator it; + + if (!escStringCaseSensitive) { + char *tmp = 0; + stdstr(&tmp, escString); + toupperstr(tmp); + it = p->escPassSet.find(tmp); + delete [] tmp; + } else + it = p->escPassSet.find(escString); + + if (it != p->escPassSet.end()) { + appendEscapeString(buf, escString); + return true; + } + + return false; +} + +bool SWBasicFilter::handleNumericEscapeString(SWBuf &buf, const char *escString) { + if (passThruNumericEsc) { + appendEscapeString(buf, escString); + return true; + } + return false; +} + +bool SWBasicFilter::substituteEscapeString(SWBuf &buf, const char *escString) { + DualStringMap::iterator it; + + if (*escString == '#') { + return handleNumericEscapeString(buf, escString); + } + + if (passAllowedEscapeString(buf, escString)) { + return true; + } + + if (!escStringCaseSensitive) { + char *tmp = 0; + stdstr(&tmp, escString); + toupperstr(tmp); + it = p->escSubMap.find(tmp); + delete [] tmp; + } else + it = p->escSubMap.find(escString); + + if (it != p->escSubMap.end()) { + buf += it->second.c_str(); + return true; + } + return false; +} + + +bool SWBasicFilter::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + return substituteToken(buf, token); +} + + +bool SWBasicFilter::handleEscapeString(SWBuf &buf, const char *escString, BasicFilterUserData *userData) { + return substituteEscapeString(buf, escString); +} + + +void SWBasicFilter::setEscapeStart(const char *escStart) { + stdstr(&(this->escStart), escStart); + escStartLen = strlen(escStart); +} + + +void SWBasicFilter::setEscapeEnd(const char *escEnd) { + stdstr(&(this->escEnd), escEnd); + escEndLen = strlen(escEnd); +} + + +void SWBasicFilter::setTokenStart(const char *tokenStart) { + stdstr(&(this->tokenStart), tokenStart); + tokenStartLen = strlen(tokenStart); +} + + +void SWBasicFilter::setTokenEnd(const char *tokenEnd) { + stdstr(&(this->tokenEnd), tokenEnd); + tokenEndLen = strlen(tokenEnd); +} + + +char SWBasicFilter::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + char *from; + char token[4096]; + int tokpos = 0; + bool intoken = false; + bool inEsc = false; + int escStartPos = 0, escEndPos = 0; + int tokenStartPos = 0, tokenEndPos = 0; + SWBuf lastTextNode; + BasicFilterUserData *userData = createUserData(module, key); + + SWBuf orig = text; + from = orig.getRawData(); + text = ""; + + if (processStages & INITIALIZE) { + if (processStage(INITIALIZE, text, from, userData)) { // processStage handled it all + delete userData; + return 0; + } + } + + for (;*from; from++) { + + if (processStages & PRECHAR) { + if (processStage(PRECHAR, text, from, userData)) // processStage handled this char + continue; + } + + if (*from == tokenStart[tokenStartPos]) { + if (tokenStartPos == (tokenStartLen - 1)) { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + inEsc = false; + } + else tokenStartPos++; + continue; + } + + if (*from == escStart[escStartPos]) { + if (escStartPos == (escStartLen - 1)) { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + inEsc = true; + } + else escStartPos++; + continue; + } + + if (inEsc) { + if (*from == escEnd[escEndPos]) { + if (escEndPos == (escEndLen - 1)) { + intoken = inEsc = false; + userData->lastTextNode = lastTextNode; + + if (!userData->suspendTextPassThru) { //if text through is disabled no tokens should pass, too + if ((!handleEscapeString(text, token, userData)) && (passThruUnknownEsc)) { + appendEscapeString(text, token); + } + } + escEndPos = escStartPos = tokenEndPos = tokenStartPos = 0; + lastTextNode = ""; + continue; + } + } + } + + if (!inEsc) { + if (*from == tokenEnd[tokenEndPos]) { + if (tokenEndPos == (tokenEndLen - 1)) { + intoken = false; + userData->lastTextNode = lastTextNode; + if ((!handleToken(text, token, userData)) && (passThruUnknownToken)) { + text += tokenStart; + text += token; + text += tokenEnd; + } + escEndPos = escStartPos = tokenEndPos = tokenStartPos = 0; + lastTextNode = ""; + continue; + } + } + } + + if (intoken) { + if (tokpos < 4090) { + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + } + else { + if ((!userData->supressAdjacentWhitespace) || (*from != ' ')) { + if (!userData->suspendTextPassThru) { + text.append(*from); + userData->lastSuspendSegment.size(0); + } + else userData->lastSuspendSegment.append(*from); + lastTextNode.append(*from); + } + userData->supressAdjacentWhitespace = false; + } + + if (processStages & POSTCHAR) + processStage(POSTCHAR, text, from, userData); + + } + + if (processStages & FINALIZE) + processStage(FINALIZE, text, from, userData); + + delete userData; + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/swoptfilter.cpp b/src/modules/filters/swoptfilter.cpp new file mode 100644 index 0000000..6921190 --- /dev/null +++ b/src/modules/filters/swoptfilter.cpp @@ -0,0 +1,47 @@ +/****************************************************************************** + * + * swoptfilter - SWFilter descendant and base class for all option filters + */ + + +#include <swoptfilter.h> +#include <utilstr.h> + +SWORD_NAMESPACE_START + + +SWOptionFilter::SWOptionFilter() { + static StringList empty; + static const char *empty2 = ""; + optName = empty2; + optTip = empty2; + optValues = ∅ +} + +SWOptionFilter::SWOptionFilter(const char *oName, const char *oTip, const StringList *oValues) { + optName = oName; + optTip = oTip; + optValues = oValues; +} + + +SWOptionFilter::~SWOptionFilter() { +} + + +void SWOptionFilter::setOptionValue(const char *ival) { + for (StringList::const_iterator loop = optValues->begin(); loop != optValues->end(); loop++) { + if (!stricmp(loop->c_str(), ival)) { + optionValue = *loop; + option = (!strnicmp(ival, "On", 2)); // convenience for boolean filters + break; + } + } +} + +const char *SWOptionFilter::getOptionValue() { + return optionValue; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/teihtmlhref.cpp b/src/modules/filters/teihtmlhref.cpp new file mode 100644 index 0000000..1d213f4 --- /dev/null +++ b/src/modules/filters/teihtmlhref.cpp @@ -0,0 +1,205 @@ +/*************************************************************************** + teirtf.cpp - TEI to HTMLHREF filter + ------------------- + begin : 2006-07-03 + copyright : 2006 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <ctype.h> +#include <teihtmlhref.h> +#include <utilxml.h> +#include <swmodule.h> +#include <url.h> + + +SWORD_NAMESPACE_START + + +TEIHTMLHREF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { + BiblicalText = false; + if (module) { + version = module->Name(); + BiblicalText = (!strcmp(module->Type(), "Biblical Texts")); + } +} + + +TEIHTMLHREF::TEIHTMLHREF() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + + addAllowedEscapeString("quot"); + addAllowedEscapeString("apos"); + addAllowedEscapeString("amp"); + addAllowedEscapeString("lt"); + addAllowedEscapeString("gt"); + + setTokenCaseSensitive(true); +} + +bool TEIHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + // manually process if it wasn't a simple substitution + if (!substituteToken(buf, token)) { + MyUserData *u = (MyUserData *)userData; + XMLTag tag(token); + + if (!strcmp(tag.getName(), "p")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { // non-empty start tag + buf += "<!P><br />"; + } + else if (tag.isEndTag()) { // end tag + buf += "<!/P><br />"; + //userData->supressAdjacentWhitespace = true; + } + else { // empty paragraph break marker + buf += "<!P><br />"; + //userData->supressAdjacentWhitespace = true; + } + } + + // <hi> + else if (!strcmp(tag.getName(), "hi")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + SWBuf rend = tag.getAttribute("rend"); + + u->lastHi = rend; + if (rend == "ital") + buf += "<i>"; + else if (rend == "bold") + buf += "<b>"; + else if (rend == "sup") + buf += "<small><sup>"; + + } + else if (tag.isEndTag()) { + SWBuf rend = u->lastHi; + if (rend == "ital") + buf += "</i>"; + else if (rend == "bold") + buf += "</b>"; + else if (rend == "sup") + buf += "</sup></small>"; + } + } + + // <entryFree> + else if (!strcmp(tag.getName(), "entryFree")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + SWBuf n = tag.getAttribute("n"); + if (n != "") { + buf += "<b>"; + buf += n; + buf += "</b>"; + } + } + } + + // <sense> + else if (!strcmp(tag.getName(), "sense")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + SWBuf n = tag.getAttribute("n"); + if (n != "") { + buf += "<br /><b>"; + buf += n; + buf += "</b>"; + } + } + } + + // <div> + else if (!strcmp(tag.getName(), "div")) { + + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "<!P>"; + } + else if (tag.isEndTag()) { + } + } + + // <pos>, <gen>, <case>, <gram>, <number>, <mood>, <pron>, <def> + else if (!strcmp(tag.getName(), "pos") || + !strcmp(tag.getName(), "gen") || + !strcmp(tag.getName(), "case") || + !strcmp(tag.getName(), "gram") || + !strcmp(tag.getName(), "number") || + !strcmp(tag.getName(), "pron") || + !strcmp(tag.getName(), "def")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "<i>"; + } + else if (tag.isEndTag()) { + buf += "</i>"; + } + } + + // <tr> + else if (!strcmp(tag.getName(), "tr")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "<i>"; + } + else if (tag.isEndTag()) { + buf += "</i>"; + } + } + + // orth + else if (!strcmp(tag.getName(), "orth")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "<b>"; + } + else if (tag.isEndTag()) { + buf += "</b>"; + } + } + + // <etym>, <usg> + else if (!strcmp(tag.getName(), "etym") || + !strcmp(tag.getName(), "usg")) { + // do nothing here + } + + // <note> tag + else if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + u->suspendTextPassThru = true; + } + } + if (tag.isEndTag()) { + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + + buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup>*n</sup></small></a>", + URL::encode(footnoteNumber.c_str()).c_str(), + URL::encode(u->version.c_str()).c_str(), + URL::encode(u->key->getText()).c_str()); + + u->suspendTextPassThru = false; + } + } + + else { + return false; // we still didn't handle token + } + + } + return true; +} + + +SWORD_NAMESPACE_END + diff --git a/src/modules/filters/teiplain.cpp b/src/modules/filters/teiplain.cpp new file mode 100644 index 0000000..c721d84 --- /dev/null +++ b/src/modules/filters/teiplain.cpp @@ -0,0 +1,116 @@ +/*************************************************************************** + teiplain.cpp - TEI to Plaintext filter + ------------------- + begin : 2006-07-05 + copyright : 2006 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <teiplain.h> +#include <ctype.h> + +SWORD_NAMESPACE_START + +TEIPlain::TEIPlain() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + + addEscapeStringSubstitute("amp", "&"); + addEscapeStringSubstitute("apos", "'"); + addEscapeStringSubstitute("lt", "<"); + addEscapeStringSubstitute("gt", ">"); + addEscapeStringSubstitute("quot", "\""); + + setTokenCaseSensitive(true); +} + + +bool TEIPlain::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + // manually process if it wasn't a simple substitution + if (!substituteToken(buf, token)) { + //MyUserData *u = (MyUserData *)userData; + XMLTag tag(token); + + // <p> paragraph tag + if (!strcmp(tag.getName(), "p")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { // non-empty start tag + buf += "\n"; + } + else if (tag.isEndTag()) { // end tag + buf += "\n"; + userData->supressAdjacentWhitespace = true; + } + else { // empty paragraph break marker + buf += "\n\n"; + userData->supressAdjacentWhitespace = true; + } + } + + // <entryFree> + else if (!strcmp(tag.getName(), "entryFree")) { + SWBuf n = tag.getAttribute("n"); + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + if (n != "") { + buf += n; + buf += ". "; + } + } + } + + // <sense> + else if (!strcmp(tag.getName(), "sense")) { + SWBuf n = tag.getAttribute("n"); + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + if (n != "") { + buf += n; + buf += ". "; + } + } + else if (tag.isEndTag()) { + buf += "\n"; + } + } + + // <div> + else if (!strcmp(tag.getName(), "div")) { + + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf.append("\n\n\n"); + } + else if (tag.isEndTag()) { + } + } + + // <etym> + else if (!strcmp(tag.getName(), "etym")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "["; + } + else if (tag.isEndTag()) { + buf += "]"; + } + } + + else { + return false; // we still didn't handle token + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/teirtf.cpp b/src/modules/filters/teirtf.cpp new file mode 100644 index 0000000..006f099 --- /dev/null +++ b/src/modules/filters/teirtf.cpp @@ -0,0 +1,182 @@ +/*************************************************************************** + teirtf.cpp - TEI to RTF filter + ------------------- + begin : 2006-07-03 + copyright : 2006 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <ctype.h> +#include <teirtf.h> +#include <utilxml.h> +#include <swmodule.h> +#include <versekey.h> + +SWORD_NAMESPACE_START + + +TEIRTF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { + BiblicalText = false; + if (module) { + version = module->Name(); + BiblicalText = (!strcmp(module->Type(), "Biblical Texts")); + } +} + + +TEIRTF::TEIRTF() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + + addEscapeStringSubstitute("amp", "&"); + addEscapeStringSubstitute("apos", "'"); + addEscapeStringSubstitute("lt", "<"); + addEscapeStringSubstitute("gt", ">"); + addEscapeStringSubstitute("quot", "\""); + + setTokenCaseSensitive(true); +} + + +bool TEIRTF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + // manually process if it wasn't a simple substitution + if (!substituteToken(buf, token)) { + MyUserData *u = (MyUserData *)userData; + XMLTag tag(token); + + // <p> paragraph tag + if (!strcmp(tag.getName(), "p")) { + if (!tag.isEndTag()) { // non-empty start tag + buf += "{\\sb100\\fi200\\par}"; + } + } + + // <hi> + else if (!strcmp(tag.getName(), "hi")) { + SWBuf rend = tag.getAttribute("rend"); + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + if (rend == "ital") + buf += "{\\i1 "; + else if (rend == "bold") + buf += "{\\b1 "; + else if (rend == "sup") + buf += "{\\super "; + + } + else if (tag.isEndTag()) { + buf += "}"; + } + } + + // <entryFree> + else if (!strcmp(tag.getName(), "entryFree")) { + SWBuf n = tag.getAttribute("n"); + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + if (n != "") { + buf += "{\\b1 "; + buf += n; + buf += ". }"; } + } + } + + // <sense> + else if (!strcmp(tag.getName(), "sense")) { + SWBuf n = tag.getAttribute("n"); + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + if (n != "") { + buf += "{\\sb100\\par\\b1 "; + buf += n; + buf += ". }"; + } + } + } + + // <div> + else if (!strcmp(tag.getName(), "div")) { + + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf.append("{\\pard\\sa300}"); + } + else if (tag.isEndTag()) { + } + } + + // <pos>, <gen>, <case>, <gram>, <number>, <mood> + else if (!strcmp(tag.getName(), "pos") || !strcmp(tag.getName(), "gen") || !strcmp(tag.getName(), "case") || !strcmp(tag.getName(), "gram") || !strcmp(tag.getName(), "number") || !strcmp(tag.getName(), "mood")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "{\\i1 "; + } + else if (tag.isEndTag()) { + buf += "}"; + } + } + + // <tr> + else if (!strcmp(tag.getName(), "tr")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "{\\i1 "; + } + else if (tag.isEndTag()) { + buf += "}"; + } + } + + // <etym> + else if (!strcmp(tag.getName(), "etym")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "["; + } + else if (tag.isEndTag()) { + buf += "]"; + } + } + + // <note> tag + else if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + SWBuf type = tag.getAttribute("type"); + + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + VerseKey *vkey; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) { } + if (vkey) { + buf.appendFormatted("{\\super <a href=\"\">*%s</a>} ", footnoteNumber.c_str()); + } + u->suspendTextPassThru = true; + } + } + if (tag.isEndTag()) { + u->suspendTextPassThru = false; + } + } + + else { + return false; // we still didn't handle token + } + + } + return true; +} + + +SWORD_NAMESPACE_END + diff --git a/src/modules/filters/thmlfootnotes.cpp b/src/modules/filters/thmlfootnotes.cpp new file mode 100644 index 0000000..23c43b4 --- /dev/null +++ b/src/modules/filters/thmlfootnotes.cpp @@ -0,0 +1,124 @@ +/****************************************************************************** + * + * thmlfootnotes - SWFilter descendant to hide or show footnotes + * in a ThML module. + */ + + +#include <stdlib.h> +#include <stdio.h> +#include <thmlfootnotes.h> +#include <swmodule.h> +#include <swbuf.h> +#include <versekey.h> +#include <utilxml.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Footnotes"; +const char oTip[] = "Toggles Footnotes On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +ThMLFootnotes::ThMLFootnotes() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +ThMLFootnotes::~ThMLFootnotes() { +} + + +char ThMLFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + SWBuf token; + bool intoken = false; + bool hide = false; + SWBuf tagText; + XMLTag startTag; + SWBuf refs = ""; + int footnoteNum = 1; + char buf[254]; + VerseKey parser = key->getText(); + + SWBuf orig = text; + const char *from = orig.c_str(); + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + + XMLTag tag(token); + if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + refs = ""; + startTag = tag; + hide = true; + tagText = ""; + continue; + } + } + if (hide && tag.isEndTag()) { + if (module->isProcessEntryAttributes()) { + SWBuf fc = module->getEntryAttributes()["Footnote"]["count"]["value"]; + footnoteNum = (fc.length()) ? atoi(fc.c_str()) : 0; + sprintf(buf, "%i", ++footnoteNum); + module->getEntryAttributes()["Footnote"]["count"]["value"] = buf; + StringList attributes = startTag.getAttributeNames(); + for (StringList::iterator it = attributes.begin(); it != attributes.end(); it++) { + module->getEntryAttributes()["Footnote"][buf][it->c_str()] = startTag.getAttribute(it->c_str()); + } + module->getEntryAttributes()["Footnote"][buf]["body"] = tagText; + startTag.setAttribute("swordFootnote", buf); + if ((startTag.getAttribute("type")) && (!strcmp(startTag.getAttribute("type"), "crossReference"))) { + if (!refs.length()) + refs = parser.ParseVerseList(tagText.c_str(), parser, true).getRangeText(); + module->getEntryAttributes()["Footnote"][buf]["refList"] = refs.c_str(); + } + } + hide = false; + if ((option) || ((startTag.getAttribute("type") && (!strcmp(startTag.getAttribute("type"), "crossReference"))))) { // we want the tag in the text; crossReferences are handled by another filter + text += startTag; + text.append(tagText); + } + else continue; + } + } + + // if not a note token, keep token in text + if ((!strcmp(tag.getName(), "scripRef")) && (!tag.isEndTag())) { + SWBuf osisRef = tag.getAttribute("passage"); + if (refs.length()) + refs += "; "; + refs += osisRef; + } + if (!hide) { + text += '<'; + text.append(token); + text += '>'; + } + else { + tagText += '<'; + tagText.append(token); + tagText += '>'; + } + continue; + } + if (intoken) { //copy token + token += *from; + } + else if (!hide) { //copy text which is not inside a token + text += *from; + } + else tagText += *from; + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlgbf.cpp b/src/modules/filters/thmlgbf.cpp new file mode 100644 index 0000000..f8703b1 --- /dev/null +++ b/src/modules/filters/thmlgbf.cpp @@ -0,0 +1,291 @@ +/*************************************************************************** + thmlgbf.cpp - ThML to GBF filter + ------------------- + begin : 1999-10-28 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <thmlgbf.h> +#include <utilstr.h> +#include <swbuf.h> + +SWORD_NAMESPACE_START + +ThMLGBF::ThMLGBF() +{ +} + + +char ThMLGBF::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + const char *from; + char token[2048]; + int tokpos = 0; + bool intoken = false; + bool ampersand = false; + bool sechead = false; + bool title = false; + + SWBuf orig = text; + from = orig.c_str(); + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + ampersand = false; + continue; + } + else if (*from == '&') { + intoken = true; + tokpos = 0; + memset(token, 0, 2048); + ampersand = true; + continue; + } + if (*from == ';' && ampersand) { + intoken = false; + + if (!strncmp("nbsp", token, 4)) text += ' '; + else if (!strncmp("quot", token, 4)) text += '"'; + else if (!strncmp("amp", token, 3)) text += '&'; + else if (!strncmp("lt", token, 2)) text += '<'; + else if (!strncmp("gt", token, 2)) text += '>'; + else if (!strncmp("brvbar", token, 6)) text += '¦'; + else if (!strncmp("sect", token, 4)) text += '§'; + else if (!strncmp("copy", token, 4)) text += '©'; + else if (!strncmp("laquo", token, 5)) text += '«'; + else if (!strncmp("reg", token, 3)) text += '®'; + else if (!strncmp("acute", token, 5)) text += '´'; + else if (!strncmp("para", token, 4)) text += '¶'; + else if (!strncmp("raquo", token, 5)) text += '»'; + + else if (!strncmp("Aacute", token, 6)) text += 'Á'; + else if (!strncmp("Agrave", token, 6)) text += 'À'; + else if (!strncmp("Acirc", token, 5)) text += 'Â'; + else if (!strncmp("Auml", token, 4)) text += 'Ä'; + else if (!strncmp("Atilde", token, 6)) text += 'Ã'; + else if (!strncmp("Aring", token, 5)) text += 'Å'; + else if (!strncmp("aacute", token, 6)) text += 'á'; + else if (!strncmp("agrave", token, 6)) text += 'à'; + else if (!strncmp("acirc", token, 5)) text += 'â'; + else if (!strncmp("auml", token, 4)) text += 'ä'; + else if (!strncmp("atilde", token, 6)) text += 'ã'; + else if (!strncmp("aring", token, 5)) text += 'å'; + else if (!strncmp("Eacute", token, 6)) text += 'É'; + else if (!strncmp("Egrave", token, 6)) text += 'È'; + else if (!strncmp("Ecirc", token, 5)) text += 'Ê'; + else if (!strncmp("Euml", token, 4)) text += 'Ë'; + else if (!strncmp("eacute", token, 6)) text += 'é'; + else if (!strncmp("egrave", token, 6)) text += 'è'; + else if (!strncmp("ecirc", token, 5)) text += 'ê'; + else if (!strncmp("euml", token, 4)) text += 'ë'; + else if (!strncmp("Iacute", token, 6)) text += 'Í'; + else if (!strncmp("Igrave", token, 6)) text += 'Ì'; + else if (!strncmp("Icirc", token, 5)) text += 'Î'; + else if (!strncmp("Iuml", token, 4)) text += 'Ï'; + else if (!strncmp("iacute", token, 6)) text += 'í'; + else if (!strncmp("igrave", token, 6)) text += 'ì'; + else if (!strncmp("icirc", token, 5)) text += 'î'; + else if (!strncmp("iuml", token, 4)) text += 'ï'; + else if (!strncmp("Oacute", token, 6)) text += 'Ó'; + else if (!strncmp("Ograve", token, 6)) text += 'Ò'; + else if (!strncmp("Ocirc", token, 5)) text += 'Ô'; + else if (!strncmp("Ouml", token, 4)) text += 'Ö'; + else if (!strncmp("Otilde", token, 6)) text += 'Õ'; + else if (!strncmp("oacute", token, 6)) text += 'ó'; + else if (!strncmp("ograve", token, 6)) text += 'ò'; + else if (!strncmp("ocirc", token, 5)) text += 'ô'; + else if (!strncmp("ouml", token, 4)) text += 'ö'; + else if (!strncmp("otilde", token, 6)) text += 'õ'; + else if (!strncmp("Uacute", token, 6)) text += 'Ú'; + else if (!strncmp("Ugrave", token, 6)) text += 'Ù'; + else if (!strncmp("Ucirc", token, 5)) text += 'Û'; + else if (!strncmp("Uuml", token, 4)) text += 'Ü'; + else if (!strncmp("uacute", token, 6)) text += 'ú'; + else if (!strncmp("ugrave", token, 6)) text += 'ù'; + else if (!strncmp("ucirc", token, 5)) text += 'û'; + else if (!strncmp("uuml", token, 4)) text += 'ü'; + else if (!strncmp("Yacute", token, 6)) text += 'Ý'; + else if (!strncmp("yacute", token, 6)) text += 'ý'; + else if (!strncmp("yuml", token, 4)) text += 'ÿ'; + + else if (!strncmp("deg", token, 3)) text += '°'; + else if (!strncmp("plusmn", token, 6)) text += '±'; + else if (!strncmp("sup2", token, 4)) text += '²'; + else if (!strncmp("sup3", token, 4)) text += '³'; + else if (!strncmp("sup1", token, 4)) text += '¹'; + else if (!strncmp("nbsp", token, 4)) text += 'º'; + else if (!strncmp("pound", token, 5)) text += '£'; + else if (!strncmp("cent", token, 4)) text += '¢'; + else if (!strncmp("frac14", token, 6)) text += '¼'; + else if (!strncmp("frac12", token, 6)) text += '½'; + else if (!strncmp("frac34", token, 6)) text += '¾'; + else if (!strncmp("iquest", token, 6)) text += '¿'; + else if (!strncmp("iexcl", token, 5)) text += '¡'; + else if (!strncmp("ETH", token, 3)) text += 'Ð'; + else if (!strncmp("eth", token, 3)) text += 'ð'; + else if (!strncmp("THORN", token, 5)) text += 'Þ'; + else if (!strncmp("thorn", token, 5)) text += 'þ'; + else if (!strncmp("AElig", token, 5)) text += 'Æ'; + else if (!strncmp("aelig", token, 5)) text += 'æ'; + else if (!strncmp("Oslash", token, 6)) text += 'Ø'; + else if (!strncmp("curren", token, 6)) text += '¤'; + else if (!strncmp("Ccedil", token, 6)) text += 'Ç'; + else if (!strncmp("ccedil", token, 6)) text += 'ç'; + else if (!strncmp("szlig", token, 5)) text += 'ß'; + else if (!strncmp("Ntilde", token, 6)) text += 'Ñ'; + else if (!strncmp("ntilde", token, 6)) text += 'ñ'; + else if (!strncmp("yen", token, 3)) text += '¥'; + else if (!strncmp("not", token, 3)) text += '¬'; + else if (!strncmp("ordf", token, 4)) text += 'ª'; + else if (!strncmp("uml", token, 3)) text += '¨'; + else if (!strncmp("shy", token, 3)) text += '­'; + else if (!strncmp("macr", token, 4)) text += '¯'; + else if (!strncmp("micro", token, 5)) text += "µ"; + else if (!strncmp("middot", token, 6)) text +="·"; + else if (!strncmp("cedil", token, 5)) text += "¸"; + else if (!strncmp("ordm", token, 4)) text += "º"; + else if (!strncmp("times", token, 5)) text += "×"; + else if (!strncmp("divide", token, 6)) text +="÷"; + else if (!strncmp("oslash", token, 6)) text +="ø"; + continue; + + } + else if (*from == '>' && !ampersand) { + intoken = false; + // process desired tokens + if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) { + text += "<W"; + for (unsigned int i = 27; token[i] != '\"'; i++) + text += token[i]; + text += '>'; + continue; + } + if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) { + text += "<WT"; + for (unsigned int i = 25; token[i] != '\"'; i++) + text += token[i]; + text += '>'; + continue; + } + else if (!strncmp(token, "scripRef", 8)) { + text += "<RX>"; + continue; + } + else if (!strncmp(token, "/scripRef", 9)) { + text += "<Rx>"; + continue; + } + else if (!strncmp(token, "note", 4)) { + text += "<RF>"; + continue; + } + else if (!strncmp(token, "/note", 5)) { + text += "<Rf>"; + continue; + } + else if (!strncmp(token, "sup", 3)) { + text += "<FS>"; + } + else if (!strncmp(token, "/sup", 4)) { + text += "<Fs>"; + } + else if (!strnicmp(token, "font color=#ff0000", 18)) { + text += "<FR>"; + continue; + } + else if (!strnicmp(token, "/font", 5)) { + text += "<Fr>"; + continue; + } + else if (!strncmp(token, "div class=\"sechead\"", 19)) { + text += "<TS>"; + sechead = true; + continue; + } + else if (sechead && !strncmp(token, "/div", 19)) { + text += "<Ts>"; + sechead = false; + continue; + } + else if (!strncmp(token, "div class=\"title\"", 19)) { + text += "<TT>"; + title = true; + continue; + } + else if (title && !strncmp(token, "/div", 19)) { + text += "<Tt>"; + title = false; + continue; + } + else if (!strnicmp(token, "br", 2)) { + text += "<CL>"; + continue; + } + else switch(*token) { + case 'I': // font tags + case 'i': + text += "<FI>"; + continue; + case 'B': // bold start + case 'b': + text += "<FB>"; + continue; + case '/': + switch(token[1]) { + case 'P': + case 'p': + text += "<CM>"; + continue; + case 'I': + case 'i': // italic end + text += "<Fi>"; + continue; + case 'B': // bold start + case 'b': + text += "<Fb>"; + continue; + } + } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else text += *from; + } + + orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { //loop to remove extra spaces + if ((strchr(" \t\n\r", *from))) { + while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) { + from++; + } + text += " "; + } + else { + text += *from; + } + } + text += (char)0; + + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlheadings.cpp b/src/modules/filters/thmlheadings.cpp new file mode 100644 index 0000000..4d6134f --- /dev/null +++ b/src/modules/filters/thmlheadings.cpp @@ -0,0 +1,153 @@ +/****************************************************************************** + * + * thmlheadings - SWFilter descendant to hide or show headings + * in a ThML module. + */ + + +#include <stdlib.h> +#include <stdio.h> +#include <thmlheadings.h> +#include <utilxml.h> +#include <utilstr.h> +#include <swmodule.h> +#include <stdio.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Headings"; +const char oTip[] = "Toggles Headings On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +ThMLHeadings::ThMLHeadings() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +ThMLHeadings::~ThMLHeadings() { +} + + +char ThMLHeadings::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + SWBuf token; + bool intoken = false; + bool isheader = false; + bool hide = false; + bool preverse = false; + bool withinDiv = false; + SWBuf header; + int headerNum = 0; + int pvHeaderNum = 0; + char buf[254]; + XMLTag startTag; + + SWBuf orig = text; + const char *from = orig.c_str(); + + XMLTag tag; + + for (text = ""; *from; ++from) { + if (*from == '<') { + intoken = true; + token = ""; + + continue; + } + if (*from == '>') { // process tokens + intoken = false; + + if (!strnicmp(token.c_str(), "div", 3) || !strnicmp(token.c_str(), "/div", 4)) { + withinDiv = (!strnicmp(token.c_str(), "div", 3)); + tag = token; + if (hide && tag.isEndTag()) { + if (module->isProcessEntryAttributes() && (option || (!preverse))) { + if (preverse) { + sprintf(buf, "%i", pvHeaderNum++); + module->getEntryAttributes()["Heading"]["Preverse"][buf] = header; + } + else { + sprintf(buf, "%i", headerNum++); + module->getEntryAttributes()["Heading"]["Interverse"][buf] = header; + if (option) { // we want the tag in the text + text.append(header); + } + } + + StringList attributes = startTag.getAttributeNames(); + for (StringList::const_iterator it = attributes.begin(); it != attributes.end(); it++) { + module->getEntryAttributes()["Heading"][buf][it->c_str()] = startTag.getAttribute(it->c_str()); + } + } + + hide = false; + if (!option || preverse) { // we don't want the tag in the text anymore + preverse = false; + continue; + } + preverse = false; + } + if (tag.getAttribute("class") && ((!stricmp(tag.getAttribute("class"), "sechead")) + || (!stricmp(tag.getAttribute("class"), "title")))) { + + isheader = true; + + if (!tag.isEndTag()) { //start tag + if (!tag.isEmpty()) { + startTag = tag; + +/* how do we tell a ThML preverse title from one that should be in the text? probably if any text is before the title... just assuming all are preverse for now + } + if (tag.getAttribute("subtype") && !stricmp(tag.getAttribute("subtype"), "x-preverse")) { +*/ + hide = true; + preverse = true; + header = ""; + continue; + } // move back up under startTag = tag + } +/* this is where non-preverse will go eventually + if (!tag.isEndTag()) { //start tag + hide = true; + header = ""; + if (option) { // we want the tag in the text + text.append('<'); + text.append(token); + text.append('>'); + } + continue; + } +*/ + } + else + isheader = false; + } + + if (withinDiv && isheader) { + header.append('<'); + header.append(token); + header.append('>'); + } else { + // if not a heading token, keep token in text + if (!hide) { + text.append('<'); + text.append(token); + text.append('>'); + } + } + continue; + } + if (intoken) { //copy token + token.append(*from); + } + else if (!hide) { //copy text which is not inside a token + text.append(*from); + } + else header.append(*from); + } + return 0; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlhtml.cpp b/src/modules/filters/thmlhtml.cpp new file mode 100644 index 0000000..efb09cd --- /dev/null +++ b/src/modules/filters/thmlhtml.cpp @@ -0,0 +1,236 @@ +/*************************************************************************** + thmlhtml.cpp - ThML to HTML filter + ------------------- + begin : 1999-10-27 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include <stdlib.h> +#include <thmlhtml.h> +#include <swmodule.h> +#include <utilxml.h> + +SWORD_NAMESPACE_START + +ThMLHTML::ThMLHTML() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + setPassThruNumericEscapeString(true); + + addAllowedEscapeString("quot"); + addAllowedEscapeString("amp"); + addAllowedEscapeString("lt"); + addAllowedEscapeString("gt"); + + addAllowedEscapeString("nbsp"); + addAllowedEscapeString("brvbar"); // "¦" + addAllowedEscapeString("sect"); // "§" + addAllowedEscapeString("copy"); // "©" + addAllowedEscapeString("laquo"); // "«" + addAllowedEscapeString("reg"); // "®" + addAllowedEscapeString("acute"); // "´" + addAllowedEscapeString("para"); // "¶" + addAllowedEscapeString("raquo"); // "»" + + addAllowedEscapeString("Aacute"); // "Á" + addAllowedEscapeString("Agrave"); // "À" + addAllowedEscapeString("Acirc"); // "Â" + addAllowedEscapeString("Auml"); // "Ä" + addAllowedEscapeString("Atilde"); // "Ã" + addAllowedEscapeString("Aring"); // "Å" + addAllowedEscapeString("aacute"); // "á" + addAllowedEscapeString("agrave"); // "à" + addAllowedEscapeString("acirc"); // "â" + addAllowedEscapeString("auml"); // "ä" + addAllowedEscapeString("atilde"); // "ã" + addAllowedEscapeString("aring"); // "å" + addAllowedEscapeString("Eacute"); // "É" + addAllowedEscapeString("Egrave"); // "È" + addAllowedEscapeString("Ecirc"); // "Ê" + addAllowedEscapeString("Euml"); // "Ë" + addAllowedEscapeString("eacute"); // "é" + addAllowedEscapeString("egrave"); // "è" + addAllowedEscapeString("ecirc"); // "ê" + addAllowedEscapeString("euml"); // "ë" + addAllowedEscapeString("Iacute"); // "Í" + addAllowedEscapeString("Igrave"); // "Ì" + addAllowedEscapeString("Icirc"); // "Î" + addAllowedEscapeString("Iuml"); // "Ï" + addAllowedEscapeString("iacute"); // "í" + addAllowedEscapeString("igrave"); // "ì" + addAllowedEscapeString("icirc"); // "î" + addAllowedEscapeString("iuml"); // "ï" + addAllowedEscapeString("Oacute"); // "Ó" + addAllowedEscapeString("Ograve"); // "Ò" + addAllowedEscapeString("Ocirc"); // "Ô" + addAllowedEscapeString("Ouml"); // "Ö" + addAllowedEscapeString("Otilde"); // "Õ" + addAllowedEscapeString("oacute"); // "ó" + addAllowedEscapeString("ograve"); // "ò" + addAllowedEscapeString("ocirc"); // "ô" + addAllowedEscapeString("ouml"); // "ö" + addAllowedEscapeString("otilde"); // "õ" + addAllowedEscapeString("Uacute"); // "Ú" + addAllowedEscapeString("Ugrave"); // "Ù" + addAllowedEscapeString("Ucirc"); // "Û" + addAllowedEscapeString("Uuml"); // "Ü" + addAllowedEscapeString("uacute"); // "ú" + addAllowedEscapeString("ugrave"); // "ù" + addAllowedEscapeString("ucirc"); // "û" + addAllowedEscapeString("uuml"); // "ü" + addAllowedEscapeString("Yacute"); // "Ý" + addAllowedEscapeString("yacute"); // "ý" + addAllowedEscapeString("yuml"); // "ÿ" + + addAllowedEscapeString("deg"); // "°" + addAllowedEscapeString("plusmn"); // "±" + addAllowedEscapeString("sup2"); // "²" + addAllowedEscapeString("sup3"); // "³" + addAllowedEscapeString("sup1"); // "¹" + addAllowedEscapeString("nbsp"); // "º" + addAllowedEscapeString("pound"); // "£" + addAllowedEscapeString("cent"); // "¢" + addAllowedEscapeString("frac14"); // "¼" + addAllowedEscapeString("frac12"); // "½" + addAllowedEscapeString("frac34"); // "¾" + addAllowedEscapeString("iquest"); // "¿" + addAllowedEscapeString("iexcl"); // "¡" + addAllowedEscapeString("ETH"); // "Ð" + addAllowedEscapeString("eth"); // "ð" + addAllowedEscapeString("THORN"); // "Þ" + addAllowedEscapeString("thorn"); // "þ" + addAllowedEscapeString("AElig"); // "Æ" + addAllowedEscapeString("aelig"); // "æ" + addAllowedEscapeString("Oslash"); // "Ø" + addAllowedEscapeString("curren"); // "¤" + addAllowedEscapeString("Ccedil"); // "Ç" + addAllowedEscapeString("ccedil"); // "ç" + addAllowedEscapeString("szlig"); // "ß" + addAllowedEscapeString("Ntilde"); // "Ñ" + addAllowedEscapeString("ntilde"); // "ñ" + addAllowedEscapeString("yen"); // "¥" + addAllowedEscapeString("not"); // "¬" + addAllowedEscapeString("ordf"); // "ª" + addAllowedEscapeString("uml"); // "¨" + addAllowedEscapeString("shy"); // "­" + addAllowedEscapeString("macr"); // "¯" + + addAllowedEscapeString("micro"); // "µ" + addAllowedEscapeString("middot"); // "·" + addAllowedEscapeString("cedil"); // "¸" + addAllowedEscapeString("ordm"); // "º" + addAllowedEscapeString("times"); // "×" + addAllowedEscapeString("divide"); // "÷" + addAllowedEscapeString("oslash"); // "ø" + + setTokenCaseSensitive(true); + + addTokenSubstitute("note", " <font color=\"#800000\"><small>("); + addTokenSubstitute("/note", ")</small></font> "); +} + + +bool ThMLHTML::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + if (!substituteToken(buf, token)) { // manually process if it wasn't a simple substitution + MyUserData *u = (MyUserData *)userData; + XMLTag tag(token); + if (!strcmp(tag.getName(), "sync")) { + if (tag.getAttribute("type") && tag.getAttribute("value") && !strcmp(tag.getAttribute("type"), "Strongs")) { + const char* value = tag.getAttribute("value"); + if (*value == 'H' || *value == 'G' || *value == 'A') { + value++; + buf += "<small><em>"; + buf += value; + buf += "</em></small>"; + } + else if (*value == 'T') { + value += 2; + + buf += "<small><i>"; + buf += value; + buf += "</i></small>"; + } + } + else if (tag.getAttribute("type") && tag.getAttribute("value") && !strcmp(tag.getAttribute("type"), "morph")) { + buf += "<small><em>"; + buf += tag.getAttribute("value"); + buf += "</em></small>"; + } + else if (tag.getAttribute("type") && tag.getAttribute("value") && !strcmp(tag.getAttribute("type"), "lemma")) { + buf += "<small><em>("; + buf += tag.getAttribute("value"); + buf += ")</em></small>"; + } + } + else if (!strcmp(tag.getName(), "div")) { + if (tag.isEndTag() && (u->SecHead)) { + buf += "</i></b><br />"; + u->SecHead = false; + } + else if (tag.getAttribute("class")) { + if (!strcmp(tag.getAttribute("class"), "sechead")) { + u->SecHead = true; + buf += "<br /><b><i>"; + } + else if (!strcmp(tag.getAttribute("class"), "title")) { + u->SecHead = true; + buf += "<br /><b><i>"; + } + } + } + else if (!strcmp(tag.getName(), "img")) { + const char *src = strstr(token, "src"); + if (!src) // assert we have a src attribute + return false; + + buf += '<'; + for (const char *c = token; *c; c++) { + if (c == src) { + for (;((*c) && (*c != '"')); c++) + buf += *c; + + if (!*c) { c--; continue; } + + buf += '"'; + if (*(c+1) == '/') { + buf += "file:"; + buf += userData->module->getConfigEntry("AbsoluteDataPath"); + if (buf[buf.length()-2] == '/') + c++; // skip '/' + } + continue; + } + buf += *c; + } + buf += '>'; + } + else if (!strcmp(tag.getName(), "scripRef")) { //do nothing with scrip refs, we leave them out + + } + else { + buf += '<'; + buf += token; + buf += '>'; + +// return false; // we still didn't handle token + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlhtmlhref.cpp b/src/modules/filters/thmlhtmlhref.cpp new file mode 100644 index 0000000..0596f75 --- /dev/null +++ b/src/modules/filters/thmlhtmlhref.cpp @@ -0,0 +1,357 @@ +/*************************************************************************** + thmlhtmlhref.cpp - ThML to HTML filter with hrefs + ------------------- + begin : 2001-09-03 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ +#include <stdlib.h> +#include <thmlhtmlhref.h> +#include <swmodule.h> +#include <utilxml.h> +#include <utilstr.h> +#include <versekey.h> +#include <url.h> + +SWORD_NAMESPACE_START + + +ThMLHTMLHREF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { + if (module) { + version = module->Name(); + BiblicalText = (!strcmp(module->Type(), "Biblical Texts")); + SecHead = false; + } +} + + +ThMLHTMLHREF::ThMLHTMLHREF() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + setPassThruNumericEscapeString(true); + + addAllowedEscapeString("quot"); + addAllowedEscapeString("amp"); + addAllowedEscapeString("lt"); + addAllowedEscapeString("gt"); + + addAllowedEscapeString("nbsp"); + addAllowedEscapeString("brvbar"); // "Å " + addAllowedEscapeString("sect"); // "§" + addAllowedEscapeString("copy"); // "©" + addAllowedEscapeString("laquo"); // "«" + addAllowedEscapeString("reg"); // "®" + addAllowedEscapeString("acute"); // "Ž" + addAllowedEscapeString("para"); // "¶" + addAllowedEscapeString("raquo"); // "»" + + addAllowedEscapeString("Aacute"); // "Ã" + addAllowedEscapeString("Agrave"); // "À" + addAllowedEscapeString("Acirc"); // "Â" + addAllowedEscapeString("Auml"); // "Ä" + addAllowedEscapeString("Atilde"); // "Ã" + addAllowedEscapeString("Aring"); // "Ã…" + addAllowedEscapeString("aacute"); // "á" + addAllowedEscapeString("agrave"); // "à" + addAllowedEscapeString("acirc"); // "â" + addAllowedEscapeString("auml"); // "ä" + addAllowedEscapeString("atilde"); // "ã" + addAllowedEscapeString("aring"); // "Ã¥" + addAllowedEscapeString("Eacute"); // "É" + addAllowedEscapeString("Egrave"); // "È" + addAllowedEscapeString("Ecirc"); // "Ê" + addAllowedEscapeString("Euml"); // "Ë" + addAllowedEscapeString("eacute"); // "é" + addAllowedEscapeString("egrave"); // "è" + addAllowedEscapeString("ecirc"); // "ê" + addAllowedEscapeString("euml"); // "ë" + addAllowedEscapeString("Iacute"); // "Ã" + addAllowedEscapeString("Igrave"); // "ÃŒ" + addAllowedEscapeString("Icirc"); // "ÃŽ" + addAllowedEscapeString("Iuml"); // "Ã" + addAllowedEscapeString("iacute"); // "í" + addAllowedEscapeString("igrave"); // "ì" + addAllowedEscapeString("icirc"); // "î" + addAllowedEscapeString("iuml"); // "ï" + addAllowedEscapeString("Oacute"); // "Ó" + addAllowedEscapeString("Ograve"); // "Ã’" + addAllowedEscapeString("Ocirc"); // "Ô" + addAllowedEscapeString("Ouml"); // "Ö" + addAllowedEscapeString("Otilde"); // "Õ" + addAllowedEscapeString("oacute"); // "ó" + addAllowedEscapeString("ograve"); // "ò" + addAllowedEscapeString("ocirc"); // "ô" + addAllowedEscapeString("ouml"); // "ö" + addAllowedEscapeString("otilde"); // "õ" + addAllowedEscapeString("Uacute"); // "Ú" + addAllowedEscapeString("Ugrave"); // "Ù" + addAllowedEscapeString("Ucirc"); // "Û" + addAllowedEscapeString("Uuml"); // "Ãœ" + addAllowedEscapeString("uacute"); // "ú" + addAllowedEscapeString("ugrave"); // "ù" + addAllowedEscapeString("ucirc"); // "û" + addAllowedEscapeString("uuml"); // "ü" + addAllowedEscapeString("Yacute"); // "Ã" + addAllowedEscapeString("yacute"); // "ý" + addAllowedEscapeString("yuml"); // "ÿ" + + addAllowedEscapeString("deg"); // "°" + addAllowedEscapeString("plusmn"); // "±" + addAllowedEscapeString("sup2"); // "²" + addAllowedEscapeString("sup3"); // "³" + addAllowedEscapeString("sup1"); // "¹" + addAllowedEscapeString("nbsp"); // "º" + addAllowedEscapeString("pound"); // "£" + addAllowedEscapeString("cent"); // "¢" + addAllowedEscapeString("frac14"); // "Å’" + addAllowedEscapeString("frac12"); // "Å“" + addAllowedEscapeString("frac34"); // "Ÿ" + addAllowedEscapeString("iquest"); // "¿" + addAllowedEscapeString("iexcl"); // "¡" + addAllowedEscapeString("ETH"); // "Ã" + addAllowedEscapeString("eth"); // "ð" + addAllowedEscapeString("THORN"); // "Þ" + addAllowedEscapeString("thorn"); // "þ" + addAllowedEscapeString("AElig"); // "Æ" + addAllowedEscapeString("aelig"); // "æ" + addAllowedEscapeString("Oslash"); // "Ø" + addAllowedEscapeString("curren"); // "€" + addAllowedEscapeString("Ccedil"); // "Ç" + addAllowedEscapeString("ccedil"); // "ç" + addAllowedEscapeString("szlig"); // "ß" + addAllowedEscapeString("Ntilde"); // "Ñ" + addAllowedEscapeString("ntilde"); // "ñ" + addAllowedEscapeString("yen"); // "Â¥" + addAllowedEscapeString("not"); // "¬" + addAllowedEscapeString("ordf"); // "ª" + addAllowedEscapeString("uml"); // "Å¡" + addAllowedEscapeString("shy"); // "­" + addAllowedEscapeString("macr"); // "¯" + + addAllowedEscapeString("micro"); // "µ" + addAllowedEscapeString("middot"); // "·" + addAllowedEscapeString("cedil"); // "ž" + addAllowedEscapeString("ordm"); // "º" + addAllowedEscapeString("times"); // "×" + addAllowedEscapeString("divide"); // "÷" + addAllowedEscapeString("oslash"); // "ø" + + setTokenCaseSensitive(true); +// addTokenSubstitute("scripture", "<i> "); + addTokenSubstitute("/scripture", "</i> "); +} + + +bool ThMLHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + if (!substituteToken(buf, token)) { // manually process if it wasn't a simple substitution + MyUserData *u = (MyUserData *)userData; + + XMLTag tag(token); + if ((!tag.isEndTag()) && (!tag.isEmpty())) + u->startTag = tag; + + if (tag.getName() && !strcmp(tag.getName(), "sync")) { + SWBuf value = tag.getAttribute("value"); + if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "morph")) { //> + if(value.length()) + buf.appendFormatted("<small><em>(<a href=\"passagestudy.jsp?action=showMorph&type=Greek&value=%s\">%s</a>)</em></small>", + URL::encode(value.c_str()).c_str(), + value.c_str()); + } + else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "lemma")) { //> + if(value.length()) + // empty "type=" is deliberate. + buf.appendFormatted("<small><em><<a href=\"passagestudy.jsp?action=showStrongs&type=&value=%s\">%s</a>></em></small>", + URL::encode(value.c_str()).c_str(), + value.c_str()); + } + else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "Strongs")) { + char ch = *value; + value<<1; + buf.appendFormatted("<small><em><<a href=\"passagestudy.jsp?action=showStrongs&type=%s&value=%s\">", + ((ch == 'H') ? "Hebrew" : "Greek"), + URL::encode(value.c_str()).c_str()); + buf += (value.length()) ? value.c_str() : ""; + buf += "</a>></em></small>"; + } + else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "Dict")) { + buf += (tag.isEndTag() ? "</b>" : "<b>"); + } + + } + // <note> tag + else if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + SWBuf type = tag.getAttribute("type"); + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + VerseKey *vkey = NULL; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) { } + if (vkey) { + // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt. + char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); + buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup>*%c</sup></small></a>", + ch, + URL::encode(footnoteNumber.c_str()).c_str(), + URL::encode(u->version.c_str()).c_str(), + URL::encode(vkey->getText()).c_str(), + ch); + } + else { + char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); + buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup>*%c</sup></small></a>", + ch, + URL::encode(footnoteNumber.c_str()).c_str(), + URL::encode(u->version.c_str()).c_str(), + URL::encode(u->key->getText()).c_str(), + ch); + } + u->suspendTextPassThru = true; + } + } + if (tag.isEndTag()) { + u->suspendTextPassThru = false; + } + } + else if (!strcmp(tag.getName(), "scripture")) { + buf += (tag.isEndTag() ? "</i>" : "<i>"); + } + // <scripRef> tag + else if (!strcmp(tag.getName(), "scripRef")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + u->suspendTextPassThru = true; + } + } + if (tag.isEndTag()) { // </scripRef> + if (!u->BiblicalText) { + SWBuf refList = u->startTag.getAttribute("passage"); + if (!refList.length()) + refList = u->lastTextNode; + SWBuf version = tag.getAttribute("version"); + + buf.appendFormatted("<a href=\"passagestudy.jsp?action=showRef&type=scripRef&value=%s&module=%s\">", + (refList.length()) ? URL::encode(refList.c_str()).c_str() : "", + (version.length()) ? URL::encode(version.c_str()).c_str() : ""); + buf += u->lastTextNode.c_str(); + buf += "</a>"; + } + else { + SWBuf footnoteNumber = u->startTag.getAttribute("swordFootnote"); + VerseKey *vkey = NULL; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) {} + if (vkey) { + // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt. + //buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", vkey->getText(), footnoteNumber.c_str()); + buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=x&value=%s&module=%s&passage=%s\"><small><sup>*x</sup></small></a>", + URL::encode(footnoteNumber.c_str()).c_str(), + URL::encode(u->version.c_str()).c_str(), + URL::encode(vkey->getText()).c_str()); + + } + } + + // let's let text resume to output again + u->suspendTextPassThru = false; + } + } + else if (tag.getName() && !strcmp(tag.getName(), "div")) { + if (tag.isEndTag() && u->SecHead) { + buf += "</i></b><br />"; + u->SecHead = false; + } + else if (tag.getAttribute("class")) { + if (!stricmp(tag.getAttribute("class"), "sechead")) { + u->SecHead = true; + buf += "<br /><b><i>"; + } + else if (!stricmp(tag.getAttribute("class"), "title")) { + u->SecHead = true; + buf += "<br /><b><i>"; + } + else { + buf += tag; + } + } + else { + buf += tag; + } + } + else if (tag.getName() && (!strcmp(tag.getName(), "img") || !strcmp(tag.getName(), "image"))) { + const char *src = strstr(token, "src"); + if (!src) // assert we have a src attribute + return false; + + const char *c, *d; + if (((c = strchr(src+3, '"')) == NULL) || + ((d = strchr( ++c , '"')) == NULL)) // identify endpoints. + return false; // abandon hope. + + SWBuf imagename = "file:"; + if (*c == '/') // as below, inside for loop. + imagename += userData->module->getConfigEntry("AbsoluteDataPath"); + while (c != d) // move bits into the name. + imagename += *(c++); + + // images become clickable, if the UI supports showImage. + buf.appendFormatted("<a href=\"passagestudy.jsp?action=showImage&value=%s&module=%s\"><", + URL::encode(imagename.c_str()).c_str(), + URL::encode(u->version.c_str()).c_str()); + + for (c = token; *c; c++) { + if ((*c == '/') && (*(c+1) == '\0')) + continue; + if (c == src) { + for (;((*c) && (*c != '"')); c++) + buf += *c; + + if (!*c) { c--; continue; } + + buf += '"'; + if (*(c+1) == '/') { + buf += "file:"; + buf += userData->module->getConfigEntry("AbsoluteDataPath"); + if (buf[buf.length()-2] == '/') + c++; // skip '/' + } + continue; + } + buf += *c; + } + buf += " border=0 /></a>"; + } + else { + buf += '<'; + /*for (const char *tok = token; *tok; tok++) + buf += *tok;*/ + buf += token; + buf += '>'; + //return false; // we still didn't handle token + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmllemma.cpp b/src/modules/filters/thmllemma.cpp new file mode 100644 index 0000000..3e5761d --- /dev/null +++ b/src/modules/filters/thmllemma.cpp @@ -0,0 +1,65 @@ +/****************************************************************************** + * + * thmllemma - SWFilter descendant to hide or show lemmas + * in a ThML module. + */ + + +#include <stdlib.h> +#include <thmllemma.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Lemmas"; +const char oTip[] = "Toggles Lemmas On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +ThMLLemma::ThMLLemma() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +ThMLLemma::~ThMLLemma() { +} + + +char ThMLLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (!option) { // if we don't want lemmas + bool intoken = false; + + SWBuf token; + SWBuf orig = text; + const char *from = orig.c_str(); + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if (!strncmp(token.c_str(), "sync ", 5) && strstr(token.c_str(), "type=\"lemma\"")) { // Lemma + continue; + } + + // if not a lemma token, keep token in text + text += '<'; + text += token; + text += '>'; + continue; + } + + if (intoken) { + token += *from; + } + else { + text += *from; + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlmorph.cpp b/src/modules/filters/thmlmorph.cpp new file mode 100644 index 0000000..0fbef56 --- /dev/null +++ b/src/modules/filters/thmlmorph.cpp @@ -0,0 +1,65 @@ +/****************************************************************************** + * + * thmlmorph - SWFilter descendant to hide or show morph tags + * in a ThML module. + */ + + +#include <stdlib.h> +#include <thmlmorph.h> + +SWORD_NAMESPACE_START + +const char oName[] = "Morphological Tags"; +const char oTip[] = "Toggles Morphological Tags On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +ThMLMorph::ThMLMorph() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +ThMLMorph::~ThMLMorph() { +} + + +char ThMLMorph::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (!option) { // if we don't want morph tags + bool intoken = false; + + SWBuf token; + SWBuf orig = text; + const char *from = orig.c_str(); + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if (!strncmp(token.c_str(), "sync ", 5) && strstr(token.c_str(), "type=\"morph\"")) { // Morph + continue; + } + + // if not a morph tag token, keep token in text + text += '<'; + text += token; + text += '>'; + continue; + } + + if (intoken) { + token += *from; + } + else { + text += *from; + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlosis.cpp b/src/modules/filters/thmlosis.cpp new file mode 100644 index 0000000..939be82 --- /dev/null +++ b/src/modules/filters/thmlosis.cpp @@ -0,0 +1,575 @@ +/****************************************************************************** + * + * thmlstrongs - SWFilter descendant to hide or show strongs number + * in a ThML module. + */ + + +#include <stdlib.h> +#include <stdio.h> +#include <stdarg.h> +#include <ctype.h> +#include <thmlosis.h> +#include <swmodule.h> +#include <swlog.h> +#include <versekey.h> +#include <utilstr.h> +#include <utilxml.h> + + +SWORD_NAMESPACE_START + +ThMLOSIS::ThMLOSIS() { +} + + +ThMLOSIS::~ThMLOSIS() { +} + + +char ThMLOSIS::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + char token[2048]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + bool keepToken = false; + bool ampersand = false; + +// static QuoteStack quoteStack; + + bool lastspace = false; + char val[128]; + SWBuf buf; + char *valto; + char *ch; + + const char *wordStart = text.c_str(); + const char *wordEnd = NULL; + + const char *textStart = NULL; + const char *textEnd = NULL; + + bool suspendTextPassThru = false; + bool handled = false; + bool newText = false; + bool newWord = false; + +// SWBuf tmp; + SWBuf divEnd = ""; + + SWBuf orig = text; + const char* from = orig.c_str(); + + text = ""; + for (from = orig.c_str(); *from; ++from) { + + // handle silly <variant word> items in greek whnu, remove when module is fixed + if ((*from == '<') && (*(from+1) < 0)) { + text += "<"; + continue; + } + + if (*from == '<') { //start of new token detected + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + ampersand = false; + textEnd = from-1; + wordEnd = text.c_str() + text.length();//not good, instead of wordEnd = to! + +// wordEnd = to; + continue; + } + + if (*from == '&') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + ampersand = true; + continue; + } + + if (*from == ';' && ampersand) { + intoken = false; + ampersand = false; + + if (*token == '#') { + text += '&'; + text += token; + text += ';'; + } + else if (!strncmp("nbsp", token, 4)) text += ' '; + else if (!strncmp("quot", token, 4)) text += '"'; + else if (!strncmp("amp", token, 3)) text += '&'; + else if (!strncmp("lt", token, 2)) text += '<'; + else if (!strncmp("gt", token, 2)) text += '>'; + else if (!strncmp("brvbar", token, 6)) text += '¦'; + else if (!strncmp("sect", token, 4)) text += '§'; + else if (!strncmp("copy", token, 4)) text += '©'; + else if (!strncmp("laquo", token, 5)) text += '«'; + else if (!strncmp("reg", token, 3)) text += '®'; + else if (!strncmp("acute", token, 5)) text += '´'; + else if (!strncmp("para", token, 4)) text += '¶'; + else if (!strncmp("raquo", token, 5)) text += '»'; + else if (!strncmp("Aacute", token, 6)) text += 'Á'; + else if (!strncmp("Agrave", token, 6)) text += 'À'; + else if (!strncmp("Acirc", token, 5)) text += 'Â'; + else if (!strncmp("Auml", token, 4)) text += 'Ä'; + else if (!strncmp("Atilde", token, 6)) text += 'Ã'; + else if (!strncmp("Aring", token, 5)) text += 'Å'; + else if (!strncmp("aacute", token, 6)) text += 'á'; + else if (!strncmp("agrave", token, 6)) text += 'à'; + else if (!strncmp("acirc", token, 5)) text += 'â'; + else if (!strncmp("auml", token, 4)) text += 'ä'; + else if (!strncmp("atilde", token, 6)) text += 'ã'; + else if (!strncmp("aring", token, 5)) text += 'å'; + else if (!strncmp("Eacute", token, 6)) text += 'É'; + else if (!strncmp("Egrave", token, 6)) text += 'È'; + else if (!strncmp("Ecirc", token, 5)) text += 'Ê'; + else if (!strncmp("Euml", token, 4)) text += 'Ë'; + else if (!strncmp("eacute", token, 6)) text += 'é'; + else if (!strncmp("egrave", token, 6)) text += 'è'; + else if (!strncmp("ecirc", token, 5)) text += 'ê'; + else if (!strncmp("euml", token, 4)) text += 'ë'; + else if (!strncmp("Iacute", token, 6)) text += 'Í'; + else if (!strncmp("Igrave", token, 6)) text += 'Ì'; + else if (!strncmp("Icirc", token, 5)) text += 'Î'; + else if (!strncmp("Iuml", token, 4)) text += 'Ï'; + else if (!strncmp("iacute", token, 6)) text += 'í'; + else if (!strncmp("igrave", token, 6)) text += 'ì'; + else if (!strncmp("icirc", token, 5)) text += 'î'; + else if (!strncmp("iuml", token, 4)) text += 'ï'; + else if (!strncmp("Oacute", token, 6)) text += 'Ó'; + else if (!strncmp("Ograve", token, 6)) text += 'Ò'; + else if (!strncmp("Ocirc", token, 5)) text += 'Ô'; + else if (!strncmp("Ouml", token, 4)) text += 'Ö'; + else if (!strncmp("Otilde", token, 6)) text += 'Õ'; + else if (!strncmp("oacute", token, 6)) text += 'ó'; + else if (!strncmp("ograve", token, 6)) text += 'ò'; + else if (!strncmp("ocirc", token, 5)) text += 'ô'; + else if (!strncmp("ouml", token, 4)) text += 'ö'; + else if (!strncmp("otilde", token, 6)) text += 'õ'; + else if (!strncmp("Uacute", token, 6)) text += 'Ú'; + else if (!strncmp("Ugrave", token, 6)) text += 'Ù'; + else if (!strncmp("Ucirc", token, 5)) text += 'Û'; + else if (!strncmp("Uuml", token, 4)) text += 'Ü'; + else if (!strncmp("uacute", token, 6)) text += 'ú'; + else if (!strncmp("ugrave", token, 6)) text += 'ù'; + else if (!strncmp("ucirc", token, 5)) text += 'û'; + else if (!strncmp("uuml", token, 4)) text += 'ü'; + else if (!strncmp("Yacute", token, 6)) text += 'Ý'; + else if (!strncmp("yacute", token, 6)) text += 'ý'; + else if (!strncmp("yuml", token, 4)) text += 'ÿ'; + + else if (!strncmp("deg", token, 3)) text += '°'; + else if (!strncmp("plusmn", token, 6)) text += '±'; + else if (!strncmp("sup2", token, 4)) text += '²'; + else if (!strncmp("sup3", token, 4)) text += '³'; + else if (!strncmp("sup1", token, 4)) text += '¹'; + else if (!strncmp("nbsp", token, 4)) text += 'º'; + else if (!strncmp("pound", token, 5)) text += '£'; + else if (!strncmp("cent", token, 4)) text += '¢'; + else if (!strncmp("frac14", token, 6)) text += '¼'; + else if (!strncmp("frac12", token, 6)) text += '½'; + else if (!strncmp("frac34", token, 6)) text += '¾'; + else if (!strncmp("iquest", token, 6)) text += '¿'; + else if (!strncmp("iexcl", token, 5)) text += '¡'; + else if (!strncmp("ETH", token, 3)) text += 'Ð'; + else if (!strncmp("eth", token, 3)) text += 'ð'; + else if (!strncmp("THORN", token, 5)) text += 'Þ'; + else if (!strncmp("thorn", token, 5)) text += 'þ'; + else if (!strncmp("AElig", token, 5)) text += 'Æ'; + else if (!strncmp("aelig", token, 5)) text += 'æ'; + else if (!strncmp("Oslash", token, 6)) text += 'Ø'; + else if (!strncmp("curren", token, 6)) text += '¤'; + else if (!strncmp("Ccedil", token, 6)) text += 'Ç'; + else if (!strncmp("ccedil", token, 6)) text += 'ç'; + else if (!strncmp("szlig", token, 5)) text += 'ß'; + else if (!strncmp("Ntilde", token, 6)) text += 'Ñ'; + else if (!strncmp("ntilde", token, 6)) text += 'ñ'; + else if (!strncmp("yen", token, 3)) text += '¥'; + else if (!strncmp("not", token, 3)) text += '¬'; + else if (!strncmp("ordf", token, 4)) text += 'ª'; + else if (!strncmp("uml", token, 3)) text += '¨'; + else if (!strncmp("shy", token, 3)) text += '­'; + else if (!strncmp("macr", token, 4)) text += '¯'; + else if (!strncmp("micro", token, 5)) text += "µ"; + else if (!strncmp("middot", token, 6)) text +="·"; + else if (!strncmp("cedil", token, 5)) text += "¸"; + else if (!strncmp("ordm", token, 4)) text += "º"; + else if (!strncmp("times", token, 5)) text += "×"; + else if (!strncmp("divide", token, 6)) text +="÷"; + else if (!strncmp("oslash", token, 6)) text +="ø"; + continue; + } + + // handle silly <variant word> items in greek whnu, remove when module is fixed + if ((*from == '>') && (*(from-1) < 0)) { + text += ">"; + continue; + } + + if (*from == '>') { // process tokens + intoken = false; + keepToken = false; + suspendTextPassThru = false; + newWord = true; + handled = false; + + while (wordStart < (text.c_str() + text.length())) { //hack + if (strchr(";,. :?!()'\"", *wordStart) && wordStart[0] && wordStart[1]) + wordStart++; + else break; + } + while (wordEnd > wordStart) { + if (strchr(" ,;:.?!()'\"", *wordEnd)) + wordEnd--; + else break; + } + + // variants + if (!strncmp(token, "div type=\"variant\"", 18)) { + XMLTag tag = token; + text.append("<seg type=\"x-variant\""); + SWBuf cls = "x-class:"; + cls += tag.getAttribute("class"); + if (cls.length()>8) + text.appendFormatted(" subType=\"%s\"", cls.c_str()); + + text += ">"; + divEnd = "</seg>"; + newText = true; + lastspace = false; + handled = true; + } + // section titles + if (!strcmp(token, "div class=\"sechead\"")) { +// pushString(&to, "<title>"); + text.append("<title>"); + divEnd = ""; + newText = true; + lastspace = false; + handled = true; + } + else if (!strcmp(token, "/div")) { + //pushString(&to, divEnd.c_str()); + text.append(divEnd); + lastspace = false; + handled = true; + } + // Scripture Reference + if (!strncmp(token, "scripRef", 8)) { + // pushString(buf, "Type(), "Biblical Texts")) { +// // Italics assume transchange for Biblical texts +// if (!stricmp(token, "i")) { +// pushString(&to, ""); +// newText = true; +// lastspace = false; +// handled = true; +// } +// else if (!stricmp(token, "/i")) { +// pushString(&to, ""); +// lastspace = false; +// handled = true; +// } +// } +// else { +// // otherwise, italics are just italics +//-- end italics for transchange + if (!stricmp(token, "i")) { +// pushString(&to, ""); + text.append(""); + newText = true; + lastspace = false; + handled = true; + } + else if (!stricmp(token, "/i")) { +// pushString(&to, ""); + text.append(""); + lastspace = false; + handled = true; + } +// } + + if (!strcmp(token, "b")) { +// pushString(&to, ""); + text.append(""); + newText = true; + lastspace = false; + handled = true; + } + else if (!strcmp(token, "/b")) { +// pushString(&to, ""); + text.append(""); + lastspace = false; + handled = true; + } + + // Footnote + if (!strcmp(token, "note")) { + //pushString(&to, ""); + text.append(""); + newText = true; + lastspace = false; + handled = true; + } + else if (!strcmp(token, "/note")) { + // pushString(&to, ""); + text.append(""); + lastspace = false; + handled = true; + } + + // Figure + else if (!strncmp(token, "img ", 4)) { + const char *src = strstr(token, "src"); + if (!src) // assert we have a src attribute + continue; +// return false; + + //pushString(&to, "

getConfigEntry("AbsoluteDataPath")); +// if (*((*buf)-1) == '/') +// c++; // skip '/' +// } +// end of uncomment for asolute path logic + +// for (c++;((*c) && (*c != '"')); c++) +// *to++ = *c; + + //pushString(&to, "\" />"); + text.append("\" />"); + handled = true; + } + + // Strongs numbers + else if (!strnicmp(token, "sync type=\"Strongs\" ", 20)) { // Strongs + valto = val; + for (unsigned int i = 27; token[i] != '\"' && i < 150; i++) + *valto++ = token[i]; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + // normal strongs number + strstrip(val); + + if (!strncmp(wordStart, " attribute! + buf = ""; + buf.appendFormatted("", val); + text.insert(wordStart - text.c_str(), buf); + text += ""; + lastspace = false; + } + } + // OLB verb morph, leave it out of OSIS tag + else { + } + handled = true; + } + + // Morphology + else if (!strncmp(token, "sync type=\"morph\"", 17)) { + SWBuf cls = ""; + SWBuf morph = ""; + for (ch = token+17; *ch; ch++) { + if (!strncmp(ch, "class=\"", 7)) { + valto = val; + for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++) + *valto++ = ch[i]; + *valto = 0; + strstrip(val); + cls = val; + } + if (!strncmp(ch, "value=\"", 7)) { + valto = val; + for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++) + *valto++ = ch[i]; + *valto = 0; + strstrip(val); + morph = val; + } + } + if (!strncmp(wordStart, " attribute fond + buf = ""; + buf.appendFormatted("", ((cls.length())?cls.c_str():"robinson"), morph.c_str()); + text.insert(wordStart - text.c_str(), buf); + text += ""; + lastspace = false; + + } + handled = true; + } + + if (!keepToken) { + if (!handled) { + SWLog::getSystemLog()->logError("Unprocessed Token: <%s> in key %s", token, key ? (const char*)*key : ""); +// exit(-1); + } + if (from[1] && strchr(" ,;.:?!()'\"", from[1])) { + if (lastspace) { + text--; + } + } + if (newText) { + textStart = from+1; + newText = false; + } + continue; + } + + // if not a strongs token, keep token in text + text.appendFormatted("<%s>", token); + + if (newText) { + textStart = text.c_str() + text.length(); + newWord = false; + } + continue; + } + if (intoken) { + if ((tokpos < 2045) && ((*from != 10)&&(*from != 13))) { + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + } + else { + switch (*from) { + case '\'': + case '\"': + case '`': +// quoteStack.handleQuote(fromStart, from, &to); + text += *from; + //from++; //this line removes chars after an apostrophe! Needs fixing. + break; + default: + if (newWord && (*from != ' ')) { + wordStart = text.c_str() + text.length(); + newWord = false; + + //fix this if required? + //memset(to, 0, 10); + + } + + if (!suspendTextPassThru) { + text += (*from); + lastspace = (*from == ' '); + } + } + } + } + + VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, key); + if (vkey) { + SWBuf ref = ""; + if (vkey->Verse()) { + ref.appendFormatted("\t\t", vkey->getOSISRef()); + } + + if (ref.length() > 0) { + + text = ref + text; + + if (vkey->Verse()) { + VerseKey tmp; + tmp = *vkey; + tmp.AutoNormalize(0); + tmp.Headings(1); + + text += ""; + + tmp = MAXVERSE; + if (*vkey == tmp) { + tmp.Verse(0); +// sprintf(ref, "\t
"); +// pushString(&to, ref); + tmp = MAXCHAPTER; + tmp = MAXVERSE; + if (*vkey == tmp) { + tmp.Chapter(0); + tmp.Verse(0); +// sprintf(ref, "\t
"); +// pushString(&to, ref); +/* + if (!quoteStack.empty()) { + SWLog::getSystemLog()->logError("popping unclosed quote at end of book"); + quoteStack.clear(); + } +*/ + } + } + } +// else if (vkey->Chapter()) { +// sprintf(ref, "\t
", vkey->getOSISRef()); +// } +// else sprintf(ref, "\t
", vkey->getOSISRef()); + } + } + return 0; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlplain.cpp b/src/modules/filters/thmlplain.cpp new file mode 100644 index 0000000..8f8379a --- /dev/null +++ b/src/modules/filters/thmlplain.cpp @@ -0,0 +1,219 @@ +/****************************************************************************** + * + * thmlplain - SWFilter descendant to strip out all ThML tags or convert to + * ASCII rendered symbols. + */ + + +#include +#include +#include + +SWORD_NAMESPACE_START + +ThMLPlain::ThMLPlain() { +} + +char ThMLPlain::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + char token[2048]; + int tokpos = 0; + bool intoken = false; + bool ampersand = false; + + const char *from; + SWBuf orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) + { + if (*from == 10 || *from == 13) + from++; + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + ampersand = false; + continue; + } + else if (*from == '&') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + ampersand = true; + continue; + } + if (*from == ';' && ampersand) { + intoken = false; + ampersand = false; + + if (!strncmp("nbsp", token, 4)) text += ' '; + else if (!strncmp("quot", token, 4)) text += '"'; + else if (!strncmp("amp", token, 3)) text += '&'; + else if (!strncmp("lt", token, 2)) text += '<'; + else if (!strncmp("gt", token, 2)) text += '>'; + else if (!strncmp("brvbar", token, 6)) text += '¦'; + else if (!strncmp("sect", token, 4)) text += '§'; + else if (!strncmp("copy", token, 4)) text += '©'; + else if (!strncmp("laquo", token, 5)) text += '«'; + else if (!strncmp("reg", token, 3)) text += '®'; + else if (!strncmp("acute", token, 5)) text += '´'; + else if (!strncmp("para", token, 4)) text += '¶'; + else if (!strncmp("raquo", token, 5)) text += '»'; + + else if (!strncmp("Aacute", token, 6)) text += 'Á'; + else if (!strncmp("Agrave", token, 6)) text += 'À'; + else if (!strncmp("Acirc", token, 5)) text += 'Â'; + else if (!strncmp("Auml", token, 4)) text += 'Ä'; + else if (!strncmp("Atilde", token, 6)) text += 'Ã'; + else if (!strncmp("Aring", token, 5)) text += 'Å'; + else if (!strncmp("aacute", token, 6)) text += 'á'; + else if (!strncmp("agrave", token, 6)) text += 'à'; + else if (!strncmp("acirc", token, 5)) text += 'â'; + else if (!strncmp("auml", token, 4)) text += 'ä'; + else if (!strncmp("atilde", token, 6)) text += 'ã'; + else if (!strncmp("aring", token, 5)) text += 'å'; + else if (!strncmp("Eacute", token, 6)) text += 'É'; + else if (!strncmp("Egrave", token, 6)) text += 'È'; + else if (!strncmp("Ecirc", token, 5)) text += 'Ê'; + else if (!strncmp("Euml", token, 4)) text += 'Ë'; + else if (!strncmp("eacute", token, 6)) text += 'é'; + else if (!strncmp("egrave", token, 6)) text += 'è'; + else if (!strncmp("ecirc", token, 5)) text += 'ê'; + else if (!strncmp("euml", token, 4)) text += 'ë'; + else if (!strncmp("Iacute", token, 6)) text += 'Í'; + else if (!strncmp("Igrave", token, 6)) text += 'Ì'; + else if (!strncmp("Icirc", token, 5)) text += 'Î'; + else if (!strncmp("Iuml", token, 4)) text += 'Ï'; + else if (!strncmp("iacute", token, 6)) text += 'í'; + else if (!strncmp("igrave", token, 6)) text += 'ì'; + else if (!strncmp("icirc", token, 5)) text += 'î'; + else if (!strncmp("iuml", token, 4)) text += 'ï'; + else if (!strncmp("Oacute", token, 6)) text += 'Ó'; + else if (!strncmp("Ograve", token, 6)) text += 'Ò'; + else if (!strncmp("Ocirc", token, 5)) text += 'Ô'; + else if (!strncmp("Ouml", token, 4)) text += 'Ö'; + else if (!strncmp("Otilde", token, 6)) text += 'Õ'; + else if (!strncmp("oacute", token, 6)) text += 'ó'; + else if (!strncmp("ograve", token, 6)) text += 'ò'; + else if (!strncmp("ocirc", token, 5)) text += 'ô'; + else if (!strncmp("ouml", token, 4)) text += 'ö'; + else if (!strncmp("otilde", token, 6)) text += 'õ'; + else if (!strncmp("Uacute", token, 6)) text += 'Ú'; + else if (!strncmp("Ugrave", token, 6)) text += 'Ù'; + else if (!strncmp("Ucirc", token, 5)) text += 'Û'; + else if (!strncmp("Uuml", token, 4)) text += 'Ü'; + else if (!strncmp("uacute", token, 6)) text += 'ú'; + else if (!strncmp("ugrave", token, 6)) text += 'ù'; + else if (!strncmp("ucirc", token, 5)) text += 'û'; + else if (!strncmp("uuml", token, 4)) text += 'ü'; + else if (!strncmp("Yacute", token, 6)) text += 'Ý'; + else if (!strncmp("yacute", token, 6)) text += 'ý'; + else if (!strncmp("yuml", token, 4)) text += 'ÿ'; + + else if (!strncmp("deg", token, 3)) text += '°'; + else if (!strncmp("plusmn", token, 6)) text += '±'; + else if (!strncmp("sup2", token, 4)) text += '²'; + else if (!strncmp("sup3", token, 4)) text += '³'; + else if (!strncmp("sup1", token, 4)) text += '¹'; + else if (!strncmp("nbsp", token, 4)) text += 'º'; + else if (!strncmp("pound", token, 5)) text += '£'; + else if (!strncmp("cent", token, 4)) text += '¢'; + else if (!strncmp("frac14", token, 6)) text += '¼'; + else if (!strncmp("frac12", token, 6)) text += '½'; + else if (!strncmp("frac34", token, 6)) text += '¾'; + else if (!strncmp("iquest", token, 6)) text += '¿'; + else if (!strncmp("iexcl", token, 5)) text += '¡'; + else if (!strncmp("ETH", token, 3)) text += 'Ð'; + else if (!strncmp("eth", token, 3)) text += 'ð'; + else if (!strncmp("THORN", token, 5)) text += 'Þ'; + else if (!strncmp("thorn", token, 5)) text += 'þ'; + else if (!strncmp("AElig", token, 5)) text += 'Æ'; + else if (!strncmp("aelig", token, 5)) text += 'æ'; + else if (!strncmp("Oslash", token, 6)) text += 'Ø'; + else if (!strncmp("curren", token, 6)) text += '¤'; + else if (!strncmp("Ccedil", token, 6)) text += 'Ç'; + else if (!strncmp("ccedil", token, 6)) text += 'ç'; + else if (!strncmp("szlig", token, 5)) text += 'ß'; + else if (!strncmp("Ntilde", token, 6)) text += 'Ñ'; + else if (!strncmp("ntilde", token, 6)) text += 'ñ'; + else if (!strncmp("yen", token, 3)) text += '¥'; + else if (!strncmp("not", token, 3)) text += '¬'; + else if (!strncmp("ordf", token, 4)) text += 'ª'; + else if (!strncmp("uml", token, 3)) text += '¨'; + else if (!strncmp("shy", token, 3)) text += '­'; + else if (!strncmp("macr", token, 4)) text += '¯'; + else if (!strncmp("micro", token, 5)) text += "µ"; + else if (!strncmp("middot", token, 6)) text +="·"; + else if (!strncmp("cedil", token, 5)) text += "¸"; + else if (!strncmp("ordm", token, 4)) text += "º"; + else if (!strncmp("times", token, 5)) text += "×"; + else if (!strncmp("divide", token, 6)) text +="÷"; + else if (!strncmp("oslash", token, 6)) text +="ø"; + continue; + + } + else if (*from == '>' && !ampersand) { + intoken = false; + // process desired tokens + if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) { + text += ' '; + text += '<'; + for (unsigned int i = 27; token[i] != '\"'; i++) + text += token[i]; + text += '>'; + continue; + } + if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) { + text += ' '; + text += '('; + for (unsigned int i = 25; token[i] != '\"'; i++) + text += token[i]; + text += ')'; + continue; + } + if (!strncmp("note", token, 4)) { + text += ' '; + text += '('; + } + else if (!strncmp("br", token, 2)) + text += '\n'; + else if (!strncmp("/p", token, 2)) + text += '\n'; + else if (!strncmp("/note", token, 5)) { + text += ')'; + text += ' '; + } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else text += *from; + } + + orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { //loop to remove extra spaces + if ((strchr(" \t\n\r", *from))) { + while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) { + from++; + } + text += " "; + } + else { + text += *from; + } + } + text += (char)0; + + return 0; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlrtf.cpp b/src/modules/filters/thmlrtf.cpp new file mode 100644 index 0000000..23e4a90 --- /dev/null +++ b/src/modules/filters/thmlrtf.cpp @@ -0,0 +1,346 @@ +/*************************************************************************** + thmlrtf.cpp - ThML to RTF filter + ------------------- + begin : 1999-10-27 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +ThMLRTF::ThMLRTF() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + + addEscapeStringSubstitute("nbsp", "\302\240"); + addEscapeStringSubstitute("apos", "'"); + addEscapeStringSubstitute("quot", "\""); + addEscapeStringSubstitute("amp", "&"); + addEscapeStringSubstitute("lt", "<"); + addEscapeStringSubstitute("gt", ">"); + addEscapeStringSubstitute("brvbar", "¦"); + addEscapeStringSubstitute("sect", "§"); + addEscapeStringSubstitute("copy", "©"); + addEscapeStringSubstitute("laquo", "«"); + addEscapeStringSubstitute("reg", "®"); + addEscapeStringSubstitute("acute", "´"); + addEscapeStringSubstitute("para", "¶"); + addEscapeStringSubstitute("raquo", "»"); + + addEscapeStringSubstitute("Aacute", "Á"); + addEscapeStringSubstitute("Agrave", "À"); + addEscapeStringSubstitute("Acirc", "Â"); + addEscapeStringSubstitute("Auml", "Ä"); + addEscapeStringSubstitute("Atilde", "Ã"); + addEscapeStringSubstitute("Aring", "Å"); + addEscapeStringSubstitute("aacute", "á"); + addEscapeStringSubstitute("agrave", "à"); + addEscapeStringSubstitute("acirc", "â"); + addEscapeStringSubstitute("auml", "ä"); + addEscapeStringSubstitute("atilde", "ã"); + addEscapeStringSubstitute("aring", "å"); + addEscapeStringSubstitute("Eacute", "É"); + addEscapeStringSubstitute("Egrave", "È"); + addEscapeStringSubstitute("Ecirc", "Ê"); + addEscapeStringSubstitute("Euml", "Ë"); + addEscapeStringSubstitute("eacute", "é"); + addEscapeStringSubstitute("egrave", "è"); + addEscapeStringSubstitute("ecirc", "ê"); + addEscapeStringSubstitute("euml", "ë"); + addEscapeStringSubstitute("Iacute", "Í"); + addEscapeStringSubstitute("Igrave", "Ì"); + addEscapeStringSubstitute("Icirc", "Î"); + addEscapeStringSubstitute("Iuml", "Ï"); + addEscapeStringSubstitute("iacute", "í"); + addEscapeStringSubstitute("igrave", "ì"); + addEscapeStringSubstitute("icirc", "î"); + addEscapeStringSubstitute("iuml", "ï"); + addEscapeStringSubstitute("Oacute", "Ó"); + addEscapeStringSubstitute("Ograve", "Ò"); + addEscapeStringSubstitute("Ocirc", "Ô"); + addEscapeStringSubstitute("Ouml", "Ö"); + addEscapeStringSubstitute("Otilde", "Õ"); + addEscapeStringSubstitute("oacute", "ó"); + addEscapeStringSubstitute("ograve", "ò"); + addEscapeStringSubstitute("ocirc", "ô"); + addEscapeStringSubstitute("ouml", "ö"); + addEscapeStringSubstitute("otilde", "õ"); + addEscapeStringSubstitute("Uacute", "Ú"); + addEscapeStringSubstitute("Ugrave", "Ù"); + addEscapeStringSubstitute("Ucirc", "Û"); + addEscapeStringSubstitute("Uuml", "Ü"); + addEscapeStringSubstitute("uacute", "ú"); + addEscapeStringSubstitute("ugrave", "ù"); + addEscapeStringSubstitute("ucirc", "û"); + addEscapeStringSubstitute("uuml", "ü"); + addEscapeStringSubstitute("Yacute", "Ý"); + addEscapeStringSubstitute("yacute", "ý"); + addEscapeStringSubstitute("yuml", "ÿ"); + + addEscapeStringSubstitute("deg", "°"); + addEscapeStringSubstitute("plusmn", "±"); + addEscapeStringSubstitute("sup2", "²"); + addEscapeStringSubstitute("sup3", "³"); + addEscapeStringSubstitute("sup1", "¹"); + addEscapeStringSubstitute("nbsp", "º"); + addEscapeStringSubstitute("pound", "£"); + addEscapeStringSubstitute("cent", "¢"); + addEscapeStringSubstitute("frac14", "¼"); + addEscapeStringSubstitute("frac12", "½"); + addEscapeStringSubstitute("frac34", "¾"); + addEscapeStringSubstitute("iquest", "¿"); + addEscapeStringSubstitute("iexcl", "¡"); + addEscapeStringSubstitute("ETH", "Ð"); + addEscapeStringSubstitute("eth", "ð"); + addEscapeStringSubstitute("THORN", "Þ"); + addEscapeStringSubstitute("thorn", "þ"); + addEscapeStringSubstitute("AElig", "Æ"); + addEscapeStringSubstitute("aelig", "æ"); + addEscapeStringSubstitute("Oslash", "Ø"); + addEscapeStringSubstitute("curren", "¤"); + addEscapeStringSubstitute("Ccedil", "Ç"); + addEscapeStringSubstitute("ccedil", "ç"); + addEscapeStringSubstitute("szlig", "ß"); + addEscapeStringSubstitute("Ntilde", "Ñ"); + addEscapeStringSubstitute("ntilde", "ñ"); + addEscapeStringSubstitute("yen", "¥"); + addEscapeStringSubstitute("not", "¬"); + addEscapeStringSubstitute("ordf", "ª"); + addEscapeStringSubstitute("uml", "¨"); + addEscapeStringSubstitute("shy", "­"); + addEscapeStringSubstitute("macr", "¯"); + + addEscapeStringSubstitute("micro", "µ"); + addEscapeStringSubstitute("middot", "·"); + addEscapeStringSubstitute("cedil", "¸"); + addEscapeStringSubstitute("ordm", "º"); + addEscapeStringSubstitute("times", "×"); + addEscapeStringSubstitute("divide", "÷"); + addEscapeStringSubstitute("oslash", "ø"); + + setTokenCaseSensitive(true); + + + addTokenSubstitute("br", "\\line "); + addTokenSubstitute("br /", "\\line "); + addTokenSubstitute("i", "{\\i1 "); + addTokenSubstitute("/i", "}"); + addTokenSubstitute("b", "{\\b1 "); + addTokenSubstitute("/b", "}"); + addTokenSubstitute("p", "{\\fi200\\par}"); + addTokenSubstitute("p /", "\\pard\\par\\par "); + + //we need uppercase forms for the moment to support a few early ThML modules that aren't XHTML compliant + addTokenSubstitute("BR", "\\line "); + addTokenSubstitute("I", "{\\i1 "); + addTokenSubstitute("/I", "}"); + addTokenSubstitute("B", "{\\b1 "); + addTokenSubstitute("/B", "}"); + addTokenSubstitute("P", "\\par "); + addTokenSubstitute("scripture", "{\\i1 "); + addTokenSubstitute("/scripture", "}"); + addTokenSubstitute("center", "\\qc "); + addTokenSubstitute("/center", "\\pard "); +} + + +char ThMLRTF::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + + // preprocess text buffer to escape RTF control codes + const char *from; + SWBuf orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { //loop to remove extra spaces + switch (*from) { + case '{': + case '}': + case '\\': + text += "\\"; + text += *from; + break; + default: + text += *from; + } + } + text += (char)0; + + SWBasicFilter::processText(text, key, module); //handle tokens as usual + + orig = text; + from = orig.c_str(); + for (text = ""; *from; from++) { //loop to remove extra spaces + if ((strchr(" \t\n\r", *from))) { + while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) { + from++; + } + text += " "; + } + else { + text += *from; + } + } + text += (char)0; // probably not needed, but don't want to remove without investigating (same as above) + return 0; +} + + +ThMLRTF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { + this->SecHead = false; + XMLTag startTag = ""; + if (module) { + version = module->Name(); + BiblicalText = (!strcmp(module->Type(), "Biblical Texts")); + } +} + + +bool ThMLRTF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + if (!substituteToken(buf, token)) { // manually process if it wasn't a simple substitution + MyUserData *u = (MyUserData *)userData; + XMLTag tag(token); + if ((!tag.isEndTag()) && (!tag.isEmpty())) + u->startTag = tag; + if (tag.getName() && !strcmp(tag.getName(), "sync")) { + SWBuf value = tag.getAttribute("value"); + if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "morph")) { //> + buf.appendFormatted(" {\\cf4 \\sub (%s)}", value.c_str()); + } + else if( tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "Strongs")) { + if (value[0] == 'H' || value[0] == 'G' || value[0] == 'A') { + value<<1; + buf.appendFormatted(" {\\cf3 \\sub <%s>}", value.c_str()); + } + else if (value[0] == 'T') { + value<<1; + buf.appendFormatted(" {\\cf4 \\sub (%s)}", value.c_str()); + } + } + else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "Dict")) { + if (!tag.isEndTag()) + buf += "{\\b "; + else buf += "}"; + } + } + // tag + else if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + SWBuf type = tag.getAttribute("type"); + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + VerseKey *vkey = NULL; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) { } + if (vkey) { + // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt. + char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); + buf.appendFormatted("{\\super *%c%i.%s} ", ch, vkey->Verse(), footnoteNumber.c_str()); + } + u->suspendTextPassThru = true; + } + } + if (tag.isEndTag()) { + u->suspendTextPassThru = false; + } + } + + + else if (!strcmp(tag.getName(), "scripRef")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + u->suspendTextPassThru = true; + } + } + if (tag.isEndTag()) { // + if (!u->BiblicalText) { + SWBuf refList = u->startTag.getAttribute("passage"); + if (!refList.length()) + refList = u->lastTextNode; + SWBuf version = tag.getAttribute("version"); + buf += ""; + buf += refList.c_str(); +// buf += u->lastTextNode.c_str(); + buf += ""; + } + else { + SWBuf footnoteNumber = u->startTag.getAttribute("swordFootnote"); + VerseKey *vkey = NULL; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) {} + if (vkey) { + // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt. + buf.appendFormatted("{\\super *x%i.%s} ", vkey->Verse(), footnoteNumber.c_str()); + } + } + + // let's let text resume to output again + u->suspendTextPassThru = false; + } + } + + else if (tag.getName() && !strcmp(tag.getName(), "div")) { + if (tag.isEndTag() && u->SecHead) { + buf += "\\par}"; + u->SecHead = false; + } + else if (tag.getAttribute("class")) { + if (!stricmp(tag.getAttribute("class"), "sechead")) { + u->SecHead = true; + buf += "{\\par\\i1\\b1 "; + } + else if (!stricmp(tag.getAttribute("class"), "title")) { + u->SecHead = true; + buf += "{\\par\\i1\\b1 "; + } + } + } + else if (tag.getName() && (!strcmp(tag.getName(), "img") || !strcmp(tag.getName(), "image"))) { + const char *src = tag.getAttribute("src"); + if (!src) // assert we have a src attribute + return false; + + char* filepath = new char[strlen(u->module->getConfigEntry("AbsoluteDataPath")) + strlen(token)]; + *filepath = 0; + strcpy(filepath, userData->module->getConfigEntry("AbsoluteDataPath")); + strcat(filepath, src); + +// we do this because BibleCS looks for this EXACT format for an image tag + buf+=""; + delete [] filepath; + } + else { + return false; // we still didn't handle token + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlscripref.cpp b/src/modules/filters/thmlscripref.cpp new file mode 100644 index 0000000..df2b3d2 --- /dev/null +++ b/src/modules/filters/thmlscripref.cpp @@ -0,0 +1,123 @@ +/****************************************************************************** + * + * thmlscripref - SWFilter descendant to hide or show scripture + * referebces in a ThML module. + */ + + +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Cross-references"; +const char oTip[] = "Toggles Scripture Cross-references On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +ThMLScripref::ThMLScripref() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("On"); +} + + +ThMLScripref::~ThMLScripref() { +} + + +char ThMLScripref::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + SWBuf token; + bool intoken = false; + bool hide = false; + SWBuf tagText; + XMLTag startTag; + SWBuf refs = ""; + int footnoteNum = 1; + char buf[254]; + VerseKey parser = key->getText(); + + SWBuf orig = text; + const char *from = orig.c_str(); + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + if (*from == '>') { // process tokens + intoken = false; + + XMLTag tag(token); + if (!strcmp(tag.getName(), "scripRef")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + refs = ""; + startTag = tag; + hide = true; + tagText = ""; + continue; + } + } + if (hide && tag.isEndTag()) { + if (module->isProcessEntryAttributes()) { + SWBuf fc = module->getEntryAttributes()["Footnote"]["count"]["value"]; + footnoteNum = (fc.length()) ? atoi(fc.c_str()) : 0; + sprintf(buf, "%i", ++footnoteNum); + module->getEntryAttributes()["Footnote"]["count"]["value"] = buf; + StringList attributes = startTag.getAttributeNames(); + for (StringList::iterator it = attributes.begin(); it != attributes.end(); it++) { + module->getEntryAttributes()["Footnote"][buf][it->c_str()] = startTag.getAttribute(it->c_str()); + } + module->getEntryAttributes()["Footnote"][buf]["body"] = tagText; + startTag.setAttribute("swordFootnote", buf); + SWBuf passage = startTag.getAttribute("passage"); + if (passage.length()) + refs = parser.ParseVerseList(passage.c_str(), parser, true).getRangeText(); + else refs = parser.ParseVerseList(tagText.c_str(), parser, true).getRangeText(); + module->getEntryAttributes()["Footnote"][buf]["refList"] = refs.c_str(); + } + hide = false; + if (option) { // we want the tag in the text + text += startTag; + text.append(tagText); + } + else continue; + } + } + + // if not a scripRef token, keep token in text + if ((!strcmp(tag.getName(), "scripRef")) && (!tag.isEndTag())) { + SWBuf osisRef = tag.getAttribute("passage"); + if (refs.length()) + refs += "; "; + refs += osisRef; + } + if (!hide) { + text += '<'; + text.append(token); + text += '>'; + } + else { + tagText += '<'; + tagText.append(token); + tagText += '>'; + } + continue; + } + if (intoken) { //copy token + token += *from; + } + else if (!hide) { //copy text which is not inside a token + text += *from; + } + else tagText += *from; + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlstrongs.cpp b/src/modules/filters/thmlstrongs.cpp new file mode 100644 index 0000000..c1ab08c --- /dev/null +++ b/src/modules/filters/thmlstrongs.cpp @@ -0,0 +1,146 @@ +/****************************************************************************** + * + * thmlstrongs - SWFilter descendant to hide or show strongs number + * in a ThML module. + */ + + +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Strong's Numbers"; +const char oTip[] = "Toggles Strong's Numbers On and Off if they exist"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + +ThMLStrongs::ThMLStrongs() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +ThMLStrongs::~ThMLStrongs() { +} + + +char ThMLStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + char token[2048]; // cheese. Fix. + const char *from; + int tokpos = 0; + bool intoken = false; + bool lastspace = false; + int word = 1; + char val[128]; + char wordstr[5]; + char *valto; + char *ch; + unsigned int textStart = 0, textEnd = 0; + SWBuf tmp; + bool newText = false; + + SWBuf orig = text; + from = orig.c_str(); + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + textEnd = text.length(); + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if (!strnicmp(token, "sync type=\"Strongs\" ", 20)) { // Strongs + if (module->isProcessEntryAttributes()) { + valto = val; + for (unsigned int i = 27; token[i] != '\"' && i < 150; i++) + *valto++ = token[i]; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + // normal strongs number + sprintf(wordstr, "%03d", word); + module->getEntryAttributes()["Word"][wordstr]["PartCount"] = "1"; + module->getEntryAttributes()["Word"][wordstr]["Lemma"] = val; + module->getEntryAttributes()["Word"][wordstr]["LemmaClass"] = "strong"; + tmp = ""; + tmp.append(text.c_str()+textStart, (int)(textEnd - textStart)); + module->getEntryAttributes()["Word"][wordstr]["Text"] = tmp; + newText = true; + } + else { +/* + // verb morph + sprintf(wordstr, "%03d", word); + module->getEntryAttributes()["Word"][wordstr]["Morph"] = val; + module->getEntryAttributes()["Word"][wordstr]["MorphClass"] = "OLBMorph"; +*/ + word--; // for now, completely ignore this word attribute. + } + word++; + } + + if (!option) { // if we don't want strongs + if ((from[1] == ' ') || (from[1] == ',') || (from[1] == ';') || (from[1] == '.') || (from[1] == '?') || (from[1] == '!') || (from[1] == ')') || (from[1] == '\'') || (from[1] == '\"')) { + if (lastspace) + text--; + } + if (newText) {textStart = text.length(); newText = false; } + continue; + } + } + if (module->isProcessEntryAttributes()) { + if (!strncmp(token, "sync type=\"morph\"", 17)) { + for (ch = token+17; *ch; ch++) { + if (!strncmp(ch, "class=\"", 7)) { + valto = val; + for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++) + *valto++ = ch[i]; + *valto = 0; + sprintf(wordstr, "%03d", word-1); + if ((!stricmp(val, "Robinsons")) || (!stricmp(val, "Robinson"))) { + strcpy(val, "robinson"); + } + module->getEntryAttributes()["Word"][wordstr]["MorphClass"] = val; + } + if (!strncmp(ch, "value=\"", 7)) { + valto = val; + for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++) + *valto++ = ch[i]; + *valto = 0; + sprintf(wordstr, "%03d", word-1); + module->getEntryAttributes()["Word"][wordstr]["Morph"] = val; + } + } + newText = true; + } + } + // if not a strongs token, keep token in text + text += '<'; + text += token; + text += '>'; + if (newText) {textStart = text.length(); newText = false; } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else { + text += *from; + lastspace = (*from == ' '); + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlvariants.cpp b/src/modules/filters/thmlvariants.cpp new file mode 100644 index 0000000..49f9b65 --- /dev/null +++ b/src/modules/filters/thmlvariants.cpp @@ -0,0 +1,118 @@ +/****************************************************************************** + * + * thmlvariants - SWFilter descendant to hide or show textual variants + * in a ThML module. + */ + + +#include +#include +#include + +SWORD_NAMESPACE_START + +const char ThMLVariants::primary[] = "Primary Reading"; +const char ThMLVariants::secondary[] = "Secondary Reading"; +const char ThMLVariants::all[] = "All Readings"; + +const char ThMLVariants::optName[] = "Textual Variants"; +const char ThMLVariants::optTip[] = "Switch between Textual Variants modes"; + + +ThMLVariants::ThMLVariants() { + option = false; + options.push_back(primary); + options.push_back(secondary); + options.push_back(all); +} + + +ThMLVariants::~ThMLVariants() { +} + +void ThMLVariants::setOptionValue(const char *ival) +{ + if (!stricmp(ival, primary)) option = 0; + else if (!stricmp(ival, secondary)) option = 1; + else option = 2; +} + +const char *ThMLVariants::getOptionValue() +{ + if (option == 0) { + return primary; + } + else if (option == 1) { + return secondary; + } + else { + return all; + } +} + +char ThMLVariants::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + if ( option == 0 || option == 1) { //we want primary or variant only + bool intoken = false; + bool hide = false; + bool invar = false; + + SWBuf token; + SWBuf orig = text; + const char *from = orig.c_str(); + + //we use a fixed comparision string to make sure the loop is as fast as the original two blocks with almost the same code + const char* variantCompareString = (option == 0) ? "div type=\"variant\" class=\"1\"" : "div type=\"variant\" class=\"2\""; + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + token = ""; + continue; + } + else if (*from == '>') { // process tokens + intoken = false; + + if ( !strncmp(token.c_str(), variantCompareString, 28)) { //only one of the variants, length of the two strings is 28 in both cases + invar = true; + hide = true; + continue; + } + if (!strncmp(token.c_str(), "div type=\"variant\"", 18)) { + invar = true; + continue; + } + if (!strncmp(token.c_str(), "/div", 4)) { + hide = false; + if (invar) { + invar = false; + continue; + } + } + if (!hide) { + text += '<'; + text.append(token); + text += '>'; + } + + continue; + } + if (intoken) { + token += *from; + } + else if (!hide) { + text += *from; + } + } + + } + + return 0; +} + + + + + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlwebif.cpp b/src/modules/filters/thmlwebif.cpp new file mode 100644 index 0000000..7428754 --- /dev/null +++ b/src/modules/filters/thmlwebif.cpp @@ -0,0 +1,103 @@ +/*************************************************************************** + ThMLWEBIF.cpp - ThML to HTML filter with hrefs + ------------------- + begin : 2001-09-03 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +ThMLWEBIF::ThMLWEBIF() : baseURL(""), passageStudyURL(baseURL + "passagestudy.jsp") { + //all's done in ThMLHTMLHREF +} + +bool ThMLWEBIF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + + if (!substituteToken(buf, token)) { // manually process if it wasn't a simple substitution + MyUserData *u = (MyUserData *)userData; + XMLTag tag(token); + SWBuf url; + if (!strcmp(tag.getName(), "sync")) { + const char* value = tag.getAttribute("value"); + url = value; + if ((url.length() > 1) && strchr("GH", url[0])) { + if (isdigit(url[1])) + url = url.c_str()+1; + } + + if(tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "morph")){ + buf += " ("; + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(url).c_str() ); + } + else { + if (value) { + value++; //skip leading G, H or T + //url = value; + } + + buf += " <"; + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(url).c_str() ); + } + + buf += value; + buf += ""; + + if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "morph")) { + buf += ") "; + } + else { + buf += "> "; + } + } + else if (!strcmp(tag.getName(), "scripRef")) { + if (tag.isEndTag()) { + if (u->inscriptRef) { // like "John 3:16" + u->inscriptRef = false; + buf += ""; + } + else { // end of scripRef like "John 3:16" + url = u->lastTextNode; + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(url).c_str()); + buf += u->lastTextNode.c_str(); + buf += ""; + + // let's let text resume to output again + u->suspendTextPassThru = false; + } + } + else if (tag.getAttribute("passage")) { //passage given + u->inscriptRef = true; + + buf.appendFormatted("", passageStudyURL.c_str(), URL::encode(tag.getAttribute("passage")).c_str()); + } + else { //no passage given + u->inscriptRef = false; + // let's stop text from going to output + u->suspendTextPassThru = true; + } + } + else { + return ThMLHTMLHREF::handleToken(buf,token,userData); + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/thmlwordjs.cpp b/src/modules/filters/thmlwordjs.cpp new file mode 100644 index 0000000..ad8eef0 --- /dev/null +++ b/src/modules/filters/thmlwordjs.cpp @@ -0,0 +1,296 @@ +/****************************************************************************** + * + * thmlstrongs - SWFilter descendant to hide or show strongs number + * in a ThML module. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Word Javascript"; +const char oTip[] = "Toggles Word Javascript data"; + +const SWBuf choices[3] = {"Off", "On", ""}; +const StringList oValues(&choices[0], &choices[2]); + + +ThMLWordJS::ThMLWordJS() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); + + defaultGreekLex = 0; + defaultHebLex = 0; + defaultGreekParse = 0; + defaultHebParse = 0; + mgr = 0; +} + + +ThMLWordJS::~ThMLWordJS() { +} + + +char ThMLWordJS::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (option) { + char token[2112]; // cheese. Fix. + int tokpos = 0; + bool intoken = false; + bool lastspace = false; + int word = 1; + char val[128]; + char *valto; + char *ch; + char wordstr[5]; + unsigned int textStart = 0, lastAppendLen = 0, textEnd = 0; + SWBuf tmp; + bool newText = false; + bool needWordOut = false; + AttributeValue *wordAttrs = 0; + SWBuf modName = (module)?module->Name():""; + SWBuf wordSrcPrefix = modName; + + const SWBuf orig = text; + const char * from = orig.c_str(); + VerseKey *vkey = 0; + if (key) { + vkey = SWDYNAMIC_CAST(VerseKey, key); + } + + for (text = ""; *from; from++) { + if (*from == '<') { + intoken = true; + tokpos = 0; + token[0] = 0; + token[1] = 0; + token[2] = 0; + textEnd = text.length(); + continue; + } + if (*from == '>') { // process tokens + intoken = false; + if (!strnicmp(token, "sync type=\"Strongs\" ", 20)) { // Strongs + valto = val; + for (unsigned int i = 27; token[i] != '\"' && i < 150; i++) + *valto++ = token[i]; + *valto = 0; + if (atoi((!isdigit(*val))?val+1:val) < 5627) { + // normal strongs number + sprintf(wordstr, "%03d", word++); + needWordOut = (word > 2); + wordAttrs = &(module->getEntryAttributes()["Word"][wordstr]); + (*wordAttrs)["Strongs"] = val; + //printf("Adding: [\"Word\"][%s][\"Strongs\"] = %s\n", wordstr, val); + tmp = ""; + tmp.append(text.c_str()+textStart, (int)(textEnd - textStart)); + (*wordAttrs)["Text"] = tmp; + text.append(""); + SWBuf ts; + ts.appendFormatted("%d", textStart); + (*wordAttrs)["TextStart"] = ts; + //printf("Adding: [\"Word\"][%s][\"Text\"] = %s\n", wordstr, tmp.c_str()); + newText = true; + } + else { + // verb morph + (*wordAttrs)["Morph"] = val; + //printf("Adding: [\"Word\"][%s][\"Morph\"] = %s\n", wordstr, val); + } + + } + if (!strncmp(token, "sync type=\"morph\"", 17)) { + for (ch = token+17; *ch; ch++) { + if (!strncmp(ch, "class=\"", 7)) { + valto = val; + for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++) + *valto++ = ch[i]; + *valto = 0; + (*wordAttrs)["MorphClass"] = val; + //printf("Adding: [\"Word\"][%s][\"MorphClass\"] = %s\n", wordstr, val); + } + if (!strncmp(ch, "value=\"", 7)) { + valto = val; + for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++) + *valto++ = ch[i]; + *valto = 0; + (*wordAttrs)["Morph"] = val; + //printf("Adding: [\"Word\"][%s][\"Morph\"] = %s\n", wordstr, val); + } + } + newText = true; + } + // if not a strongs token, keep token in text + text += '<'; + text += token; + text += '>'; + if (needWordOut) { + char wstr[10]; + sprintf(wstr, "%03d", word-2); + AttributeValue *wAttrs = &(module->getEntryAttributes()["Word"][wstr]); + needWordOut = false; + SWBuf strong = (*wAttrs)["Strongs"]; + SWBuf morph = (*wAttrs)["Morph"]; + SWBuf morphClass = (*wAttrs)["MorphClass"]; + SWBuf wordText = (*wAttrs)["Text"]; + SWBuf textSt = (*wAttrs)["TextStart"]; + if (strong.size()) { + char gh = 0; + gh = isdigit(strong[0]) ? 0:strong[0]; + if (!gh) { + if (vkey) { + gh = vkey->Testament() ? 'H' : 'G'; + } + } + else strong << 1; + + SWModule *sLex = 0; + SWModule *sMorph = 0; + if (gh == 'G') { + sLex = defaultGreekLex; + sMorph = defaultGreekParse; + } + if (gh == 'H') { + sLex = defaultHebLex; + sMorph = defaultHebParse; + } + SWBuf lexName = ""; + if (sLex) { + // we can pass the real lex name in, but we have some + // aliases in the javascript to optimize bandwidth + lexName = sLex->Name(); + if (lexName == "StrongsGreek") + lexName = "G"; + if (lexName == "StrongsHebrew") + lexName = "H"; + } + SWBuf wordID; + if (vkey) { + // optimize for bandwidth and use only the verse as the unique entry id + wordID.appendFormatted("%d", vkey->Verse()); + } + else { + wordID = key->getText(); + } + for (unsigned int i = 0; i < wordID.size(); i++) { + if ((!isdigit(wordID[i])) && (!isalpha(wordID[i]))) { + wordID[i] = '_'; + } + } + wordID.appendFormatted("_%s%d", wordSrcPrefix.c_str(), atoi(wstr)); + if (textSt.size()) { + int textStr = atoi(textSt.c_str()); + textStr += lastAppendLen; + SWBuf spanStart = ""; + + + +/* + if (sMorph) { + SWBuf popMorph = "%s", sMorph->Name(), morph.c_str(), wordID.c_str(), morph.c_str()); + morph = popMorph; + } +*/ + + // 'p' = 'fillpop' to save bandwidth + const char *m = strchr(morph.c_str(), ':'); + if (m) m++; + else m = morph.c_str(); + spanStart.appendFormatted("", lexName.c_str(), strong.c_str(), wordID.c_str(), m, modName.c_str()); + text.insert(textStr, spanStart); + lastAppendLen = spanStart.length(); + } + } + + } + if (newText) { + textStart = text.length(); newText = false; + } + continue; + } + if (intoken) { + if (tokpos < 2045) + token[tokpos++] = *from; + token[tokpos+2] = 0; + } + else { + text += *from; + lastspace = (*from == ' '); + } + } + + char wstr[10]; + sprintf(wstr, "%03d", word-1); + AttributeValue *wAttrs = &(module->getEntryAttributes()["Word"][wstr]); + needWordOut = false; + SWBuf strong = (*wAttrs)["Strongs"]; + SWBuf morph = (*wAttrs)["Morph"]; + SWBuf morphClass = (*wAttrs)["MorphClass"]; + SWBuf wordText = (*wAttrs)["Text"]; + SWBuf textSt = (*wAttrs)["TextStart"]; + if (strong.size()) { + char gh = 0; + gh = isdigit(strong[0]) ? 0:strong[0]; + if (!gh) { + if (vkey) { + gh = vkey->Testament() ? 'H' : 'G'; + } + } + else strong << 1; + + SWModule *sLex = 0; + if (gh == 'G') { + sLex = defaultGreekLex; + } + if (gh == 'H') { + sLex = defaultHebLex; + } + SWBuf lexName = ""; + if (sLex) { + // we can pass the real lex name in, but we have some + // aliases in the javascript to optimize bandwidth + lexName = sLex->Name(); + if (lexName == "StrongsGreek") + lexName = "G"; + if (lexName == "StrongsHebrew") + lexName = "H"; + } + SWBuf wordID; + if (vkey) { + // optimize for bandwidth and use only the verse as the unique entry id + wordID.appendFormatted("%d", vkey->Verse()); + } + else { + wordID = key->getText(); + } + for (unsigned int i = 0; i < wordID.size(); i++) { + if ((!isdigit(wordID[i])) && (!isalpha(wordID[i]))) { + wordID[i] = '_'; + } + } + wordID.appendFormatted("_%s%d", wordSrcPrefix.c_str(), atoi(wstr)); + if (textSt.size()) { + int textStr = atoi(textSt.c_str()); + textStr += lastAppendLen; + SWBuf spanStart = ""; + // 'p' = 'fillpop' to save bandwidth + const char *m = strchr(morph.c_str(), ':'); + if (m) m++; + else m = morph.c_str(); + spanStart.appendFormatted("", lexName.c_str(), strong.c_str(), wordID.c_str(), m, modName.c_str()); + text.insert(textStr, spanStart); + } + } + } + + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/unicodertf.cpp b/src/modules/filters/unicodertf.cpp new file mode 100644 index 0000000..8c2a1f6 --- /dev/null +++ b/src/modules/filters/unicodertf.cpp @@ -0,0 +1,87 @@ +/****************************************************************************** + * + * unicodertf - SWFilter descendant to convert a double byte unicode file + * to RTF tags + */ + + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +UnicodeRTF::UnicodeRTF() { +} + + +char UnicodeRTF::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + const unsigned char *from; + char digit[10]; + unsigned long ch; + signed short utf16; + unsigned char from2[7]; + + SWBuf orig = text; + + from = (const unsigned char *)orig.c_str(); + + // ------------------------------- + for (text = ""; *from; from++) { + ch = 0; + //case: ANSI + if ((*from & 128) != 128) { + text += *from; + continue; + } + //case: Invalid UTF-8 (illegal continuing byte in initial position) + if ((*from & 128) && ((*from & 64) != 64)) { + continue; + } + //case: 2+ byte codepoint + from2[0] = *from; + from2[0] <<= 1; + int subsequent; + for (subsequent = 1; (from2[0] & 128) && (subsequent < 7); subsequent++) { + from2[0] <<= 1; + from2[subsequent] = from[subsequent]; + from2[subsequent] &= 63; + ch <<= 6; + ch |= from2[subsequent]; + } + subsequent--; + from2[0] <<= 1; + char significantFirstBits = 8 - (2+subsequent); + + ch |= (((short)from2[0]) << (((6*subsequent)+significantFirstBits)-8)); + from += subsequent; + if (ch < 0x10000) { + utf16 = (signed short)ch; + text += '\\'; + text += 'u'; + sprintf(digit, "%d", utf16); + text += digit; + text += '?'; + } + else { + utf16 = (signed short)((ch - 0x10000) / 0x400 + 0xD800); + text += '\\'; + text += 'u'; + sprintf(digit, "%d", utf16); + text += digit; + text += '?'; + utf16 = (signed short)((ch - 0x10000) % 0x400 + 0xDC00); + text += '\\'; + text += 'u'; + sprintf(digit, "%d", utf16); + text += digit; + text += '?'; + } + } + + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/utf16utf8.cpp b/src/modules/filters/utf16utf8.cpp new file mode 100644 index 0000000..ae0845f --- /dev/null +++ b/src/modules/filters/utf16utf8.cpp @@ -0,0 +1,90 @@ +/****************************************************************************** + * + * UTF16UTF8 - SWFilter descendant to convert UTF-16 to UTF-8 + * + */ + +#include +#include + +#include +#include + +SWORD_NAMESPACE_START + +UTF16UTF8::UTF16UTF8() { +} + + +char UTF16UTF8::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + unsigned short *from; + + int len; + unsigned long uchar; + unsigned short schar; + len = 0; + from = (unsigned short*) text.c_str(); + while (*from) { + len += 2; + from++; + } + + SWBuf orig = text; + from = (unsigned short*)orig.c_str(); + + + // ------------------------------- + + for (text = ""; *from; from++) { + uchar = 0; + + if (*from < 0xD800 || *from > 0xDFFF) { + uchar = *from; + } + else if (*from >= 0xD800 && *from <= 0xDBFF) { + uchar = *from; + schar = *(from+1); + if (uchar < 0xDC00 || uchar > 0xDFFF) { + //error, do nothing + continue; + } + uchar &= 0x03ff; + schar &= 0x03ff; + uchar <<= 10; + uchar |= schar; + uchar += 0x10000; + from++; + } + else { + //error, do nothing + continue; + } + + if (uchar < 0x80) { + text += uchar; + } + else if (uchar < 0x800) { + text += 0xc0 | (uchar >> 6); + text += 0x80 | (uchar & 0x3f); + } + else if (uchar < 0x10000) { + text += 0xe0 | (uchar >> 12); + text += 0x80 | ((uchar >> 6) & 0x3f); + text += 0x80 | (uchar & 0x3f); + } + else if (uchar < 0x200000) { + text += 0xF0 | (uchar >> 18); + text += 0x80 | ((uchar >> 12) & 0x3F); + text += 0x80 | ((uchar >> 6) & 0x3F); + text += 0x80 | (uchar & 0x3F); + } + } + + return 0; +} + + + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/utf8arshaping.cpp b/src/modules/filters/utf8arshaping.cpp new file mode 100644 index 0000000..702fb62 --- /dev/null +++ b/src/modules/filters/utf8arshaping.cpp @@ -0,0 +1,51 @@ +/****************************************************************************** +* +* utf8arshaping - SWFilter descendant to perform Arabic shaping on +* UTF-8 text +*/ + +#ifdef _ICU_ + +#include + +#include + +#include +#include + +SWORD_NAMESPACE_START + +UTF8arShaping::UTF8arShaping() { + conv = ucnv_open("UTF-8", &err); +} + +UTF8arShaping::~UTF8arShaping() { + ucnv_close(conv); +} + +char UTF8arShaping::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + UChar *ustr, *ustr2; + if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering + return -1; + + int32_t len = text.length(); + ustr = new UChar[len]; + ustr2 = new UChar[len]; + + // Convert UTF-8 string to UTF-16 (UChars) + len = ucnv_toUChars(conv, ustr, len, text.c_str(), -1, &err); + + len = u_shapeArabic(ustr, len, ustr2, len, U_SHAPE_LETTERS_SHAPE | U_SHAPE_DIGITS_EN2AN, &err); + + text.setSize(text.size()*2); + len = ucnv_fromUChars(conv, text.getRawData(), text.size(), ustr2, len, &err); + text.setSize(len); + + delete [] ustr2; + delete [] ustr; + return 0; +} + +SWORD_NAMESPACE_END +#endif diff --git a/src/modules/filters/utf8bidireorder.cpp b/src/modules/filters/utf8bidireorder.cpp new file mode 100644 index 0000000..783602c --- /dev/null +++ b/src/modules/filters/utf8bidireorder.cpp @@ -0,0 +1,60 @@ +/****************************************************************************** +* +* utf8cnormalizer - SWFilter descendant to perform reordering of UTF-8 +* text to visual order according to Unicode BiDi +*/ + +#ifdef _ICU_ + +#include + +#include + +#include +#include + +SWORD_NAMESPACE_START + +UTF8BiDiReorder::UTF8BiDiReorder() { + + conv = ucnv_open("UTF-8", &err); + +} + +UTF8BiDiReorder::~UTF8BiDiReorder() { + ucnv_close(conv); +} + +char UTF8BiDiReorder::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + UChar *ustr, *ustr2; + if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering + return -1; + + int32_t len = text.length(); + ustr = new UChar[len]; //each char could become a surrogate pair + + // Convert UTF-8 string to UTF-16 (UChars) + len = ucnv_toUChars(conv, ustr, len, text.c_str(), -1, &err); + ustr2 = new UChar[len]; + + UBiDi* bidi = ubidi_openSized(len + 1, 0, &err); + ubidi_setPara(bidi, ustr, len, UBIDI_DEFAULT_RTL, NULL, &err); + len = ubidi_writeReordered(bidi, ustr2, len, + UBIDI_DO_MIRRORING | UBIDI_REMOVE_BIDI_CONTROLS, &err); + ubidi_close(bidi); + +// len = ubidi_writeReverse(ustr, len, ustr2, len, +// UBIDI_DO_MIRRORING | UBIDI_REMOVE_BIDI_CONTROLS, &err); + + text.setSize(text.size()*2); + len = ucnv_fromUChars(conv, text.getRawData(), text.size(), ustr2, len, &err); + text.setSize(len); + + delete [] ustr2; + delete [] ustr; + return 0; +} + +SWORD_NAMESPACE_END +#endif diff --git a/src/modules/filters/utf8cantillation.cpp b/src/modules/filters/utf8cantillation.cpp new file mode 100644 index 0000000..6213620 --- /dev/null +++ b/src/modules/filters/utf8cantillation.cpp @@ -0,0 +1,55 @@ +/****************************************************************************** + * + * UTF8Cantillation - SWFilter descendant to remove UTF-8 Hebrew cantillation + * + */ + + +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Hebrew Cantillation"; +const char oTip[] = "Toggles Hebrew Cantillation Marks"; + +const SWBuf choices[3] = {"On", "Off", ""}; +const StringList oValues(&choices[0], &choices[2]); + +UTF8Cantillation::UTF8Cantillation() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("Off"); +} + + +UTF8Cantillation::~UTF8Cantillation(){}; + + +char UTF8Cantillation::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (!option) { + //The UTF-8 range 0xD6 0x90 to 0xD6 0xAF and 0xD7 0x84 consist of Hebrew cantillation marks so block those out. + SWBuf orig = text; + const unsigned char* from = (unsigned char*)orig.c_str(); + for (text = ""; *from; from++) { + if (*from != 0xD6) { + if (*from == 0xD7 && *(from + 1) == 0x84) { + from++; + } + else { + text += *from; + } + } + else if (*(from + 1) < 0x90 || *(from + 1) > 0xAF) { + text += *from; + from++; + text += *from; + } + else { + from++; + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/utf8greekaccents.cpp b/src/modules/filters/utf8greekaccents.cpp new file mode 100644 index 0000000..df85968 --- /dev/null +++ b/src/modules/filters/utf8greekaccents.cpp @@ -0,0 +1,261 @@ +/****************************************************************************** + * + * UTF8GreekAccents - SWFilter descendant to remove UTF-8 Greek accents + * + */ + + +#include +#include +#include + + +#ifdef _ICU_ +#include +sword::UTF8NFKD decompose; +#endif + +SWORD_NAMESPACE_START + +const char oName[] = "Greek Accents"; +const char oTip[] = "Toggles Greek Accents"; + +const SWBuf choices[3] = {"On", "Off", ""}; +const StringList oValues(&choices[0], &choices[2]); + +UTF8GreekAccents::UTF8GreekAccents() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("On"); +} + +UTF8GreekAccents::~UTF8GreekAccents(){}; + + +char UTF8GreekAccents::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + + if (!option) { //we don't want greek accents + //unsigned char *to, *from; + //to = (unsigned char*)text; + //for (from = (unsigned char*)text; *from; from++) { +#ifdef _ICU_ + decompose.processText(text, (SWKey *)2); // note the hack of 2 to mimic a real key. TODO: remove all hacks +#endif + + SWBuf orig = text; + const unsigned char* from = (unsigned char*)orig.c_str(); + for (text = ""; *from; from++) { + //first just remove combining characters + if (*from == 0xE2 && *(from + 1) == 0x80 && *(from + 2) == 0x99) { + from += 2; + } + else if (*from == 0xCC && *(from + 1)) { + if (*(from + 1) == 0x80 || *(from + 1) == 0x81 || *(from + 1) == 0x82 || *(from + 1) == 0x88 || *(from + 1) == 0x93 || *(from + 1) == 0x94) { + from++; + } + } + else if (*from == 0xCD && (*(from + 1) == 0xBA || *(from + 1) == 0x82)) { + from++; + } + //now converted pre-composed characters to their alphabetic bases, discarding the accents + + //Greek + //capital alpha + else if ((*from == 0xCE && *(from + 1) == 0x86)) { + text += 0xCE; + text += 0x91; + from++; + } + //capital epsilon + else if ((*from == 0xCE && *(from + 1) == 0x88)) { + text += 0xCE; + text += 0x95; + from++; + } + //capital eta + else if ((*from == 0xCE && *(from + 1) == 0x89)) { + text += 0xCE; + text += 0x97; + from++; + } + //capital iota + else if ((*from == 0xCE && (*(from + 1) == 0x8A || *(from + 1) == 0xAA))) { + text += 0xCE; + text += 0x99; + from++; + } + //capital omicron + else if ((*from == 0xCE && *(from + 1) == 0x8C)) { + text += 0xCE; + text += 0x9F; + from++; + } + //capital upsilon + else if ((*from == 0xCE && (*(from + 1) == 0x8E || *(from + 1) == 0xAB))) { + text += 0xCE; + text += 0xA5; + from++; + } + //capital omega + else if ((*from == 0xCE && *(from + 1) == 0x8F)) { + text += 0xCE; + text += 0xA9; + from++; + } + + //alpha + else if ((*from == 0xCE && *(from + 1) == 0xAC)) { + text += 0xCE; + text += 0xB1; + from++; + } + //epsilon + else if ((*from == 0xCE && *(from + 1) == 0xAD)) { + text += 0xCE; + text += 0xB5; + from++; + } + //eta + else if ((*from == 0xCE && *(from + 1) == 0xAE)) { + text += 0xCE; + text += 0xB7; + from++; + } + //iota + else if ((*from == 0xCE && *(from + 1) == 0xAF) || (*from == 0xCF && *(from + 1) == 0x8A)) { + text += 0xCE; + text += 0xB9; + from++; + } + //omicron + else if ((*from == 0xCF && *(from + 1) == 0x8C)) { + text += 0xCE; + text += 0xBF; + from++; + } + //upsilon + else if ((*from == 0xCE && *(from + 1) == 0x88) || (*from == 0xCF && (*(from + 1) == 0x8B || *(from + 1) == 0x8D))) { + text += 0xCF; + text += 0x85; + from++; + } + //omega + else if ((*from == 0xCF && *(from + 1) == 0x8E)) { + text += 0xCF; + text += 0x89; + from++; + } + + //Extended Greek + //capital alpha + else if (*from == 0xE1 && (((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x88 && *(from + 2) <= 0x8F) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBC))) { + text += 0xCE; + text += 0x91; + from+=2; + } + //capital epsilon + else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0x98 && *(from + 2) <= 0x9D) || (*(from + 1) == 0xBF && (*(from + 2) == 0x88 || *(from + 2) == 0x89)))) { + text += 0xCE; + text += 0x95; + from+=2; + } + //capital eta + else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAF) || (*(from + 1) == 0xBE && *(from + 2) >= 0x98 && *(from + 2) <= 0x9F) || (*(from + 1) == 0xBF && *(from + 2) >= 0x8A && *(from + 2) <= 0x8C))) { + text += 0xCE; + text += 0x97; + from+=2; + } + //capital iota + else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBF) || (*(from + 1) == 0xBF && *(from + 2) >= 0x98 && *(from + 2) <= 0x9B))) { + text += 0xCE; + text += 0x99; + from+=2; + } + //capital omicron + else if (*from == 0xE1 && (((*(from + 1) == 0xBD && *(from + 2) >= 0x88 && *(from + 2) <= 0x8D)) || ((*(from + 1) == 0xBF && (*(from + 2) == 0xB8 || *(from + 2) == 0xB9))))) { + text += 0xCE; + text += 0x9F; + from+=2; + } + //capital upsilon + else if (*from == 0xE1 && ((*(from + 1) == 0xBD && *(from + 2) >= 0x99 && *(from + 2) <= 0x9F) || (*(from + 1) == 0xBF && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAB))) { + text += 0xCE; + text += 0xA5; + from+=2; + } + //capital omega + else if (*from == 0xE1 && (((*(from + 1) == 0xBD || *(from + 1) == 0xBE) && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAF) || (*(from + 1) == 0xBF && *(from + 2) >= 0xBA && *(from + 2) <= 0xBC))) { + text += 0xCE; + text += 0xA9; + from+=2; + } + //capital rho + else if (*from == 0xE1 && *(from + 1) == 0xBF && *(from + 2) == 0xAC) { + text += 0xCE; + text += 0xA1; + from+=2; + } + + //alpha + else if (*from == 0xE1 && ( + ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x80 && *(from + 2) <= 0x87) + || (*(from + 1) == 0xBD && (*(from + 2) == 0xB0 || *(from + 2) == 0xB1)) + || (*(from + 1) == 0xBE && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7))) { + text += 0xCE; + text += 0xB1; + from+=2; + } + //epsilon + else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0x90 && *(from + 2) <= 0x95) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB2 || *(from + 2) == 0xB3)))) { + text += 0xCE; + text += 0xB5; + from+=2; + } + //eta + else if (*from == 0xE1 && ((*(from + 1) == 0xBE && *(from + 2) >= 0x90 && *(from + 2) <= 0x97) || (*(from + 1) == 0xBC && *(from + 2) >= 0xA0 && *(from + 2) <= 0xA7) || (*(from + 1) == 0xBF && *(from + 2) >= 0x82 && *(from + 2) <= 0x87) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB4 || *(from + 2) == 0xB5)))) { + text += 0xCE; + text += 0xB7; + from+=2; + } + //iota + else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB6 || *(from + 2) == 0xB7)) || (*(from + 1) == 0xBF && *(from + 2) >= 0x90 && *(from + 2) <= 0x97))) { + text += 0xCE; + text += 0xB9; + from+=2; + } + //omicron + else if (*from == 0xE1 && (*(from + 1) == 0xBD && ((*(from + 2) >= 0x80 && *(from + 2) <= 0x85) || (*(from + 2) == 0xB8 || *(from + 2) == 0xB9)))) { + text += 0xCE; + text += 0xBF; + from+=2; + } + //upsilon + else if (*from == 0xE1 && ((*(from + 1) == 0xBD && ((*(from + 2) >= 0x90 && *(from + 2) <= 0x97) || *(from + 2) == 0xBA || *(from + 2) == 0xBB)) || (*(from + 1) == 0xBF && ((*(from + 2) >= 0xA0 && *(from + 2) <= 0xA3) || *(from + 2) == 0xA6 || *(from + 2) == 0xA7)))) { + text += 0xCF; + text += 0x85; + from+=2; + } + //omega + else if (*from == 0xE1 && ((*(from + 1) == 0xBD && ((*(from + 2) >= 0xA0 && *(from + 2) <= 0xA7) || (*(from + 2) == 0xBC || *(from + 2) == 0xBD))) || (*(from + 1) == 0xBE && (*(from + 2) >= 0xA0 && *(from + 2) <= 0xA7)) || (*(from + 1) == 0xBF && *(from + 2) >= 0xB2 && *(from + 2) <= 0xB7))) { + text += 0xCF; + text += 0x89; + from+=2; + } + //rho + else if (*from == 0xE1 && *(from + 1) == 0xBF && (*(from + 2) == 0xA4 && *(from + 2) == 0xA5)) { + text += 0xCF; + text += 0x81; + from+=2; + } + else { //no characters we filter + text += *from; + } + } + } + return 0; +} + + + + + + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/utf8hebrewpoints.cpp b/src/modules/filters/utf8hebrewpoints.cpp new file mode 100644 index 0000000..0476db8 --- /dev/null +++ b/src/modules/filters/utf8hebrewpoints.cpp @@ -0,0 +1,44 @@ +/****************************************************************************** + * + * UTF8HebrewPoints - SWFilter descendant to remove UTF-8 Hebrew vowel points + * + */ + + +#include +#include +#include + +SWORD_NAMESPACE_START + +const char oName[] = "Hebrew Vowel Points"; +const char oTip[] = "Toggles Hebrew Vowel Points"; + +const SWBuf choices[3] = {"On", "Off", ""}; +const StringList oValues(&choices[0], &choices[2]); + +UTF8HebrewPoints::UTF8HebrewPoints() : SWOptionFilter(oName, oTip, &oValues) { + setOptionValue("On"); +} + +UTF8HebrewPoints::~UTF8HebrewPoints(){}; + + +char UTF8HebrewPoints::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + if (!option) { + //The UTF-8 range 0xD6 0xB0 to 0xD6 0xBF excluding 0xD6 0x consist of Hebrew cantillation marks so block those out. + SWBuf orig = text; + const unsigned char* from = (unsigned char*)orig.c_str(); + for (text = ""; *from; from++) { + if ((*from == 0xD6) && (*(from + 1) >= 0xB0 && *(from + 1) <= 0xBF) && (*(from + 1) != 0xBE)) { + from++; + } + else { + text += *from; + } + } + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/utf8html.cpp b/src/modules/filters/utf8html.cpp new file mode 100644 index 0000000..088f669 --- /dev/null +++ b/src/modules/filters/utf8html.cpp @@ -0,0 +1,70 @@ +/****************************************************************************** + * + * utf8html - SWFilter descendant to convert a UTF-8 stream to HTML escapes + * + */ + + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +UTF8HTML::UTF8HTML() { +} + + +char UTF8HTML::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + unsigned char *from; + int len; + char digit[10]; + unsigned long ch; + if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering + return (char)-1; + + len = strlen(text.c_str()) + 2; // shift string to right of buffer + + SWBuf orig = text; + from = (unsigned char *)orig.c_str(); + + // ------------------------------- + for (text = ""; *from; from++) { + ch = 0; + if ((*from & 128) != 128) { +// if (*from != ' ') + text += *from; + continue; + } + if ((*from & 128) && ((*from & 64) != 64)) { + // error + *from = 'x'; + continue; + } + *from <<= 1; + int subsequent; + for (subsequent = 1; (*from & 128); subsequent++) { + *from <<= 1; + from[subsequent] &= 63; + ch <<= 6; + ch |= from[subsequent]; + } + subsequent--; + *from <<=1; + char significantFirstBits = 8 - (2+subsequent); + + ch |= (((short)*from) << (((6*subsequent)+significantFirstBits)-8)); + from += subsequent; + text += '&'; + text += '#'; + sprintf(digit, "%ld", ch); + for (char *dig = digit; *dig; dig++) + text += *dig; + text += ';'; + } + return 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/filters/utf8latin1.cpp b/src/modules/filters/utf8latin1.cpp new file mode 100644 index 0000000..08b288d --- /dev/null +++ b/src/modules/filters/utf8latin1.cpp @@ -0,0 +1,75 @@ +/****************************************************************************** + * + * UTF8Latin1 - SWFilter descendant to convert UTF-8 to Latin-1 + * + */ + +#include +#include + +#include +#include + +SWORD_NAMESPACE_START + +UTF8Latin1::UTF8Latin1(char rchar) : replacementChar(rchar) { +} + + +char UTF8Latin1::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + unsigned char *from; + + int len; + unsigned long uchar; + unsigned char significantFirstBits, subsequent; + + if ((unsigned long)key < 2) {// hack, we're en(1)/de(0)ciphering + return (char)-1; + } + len = strlen(text.c_str()) + 1; // shift string to right of buffer + + SWBuf orig = text; + from = (unsigned char*)orig.c_str(); + + + // ------------------------------- + + for (text = ""; *from; from++) { + uchar = 0; + if ((*from & 128) != 128) { + // if (*from != ' ') + uchar = *from; + } + else if ((*from & 128) && ((*from & 64) != 64)) { + // error, do nothing + continue; + } + else { + *from <<= 1; + for (subsequent = 1; (*from & 128); subsequent++) { + *from <<= 1; + from[subsequent] &= 63; + uchar <<= 6; + uchar |= from[subsequent]; + } + subsequent--; + *from <<=1; + significantFirstBits = 8 - (2+subsequent); + + uchar |= (((short)*from) << (((6*subsequent)+significantFirstBits)-8)); + from += subsequent; + } + + if (uchar < 0xff) { + text += (unsigned char)uchar; + } + else { + text += replacementChar; + } + } + return 0; +} + +SWORD_NAMESPACE_END + diff --git a/src/modules/filters/utf8nfc.cpp b/src/modules/filters/utf8nfc.cpp new file mode 100644 index 0000000..15b76b5 --- /dev/null +++ b/src/modules/filters/utf8nfc.cpp @@ -0,0 +1,50 @@ +/****************************************************************************** +* +* utf8nfc - SWFilter descendant to perform NFC (canonical composition +* normalization) on UTF-8 text +*/ + +#ifdef _ICU_ + +#include + +#include +#include +#include +#include + +#include +#include + +SWORD_NAMESPACE_START + +UTF8NFC::UTF8NFC() { + conv = ucnv_open("UTF-8", &err); +} + +UTF8NFC::~UTF8NFC() { + ucnv_close(conv); +} + +char UTF8NFC::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering + return -1; + + UErrorCode status = U_ZERO_ERROR; + UnicodeString source(text.getRawData(), text.length(), conv, status); + UnicodeString target; + + status = U_ZERO_ERROR; + Normalizer::normalize(source, UNORM_NFC, 0, target, status); + + status = U_ZERO_ERROR; + text.setSize(text.size()*2); // potentially, it can grow to 2x the original size + int32_t len = target.extract(text.getRawData(), text.size(), conv, status); + text.setSize(len); + + return 0; +} + +SWORD_NAMESPACE_END +#endif diff --git a/src/modules/filters/utf8nfkd.cpp b/src/modules/filters/utf8nfkd.cpp new file mode 100644 index 0000000..a19d36b --- /dev/null +++ b/src/modules/filters/utf8nfkd.cpp @@ -0,0 +1,52 @@ +/****************************************************************************** +* +* utf8nfkd - SWFilter descendant to perform NFKD (compatability decomposition +* normalization) on UTF-8 text +*/ + +#ifdef _ICU_ + +#include + +#include + +#include +#include + +SWORD_NAMESPACE_START + +UTF8NFKD::UTF8NFKD() { + conv = ucnv_open("UTF-8", &err); +} + +UTF8NFKD::~UTF8NFKD() { + ucnv_close(conv); +} + +char UTF8NFKD::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering + return -1; + + int32_t len = 5 + text.length() * 5; + source = new UChar[len + 1]; //each char could become a surrogate pair + + // Convert UTF-8 string to UTF-16 (UChars) + int32_t ulen = ucnv_toUChars(conv, source, len, text.c_str(), -1, &err); + target = new UChar[len + 1]; + + //compatability decomposition + ulen = unorm_normalize(source, ulen, UNORM_NFKD, 0, target, len, &err); + + text.setSize(len); + len = ucnv_fromUChars(conv, text.getRawData(), len, target, ulen, &err); + text.setSize(len); + + delete [] source; + delete [] target; + + return 0; +} + +SWORD_NAMESPACE_END +#endif diff --git a/src/modules/filters/utf8transliterator.cpp b/src/modules/filters/utf8transliterator.cpp new file mode 100644 index 0000000..d99741b --- /dev/null +++ b/src/modules/filters/utf8transliterator.cpp @@ -0,0 +1,888 @@ +/****************************************************************************** +* +* utf8transliterators - SWFilter descendant to transliterate between +* ICU-supported scripts. +*/ + +#ifdef _ICU_ + +#include + +#include + +#include +#include +#include +#include + +#ifndef _ICUSWORD_ +#include "unicode/resbund.h" +#endif +#include + +SWORD_NAMESPACE_START + +const char UTF8Transliterator::optionstring[NUMTARGETSCRIPTS][16] = { + "Off", + "Latin", + "IPA", + "Basic Latin", + "SBL", + "TC", + "Beta", + "BGreek", + "SERA", + "Hugoye", + "UNGEGN", + "ISO", + "ALA-LC", + "BGN-PCGN", + "Greek", + "Hebrew", + "Cyrillic", + "Arabic", + "Syriac", + "Katakana", + "Hiragana", + "Hangul", + "Devanagari", + "Tamil", + "Bengali", + "Gurmukhi", + "Gujarati", + "Oriya", + "Telugu", + "Kannada", + "Malayalam", + "Thai", + "Georgian", + "Armenian", + "Ethiopic", + "Gothic", + "Ugaritic", + "Coptic", + "Meroitic", + "Linear B", + "Cypriot", + "Runic", + "Ogham", + "Thaana", + "Glagolitic", +// "Tengwar", +// "Cirth" +}; + +const char UTF8Transliterator::optName[] = "Transliteration"; +const char UTF8Transliterator::optTip[] = "Transliterates between scripts"; + +SWTransMap UTF8Transliterator::transMap; + +#ifndef _ICUSWORD_ + +const char UTF8Transliterator::SW_RB_RULE_BASED_IDS[] = "RuleBasedTransliteratorIDs"; +const char UTF8Transliterator::SW_RB_RULE[] = "Rule"; +#ifdef SWICU_DATA +const char UTF8Transliterator::SW_RESDATA[] = SWICU_DATA; +#else +const char UTF8Transliterator::SW_RESDATA[] = "/usr/local/lib/sword/"; +#endif + +class SWCharString { + public: + inline SWCharString(const UnicodeString& str); + inline ~SWCharString(); + inline operator const char*() { return ptr; } + private: + char buf[128]; + char* ptr; +}; +SWCharString::SWCharString(const UnicodeString& str) { + // TODO This isn't quite right -- we should probably do + // preflighting here to determine the real length. + if (str.length() >= (int32_t)sizeof(buf)) { + ptr = new char[str.length() + 8]; + } else { + ptr = buf; + } + str.extract(0, 0x7FFFFFFF, ptr, ""); +} + +SWCharString::~SWCharString() { + if (ptr != buf) { + delete[] ptr; + } +} + +#endif // _ICUSWORD_ + + +UTF8Transliterator::UTF8Transliterator() { + option = 0; + unsigned long i; + for (i = 0; i < NUMTARGETSCRIPTS; i++) { + options.push_back(optionstring[i]); + } +#ifndef _ICUSWORD_ + utf8status = U_ZERO_ERROR; + Load(utf8status); +#endif +} + +void UTF8Transliterator::Load(UErrorCode &status) +{ +#ifndef _ICUSWORD_ + static const char translit_swordindex[] = "translit_swordindex"; + + UResourceBundle *bundle = 0, *transIDs = 0, *colBund = 0; + bundle = ures_openDirect(SW_RESDATA, translit_swordindex, &status); + if (U_FAILURE(status)) { + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: no resource index to load"); + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: status %s", u_errorName(status)); + return; + } + + transIDs = ures_getByKey(bundle, SW_RB_RULE_BASED_IDS, 0, &status); + //UParseError parseError; + + int32_t row, maxRows; + if (U_SUCCESS(status)) { + maxRows = ures_getSize(transIDs); + for (row = 0; row < maxRows; row++) { + colBund = ures_getByIndex(transIDs, row, 0, &status); + + if (U_SUCCESS(status) && ures_getSize(colBund) == 4) { + UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status); + UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0); + UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status); + SWLog::getSystemLog()->logDebug("ok so far"); + + if (U_SUCCESS(status)) { + switch (type) { + case 0x66: // 'f' + case 0x69: // 'i' + // 'file' or 'internal'; + // row[2]=resource, row[3]=direction + { + //UBool visible = (type == 0x0066 /*f*/); + UTransDirection dir = + (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) == + 0x0046 /*F*/) ? + UTRANS_FORWARD : UTRANS_REVERSE; + //registry->put(id, resString, dir, visible); + SWLog::getSystemLog()->logDebug("instantiating %s ...", resString.getBuffer()); + registerTrans(id, resString, dir, status); + SWLog::getSystemLog()->logDebug("done."); + } + break; + case 0x61: // 'a' + // 'alias'; row[2]=createInstance argument + //registry->put(id, resString, TRUE); + break; + } + } + else SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: Failed to get resString"); + } + else SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: Failed to get row"); + ures_close(colBund); + } + } + else + { + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: no resource index to load"); + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: status %s", u_errorName(status)); + } + + ures_close(transIDs); + ures_close(bundle); + +#endif // _ICUSWORD_ +} + +void UTF8Transliterator::registerTrans(const UnicodeString& ID, const UnicodeString& resource, + UTransDirection dir, UErrorCode &status ) +{ +#ifndef _ICUSWORD_ + SWLog::getSystemLog()->logDebug("registering ID locally %s", ID.getBuffer()); + SWTransData swstuff; + swstuff.resource = resource; + swstuff.dir = dir; + SWTransPair swpair; + swpair.first = ID; + swpair.second = swstuff; + transMap.insert(swpair); +#endif +} + +bool UTF8Transliterator::checkTrans(const UnicodeString& ID, UErrorCode &status ) +{ +#ifndef _ICUSWORD_ + Transliterator *trans = Transliterator::createInstance(ID, UTRANS_FORWARD, status); + if (!U_FAILURE(status)) + { + // already have it, clean up and return true + SWLog::getSystemLog()->logDebug("already have it %s", ID.getBuffer()); + delete trans; + return true; + } + status = U_ZERO_ERROR; + + SWTransMap::iterator swelement; + if ((swelement = transMap.find(ID)) != transMap.end()) + { + SWLog::getSystemLog()->logDebug("found element in map"); + SWTransData swstuff = (*swelement).second; + UParseError parseError; + //UErrorCode status; + //std::cout << "unregistering " << ID << std::endl; + //Transliterator::unregister(ID); + SWLog::getSystemLog()->logDebug("resource is %s", swstuff.resource.getBuffer()); + + // Get the rules + //std::cout << "importing: " << ID << ", " << resource << std::endl; + SWCharString ch(swstuff.resource); + UResourceBundle *bundle = ures_openDirect(SW_RESDATA, ch, &status); + const UnicodeString rules = ures_getUnicodeStringByKey(bundle, SW_RB_RULE, &status); + ures_close(bundle); + //parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD, + // parseError, status); + if (U_FAILURE(status)) { + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: Failed to get rules"); + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: status %s", u_errorName(status)); + return false; + } + + + Transliterator *trans = Transliterator::createFromRules(ID, rules, swstuff.dir, + parseError,status); + if (U_FAILURE(status)) { + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: Failed to create transliterator"); + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: status %s", u_errorName(status)); + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: Parse error: line %s", parseError.line); + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: Parse error: offset %d", parseError.offset); + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: Parse error: preContext %s", *parseError.preContext); + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: Parse error: postContext %s", *parseError.postContext); + SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: rules were"); +// SWLog::getSystemLog()->logError((const char *)rules); + return false; + } + + Transliterator::registerInstance(trans); + return true; + + //Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status); + //return trans; + } + else + { + return false; + } +#else +return true; +#endif // _ICUSWORD_ +} + +bool UTF8Transliterator::addTrans(const char* newTrans, SWBuf* transList) { +#ifdef _ICUSWORD_ + UErrorCode status; + if (checkTrans(UnicodeString(newTrans), status)) { +#endif + *transList += newTrans; + *transList += ";"; + return true; +#ifdef _ICUSWORD_ + } + else { + return false; + } +#endif +} + +Transliterator * UTF8Transliterator::createTrans(const UnicodeString& ID, UTransDirection dir, UErrorCode &status ) +{ + Transliterator *trans = Transliterator::createInstance(ID,UTRANS_FORWARD,status); + if (U_FAILURE(status)) { + delete trans; + return NULL; + } + else { + return trans; + } +} + +void UTF8Transliterator::setOptionValue(const char *ival) +{ + unsigned char i = option = NUMTARGETSCRIPTS; + while (i && stricmp(ival, optionstring[i])) { + i--; + option = i; + } +} + +const char *UTF8Transliterator::getOptionValue() +{ + return (NUMTARGETSCRIPTS > option) ? optionstring[option] : 0; +} + +char UTF8Transliterator::processText(SWBuf &text, const SWKey *key, const SWModule *module) +{ + if (option) { // if we want transliteration + unsigned long i, j; + UErrorCode err = U_ZERO_ERROR; + UConverter * conv = NULL; + conv = ucnv_open("UTF-8", &err); + SWBuf ID; + + bool compat = false; + + // Convert UTF-8 string to UTF-16 (UChars) + j = strlen(text); + int32_t len = (j * 2) + 1; + UChar *source = new UChar[len]; + err = U_ZERO_ERROR; + len = ucnv_toUChars(conv, source, len, text, j, &err); + source[len] = 0; + + // Figure out which scripts are used in the string + unsigned char scripts[NUMSCRIPTS]; + + for (i = 0; i < NUMSCRIPTS; i++) { + scripts[i] = false; + } + + for (i = 0; i < (unsigned long)len; i++) { + j = ublock_getCode(source[i]); + scripts[SE_LATIN] = true; + switch (j) { + //case UBLOCK_BASIC_LATIN: scripts[SE_LATIN] = true; break; + case UBLOCK_GREEK: scripts[SE_GREEK] = true; break; + case UBLOCK_HEBREW: scripts[SE_HEBREW] = true; break; + case UBLOCK_CYRILLIC: scripts[SE_CYRILLIC] = true; break; + case UBLOCK_ARABIC: scripts[SE_ARABIC] = true; break; + case UBLOCK_SYRIAC: scripts[SE_SYRIAC] = true; break; + case UBLOCK_KATAKANA: scripts[SE_KATAKANA] = true; break; + case UBLOCK_HIRAGANA: scripts[SE_HIRAGANA] = true; break; + case UBLOCK_HANGUL_SYLLABLES: scripts[SE_HANGUL] = true; break; + case UBLOCK_HANGUL_JAMO: scripts[SE_JAMO] = true; break; + case UBLOCK_DEVANAGARI: scripts[SE_DEVANAGARI] = true; break; + case UBLOCK_TAMIL: scripts[SE_TAMIL] = true; break; + case UBLOCK_BENGALI: scripts[SE_BENGALI] = true; break; + case UBLOCK_GURMUKHI: scripts[SE_GURMUKHI] = true; break; + case UBLOCK_GUJARATI: scripts[SE_GUJARATI] = true; break; + case UBLOCK_ORIYA: scripts[SE_ORIYA] = true; break; + case UBLOCK_TELUGU: scripts[SE_TELUGU] = true; break; + case UBLOCK_KANNADA: scripts[SE_KANNADA] = true; break; + case UBLOCK_MALAYALAM: scripts[SE_MALAYALAM] = true; break; + case UBLOCK_THAI: scripts[SE_THAI] = true; break; + case UBLOCK_GEORGIAN: scripts[SE_GEORGIAN] = true; break; + case UBLOCK_ARMENIAN: scripts[SE_ARMENIAN] = true; break; + case UBLOCK_ETHIOPIC: scripts[SE_ETHIOPIC] = true; break; + case UBLOCK_GOTHIC: scripts[SE_GOTHIC] = true; break; + case UBLOCK_UGARITIC: scripts[SE_UGARITIC] = true; break; +// case UBLOCK_MEROITIC: scripts[SE_MEROITIC] = true; break; +// case UBLOCK_LINEARB: scripts[SE_LINEARB] = true; break; +// case UBLOCK_CYPRIOT: scripts[SE_CYPRIOT] = true; break; + case UBLOCK_RUNIC: scripts[SE_RUNIC] = true; break; + case UBLOCK_OGHAM: scripts[SE_OGHAM] = true; break; + case UBLOCK_THAANA: scripts[SE_THAANA] = true; break; +// case UBLOCK_GLAGOLITIC: scripts[SE_GLAGOLITIC] = true; break; +// case UBLOCK_TENGWAR: scripts[SE_TENGWAR] = true; break; +// case UBLOCK_CIRTH: scripts[SE_CIRTH] = true; break; + case UBLOCK_CJK_RADICALS_SUPPLEMENT: + case UBLOCK_KANGXI_RADICALS: + case UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS: + case UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION: + case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A: + case UBLOCK_CJK_UNIFIED_IDEOGRAPHS: + scripts[SE_HAN] = true; + break; + case UBLOCK_CJK_COMPATIBILITY: + case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS: + case UBLOCK_CJK_COMPATIBILITY_FORMS: + scripts[SE_HAN] = true; + compat = true; + break; + case UBLOCK_HANGUL_COMPATIBILITY_JAMO: + scripts[SE_HANGUL] = true; + compat = true; + break; + + //default: scripts[SE_LATIN] = true; + } + } + scripts[option] = false; //turn off the reflexive transliteration + + //return if we have no transliteration to do for this text + j = 0; + for (i = 0; !j && i < NUMSCRIPTS; i++) { + if (scripts[i]) j++; + } + if (!j) { + ucnv_close(conv); + return 0; + } + + if (compat) { + addTrans("NFKD", &ID); + } + else { + addTrans("NFD", &ID); + } + + //Simple X to Latin transliterators + if (scripts[SE_GREEK]) { + if (strnicmp (((SWModule*)module)->Lang(), "cop", 3)) { + if (option == SE_SBL) + addTrans("Greek-Latin/SBL", &ID); + else if (option == SE_TC) + addTrans("Greek-Latin/TC", &ID); + else if (option == SE_BETA) + addTrans("Greek-Latin/Beta", &ID); + else if (option == SE_BGREEK) + addTrans("Greek-Latin/BGreek", &ID); + else if (option == SE_UNGEGN) + addTrans("Greek-Latin/UNGEGN", &ID); + else if (option == SE_ISO) + addTrans("Greek-Latin/ISO", &ID); + else if (option == SE_ALALC) + addTrans("Greek-Latin/ALALC", &ID); + else if (option == SE_BGNPCGN) + addTrans("Greek-Latin/BGNPCGN", &ID); + else if (option == SE_IPA) + addTrans("Greek-IPA/Ancient", &ID); + else { + addTrans("Greek-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + else { + if (option == SE_SBL) + addTrans("Coptic-Latin/SBL", &ID); + else if (option == SE_TC) + addTrans("Coptic-Latin/TC", &ID); + else if (option == SE_BETA) + addTrans("Coptic-Latin/Beta", &ID); + else if (option == SE_IPA) + addTrans("Coptic-IPA", &ID); + else { + addTrans("Coptic-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + } + if (scripts[SE_HEBREW]) { + if (option == SE_SBL) + addTrans("Hebrew-Latin/SBL", &ID); + else if (option == SE_TC) + addTrans("Hebrew-Latin/TC", &ID); + else if (option == SE_BETA) + addTrans("Hebrew-Latin/Beta", &ID); + else if (option == SE_UNGEGN) + addTrans("Hebrew-Latin/UNGEGN", &ID); + else if (option == SE_ALALC) + addTrans("Hebrew-Latin/ALALC", &ID); + else if (option == SE_SYRIAC) + addTrans("Hebrew-Syriac", &ID); + else { + addTrans("Hebrew-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_CYRILLIC]) { + if (option == SE_GLAGOLITIC) + addTrans("Cyrillic-Glagolitic", &ID); + else { + addTrans("Cyrillic-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_ARABIC]) { + addTrans("Arabic-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_SYRIAC]) { + if (option == SE_TC) + addTrans("Syriac-Latin/TC", &ID); + else if (option == SE_BETA) + addTrans("Syriac-Latin/Beta", &ID); + else if (option == SE_HUGOYE) + addTrans("Syriac-Latin/Hugoye", &ID); + else if (option == SE_HEBREW) + addTrans("Syriac-Hebrew", &ID); + else { + addTrans("Syriac-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_THAI]) { + addTrans("Thai-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_GEORGIAN]) { + if (option == SE_ISO) + addTrans("Georgian-Latin/ISO", &ID); + else if (option == SE_ALALC) + addTrans("Georgian-Latin/ALALC", &ID); + else if (option == SE_BGNPCGN) + addTrans("Georgian-Latin/BGNPCGN", &ID); + else if (option == SE_IPA) + addTrans("Georgian-IPA", &ID); + else { + addTrans("Georgian-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_ARMENIAN]) { + if (option == SE_ISO) + addTrans("Armenian-Latin/ISO", &ID); + else if (option == SE_ALALC) + addTrans("Armenian-Latin/ALALC", &ID); + else if (option == SE_BGNPCGN) + addTrans("Armenian-Latin/BGNPCGN", &ID); + else if (option == SE_IPA) + addTrans("Armenian-IPA", &ID); + else { + addTrans("Armenian-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_ETHIOPIC]) { + if (option == SE_UNGEGN) + addTrans("Ethiopic-Latin/UNGEGN", &ID); + else if (option == SE_ISO) + addTrans("Ethiopic-Latin/ISO", &ID); + else if (option == SE_ALALC) + addTrans("Ethiopic-Latin/ALALC", &ID); + else if (option == SE_SERA) + addTrans("Ethiopic-Latin/SERA", &ID); + else { + addTrans("Ethiopic-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_GOTHIC]) { + if (option == SE_BASICLATIN) + addTrans("Gothic-Latin/Basic", &ID); + else if (option == SE_IPA) + addTrans("Gothic-IPA", &ID); + else { + addTrans("Gothic-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_UGARITIC]) { + if (option == SE_SBL) + addTrans("Ugaritic-Latin/SBL", &ID); + else { + addTrans("Ugaritic-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_MEROITIC]) { + addTrans("Meroitic-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_LINEARB]) { + addTrans("LinearB-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_CYPRIOT]) { + addTrans("Cypriot-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_RUNIC]) { + addTrans("Runic-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_OGHAM]) { + addTrans("Ogham-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_THAANA]) { + if (option == SE_ALALC) + addTrans("Thaana-Latin/ALALC", &ID); + else if (option == SE_BGNPCGN) + addTrans("Thaana-Latin/BGNPCGN", &ID); + else { + addTrans("Thaana-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_GLAGOLITIC]) { + if (option == SE_ISO) + addTrans("Glagolitic-Latin/ISO", &ID); + else if (option == SE_ALALC) + addTrans("Glagolitic-Latin/ALALC", &ID); + else if (option == SE_ALALC) + addTrans("Glagolitic-Cyrillic", &ID); + else { + addTrans("Glagolitic-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + if (scripts[SE_THAI]) { + addTrans("Thai-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_THAI]) { + addTrans("Thai-Latin", &ID); + scripts[SE_LATIN] = true; + } + + if (scripts[SE_HAN]) { + if (!strnicmp (((SWModule*)module)->Lang(), "ja", 2)) { + addTrans("Kanji-Romaji", &ID); + } + else { + addTrans("Han-Latin", &ID); + } + scripts[SE_LATIN] = true; + } + + // Inter-Kana and Kana to Latin transliterators + if (option == SE_HIRAGANA && scripts[SE_KATAKANA]) { + addTrans("Katakana-Hiragana", &ID); + scripts[SE_HIRAGANA] = true; + } + else if (option == SE_KATAKANA && scripts[SE_HIRAGANA]) { + addTrans("Hiragana-Katakana", &ID); + scripts[SE_KATAKANA] = true; + } + else { + if (scripts[SE_KATAKANA]) { + addTrans("Katakana-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_HIRAGANA]) { + addTrans("Hiragana-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + + // Korean to Latin transliterators + if (scripts[SE_HANGUL]) { + addTrans("Hangul-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_JAMO]) { + addTrans("Jamo-Latin", &ID); + scripts[SE_LATIN] = true; + } + + // Indic-Latin + if (option < SE_DEVANAGARI || option > SE_MALAYALAM) { + // Indic to Latin + if (scripts[SE_TAMIL]) { + addTrans("Tamil-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_BENGALI]) { + addTrans("Bengali-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_GURMUKHI]) { + addTrans("Gurmukhi-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_GUJARATI]) { + addTrans("Gujarati-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_ORIYA]) { + addTrans("Oriya-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_TELUGU]) { + addTrans("Telugu-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_KANNADA]) { + addTrans("Kannada-Latin", &ID); + scripts[SE_LATIN] = true; + } + if (scripts[SE_MALAYALAM]) { + addTrans("Malayalam-Latin", &ID); + scripts[SE_LATIN] = true; + } + } + else { + if (scripts[SE_LATIN]) { + addTrans("Latin-InterIndic", &ID); + } + if (scripts[SE_DEVANAGARI]) { + addTrans("Devanagari-InterIndic", &ID); + } + if (scripts[SE_TAMIL]) { + addTrans("Tamil-InterIndic", &ID); + } + if (scripts[SE_BENGALI]) { + addTrans("Bengali-InterIndic", &ID); + } + if (scripts[SE_GURMUKHI]) { + addTrans("Gurmurkhi-InterIndic", &ID); + } + if (scripts[SE_GUJARATI]) { + addTrans("Gujarati-InterIndic", &ID); + } + if (scripts[SE_ORIYA]) { + addTrans("Oriya-InterIndic", &ID); + } + if (scripts[SE_TELUGU]) { + addTrans("Telugu-InterIndic", &ID); + } + if (scripts[SE_KANNADA]) { + addTrans("Kannada-InterIndic", &ID); + } + if (scripts[SE_MALAYALAM]) { + addTrans("Malayalam-InterIndic", &ID); + } + + switch(option) { + case SE_DEVANAGARI: + addTrans("InterIndic-Devanagari", &ID); + break; + case SE_TAMIL: + addTrans("InterIndic-Tamil", &ID); + break; + case SE_BENGALI: + addTrans("InterIndic-Bengali", &ID); + break; + case SE_GURMUKHI: + addTrans("InterIndic-Gurmukhi", &ID); + break; + case SE_GUJARATI: + addTrans("InterIndic-Gujarati", &ID); + break; + case SE_ORIYA: + addTrans("InterIndic-Oriya", &ID); + break; + case SE_TELUGU: + addTrans("InterIndic-Telugu", &ID); + break; + case SE_KANNADA: + addTrans("InterIndic-Kannada", &ID); + break; + case SE_MALAYALAM: + addTrans("InterIndic-Malayalam", &ID); + break; + default: + addTrans("InterIndic-Latin", &ID); + scripts[SE_LATIN] = true; + break; + } + } + +// if (scripts[SE_TENGWAR]) { +// addTrans("Tengwar-Latin", &ID); +// scripts[SE_LATIN] = true; +// } +// if (scripts[SE_CIRTH]) { +// addTrans("Cirth-Latin", &ID); +// scripts[SE_LATIN] = true; +// } + + if (scripts[SE_LATIN]) { + switch (option) { + case SE_GREEK: + addTrans("Latin-Greek", &ID); + break; + case SE_HEBREW: + addTrans("Latin-Hebrew", &ID); + break; + case SE_CYRILLIC: + addTrans("Latin-Cyrillic", &ID); + break; + case SE_ARABIC: + addTrans("Latin-Arabic", &ID); + break; + case SE_SYRIAC: + addTrans("Latin-Syriac", &ID); + break; + case SE_THAI: + addTrans("Latin-Thai", &ID); + break; + case SE_GEORGIAN: + addTrans("Latin-Georgian", &ID); + break; + case SE_ARMENIAN: + addTrans("Latin-Armenian", &ID); + break; + case SE_ETHIOPIC: + addTrans("Latin-Ethiopic", &ID); + break; + case SE_GOTHIC: + addTrans("Latin-Gothic", &ID); + break; + case SE_UGARITIC: + addTrans("Latin-Ugaritic", &ID); + break; + case SE_COPTIC: + addTrans("Latin-Coptic", &ID); + break; + case SE_KATAKANA: + addTrans("Latin-Katakana", &ID); + break; + case SE_HIRAGANA: + addTrans("Latin-Hiragana", &ID); + break; + case SE_JAMO: + addTrans("Latin-Jamo", &ID); + break; + case SE_HANGUL: + addTrans("Latin-Hangul", &ID); + break; + case SE_MEROITIC: + addTrans("Latin-Meroitic", &ID); + break; + case SE_LINEARB: + addTrans("Latin-LinearB", &ID); + break; + case SE_CYPRIOT: + addTrans("Latin-Cypriot", &ID); + break; + case SE_RUNIC: + addTrans("Latin-Runic", &ID); + break; + case SE_OGHAM: + addTrans("Latin-Ogham", &ID); + break; + case SE_THAANA: + addTrans("Latin-Thaana", &ID); + break; + case SE_GLAGOLITIC: + addTrans("Latin-Glagolitic", &ID); + break; +// case SE_TENGWAR: +// addTrans("Latin-Tengwar", &ID); +// break; +// case SE_CIRTH: +// addTrans("Latin-Cirth", &ID); +// break; + } + } + + if (option == SE_BASICLATIN) { + addTrans("Any-Latin1", &ID); + } + + addTrans("NFC", &ID); + + err = U_ZERO_ERROR; + Transliterator * trans = createTrans(UnicodeString(ID), UTRANS_FORWARD, err); + if (trans && !U_FAILURE(err)) { + UnicodeString target = UnicodeString(source); + trans->transliterate(target); + text.setSize(text.size()*2); + len = ucnv_fromUChars(conv, text.getRawData(), text.size(), target.getBuffer(), target.length(), &err); + text.setSize(len); + delete trans; + } + ucnv_close(conv); + } + return 0; +} + +SWORD_NAMESPACE_END +#endif + + + diff --git a/src/modules/filters/utf8utf16.cpp b/src/modules/filters/utf8utf16.cpp new file mode 100644 index 0000000..5c1614c --- /dev/null +++ b/src/modules/filters/utf8utf16.cpp @@ -0,0 +1,78 @@ +/****************************************************************************** + * + * UTF8UTF16 - SWFilter descendant to convert UTF-8 to UTF-16 + * + */ + +#include +#include + +#include +#include + +SWORD_NAMESPACE_START + +UTF8UTF16::UTF8UTF16() { +} + +char UTF8UTF16::processText(SWBuf &text, const SWKey *key, const SWModule *module) { + const unsigned char *from; + unsigned long ch; + signed short utf16; + unsigned char from2[7]; + + SWBuf orig = text; + + from = (const unsigned char *)orig.c_str(); + + // ------------------------------- + for (text = ""; *from; from++) { + ch = 0; + //case: ANSI + if ((*from & 128) != 128) { + text.setSize(text.size()+2); + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short)*from; + continue; + } + //case: Invalid UTF-8 (illegal continuing byte in initial position) + if ((*from & 128) && ((*from & 64) != 64)) { + continue; + } + //case: 2+ byte codepoint + from2[0] = *from; + from2[0] <<= 1; + int subsequent; + for (subsequent = 1; (from2[0] & 128) && (subsequent < 7); subsequent++) { + from2[0] <<= 1; + from2[subsequent] = from[subsequent]; + from2[subsequent] &= 63; + ch <<= 6; + ch |= from2[subsequent]; + } + subsequent--; + from2[0] <<= 1; + char significantFirstBits = 8 - (2+subsequent); + + ch |= (((short)from2[0]) << (((6*subsequent)+significantFirstBits)-8)); + from += subsequent; + if (ch < 0x10000) { + text.setSize(text.size()+2); + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short)ch; + } + else { + utf16 = (signed short)((ch - 0x10000) / 0x400 + 0xD800); + text.setSize(text.size()+2); + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short)utf16; + utf16 = (signed short)((ch - 0x10000) % 0x400 + 0xDC00); + text.setSize(text.size()+2); + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short)utf16; + } + } + text.setSize(text.size()+2); + *((unsigned short *)(text.getRawData()+(text.size()-2))) = (unsigned short)0; + + return 0; + +} + +SWORD_NAMESPACE_END diff --git a/src/modules/genbook/Makefile b/src/modules/genbook/Makefile new file mode 100644 index 0000000..1a2d00d --- /dev/null +++ b/src/modules/genbook/Makefile @@ -0,0 +1,5 @@ + +root := ../../.. + +all: + make -C ${root} diff --git a/src/modules/genbook/Makefile.am b/src/modules/genbook/Makefile.am new file mode 100644 index 0000000..02f6ab1 --- /dev/null +++ b/src/modules/genbook/Makefile.am @@ -0,0 +1,5 @@ +genbookdir = $(top_srcdir)/src/modules/genbook + +libsword_la_SOURCES += $(genbookdir)/swgenbook.cpp + +include ../src/modules/genbook/rawgenbook/Makefile.am diff --git a/src/modules/genbook/rawgenbook/Makefile b/src/modules/genbook/rawgenbook/Makefile new file mode 100644 index 0000000..aab8056 --- /dev/null +++ b/src/modules/genbook/rawgenbook/Makefile @@ -0,0 +1,4 @@ +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/genbook/rawgenbook/Makefile.am b/src/modules/genbook/rawgenbook/Makefile.am new file mode 100644 index 0000000..a176d75 --- /dev/null +++ b/src/modules/genbook/rawgenbook/Makefile.am @@ -0,0 +1,4 @@ +rawgenbookdir = $(top_srcdir)/src/modules/genbook/rawgenbook + +libsword_la_SOURCES += $(rawgenbookdir)/rawgenbook.cpp + diff --git a/src/modules/genbook/rawgenbook/rawgenbook.cpp b/src/modules/genbook/rawgenbook/rawgenbook.cpp new file mode 100644 index 0000000..22cc51f --- /dev/null +++ b/src/modules/genbook/rawgenbook/rawgenbook.cpp @@ -0,0 +1,219 @@ +/****************************************************************************** + * rawtext.cpp - code for class 'RawGenBook'- a module that reads raw text files: + * ot and nt using indexs ??.bks ??.cps ??.vss + */ + + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * RawGenBook Constructor - Initializes data for instance of RawGenBook + * + * ENT: iname - Internal name for module + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +RawGenBook::RawGenBook(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang, const char *keyType) + : SWGenBook(iname, idesc, idisp, enc, dir, mark, ilang) { + + char *buf = new char [ strlen (ipath) + 20 ]; + + path = 0; + stdstr(&path, ipath); + verseKey = !strcmp("VerseKey", keyType); + + if (verseKey) Type("Biblical Texts"); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + delete key; + key = CreateKey(); + + + sprintf(buf, "%s.bdt", path); + bdtfd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::RDWR, true); + + delete [] buf; + +} + + +/****************************************************************************** + * RawGenBook Destructor - Cleans up instance of RawGenBook + */ + +RawGenBook::~RawGenBook() { + + FileMgr::getSystemFileMgr()->close(bdtfd); + + if (path) + delete [] path; + +} + + +bool RawGenBook::isWritable() { + return ((bdtfd->getFd() > 0) && ((bdtfd->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} + + +/****************************************************************************** + * RawGenBook::getRawEntry - Returns the correct verse when char * cast + * is requested + * + * RET: string buffer with verse + */ + +SWBuf &RawGenBook::getRawEntryBuf() { + + __u32 offset = 0; + __u32 size = 0; + + TreeKey *key = 0; + SWTRY { + key = SWDYNAMIC_CAST(TreeKey, (this->key)); + } + SWCATCH ( ... ) {} + + if (!key) { + VerseTreeKey *tkey = 0; + SWTRY { + tkey = SWDYNAMIC_CAST(VerseTreeKey, (this->key)); + } + SWCATCH ( ... ) {} + if (tkey) key = tkey->getTreeKey(); + } + + if (!key) { + key = (TreeKeyIdx *)CreateKey(); + (*key) = *(this->key); + } + + int dsize; + key->getUserData(&dsize); + entryBuf = ""; + if (dsize > 7) { + memcpy(&offset, key->getUserData(), 4); + offset = swordtoarch32(offset); + + memcpy(&size, key->getUserData() + 4, 4); + size = swordtoarch32(size); + + entrySize = size; // support getEntrySize call + + entryBuf.setFillByte(0); + entryBuf.setSize(size); + bdtfd->seek(offset, SEEK_SET); + bdtfd->read(entryBuf.getRawData(), size); + + rawFilter(entryBuf, 0); // hack, decipher + rawFilter(entryBuf, key); + +// if (!isUnicode()) + RawStr::prepText(entryBuf); + } + + if (key != this->key) // free our key if we created a VerseKey + delete key; + + return entryBuf; +} + + +void RawGenBook::setEntry(const char *inbuf, long len) { + + __u32 offset = archtosword32(bdtfd->seek(0, SEEK_END)); + __u32 size = 0; + TreeKeyIdx *key = ((TreeKeyIdx *)this->key); + + char userData[8]; + + if (len < 0) + len = strlen(inbuf); + + bdtfd->write(inbuf, len); + + size = archtosword32(len); + memcpy(userData, &offset, 4); + memcpy(userData+4, &size, 4); + key->setUserData(userData, 8); + key->save(); +} + + +void RawGenBook::linkEntry(const SWKey *inkey) { + TreeKeyIdx *srckey = 0; + TreeKeyIdx *key = ((TreeKeyIdx *)this->key); + // see if we have a VerseKey * or decendant + SWTRY { + srckey = SWDYNAMIC_CAST(TreeKeyIdx, inkey); + } + SWCATCH ( ... ) {} + // if we don't have a VerseKey * decendant, create our own + if (!srckey) { + srckey = (TreeKeyIdx *)CreateKey(); + (*srckey) = *inkey; + } + + key->setUserData(srckey->getUserData(), 8); + key->save(); + + if (inkey != srckey) // free our key if we created a VerseKey + delete srckey; +} + + +/****************************************************************************** + * RawGenBook::deleteEntry - deletes this entry + * + * RET: *this + */ + +void RawGenBook::deleteEntry() { + TreeKeyIdx *key = ((TreeKeyIdx *)this->key); + key->remove(); +} + + +char RawGenBook::createModule(const char *ipath) { + char *path = 0; + char *buf = new char [ strlen (ipath) + 20 ]; + FileDesc *fd; + signed char retval; + + stdstr(&path, ipath); + + if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\')) + path[strlen(path)-1] = 0; + + sprintf(buf, "%s.bdt", path); + FileMgr::removeFile(buf); + fd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::CREAT|FileMgr::WRONLY, FileMgr::IREAD|FileMgr::IWRITE); + fd->getFd(); + FileMgr::getSystemFileMgr()->close(fd); + + retval = TreeKeyIdx::create(path); + delete [] path; + return retval; +} + + +SWKey *RawGenBook::CreateKey() { + TreeKeyIdx *newKey = new TreeKeyIdx(path); + return (verseKey) ? (SWKey *)new VerseTreeKey(newKey) : newKey; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/genbook/swgenbook.cpp b/src/modules/genbook/swgenbook.cpp new file mode 100644 index 0000000..0ce16aa --- /dev/null +++ b/src/modules/genbook/swgenbook.cpp @@ -0,0 +1,29 @@ +/****************************************************************************** + * swld.cpp - code for base class 'SWLD'. SWLD is the basis for all + * types of Lexicon and Dictionary modules (hence the 'LD'). + */ + +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * SWLD Constructor - Initializes data for instance of SWLD + * + * ENT: imodname - Internal name for module + * imoddesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +SWGenBook::SWGenBook(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : SWModule(imodname, imoddesc, idisp, (char *)"Generic Books", enc, dir, mark, ilang) { +} + + +/****************************************************************************** + * SWLD Destructor - Cleans up instance of SWLD + */ + +SWGenBook::~SWGenBook() { +} + +SWORD_NAMESPACE_END diff --git a/src/modules/lexdict/Makefile b/src/modules/lexdict/Makefile new file mode 100644 index 0000000..1a2d00d --- /dev/null +++ b/src/modules/lexdict/Makefile @@ -0,0 +1,5 @@ + +root := ../../.. + +all: + make -C ${root} diff --git a/src/modules/lexdict/Makefile.am b/src/modules/lexdict/Makefile.am new file mode 100644 index 0000000..8cfe68b --- /dev/null +++ b/src/modules/lexdict/Makefile.am @@ -0,0 +1,7 @@ +lexdictdir = $(top_srcdir)/src/modules/lexdict + +libsword_la_SOURCES += $(lexdictdir)/swld.cpp + +include ../src/modules/lexdict/rawld/Makefile.am +include ../src/modules/lexdict/rawld4/Makefile.am +include ../src/modules/lexdict/zld/Makefile.am diff --git a/src/modules/lexdict/rawld/Makefile b/src/modules/lexdict/rawld/Makefile new file mode 100644 index 0000000..35d6648 --- /dev/null +++ b/src/modules/lexdict/rawld/Makefile @@ -0,0 +1,5 @@ + +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/lexdict/rawld/Makefile.am b/src/modules/lexdict/rawld/Makefile.am new file mode 100644 index 0000000..2a2d996 --- /dev/null +++ b/src/modules/lexdict/rawld/Makefile.am @@ -0,0 +1,4 @@ +rawlddir = $(top_srcdir)/src/modules/lexdict/rawld + +libsword_la_SOURCES += $(rawlddir)/rawld.cpp + diff --git a/src/modules/lexdict/rawld/rawld.cpp b/src/modules/lexdict/rawld/rawld.cpp new file mode 100644 index 0000000..08be215 --- /dev/null +++ b/src/modules/lexdict/rawld/rawld.cpp @@ -0,0 +1,194 @@ +/****************************************************************************** + * rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and + * dictionary files: *.dat *.idx + */ + + +#include +#include +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + + /****************************************************************************** + * RawLD Constructor - Initializes data for instance of RawLD + * + * ENT: ipath - path and filename of files (no extension) + * iname - Internal name for module + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +RawLD::RawLD(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : RawStr(ipath), SWLD(iname, idesc, idisp, enc, dir, mark, ilang) +{ +} + + +/****************************************************************************** + * RawLD Destructor - Cleans up instance of RawLD + */ + +RawLD::~RawLD() +{ +} + + +bool RawLD::isWritable() { + return ((idxfd->getFd() > 0) && ((idxfd->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} + + +/****************************************************************************** + * RawLD::strongsPad - Pads a key if (it-1) is 100% digits to 5 places + * allows for final to be alpha, e.g. '123B' + * + * ENT: buf - buffer to check and pad + */ + +void RawLD::strongsPad(char *buf) +{ + char *check; + int size = 0; + int len = strlen(buf); + char subLet = 0; + bool bang = false; + if ((len < 8) && (len > 0)) { + for (check = buf; *(check+1); check++) { + if (!isdigit(*check)) + break; + else size++; + } + + if (size && ((size == (len-1)) || (size == (len-2)))) { + if (*check == '!') { + bang = true; + check++; + } + if (isalpha(*check)) { + subLet = toupper(*check); + *(check-(bang?1:0)) = 0; + } + sprintf(buf, "%.5d", atoi(buf)); + if (subLet) { + check = buf+(strlen(buf)); + if (bang) { + *check++ = '!'; + } + *check++ = subLet; + *check = 0; + } + } + } +} + + +/****************************************************************************** + * RawLD::getEntry - Looks up entry from data file. 'Snaps' to closest + * entry and sets 'entrybuf'. + * + * ENT: away - number of entries offset from key (default = 0) + * + * RET: error status + */ + +char RawLD::getEntry(long away) +{ + long start = 0; + unsigned short size = 0; + char *idxbuf = 0; + char retval = 0; + + char *buf = new char [ strlen(*key) + 6 ]; + strcpy(buf, *key); + + strongsPad(buf); + + if (!(retval = findOffset(buf, &start, &size, away))) { + readText(start, &size, &idxbuf, entryBuf); + rawFilter(entryBuf, 0); // hack, decipher + rawFilter(entryBuf, key); + entrySize = size; // support getEntrySize call + if (!key->Persist()) // If we have our own key + *key = idxbuf; // reset it to entry index buffer + + stdstr(&entkeytxt, idxbuf); // set entry key text that module 'snapped' to. + delete [] idxbuf; + } + else { + entryBuf = ""; + } + + delete [] buf; + return retval; +} + + +/****************************************************************************** + * RawLD::getRawEntry - Returns the correct entry when char * cast + * is requested + * + * RET: string buffer with entry + */ + +SWBuf &RawLD::getRawEntryBuf() { + + char ret = getEntry(); + if (!ret) { +// if (!isUnicode()) + prepText(entryBuf); + } + else error = ret; + + return entryBuf; +} + + +/****************************************************************************** + * RawLD::increment - Increments module key a number of entries + * + * ENT: increment - Number of entries to jump forward + * + * RET: *this + */ + +void RawLD::increment(int steps) { + char tmperror; + + if (key->isTraversable()) { + *key += steps; + error = key->Error(); + steps = 0; + } + + tmperror = (getEntry(steps)) ? KEYERR_OUTOFBOUNDS : 0; + error = (error)?error:tmperror; + *key = entkeytxt; +} + + +void RawLD::setEntry(const char *inbuf, long len) { + doSetText(*key, inbuf, len); +} + + +void RawLD::linkEntry(const SWKey *inkey) { + doLinkEntry(*key, *inkey); +} + + +/****************************************************************************** + * RawFiles::deleteEntry - deletes this entry + * + * RET: *this + */ + +void RawLD::deleteEntry() { + doSetText(*key, ""); +} + +SWORD_NAMESPACE_END diff --git a/src/modules/lexdict/rawld4/Makefile b/src/modules/lexdict/rawld4/Makefile new file mode 100644 index 0000000..35d6648 --- /dev/null +++ b/src/modules/lexdict/rawld4/Makefile @@ -0,0 +1,5 @@ + +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/lexdict/rawld4/Makefile.am b/src/modules/lexdict/rawld4/Makefile.am new file mode 100644 index 0000000..697e2e5 --- /dev/null +++ b/src/modules/lexdict/rawld4/Makefile.am @@ -0,0 +1,4 @@ +rawld4dir = $(top_srcdir)/src/modules/lexdict/rawld4 + +libsword_la_SOURCES += $(rawld4dir)/rawld4.cpp + diff --git a/src/modules/lexdict/rawld4/rawld4.cpp b/src/modules/lexdict/rawld4/rawld4.cpp new file mode 100644 index 0000000..0fd1058 --- /dev/null +++ b/src/modules/lexdict/rawld4/rawld4.cpp @@ -0,0 +1,192 @@ +/****************************************************************************** + * rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and + * dictionary files: *.dat *.idx + */ + + +#include +#include +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + + /****************************************************************************** + * RawLD Constructor - Initializes data for instance of RawLD + * + * ENT: ipath - path and filename of files (no extension) + * iname - Internal name for module + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +RawLD4::RawLD4(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : RawStr4(ipath), SWLD(iname, idesc, idisp, enc, dir, mark, ilang) +{ +} + + +/****************************************************************************** + * RawLD Destructor - Cleans up instance of RawLD + */ + +RawLD4::~RawLD4() +{ +} + + +bool RawLD4::isWritable() { + return ((idxfd->getFd() > 0) && ((idxfd->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} + + +/****************************************************************************** + * RawLD4::strongsPad - Pads a key if (it-1) is 100% digits to 5 places + * allows for final to be alpha, e.g. '123B' + * + * ENT: buf - buffer to check and pad + */ + +void RawLD4::strongsPad(char *buf) +{ + char *check; + int size = 0; + int len = strlen(buf); + char subLet = 0; + bool bang = false; + if ((len < 8) && (len > 0)) { + for (check = buf; *(check+1); check++) { + if (!isdigit(*check)) + break; + else size++; + } + + if (size && ((size == (len-1)) || (size == (len-2)))) { + if (*check == '!') { + bang = true; + check++; + } + if (isalpha(*check)) { + subLet = toupper(*check); + *(check-(bang?1:0)) = 0; + } + sprintf(buf, "%.5d", atoi(buf)); + if (subLet) { + check = buf+(strlen(buf)); + if (bang) { + *check++ = '!'; + } + *check++ = subLet; + *check = 0; + } + } + } +} + + +/****************************************************************************** + * RawLD4::getEntry - Looks up entry from data file. 'Snaps' to closest + * entry and sets 'entrybuf'. + * + * ENT: away - number of entries offset from key (default = 0) + * + * RET: error status + */ + +char RawLD4::getEntry(long away) +{ + long start = 0; + unsigned long size = 0; + char *idxbuf = 0; + char retval = 0; + + char *buf = new char [ strlen(*key) + 6 ]; + strcpy(buf, *key); + + strongsPad(buf); + + entryBuf = ""; + if (!(retval = findOffset(buf, &start, &size, away))) { + readText(start, &size, &idxbuf, entryBuf); + rawFilter(entryBuf, 0); // hack, decipher + rawFilter(entryBuf, key); + entrySize = size; // support getEntrySize call + if (!key->Persist()) // If we have our own key + *key = idxbuf; // reset it to entry index buffer + + stdstr(&entkeytxt, idxbuf); // set entry key text that module 'snapped' to. + delete [] idxbuf; + } + + delete [] buf; + return retval; +} + + +/****************************************************************************** + * RawLD4::getRawEntry - Returns the correct entry when char * cast + * is requested + * + * RET: string buffer with entry + */ + +SWBuf &RawLD4::getRawEntryBuf() { + + char ret = getEntry(); + if (!ret) { +// if (!isUnicode()) + prepText(entryBuf); + } + else error = ret; + + return entryBuf; +} + + +/****************************************************************************** + * RawLD4::increment - Increments module key a number of entries + * + * ENT: increment - Number of entries to jump forward + * + * RET: *this + */ + +void RawLD4::increment(int steps) { + char tmperror; + + if (key->isTraversable()) { + *key += steps; + error = key->Error(); + steps = 0; + } + + tmperror = (getEntry(steps)) ? KEYERR_OUTOFBOUNDS : 0; + error = (error)?error:tmperror; + *key = entkeytxt; +} + + +void RawLD4::setEntry(const char *inbuf, long len) { + doSetText(*key, inbuf, len); +} + + +void RawLD4::linkEntry(const SWKey *inkey) { + doLinkEntry(*key, *inkey); +} + + +/****************************************************************************** + * RawFiles::deleteEntry - deletes this entry + * + * RET: *this + */ + +void RawLD4::deleteEntry() { + doSetText(*key, ""); +} + +SWORD_NAMESPACE_END diff --git a/src/modules/lexdict/swld.cpp b/src/modules/lexdict/swld.cpp new file mode 100644 index 0000000..518e5c0 --- /dev/null +++ b/src/modules/lexdict/swld.cpp @@ -0,0 +1,82 @@ +/****************************************************************************** + * swld.cpp - code for base class 'SWLD'. SWLD is the basis for all + * types of Lexicon and Dictionary modules (hence the 'LD'). + */ + +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * SWLD Constructor - Initializes data for instance of SWLD + * + * ENT: imodname - Internal name for module + * imoddesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +SWLD::SWLD(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : SWModule(imodname, imoddesc, idisp, (char *)"Lexicons / Dictionaries", enc, dir, mark, ilang) +{ + delete key; + key = CreateKey(); + entkeytxt = new char [1]; + *entkeytxt = 0; +} + + +/****************************************************************************** + * SWLD Destructor - Cleans up instance of SWLD + */ + +SWLD::~SWLD() +{ + if (entkeytxt) + delete [] entkeytxt; +} + + +SWKey *SWLD::CreateKey() { return new StrKey(); } + + +/****************************************************************************** + * SWLD::KeyText - Sets/gets module KeyText, getting from saved text if key is + * persistent + * + * ENT: ikeytext - value which to set keytext + * [0] - only get + * + * RET: pointer to keytext + */ + +const char *SWLD::KeyText(const char *ikeytext) +{ + if (key->Persist() && !ikeytext) { + getRawEntryBuf(); // force module key to snap to entry + return entkeytxt; + } + else return SWModule::KeyText(ikeytext); +} + + +/****************************************************************************** + * SWLD::setPosition(SW_POSITION) - Positions this key if applicable + */ + +void SWLD::setPosition(SW_POSITION p) { + if (!key->isTraversable()) { + switch (p) { + case POS_TOP: + *key = ""; + break; + case POS_BOTTOM: + *key = "zzzzzzzzz"; + break; + } + } + else *key = p; + getRawEntryBuf(); +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/lexdict/zld/Makefile b/src/modules/lexdict/zld/Makefile new file mode 100644 index 0000000..35d6648 --- /dev/null +++ b/src/modules/lexdict/zld/Makefile @@ -0,0 +1,5 @@ + +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/lexdict/zld/Makefile.am b/src/modules/lexdict/zld/Makefile.am new file mode 100644 index 0000000..81e4d7c --- /dev/null +++ b/src/modules/lexdict/zld/Makefile.am @@ -0,0 +1,4 @@ +zlddir = $(top_srcdir)/src/modules/lexdict/zld + +libsword_la_SOURCES += $(zlddir)/zld.cpp + diff --git a/src/modules/lexdict/zld/zld.cpp b/src/modules/lexdict/zld/zld.cpp new file mode 100644 index 0000000..bcb51ab --- /dev/null +++ b/src/modules/lexdict/zld/zld.cpp @@ -0,0 +1,189 @@ +/****************************************************************************** + * rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and + * dictionary files: *.dat *.idx + */ + + +#include +#include +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + + /****************************************************************************** + * RawLD Constructor - Initializes data for instance of RawLD + * + * ENT: ipath - path and filename of files (no extension) + * iname - Internal name for module + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +zLD::zLD(const char *ipath, const char *iname, const char *idesc, long blockCount, SWCompress *icomp, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : zStr(ipath, -1, blockCount, icomp), SWLD(iname, idesc, idisp, enc, dir, mark, ilang) { + +} + + +/****************************************************************************** + * RawLD Destructor - Cleans up instance of RawLD + */ + +zLD::~zLD() { + +} + + +bool zLD::isWritable() { + return ((idxfd->getFd() > 0) && ((idxfd->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} + + +/****************************************************************************** + * zLD::strongsPad - Pads a key if it is 100% digits to 5 places + * + * ENT: buf - buffer to check and pad + */ + +void zLD::strongsPad(char *buf) { + char *check; + int size = 0; + int len = strlen(buf); + char subLet = 0; + bool bang = false; + if ((len < 8) && (len > 0)) { + for (check = buf; *(check+1); check++) { + if (!isdigit(*check)) + break; + else size++; + } + + if (size && ((size == (len-1)) || (size == (len-2)))) { + if (*check == '!') { + bang = true; + check++; + } + if (isalpha(*check)) { + subLet = toupper(*check); + *(check-(bang?1:0)) = 0; + } + sprintf(buf, "%.5d", atoi(buf)); + if (subLet) { + check = buf+(strlen(buf)); + if (bang) { + *check++ = '!'; + } + *check++ = subLet; + *check = 0; + } + } + } +} + + +/****************************************************************************** + * zLD::getEntry - Looks up entry from data file. 'Snaps' to closest + * entry and sets 'entrybuf'. + * + * ENT: away - number of entries offset from key (default = 0) + * + * RET: error status + */ + +char zLD::getEntry(long away) { + char *idxbuf = 0; + char *ebuf = 0; + char retval = 0; + long index; + unsigned long size; + char *buf = new char [ strlen(*key) + 6 ]; + strcpy(buf, *key); + + strongsPad(buf); + + entryBuf = ""; + if (!(retval = findKeyIndex(buf, &index, away))) { + getText(index, &idxbuf, &ebuf); + size = strlen(ebuf) + 1; + entryBuf = ebuf; + + rawFilter(entryBuf, key); + + entrySize = size; // support getEntrySize call + if (!key->Persist()) // If we have our own key + *key = idxbuf; // reset it to entry index buffer + + stdstr(&entkeytxt, idxbuf); // set entry key text that module 'snapped' to. + free(idxbuf); + free(ebuf); + } + + delete [] buf; + return retval; +} + + +/****************************************************************************** + * zLD::getRawEntry - Returns the correct entry when char * cast + * is requested + * + * RET: string buffer with entry + */ + +SWBuf &zLD::getRawEntryBuf() { + if (!getEntry() /*&& !isUnicode()*/) { + prepText(entryBuf); + } + + return entryBuf; +} + + +/****************************************************************************** + * zLD::increment - Increments module key a number of entries + * + * ENT: increment - Number of entries to jump forward + * + * RET: *this + */ + +void zLD::increment(int steps) { + char tmperror; + + if (key->isTraversable()) { + *key += steps; + error = key->Error(); + steps = 0; + } + + tmperror = (getEntry(steps)) ? KEYERR_OUTOFBOUNDS : 0; + error = (error)?error:tmperror; + *key = entkeytxt; +} + + +void zLD::setEntry(const char *inbuf, long len) { + setText(*key, inbuf, len); +} + + +void zLD::linkEntry(const SWKey *inkey) { + zStr::linkEntry(*key, *inkey); +} + + +/****************************************************************************** + * RawFiles::deleteEntry - deletes this entry + * + * RET: *this + */ + +void zLD::deleteEntry() { + setText(*key, ""); +} + +SWORD_NAMESPACE_END diff --git a/src/modules/readme b/src/modules/readme new file mode 100644 index 0000000..92cc99e --- /dev/null +++ b/src/modules/readme @@ -0,0 +1,9 @@ +This directory contains all different module types that are usable by the SWORD +API. + + comments Commentaries + common common utility objects + lexdict Lexicons/Dictionaries + maps Maps + parsers Language Parsers + texts Scripture Texts diff --git a/src/modules/swmodule.cpp b/src/modules/swmodule.cpp new file mode 100644 index 0000000..8461953 --- /dev/null +++ b/src/modules/swmodule.cpp @@ -0,0 +1,1285 @@ +/****************************************************************************** + * swmodule.cpp -code for base class 'module'. Module is the basis for all + * types of modules (e.g. texts, commentaries, maps, lexicons, + * etc.) + */ + +#include + +#include +#include +#include +#include // GNU +#include +#include // KLUDGE for Search +#include // KLUDGE for Search +#include +#include +#include +#ifndef _MSC_VER +#include +#endif + +#ifdef USELUCENE +#include +#include + +//Lucence includes +//#include "CLucene.h" +//#include "CLucene/util/Reader.h" +//#include "CLucene/util/Misc.h" +//#include "CLucene/util/dirent.h" + +using namespace lucene::index; +using namespace lucene::analysis; +using namespace lucene::util; +using namespace lucene::store; +using namespace lucene::document; +using namespace lucene::queryParser; +using namespace lucene::search; +#endif + +using std::vector; + +SWORD_NAMESPACE_START + +SWDisplay SWModule::rawdisp; + +typedef std::list StringList; + +/****************************************************************************** + * SWModule Constructor - Initializes data for instance of SWModule + * + * ENT: imodname - Internal name for module + * imoddesc - Name to display to user for module + * idisp - Display object to use for displaying + * imodtype - Type of Module (All modules will be displayed with + * others of same type under their modtype heading + * unicode - if this module is unicode + */ + +SWModule::SWModule(const char *imodname, const char *imoddesc, SWDisplay *idisp, char *imodtype, SWTextEncoding encoding, SWTextDirection direction, SWTextMarkup markup, const char* imodlang) { + key = CreateKey(); + entryBuf = ""; + config = &ownConfig; + modname = 0; + error = 0; + moddesc = 0; + modtype = 0; + modlang = 0; + this->encoding = encoding; + this->direction = direction; + this->markup = markup; + entrySize= -1; + disp = (idisp) ? idisp : &rawdisp; + stdstr(&modname, imodname); + stdstr(&moddesc, imoddesc); + stdstr(&modtype, imodtype); + stdstr(&modlang, imodlang); + stripFilters = new FilterList(); + rawFilters = new FilterList(); + renderFilters = new FilterList(); + optionFilters = new OptionFilterList(); + encodingFilters = new FilterList(); + skipConsecutiveLinks = true; + procEntAttr = true; +} + + +/****************************************************************************** + * SWModule Destructor - Cleans up instance of SWModule + */ + +SWModule::~SWModule() +{ + if (modname) + delete [] modname; + if (moddesc) + delete [] moddesc; + if (modtype) + delete [] modtype; + if (modlang) + delete [] modlang; + + if (key) { + if (!key->Persist()) + delete key; + } + + stripFilters->clear(); + rawFilters->clear(); + renderFilters->clear(); + optionFilters->clear(); + encodingFilters->clear(); + entryAttributes.clear(); + + delete stripFilters; + delete rawFilters; + delete renderFilters; + delete optionFilters; + delete encodingFilters; +} + + +/****************************************************************************** + * SWModule::CreateKey - Allocates a key of specific type for module + * + * RET: pointer to allocated key + */ + +SWKey *SWModule::CreateKey() +{ + return new SWKey(); +} + + +/****************************************************************************** + * SWModule::Error - Gets and clears error status + * + * RET: error status + */ + +char SWModule::Error() +{ + char retval = error; + + error = 0; + return retval; +} + + +/****************************************************************************** + * SWModule::Name - Sets/gets module name + * + * ENT: imodname - value which to set modname + * [0] - only get + * + * RET: pointer to modname + */ + +char *SWModule::Name(const char *imodname) { + return stdstr(&modname, imodname); +} + +char *SWModule::Name() const { + return modname; +} + + +/****************************************************************************** + * SWModule::Description - Sets/gets module description + * + * ENT: imoddesc - value which to set moddesc + * [0] - only get + * + * RET: pointer to moddesc + */ + +char *SWModule::Description(const char *imoddesc) { + return stdstr(&moddesc, imoddesc); +} + +char *SWModule::Description() const { + return moddesc; +} + + +/****************************************************************************** + * SWModule::Type - Sets/gets module type + * + * ENT: imodtype - value which to set modtype + * [0] - only get + * + * RET: pointer to modtype + */ + +char *SWModule::Type(const char *imodtype) { + return stdstr(&modtype, imodtype); +} + +char *SWModule::Type() const { + return modtype; +} + +/****************************************************************************** + * SWModule::Direction - Sets/gets module direction + * + * ENT: newdir - value which to set direction + * [-1] - only get + * + * RET: char direction + */ +char SWModule::Direction(signed char newdir) { + if (newdir != -1) + direction = newdir; + return direction; +} + +/****************************************************************************** + * SWModule::Encoding - Sets/gets module encoding + * + * ENT: newdir - value which to set direction + * [-1] - only get + * + * RET: char encoding + */ +char SWModule::Encoding(signed char newenc) { + if (newenc != -1) + encoding = newenc; + return encoding; +} + +/****************************************************************************** + * SWModule::Markup - Sets/gets module markup + * + * ENT: newdir - value which to set direction + * [-1] - only get + * + * RET: char markup + */ +char SWModule::Markup(signed char newmark) { + if (newmark != -1) + markup = newmark; + return markup; +} + + +/****************************************************************************** + * SWModule::Lang - Sets/gets module language + * + * ENT: imodlang - value which to set modlang + * [0] - only get + * + * RET: pointer to modname + */ + +char *SWModule::Lang(const char *imodlang) +{ + return stdstr(&modlang, imodlang); +} + + +/****************************************************************************** + * SWModule::Disp - Sets/gets display driver + * + * ENT: idisp - value which to set disp + * [0] - only get + * + * RET: pointer to disp + */ + +SWDisplay *SWModule::getDisplay() const { + return disp; +} + +void SWModule::setDisplay(SWDisplay *idisp) { + disp = idisp; +} + + +/****************************************************************************** + * SWModule::Display - Calls this modules display object and passes itself + * + * RET: error status + */ + +char SWModule::Display() { + disp->Display(*this); + return 0; +} + + +/****************************************************************************** + * SWModule::getKey - Gets the key from this module that points to the position + * record + * + * RET: key object + */ + +SWKey *SWModule::getKey() const { + return key; +} + + +/****************************************************************************** + * SWModule::setKey - Sets a key to this module for position to a particular + * record + * + * ENT: ikey - key with which to set this module + * + * RET: error status + */ + +char SWModule::setKey(const SWKey *ikey) { + SWKey *oldKey = 0; + + if (key) { + if (!key->Persist()) // if we have our own copy + oldKey = key; + } + + if (!ikey->Persist()) { // if we are to keep our own copy + key = CreateKey(); + *key = *ikey; + } + else key = (SWKey *)ikey; // if we are to just point to an external key + + if (oldKey) + delete oldKey; + + return 0; +} + + +/****************************************************************************** + * SWModule::setPosition(SW_POSITION) - Positions this modules to an entry + * + * ENT: p - position (e.g. TOP, BOTTOM) + * + * RET: *this + */ + +void SWModule::setPosition(SW_POSITION p) { + *key = p; + char saveError = key->Error(); + + switch (p) { + case POS_TOP: + (*this)++; + (*this)--; + break; + + case POS_BOTTOM: + (*this)--; + (*this)++; + break; + } + + error = saveError; +} + + +/****************************************************************************** + * SWModule::increment - Increments module key a number of entries + * + * ENT: increment - Number of entries to jump forward + * + * RET: *this + */ + +void SWModule::increment(int steps) { + (*key) += steps; + error = key->Error(); +} + + +/****************************************************************************** + * SWModule::decrement - Decrements module key a number of entries + * + * ENT: decrement - Number of entries to jump backward + * + * RET: *this + */ + +void SWModule::decrement(int steps) { + (*key) -= steps; + error = key->Error(); +} + + +/****************************************************************************** + * SWModule::Search - Searches a module for a string + * + * ENT: istr - string for which to search + * searchType - type of search to perform + * >=0 - regex + * -1 - phrase + * -2 - multiword + * -3 - entryAttrib (eg. Word//Lemma/G1234/) + * -4 - clucene + * flags - options flags for search + * justCheckIfSupported - if set, don't search, only tell if this + * function supports requested search. + * + * RET: ListKey set to verses that contain istr + */ + +ListKey &SWModule::search(const char *istr, int searchType, int flags, SWKey *scope, bool *justCheckIfSupported, void (*percent)(char, void *), void *percentUserData) { + + listKey.ClearList(); + SWBuf term = istr; + +#ifdef USELUCENE + SWBuf target = getConfigEntry("AbsoluteDataPath"); + char ch = target.c_str()[strlen(target.c_str())-1]; + if ((ch != '/') && (ch != '\\')) + target.append('/'); + target.append("lucene"); +#endif + if (justCheckIfSupported) { + *justCheckIfSupported = (searchType >= -3); +#ifdef USELUCENE + if ((searchType == -4) && (IndexReader::indexExists(target.c_str()))) { + *justCheckIfSupported = true; + } +#endif + return listKey; + } + + SWKey *saveKey = 0; + SWKey *searchKey = 0; + SWKey *resultKey = CreateKey(); + regex_t preg; + vector words; + const char *sres; + terminateSearch = false; + char perc = 1; + bool savePEA = isProcessEntryAttributes(); + // determine if we might be doing special strip searches. useful for knowing if we can use shortcuts + bool specialStrips = (getConfigEntry("LocalStripFilter") || strchr(istr, '<')); + + processEntryAttributes(searchType == -3); + + + if (!key->Persist()) { + saveKey = CreateKey(); + *saveKey = *key; + } + else saveKey = key; + + searchKey = (scope)?scope->clone():(key->Persist())?key->clone():0; + if (searchKey) { + searchKey->Persist(1); + setKey(*searchKey); + } + + (*percent)(perc, percentUserData); + // MAJOR KLUDGE: VerseKey::Index still return index within testament. + // VerseKey::NewIndex should be moved to Index and Index should be some + // VerseKey specific name + VerseKey *vkcheck = 0; + SWTRY { + vkcheck = SWDYNAMIC_CAST(VerseKey, key); + } + SWCATCH (...) {} + // end MAJOR KLUDGE + + *this = BOTTOM; + // fix below when we find out the bug + long highIndex = (vkcheck)?32300/*vkcheck->NewIndex()*/:key->Index(); + if (!highIndex) + highIndex = 1; // avoid division by zero errors. + *this = TOP; + if (searchType >= 0) { + flags |=searchType|REG_NOSUB|REG_EXTENDED; + regcomp(&preg, istr, flags); + } + + (*percent)(++perc, percentUserData); + + +#ifdef USELUCENE + if (searchType == -4) { // lucene + //Buffers for the wchar<->utf8 char* conversion + const unsigned short int MAX_CONV_SIZE = 2047; + wchar_t wcharBuffer[MAX_CONV_SIZE + 1]; + char utfBuffer[MAX_CONV_SIZE + 1]; + + lucene::index::IndexReader *ir = 0; + lucene::search::IndexSearcher *is = 0; + Query *q = 0; + Hits *h = 0; + SWTRY { + ir = IndexReader::open(target); + is = new IndexSearcher(ir); + (*percent)(10, percentUserData); + + standard::StandardAnalyzer analyzer; + lucene_utf8towcs(wcharBuffer, istr, MAX_CONV_SIZE); //TODO Is istr always utf8? + q = QueryParser::parse(wcharBuffer, _T("content"), &analyzer); + (*percent)(20, percentUserData); + h = is->search(q); + (*percent)(80, percentUserData); + + // iterate thru each good module position that meets the search + for (long i = 0; i < h->length(); i++) { + Document &doc = h->doc(i); + + // set a temporary verse key to this module position + lucene_wcstoutf8(utfBuffer, doc.get(_T("key")), MAX_CONV_SIZE); + *resultKey = utfBuffer; //TODO Does a key always accept utf8? + + // check to see if it sets ok (in our range?) and if so, add to our return list + *getKey() = *resultKey; + if (*getKey() == *resultKey) { + listKey << *resultKey; + listKey.GetElement()->userData = (void *)((__u32)(h->score(i)*100)); + } + } + (*percent)(98, percentUserData); + } + SWCATCH (...) { + q = 0; + // invalid clucene query + } + delete h; + delete q; + + delete is; + if (ir) { + ir->close(); + } + } +#endif + + // some pre-loop processing + switch (searchType) { + + // phrase + case -1: + // let's see if we're told to ignore case. If so, then we'll touppstr our term + if ((flags & REG_ICASE) == REG_ICASE) toupperstr(term); + break; + + // multi-word + case -2: + // let's break the term down into our words vector + while (1) { + const char *word = term.stripPrefix(' '); + if (!word) { + words.push_back(term); + break; + } + words.push_back(word); + } + if ((flags & REG_ICASE) == REG_ICASE) { + for (unsigned int i = 0; i < words.size(); i++) { + toupperstr(words[i]); + } + } + break; + + // entry attributes + case -3: + // let's break the attribute segs down. We'll reuse our words vector for each segment + while (1) { + const char *word = term.stripPrefix('/'); + if (!word) { + words.push_back(term); + break; + } + words.push_back(word); + } + break; + } + + + // our main loop to iterate the module and find the stuff + perc = 5; + (*percent)(perc, percentUserData); + + + while ((searchType > -4) && !Error() && !terminateSearch) { + long mindex = 0; + if (vkcheck) + mindex = vkcheck->NewIndex(); + else mindex = key->Index(); + float per = (float)mindex / highIndex; + per *= 93; + per += 5; + char newperc = (char)per; +// char newperc = (char)(5+(93*(((float)((vkcheck)?vkcheck->NewIndex():key->Index()))/highIndex))); + if (newperc > perc) { + perc = newperc; + (*percent)(perc, percentUserData); + } + else if (newperc < perc) { +#ifndef _MSC_VER + std::cerr << "Serious error: new percentage complete is less than previous value\n"; + std::cerr << "using vk? " << ((vkcheck)?"yes":"no") << "\n"; + std::cerr << "index: " << ((vkcheck)?vkcheck->NewIndex():key->Index()) << "\n"; + std::cerr << "highIndex: " << highIndex << "\n"; + std::cerr << "newperc ==" << (int)newperc << "%" << "is smaller than\n"; + std::cerr << "perc == " << (int )perc << "% \n"; +#endif + } + if (searchType >= 0) { + if (!regexec(&preg, StripText(), 0, 0, 0)) { + *resultKey = *getKey(); + resultKey->clearBound(); + listKey << *resultKey; + } + } + + // phrase + else { + SWBuf textBuf; + switch (searchType) { + + // phrase + case -1: + textBuf = StripText(); + if ((flags & REG_ICASE) == REG_ICASE) toupperstr(textBuf); + sres = strstr(textBuf.c_str(), term.c_str()); + if (sres) { //it's also in the StripText(), so we have a valid search result item now + *resultKey = *getKey(); + resultKey->clearBound(); + listKey << *resultKey; + } + break; + + // multiword + case -2: { // enclose our allocations + int loopCount = 0; + unsigned int foundWords = 0; + do { + textBuf = ((loopCount == 0)&&(!specialStrips)) ? getRawEntry() : StripText(); + foundWords = 0; + + for (unsigned int i = 0; i < words.size(); i++) { + if ((flags & REG_ICASE) == REG_ICASE) toupperstr(textBuf); + sres = strstr(textBuf.c_str(), words[i].c_str()); + if (!sres) { + break; //for loop + } + foundWords++; + } + + loopCount++; + } while ( (loopCount < 2) && (foundWords == words.size())); + + if ((loopCount == 2) && (foundWords == words.size())) { //we found the right words in both raw and stripped text, which means it's a valid result item + *resultKey = *getKey(); + resultKey->clearBound(); + listKey << *resultKey; + } + } break; + + // entry attributes + case -3: + RenderText(); // force parse + AttributeTypeList &entryAttribs = getEntryAttributes(); + AttributeTypeList::iterator i1Start, i1End; + AttributeList::iterator i2Start, i2End; + AttributeValue::iterator i3Start, i3End; + + if ((words.size()) && (words[0].length())) { + i1Start = entryAttribs.find(words[0]); + i1End = i1Start; + if (i1End != entryAttribs.end()) + i1End++; + } + else { + i1Start = entryAttribs.begin(); + i1End = entryAttribs.end(); + } + for (;i1Start != i1End; i1Start++) { + if ((words.size()>1) && (words[1].length())) { + i2Start = i1Start->second.find(words[1]); + i2End = i2Start; + if (i2End != i1Start->second.end()) + i2End++; + } + else { + i2Start = i1Start->second.begin(); + i2End = i1Start->second.end(); + } + for (;i2Start != i2End; i2Start++) { + if ((words.size()>2) && (words[2].length())) { + i3Start = i2Start->second.find(words[2]); + i3End = i3Start; + if (i3End != i2Start->second.end()) + i3End++; + } + else { + i3Start = i2Start->second.begin(); + i3End = i2Start->second.end(); + } + for (;i3Start != i3End; i3Start++) { + if ((words.size()>3) && (words[3].length())) { + if (flags & SEARCHFLAG_MATCHWHOLEENTRY) { + bool found = !(((flags & REG_ICASE) == REG_ICASE) ? sword::stricmp(i3Start->second.c_str(), words[3]) : strcmp(i3Start->second.c_str(), words[3])); + sres = (found) ? i3Start->second.c_str() : 0; + } + else { + sres = ((flags & REG_ICASE) == REG_ICASE) ? stristr(i3Start->second.c_str(), words[3]) : strstr(i3Start->second.c_str(), words[3]); + } + if (sres) { + *resultKey = *getKey(); + resultKey->clearBound(); + listKey << *resultKey; + break; + } + } + } + if (i3Start != i3End) + break; + } + if (i2Start != i2End) + break; + } + break; + } // end switch + } + (*this)++; + } + + + // cleaup work + if (searchType >= 0) + regfree(&preg); + + setKey(*saveKey); + + if (!saveKey->Persist()) + delete saveKey; + + if (searchKey) + delete searchKey; + delete resultKey; + + listKey = TOP; + processEntryAttributes(savePEA); + + + (*percent)(100, percentUserData); + + + return listKey; +} + + +/****************************************************************************** + * SWModule::StripText() - calls all stripfilters on current text + * + * ENT: buf - buf to massage instead of this modules current text + * len - max len of buf + * + * RET: this module's text at current key location massaged by Strip filters + */ + +const char *SWModule::StripText(const char *buf, int len) { + return RenderText(buf, len, false); +} + + +/****************************************************************************** + * SWModule::RenderText - calls all renderfilters on current text + * + * ENT: buf - buffer to Render instead of current module position + * + * RET: this module's text at current key location massaged by RenderText filters + */ + + const char *SWModule::RenderText(const char *buf, int len, bool render) { + entryAttributes.clear(); + + static SWBuf local; + if (buf) + local = buf; + + SWBuf &tmpbuf = (buf) ? local : getRawEntryBuf(); + SWKey *key = 0; + static const char *null = ""; + + if (tmpbuf) { + unsigned long size = (len < 0) ? ((getEntrySize()<0) ? strlen(tmpbuf) : getEntrySize()) : len; + if (size > 0) { + key = (SWKey *)*this; + + optionFilter(tmpbuf, key); + + if (render) { + renderFilter(tmpbuf, key); + encodingFilter(tmpbuf, key); + } + else stripFilter(tmpbuf, key); + } + } + else { + tmpbuf = null; + } + + return tmpbuf; +} + + +/****************************************************************************** + * SWModule::RenderText - calls all renderfilters on current text + * + * ENT: tmpKey - key to use to grab text + * + * RET: this module's text at current key location massaged by RenderFilers + */ + + const char *SWModule::RenderText(SWKey *tmpKey) { + SWKey *saveKey; + const char *retVal; + + if (!key->Persist()) { + saveKey = CreateKey(); + *saveKey = *key; + } + else saveKey = key; + + setKey(*tmpKey); + + retVal = RenderText(); + + setKey(*saveKey); + + if (!saveKey->Persist()) + delete saveKey; + + return retVal; +} + + +/****************************************************************************** + * SWModule::StripText - calls all StripTextFilters on current text + * + * ENT: tmpKey - key to use to grab text + * + * RET: this module's text at specified key location massaged by Strip filters + */ + +const char *SWModule::StripText(SWKey *tmpKey) { + SWKey *saveKey; + const char *retVal; + + if (!key->Persist()) { + saveKey = CreateKey(); + *saveKey = *key; + } + else saveKey = key; + + setKey(*tmpKey); + + retVal = StripText(); + + setKey(*saveKey); + + if (!saveKey->Persist()) + delete saveKey; + + return retVal; +} + + +const char *SWModule::getConfigEntry(const char *key) const { + ConfigEntMap::iterator it = config->find(key); + return (it != config->end()) ? it->second.c_str() : 0; +} + + +void SWModule::setConfig(ConfigEntMap *config) { + this->config = config; +} + + +bool SWModule::hasSearchFramework() { +#ifdef USELUCENE + return true; +#else + return SWSearchable::hasSearchFramework(); +#endif +} + +void SWModule::deleteSearchFramework() { +#ifdef USELUCENE + SWBuf target = getConfigEntry("AbsoluteDataPath"); + char ch = target.c_str()[strlen(target.c_str())-1]; + if ((ch != '/') && (ch != '\\')) + target.append('/'); + target.append("lucene"); + + FileMgr::removeDir(target.c_str()); +#else + SWSearchable::deleteSearchFramework(); +#endif +} + + +signed char SWModule::createSearchFramework(void (*percent)(char, void *), void *percentUserData) { +#ifdef USELUCENE + SWKey *saveKey = 0; + SWKey *searchKey = 0; + SWKey textkey; + SWBuf c; + + + // turn all filters to default values + StringList filterSettings; + for (OptionFilterList::iterator filter = optionFilters->begin(); filter != optionFilters->end(); filter++) { + filterSettings.push_back((*filter)->getOptionValue()); + (*filter)->setOptionValue(*((*filter)->getOptionValues().begin())); + + if (!strcmp("Greek Accents", (*filter)->getOptionName())) { + (*filter)->setOptionValue("Off"); + } + } + + + // be sure we give CLucene enough file handles + FileMgr::getSystemFileMgr()->flush(); + + // save key information so as not to disrupt original + // module position + if (!key->Persist()) { + saveKey = CreateKey(); + *saveKey = *key; + } + else saveKey = key; + + searchKey = (key->Persist())?key->clone():0; + if (searchKey) { + searchKey->Persist(1); + setKey(*searchKey); + } + + RAMDirectory *ramDir = NULL; + IndexWriter *coreWriter = NULL; + IndexWriter *fsWriter = NULL; + Directory *d = NULL; + + standard::StandardAnalyzer *an = new standard::StandardAnalyzer(); + SWBuf target = getConfigEntry("AbsoluteDataPath"); + bool includeKeyInSearch = getConfig().has("SearchOption", "IncludeKeyInSearch"); + char ch = target.c_str()[strlen(target.c_str())-1]; + if ((ch != '/') && (ch != '\\')) + target.append('/'); + target.append("lucene"); + FileMgr::createParent(target+"/dummy"); + + ramDir = new RAMDirectory(); + coreWriter = new IndexWriter(ramDir, an, true); + + + + char perc = 1; + VerseKey *vkcheck = 0; + vkcheck = SWDYNAMIC_CAST(VerseKey, key); + + TreeKeyIdx *tkcheck = 0; + tkcheck = SWDYNAMIC_CAST(TreeKeyIdx, key); + + + *this = BOTTOM; + long highIndex = (vkcheck)?32300/*vkcheck->NewIndex()*/:key->Index(); + if (!highIndex) + highIndex = 1; // avoid division by zero errors. + + bool savePEA = isProcessEntryAttributes(); + processEntryAttributes(true); + + // prox chapter blocks + // position module at the beginning + *this = TOP; + + VerseKey chapMax; + SWBuf proxBuf; + SWBuf proxLem; + SWBuf strong; + + const short int MAX_CONV_SIZE = 2047; + wchar_t wcharBuffer[MAX_CONV_SIZE + 1]; + + char err = Error(); + while (!err) { + long mindex = 0; + if (vkcheck) + mindex = vkcheck->NewIndex(); + else mindex = key->Index(); + + proxBuf = ""; + proxLem = ""; + + // computer percent complete so we can report to our progress callback + float per = (float)mindex / highIndex; + // between 5%-98% + per *= 93; per += 5; + char newperc = (char)per; + if (newperc > perc) { + perc = newperc; + (*percent)(perc, percentUserData); + } + + // get "content" field + const char *content = StripText(); + + bool good = false; + + // start out entry + Document *doc = new Document(); + // get "key" field + SWBuf keyText = (vkcheck) ? vkcheck->getOSISRef() : getKeyText(); + if (content && *content) { + good = true; + + + // build "strong" field + AttributeTypeList::iterator words; + AttributeList::iterator word; + AttributeValue::iterator strongVal; + + strong=""; + words = getEntryAttributes().find("Word"); + if (words != getEntryAttributes().end()) { + for (word = words->second.begin();word != words->second.end(); word++) { + int partCount = atoi(word->second["PartCount"]); + if (!partCount) partCount = 1; + for (int i = 0; i < partCount; i++) { + SWBuf tmp = "Lemma"; + if (partCount > 1) tmp.appendFormatted(".%d", i+1); + strongVal = word->second.find(tmp); + if (strongVal != word->second.end()) { + // cheeze. skip empty article tags that weren't assigned to any text + if (strongVal->second == "G3588") { + if (word->second.find("Text") == word->second.end()) + continue; // no text? let's skip + } + strong.append(strongVal->second); + strong.append(' '); + } + } + } + } + + lucene_utf8towcs(wcharBuffer, keyText, MAX_CONV_SIZE); //keyText must be utf8 + doc->add( *Field::Text(_T("key"), wcharBuffer ) ); + + if (includeKeyInSearch) { + c = keyText; + c += " "; + c += content; + content = c.c_str(); + } + + lucene_utf8towcs(wcharBuffer, content, MAX_CONV_SIZE); //content must be utf8 + doc->add( *Field::UnStored(_T("content"), wcharBuffer) ); + + if (strong.length() > 0) { + lucene_utf8towcs(wcharBuffer, strong, MAX_CONV_SIZE); + doc->add( *Field::UnStored(_T("lemma"), wcharBuffer) ); +//printf("setting fields (%s).\ncontent: %s\nlemma: %s\n", (const char *)*key, content, strong.c_str()); + } + +//printf("setting fields (%s).\n", (const char *)*key); +//fflush(stdout); + } + // don't write yet, cuz we have to see if we're the first of a prox block (5:1 or chapter5/verse1 + + // for VerseKeys use chapter + if (vkcheck) { + chapMax = *vkcheck; + // we're the first verse in a chapter + if (vkcheck->Verse() == 1) { + chapMax = MAXVERSE; + VerseKey saveKey = *vkcheck; + while ((!err) && (*vkcheck <= chapMax)) { +//printf("building proxBuf from (%s).\nproxBuf.c_str(): %s\n", (const char *)*key, proxBuf.c_str()); +//printf("building proxBuf from (%s).\n", (const char *)*key); + + content = StripText(); + if (content && *content) { + // build "strong" field + strong = ""; + AttributeTypeList::iterator words; + AttributeList::iterator word; + AttributeValue::iterator strongVal; + + words = getEntryAttributes().find("Word"); + if (words != getEntryAttributes().end()) { + for (word = words->second.begin();word != words->second.end(); word++) { + int partCount = atoi(word->second["PartCount"]); + if (!partCount) partCount = 1; + for (int i = 0; i < partCount; i++) { + SWBuf tmp = "Lemma"; + if (partCount > 1) tmp.appendFormatted(".%d", i+1); + strongVal = word->second.find(tmp); + if (strongVal != word->second.end()) { + // cheeze. skip empty article tags that weren't assigned to any text + if (strongVal->second == "G3588") { + if (word->second.find("Text") == word->second.end()) + continue; // no text? let's skip + } + strong.append(strongVal->second); + strong.append(' '); + } + } + } + } + proxBuf += content; + proxBuf.append(' '); + proxLem += strong; + if (proxLem.length()) + proxLem.append("\n"); + } + (*this)++; + err = Error(); + } + err = 0; + *vkcheck = saveKey; + } + } + + // for TreeKeys use siblings if we have no children + else if (tkcheck) { + if (!tkcheck->hasChildren()) { + if (!tkcheck->previousSibling()) { + do { +//printf("building proxBuf from (%s).\n", (const char *)*key); +//fflush(stdout); + + content = StripText(); + if (content && *content) { + // build "strong" field + strong = ""; + AttributeTypeList::iterator words; + AttributeList::iterator word; + AttributeValue::iterator strongVal; + + words = getEntryAttributes().find("Word"); + if (words != getEntryAttributes().end()) { + for (word = words->second.begin();word != words->second.end(); word++) { + int partCount = atoi(word->second["PartCount"]); + if (!partCount) partCount = 1; + for (int i = 0; i < partCount; i++) { + SWBuf tmp = "Lemma"; + if (partCount > 1) tmp.appendFormatted(".%d", i+1); + strongVal = word->second.find(tmp); + if (strongVal != word->second.end()) { + // cheeze. skip empty article tags that weren't assigned to any text + if (strongVal->second == "G3588") { + if (word->second.find("Text") == word->second.end()) + continue; // no text? let's skip + } + strong.append(strongVal->second); + strong.append(' '); + } + } + } + } + + proxBuf += content; + proxBuf.append(' '); + proxLem += strong; + if (proxLem.length()) + proxLem.append("\n"); + } + } while (tkcheck->nextSibling()); + tkcheck->parent(); + tkcheck->firstChild(); + } + else tkcheck->nextSibling(); // reposition from our previousSibling test + } + } + + if (proxBuf.length() > 0) { + + lucene_utf8towcs(wcharBuffer, proxBuf, MAX_CONV_SIZE); //keyText must be utf8 + +//printf("proxBuf after (%s).\nprox: %s\nproxLem: %s\n", (const char *)*key, proxBuf.c_str(), proxLem.c_str()); + + doc->add( *Field::UnStored(_T("prox"), wcharBuffer) ); + good = true; + } + if (proxLem.length() > 0) { + lucene_utf8towcs(wcharBuffer, proxLem, MAX_CONV_SIZE); //keyText must be utf8 + doc->add( *Field::UnStored(_T("proxlem"), wcharBuffer) ); + good = true; + } + if (good) { +//printf("writing (%s).\n", (const char *)*key); +//fflush(stdout); + coreWriter->addDocument(doc); + } + delete doc; + + (*this)++; + err = Error(); + } + + // Optimizing automatically happens with the call to addIndexes + //coreWriter->optimize(); + coreWriter->close(); + + if (IndexReader::indexExists(target.c_str())) { + d = FSDirectory::getDirectory(target.c_str(), false); + if (IndexReader::isLocked(d)) { + IndexReader::unlock(d); + } + + fsWriter = new IndexWriter( d, an, false); + } else { + d = FSDirectory::getDirectory(target.c_str(), true); + fsWriter = new IndexWriter( d ,an, true); + } + + Directory *dirs[] = { ramDir, 0 }; + fsWriter->addIndexes(dirs); + fsWriter->close(); + + delete ramDir; + delete coreWriter; + delete fsWriter; + delete an; + + // reposition module back to where it was before we were called + setKey(*saveKey); + + if (!saveKey->Persist()) + delete saveKey; + + if (searchKey) + delete searchKey; + + processEntryAttributes(savePEA); + + // reset option filters back to original values + StringList::iterator origVal = filterSettings.begin(); + for (OptionFilterList::iterator filter = optionFilters->begin(); filter != optionFilters->end(); filter++) { + (*filter)->setOptionValue(*origVal++); + } + + return 0; +#else + return SWSearchable::createSearchFramework(percent, percentUserData); +#endif +} + +/** OptionFilterBuffer a text buffer + * @param filters the FilterList of filters to iterate + * @param buf the buffer to filter + * @param key key location from where this buffer was extracted + */ +void SWModule::filterBuffer(OptionFilterList *filters, SWBuf &buf, SWKey *key) { + OptionFilterList::iterator it; + for (it = filters->begin(); it != filters->end(); it++) { + (*it)->processText(buf, key, this); + } +} + +/** FilterBuffer a text buffer + * @param filters the FilterList of filters to iterate + * @param buf the buffer to filter + * @param key key location from where this buffer was extracted + */ +void SWModule::filterBuffer(FilterList *filters, SWBuf &buf, SWKey *key) { + FilterList::iterator it; + for (it = filters->begin(); it != filters->end(); it++) { + (*it)->processText(buf, key, this); + } +} + +signed char SWModule::createModule(const char*) { + return -1; +} + +void SWModule::setEntry(const char*, long) { +} + +void SWModule::linkEntry(const SWKey*) { +} + +SWORD_NAMESPACE_END diff --git a/src/modules/tests/Makefile b/src/modules/tests/Makefile new file mode 100644 index 0000000..81f7721 --- /dev/null +++ b/src/modules/tests/Makefile @@ -0,0 +1,4 @@ +root := ../../.. + +all: + make -C ${root} diff --git a/src/modules/tests/echomod.cpp b/src/modules/tests/echomod.cpp new file mode 100644 index 0000000..2640773 --- /dev/null +++ b/src/modules/tests/echomod.cpp @@ -0,0 +1,27 @@ +/****************************************************************************** + * echomod.cpp - code for class 'echomod'- a dummy test text module that just + * echos back the key + */ + +#include + + +SWORD_NAMESPACE_START + +EchoMod::EchoMod() : SWText("echomod", "Echos back key") +{ +} + + +EchoMod::~EchoMod() { +} + + +SWBuf &EchoMod::getRawEntryBuf() +{ + static SWBuf retVal; + retVal = *key; + return retVal; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/texts/Makefile b/src/modules/texts/Makefile new file mode 100644 index 0000000..1a2d00d --- /dev/null +++ b/src/modules/texts/Makefile @@ -0,0 +1,5 @@ + +root := ../../.. + +all: + make -C ${root} diff --git a/src/modules/texts/Makefile.am b/src/modules/texts/Makefile.am new file mode 100644 index 0000000..f5d81b4 --- /dev/null +++ b/src/modules/texts/Makefile.am @@ -0,0 +1,7 @@ +textsdir = $(top_srcdir)/src/modules/texts + +libsword_la_SOURCES += $(textsdir)/swtext.cpp + +include ../src/modules/texts/rawtext/Makefile.am +include ../src/modules/texts/rawtext4/Makefile.am +include ../src/modules/texts/ztext/Makefile.am diff --git a/src/modules/texts/rawtext/Makefile b/src/modules/texts/rawtext/Makefile new file mode 100644 index 0000000..35d6648 --- /dev/null +++ b/src/modules/texts/rawtext/Makefile @@ -0,0 +1,5 @@ + +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/texts/rawtext/Makefile.am b/src/modules/texts/rawtext/Makefile.am new file mode 100644 index 0000000..5d77e44 --- /dev/null +++ b/src/modules/texts/rawtext/Makefile.am @@ -0,0 +1,2 @@ +rawtextdir = $(top_srcdir)/src/modules/texts/rawtext +libsword_la_SOURCES += $(rawtextdir)/rawtext.cpp diff --git a/src/modules/texts/rawtext/rawtext.cpp b/src/modules/texts/rawtext/rawtext.cpp new file mode 100644 index 0000000..3245da6 --- /dev/null +++ b/src/modules/texts/rawtext/rawtext.cpp @@ -0,0 +1,548 @@ +/****************************************************************************** + * rawtext.cpp - code for class 'RawText'- a module that reads raw text files: + * ot and nt using indexs ??.bks ??.cps ??.vss + */ + + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include // GNU +#include +#include +#include + +#ifndef USELUCENE +using std::map; +using std::list; +using std::find; +#endif + +SWORD_NAMESPACE_START + +#ifndef USELUCENE +typedef map < SWBuf, list > strlist; +typedef list longlist; +#endif + +/****************************************************************************** + * RawText Constructor - Initializes data for instance of RawText + * + * ENT: iname - Internal name for module + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +RawText::RawText(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) + : SWText(iname, idesc, idisp, enc, dir, mark, ilang), + RawVerse(ipath) { + +#ifndef USELUCENE + SWBuf fname; + fname = path; + char ch = fname.c_str()[strlen(fname.c_str())-1]; + if ((ch != '/') && (ch != '\\')) + fname += "/"; + + for (int loop = 0; loop < 2; loop++) { + fastSearch[loop] = 0; + SWBuf fastidxname =(fname + ((loop)?"ntwords.dat":"otwords.dat")); + if (FileMgr::existsFile(fastidxname.c_str())) { + fastidxname = (fname + ((loop)?"ntwords.idx":"otwords.idx")); + if (FileMgr::existsFile(fastidxname.c_str())) + fastSearch[loop] = new RawStr((fname + ((loop)?"ntwords":"otwords")).c_str()); + } + } +#endif +} + + +/****************************************************************************** + * RawText Destructor - Cleans up instance of RawText + */ + +RawText::~RawText() { +#ifndef USELUCENE + if (fastSearch[0]) + delete fastSearch[0]; + + if (fastSearch[1]) + delete fastSearch[1]; +#endif +} + + +bool RawText::isWritable() { + return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} + + +/****************************************************************************** + * RawText::getRawEntry - Returns the correct verse when char * cast + * is requested + * + * RET: string buffer with verse + */ + +SWBuf &RawText::getRawEntryBuf() { + long start = 0; + unsigned short size = 0; + VerseKey &key = getVerseKey(); + + findOffset(key.Testament(), key.Index(), &start, &size); + entrySize = size; // support getEntrySize call + + entryBuf = ""; + readText(key.Testament(), start, size, entryBuf); + + rawFilter(entryBuf, 0); // hack, decipher + rawFilter(entryBuf, &key); + +// if (!isUnicode()) + prepText(entryBuf); + + return entryBuf; +} + + +signed char RawText::createSearchFramework(void (*percent)(char, void *), void *percentUserData) { +#ifndef USELUCENE + SWKey *savekey = 0; + SWKey *searchkey = 0; + SWKey textkey; + char *word = 0; + char *wordBuf = 0; + + // dictionary holds words associated with a list + // containing every module position that contains + // the word. [0] Old Testament; [1] NT + map < SWBuf, list > dictionary[2]; + + + // save key information so as not to disrupt original + // module position + if (!key->Persist()) { + savekey = CreateKey(); + *savekey = *key; + } + else savekey = key; + + searchkey = (key->Persist())?key->clone():0; + if (searchkey) { + searchkey->Persist(1); + setKey(*searchkey); + } + + // position module at the beginning + *this = TOP; + + VerseKey *lkey = (VerseKey *)key; + + // iterate thru each entry in module + while (!Error()) { + long index = lkey->Index(); + wordBuf = (char *)calloc(sizeof(char), strlen(StripText()) + 1); + strcpy(wordBuf, StripText()); + + // grab each word from the text + word = strtok(wordBuf, " !.,?;:()-=+/\\|{}[]\"<>"); + while (word) { + + // make word upper case + toupperstr(word); + + // lookup word in dictionary (or make entry in dictionary + // for this word) and add this module position (index) to + // the word's associated list of module positions + dictionary[lkey->Testament()-1][word].push_back(index); + word = strtok(NULL, " !.,?;:()-=+/\\|{}[]\"<>"); + } + free(wordBuf); + (*this)++; + } + + // reposition module back to where it was before we were called + setKey(*savekey); + + if (!savekey->Persist()) + delete savekey; + + if (searchkey) + delete searchkey; + + + // --------- Let's output an index from our dictionary ----------- + FileDesc *datfd; + FileDesc *idxfd; + strlist::iterator it; + longlist::iterator it2; + unsigned long offset, entryoff; + unsigned short size; + + SWBuf fname; + fname = path; + char ch = fname.c_str()[strlen(fname.c_str())-1]; + if ((ch != '/') && (ch != '\\')) + fname += "/"; + + // for old and new testament do... + for (int loop = 0; loop < 2; loop++) { + datfd = FileMgr::getSystemFileMgr()->open((fname + ((loop)?"ntwords.dat":"otwords.dat")).c_str(), FileMgr::CREAT|FileMgr::WRONLY, 00644); + if (datfd->getFd() == -1) + return -1; + idxfd = FileMgr::getSystemFileMgr()->open((fname + ((loop)?"ntwords.idx":"otwords.idx")).c_str(), FileMgr::CREAT|FileMgr::WRONLY, 00644); + if (idxfd->getFd() == -1) { + FileMgr::getSystemFileMgr()->close(datfd); + return -1; + } + + // iterate thru each word in the dictionary + for (it = dictionary[loop].begin(); it != dictionary[loop].end(); it++) { + printf("%s: ", it->first.c_str()); + + // get our current offset in our word.dat file and write this as the start + // of the next entry in our database + offset = datfd->seek(0, SEEK_CUR); + idxfd->write(&offset, 4); + + // write our word out to the word.dat file, delineating with a \n + datfd->write(it->first.c_str(), strlen(it->first.c_str())); + datfd->write("\n", 1); + + // force our mod position list for this word to be unique (remove + // duplicates that may exist if the word was found more than once + // in the verse + it->second.unique(); + + // iterate thru each mod position for this word and output it to + // our database + unsigned short count = 0; + for (it2 = it->second.begin(); it2 != it->second.end(); it2++) { + entryoff= *it2; + datfd->write(&entryoff, 4); + count++; + } + + // now see what our new position is in our word.dat file and + // determine the size of this database entry + size = datfd->seek(0, SEEK_CUR) - offset; + + // store the size of this database entry + idxfd->write(&size, 2); + printf("%d entries (size: %d)\n", count, size); + } + FileMgr::getSystemFileMgr()->close(datfd); + FileMgr::getSystemFileMgr()->close(idxfd); + } + return 0; +#else + return SWModule::createSearchFramework(percent, percentUserData); +#endif +} + + +void RawText::deleteSearchFramework() { +#ifndef USELUCENE + SWBuf target = path; + char ch = target.c_str()[strlen(target.c_str())-1]; + if ((ch != '/') && (ch != '\\')) + target += "/lucene"; + FileMgr::removeFile(target + "ntwords.dat"); + FileMgr::removeFile(target + "otwords.dat"); + FileMgr::removeFile(target + "ntwords.idx"); + FileMgr::removeFile(target + "otwords.idx"); +#else + SWModule::deleteSearchFramework(); +#endif +} + + +/****************************************************************************** + * SWModule::search - Searches a module for a string + * + * ENT: istr - string for which to search + * searchType - type of search to perform + * >=0 - regex + * -1 - phrase + * -2 - multiword + * flags - options flags for search + * justCheckIfSupported - if set, don't search, only tell if this + * function supports requested search. + * + * RET: ListKey set to verses that contain istr + */ + +ListKey &RawText::search(const char *istr, int searchType, int flags, SWKey *scope, bool *justCheckIfSupported, void (*percent)(char, void *), void *percentUserData) { +#ifndef USELUCENE + listKey.ClearList(); + + if ((fastSearch[0]) && (fastSearch[1])) { + + switch (searchType) { + case -2: { + + if ((flags & REG_ICASE) != REG_ICASE) // if haven't chosen to + // ignore case + break; // can't handle fast case sensitive searches + + // test to see if our scope for this search is bounded by a + // VerseKey + VerseKey *testKeyType = 0; + SWTRY { + testKeyType = SWDYNAMIC_CAST(VerseKey, ((scope)?scope:key)); + } + SWCATCH ( ... ) {} + // if we don't have a VerseKey * decendant we can't handle + // because of scope. + // In the future, add bool SWKey::isValid(const char *tryString); + if (!testKeyType) + break; + + + // check if we just want to see if search is supported. + // If we've gotten this far, then it is supported. + if (justCheckIfSupported) { + *justCheckIfSupported = true; + return listKey; + } + + SWKey saveKey = *testKeyType; // save current place + + char error = 0; + char **words = 0; + char *wordBuf = 0; + int wordCount = 0; + long start; + unsigned short size; + char *idxbuf = 0; + SWBuf datBuf; + list indexes; + list indexes2; + VerseKey vk; + vk = TOP; + + (*percent)(10, percentUserData); + + // toupper our copy of search string + stdstr(&wordBuf, istr); + toupperstr(wordBuf); + + // get list of individual words + words = (char **)calloc(sizeof(char *), 10); + int allocWords = 10; + words[wordCount] = strtok(wordBuf, " "); + while (words[wordCount]) { + wordCount++; + if (wordCount == allocWords) { + allocWords+=10; + words = (char **)realloc(words, sizeof(char *)*allocWords); + } + words[wordCount] = strtok(NULL, " "); + } + + (*percent)(20, percentUserData); + + // clear our result set + indexes.erase(indexes.begin(), indexes.end()); + + // search both old and new testament indexes + for (int j = 0; j < 2; j++) { + // iterate thru each word the user passed to us. + for (int i = 0; i < wordCount; i++) { + + // clear this word's result set + indexes2.erase(indexes2.begin(), indexes2.end()); + error = 0; + + // iterate thru every word in the database that starts + // with our search word + for (int away = 0; !error; away++) { + idxbuf = 0; + + // find our word in the database and jump ahead _away_ + error = fastSearch[j]->findOffset(words[i], &start, &size, away); + + // get the word from the database + fastSearch[j]->getIDXBufDat(start, &idxbuf); + + // check to see if it starts with our target word + if (strlen(idxbuf) > strlen(words[i])) + idxbuf[strlen(words[i])] = 0; +// else words[i][strlen(idxbuf)] = 0; + if (!strcmp(idxbuf, words[i])) { + + // get data for this word from database + delete [] idxbuf; + idxbuf = 0; + datBuf = ""; + fastSearch[j]->readText(start, &size, &idxbuf, datBuf); + + // we know that the data consists of sizof(long) + // records each a valid module position that constains + // this word + // + // iterate thru each of these module positions + long *keyindex = (long *)datBuf.getRawData(); + while (keyindex < (long *)(datBuf.getRawData() + size - (strlen(idxbuf) + 1))) { + if (i) { // if we're not on our first word + + // check to see if this word is already in the result set. + // This is our AND functionality + if (find(indexes.begin(), indexes.end(), *keyindex) != indexes.end()) + // add to new result set + indexes2.push_back(*keyindex); + } + else indexes2.push_back(*keyindex); + keyindex++; + } + } + else error = 1; // no more matches + free(idxbuf); + } + + // make new result set final result set + indexes = indexes2; + + percent((char)(20 + (float)((j*wordCount)+i)/(wordCount * 2) * 78), percentUserData); + } + + // indexes contains our good verses, lets return them in a listKey + indexes.sort(); + + // iterate thru each good module position that meets the search + for (longlist::iterator it = indexes.begin(); it != indexes.end(); it++) { + + // set a temporary verse key to this module position + vk.Testament(j+1); + vk.Error(); + vk.Index(*it); + + // check scope + // Try to set our scope key to this verse key + if (scope) { + *testKeyType = vk; + + // check to see if it set ok and if so, add to our return list + if (*testKeyType == vk) + listKey << (const char *) vk; + } + else listKey << (const char*) vk; + } + } + (*percent)(98, percentUserData); + + free(words); + free(wordBuf); + + *testKeyType = saveKey; // set current place back to original + + listKey = TOP; + (*percent)(100, percentUserData); + return listKey; + } + + default: + break; + } + } + + // check if we just want to see if search is supported + if (justCheckIfSupported) { + *justCheckIfSupported = false; + return listKey; + } + +#endif + // if we don't support this search, fall back to base class + return SWModule::search(istr, searchType, flags, scope, justCheckIfSupported, percent, percentUserData); +} + + +void RawText::setEntry(const char *inbuf, long len) { + VerseKey &key = getVerseKey(); + doSetText(key.Testament(), key.Index(), inbuf, len); +} + + +void RawText::linkEntry(const SWKey *inkey) { + VerseKey &destkey = getVerseKey(); + const VerseKey *srckey = 0; + + // see if we have a VerseKey * or decendant + SWTRY { + srckey = SWDYNAMIC_CAST(VerseKey, inkey); + } + SWCATCH ( ... ) {} + // if we don't have a VerseKey * decendant, create our own + if (!srckey) + srckey = new VerseKey(inkey); + + doLinkEntry(destkey.Testament(), destkey.Index(), srckey->Index()); + + if (inkey != srckey) // free our key if we created a VerseKey + delete srckey; +} + + +/****************************************************************************** + * RawText::deleteEntry - deletes this entry + * + * RET: *this + */ + +void RawText::deleteEntry() { + VerseKey &key = getVerseKey(); + doSetText(key.Testament(), key.Index(), ""); +} + +/****************************************************************************** + * RawText::increment - Increments module key a number of entries + * + * ENT: increment - Number of entries to jump forward + * + * RET: *this + */ + +void RawText::increment(int steps) { + long start; + unsigned short size; + VerseKey *tmpkey = &getVerseKey(); + + findOffset(tmpkey->Testament(), tmpkey->Index(), &start, &size); + + SWKey lastgood = *tmpkey; + while (steps) { + long laststart = start; + unsigned short lastsize = size; + SWKey lasttry = *tmpkey; + (steps > 0) ? (*key)++ : (*key)--; + tmpkey = &getVerseKey(); + + if ((error = key->Error())) { + *key = lastgood; + break; + } + long index = tmpkey->Index(); + findOffset(tmpkey->Testament(), index, &start, &size); + if ( + (((laststart != start) || (lastsize != size)) // we're a different entry +// && (start > 0) + && (size)) // and we actually have a size + ||(!skipConsecutiveLinks)) { // or we don't want to skip consecutive links + steps += (steps < 0) ? 1 : -1; + lastgood = *tmpkey; + } + } + error = (error) ? KEYERR_OUTOFBOUNDS : 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/texts/rawtext4/Makefile.am b/src/modules/texts/rawtext4/Makefile.am new file mode 100644 index 0000000..1f3791d --- /dev/null +++ b/src/modules/texts/rawtext4/Makefile.am @@ -0,0 +1,2 @@ +rawtext4dir = $(top_srcdir)/src/modules/texts/rawtext4 +libsword_la_SOURCES += $(rawtext4dir)/rawtext4.cpp diff --git a/src/modules/texts/rawtext4/rawtext4.cpp b/src/modules/texts/rawtext4/rawtext4.cpp new file mode 100644 index 0000000..a06691e --- /dev/null +++ b/src/modules/texts/rawtext4/rawtext4.cpp @@ -0,0 +1,548 @@ +/****************************************************************************** + * rawtext4.cpp - code for class 'RawText4'- a module that reads raw text files: + * ot and nt using indexs ??.bks ??.cps ??.vss + */ + + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include // GNU +#include +#include +#include + +#ifndef USELUCENE +using std::map; +using std::list; +using std::find; +#endif + +SWORD_NAMESPACE_START + +#ifndef USELUCENE +typedef map < SWBuf, list > strlist; +typedef list longlist; +#endif + +/****************************************************************************** + * RawText4 Constructor - Initializes data for instance of RawText4 + * + * ENT: iname - Internal name for module + * idesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +RawText4::RawText4(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) + : SWText(iname, idesc, idisp, enc, dir, mark, ilang), + RawVerse4(ipath) { + +#ifndef USELUCENE + SWBuf fname; + fname = path; + char ch = fname.c_str()[strlen(fname.c_str())-1]; + if ((ch != '/') && (ch != '\\')) + fname += "/"; + + for (int loop = 0; loop < 2; loop++) { + fastSearch[loop] = 0; + SWBuf fastidxname =(fname + ((loop)?"ntwords.dat":"otwords.dat")); + if (FileMgr::existsFile(fastidxname.c_str())) { + fastidxname = (fname + ((loop)?"ntwords.idx":"otwords.idx")); + if (FileMgr::existsFile(fastidxname.c_str())) + fastSearch[loop] = new RawStr4((fname + ((loop)?"ntwords":"otwords")).c_str()); + } + } +#endif +} + + +/****************************************************************************** + * RawText4 Destructor - Cleans up instance of RawText4 + */ + +RawText4::~RawText4() { +#ifndef USELUCENE + if (fastSearch[0]) + delete fastSearch[0]; + + if (fastSearch[1]) + delete fastSearch[1]; +#endif +} + + +bool RawText4::isWritable() { + return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & FileMgr::RDWR) == FileMgr::RDWR)); +} + + +/****************************************************************************** + * RawText4::getRawEntry - Returns the correct verse when char * cast + * is requested + * + * RET: string buffer with verse + */ + +SWBuf &RawText4::getRawEntryBuf() { + long start = 0; + unsigned long size = 0; + VerseKey &key = getVerseKey(); + + findOffset(key.Testament(), key.Index(), &start, &size); + entrySize = size; // support getEntrySize call + + entryBuf = ""; + readText(key.Testament(), start, size, entryBuf); + + rawFilter(entryBuf, 0); // hack, decipher + rawFilter(entryBuf, &key); + +// if (!isUnicode()) + prepText(entryBuf); + + return entryBuf; +} + + +signed char RawText4::createSearchFramework(void (*percent)(char, void *), void *percentUserData) { +#ifndef USELUCENE + SWKey *savekey = 0; + SWKey *searchkey = 0; + SWKey textkey; + char *word = 0; + char *wordBuf = 0; + + // dictionary holds words associated with a list + // containing every module position that contains + // the word. [0] Old Testament; [1] NT + map < SWBuf, list > dictionary[2]; + + + // save key information so as not to disrupt original + // module position + if (!key->Persist()) { + savekey = CreateKey(); + *savekey = *key; + } + else savekey = key; + + searchkey = (key->Persist())?key->clone():0; + if (searchkey) { + searchkey->Persist(1); + setKey(*searchkey); + } + + // position module at the beginning + *this = TOP; + + VerseKey *lkey = (VerseKey *)key; + + // iterate thru each entry in module + while (!Error()) { + long index = lkey->Index(); + wordBuf = (char *)calloc(sizeof(char), strlen(StripText()) + 1); + strcpy(wordBuf, StripText()); + + // grab each word from the text + word = strtok(wordBuf, " !.,?;:()-=+/\\|{}[]\"<>"); + while (word) { + + // make word upper case + toupperstr(word); + + // lookup word in dictionary (or make entry in dictionary + // for this word) and add this module position (index) to + // the word's associated list of module positions + dictionary[lkey->Testament()-1][word].push_back(index); + word = strtok(NULL, " !.,?;:()-=+/\\|{}[]\"<>"); + } + free(wordBuf); + (*this)++; + } + + // reposition module back to where it was before we were called + setKey(*savekey); + + if (!savekey->Persist()) + delete savekey; + + if (searchkey) + delete searchkey; + + + // --------- Let's output an index from our dictionary ----------- + FileDesc *datfd; + FileDesc *idxfd; + strlist::iterator it; + longlist::iterator it2; + unsigned long offset, entryoff; + unsigned long size; + + SWBuf fname; + fname = path; + char ch = fname.c_str()[strlen(fname.c_str())-1]; + if ((ch != '/') && (ch != '\\')) + fname += "/"; + + // for old and new testament do... + for (int loop = 0; loop < 2; loop++) { + datfd = FileMgr::getSystemFileMgr()->open((fname + ((loop)?"ntwords.dat":"otwords.dat")).c_str(), FileMgr::CREAT|FileMgr::WRONLY, 00644); + if (datfd->getFd() == -1) + return -1; + idxfd = FileMgr::getSystemFileMgr()->open((fname + ((loop)?"ntwords.idx":"otwords.idx")).c_str(), FileMgr::CREAT|FileMgr::WRONLY, 00644); + if (idxfd->getFd() == -1) { + FileMgr::getSystemFileMgr()->close(datfd); + return -1; + } + + // iterate thru each word in the dictionary + for (it = dictionary[loop].begin(); it != dictionary[loop].end(); it++) { + printf("%s: ", it->first.c_str()); + + // get our current offset in our word.dat file and write this as the start + // of the next entry in our database + offset = datfd->seek(0, SEEK_CUR); + idxfd->write(&offset, 4); + + // write our word out to the word.dat file, delineating with a \n + datfd->write(it->first.c_str(), strlen(it->first.c_str())); + datfd->write("\n", 1); + + // force our mod position list for this word to be unique (remove + // duplicates that may exist if the word was found more than once + // in the verse + it->second.unique(); + + // iterate thru each mod position for this word and output it to + // our database + unsigned short count = 0; + for (it2 = it->second.begin(); it2 != it->second.end(); it2++) { + entryoff= *it2; + datfd->write(&entryoff, 4); + count++; + } + + // now see what our new position is in our word.dat file and + // determine the size of this database entry + size = datfd->seek(0, SEEK_CUR) - offset; + + // store the size of this database entry + idxfd->write(&size, 4); + printf("%d entries (size: %d)\n", count, size); + } + FileMgr::getSystemFileMgr()->close(datfd); + FileMgr::getSystemFileMgr()->close(idxfd); + } + return 0; +#else + return SWModule::createSearchFramework(percent, percentUserData); +#endif +} + + +void RawText4::deleteSearchFramework() { +#ifndef USELUCENE + SWBuf target = path; + char ch = target.c_str()[strlen(target.c_str())-1]; + if ((ch != '/') && (ch != '\\')) + target += "/lucene"; + FileMgr::removeFile(target + "ntwords.dat"); + FileMgr::removeFile(target + "otwords.dat"); + FileMgr::removeFile(target + "ntwords.idx"); + FileMgr::removeFile(target + "otwords.idx"); +#else + SWModule::deleteSearchFramework(); +#endif +} + + +/****************************************************************************** + * SWModule::search - Searches a module for a string + * + * ENT: istr - string for which to search + * searchType - type of search to perform + * >=0 - regex + * -1 - phrase + * -2 - multiword + * flags - options flags for search + * justCheckIfSupported - if set, don't search, only tell if this + * function supports requested search. + * + * RET: ListKey set to verses that contain istr + */ + +ListKey &RawText4::search(const char *istr, int searchType, int flags, SWKey *scope, bool *justCheckIfSupported, void (*percent)(char, void *), void *percentUserData) { +#ifndef USELUCENE + listKey.ClearList(); + + if ((fastSearch[0]) && (fastSearch[1])) { + + switch (searchType) { + case -2: { + + if ((flags & REG_ICASE) != REG_ICASE) // if haven't chosen to + // ignore case + break; // can't handle fast case sensitive searches + + // test to see if our scope for this search is bounded by a + // VerseKey + VerseKey *testKeyType = 0; + SWTRY { + testKeyType = SWDYNAMIC_CAST(VerseKey, ((scope)?scope:key)); + } + SWCATCH ( ... ) {} + // if we don't have a VerseKey * decendant we can't handle + // because of scope. + // In the future, add bool SWKey::isValid(const char *tryString); + if (!testKeyType) + break; + + + // check if we just want to see if search is supported. + // If we've gotten this far, then it is supported. + if (justCheckIfSupported) { + *justCheckIfSupported = true; + return listKey; + } + + SWKey saveKey = *testKeyType; // save current place + + char error = 0; + char **words = 0; + char *wordBuf = 0; + int wordCount = 0; + long start; + unsigned long size; + char *idxbuf = 0; + SWBuf datBuf; + list indexes; + list indexes2; + VerseKey vk; + vk = TOP; + + (*percent)(10, percentUserData); + + // toupper our copy of search string + stdstr(&wordBuf, istr); + toupperstr(wordBuf); + + // get list of individual words + words = (char **)calloc(sizeof(char *), 10); + int allocWords = 10; + words[wordCount] = strtok(wordBuf, " "); + while (words[wordCount]) { + wordCount++; + if (wordCount == allocWords) { + allocWords+=10; + words = (char **)realloc(words, sizeof(char *)*allocWords); + } + words[wordCount] = strtok(NULL, " "); + } + + (*percent)(20, percentUserData); + + // clear our result set + indexes.erase(indexes.begin(), indexes.end()); + + // search both old and new testament indexes + for (int j = 0; j < 2; j++) { + // iterate thru each word the user passed to us. + for (int i = 0; i < wordCount; i++) { + + // clear this word's result set + indexes2.erase(indexes2.begin(), indexes2.end()); + error = 0; + + // iterate thru every word in the database that starts + // with our search word + for (int away = 0; !error; away++) { + idxbuf = 0; + + // find our word in the database and jump ahead _away_ + error = fastSearch[j]->findOffset(words[i], &start, &size, away); + + // get the word from the database + fastSearch[j]->getIDXBufDat(start, &idxbuf); + + // check to see if it starts with our target word + if (strlen(idxbuf) > strlen(words[i])) + idxbuf[strlen(words[i])] = 0; +// else words[i][strlen(idxbuf)] = 0; + if (!strcmp(idxbuf, words[i])) { + + // get data for this word from database + delete [] idxbuf; + idxbuf = 0; + datBuf = ""; + fastSearch[j]->readText(start, &size, &idxbuf, datBuf); + + // we know that the data consists of sizof(long) + // records each a valid module position that constains + // this word + // + // iterate thru each of these module positions + long *keyindex = (long *)datBuf.getRawData(); + while (keyindex < (long *)(datBuf.getRawData() + size - (strlen(idxbuf) + 1))) { + if (i) { // if we're not on our first word + + // check to see if this word is already in the result set. + // This is our AND functionality + if (find(indexes.begin(), indexes.end(), *keyindex) != indexes.end()) + // add to new result set + indexes2.push_back(*keyindex); + } + else indexes2.push_back(*keyindex); + keyindex++; + } + } + else error = 1; // no more matches + free(idxbuf); + } + + // make new result set final result set + indexes = indexes2; + + percent((char)(20 + (float)((j*wordCount)+i)/(wordCount * 2) * 78), percentUserData); + } + + // indexes contains our good verses, lets return them in a listKey + indexes.sort(); + + // iterate thru each good module position that meets the search + for (longlist::iterator it = indexes.begin(); it != indexes.end(); it++) { + + // set a temporary verse key to this module position + vk.Testament(j+1); + vk.Error(); + vk.Index(*it); + + // check scope + // Try to set our scope key to this verse key + if (scope) { + *testKeyType = vk; + + // check to see if it set ok and if so, add to our return list + if (*testKeyType == vk) + listKey << (const char *) vk; + } + else listKey << (const char*) vk; + } + } + (*percent)(98, percentUserData); + + free(words); + free(wordBuf); + + *testKeyType = saveKey; // set current place back to original + + listKey = TOP; + (*percent)(100, percentUserData); + return listKey; + } + + default: + break; + } + } + + // check if we just want to see if search is supported + if (justCheckIfSupported) { + *justCheckIfSupported = false; + return listKey; + } + +#endif + // if we don't support this search, fall back to base class + return SWModule::search(istr, searchType, flags, scope, justCheckIfSupported, percent, percentUserData); +} + + +void RawText4::setEntry(const char *inbuf, long len) { + VerseKey &key = getVerseKey(); + doSetText(key.Testament(), key.Index(), inbuf, len); +} + + +void RawText4::linkEntry(const SWKey *inkey) { + VerseKey &destkey = getVerseKey(); + const VerseKey *srckey = 0; + + // see if we have a VerseKey * or decendant + SWTRY { + srckey = SWDYNAMIC_CAST(VerseKey, inkey); + } + SWCATCH ( ... ) {} + // if we don't have a VerseKey * decendant, create our own + if (!srckey) + srckey = new VerseKey(inkey); + + doLinkEntry(destkey.Testament(), destkey.Index(), srckey->Index()); + + if (inkey != srckey) // free our key if we created a VerseKey + delete srckey; +} + + +/****************************************************************************** + * RawText4::deleteEntry - deletes this entry + * + * RET: *this + */ + +void RawText4::deleteEntry() { + VerseKey &key = getVerseKey(); + doSetText(key.Testament(), key.Index(), ""); +} + +/****************************************************************************** + * RawText4::increment - Increments module key a number of entries + * + * ENT: increment - Number of entries to jump forward + * + * RET: *this + */ + +void RawText4::increment(int steps) { + long start; + unsigned long size; + VerseKey *tmpkey = &getVerseKey(); + + findOffset(tmpkey->Testament(), tmpkey->Index(), &start, &size); + + SWKey lastgood = *tmpkey; + while (steps) { + long laststart = start; + unsigned long lastsize = size; + SWKey lasttry = *tmpkey; + (steps > 0) ? (*key)++ : (*key)--; + tmpkey = &getVerseKey(); + + if ((error = key->Error())) { + *key = lastgood; + break; + } + long index = tmpkey->Index(); + findOffset(tmpkey->Testament(), index, &start, &size); + if ( + (((laststart != start) || (lastsize != size)) // we're a different entry +// && (start > 0) + && (size)) // and we actually have a size + ||(!skipConsecutiveLinks)) { // or we don't want to skip consecutive links + steps += (steps < 0) ? 1 : -1; + lastgood = *tmpkey; + } + } + error = (error) ? KEYERR_OUTOFBOUNDS : 0; +} + +SWORD_NAMESPACE_END diff --git a/src/modules/texts/swtext.cpp b/src/modules/texts/swtext.cpp new file mode 100644 index 0000000..d0ff386 --- /dev/null +++ b/src/modules/texts/swtext.cpp @@ -0,0 +1,113 @@ +/****************************************************************************** + * swtext.cpp - code for base class 'SWText'- The basis for all text modules + */ + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/****************************************************************************** + * SWText Constructor - Initializes data for instance of SWText + * + * ENT: imodname - Internal name for module + * imoddesc - Name to display to user for module + * idisp - Display object to use for displaying + */ + +SWText::SWText(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang): SWModule(imodname, imoddesc, idisp, (char *)"Biblical Texts", enc, dir, mark, ilang) { + tmpVK = new VerseKey(); + delete key; + key = CreateKey(); + skipConsecutiveLinks = false; +} + + +/****************************************************************************** + * SWText Destructor - Cleans up instance of SWText + */ + +SWText::~SWText() { + delete tmpVK; +} + + +/****************************************************************************** + * SWText CreateKey - Create the correct key (VerseKey) for use with SWText + */ + +SWKey *SWText::CreateKey() { + return new VerseKey(); +} + + +long SWText::Index() const { + VerseKey *key = 0; + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + + entryIndex = key->NewIndex(); + + if (key != this->key) + delete key; + + return entryIndex; +} + +long SWText::Index(long iindex) { + VerseKey *key = 0; + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) {} + if (!key) + key = new VerseKey(this->key); + + key->Testament(1); + key->Index(iindex); + + if (key != this->key) { + this->key->copyFrom(*key); + delete key; + } + + return Index(); +} + + +VerseKey &SWText::getVerseKey() const { + VerseKey *key = NULL; + // see if we have a VerseKey * or decendant + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, this->key); + } + SWCATCH ( ... ) { } + if (!key) { + ListKey *lkTest = 0; + SWTRY { + lkTest = SWDYNAMIC_CAST(ListKey, this->key); + } + SWCATCH ( ... ) { } + if (lkTest) { + SWTRY { + key = SWDYNAMIC_CAST(VerseKey, lkTest->GetElement()); + } + SWCATCH ( ... ) { } + } + } + if (!key) { + tmpVK->setLocale(LocaleMgr::getSystemLocaleMgr()->getDefaultLocaleName()); + (*tmpVK) = *(this->key); + return (*tmpVK); + } + else return *key; +} + + +SWORD_NAMESPACE_END diff --git a/src/modules/texts/ztext/Makefile b/src/modules/texts/ztext/Makefile new file mode 100644 index 0000000..35d6648 --- /dev/null +++ b/src/modules/texts/ztext/Makefile @@ -0,0 +1,5 @@ + +root := ../../../.. + +all: + make -C ${root} diff --git a/src/modules/texts/ztext/Makefile.am b/src/modules/texts/ztext/Makefile.am new file mode 100644 index 0000000..817107c --- /dev/null +++ b/src/modules/texts/ztext/Makefile.am @@ -0,0 +1,3 @@ +ztextdir = $(top_srcdir)/src/modules/texts/ztext + +libsword_la_SOURCES += $(ztextdir)/ztext.cpp diff --git a/src/modules/texts/ztext/ztext.cpp b/src/modules/texts/ztext/ztext.cpp new file mode 100644 index 0000000..b461d49 --- /dev/null +++ b/src/modules/texts/ztext/ztext.cpp @@ -0,0 +1,195 @@ +/****************************************************************************** + * ztext.cpp - code for class 'zText'- a module that reads compressed text + * files: ot and nt using indexs ??.vss + */ + + +#include +#include +#include +#include +#include +#include + +#include + +#include // GNU + + +SWORD_NAMESPACE_START + +/****************************************************************************** + * zText Constructor - Initializes data for instance of zText + * + * ENT: ipath - path to data files + * iname - Internal name for module + * idesc - Name to display to user for module + * iblockType - verse, chapter, book, etc. of index chunks + * icomp - Compressor object + * idisp - Display object to use for displaying + */ + +zText::zText(const char *ipath, const char *iname, const char *idesc, int iblockType, SWCompress *icomp, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) + : zVerse(ipath, FileMgr::RDWR, iblockType, icomp), SWText(iname, idesc, idisp, enc, dir, mark, ilang) { + blockType = iblockType; + lastWriteKey = 0; +} + + +/****************************************************************************** + * zText Destructor - Cleans up instance of zText + */ + +zText::~zText() +{ + flushCache(); + + if (lastWriteKey) + delete lastWriteKey; + +} + + +bool zText::isWritable() { return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & FileMgr::RDWR) == FileMgr::RDWR)); } + + +/****************************************************************************** + * zText::getRawEntry - Returns the current verse buffer + * + * RET: buffer with verse + */ + +SWBuf &zText::getRawEntryBuf() { + long start = 0; + unsigned short size = 0; + VerseKey &key = getVerseKey(); + + findOffset(key.Testament(), key.Index(), &start, &size); + entrySize = size; // support getEntrySize call + + entryBuf = ""; + zReadText(key.Testament(), start, size, entryBuf); + + rawFilter(entryBuf, &key); + +// if (!isUnicode()) + prepText(entryBuf); + + return entryBuf; +} + + +bool zText::sameBlock(VerseKey *k1, VerseKey *k2) { + if (k1->Testament() != k2->Testament()) + return false; + + switch (blockType) { + case VERSEBLOCKS: + if (k1->Verse() != k2->Verse()) + return false; + case CHAPTERBLOCKS: + if (k1->Chapter() != k2->Chapter()) + return false; + case BOOKBLOCKS: + if (k1->Book() != k2->Book()) + return false; + } + return true; +} + + +void zText::setEntry(const char *inbuf, long len) { + VerseKey &key = getVerseKey(); + + // see if we've jumped across blocks since last write + if (lastWriteKey) { + if (!sameBlock(lastWriteKey, &key)) { + flushCache(); + } + delete lastWriteKey; + } + + doSetText(key.Testament(), key.Index(), inbuf, len); + + lastWriteKey = (VerseKey *)key.clone(); // must delete +} + + +void zText::linkEntry(const SWKey *inkey) { + VerseKey &destkey = getVerseKey(); + const VerseKey *srckey = 0; + + // see if we have a VerseKey * or decendant + SWTRY { + srckey = (const VerseKey *) SWDYNAMIC_CAST(VerseKey, inkey); + } + SWCATCH ( ... ) { + } + // if we don't have a VerseKey * decendant, create our own + if (!srckey) + srckey = new VerseKey(inkey); + + doLinkEntry(destkey.Testament(), destkey.Index(), srckey->Index()); + + if (inkey != srckey) // free our key if we created a VerseKey + delete srckey; +} + + +/****************************************************************************** + * zFiles::deleteEntry - deletes this entry + * + */ + +void zText::deleteEntry() { + + VerseKey &key = getVerseKey(); + + doSetText(key.Testament(), key.Index(), ""); +} + + +/****************************************************************************** + * zText::increment - Increments module key a number of entries + * + * ENT: increment - Number of entries to jump forward + * + */ + +void zText::increment(int steps) { + long start; + unsigned short size; + VerseKey *tmpkey = &getVerseKey(); + + findOffset(tmpkey->Testament(), tmpkey->Index(), &start, &size); + + SWKey lastgood = *tmpkey; + while (steps) { + long laststart = start; + unsigned short lastsize = size; + SWKey lasttry = *tmpkey; + (steps > 0) ? (*key)++ : (*key)--; + tmpkey = &getVerseKey(); + + if ((error = key->Error())) { + *key = lastgood; + break; + } + long index = tmpkey->Index(); + findOffset(tmpkey->Testament(), index, &start, &size); + + if ( + (((laststart != start) || (lastsize != size)) // we're a different entry +// && (start > 0) + && (size)) // and we actually have a size + ||(!skipConsecutiveLinks)) { // or we don't want to skip consecutive links + steps += (steps < 0) ? 1 : -1; + lastgood = *tmpkey; + } + } + error = (error) ? KEYERR_OUTOFBOUNDS : 0; +} + + + +SWORD_NAMESPACE_END diff --git a/src/utilfuns/Makefile b/src/utilfuns/Makefile new file mode 100644 index 0000000..339f87a --- /dev/null +++ b/src/utilfuns/Makefile @@ -0,0 +1,4 @@ +root := ../.. + +all: + make -C ${root} diff --git a/src/utilfuns/Makefile.am b/src/utilfuns/Makefile.am new file mode 100644 index 0000000..4160db0 --- /dev/null +++ b/src/utilfuns/Makefile.am @@ -0,0 +1,40 @@ + +if HAVE_VSNPRINTF +else +CXXFLAGS += -DNO_VSNPRINTF +endif + +utilfunsdir = $(top_srcdir)/src/utilfuns +libsword_la_SOURCES += $(utilfunsdir)/swobject.cpp +libsword_la_SOURCES += $(utilfunsdir)/utilstr.cpp +libsword_la_SOURCES += $(utilfunsdir)/utilxml.cpp +libsword_la_SOURCES += $(utilfunsdir)/swunicod.cpp +libsword_la_SOURCES += $(utilfunsdir)/swversion.cpp +libsword_la_SOURCES += $(utilfunsdir)/swbuf.cpp +libsword_la_SOURCES += $(utilfunsdir)/ftpparse.c +libsword_la_SOURCES += $(utilfunsdir)/url.cpp + +if INTERNALFTPLIB +ftpsrc = $(utilfunsdir)/ftplib.c +else +ftpsrc = +endif + +if ZLIB +UNTGZ = $(utilfunsdir)/zlib/untgz.c +else +UNTGZ = +endif + +libsword_la_SOURCES += $(UNTGZ) +libsword_la_SOURCES += $(ftpsrc) + +if MINGW +SWREGEX = $(utilfunsdir)/regex.c +else +SWREGEX = +endif +libsword_la_SOURCES += $(SWREGEX) + + +libsword_la_SOURCES += $(utilfunsdir)/roman.cpp diff --git a/src/utilfuns/ftplib.c b/src/utilfuns/ftplib.c new file mode 100644 index 0000000..6f94806 --- /dev/null +++ b/src/utilfuns/ftplib.c @@ -0,0 +1,1355 @@ +/***************************************************************************/ +/* ftplib.c - callable ftp access routines */ +/* Copyright (C) 1996-2000 Thomas Pfau, pfau@cnj.digex.net */ +/* 73 Catherine Street, South Bound Brook, NJ, 08880 */ +/* */ +/* This library is free software; you can redistribute it and/or */ +/* modify it under the terms of the GNU Library General Public */ +/* License as published by the Free Software Foundation; either */ +/* version 2 of the License, or (at your option) any later version. */ +/* */ +/* This library 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 */ +/* Library General Public License for more details. */ +/* */ +/* You should have received a copy of the GNU Library General Public */ +/* License along with this progam; if not, write to the */ +/* Free Software Foundation, Inc., 59 Temple Place - Suite 330, */ +/* Boston, MA 02111-1307, USA. */ +/* */ +/***************************************************************************/ +// changes made by Lorn Potter +// +#if defined(__unix__) || defined(__VMS) +#include +#endif +#if defined(_WIN32) +#include +#endif + +#include +#include +#include +#include +#include + +#if defined(__unix__) + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#elif defined(VMS) + +#include +#include +#include +#include +#include + +#elif defined(_WIN32) + +#include + +#endif + +#define BUILDING_LIBRARY +#include "ftplib.h" + +#if defined(_WIN32) +#define SETSOCKOPT_OPTVAL_TYPE (const char *) +#else +#define SETSOCKOPT_OPTVAL_TYPE (void *) +#endif + +#define FTPLIB_BUFSIZ 8192 +#define ACCEPT_TIMEOUT 10 + +#define FTPLIB_CONTROL 0 +#define FTPLIB_READ 1 +#define FTPLIB_WRITE 2 + +#if !defined FTPLIB_DEFMODE +#define FTPLIB_DEFMODE FTPLIB_PASSIVE +#endif + +struct NetBuf { + char *cput,*cget; + int handle; + int cavail,cleft; + char *buf; + int dir; + netbuf *ctrl; + netbuf *data; + int cmode; + struct timeval idletime; + FtpCallback idlecb; + void *idlearg; + int xfered; + int cbbytes; + int xfered1; + char response[256]; +}; + +static char *version = +"ftplib Release 3.1-1 9/16/00, copyright 1996-2000 Thomas Pfau"; + +GLOBALDEF int ftplib_debug = 0; + +#if defined(__unix__) || defined(VMS) +#define net_read read +#define net_write write +#define net_close close +#elif defined(_WIN32) +#define net_read(x,y,z) recv(x,y,z,0) +#define net_write(x,y,z) send(x,y,z,0) +#define net_close closesocket +#endif + +#if defined(NEED_MEMCCPY) +/* + * VAX C does not supply a memccpy routine so I provide my own + */ +void *memccpy(void *dest, const void *src, int c, size_t n) +{ + int i=0; + const unsigned char *ip=src; + unsigned char *op=dest; + + while (i < n) + { + if ((*op++ = *ip++) == c) + break; + i++; + } + if (i == n) + return NULL; + return op; +} +#endif +#if defined(NEED_STRDUP) +/* + * strdup - return a malloc'ed copy of a string + */ +char *strdup(const char *src) +{ + int l = strlen(src) + 1; + char *dst = malloc(l); + if (dst) + strcpy(dst,src); + return dst; +} +#endif + +/* + * socket_wait - wait for socket to receive or flush data + * + * return 1 if no user callback, otherwise, return value returned by + * user callback + */ +static int socket_wait(netbuf *ctl) +{ + fd_set fd,*rfd = NULL,*wfd = NULL; + struct timeval tv; + int rv = 0; + if ((ctl->dir == FTPLIB_CONTROL) || (ctl->idlecb == NULL)) + return 1; + if (ctl->dir == FTPLIB_WRITE) + wfd = &fd; + else + rfd = &fd; + FD_ZERO(&fd); + do + { + FD_SET(ctl->handle,&fd); + tv = ctl->idletime; + rv = select(ctl->handle+1, rfd, wfd, NULL, &tv); + if (rv == -1) + { + rv = 0; + strncpy(ctl->ctrl->response, strerror(errno), + sizeof(ctl->ctrl->response)); + break; + } + else if (rv > 0) + { + rv = 1; + break; + } + } + while ((rv = ctl->idlecb(ctl, ctl->xfered, ctl->idlearg))); + return rv; +} + +/* + * read a line of text + * + * return -1 on error or bytecount + */ +static int readline(char *buf,int max,netbuf *ctl) +{ + int x,retval = 0; + char *end,*bp=buf; + int eof = 0; + + if ((ctl->dir != FTPLIB_CONTROL) && (ctl->dir != FTPLIB_READ)) + return -1; + if (max == 0) + return 0; + do + { + if (ctl->cavail > 0) + { + x = (max >= ctl->cavail) ? ctl->cavail : max-1; + end = memccpy(bp,ctl->cget,'\n',x); + if (end != NULL) + x = end - bp; + retval += x; + bp += x; + *bp = '\0'; + max -= x; + ctl->cget += x; + ctl->cavail -= x; + if (end != NULL) + { + bp -= 2; + if (strcmp(bp,"\r\n") == 0) + { + *bp++ = '\n'; + *bp++ = '\0'; + --retval; + } + break; + } + } + if (max == 1) + { + *buf = '\0'; + break; + } + if (ctl->cput == ctl->cget) + { + ctl->cput = ctl->cget = ctl->buf; + ctl->cavail = 0; + ctl->cleft = FTPLIB_BUFSIZ; + } + if (eof) + { + if (retval == 0) + retval = -1; + break; + } + if (!socket_wait(ctl)) + return retval; + if ((x = net_read(ctl->handle,ctl->cput,ctl->cleft)) == -1) + { + perror("read"); + retval = -1; + break; + } + if (x == 0) + eof = 1; + ctl->cleft -= x; + ctl->cavail += x; + ctl->cput += x; + } + while (1); + return retval; +} + +/* + * write lines of text + * + * return -1 on error or bytecount + */ +static int writeline(char *buf, int len, netbuf *nData) +{ + int x, nb=0, w; + char *ubp = buf, *nbp; + char lc=0; + + if (nData->dir != FTPLIB_WRITE) + return -1; + nbp = nData->buf; + for (x=0; x < len; x++) + { + if ((*ubp == '\n') && (lc != '\r')) + { + if (nb == FTPLIB_BUFSIZ) + { + if (!socket_wait(nData)) + return x; + w = net_write(nData->handle, nbp, FTPLIB_BUFSIZ); + if (w != FTPLIB_BUFSIZ) + { + printf("net_write(1) returned %d, errno = %d\n", w, errno); + return(-1); + } + nb = 0; + } + nbp[nb++] = '\r'; + } + if (nb == FTPLIB_BUFSIZ) + { + if (!socket_wait(nData)) + return x; + w = net_write(nData->handle, nbp, FTPLIB_BUFSIZ); + if (w != FTPLIB_BUFSIZ) + { + printf("net_write(2) returned %d, errno = %d\n", w, errno); + return(-1); + } + nb = 0; + } + nbp[nb++] = lc = *ubp++; + } + if (nb) + { + if (!socket_wait(nData)) + return x; + w = net_write(nData->handle, nbp, nb); + if (w != nb) + { + printf("net_write(3) returned %d, errno = %d\n", w, errno); + return(-1); + } + } + return len; +} + +/* + * read a response from the server + * + * return 0 if first char doesn't match + * return 1 if first char matches + */ +static int readresp(char c, netbuf *nControl) +{ + char match[5]; + if (readline(nControl->response,256,nControl) == -1) + { + perror("Control socket read failed"); + return 0; + } + if (ftplib_debug > 1) + fprintf(stderr,"%s",nControl->response); + if (nControl->response[3] == '-') + { + strncpy(match,nControl->response,3); + match[3] = ' '; + match[4] = '\0'; + do + { + if (readline(nControl->response,256,nControl) == -1) + { + perror("Control socket read failed"); + return 0; + } + if (ftplib_debug > 1) + fprintf(stderr,"%s",nControl->response); + } + while (strncmp(nControl->response,match,4)); + } + if (nControl->response[0] == c) + return 1; + return 0; +} + +/* + * FtpInit for stupid operating systems that require it (Windows NT) + */ +GLOBALDEF void FtpInit(void) +{ +#if defined(_WIN32) + WORD wVersionRequested; + WSADATA wsadata; + int err; + wVersionRequested = MAKEWORD(1,1); + if ((err = WSAStartup(wVersionRequested,&wsadata)) != 0) + fprintf(stderr,"Network failed to start: %d\n",err); +#endif +} + +/* + * FtpLastResponse - return a pointer to the last response received + */ +GLOBALDEF char *FtpLastResponse(netbuf *nControl) +{ + if ((nControl) && (nControl->dir == FTPLIB_CONTROL)) + return nControl->response; + return NULL; +} + +/* + * FtpConnect - connect to remote server + * + * return 1 if connected, 0 if not + */ +GLOBALDEF int FtpConnect(const char *host, netbuf **nControl) +{ + int sControl, stat, flags, oldflags; + struct sockaddr_in sin; + struct hostent *phe; + struct servent *pse; + int on=1; + netbuf *ctrl; + char *lhost; + char *pnum; + struct timeval tv; + fd_set wr; + + memset(&sin,0,sizeof(sin)); + sin.sin_family = AF_INET; + lhost = strdup(host); + pnum = strchr(lhost,':'); + if (pnum == NULL) + { +#if defined(VMS) + sin.sin_port = htons(21); +#else + if ((pse = getservbyname("ftp","tcp")) == NULL) + { + perror("getservbyname"); + return 0; + } + sin.sin_port = pse->s_port; +#endif + } + else + { + *pnum++ = '\0'; + if (isdigit(*pnum)) + sin.sin_port = htons(atoi(pnum)); + else + { + pse = getservbyname(pnum,"tcp"); + sin.sin_port = pse->s_port; + } + } + if ((sin.sin_addr.s_addr = inet_addr(lhost)) == -1) + { + if ((phe = gethostbyname(lhost)) == NULL) + { + perror("gethostbyname"); + return 0; + } + + memcpy((char *)&sin.sin_addr, phe->h_addr, phe->h_length); + + } + free(lhost); + + sControl = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); + if (sControl == -1) + { + perror("socket"); + return 0; + } + + if ( setsockopt(sControl,SOL_SOCKET,SO_REUSEADDR, + SETSOCKOPT_OPTVAL_TYPE &on, sizeof(on)) == -1) + { + perror("setsockopt"); + net_close(sControl); + return 0; + } + +#if defined(_WIN32) + if (connect(sControl, (struct sockaddr *)&sin, sizeof(sin)) == -1) + { + perror("connect"); + net_close(sControl); + return 0; + } +#else + //set nonblocking for connection timeout + flags = fcntl( sControl, F_GETFL,0); + oldflags=flags; + fcntl( sControl, F_SETFL, O_NONBLOCK|flags); + + stat=connect( sControl, (struct sockaddr *)&sin, sizeof(sin)); + if (stat < 0) + { + if (errno != EWOULDBLOCK && errno != EINPROGRESS) + { + perror("connect"); + net_close(sControl); + return 0; + } + } + + FD_ZERO(&wr); + FD_SET( sControl, &wr); + + tv.tv_sec = ACCEPT_TIMEOUT; + tv.tv_usec = 0; + + stat = select(sControl+1, 0, &wr, 0, &tv); + + if (stat < 1) + { + // time out has expired, + // or an error has ocurred + perror("timeout"); + net_close(sControl); + return 0; + } + + printf("connected\n"); + + //set original flags + fcntl( sControl, F_SETFL, oldflags); +#endif + + ctrl = calloc(1,sizeof(netbuf)); + if (ctrl == NULL) + { + perror("calloc"); + net_close(sControl); + return 0; + } + ctrl->buf = malloc(FTPLIB_BUFSIZ); + if (ctrl->buf == NULL) + { + perror("calloc"); + net_close(sControl); + free(ctrl); + return 0; + } + ctrl->handle = sControl; + ctrl->dir = FTPLIB_CONTROL; + ctrl->ctrl = NULL; + ctrl->cmode = FTPLIB_DEFMODE; + ctrl->idlecb = NULL; + ctrl->idletime.tv_sec = ctrl->idletime.tv_usec = 0; + ctrl->idlearg = NULL; + ctrl->xfered = 0; + ctrl->xfered1 = 0; + ctrl->cbbytes = 0; + if (readresp('2', ctrl) == 0) + { + net_close(sControl); + free(ctrl->buf); + free(ctrl); + return 0; + } + *nControl = ctrl; + return 1; +} + +/* + * FtpOptions - change connection options + * + * returns 1 if successful, 0 on error + */ +GLOBALDEF int FtpOptions(int opt, long val, netbuf *nControl) +{ + int v,rv=0; + switch (opt) + { + case FTPLIB_CONNMODE: + v = (int) val; + if ((v == FTPLIB_PASSIVE) || (v == FTPLIB_PORT)) + { + nControl->cmode = v; + rv = 1; + } + break; + case FTPLIB_CALLBACK: + nControl->idlecb = (FtpCallback) val; + rv = 1; + break; + case FTPLIB_IDLETIME: + v = (int) val; + rv = 1; + nControl->idletime.tv_sec = v / 1000; + nControl->idletime.tv_usec = (v % 1000) * 1000; + break; + case FTPLIB_CALLBACKARG: + rv = 1; + nControl->idlearg = (void *) val; + break; + case FTPLIB_CALLBACKBYTES: + rv = 1; + nControl->cbbytes = (int) val; + break; + } + return rv; +} + +/* + * FtpSendCmd - send a command and wait for expected response + * + * return 1 if proper response received, 0 otherwise + */ +static int FtpSendCmd(const char *cmd, char expresp, netbuf *nControl) +{ + char buf[256]; + if (nControl->dir != FTPLIB_CONTROL) + return 0; + if (ftplib_debug > 2) + fprintf(stderr,"%s\n",cmd); + if ((strlen(cmd) + 3) > sizeof(buf)) + return 0; + sprintf(buf,"%s\r\n",cmd); + if (net_write(nControl->handle,buf,strlen(buf)) <= 0) + { + perror("write"); + return 0; + } + return readresp(expresp, nControl); +} + +/* + * FtpLogin - log in to remote server + * + * return 1 if logged in, 0 otherwise + */ +GLOBALDEF int FtpLogin(const char *user, const char *pass, netbuf *nControl) +{ + char tempbuf[64]; + + if (((strlen(user) + 7) > sizeof(tempbuf)) || + ((strlen(pass) + 7) > sizeof(tempbuf))) + return 0; + sprintf(tempbuf,"USER %s",user); + if (!FtpSendCmd(tempbuf,'3',nControl)) + { + if (nControl->response[0] == '2') + return 1; + return 0; + } + sprintf(tempbuf,"PASS %s",pass); + return FtpSendCmd(tempbuf,'2',nControl); +} + +/* + * FtpOpenPort - set up data connection + * + * return 1 if successful, 0 otherwise + */ +static int FtpOpenPort(netbuf *nControl, netbuf **nData, int mode, int dir) +{ + int sData; + union { + struct sockaddr sa; + struct sockaddr_in in; + } sin; + struct linger lng = { 0, 0 }; + unsigned int l; + int on=1; + netbuf *ctrl; + char *cp; + unsigned int v[6]; + char buf[256]; + + if (nControl->dir != FTPLIB_CONTROL) + return -1; + if ((dir != FTPLIB_READ) && (dir != FTPLIB_WRITE)) + { + sprintf(nControl->response, "Invalid direction %d\n", dir); + return -1; + } + if ((mode != FTPLIB_ASCII) && (mode != FTPLIB_IMAGE)) + { + sprintf(nControl->response, "Invalid mode %c\n", mode); + return -1; + } + l = sizeof(sin); + if (nControl->cmode == FTPLIB_PASSIVE) + { + memset(&sin, 0, l); + sin.in.sin_family = AF_INET; + if (!FtpSendCmd("PASV",'2',nControl)) + return -1; + cp = strchr(nControl->response,'('); + if (cp == NULL) + return -1; + cp++; + sscanf(cp,"%u,%u,%u,%u,%u,%u",&v[2],&v[3],&v[4],&v[5],&v[0],&v[1]); + sin.sa.sa_data[2] = v[2]; + sin.sa.sa_data[3] = v[3]; + sin.sa.sa_data[4] = v[4]; + sin.sa.sa_data[5] = v[5]; + sin.sa.sa_data[0] = v[0]; + sin.sa.sa_data[1] = v[1]; + } + else + { + if (getsockname(nControl->handle, &sin.sa, &l) < 0) + { + perror("getsockname"); + return 0; + } + } + sData = socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); + if (sData == -1) + { + perror("socket"); + return -1; + } + if (setsockopt(sData,SOL_SOCKET,SO_REUSEADDR, + SETSOCKOPT_OPTVAL_TYPE &on,sizeof(on)) == -1) + { + perror("setsockopt"); + net_close(sData); + return -1; + } + if (setsockopt(sData,SOL_SOCKET,SO_LINGER, + SETSOCKOPT_OPTVAL_TYPE &lng,sizeof(lng)) == -1) + { + perror("setsockopt"); + net_close(sData); + return -1; + } + if (nControl->cmode == FTPLIB_PASSIVE) + { + if (connect(sData, &sin.sa, sizeof(sin.sa)) == -1) + { + perror("connect"); + net_close(sData); + return -1; + } + } + else + { + sin.in.sin_port = 0; + if (bind(sData, &sin.sa, sizeof(sin)) == -1) + { + perror("bind"); + net_close(sData); + return 0; + } + if (listen(sData, 1) < 0) + { + perror("listen"); + net_close(sData); + return 0; + } + if (getsockname(sData, &sin.sa, &l) < 0) + return 0; + sprintf(buf, "PORT %d,%d,%d,%d,%d,%d", + (unsigned char) sin.sa.sa_data[2], + (unsigned char) sin.sa.sa_data[3], + (unsigned char) sin.sa.sa_data[4], + (unsigned char) sin.sa.sa_data[5], + (unsigned char) sin.sa.sa_data[0], + (unsigned char) sin.sa.sa_data[1]); + if (!FtpSendCmd(buf,'2',nControl)) + { + net_close(sData); + return 0; + } + } + ctrl = calloc(1,sizeof(netbuf)); + if (ctrl == NULL) + { + perror("calloc"); + net_close(sData); + return -1; + } + if ((mode == 'A') && ((ctrl->buf = malloc(FTPLIB_BUFSIZ)) == NULL)) + { + perror("calloc"); + net_close(sData); + free(ctrl); + return -1; + } + ctrl->handle = sData; + ctrl->dir = dir; + ctrl->idletime = nControl->idletime; + ctrl->idlearg = nControl->idlearg; + ctrl->xfered = 0; + ctrl->xfered1 = 0; + ctrl->cbbytes = nControl->cbbytes; + if (ctrl->idletime.tv_sec || ctrl->idletime.tv_usec || ctrl->cbbytes) + ctrl->idlecb = nControl->idlecb; + else + ctrl->idlecb = NULL; + *nData = ctrl; + return 1; +} + +/* + * FtpAcceptConnection - accept connection from server + * + * return 1 if successful, 0 otherwise + */ +static int FtpAcceptConnection(netbuf *nData, netbuf *nControl) +{ + int sData; + struct sockaddr addr; + unsigned int l; + int i; + struct timeval tv; + fd_set mask; + int rv; + + FD_ZERO(&mask); + FD_SET(nControl->handle, &mask); + FD_SET(nData->handle, &mask); + tv.tv_usec = 0; + tv.tv_sec = ACCEPT_TIMEOUT; + printf("<<<<<<<<<<<<<<<<%d\n",ACCEPT_TIMEOUT); + i = nControl->handle; + if (i < nData->handle) + i = nData->handle; + i = select(i+1, &mask, NULL, NULL, &tv); + if (i == -1) + { + strncpy(nControl->response, strerror(errno), + sizeof(nControl->response)); + net_close(nData->handle); + nData->handle = 0; + rv = 0; + } + else if (i == 0) + { + strcpy(nControl->response, "timed out waiting for connection"); + net_close(nData->handle); + nData->handle = 0; + rv = 0; + } + else + { + if (FD_ISSET(nData->handle, &mask)) + { + l = sizeof(addr); + sData = accept(nData->handle, &addr, &l); + i = errno; + net_close(nData->handle); + if (sData > 0) + { + rv = 1; + nData->handle = sData; + } + else + { + strncpy(nControl->response, strerror(i), + sizeof(nControl->response)); + nData->handle = 0; + rv = 0; + } + } + else if (FD_ISSET(nControl->handle, &mask)) + { + net_close(nData->handle); + nData->handle = 0; + readresp('2', nControl); + rv = 0; + } + } + return rv; +} + +/* + * FtpAccess - return a handle for a data stream + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpAccess(const char *path, int typ, int mode, netbuf *nControl, + netbuf **nData) +{ + char buf[256]; + int dir; + if ((path == NULL) && + ((typ == FTPLIB_FILE_WRITE) || (typ == FTPLIB_FILE_READ))) + { + sprintf(nControl->response, + "Missing path argument for file transfer\n"); + return 0; + } + sprintf(buf, "TYPE %c", mode); + if (!FtpSendCmd(buf, '2', nControl)) + return 0; + switch (typ) + { + case FTPLIB_DIR: + strcpy(buf,"NLST"); + dir = FTPLIB_READ; + break; + case FTPLIB_DIR_VERBOSE: + strcpy(buf,"LIST"); + dir = FTPLIB_READ; + break; + case FTPLIB_FILE_READ: + strcpy(buf,"RETR"); + dir = FTPLIB_READ; + break; + case FTPLIB_FILE_WRITE: + strcpy(buf,"STOR"); + dir = FTPLIB_WRITE; + break; + default: + sprintf(nControl->response, "Invalid open type %d\n", typ); + return 0; + } + if (path != NULL) + { + int i = strlen(buf); + buf[i++] = ' '; + if ((strlen(path) + i) >= sizeof(buf)) + return 0; + strcpy(&buf[i],path); + } + if (FtpOpenPort(nControl, nData, mode, dir) == -1) + return 0; + if (!FtpSendCmd(buf, '1', nControl)) + { + FtpClose(*nData); + *nData = NULL; + return 0; + } + (*nData)->ctrl = nControl; + nControl->data = *nData; + if (nControl->cmode == FTPLIB_PORT) + { + if (!FtpAcceptConnection(*nData,nControl)) + { + FtpClose(*nData); + *nData = NULL; + nControl->data = NULL; + return 0; + } + } + return 1; +} + +/* + * FtpRead - read from a data connection + */ +GLOBALDEF int FtpRead(void *buf, int max, netbuf *nData) +{ + int i; + if (nData->dir != FTPLIB_READ) + return 0; + if (nData->buf) + i = readline(buf, max, nData); + else + { + i = socket_wait(nData); + if (i != 1) + return 0; + i = net_read(nData->handle, buf, max); + } + if (i == -1) + return 0; + nData->xfered += i; + if (nData->idlecb && nData->cbbytes) + { + nData->xfered1 += i; + if (nData->xfered1 > nData->cbbytes) + { + if (nData->idlecb(nData, nData->xfered, nData->idlearg) == 0) + return 0; + nData->xfered1 = 0; + } + } + return i; +} + +/* + * FtpWrite - write to a data connection + */ +GLOBALDEF int FtpWrite(void *buf, int len, netbuf *nData) +{ + int i; + if (nData->dir != FTPLIB_WRITE) + return 0; + if (nData->buf) + i = writeline(buf, len, nData); + else + { + socket_wait(nData); + i = net_write(nData->handle, buf, len); + } + if (i == -1) + return 0; + nData->xfered += i; + if (nData->idlecb && nData->cbbytes) + { + nData->xfered1 += i; + if (nData->xfered1 > nData->cbbytes) + { + nData->idlecb(nData, nData->xfered, nData->idlearg); + nData->xfered1 = 0; + } + } + return i; +} + +/* + * FtpClose - close a data connection + */ +GLOBALDEF int FtpClose(netbuf *nData) +{ + netbuf *ctrl; + switch (nData->dir) + { + case FTPLIB_WRITE: + /* potential problem - if buffer flush fails, how to notify user? */ + if (nData->buf != NULL) + writeline(NULL, 0, nData); + case FTPLIB_READ: + if (nData->buf) + free(nData->buf); + shutdown(nData->handle,2); + net_close(nData->handle); + ctrl = nData->ctrl; + free(nData); + if (ctrl) + { + ctrl->data = NULL; + return(readresp('2', ctrl)); + } + return 1; + case FTPLIB_CONTROL: + if (nData->data) + { + nData->ctrl = NULL; + FtpClose(nData); + } + net_close(nData->handle); + free(nData); + return 0; + } + return 1; +} + +/* + * FtpSite - send a SITE command + * + * return 1 if command successful, 0 otherwise + */ +GLOBALDEF int FtpSite(const char *cmd, netbuf *nControl) +{ + char buf[256]; + + if ((strlen(cmd) + 7) > sizeof(buf)) + return 0; + sprintf(buf,"SITE %s",cmd); + if (!FtpSendCmd(buf,'2',nControl)) + return 0; + return 1; +} + +/* + * FtpSysType - send a SYST command + * + * Fills in the user buffer with the remote system type. If more + * information from the response is required, the user can parse + * it out of the response buffer returned by FtpLastResponse(). + * + * return 1 if command successful, 0 otherwise + */ +GLOBALDEF int FtpSysType(char *buf, int max, netbuf *nControl) +{ + int l = max; + char *b = buf; + char *s; + if (!FtpSendCmd("SYST",'2',nControl)) + return 0; + s = &nControl->response[4]; + while ((--l) && (*s != ' ')) + *b++ = *s++; + *b++ = '\0'; + return 1; +} + +/* + * FtpMkdir - create a directory at server + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpMkdir(const char *path, netbuf *nControl) +{ + char buf[256]; + + if ((strlen(path) + 6) > sizeof(buf)) + return 0; + sprintf(buf,"MKD %s",path); + if (!FtpSendCmd(buf,'2', nControl)) + return 0; + return 1; +} + +/* + * FtpChdir - change path at remote + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpChdir(const char *path, netbuf *nControl) +{ + char buf[256]; + + if ((strlen(path) + 6) > sizeof(buf)) + return 0; + sprintf(buf,"CWD %s",path); + if (!FtpSendCmd(buf,'2',nControl)) + return 0; + return 1; +} + +/* + * FtpCDUp - move to parent directory at remote + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpCDUp(netbuf *nControl) +{ + if (!FtpSendCmd("CDUP",'2',nControl)) + return 0; + return 1; +} + +/* + * FtpRmdir - remove directory at remote + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpRmdir(const char *path, netbuf *nControl) +{ + char buf[256]; + + if ((strlen(path) + 6) > sizeof(buf)) + return 0; + sprintf(buf,"RMD %s",path); + if (!FtpSendCmd(buf,'2',nControl)) + return 0; + return 1; +} + +/* + * FtpPwd - get working directory at remote + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpPwd(char *path, int max, netbuf *nControl) +{ + int l = max; + char *b = path; + char *s; + if (!FtpSendCmd("PWD",'2',nControl)) + return 0; + s = strchr(nControl->response, '"'); + if (s == NULL) + return 0; + s++; + while ((--l) && (*s) && (*s != '"')) + *b++ = *s++; + *b++ = '\0'; + return 1; +} + +/* + * FtpXfer - issue a command and transfer data + * + * return 1 if successful, 0 otherwise + */ +static int FtpXfer(const char *localfile, const char *path, + netbuf *nControl, int typ, int mode) +{ + int l,c; + char *dbuf; + FILE *local = NULL; + netbuf *nData; + int rv=1; + + if (localfile != NULL) + { + char ac[4] = "w"; + if (typ == FTPLIB_FILE_WRITE) + ac[0] = 'r'; + if (mode == FTPLIB_IMAGE) + ac[1] = 'b'; + local = fopen(localfile, ac); + if (local == NULL) + { + strncpy(nControl->response, strerror(errno), + sizeof(nControl->response)); + return 0; + } + } + if (local == NULL) + local = (typ == FTPLIB_FILE_WRITE) ? stdin : stdout; + if (!FtpAccess(path, typ, mode, nControl, &nData)) + return 0; + dbuf = malloc(FTPLIB_BUFSIZ); + if (typ == FTPLIB_FILE_WRITE) + { + while ((l = fread(dbuf, 1, FTPLIB_BUFSIZ, local)) > 0) + if ((c = FtpWrite(dbuf, l, nData)) < l) + { + printf("short write: passed %d, wrote %d\n", l, c); + rv = 0; + break; + } + } + else + { + while ((l = FtpRead(dbuf, FTPLIB_BUFSIZ, nData)) > 0) + if (fwrite(dbuf, 1, l, local) <= 0) + { + perror("localfile write"); + rv = 0; + break; + } + } + free(dbuf); + fflush(local); + if (localfile != NULL) + fclose(local); + FtpClose(nData); + return rv; +} + +/* + * FtpNlst - issue an NLST command and write response to output + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpNlst(const char *outputfile, const char *path, + netbuf *nControl) +{ + return FtpXfer(outputfile, path, nControl, FTPLIB_DIR, FTPLIB_ASCII); +} + +/* + * FtpDir - issue a LIST command and write response to output + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpDir(const char *outputfile, const char *path, netbuf *nControl) +{ + return FtpXfer(outputfile, path, nControl, FTPLIB_DIR_VERBOSE, FTPLIB_ASCII); +} + +/* + * FtpSize - determine the size of a remote file + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpSize(const char *path, int *size, char mode, netbuf *nControl) +{ + char cmd[256]; + int resp,sz,rv=1; + + if ((strlen(path) + 7) > sizeof(cmd)) + return 0; + sprintf(cmd, "TYPE %c", mode); + if (!FtpSendCmd(cmd, '2', nControl)) + return 0; + sprintf(cmd,"SIZE %s",path); + if (!FtpSendCmd(cmd,'2',nControl)) + rv = 0; + else + { + if (sscanf(nControl->response, "%d %d", &resp, &sz) == 2) + *size = sz; + else + rv = 0; + } + return rv; +} + +/* + * FtpModDate - determine the modification date of a remote file + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpModDate(const char *path, char *dt, int max, netbuf *nControl) +{ + char buf[256]; + int rv = 1; + + if ((strlen(path) + 7) > sizeof(buf)) + return 0; + sprintf(buf,"MDTM %s",path); + if (!FtpSendCmd(buf,'2',nControl)) + rv = 0; + else + strncpy(dt, &nControl->response[4], max); + return rv; +} + +/* + * FtpGet - issue a GET command and write received data to output + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpGet(const char *outputfile, const char *path, + char mode, netbuf *nControl) +{ + return FtpXfer(outputfile, path, nControl, FTPLIB_FILE_READ, mode); +} + +/* + * FtpPut - issue a PUT command and send data from input + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpPut(const char *inputfile, const char *path, char mode, + netbuf *nControl) +{ + return FtpXfer(inputfile, path, nControl, FTPLIB_FILE_WRITE, mode); +} + +/* + * FtpRename - rename a file at remote + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpRename(const char *src, const char *dst, netbuf *nControl) +{ + char cmd[256]; + + if (((strlen(src) + 7) > sizeof(cmd)) || + ((strlen(dst) + 7) > sizeof(cmd))) + return 0; + sprintf(cmd,"RNFR %s",src); + if (!FtpSendCmd(cmd,'3',nControl)) + return 0; + sprintf(cmd,"RNTO %s",dst); + if (!FtpSendCmd(cmd,'2',nControl)) + return 0; + return 1; +} + +/* + * FtpDelete - delete a file at remote + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF int FtpDelete(const char *fnm, netbuf *nControl) +{ + char cmd[256]; + + if ((strlen(fnm) + 7) > sizeof(cmd)) + return 0; + sprintf(cmd,"DELE %s",fnm); + if (!FtpSendCmd(cmd,'2', nControl)) + return 0; + return 1; +} + +/* + * FtpQuit - disconnect from remote + * + * return 1 if successful, 0 otherwise + */ +GLOBALDEF void FtpQuit(netbuf *nControl) +{ + if (nControl->dir != FTPLIB_CONTROL) + return; + FtpSendCmd("QUIT",'2',nControl); + net_close(nControl->handle); + free(nControl->buf); + free(nControl); +} diff --git a/src/utilfuns/ftpparse.c b/src/utilfuns/ftpparse.c new file mode 100644 index 0000000..b9bafa1 --- /dev/null +++ b/src/utilfuns/ftpparse.c @@ -0,0 +1,447 @@ +/* ftpparse.c, ftpparse.h: library for parsing FTP LIST responses +20001223 +D. J. Bernstein, djb@cr.yp.to +http://cr.yp.to/ftpparse.html + +Commercial use is fine, if you let me know what programs you're using this in. + +Currently covered formats: +EPLF. +UNIX ls, with or without gid. +Microsoft FTP Service. +Windows NT FTP Server. +VMS. +WFTPD. +NetPresenz (Mac). +NetWare. +MSDOS. + +Definitely not covered: +Long VMS filenames, with information split across two lines. +NCSA Telnet FTP server. Has LIST = NLST (and bad NLST for directories). +*/ + +#include + +static long totai(long year,long month,long mday) +{ + long result; + if (month >= 2) month -= 2; + else { month += 10; --year; } + result = (mday - 1) * 10 + 5 + 306 * month; + result /= 10; + if (result == 365) { year -= 3; result = 1460; } + else result += 365 * (year % 4); + year /= 4; + result += 1461 * (year % 25); + year /= 25; + if (result == 36524) { year -= 3; result = 146096; } + else { result += 36524 * (year % 4); } + year /= 4; + result += 146097 * (year - 5); + result += 11017; + return result * 86400; +} + +static int flagneedbase = 1; +static time_t base; /* time() value on this OS at the beginning of 1970 TAI */ +static long now; /* current time */ +static int flagneedcurrentyear = 1; +static long currentyear; /* approximation to current year */ + +static void initbase(void) +{ + struct tm *t; + if (!flagneedbase) return; + + base = 0; + t = gmtime(&base); + base = -(totai(t->tm_year + 1900,t->tm_mon,t->tm_mday) + t->tm_hour * 3600 + t->tm_min * 60 + t->tm_sec); + /* assumes the right time_t, counting seconds. */ + /* base may be slightly off if time_t counts non-leap seconds. */ + flagneedbase = 0; +} + +static void initnow(void) +{ + long day; + long year; + + initbase(); + now = time((time_t *) 0) - base; + + if (flagneedcurrentyear) { + day = now / 86400; + if ((now % 86400) < 0) --day; + day -= 11017; + year = 5 + day / 146097; + day = day % 146097; + if (day < 0) { day += 146097; --year; } + year *= 4; + if (day == 146096) { year += 3; day = 36524; } + else { year += day / 36524; day %= 36524; } + year *= 25; + year += day / 1461; + day %= 1461; + year *= 4; + if (day == 1460) { year += 3; day = 365; } + else { year += day / 365; day %= 365; } + day *= 10; + if ((day + 5) / 306 >= 10) ++year; + currentyear = year; + flagneedcurrentyear = 0; + } +} + +/* UNIX ls does not show the year for dates in the last six months. */ +/* So we have to guess the year. */ +/* Apparently NetWare uses ``twelve months'' instead of ``six months''; ugh. */ +/* Some versions of ls also fail to show the year for future dates. */ +static long guesstai(long month,long mday) +{ + long year; + long t; + + initnow(); + + for (year = currentyear - 1;year < currentyear + 100;++year) { + t = totai(year,month,mday); + if (now - t < 350 * 86400) + return t; + } + return 0; +} + +static int check(char *buf,char *monthname) +{ + if ((buf[0] != monthname[0]) && (buf[0] != monthname[0] - 32)) return 0; + if ((buf[1] != monthname[1]) && (buf[1] != monthname[1] - 32)) return 0; + if ((buf[2] != monthname[2]) && (buf[2] != monthname[2] - 32)) return 0; + return 1; +} + +static char *months[12] = { + "jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec" +} ; + +static int getmonth(char *buf,int len) +{ + int i; + if (len == 3) + for (i = 0;i < 12;++i) + if (check(buf,months[i])) return i; + return -1; +} + +static long getlong(char *buf,int len) +{ + long u = 0; + while (len-- > 0) + u = u * 10 + (*buf++ - '0'); + return u; +} + +int ftpparse(struct ftpparse *fp,char *buf,int len) +{ + int i; + int j; + int state; + long size = 0; + long year; + long month = 0; + long mday = 0; + long hour; + long minute; + + fp->name = 0; + fp->namelen = 0; + fp->flagtrycwd = 0; + fp->flagtryretr = 0; + fp->sizetype = FTPPARSE_SIZE_UNKNOWN; + fp->size = 0; + fp->mtimetype = FTPPARSE_MTIME_UNKNOWN; + fp->mtime = 0; + fp->idtype = FTPPARSE_ID_UNKNOWN; + fp->id = 0; + fp->idlen = 0; + + if (len < 2) /* an empty name in EPLF, with no info, could be 2 chars */ + return 0; + + switch(*buf) { + /* see http://pobox.com/~djb/proto/eplf.txt */ + /* "+i8388621.29609,m824255902,/,\tdev" */ + /* "+i8388621.44468,m839956783,r,s10376,\tRFCEPLF" */ + case '+': + i = 1; + for (j = 1;j < len;++j) { + if (buf[j] == 9) { + fp->name = buf + j + 1; + fp->namelen = len - j - 1; + return 1; + } + if (buf[j] == ',') { + switch(buf[i]) { + case '/': + fp->flagtrycwd = 1; + break; + case 'r': + fp->flagtryretr = 1; + break; + case 's': + fp->sizetype = FTPPARSE_SIZE_BINARY; + fp->size = getlong(buf + i + 1,j - i - 1); + break; + case 'm': + fp->mtimetype = FTPPARSE_MTIME_LOCAL; + initbase(); + fp->mtime = base + getlong(buf + i + 1,j - i - 1); + break; + case 'i': + fp->idtype = FTPPARSE_ID_FULL; + fp->id = buf + i + 1; + fp->idlen = j - i - 1; + } + i = j + 1; + } + } + return 0; + + /* UNIX-style listing, without inum and without blocks */ + /* "-rw-r--r-- 1 root other 531 Jan 29 03:26 README" */ + /* "dr-xr-xr-x 2 root other 512 Apr 8 1994 etc" */ + /* "dr-xr-xr-x 2 root 512 Apr 8 1994 etc" */ + /* "lrwxrwxrwx 1 root other 7 Jan 25 00:17 bin -> usr/bin" */ + /* Also produced by Microsoft's FTP servers for Windows: */ + /* "---------- 1 owner group 1803128 Jul 10 10:18 ls-lR.Z" */ + /* "d--------- 1 owner group 0 May 9 19:45 Softlib" */ + /* Also WFTPD for MSDOS: */ + /* "-rwxrwxrwx 1 noone nogroup 322 Aug 19 1996 message.ftp" */ + /* Also NetWare: */ + /* "d [R----F--] supervisor 512 Jan 16 18:53 login" */ + /* "- [R----F--] rhesus 214059 Oct 20 15:27 cx.exe" */ + /* Also NetPresenz for the Mac: */ + /* "-------r-- 326 1391972 1392298 Nov 22 1995 MegaPhone.sit" */ + /* "drwxrwxr-x folder 2 May 10 1996 network" */ + case 'b': + case 'c': + case 'd': + case 'l': + case 'p': + case 's': + case '-': + + if (*buf == 'd') fp->flagtrycwd = 1; + if (*buf == '-') fp->flagtryretr = 1; + if (*buf == 'l') fp->flagtrycwd = fp->flagtryretr = 1; + + state = 1; + i = 0; + for (j = 1;j < len;++j) + if ((buf[j] == ' ') && (buf[j - 1] != ' ')) { + switch(state) { + case 1: /* skipping perm */ + state = 2; + break; + case 2: /* skipping nlink */ + state = 3; + if ((j - i == 6) && (buf[i] == 'f')) /* for NetPresenz */ + state = 4; + break; + case 3: /* skipping uid */ + state = 4; + break; + case 4: /* getting tentative size */ + size = getlong(buf + i,j - i); + state = 5; + break; + case 5: /* searching for month, otherwise getting tentative size */ + month = getmonth(buf + i,j - i); + if (month >= 0) + state = 6; + else + size = getlong(buf + i,j - i); + break; + case 6: /* have size and month */ + mday = getlong(buf + i,j - i); + state = 7; + break; + case 7: /* have size, month, mday */ + if ((j - i == 4) && (buf[i + 1] == ':')) { + hour = getlong(buf + i,1); + minute = getlong(buf + i + 2,2); + fp->mtimetype = FTPPARSE_MTIME_REMOTEMINUTE; + initbase(); + fp->mtime = base + guesstai(month,mday) + hour * 3600 + minute * 60; + } else if ((j - i == 5) && (buf[i + 2] == ':')) { + hour = getlong(buf + i,2); + minute = getlong(buf + i + 3,2); + fp->mtimetype = FTPPARSE_MTIME_REMOTEMINUTE; + initbase(); + fp->mtime = base + guesstai(month,mday) + hour * 3600 + minute * 60; + } + else if (j - i >= 4) { + year = getlong(buf + i,j - i); + fp->mtimetype = FTPPARSE_MTIME_REMOTEDAY; + initbase(); + fp->mtime = base + totai(year,month,mday); + } + else + return 0; + fp->name = buf + j + 1; + fp->namelen = len - j - 1; + state = 8; + break; + case 8: /* twiddling thumbs */ + break; + } + i = j + 1; + while ((i < len) && (buf[i] == ' ')) ++i; + } + + if (state != 8) + return 0; + + fp->size = size; + fp->sizetype = FTPPARSE_SIZE_BINARY; + + if (*buf == 'l') + for (i = 0;i + 3 < fp->namelen;++i) + if (fp->name[i] == ' ') + if (fp->name[i + 1] == '-') + if (fp->name[i + 2] == '>') + if (fp->name[i + 3] == ' ') { + fp->namelen = i; + break; + } + + /* eliminate extra NetWare spaces */ + if ((buf[1] == ' ') || (buf[1] == '[')) + if (fp->namelen > 3) + if (fp->name[0] == ' ') + if (fp->name[1] == ' ') + if (fp->name[2] == ' ') { + fp->name += 3; + fp->namelen -= 3; + } + + return 1; + } + + /* MultiNet (some spaces removed from examples) */ + /* "00README.TXT;1 2 30-DEC-1996 17:44 [SYSTEM] (RWED,RWED,RE,RE)" */ + /* "CORE.DIR;1 1 8-SEP-1996 16:09 [SYSTEM] (RWE,RWE,RE,RE)" */ + /* and non-MutliNet VMS: */ + /* "CII-MANUAL.TEX;1 213/216 29-JAN-1996 03:33:12 [ANONYMOU,ANONYMOUS] (RWED,RWED,,)" */ + for (i = 0;i < len;++i) + if (buf[i] == ';') + break; + if (i < len) { + fp->name = buf; + fp->namelen = i; + if (i > 4) + if (buf[i - 4] == '.') + if (buf[i - 3] == 'D') + if (buf[i - 2] == 'I') + if (buf[i - 1] == 'R') { + fp->namelen -= 4; + fp->flagtrycwd = 1; + } + if (!fp->flagtrycwd) + fp->flagtryretr = 1; + while (buf[i] != ' ') if (++i == len) return 0; + while (buf[i] == ' ') if (++i == len) return 0; + while (buf[i] != ' ') if (++i == len) return 0; + while (buf[i] == ' ') if (++i == len) return 0; + j = i; + while (buf[j] != '-') if (++j == len) return 0; + mday = getlong(buf + i,j - i); + while (buf[j] == '-') if (++j == len) return 0; + i = j; + while (buf[j] != '-') if (++j == len) return 0; + month = getmonth(buf + i,j - i); + if (month < 0) return 0; + while (buf[j] == '-') if (++j == len) return 0; + i = j; + while (buf[j] != ' ') if (++j == len) return 0; + year = getlong(buf + i,j - i); + while (buf[j] == ' ') if (++j == len) return 0; + i = j; + while (buf[j] != ':') if (++j == len) return 0; + hour = getlong(buf + i,j - i); + while (buf[j] == ':') if (++j == len) return 0; + i = j; + while ((buf[j] != ':') && (buf[j] != ' ')) if (++j == len) return 0; + minute = getlong(buf + i,j - i); + + fp->mtimetype = FTPPARSE_MTIME_REMOTEMINUTE; + initbase(); + fp->mtime = base + totai(year,month,mday) + hour * 3600 + minute * 60; + + return 1; + } + + /* MSDOS format */ + /* 04-27-00 09:09PM licensed */ + /* 07-18-00 10:16AM pub */ + /* 04-14-00 03:47PM 589 readme.htm */ + if ((*buf >= '0') && (*buf <= '9')) { + i = 0; + j = 0; + while (buf[j] != '-') if (++j == len) return 0; + month = getlong(buf + i,j - i) - 1; + while (buf[j] == '-') if (++j == len) return 0; + i = j; + while (buf[j] != '-') if (++j == len) return 0; + mday = getlong(buf + i,j - i); + while (buf[j] == '-') if (++j == len) return 0; + i = j; + while (buf[j] != ' ') if (++j == len) return 0; + year = getlong(buf + i,j - i); + if (year < 50) year += 2000; + if (year < 1000) year += 1900; + while (buf[j] == ' ') if (++j == len) return 0; + i = j; + while (buf[j] != ':') if (++j == len) return 0; + hour = getlong(buf + i,j - i); + while (buf[j] == ':') if (++j == len) return 0; + i = j; + while ((buf[j] != 'A') && (buf[j] != 'P')) if (++j == len) return 0; + minute = getlong(buf + i,j - i); + if (hour == 12) hour = 0; + if (buf[j] == 'A') if (++j == len) return 0; + if (buf[j] == 'P') { hour += 12; if (++j == len) return 0; } + if (buf[j] == 'M') if (++j == len) return 0; + + while (buf[j] == ' ') if (++j == len) return 0; + if (buf[j] == '<') { + fp->flagtrycwd = 1; + while (buf[j] != ' ') if (++j == len) return 0; + } + else { + i = j; + while (buf[j] != ' ') if (++j == len) return 0; + fp->size = getlong(buf + i,j - i); + fp->sizetype = FTPPARSE_SIZE_BINARY; + fp->flagtryretr = 1; + } + while (buf[j] == ' ') if (++j == len) return 0; + + fp->name = buf + j; + fp->namelen = len - j; + + fp->mtimetype = FTPPARSE_MTIME_REMOTEMINUTE; + initbase(); + fp->mtime = base + totai(year,month,mday) + hour * 3600 + minute * 60; + + return 1; + } + + /* Some useless lines, safely ignored: */ + /* "Total of 11 Files, 10966 Blocks." (VMS) */ + /* "total 14786" (UNIX) */ + /* "DISK$ANONFTP:[ANONYMOUS]" (VMS) */ + /* "Directory DISK$PCSA:[ANONYM]" (VMS) */ + + return 0; +} diff --git a/src/utilfuns/regex.c b/src/utilfuns/regex.c new file mode 100644 index 0000000..09743d2 --- /dev/null +++ b/src/utilfuns/regex.c @@ -0,0 +1,5721 @@ +/* Extended regular expression matching and search library, + version 0.12. + (Implements POSIX draft P1003.2/D11.2, except for some of the + internationalization features.) + + Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + + the C library, however. The master source lives in /gd/gnu/lib. + +NOTE: The canonical source of this file is maintained with the +GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. + +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, 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. */ + +/* AIX requires this to be the first thing in the file. */ +#if defined (_AIX) && !defined (REGEX_MALLOC) + #pragma alloca +#endif + +#undef _GNU_SOURCE +#define _GNU_SOURCE + +#ifdef HAVE_CONFIG_H +#include +#endif + +#if defined(STDC_HEADERS) && !defined(emacs) +#include +#else +/* We need this for `regex.h', and perhaps for the Emacs include files. */ +#include +#endif +#include // sword + +/* For platform which support the ISO C amendement 1 functionality we + support user defined character classes. */ +#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H) +# include +# include +#endif + +/* This is for other GNU distributions with internationalized messages. */ +#if HAVE_LIBINTL_H || defined (_LIBC) +# include +#else +# define gettext(msgid) (msgid) +#endif + +#ifndef gettext_noop +/* This define is so xgettext can find the internationalizable + strings. */ +#define gettext_noop(String) String +#endif + +/* The `emacs' switch turns on certain matching commands + that make sense only in Emacs. */ +#ifdef emacs + +#include "lisp.h" +#include "buffer.h" +#include "syntax.h" + +#else /* not emacs */ + +/* If we are not linking with Emacs proper, + we can't use the relocating allocator + even if config.h says that we can. */ +#undef REL_ALLOC + +#if defined (STDC_HEADERS) || defined (_LIBC) +#include +#else +//sword char *malloc (); +//sword char *realloc (); +#endif + +/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow. + If nothing else has been done, use the method below. */ +#ifdef INHIBIT_STRING_HEADER +#if !(defined (HAVE_BZERO) && defined (HAVE_BCOPY)) +#if !defined (bzero) && !defined (bcopy) +#undef INHIBIT_STRING_HEADER +#endif +#endif +#endif + +/* This is the normal way of making sure we have a bcopy and a bzero. + This is used in most programs--a few other programs avoid this + by defining INHIBIT_STRING_HEADER. */ +#define HAVE_STRING_H // for SWORD Project +#ifndef INHIBIT_STRING_HEADER +#if defined (HAVE_STRING_H) || defined (STDC_HEADERS) || defined (_LIBC) +#include +#ifndef bcmp +#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) +#endif +#ifndef bcopy +#define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif +#ifndef bzero +#define bzero(s, n) memset ((s), 0, (n)) +#endif +#else +#include +#endif +#endif + +/* Define the syntax stuff for \<, \>, etc. */ + +/* This must be nonzero for the wordchar and notwordchar pattern + commands in re_match_2. */ +#ifndef Sword +#define Sword 1 +#endif + +#ifdef SWITCH_ENUM_BUG +#define SWITCH_ENUM_CAST(x) ((int)(x)) +#else +#define SWITCH_ENUM_CAST(x) (x) +#endif + +#ifdef SYNTAX_TABLE + +extern char *re_syntax_table; + +#else /* not SYNTAX_TABLE */ + +/* How many characters in the character set. */ +#define CHAR_SET_SIZE 256 + +static char re_syntax_table[CHAR_SET_SIZE]; + +static void +init_syntax_once () +{ + register int c; + static int done = 0; + + if (done) + return; + + bzero (re_syntax_table, sizeof re_syntax_table); + + for (c = 'a'; c <= 'z'; c++) + re_syntax_table[c] = Sword; + + for (c = 'A'; c <= 'Z'; c++) + re_syntax_table[c] = Sword; + + for (c = '0'; c <= '9'; c++) + re_syntax_table[c] = Sword; + + re_syntax_table['_'] = Sword; + + done = 1; +} + +#endif /* not SYNTAX_TABLE */ + +#define SYNTAX(c) re_syntax_table[c] + +#endif /* not emacs */ + +/* Get the interface, including the syntax bits. */ +#include "regex.h" + +/* isalpha etc. are used for the character classes. */ +#include + +/* Jim Meyering writes: + + "... Some ctype macros are valid only for character codes that + isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when + using /bin/cc or gcc but without giving an ansi option). So, all + ctype uses should be through macros like ISPRINT... If + STDC_HEADERS is defined, then autoconf has verified that the ctype + macros don't need to be guarded with references to isascii. ... + Defining isascii to 1 should let any compiler worth its salt + eliminate the && through constant folding." */ + +#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) +#define ISASCII(c) 1 +#else +#define ISASCII(c) isascii(c) +#endif + +#ifdef isblank +#define ISBLANK(c) (ISASCII (c) && isblank (c)) +#else +#define ISBLANK(c) ((c) == ' ' || (c) == '\t') +#endif +#ifdef isgraph +#define ISGRAPH(c) (ISASCII (c) && isgraph (c)) +#else +#define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c)) +#endif + +#define ISPRINT(c) (ISASCII (c) && isprint (c)) +#define ISDIGIT(c) (ISASCII (c) && isdigit (c)) +#define ISALNUM(c) (ISASCII (c) && isalnum (c)) +#define ISALPHA(c) (ISASCII (c) && isalpha (c)) +#define ISCNTRL(c) (ISASCII (c) && iscntrl (c)) +#define ISLOWER(c) (ISASCII (c) && islower (c)) +#define ISPUNCT(c) (ISASCII (c) && ispunct (c)) +#define ISSPACE(c) (ISASCII (c) && isspace (c)) +#define ISUPPER(c) (ISASCII (c) && isupper (c)) +#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c)) + +#ifndef NULL +#define NULL (void *)0 +#endif + +/* We remove any previous definition of `SIGN_EXTEND_CHAR', + since ours (we hope) works properly with all combinations of + machines, compilers, `char' and `unsigned char' argument types. + (Per Bothner suggested the basic approach.) */ +#undef SIGN_EXTEND_CHAR +#if __STDC__ +#define SIGN_EXTEND_CHAR(c) ((signed char) (c)) +#else /* not __STDC__ */ +/* As in Harbison and Steele. */ +#define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128) +#endif + +/* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we + use `alloca' instead of `malloc'. This is because using malloc in + re_search* or re_match* could cause memory leaks when C-g is used in + Emacs; also, malloc is slower and causes storage fragmentation. On + the other hand, malloc is more portable, and easier to debug. + + Because we sometimes use alloca, some routines have to be macros, + not functions -- `alloca'-allocated space disappears at the end of the + function it is called in. */ + +#ifdef REGEX_MALLOC + +#define REGEX_ALLOCATE malloc +#define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize) +#define REGEX_FREE free + +#else /* not REGEX_MALLOC */ + +/* Emacs already defines alloca, sometimes. */ +#ifndef alloca + +/* Make alloca work the best possible way. */ +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else /* not __GNUC__ */ +#if HAVE_ALLOCA_H +#include +#else /* not __GNUC__ or HAVE_ALLOCA_H */ +#if 0 /* It is a bad idea to declare alloca. We always cast the result. */ +#ifndef _AIX /* Already did AIX, up at the top. */ +char *alloca (); +#endif /* not _AIX */ +#endif +#endif /* not HAVE_ALLOCA_H */ +#endif /* not __GNUC__ */ + +#endif /* not alloca */ + +#define REGEX_ALLOCATE alloca + +/* Assumes a `char *destination' variable. */ +#define REGEX_REALLOCATE(source, osize, nsize) \ + (destination = (char *) alloca (nsize), \ + bcopy (source, destination, osize), \ + destination) + +/* No need to do anything to free, after alloca. */ +#define REGEX_FREE(arg) ((void)0) /* Do nothing! But inhibit gcc warning. */ + +#endif /* not REGEX_MALLOC */ + +/* Define how to allocate the failure stack. */ + +#if defined (REL_ALLOC) && defined (REGEX_MALLOC) + +#define REGEX_ALLOCATE_STACK(size) \ + r_alloc (&failure_stack_ptr, (size)) +#define REGEX_REALLOCATE_STACK(source, osize, nsize) \ + r_re_alloc (&failure_stack_ptr, (nsize)) +#define REGEX_FREE_STACK(ptr) \ + r_alloc_free (&failure_stack_ptr) + +#else /* not using relocating allocator */ + +#ifdef REGEX_MALLOC + +#define REGEX_ALLOCATE_STACK malloc +#define REGEX_REALLOCATE_STACK(source, osize, nsize) realloc (source, nsize) +#define REGEX_FREE_STACK free + +#else /* not REGEX_MALLOC */ + +#define REGEX_ALLOCATE_STACK alloca + +#define REGEX_REALLOCATE_STACK(source, osize, nsize) \ + REGEX_REALLOCATE (source, osize, nsize) +/* No need to explicitly free anything. */ +#define REGEX_FREE_STACK(arg) + +#endif /* not REGEX_MALLOC */ +#endif /* not using relocating allocator */ + + +/* True if `size1' is non-NULL and PTR is pointing anywhere inside + `string1' or just past its end. This works if PTR is NULL, which is + a good thing. */ +#define FIRST_STRING_P(ptr) \ + (size1 && string1 <= (ptr) && (ptr) <= string1 + size1) + +/* (Re)Allocate N items of type T using malloc, or fail. */ +#define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t))) +#define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t))) +#define RETALLOC_IF(addr, n, t) \ + if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t) +#define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t))) + +#define BYTEWIDTH 8 /* In bits. */ + +#define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) + +#undef MAX +#undef MIN +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) + +typedef char boolean; +#define false 0 +#define true 1 + +static int re_match_2_internal (); + +/* These are the command codes that appear in compiled regular + expressions. Some opcodes are followed by argument bytes. A + command code can specify any interpretation whatsoever for its + arguments. Zero bytes may appear in the compiled regular expression. */ + +typedef enum +{ + no_op = 0, + + /* Succeed right away--no more backtracking. */ + succeed, + + /* Followed by one byte giving n, then by n literal bytes. */ + exactn, + + /* Matches any (more or less) character. */ + anychar, + + /* Matches any one char belonging to specified set. First + following byte is number of bitmap bytes. Then come bytes + for a bitmap saying which chars are in. Bits in each byte + are ordered low-bit-first. A character is in the set if its + bit is 1. A character too large to have a bit in the map is + automatically not in the set. */ + charset, + + /* Same parameters as charset, but match any character that is + not one of those specified. */ + charset_not, + + /* Start remembering the text that is matched, for storing in a + register. Followed by one byte with the register number, in + the range 0 to one less than the pattern buffer's re_nsub + field. Then followed by one byte with the number of groups + inner to this one. (This last has to be part of the + start_memory only because we need it in the on_failure_jump + of re_match_2.) */ + start_memory, + + /* Stop remembering the text that is matched and store it in a + memory register. Followed by one byte with the register + number, in the range 0 to one less than `re_nsub' in the + pattern buffer, and one byte with the number of inner groups, + just like `start_memory'. (We need the number of inner + groups here because we don't have any easy way of finding the + corresponding start_memory when we're at a stop_memory.) */ + stop_memory, + + /* Match a duplicate of something remembered. Followed by one + byte containing the register number. */ + duplicate, + + /* Fail unless at beginning of line. */ + begline, + + /* Fail unless at end of line. */ + endline, + + /* Succeeds if at beginning of buffer (if emacs) or at beginning + of string to be matched (if not). */ + begbuf, + + /* Analogously, for end of buffer/string. */ + endbuf, + + /* Followed by two byte relative address to which to jump. */ + jump, + + /* Same as jump, but marks the end of an alternative. */ + jump_past_alt, + + /* Followed by two-byte relative address of place to resume at + in case of failure. */ + on_failure_jump, + + /* Like on_failure_jump, but pushes a placeholder instead of the + current string position when executed. */ + on_failure_keep_string_jump, + + /* Throw away latest failure point and then jump to following + two-byte relative address. */ + pop_failure_jump, + + /* Change to pop_failure_jump if know won't have to backtrack to + match; otherwise change to jump. This is used to jump + back to the beginning of a repeat. If what follows this jump + clearly won't match what the repeat does, such that we can be + sure that there is no use backtracking out of repetitions + already matched, then we change it to a pop_failure_jump. + Followed by two-byte address. */ + maybe_pop_jump, + + /* Jump to following two-byte address, and push a dummy failure + point. This failure point will be thrown away if an attempt + is made to use it for a failure. A `+' construct makes this + before the first repeat. Also used as an intermediary kind + of jump when compiling an alternative. */ + dummy_failure_jump, + + /* Push a dummy failure point and continue. Used at the end of + alternatives. */ + push_dummy_failure, + + /* Followed by two-byte relative address and two-byte number n. + After matching N times, jump to the address upon failure. */ + succeed_n, + + /* Followed by two-byte relative address, and two-byte number n. + Jump to the address N times, then fail. */ + jump_n, + + /* Set the following two-byte relative address to the + subsequent two-byte number. The address *includes* the two + bytes of number. */ + set_number_at, + + wordchar, /* Matches any word-constituent character. */ + notwordchar, /* Matches any char that is not a word-constituent. */ + + wordbeg, /* Succeeds if at word beginning. */ + wordend, /* Succeeds if at word end. */ + + wordbound, /* Succeeds if at a word boundary. */ + notwordbound /* Succeeds if not at a word boundary. */ + +#ifdef emacs + ,before_dot, /* Succeeds if before point. */ + at_dot, /* Succeeds if at point. */ + after_dot, /* Succeeds if after point. */ + + /* Matches any character whose syntax is specified. Followed by + a byte which contains a syntax code, e.g., Sword. */ + syntaxspec, + + /* Matches any character whose syntax is not that specified. */ + notsyntaxspec +#endif /* emacs */ +} re_opcode_t; + +/* Common operations on the compiled pattern. */ + +/* Store NUMBER in two contiguous bytes starting at DESTINATION. */ + +#define STORE_NUMBER(destination, number) \ + do { \ + (destination)[0] = (number) & 0377; \ + (destination)[1] = (number) >> 8; \ + } while (0) + +/* Same as STORE_NUMBER, except increment DESTINATION to + the byte after where the number is stored. Therefore, DESTINATION + must be an lvalue. */ + +#define STORE_NUMBER_AND_INCR(destination, number) \ + do { \ + STORE_NUMBER (destination, number); \ + (destination) += 2; \ + } while (0) + +/* Put into DESTINATION a number stored in two contiguous bytes starting + at SOURCE. */ + +#define EXTRACT_NUMBER(destination, source) \ + do { \ + (destination) = *(source) & 0377; \ + (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \ + } while (0) + +#ifdef DEBUG +static void extract_number _RE_ARGS ((int *dest, unsigned char *source)); +static void +extract_number (dest, source) + int *dest; + unsigned char *source; +{ + int temp = SIGN_EXTEND_CHAR (*(source + 1)); + *dest = *source & 0377; + *dest += temp << 8; +} + +#ifndef EXTRACT_MACROS /* To debug the macros. */ +#undef EXTRACT_NUMBER +#define EXTRACT_NUMBER(dest, src) extract_number (&dest, src) +#endif /* not EXTRACT_MACROS */ + +#endif /* DEBUG */ + +/* Same as EXTRACT_NUMBER, except increment SOURCE to after the number. + SOURCE must be an lvalue. */ + +#define EXTRACT_NUMBER_AND_INCR(destination, source) \ + do { \ + EXTRACT_NUMBER (destination, source); \ + (source) += 2; \ + } while (0) + +#ifdef DEBUG +static void extract_number_and_incr _RE_ARGS ((int *destination, + unsigned char **source)); +static void +extract_number_and_incr (destination, source) + int *destination; + unsigned char **source; +{ + extract_number (destination, *source); + *source += 2; +} + +#ifndef EXTRACT_MACROS +#undef EXTRACT_NUMBER_AND_INCR +#define EXTRACT_NUMBER_AND_INCR(dest, src) \ + extract_number_and_incr (&dest, &src) +#endif /* not EXTRACT_MACROS */ + +#endif /* DEBUG */ + +/* If DEBUG is defined, Regex prints many voluminous messages about what + it is doing (if the variable `debug' is nonzero). If linked with the + main program in `iregex.c', you can enter patterns and strings + interactively. And if linked with the main program in `main.c' and + the other test files, you can run the already-written tests. */ + +#ifdef DEBUG + +/* We use standard I/O for debugging. */ +#include + +/* It is useful to test things that ``must'' be true when debugging. */ +#include + +static int debug = 0; + +#define DEBUG_STATEMENT(e) e +#define DEBUG_PRINT1(x) if (debug) printf (x) +#define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2) +#define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3) +#define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4) +#define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \ + if (debug) print_partial_compiled_pattern (s, e) +#define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \ + if (debug) print_double_string (w, s1, sz1, s2, sz2) + + +/* Print the fastmap in human-readable form. */ + +void +print_fastmap (fastmap) + char *fastmap; +{ + unsigned was_a_range = 0; + unsigned i = 0; + + while (i < (1 << BYTEWIDTH)) + { + if (fastmap[i++]) + { + was_a_range = 0; + putchar (i - 1); + while (i < (1 << BYTEWIDTH) && fastmap[i]) + { + was_a_range = 1; + i++; + } + if (was_a_range) + { + printf ("-"); + putchar (i - 1); + } + } + } + putchar ('\n'); +} + + +/* Print a compiled pattern string in human-readable form, starting at + the START pointer into it and ending just before the pointer END. */ + +void +print_partial_compiled_pattern (start, end) + unsigned char *start; + unsigned char *end; +{ + int mcnt, mcnt2; + unsigned char *p1; + unsigned char *p = start; + unsigned char *pend = end; + + if (start == NULL) + { + printf ("(null)\n"); + return; + } + + /* Loop over pattern commands. */ + while (p < pend) + { + printf ("%d:\t", p - start); + + switch ((re_opcode_t) *p++) + { + case no_op: + printf ("/no_op"); + break; + + case exactn: + mcnt = *p++; + printf ("/exactn/%d", mcnt); + do + { + putchar ('/'); + putchar (*p++); + } + while (--mcnt); + break; + + case start_memory: + mcnt = *p++; + printf ("/start_memory/%d/%d", mcnt, *p++); + break; + + case stop_memory: + mcnt = *p++; + printf ("/stop_memory/%d/%d", mcnt, *p++); + break; + + case duplicate: + printf ("/duplicate/%d", *p++); + break; + + case anychar: + printf ("/anychar"); + break; + + case charset: + case charset_not: + { + register int c, last = -100; + register int in_range = 0; + + printf ("/charset [%s", + (re_opcode_t) *(p - 1) == charset_not ? "^" : ""); + + assert (p + *p < pend); + + for (c = 0; c < 256; c++) + if (c / 8 < *p + && (p[1 + (c/8)] & (1 << (c % 8)))) + { + /* Are we starting a range? */ + if (last + 1 == c && ! in_range) + { + putchar ('-'); + in_range = 1; + } + /* Have we broken a range? */ + else if (last + 1 != c && in_range) + { + putchar (last); + in_range = 0; + } + + if (! in_range) + putchar (c); + + last = c; + } + + if (in_range) + putchar (last); + + putchar (']'); + + p += 1 + *p; + } + break; + + case begline: + printf ("/begline"); + break; + + case endline: + printf ("/endline"); + break; + + case on_failure_jump: + extract_number_and_incr (&mcnt, &p); + printf ("/on_failure_jump to %d", p + mcnt - start); + break; + + case on_failure_keep_string_jump: + extract_number_and_incr (&mcnt, &p); + printf ("/on_failure_keep_string_jump to %d", p + mcnt - start); + break; + + case dummy_failure_jump: + extract_number_and_incr (&mcnt, &p); + printf ("/dummy_failure_jump to %d", p + mcnt - start); + break; + + case push_dummy_failure: + printf ("/push_dummy_failure"); + break; + + case maybe_pop_jump: + extract_number_and_incr (&mcnt, &p); + printf ("/maybe_pop_jump to %d", p + mcnt - start); + break; + + case pop_failure_jump: + extract_number_and_incr (&mcnt, &p); + printf ("/pop_failure_jump to %d", p + mcnt - start); + break; + + case jump_past_alt: + extract_number_and_incr (&mcnt, &p); + printf ("/jump_past_alt to %d", p + mcnt - start); + break; + + case jump: + extract_number_and_incr (&mcnt, &p); + printf ("/jump to %d", p + mcnt - start); + break; + + case succeed_n: + extract_number_and_incr (&mcnt, &p); + p1 = p + mcnt; + extract_number_and_incr (&mcnt2, &p); + printf ("/succeed_n to %d, %d times", p1 - start, mcnt2); + break; + + case jump_n: + extract_number_and_incr (&mcnt, &p); + p1 = p + mcnt; + extract_number_and_incr (&mcnt2, &p); + printf ("/jump_n to %d, %d times", p1 - start, mcnt2); + break; + + case set_number_at: + extract_number_and_incr (&mcnt, &p); + p1 = p + mcnt; + extract_number_and_incr (&mcnt2, &p); + printf ("/set_number_at location %d to %d", p1 - start, mcnt2); + break; + + case wordbound: + printf ("/wordbound"); + break; + + case notwordbound: + printf ("/notwordbound"); + break; + + case wordbeg: + printf ("/wordbeg"); + break; + + case wordend: + printf ("/wordend"); + +#ifdef emacs + case before_dot: + printf ("/before_dot"); + break; + + case at_dot: + printf ("/at_dot"); + break; + + case after_dot: + printf ("/after_dot"); + break; + + case syntaxspec: + printf ("/syntaxspec"); + mcnt = *p++; + printf ("/%d", mcnt); + break; + + case notsyntaxspec: + printf ("/notsyntaxspec"); + mcnt = *p++; + printf ("/%d", mcnt); + break; +#endif /* emacs */ + + case wordchar: + printf ("/wordchar"); + break; + + case notwordchar: + printf ("/notwordchar"); + break; + + case begbuf: + printf ("/begbuf"); + break; + + case endbuf: + printf ("/endbuf"); + break; + + default: + printf ("?%d", *(p-1)); + } + + putchar ('\n'); + } + + printf ("%d:\tend of pattern.\n", p - start); +} + + +void +print_compiled_pattern (bufp) + struct re_pattern_buffer *bufp; +{ + unsigned char *buffer = bufp->buffer; + + print_partial_compiled_pattern (buffer, buffer + bufp->used); + printf ("%ld bytes used/%ld bytes allocated.\n", + bufp->used, bufp->allocated); + + if (bufp->fastmap_accurate && bufp->fastmap) + { + printf ("fastmap: "); + print_fastmap (bufp->fastmap); + } + + printf ("re_nsub: %d\t", bufp->re_nsub); + printf ("regs_alloc: %d\t", bufp->regs_allocated); + printf ("can_be_null: %d\t", bufp->can_be_null); + printf ("newline_anchor: %d\n", bufp->newline_anchor); + printf ("no_sub: %d\t", bufp->no_sub); + printf ("not_bol: %d\t", bufp->not_bol); + printf ("not_eol: %d\t", bufp->not_eol); + printf ("syntax: %lx\n", bufp->syntax); + /* Perhaps we should print the translate table? */ +} + + +void +print_double_string (where, string1, size1, string2, size2) + const char *where; + const char *string1; + const char *string2; + int size1; + int size2; +{ + int this_char; + + if (where == NULL) + printf ("(null)"); + else + { + if (FIRST_STRING_P (where)) + { + for (this_char = where - string1; this_char < size1; this_char++) + putchar (string1[this_char]); + + where = string2; + } + + for (this_char = where - string2; this_char < size2; this_char++) + putchar (string2[this_char]); + } +} + +void +printchar (c) + int c; +{ + putc (c, stderr); +} + +#else /* not DEBUG */ + +#undef assert +#define assert(e) + +#define DEBUG_STATEMENT(e) +#define DEBUG_PRINT1(x) +#define DEBUG_PRINT2(x1, x2) +#define DEBUG_PRINT3(x1, x2, x3) +#define DEBUG_PRINT4(x1, x2, x3, x4) +#define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) +#define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) + +#endif /* not DEBUG */ + +/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can + also be assigned to arbitrarily: each pattern buffer stores its own + syntax, so it can be changed between regex compilations. */ +/* This has no initializer because initialized variables in Emacs + become read-only after dumping. */ +reg_syntax_t re_syntax_options; + + +/* Specify the precise syntax of regexps for compilation. This provides + for compatibility for various utilities which historically have + different, incompatible syntaxes. + + The argument SYNTAX is a bit mask comprised of the various bits + defined in regex.h. We return the old syntax. */ + +reg_syntax_t +re_set_syntax (syntax) + reg_syntax_t syntax; +{ + reg_syntax_t ret = re_syntax_options; + + re_syntax_options = syntax; +#ifdef DEBUG + if (syntax & RE_DEBUG) + debug = 1; + else if (debug) /* was on but now is not */ + debug = 0; +#endif /* DEBUG */ + return ret; +} + +/* This table gives an error message for each of the error codes listed + in regex.h. Obviously the order here has to be same as there. + POSIX doesn't require that we do anything for REG_NOERROR, + but why not be nice? */ + +static const char *re_error_msgid[] = + { + gettext_noop ("Success"), /* REG_NOERROR */ + gettext_noop ("No match"), /* REG_NOMATCH */ + gettext_noop ("Invalid regular expression"), /* REG_BADPAT */ + gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */ + gettext_noop ("Invalid character class name"), /* REG_ECTYPE */ + gettext_noop ("Trailing backslash"), /* REG_EESCAPE */ + gettext_noop ("Invalid back reference"), /* REG_ESUBREG */ + gettext_noop ("Unmatched [ or [^"), /* REG_EBRACK */ + gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */ + gettext_noop ("Unmatched \\{"), /* REG_EBRACE */ + gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */ + gettext_noop ("Invalid range end"), /* REG_ERANGE */ + gettext_noop ("Memory exhausted"), /* REG_ESPACE */ + gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */ + gettext_noop ("Premature end of regular expression"), /* REG_EEND */ + gettext_noop ("Regular expression too big"), /* REG_ESIZE */ + gettext_noop ("Unmatched ) or \\)"), /* REG_ERPAREN */ + }; + +/* Avoiding alloca during matching, to placate r_alloc. */ + +/* Define MATCH_MAY_ALLOCATE unless we need to make sure that the + searching and matching functions should not call alloca. On some + systems, alloca is implemented in terms of malloc, and if we're + using the relocating allocator routines, then malloc could cause a + relocation, which might (if the strings being searched are in the + ralloc heap) shift the data out from underneath the regexp + routines. + + Here's another reason to avoid allocation: Emacs + processes input from X in a signal handler; processing X input may + call malloc; if input arrives while a matching routine is calling + malloc, then we're scrod. But Emacs can't just block input while + calling matching routines; then we don't notice interrupts when + they come in. So, Emacs blocks input around all regexp calls + except the matching calls, which it leaves unprotected, in the + faith that they will not malloc. */ + +/* Normally, this is fine. */ +#define MATCH_MAY_ALLOCATE + +/* When using GNU C, we are not REALLY using the C alloca, no matter + what config.h may say. So don't take precautions for it. */ +#ifdef __GNUC__ +#undef C_ALLOCA +#endif + +/* The match routines may not allocate if (1) they would do it with malloc + and (2) it's not safe for them to use malloc. + Note that if REL_ALLOC is defined, matching would not use malloc for the + failure stack, but we would still use it for the register vectors; + so REL_ALLOC should not affect this. */ +#if (defined (C_ALLOCA) || defined (REGEX_MALLOC)) && defined (emacs) +#undef MATCH_MAY_ALLOCATE +#endif + + +/* Failure stack declarations and macros; both re_compile_fastmap and + re_match_2 use a failure stack. These have to be macros because of + REGEX_ALLOCATE_STACK. */ + + +/* Number of failure points for which to initially allocate space + when matching. If this number is exceeded, we allocate more + space, so it is not a hard limit. */ +#ifndef INIT_FAILURE_ALLOC +#define INIT_FAILURE_ALLOC 5 +#endif + +/* Roughly the maximum number of failure points on the stack. Would be + exactly that if always used MAX_FAILURE_ITEMS items each time we failed. + This is a variable only so users of regex can assign to it; we never + change it ourselves. */ + +#ifdef INT_IS_16BIT + +#if defined (MATCH_MAY_ALLOCATE) +/* 4400 was enough to cause a crash on Alpha OSF/1, + whose default stack limit is 2mb. */ +long int re_max_failures = 4000; +#else +long int re_max_failures = 2000; +#endif + +union fail_stack_elt +{ + unsigned char *pointer; + long int integer; +}; + +typedef union fail_stack_elt fail_stack_elt_t; + +typedef struct +{ + fail_stack_elt_t *stack; + unsigned long int size; + unsigned long int avail; /* Offset of next open position. */ +} fail_stack_type; + +#else /* not INT_IS_16BIT */ + +#if defined (MATCH_MAY_ALLOCATE) +/* 4400 was enough to cause a crash on Alpha OSF/1, + whose default stack limit is 2mb. */ +int re_max_failures = 20000; +#else +int re_max_failures = 2000; +#endif + +union fail_stack_elt +{ + unsigned char *pointer; + int integer; +}; + +typedef union fail_stack_elt fail_stack_elt_t; + +typedef struct +{ + fail_stack_elt_t *stack; + unsigned size; + unsigned avail; /* Offset of next open position. */ +} fail_stack_type; + +#endif /* INT_IS_16BIT */ + +#define FAIL_STACK_EMPTY() (fail_stack.avail == 0) +#define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0) +#define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size) + + +/* Define macros to initialize and free the failure stack. + Do `return -2' if the alloc fails. */ + +#ifdef MATCH_MAY_ALLOCATE +#define INIT_FAIL_STACK() \ + do { \ + fail_stack.stack = (fail_stack_elt_t *) \ + REGEX_ALLOCATE_STACK (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t)); \ + \ + if (fail_stack.stack == NULL) \ + return -2; \ + \ + fail_stack.size = INIT_FAILURE_ALLOC; \ + fail_stack.avail = 0; \ + } while (0) + +#define RESET_FAIL_STACK() REGEX_FREE_STACK (fail_stack.stack) +#else +#define INIT_FAIL_STACK() \ + do { \ + fail_stack.avail = 0; \ + } while (0) + +#define RESET_FAIL_STACK() +#endif + + +/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items. + + Return 1 if succeeds, and 0 if either ran out of memory + allocating space for it or it was already too large. + + REGEX_REALLOCATE_STACK requires `destination' be declared. */ + +#define DOUBLE_FAIL_STACK(fail_stack) \ + ((fail_stack).size > (unsigned) (re_max_failures * MAX_FAILURE_ITEMS) \ + ? 0 \ + : ((fail_stack).stack = (fail_stack_elt_t *) \ + REGEX_REALLOCATE_STACK ((fail_stack).stack, \ + (fail_stack).size * sizeof (fail_stack_elt_t), \ + ((fail_stack).size << 1) * sizeof (fail_stack_elt_t)), \ + \ + (fail_stack).stack == NULL \ + ? 0 \ + : ((fail_stack).size <<= 1, \ + 1))) + + +/* Push pointer POINTER on FAIL_STACK. + Return 1 if was able to do so and 0 if ran out of memory allocating + space to do so. */ +#define PUSH_PATTERN_OP(POINTER, FAIL_STACK) \ + ((FAIL_STACK_FULL () \ + && !DOUBLE_FAIL_STACK (FAIL_STACK)) \ + ? 0 \ + : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER, \ + 1)) + +/* Push a pointer value onto the failure stack. + Assumes the variable `fail_stack'. Probably should only + be called from within `PUSH_FAILURE_POINT'. */ +#define PUSH_FAILURE_POINTER(item) \ + fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (item) + +/* This pushes an integer-valued item onto the failure stack. + Assumes the variable `fail_stack'. Probably should only + be called from within `PUSH_FAILURE_POINT'. */ +#define PUSH_FAILURE_INT(item) \ + fail_stack.stack[fail_stack.avail++].integer = (item) + +/* Push a fail_stack_elt_t value onto the failure stack. + Assumes the variable `fail_stack'. Probably should only + be called from within `PUSH_FAILURE_POINT'. */ +#define PUSH_FAILURE_ELT(item) \ + fail_stack.stack[fail_stack.avail++] = (item) + +/* These three POP... operations complement the three PUSH... operations. + All assume that `fail_stack' is nonempty. */ +#define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer +#define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer +#define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail] + +/* Used to omit pushing failure point id's when we're not debugging. */ +#ifdef DEBUG +#define DEBUG_PUSH PUSH_FAILURE_INT +#define DEBUG_POP(item_addr) (item_addr)->integer = POP_FAILURE_INT () +#else +#define DEBUG_PUSH(item) +#define DEBUG_POP(item_addr) +#endif + + +/* Push the information about the state we will need + if we ever fail back to it. + + Requires variables fail_stack, regstart, regend, reg_info, and + num_regs be declared. DOUBLE_FAIL_STACK requires `destination' be + declared. + + Does `return FAILURE_CODE' if runs out of memory. */ + +#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \ + do { \ + char *destination; \ + /* Must be int, so when we don't save any registers, the arithmetic \ + of 0 + -1 isn't done as unsigned. */ \ + /* Can't be int, since there is not a shred of a guarantee that int \ + is wide enough to hold a value of something to which pointer can \ + be assigned */ \ + s_reg_t this_reg; \ + \ + DEBUG_STATEMENT (failure_id++); \ + DEBUG_STATEMENT (nfailure_points_pushed++); \ + DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \ + DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\ + DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\ + \ + DEBUG_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \ + DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \ + \ + /* Ensure we have enough space allocated for what we will push. */ \ + while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \ + { \ + if (!DOUBLE_FAIL_STACK (fail_stack)) \ + return failure_code; \ + \ + DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \ + (fail_stack).size); \ + DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\ + } \ + \ + /* Push the info, starting with the registers. */ \ + DEBUG_PRINT1 ("\n"); \ + \ + if (1) \ + for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ + this_reg++) \ + { \ + DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \ + DEBUG_STATEMENT (num_regs_pushed++); \ + \ + DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ + PUSH_FAILURE_POINTER (regstart[this_reg]); \ + \ + DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ + PUSH_FAILURE_POINTER (regend[this_reg]); \ + \ + DEBUG_PRINT2 (" info: 0x%x\n ", reg_info[this_reg]); \ + DEBUG_PRINT2 (" match_null=%d", \ + REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \ + DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ + DEBUG_PRINT2 (" matched_something=%d", \ + MATCHED_SOMETHING (reg_info[this_reg])); \ + DEBUG_PRINT2 (" ever_matched=%d", \ + EVER_MATCHED_SOMETHING (reg_info[this_reg])); \ + DEBUG_PRINT1 ("\n"); \ + PUSH_FAILURE_ELT (reg_info[this_reg].word); \ + } \ + \ + DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg);\ + PUSH_FAILURE_INT (lowest_active_reg); \ + \ + DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\ + PUSH_FAILURE_INT (highest_active_reg); \ + \ + DEBUG_PRINT2 (" Pushing pattern 0x%x:\n", pattern_place); \ + DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ + PUSH_FAILURE_POINTER (pattern_place); \ + \ + DEBUG_PRINT2 (" Pushing string 0x%x: `", string_place); \ + DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \ + size2); \ + DEBUG_PRINT1 ("'\n"); \ + PUSH_FAILURE_POINTER (string_place); \ + \ + DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \ + DEBUG_PUSH (failure_id); \ + } while (0) + +/* This is the number of items that are pushed and popped on the stack + for each register. */ +#define NUM_REG_ITEMS 3 + +/* Individual items aside from the registers. */ +#ifdef DEBUG +#define NUM_NONREG_ITEMS 5 /* Includes failure point id. */ +#else +#define NUM_NONREG_ITEMS 4 +#endif + +/* We push at most this many items on the stack. */ +/* We used to use (num_regs - 1), which is the number of registers + this regexp will save; but that was changed to 5 + to avoid stack overflow for a regexp with lots of parens. */ +#define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS) + +/* We actually push this many items. */ +#define NUM_FAILURE_ITEMS \ + (((0 \ + ? 0 : highest_active_reg - lowest_active_reg + 1) \ + * NUM_REG_ITEMS) \ + + NUM_NONREG_ITEMS) + +/* How many items can still be added to the stack without overflowing it. */ +#define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail) + + +/* Pops what PUSH_FAIL_STACK pushes. + + We restore into the parameters, all of which should be lvalues: + STR -- the saved data position. + PAT -- the saved pattern position. + LOW_REG, HIGH_REG -- the highest and lowest active registers. + REGSTART, REGEND -- arrays of string positions. + REG_INFO -- array of information about each subexpression. + + Also assumes the variables `fail_stack' and (if debugging), `bufp', + `pend', `string1', `size1', `string2', and `size2'. */ + +#define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\ +{ \ + DEBUG_STATEMENT (fail_stack_elt_t failure_id;) \ + s_reg_t this_reg; \ + const unsigned char *string_temp; \ + \ + assert (!FAIL_STACK_EMPTY ()); \ + \ + /* Remove failure points and point to how many regs pushed. */ \ + DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \ + DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \ + DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \ + \ + assert (fail_stack.avail >= NUM_NONREG_ITEMS); \ + \ + DEBUG_POP (&failure_id); \ + DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \ + \ + /* If the saved string location is NULL, it came from an \ + on_failure_keep_string_jump opcode, and we want to throw away the \ + saved NULL, thus retaining our current position in the string. */ \ + string_temp = POP_FAILURE_POINTER (); \ + if (string_temp != NULL) \ + str = (const char *) string_temp; \ + \ + DEBUG_PRINT2 (" Popping string 0x%x: `", str); \ + DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \ + DEBUG_PRINT1 ("'\n"); \ + \ + pat = (unsigned char *) POP_FAILURE_POINTER (); \ + DEBUG_PRINT2 (" Popping pattern 0x%x:\n", pat); \ + DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ + \ + /* Restore register info. */ \ + high_reg = (active_reg_t) POP_FAILURE_INT (); \ + DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \ + \ + low_reg = (active_reg_t) POP_FAILURE_INT (); \ + DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \ + \ + if (1) \ + for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ + { \ + DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \ + \ + reg_info[this_reg].word = POP_FAILURE_ELT (); \ + DEBUG_PRINT2 (" info: 0x%x\n", reg_info[this_reg]); \ + \ + regend[this_reg] = (const char *) POP_FAILURE_POINTER (); \ + DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ + \ + regstart[this_reg] = (const char *) POP_FAILURE_POINTER (); \ + DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ + } \ + else \ + { \ + for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \ + { \ + reg_info[this_reg].word.integer = 0; \ + regend[this_reg] = 0; \ + regstart[this_reg] = 0; \ + } \ + highest_active_reg = high_reg; \ + } \ + \ + set_regs_matched_done = 0; \ + DEBUG_STATEMENT (nfailure_points_popped++); \ +} /* POP_FAILURE_POINT */ + + + +/* Structure for per-register (a.k.a. per-group) information. + Other register information, such as the + starting and ending positions (which are addresses), and the list of + inner groups (which is a bits list) are maintained in separate + variables. + + We are making a (strictly speaking) nonportable assumption here: that + the compiler will pack our bit fields into something that fits into + the type of `word', i.e., is something that fits into one item on the + failure stack. */ + + +/* Declarations and macros for re_match_2. */ + +typedef union +{ + fail_stack_elt_t word; + struct + { + /* This field is one if this group can match the empty string, + zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */ +#define MATCH_NULL_UNSET_VALUE 3 + unsigned match_null_string_p : 2; + unsigned is_active : 1; + unsigned matched_something : 1; + unsigned ever_matched_something : 1; + } bits; +} register_info_type; + +#define REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p) +#define IS_ACTIVE(R) ((R).bits.is_active) +#define MATCHED_SOMETHING(R) ((R).bits.matched_something) +#define EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something) + + +/* Call this when have matched a real character; it sets `matched' flags + for the subexpressions which we are currently inside. Also records + that those subexprs have matched. */ +#define SET_REGS_MATCHED() \ + do \ + { \ + if (!set_regs_matched_done) \ + { \ + active_reg_t r; \ + set_regs_matched_done = 1; \ + for (r = lowest_active_reg; r <= highest_active_reg; r++) \ + { \ + MATCHED_SOMETHING (reg_info[r]) \ + = EVER_MATCHED_SOMETHING (reg_info[r]) \ + = 1; \ + } \ + } \ + } \ + while (0) + +/* Registers are set to a sentinel when they haven't yet matched. */ +static char reg_unset_dummy; +#define REG_UNSET_VALUE (®_unset_dummy) +#define REG_UNSET(e) ((e) == REG_UNSET_VALUE) + +/* Subroutine declarations and macros for regex_compile. */ + +static reg_errcode_t regex_compile _RE_ARGS ((const char *pattern, size_t size, + reg_syntax_t syntax, + struct re_pattern_buffer *bufp)); +static void store_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc, int arg)); +static void store_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc, + int arg1, int arg2)); +static void insert_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc, + int arg, unsigned char *end)); +static void insert_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc, + int arg1, int arg2, unsigned char *end)); +static boolean at_begline_loc_p _RE_ARGS ((const char *pattern, const char *p, + reg_syntax_t syntax)); +static boolean at_endline_loc_p _RE_ARGS ((const char *p, const char *pend, + reg_syntax_t syntax)); +static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr, + const char *pend, + char *translate, + reg_syntax_t syntax, + unsigned char *b)); + +/* Fetch the next character in the uncompiled pattern---translating it + if necessary. Also cast from a signed character in the constant + string passed to us by the user to an unsigned char that we can use + as an array index (in, e.g., `translate'). */ +#ifndef PATFETCH +#define PATFETCH(c) \ + do {if (p == pend) return REG_EEND; \ + c = (unsigned char) *p++; \ + if (translate) c = (unsigned char) translate[c]; \ + } while (0) +#endif + +/* Fetch the next character in the uncompiled pattern, with no + translation. */ +#define PATFETCH_RAW(c) \ + do {if (p == pend) return REG_EEND; \ + c = (unsigned char) *p++; \ + } while (0) + +/* Go backwards one character in the pattern. */ +#define PATUNFETCH p-- + + +/* If `translate' is non-null, return translate[D], else just D. We + cast the subscript to translate because some data is declared as + `char *', to avoid warnings when a string constant is passed. But + when we use a character as a subscript we must make it unsigned. */ +#ifndef TRANSLATE +#define TRANSLATE(d) \ + (translate ? (char) translate[(unsigned char) (d)] : (d)) +#endif + + +/* Macros for outputting the compiled pattern into `buffer'. */ + +/* If the buffer isn't allocated when it comes in, use this. */ +#define INIT_BUF_SIZE 32 + +/* Make sure we have at least N more bytes of space in buffer. */ +#define GET_BUFFER_SPACE(n) \ + while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated) \ + EXTEND_BUFFER () + +/* Make sure we have one more byte of buffer space and then add C to it. */ +#define BUF_PUSH(c) \ + do { \ + GET_BUFFER_SPACE (1); \ + *b++ = (unsigned char) (c); \ + } while (0) + + +/* Ensure we have two more bytes of buffer space and then append C1 and C2. */ +#define BUF_PUSH_2(c1, c2) \ + do { \ + GET_BUFFER_SPACE (2); \ + *b++ = (unsigned char) (c1); \ + *b++ = (unsigned char) (c2); \ + } while (0) + + +/* As with BUF_PUSH_2, except for three bytes. */ +#define BUF_PUSH_3(c1, c2, c3) \ + do { \ + GET_BUFFER_SPACE (3); \ + *b++ = (unsigned char) (c1); \ + *b++ = (unsigned char) (c2); \ + *b++ = (unsigned char) (c3); \ + } while (0) + + +/* Store a jump with opcode OP at LOC to location TO. We store a + relative address offset by the three bytes the jump itself occupies. */ +#define STORE_JUMP(op, loc, to) \ + store_op1 (op, loc, (int) ((to) - (loc) - 3)) + +/* Likewise, for a two-argument jump. */ +#define STORE_JUMP2(op, loc, to, arg) \ + store_op2 (op, loc, (int) ((to) - (loc) - 3), arg) + +/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */ +#define INSERT_JUMP(op, loc, to) \ + insert_op1 (op, loc, (int) ((to) - (loc) - 3), b) + +/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */ +#define INSERT_JUMP2(op, loc, to, arg) \ + insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b) + + +/* This is not an arbitrary limit: the arguments which represent offsets + into the pattern are two bytes long. So if 2^16 bytes turns out to + be too small, many things would have to change. */ +/* Any other compiler which, like MSC, has allocation limit below 2^16 + bytes will have to use approach similar to what was done below for + MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up + reallocating to 0 bytes. Such thing is not going to work too well. + You have been warned!! */ +#if defined(_MSC_VER) && !defined(WIN32) +/* Microsoft C 16-bit versions limit malloc to approx 65512 bytes. + The REALLOC define eliminates a flurry of conversion warnings, + but is not required. */ +#define MAX_BUF_SIZE 65500L +#define REALLOC(p,s) realloc ((p), (size_t) (s)) +#else +#define MAX_BUF_SIZE (1L << 16) +#define REALLOC(p,s) realloc ((p), (s)) +#endif + +/* Extend the buffer by twice its current size via realloc and + reset the pointers that pointed into the old block to point to the + correct places in the new one. If extending the buffer results in it + being larger than MAX_BUF_SIZE, then flag memory exhausted. */ +#define EXTEND_BUFFER() \ + do { \ + unsigned char *old_buffer = bufp->buffer; \ + if (bufp->allocated == MAX_BUF_SIZE) \ + return REG_ESIZE; \ + bufp->allocated <<= 1; \ + if (bufp->allocated > MAX_BUF_SIZE) \ + bufp->allocated = MAX_BUF_SIZE; \ + bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\ + if (bufp->buffer == NULL) \ + return REG_ESPACE; \ + /* If the buffer moved, move all the pointers into it. */ \ + if (old_buffer != bufp->buffer) \ + { \ + b = (b - old_buffer) + bufp->buffer; \ + begalt = (begalt - old_buffer) + bufp->buffer; \ + if (fixup_alt_jump) \ + fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;\ + if (laststart) \ + laststart = (laststart - old_buffer) + bufp->buffer; \ + if (pending_exact) \ + pending_exact = (pending_exact - old_buffer) + bufp->buffer; \ + } \ + } while (0) + + +/* Since we have one byte reserved for the register number argument to + {start,stop}_memory, the maximum number of groups we can report + things about is what fits in that byte. */ +#define MAX_REGNUM 255 + +/* But patterns can have more than `MAX_REGNUM' registers. We just + ignore the excess. */ +typedef unsigned regnum_t; + + +/* Macros for the compile stack. */ + +/* Since offsets can go either forwards or backwards, this type needs to + be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1. */ +/* int may be not enough when sizeof(int) == 2. */ +typedef long pattern_offset_t; + +typedef struct +{ + pattern_offset_t begalt_offset; + pattern_offset_t fixup_alt_jump; + pattern_offset_t inner_group_offset; + pattern_offset_t laststart_offset; + regnum_t regnum; +} compile_stack_elt_t; + + +typedef struct +{ + compile_stack_elt_t *stack; + unsigned size; + unsigned avail; /* Offset of next open position. */ +} compile_stack_type; + + +#define INIT_COMPILE_STACK_SIZE 32 + +#define COMPILE_STACK_EMPTY (compile_stack.avail == 0) +#define COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size) + +/* The next available element. */ +#define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) + + +/* Set the bit for character C in a list. */ +#define SET_LIST_BIT(c) \ + (b[((unsigned char) (c)) / BYTEWIDTH] \ + |= 1 << (((unsigned char) c) % BYTEWIDTH)) + + +/* Get the next unsigned number in the uncompiled pattern. */ +#define GET_UNSIGNED_NUMBER(num) \ + { if (p != pend) \ + { \ + PATFETCH (c); \ + while (ISDIGIT (c)) \ + { \ + if (num < 0) \ + num = 0; \ + num = num * 10 + c - '0'; \ + if (p == pend) \ + break; \ + PATFETCH (c); \ + } \ + } \ + } + +#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H) +/* The GNU C library provides support for user-defined character classes + and the functions from ISO C amendement 1. */ +# ifdef CHARCLASS_NAME_MAX +# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX +# else +/* This shouldn't happen but some implementation might still have this + problem. Use a reasonable default value. */ +# define CHAR_CLASS_MAX_LENGTH 256 +# endif + +# define IS_CHAR_CLASS(string) wctype (string) +#else +# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ + +# define IS_CHAR_CLASS(string) \ + (STREQ (string, "alpha") || STREQ (string, "upper") \ + || STREQ (string, "lower") || STREQ (string, "digit") \ + || STREQ (string, "alnum") || STREQ (string, "xdigit") \ + || STREQ (string, "space") || STREQ (string, "print") \ + || STREQ (string, "punct") || STREQ (string, "graph") \ + || STREQ (string, "cntrl") || STREQ (string, "blank")) +#endif + +#ifndef MATCH_MAY_ALLOCATE + +/* If we cannot allocate large objects within re_match_2_internal, + we make the fail stack and register vectors global. + The fail stack, we grow to the maximum size when a regexp + is compiled. + The register vectors, we adjust in size each time we + compile a regexp, according to the number of registers it needs. */ + +static fail_stack_type fail_stack; + +/* Size with which the following vectors are currently allocated. + That is so we can make them bigger as needed, + but never make them smaller. */ +static int regs_allocated_size; + +static const char ** regstart, ** regend; +static const char ** old_regstart, ** old_regend; +static const char **best_regstart, **best_regend; +static register_info_type *reg_info; +static const char **reg_dummy; +static register_info_type *reg_info_dummy; + +/* Make the register vectors big enough for NUM_REGS registers, + but don't make them smaller. */ + +static +regex_grow_registers (num_regs) + int num_regs; +{ + if (num_regs > regs_allocated_size) + { + RETALLOC_IF (regstart, num_regs, const char *); + RETALLOC_IF (regend, num_regs, const char *); + RETALLOC_IF (old_regstart, num_regs, const char *); + RETALLOC_IF (old_regend, num_regs, const char *); + RETALLOC_IF (best_regstart, num_regs, const char *); + RETALLOC_IF (best_regend, num_regs, const char *); + RETALLOC_IF (reg_info, num_regs, register_info_type); + RETALLOC_IF (reg_dummy, num_regs, const char *); + RETALLOC_IF (reg_info_dummy, num_regs, register_info_type); + + regs_allocated_size = num_regs; + } +} + +#endif /* not MATCH_MAY_ALLOCATE */ + +static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type + compile_stack, + regnum_t regnum)); + +/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX. + Returns one of error codes defined in `regex.h', or zero for success. + + Assumes the `allocated' (and perhaps `buffer') and `translate' + fields are set in BUFP on entry. + + If it succeeds, results are put in BUFP (if it returns an error, the + contents of BUFP are undefined): + `buffer' is the compiled pattern; + `syntax' is set to SYNTAX; + `used' is set to the length of the compiled pattern; + `fastmap_accurate' is zero; + `re_nsub' is the number of subexpressions in PATTERN; + `not_bol' and `not_eol' are zero; + + The `fastmap' and `newline_anchor' fields are neither + examined nor set. */ + +/* Return, freeing storage we allocated. */ +#define FREE_STACK_RETURN(value) \ + return (free (compile_stack.stack), value) + +static reg_errcode_t +regex_compile (pattern, size, syntax, bufp) + const char *pattern; + size_t size; + reg_syntax_t syntax; + struct re_pattern_buffer *bufp; +{ + /* We fetch characters from PATTERN here. Even though PATTERN is + `char *' (i.e., signed), we declare these variables as unsigned, so + they can be reliably used as array indices. */ + register unsigned char c, c1; + + /* A random temporary spot in PATTERN. */ + const char *p1; + + /* Points to the end of the buffer, where we should append. */ + register unsigned char *b; + + /* Keeps track of unclosed groups. */ + compile_stack_type compile_stack; + + /* Points to the current (ending) position in the pattern. */ + const char *p = pattern; + const char *pend = pattern + size; + + /* How to translate the characters in the pattern. */ + RE_TRANSLATE_TYPE translate = bufp->translate; + + /* Address of the count-byte of the most recently inserted `exactn' + command. This makes it possible to tell if a new exact-match + character can be added to that command or if the character requires + a new `exactn' command. */ + unsigned char *pending_exact = 0; + + /* Address of start of the most recently finished expression. + This tells, e.g., postfix * where to find the start of its + operand. Reset at the beginning of groups and alternatives. */ + unsigned char *laststart = 0; + + /* Address of beginning of regexp, or inside of last group. */ + unsigned char *begalt; + + /* Place in the uncompiled pattern (i.e., the {) to + which to go back if the interval is invalid. */ + const char *beg_interval; + + /* Address of the place where a forward jump should go to the end of + the containing expression. Each alternative of an `or' -- except the + last -- ends with a forward jump of this sort. */ + unsigned char *fixup_alt_jump = 0; + + /* Counts open-groups as they are encountered. Remembered for the + matching close-group on the compile stack, so the same register + number is put in the stop_memory as the start_memory. */ + regnum_t regnum = 0; + +#ifdef DEBUG + DEBUG_PRINT1 ("\nCompiling pattern: "); + if (debug) + { + unsigned debug_count; + + for (debug_count = 0; debug_count < size; debug_count++) + putchar (pattern[debug_count]); + putchar ('\n'); + } +#endif /* DEBUG */ + + /* Initialize the compile stack. */ + compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t); + if (compile_stack.stack == NULL) + return REG_ESPACE; + + compile_stack.size = INIT_COMPILE_STACK_SIZE; + compile_stack.avail = 0; + + /* Initialize the pattern buffer. */ + bufp->syntax = syntax; + bufp->fastmap_accurate = 0; + bufp->not_bol = bufp->not_eol = 0; + + /* Set `used' to zero, so that if we return an error, the pattern + printer (for debugging) will think there's no pattern. We reset it + at the end. */ + bufp->used = 0; + + /* Always count groups, whether or not bufp->no_sub is set. */ + bufp->re_nsub = 0; + +#if !defined (emacs) && !defined (SYNTAX_TABLE) + /* Initialize the syntax table. */ + init_syntax_once (); +#endif + + if (bufp->allocated == 0) + { + if (bufp->buffer) + { /* If zero allocated, but buffer is non-null, try to realloc + enough space. This loses if buffer's address is bogus, but + that is the user's responsibility. */ + RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char); + } + else + { /* Caller did not allocate a buffer. Do it for them. */ + bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char); + } + if (!bufp->buffer) FREE_STACK_RETURN (REG_ESPACE); + + bufp->allocated = INIT_BUF_SIZE; + } + + begalt = b = bufp->buffer; + + /* Loop through the uncompiled pattern until we're at the end. */ + while (p != pend) + { + PATFETCH (c); + + switch (c) + { + case '^': + { + if ( /* If at start of pattern, it's an operator. */ + p == pattern + 1 + /* If context independent, it's an operator. */ + || syntax & RE_CONTEXT_INDEP_ANCHORS + /* Otherwise, depends on what's come before. */ + || at_begline_loc_p (pattern, p, syntax)) + BUF_PUSH (begline); + else + goto normal_char; + } + break; + + + case '$': + { + if ( /* If at end of pattern, it's an operator. */ + p == pend + /* If context independent, it's an operator. */ + || syntax & RE_CONTEXT_INDEP_ANCHORS + /* Otherwise, depends on what's next. */ + || at_endline_loc_p (p, pend, syntax)) + BUF_PUSH (endline); + else + goto normal_char; + } + break; + + + case '+': + case '?': + if ((syntax & RE_BK_PLUS_QM) + || (syntax & RE_LIMITED_OPS)) + goto normal_char; + handle_plus: + case '*': + /* If there is no previous pattern... */ + if (!laststart) + { + if (syntax & RE_CONTEXT_INVALID_OPS) + FREE_STACK_RETURN (REG_BADRPT); + else if (!(syntax & RE_CONTEXT_INDEP_OPS)) + goto normal_char; + } + + { + /* Are we optimizing this jump? */ + boolean keep_string_p = false; + + /* 1 means zero (many) matches is allowed. */ + char zero_times_ok = 0, many_times_ok = 0; + + /* If there is a sequence of repetition chars, collapse it + down to just one (the right one). We can't combine + interval operators with these because of, e.g., `a{2}*', + which should only match an even number of `a's. */ + + for (;;) + { + zero_times_ok |= c != '+'; + many_times_ok |= c != '?'; + + if (p == pend) + break; + + PATFETCH (c); + + if (c == '*' + || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?'))) + ; + + else if (syntax & RE_BK_PLUS_QM && c == '\\') + { + if (p == pend) FREE_STACK_RETURN (REG_EESCAPE); + + PATFETCH (c1); + if (!(c1 == '+' || c1 == '?')) + { + PATUNFETCH; + PATUNFETCH; + break; + } + + c = c1; + } + else + { + PATUNFETCH; + break; + } + + /* If we get here, we found another repeat character. */ + } + + /* Star, etc. applied to an empty pattern is equivalent + to an empty pattern. */ + if (!laststart) + break; + + /* Now we know whether or not zero matches is allowed + and also whether or not two or more matches is allowed. */ + if (many_times_ok) + { /* More than one repetition is allowed, so put in at the + end a backward relative jump from `b' to before the next + jump we're going to put in below (which jumps from + laststart to after this jump). + + But if we are at the `*' in the exact sequence `.*\n', + insert an unconditional jump backwards to the ., + instead of the beginning of the loop. This way we only + push a failure point once, instead of every time + through the loop. */ + assert (p - 1 > pattern); + + /* Allocate the space for the jump. */ + GET_BUFFER_SPACE (3); + + /* We know we are not at the first character of the pattern, + because laststart was nonzero. And we've already + incremented `p', by the way, to be the character after + the `*'. Do we have to do something analogous here + for null bytes, because of RE_DOT_NOT_NULL? */ + if (TRANSLATE (*(p - 2)) == TRANSLATE ('.') + && zero_times_ok + && p < pend && TRANSLATE (*p) == TRANSLATE ('\n') + && !(syntax & RE_DOT_NEWLINE)) + { /* We have .*\n. */ + STORE_JUMP (jump, b, laststart); + keep_string_p = true; + } + else + /* Anything else. */ + STORE_JUMP (maybe_pop_jump, b, laststart - 3); + + /* We've added more stuff to the buffer. */ + b += 3; + } + + /* On failure, jump from laststart to b + 3, which will be the + end of the buffer after this jump is inserted. */ + GET_BUFFER_SPACE (3); + INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump + : on_failure_jump, + laststart, b + 3); + pending_exact = 0; + b += 3; + + if (!zero_times_ok) + { + /* At least one repetition is required, so insert a + `dummy_failure_jump' before the initial + `on_failure_jump' instruction of the loop. This + effects a skip over that instruction the first time + we hit that loop. */ + GET_BUFFER_SPACE (3); + INSERT_JUMP (dummy_failure_jump, laststart, laststart + 6); + b += 3; + } + } + break; + + + case '.': + laststart = b; + BUF_PUSH (anychar); + break; + + + case '[': + { + boolean had_char_class = false; + + if (p == pend) FREE_STACK_RETURN (REG_EBRACK); + + /* Ensure that we have enough space to push a charset: the + opcode, the length count, and the bitset; 34 bytes in all. */ + GET_BUFFER_SPACE (34); + + laststart = b; + + /* We test `*p == '^' twice, instead of using an if + statement, so we only need one BUF_PUSH. */ + BUF_PUSH (*p == '^' ? charset_not : charset); + if (*p == '^') + p++; + + /* Remember the first position in the bracket expression. */ + p1 = p; + + /* Push the number of bytes in the bitmap. */ + BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH); + + /* Clear the whole map. */ + bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH); + + /* charset_not matches newline according to a syntax bit. */ + if ((re_opcode_t) b[-2] == charset_not + && (syntax & RE_HAT_LISTS_NOT_NEWLINE)) + SET_LIST_BIT ('\n'); + + /* Read in characters and ranges, setting map bits. */ + for (;;) + { + if (p == pend) FREE_STACK_RETURN (REG_EBRACK); + + PATFETCH (c); + + /* \ might escape characters inside [...] and [^...]. */ + if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\') + { + if (p == pend) FREE_STACK_RETURN (REG_EESCAPE); + + PATFETCH (c1); + SET_LIST_BIT (c1); + continue; + } + + /* Could be the end of the bracket expression. If it's + not (i.e., when the bracket expression is `[]' so + far), the ']' character bit gets set way below. */ + if (c == ']' && p != p1 + 1) + break; + + /* Look ahead to see if it's a range when the last thing + was a character class. */ + if (had_char_class && c == '-' && *p != ']') + FREE_STACK_RETURN (REG_ERANGE); + + /* Look ahead to see if it's a range when the last thing + was a character: if this is a hyphen not at the + beginning or the end of a list, then it's the range + operator. */ + if (c == '-' + && !(p - 2 >= pattern && p[-2] == '[') + && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^') + && *p != ']') + { + reg_errcode_t ret + = compile_range (&p, pend, translate, syntax, b); + if (ret != REG_NOERROR) FREE_STACK_RETURN (ret); + } + + else if (p[0] == '-' && p[1] != ']') + { /* This handles ranges made up of characters only. */ + reg_errcode_t ret; + + /* Move past the `-'. */ + PATFETCH (c1); + + ret = compile_range (&p, pend, translate, syntax, b); + if (ret != REG_NOERROR) FREE_STACK_RETURN (ret); + } + + /* See if we're at the beginning of a possible character + class. */ + + else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':') + { /* Leave room for the null. */ + char str[CHAR_CLASS_MAX_LENGTH + 1]; + + PATFETCH (c); + c1 = 0; + + /* If pattern is `[[:'. */ + if (p == pend) FREE_STACK_RETURN (REG_EBRACK); + + for (;;) + { + PATFETCH (c); + if (c == ':' || c == ']' || p == pend + || c1 == CHAR_CLASS_MAX_LENGTH) + break; + str[c1++] = c; + } + str[c1] = '\0'; + + /* If isn't a word bracketed by `[:' and:`]': + undo the ending character, the letters, and leave + the leading `:' and `[' (but set bits for them). */ + if (c == ':' && *p == ']') + { +#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H) + boolean is_lower = STREQ (str, "lower"); + boolean is_upper = STREQ (str, "upper"); + wctype_t wt; + int ch; + + wt = wctype (str); + if (wt == 0) + FREE_STACK_RETURN (REG_ECTYPE); + + /* Throw away the ] at the end of the character + class. */ + PATFETCH (c); + + if (p == pend) FREE_STACK_RETURN (REG_EBRACK); + + for (ch = 0; ch < 1 << BYTEWIDTH; ++ch) + { + if (iswctype (btowc (ch), wt)) + SET_LIST_BIT (ch); + + if (translate && (is_upper || is_lower) + && (ISUPPER (ch) || ISLOWER (ch))) + SET_LIST_BIT (ch); + } + + had_char_class = true; +#else + int ch; + boolean is_alnum = STREQ (str, "alnum"); + boolean is_alpha = STREQ (str, "alpha"); + boolean is_blank = STREQ (str, "blank"); + boolean is_cntrl = STREQ (str, "cntrl"); + boolean is_digit = STREQ (str, "digit"); + boolean is_graph = STREQ (str, "graph"); + boolean is_lower = STREQ (str, "lower"); + boolean is_print = STREQ (str, "print"); + boolean is_punct = STREQ (str, "punct"); + boolean is_space = STREQ (str, "space"); + boolean is_upper = STREQ (str, "upper"); + boolean is_xdigit = STREQ (str, "xdigit"); + + if (!IS_CHAR_CLASS (str)) + FREE_STACK_RETURN (REG_ECTYPE); + + /* Throw away the ] at the end of the character + class. */ + PATFETCH (c); + + if (p == pend) FREE_STACK_RETURN (REG_EBRACK); + + for (ch = 0; ch < (1 << BYTEWIDTH); ch++) + { + /* This was split into 3 if's to + avoid an arbitrary limit in some compiler. */ + if ( (is_alnum && ISALNUM (ch)) + || (is_alpha && ISALPHA (ch)) + || (is_blank && ISBLANK (ch)) + || (is_cntrl && ISCNTRL (ch))) + SET_LIST_BIT (ch); + if ( (is_digit && ISDIGIT (ch)) + || (is_graph && ISGRAPH (ch)) + || (is_lower && ISLOWER (ch)) + || (is_print && ISPRINT (ch))) + SET_LIST_BIT (ch); + if ( (is_punct && ISPUNCT (ch)) + || (is_space && ISSPACE (ch)) + || (is_upper && ISUPPER (ch)) + || (is_xdigit && ISXDIGIT (ch))) + SET_LIST_BIT (ch); + if ( translate && (is_upper || is_lower) + && (ISUPPER (ch) || ISLOWER (ch))) + SET_LIST_BIT (ch); + } + had_char_class = true; +#endif /* libc || wctype.h */ + } + else + { + c1++; + while (c1--) + PATUNFETCH; + SET_LIST_BIT ('['); + SET_LIST_BIT (':'); + had_char_class = false; + } + } + else + { + had_char_class = false; + SET_LIST_BIT (c); + } + } + + /* Discard any (non)matching list bytes that are all 0 at the + end of the map. Decrease the map-length byte too. */ + while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) + b[-1]--; + b += b[-1]; + } + break; + + + case '(': + if (syntax & RE_NO_BK_PARENS) + goto handle_open; + else + goto normal_char; + + + case ')': + if (syntax & RE_NO_BK_PARENS) + goto handle_close; + else + goto normal_char; + + + case '\n': + if (syntax & RE_NEWLINE_ALT) + goto handle_alt; + else + goto normal_char; + + + case '|': + if (syntax & RE_NO_BK_VBAR) + goto handle_alt; + else + goto normal_char; + + + case '{': + if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES) + goto handle_interval; + else + goto normal_char; + + + case '\\': + if (p == pend) FREE_STACK_RETURN (REG_EESCAPE); + + /* Do not translate the character after the \, so that we can + distinguish, e.g., \B from \b, even if we normally would + translate, e.g., B to b. */ + PATFETCH_RAW (c); + + switch (c) + { + case '(': + if (syntax & RE_NO_BK_PARENS) + goto normal_backslash; + + handle_open: + bufp->re_nsub++; + regnum++; + + if (COMPILE_STACK_FULL) + { + RETALLOC (compile_stack.stack, compile_stack.size << 1, + compile_stack_elt_t); + if (compile_stack.stack == NULL) return REG_ESPACE; + + compile_stack.size <<= 1; + } + + /* These are the values to restore when we hit end of this + group. They are all relative offsets, so that if the + whole pattern moves because of realloc, they will still + be valid. */ + COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer; + COMPILE_STACK_TOP.fixup_alt_jump + = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0; + COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer; + COMPILE_STACK_TOP.regnum = regnum; + + /* We will eventually replace the 0 with the number of + groups inner to this one. But do not push a + start_memory for groups beyond the last one we can + represent in the compiled pattern. */ + if (regnum <= MAX_REGNUM) + { + COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2; + BUF_PUSH_3 (start_memory, regnum, 0); + } + + compile_stack.avail++; + + fixup_alt_jump = 0; + laststart = 0; + begalt = b; + /* If we've reached MAX_REGNUM groups, then this open + won't actually generate any code, so we'll have to + clear pending_exact explicitly. */ + pending_exact = 0; + break; + + + case ')': + if (syntax & RE_NO_BK_PARENS) goto normal_backslash; + + if (COMPILE_STACK_EMPTY) { + if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) + goto normal_backslash; + } + else FREE_STACK_RETURN (REG_ERPAREN); + + handle_close: + if (fixup_alt_jump) + { /* Push a dummy failure point at the end of the + alternative for a possible future + `pop_failure_jump' to pop. See comments at + `push_dummy_failure' in `re_match_2'. */ + BUF_PUSH (push_dummy_failure); + + /* We allocated space for this jump when we assigned + to `fixup_alt_jump', in the `handle_alt' case below. */ + STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1); + } + + /* See similar code for backslashed left paren above. */ + if (COMPILE_STACK_EMPTY) { + if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) + goto normal_char; + } + else FREE_STACK_RETURN (REG_ERPAREN); + + /* Since we just checked for an empty stack above, this + ``can't happen''. */ + assert (compile_stack.avail != 0); + { + /* We don't just want to restore into `regnum', because + later groups should continue to be numbered higher, + as in `(ab)c(de)' -- the second group is #2. */ + regnum_t this_group_regnum; + + compile_stack.avail--; + begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset; + fixup_alt_jump + = COMPILE_STACK_TOP.fixup_alt_jump + ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 + : 0; + laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset; + this_group_regnum = COMPILE_STACK_TOP.regnum; + /* If we've reached MAX_REGNUM groups, then this open + won't actually generate any code, so we'll have to + clear pending_exact explicitly. */ + pending_exact = 0; + + /* We're at the end of the group, so now we know how many + groups were inside this one. */ + if (this_group_regnum <= MAX_REGNUM) + { + unsigned char *inner_group_loc + = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset; + + *inner_group_loc = regnum - this_group_regnum; + BUF_PUSH_3 (stop_memory, this_group_regnum, + regnum - this_group_regnum); + } + } + break; + + + case '|': /* `\|'. */ + if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR) + goto normal_backslash; + handle_alt: + if (syntax & RE_LIMITED_OPS) + goto normal_char; + + /* Insert before the previous alternative a jump which + jumps to this alternative if the former fails. */ + GET_BUFFER_SPACE (3); + INSERT_JUMP (on_failure_jump, begalt, b + 6); + pending_exact = 0; + b += 3; + + /* The alternative before this one has a jump after it + which gets executed if it gets matched. Adjust that + jump so it will jump to this alternative's analogous + jump (put in below, which in turn will jump to the next + (if any) alternative's such jump, etc.). The last such + jump jumps to the correct final destination. A picture: + _____ _____ + | | | | + | v | v + a | b | c + + If we are at `b', then fixup_alt_jump right now points to a + three-byte space after `a'. We'll put in the jump, set + fixup_alt_jump to right after `b', and leave behind three + bytes which we'll fill in when we get to after `c'. */ + + if (fixup_alt_jump) + STORE_JUMP (jump_past_alt, fixup_alt_jump, b); + + /* Mark and leave space for a jump after this alternative, + to be filled in later either by next alternative or + when know we're at the end of a series of alternatives. */ + fixup_alt_jump = b; + GET_BUFFER_SPACE (3); + b += 3; + + laststart = 0; + begalt = b; + break; + + + case '{': + /* If \{ is a literal. */ + if (!(syntax & RE_INTERVALS) + /* If we're at `\{' and it's not the open-interval + operator. */ + || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) + || (p - 2 == pattern && p == pend)) + goto normal_backslash; + + handle_interval: + { + /* If got here, then the syntax allows intervals. */ + + /* At least (most) this many matches must be made. */ + int lower_bound = -1, upper_bound = -1; + + beg_interval = p - 1; + + if (p == pend) + { + if (syntax & RE_NO_BK_BRACES) + goto unfetch_interval; + else + FREE_STACK_RETURN (REG_EBRACE); + } + + GET_UNSIGNED_NUMBER (lower_bound); + + if (c == ',') + { + GET_UNSIGNED_NUMBER (upper_bound); + if (upper_bound < 0) upper_bound = RE_DUP_MAX; + } + else + /* Interval such as `{1}' => match exactly once. */ + upper_bound = lower_bound; + + if (lower_bound < 0 || upper_bound > RE_DUP_MAX + || lower_bound > upper_bound) + { + if (syntax & RE_NO_BK_BRACES) + goto unfetch_interval; + else + FREE_STACK_RETURN (REG_BADBR); + } + + if (!(syntax & RE_NO_BK_BRACES)) + { + if (c != '\\') FREE_STACK_RETURN (REG_EBRACE); + + PATFETCH (c); + } + + if (c != '}') + { + if (syntax & RE_NO_BK_BRACES) + goto unfetch_interval; + else + FREE_STACK_RETURN (REG_BADBR); + } + + /* We just parsed a valid interval. */ + + /* If it's invalid to have no preceding re. */ + if (!laststart) + { + if (syntax & RE_CONTEXT_INVALID_OPS) + FREE_STACK_RETURN (REG_BADRPT); + else if (syntax & RE_CONTEXT_INDEP_OPS) + laststart = b; + else + goto unfetch_interval; + } + + /* If the upper bound is zero, don't want to succeed at + all; jump from `laststart' to `b + 3', which will be + the end of the buffer after we insert the jump. */ + if (upper_bound == 0) + { + GET_BUFFER_SPACE (3); + INSERT_JUMP (jump, laststart, b + 3); + b += 3; + } + + /* Otherwise, we have a nontrivial interval. When + we're all done, the pattern will look like: + set_number_at + set_number_at + succeed_n + + jump_n + (The upper bound and `jump_n' are omitted if + `upper_bound' is 1, though.) */ + else + { /* If the upper bound is > 1, we need to insert + more at the end of the loop. */ + unsigned nbytes = 10 + (upper_bound > 1) * 10; + + GET_BUFFER_SPACE (nbytes); + + /* Initialize lower bound of the `succeed_n', even + though it will be set during matching by its + attendant `set_number_at' (inserted next), + because `re_compile_fastmap' needs to know. + Jump to the `jump_n' we might insert below. */ + INSERT_JUMP2 (succeed_n, laststart, + b + 5 + (upper_bound > 1) * 5, + lower_bound); + b += 5; + + /* Code to initialize the lower bound. Insert + before the `succeed_n'. The `5' is the last two + bytes of this `set_number_at', plus 3 bytes of + the following `succeed_n'. */ + insert_op2 (set_number_at, laststart, 5, lower_bound, b); + b += 5; + + if (upper_bound > 1) + { /* More than one repetition is allowed, so + append a backward jump to the `succeed_n' + that starts this interval. + + When we've reached this during matching, + we'll have matched the interval once, so + jump back only `upper_bound - 1' times. */ + STORE_JUMP2 (jump_n, b, laststart + 5, + upper_bound - 1); + b += 5; + + /* The location we want to set is the second + parameter of the `jump_n'; that is `b-2' as + an absolute address. `laststart' will be + the `set_number_at' we're about to insert; + `laststart+3' the number to set, the source + for the relative address. But we are + inserting into the middle of the pattern -- + so everything is getting moved up by 5. + Conclusion: (b - 2) - (laststart + 3) + 5, + i.e., b - laststart. + + We insert this at the beginning of the loop + so that if we fail during matching, we'll + reinitialize the bounds. */ + insert_op2 (set_number_at, laststart, b - laststart, + upper_bound - 1, b); + b += 5; + } + } + pending_exact = 0; + beg_interval = NULL; + } + break; + + unfetch_interval: + /* If an invalid interval, match the characters as literals. */ + assert (beg_interval); + p = beg_interval; + beg_interval = NULL; + + /* normal_char and normal_backslash need `c'. */ + PATFETCH (c); + + if (!(syntax & RE_NO_BK_BRACES)) + { + if (p > pattern && p[-1] == '\\') + goto normal_backslash; + } + goto normal_char; + +#ifdef emacs + /* There is no way to specify the before_dot and after_dot + operators. rms says this is ok. --karl */ + case '=': + BUF_PUSH (at_dot); + break; + + case 's': + laststart = b; + PATFETCH (c); + BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]); + break; + + case 'S': + laststart = b; + PATFETCH (c); + BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]); + break; +#endif /* emacs */ + + + case 'w': + if (re_syntax_options & RE_NO_GNU_OPS) + goto normal_char; + laststart = b; + BUF_PUSH (wordchar); + break; + + + case 'W': + if (re_syntax_options & RE_NO_GNU_OPS) + goto normal_char; + laststart = b; + BUF_PUSH (notwordchar); + break; + + + case '<': + if (re_syntax_options & RE_NO_GNU_OPS) + goto normal_char; + BUF_PUSH (wordbeg); + break; + + case '>': + if (re_syntax_options & RE_NO_GNU_OPS) + goto normal_char; + BUF_PUSH (wordend); + break; + + case 'b': + if (re_syntax_options & RE_NO_GNU_OPS) + goto normal_char; + BUF_PUSH (wordbound); + break; + + case 'B': + if (re_syntax_options & RE_NO_GNU_OPS) + goto normal_char; + BUF_PUSH (notwordbound); + break; + + case '`': + if (re_syntax_options & RE_NO_GNU_OPS) + goto normal_char; + BUF_PUSH (begbuf); + break; + + case '\'': + if (re_syntax_options & RE_NO_GNU_OPS) + goto normal_char; + BUF_PUSH (endbuf); + break; + + case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + if (syntax & RE_NO_BK_REFS) + goto normal_char; + + c1 = c - '0'; + + if (c1 > regnum) + FREE_STACK_RETURN (REG_ESUBREG); + + /* Can't back reference to a subexpression if inside of it. */ + if (group_in_compile_stack (compile_stack, (regnum_t) c1)) + goto normal_char; + + laststart = b; + BUF_PUSH_2 (duplicate, c1); + break; + + + case '+': + case '?': + if (syntax & RE_BK_PLUS_QM) + goto handle_plus; + else + goto normal_backslash; + + default: + normal_backslash: + /* You might think it would be useful for \ to mean + not to translate; but if we don't translate it + it will never match anything. */ + c = TRANSLATE (c); + goto normal_char; + } + break; + + + default: + /* Expects the character in `c'. */ + normal_char: + /* If no exactn currently being built. */ + if (!pending_exact + + /* If last exactn not at current position. */ + || pending_exact + *pending_exact + 1 != b + + /* We have only one byte following the exactn for the count. */ + || *pending_exact == (1 << BYTEWIDTH) - 1 + + /* If followed by a repetition operator. */ + || *p == '*' || *p == '^' + || ((syntax & RE_BK_PLUS_QM) + ? *p == '\\' && (p[1] == '+' || p[1] == '?') + : (*p == '+' || *p == '?')) + || ((syntax & RE_INTERVALS) + && ((syntax & RE_NO_BK_BRACES) + ? *p == '{' + : (p[0] == '\\' && p[1] == '{')))) + { + /* Start building a new exactn. */ + + laststart = b; + + BUF_PUSH_2 (exactn, 0); + pending_exact = b - 1; + } + + BUF_PUSH (c); + (*pending_exact)++; + break; + } /* switch (c) */ + } /* while p != pend */ + + + /* Through the pattern now. */ + + if (fixup_alt_jump) + STORE_JUMP (jump_past_alt, fixup_alt_jump, b); + + if (!COMPILE_STACK_EMPTY) + FREE_STACK_RETURN (REG_EPAREN); + + /* If we don't want backtracking, force success + the first time we reach the end of the compiled pattern. */ + if (syntax & RE_NO_POSIX_BACKTRACKING) + BUF_PUSH (succeed); + + free (compile_stack.stack); + + /* We have succeeded; set the length of the buffer. */ + bufp->used = b - bufp->buffer; + +#ifdef DEBUG + if (debug) + { + DEBUG_PRINT1 ("\nCompiled pattern: \n"); + print_compiled_pattern (bufp); + } +#endif /* DEBUG */ + +#ifndef MATCH_MAY_ALLOCATE + /* Initialize the failure stack to the largest possible stack. This + isn't necessary unless we're trying to avoid calling alloca in + the search and match routines. */ + { + int num_regs = bufp->re_nsub + 1; + + /* Since DOUBLE_FAIL_STACK refuses to double only if the current size + is strictly greater than re_max_failures, the largest possible stack + is 2 * re_max_failures failure points. */ + if (fail_stack.size < (2 * re_max_failures * MAX_FAILURE_ITEMS)) + { + fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS); + +#ifdef emacs + if (! fail_stack.stack) + fail_stack.stack + = (fail_stack_elt_t *) xmalloc (fail_stack.size + * sizeof (fail_stack_elt_t)); + else + fail_stack.stack + = (fail_stack_elt_t *) xrealloc (fail_stack.stack, + (fail_stack.size + * sizeof (fail_stack_elt_t))); +#else /* not emacs */ + if (! fail_stack.stack) + fail_stack.stack + = (fail_stack_elt_t *) malloc (fail_stack.size + * sizeof (fail_stack_elt_t)); + else + fail_stack.stack + = (fail_stack_elt_t *) realloc (fail_stack.stack, + (fail_stack.size + * sizeof (fail_stack_elt_t))); +#endif /* not emacs */ + } + + regex_grow_registers (num_regs); + } +#endif /* not MATCH_MAY_ALLOCATE */ + + return REG_NOERROR; +} /* regex_compile */ + +/* Subroutines for `regex_compile'. */ + +/* Store OP at LOC followed by two-byte integer parameter ARG. */ + +static void +store_op1 (op, loc, arg) + re_opcode_t op; + unsigned char *loc; + int arg; +{ + *loc = (unsigned char) op; + STORE_NUMBER (loc + 1, arg); +} + + +/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */ + +static void +store_op2 (op, loc, arg1, arg2) + re_opcode_t op; + unsigned char *loc; + int arg1, arg2; +{ + *loc = (unsigned char) op; + STORE_NUMBER (loc + 1, arg1); + STORE_NUMBER (loc + 3, arg2); +} + + +/* Copy the bytes from LOC to END to open up three bytes of space at LOC + for OP followed by two-byte integer parameter ARG. */ + +static void +insert_op1 (op, loc, arg, end) + re_opcode_t op; + unsigned char *loc; + int arg; + unsigned char *end; +{ + register unsigned char *pfrom = end; + register unsigned char *pto = end + 3; + + while (pfrom != loc) + *--pto = *--pfrom; + + store_op1 (op, loc, arg); +} + + +/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */ + +static void +insert_op2 (op, loc, arg1, arg2, end) + re_opcode_t op; + unsigned char *loc; + int arg1, arg2; + unsigned char *end; +{ + register unsigned char *pfrom = end; + register unsigned char *pto = end + 5; + + while (pfrom != loc) + *--pto = *--pfrom; + + store_op2 (op, loc, arg1, arg2); +} + + +/* P points to just after a ^ in PATTERN. Return true if that ^ comes + after an alternative or a begin-subexpression. We assume there is at + least one character before the ^. */ + +static boolean +at_begline_loc_p (pattern, p, syntax) + const char *pattern, *p; + reg_syntax_t syntax; +{ + const char *prev = p - 2; + boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\'; + + return + /* After a subexpression? */ + (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash)) + /* After an alternative? */ + || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash)); +} + + +/* The dual of at_begline_loc_p. This one is for $. We assume there is + at least one character after the $, i.e., `P < PEND'. */ + +static boolean +at_endline_loc_p (p, pend, syntax) + const char *p, *pend; + reg_syntax_t syntax; +{ + const char *next = p; + boolean next_backslash = *next == '\\'; + const char *next_next = p + 1 < pend ? p + 1 : 0; + + return + /* Before a subexpression? */ + (syntax & RE_NO_BK_PARENS ? *next == ')' + : next_backslash && next_next && *next_next == ')') + /* Before an alternative? */ + || (syntax & RE_NO_BK_VBAR ? *next == '|' + : next_backslash && next_next && *next_next == '|'); +} + + +/* Returns true if REGNUM is in one of COMPILE_STACK's elements and + false if it's not. */ + +static boolean +group_in_compile_stack (compile_stack, regnum) + compile_stack_type compile_stack; + regnum_t regnum; +{ + int this_element; + + for (this_element = compile_stack.avail - 1; + this_element >= 0; + this_element--) + if (compile_stack.stack[this_element].regnum == regnum) + return true; + + return false; +} + + +/* Read the ending character of a range (in a bracket expression) from the + uncompiled pattern *P_PTR (which ends at PEND). We assume the + starting character is in `P[-2]'. (`P[-1]' is the character `-'.) + Then we set the translation of all bits between the starting and + ending characters (inclusive) in the compiled pattern B. + + Return an error code. + + We use these short variable names so we can use the same macros as + `regex_compile' itself. */ + +static reg_errcode_t +compile_range (p_ptr, pend, translate, syntax, b) + const char **p_ptr, *pend; + RE_TRANSLATE_TYPE translate; + reg_syntax_t syntax; + unsigned char *b; +{ + unsigned this_char; + + const char *p = *p_ptr; + unsigned int range_start, range_end; + + if (p == pend) + return REG_ERANGE; + + /* Even though the pattern is a signed `char *', we need to fetch + with unsigned char *'s; if the high bit of the pattern character + is set, the range endpoints will be negative if we fetch using a + signed char *. + + We also want to fetch the endpoints without translating them; the + appropriate translation is done in the bit-setting loop below. */ + /* The SVR4 compiler on the 3B2 had trouble with unsigned const char *. */ + range_start = ((const unsigned char *) p)[-2]; + range_end = ((const unsigned char *) p)[0]; + + /* Have to increment the pointer into the pattern string, so the + caller isn't still at the ending character. */ + (*p_ptr)++; + + /* If the start is after the end, the range is empty. */ + if (range_start > range_end) + return syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR; + + /* Here we see why `this_char' has to be larger than an `unsigned + char' -- the range is inclusive, so if `range_end' == 0xff + (assuming 8-bit characters), we would otherwise go into an infinite + loop, since all characters <= 0xff. */ + for (this_char = range_start; this_char <= range_end; this_char++) + { + SET_LIST_BIT (TRANSLATE (this_char)); + } + + return REG_NOERROR; +} + +/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in + BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible + characters can start a string that matches the pattern. This fastmap + is used by re_search to skip quickly over impossible starting points. + + The caller must supply the address of a (1 << BYTEWIDTH)-byte data + area as BUFP->fastmap. + + We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in + the pattern buffer. + + Returns 0 if we succeed, -2 if an internal error. */ + +int +re_compile_fastmap (bufp) + struct re_pattern_buffer *bufp; +{ + int j, k; +#ifdef MATCH_MAY_ALLOCATE + fail_stack_type fail_stack; +#endif +#ifndef REGEX_MALLOC + char *destination; +#endif + /* We don't push any register information onto the failure stack. */ +//sword unsigned num_regs = 0; + + register char *fastmap = bufp->fastmap; + unsigned char *pattern = bufp->buffer; + unsigned char *p = pattern; + register unsigned char *pend = pattern + bufp->used; + +#ifdef REL_ALLOC + /* This holds the pointer to the failure stack, when + it is allocated relocatably. */ + fail_stack_elt_t *failure_stack_ptr; +#endif + + /* Assume that each path through the pattern can be null until + proven otherwise. We set this false at the bottom of switch + statement, to which we get only if a particular path doesn't + match the empty string. */ + boolean path_can_be_null = true; + + /* We aren't doing a `succeed_n' to begin with. */ + boolean succeed_n_p = false; + + assert (fastmap != NULL && p != NULL); + + INIT_FAIL_STACK (); + bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */ + bufp->fastmap_accurate = 1; /* It will be when we're done. */ + bufp->can_be_null = 0; + + while (1) + { + if (p == pend || *p == succeed) + { + /* We have reached the (effective) end of pattern. */ + if (!FAIL_STACK_EMPTY ()) + { + bufp->can_be_null |= path_can_be_null; + + /* Reset for next path. */ + path_can_be_null = true; + + p = fail_stack.stack[--fail_stack.avail].pointer; + + continue; + } + else + break; + } + + /* We should never be about to go beyond the end of the pattern. */ + assert (p < pend); + + switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++)) + { + + /* I guess the idea here is to simply not bother with a fastmap + if a backreference is used, since it's too hard to figure out + the fastmap for the corresponding group. Setting + `can_be_null' stops `re_search_2' from using the fastmap, so + that is all we do. */ + case duplicate: + bufp->can_be_null = 1; + goto done; + + + /* Following are the cases which match a character. These end + with `break'. */ + + case exactn: + fastmap[p[1]] = 1; + break; + + + case charset: + for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--) + if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))) + fastmap[j] = 1; + break; + + + case charset_not: + /* Chars beyond end of map must be allowed. */ + for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++) + fastmap[j] = 1; + + for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--) + if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))) + fastmap[j] = 1; + break; + + + case wordchar: + for (j = 0; j < (1 << BYTEWIDTH); j++) + if (SYNTAX (j) == Sword) + fastmap[j] = 1; + break; + + + case notwordchar: + for (j = 0; j < (1 << BYTEWIDTH); j++) + if (SYNTAX (j) != Sword) + fastmap[j] = 1; + break; + + + case anychar: + { + int fastmap_newline = fastmap['\n']; + + /* `.' matches anything ... */ + for (j = 0; j < (1 << BYTEWIDTH); j++) + fastmap[j] = 1; + + /* ... except perhaps newline. */ + if (!(bufp->syntax & RE_DOT_NEWLINE)) + fastmap['\n'] = fastmap_newline; + + /* Return if we have already set `can_be_null'; if we have, + then the fastmap is irrelevant. Something's wrong here. */ + else if (bufp->can_be_null) + goto done; + + /* Otherwise, have to check alternative paths. */ + break; + } + +#ifdef emacs + case syntaxspec: + k = *p++; + for (j = 0; j < (1 << BYTEWIDTH); j++) + if (SYNTAX (j) == (enum syntaxcode) k) + fastmap[j] = 1; + break; + + + case notsyntaxspec: + k = *p++; + for (j = 0; j < (1 << BYTEWIDTH); j++) + if (SYNTAX (j) != (enum syntaxcode) k) + fastmap[j] = 1; + break; + + + /* All cases after this match the empty string. These end with + `continue'. */ + + + case before_dot: + case at_dot: + case after_dot: + continue; +#endif /* emacs */ + + + case no_op: + case begline: + case endline: + case begbuf: + case endbuf: + case wordbound: + case notwordbound: + case wordbeg: + case wordend: + case push_dummy_failure: + continue; + + + case jump_n: + case pop_failure_jump: + case maybe_pop_jump: + case jump: + case jump_past_alt: + case dummy_failure_jump: + EXTRACT_NUMBER_AND_INCR (j, p); + p += j; + if (j > 0) + continue; + + /* Jump backward implies we just went through the body of a + loop and matched nothing. Opcode jumped to should be + `on_failure_jump' or `succeed_n'. Just treat it like an + ordinary jump. For a * loop, it has pushed its failure + point already; if so, discard that as redundant. */ + if ((re_opcode_t) *p != on_failure_jump + && (re_opcode_t) *p != succeed_n) + continue; + + p++; + EXTRACT_NUMBER_AND_INCR (j, p); + p += j; + + /* If what's on the stack is where we are now, pop it. */ + if (!FAIL_STACK_EMPTY () + && fail_stack.stack[fail_stack.avail - 1].pointer == p) + fail_stack.avail--; + + continue; + + + case on_failure_jump: + case on_failure_keep_string_jump: + handle_on_failure_jump: + EXTRACT_NUMBER_AND_INCR (j, p); + + /* For some patterns, e.g., `(a?)?', `p+j' here points to the + end of the pattern. We don't want to push such a point, + since when we restore it above, entering the switch will + increment `p' past the end of the pattern. We don't need + to push such a point since we obviously won't find any more + fastmap entries beyond `pend'. Such a pattern can match + the null string, though. */ + if (p + j < pend) + { + if (!PUSH_PATTERN_OP (p + j, fail_stack)) + { + RESET_FAIL_STACK (); + return -2; + } + } + else + bufp->can_be_null = 1; + + if (succeed_n_p) + { + EXTRACT_NUMBER_AND_INCR (k, p); /* Skip the n. */ + succeed_n_p = false; + } + + continue; + + + case succeed_n: + /* Get to the number of times to succeed. */ + p += 2; + + /* Increment p past the n for when k != 0. */ + EXTRACT_NUMBER_AND_INCR (k, p); + if (k == 0) + { + p -= 4; + succeed_n_p = true; /* Spaghetti code alert. */ + goto handle_on_failure_jump; + } + continue; + + + case set_number_at: + p += 4; + continue; + + + case start_memory: + case stop_memory: + p += 2; + continue; + + + default: + abort (); /* We have listed all the cases. */ + } /* switch *p++ */ + + /* Getting here means we have found the possible starting + characters for one path of the pattern -- and that the empty + string does not match. We need not follow this path further. + Instead, look at the next alternative (remembered on the + stack), or quit if no more. The test at the top of the loop + does these things. */ + path_can_be_null = false; + p = pend; + } /* while p */ + + /* Set `can_be_null' for the last path (also the first path, if the + pattern is empty). */ + bufp->can_be_null |= path_can_be_null; + + done: + RESET_FAIL_STACK (); + return 0; +} /* re_compile_fastmap */ + +/* Set REGS to hold NUM_REGS registers, storing them in STARTS and + ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use + this memory for recording register information. STARTS and ENDS + must be allocated using the malloc library routine, and must each + be at least NUM_REGS * sizeof (regoff_t) bytes long. + + If NUM_REGS == 0, then subsequent matches should allocate their own + register data. + + Unless this function is called, the first search or match using + PATTERN_BUFFER will allocate its own register data, without + freeing the old data. */ + +void +re_set_registers (bufp, regs, num_regs, starts, ends) + struct re_pattern_buffer *bufp; + struct re_registers *regs; + unsigned num_regs; + regoff_t *starts, *ends; +{ + if (num_regs) + { + bufp->regs_allocated = REGS_REALLOCATE; + regs->num_regs = num_regs; + regs->start = starts; + regs->end = ends; + } + else + { + bufp->regs_allocated = REGS_UNALLOCATED; + regs->num_regs = 0; + regs->start = regs->end = (regoff_t *) 0; + } +} + +/* Searching routines. */ + +/* Like re_search_2, below, but only one string is specified, and + doesn't let you say where to stop matching. */ + +int +re_search (bufp, string, size, startpos, range, regs) + struct re_pattern_buffer *bufp; + const char *string; + int size, startpos, range; + struct re_registers *regs; +{ + return re_search_2 (bufp, NULL, 0, string, size, startpos, range, + regs, size); +} + + +/* Using the compiled pattern in BUFP->buffer, first tries to match the + virtual concatenation of STRING1 and STRING2, starting first at index + STARTPOS, then at STARTPOS + 1, and so on. + + STRING1 and STRING2 have length SIZE1 and SIZE2, respectively. + + RANGE is how far to scan while trying to match. RANGE = 0 means try + only at STARTPOS; in general, the last start tried is STARTPOS + + RANGE. + + In REGS, return the indices of the virtual concatenation of STRING1 + and STRING2 that matched the entire BUFP->buffer and its contained + subexpressions. + + Do not consider matching one past the index STOP in the virtual + concatenation of STRING1 and STRING2. + + We return either the position in the strings at which the match was + found, -1 if no match, or -2 if error (such as failure + stack overflow). */ + +int +re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) + struct re_pattern_buffer *bufp; + const char *string1, *string2; + int size1, size2; + int startpos; + int range; + struct re_registers *regs; + int stop; +{ + int val; + register char *fastmap = bufp->fastmap; + register RE_TRANSLATE_TYPE translate = bufp->translate; + int total_size = size1 + size2; + int endpos = startpos + range; + + /* Check for out-of-range STARTPOS. */ + if (startpos < 0 || startpos > total_size) + return -1; + + /* Fix up RANGE if it might eventually take us outside + the virtual concatenation of STRING1 and STRING2. + Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE. */ + if (endpos < 0) + range = 0 - startpos; + else if (endpos > total_size) + range = total_size - startpos; + + /* If the search isn't to be a backwards one, don't waste time in a + search for a pattern that must be anchored. */ + if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == begbuf && range > 0) + { + if (startpos > 0) + return -1; + else + range = 1; + } + +#ifdef emacs + /* In a forward search for something that starts with \=. + don't keep searching past point. */ + if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0) + { + range = PT - startpos; + if (range <= 0) + return -1; + } +#endif /* emacs */ + + /* Update the fastmap now if not correct already. */ + if (fastmap && !bufp->fastmap_accurate) + if (re_compile_fastmap (bufp) == -2) + return -2; + + /* Loop through the string, looking for a place to start matching. */ + for (;;) + { + /* If a fastmap is supplied, skip quickly over characters that + cannot be the start of a match. If the pattern can match the + null string, however, we don't need to skip characters; we want + the first null string. */ + if (fastmap && startpos < total_size && !bufp->can_be_null) + { + if (range > 0) /* Searching forwards. */ + { + register const char *d; + register int lim = 0; + int irange = range; + + if (startpos < size1 && startpos + range >= size1) + lim = range - (size1 - startpos); + + d = (startpos >= size1 ? string2 - size1 : string1) + startpos; + + /* Written out as an if-else to avoid testing `translate' + inside the loop. */ + if (translate) + while (range > lim + && !fastmap[(unsigned char) + translate[(unsigned char) *d++]]) + range--; + else + while (range > lim && !fastmap[(unsigned char) *d++]) + range--; + + startpos += irange - range; + } + else /* Searching backwards. */ + { + register char c = (size1 == 0 || startpos >= size1 + ? string2[startpos - size1] + : string1[startpos]); + + if (!fastmap[(unsigned char) TRANSLATE (c)]) + goto advance; + } + } + + /* If can't match the null string, and that's all we have left, fail. */ + if (range >= 0 && startpos == total_size && fastmap + && !bufp->can_be_null) + return -1; + + val = re_match_2_internal (bufp, string1, size1, string2, size2, + startpos, regs, stop); +#ifndef REGEX_MALLOC +#ifdef C_ALLOCA + alloca (0); +#endif +#endif + + if (val >= 0) + return startpos; + + if (val == -2) + return -2; + + advance: + if (!range) + break; + else if (range > 0) + { + range--; + startpos++; + } + else + { + range++; + startpos--; + } + } + return -1; +} /* re_search_2 */ + +/* This converts PTR, a pointer into one of the search strings `string1' + and `string2' into an offset from the beginning of that string. */ +#define POINTER_TO_OFFSET(ptr) \ + (FIRST_STRING_P (ptr) \ + ? ((regoff_t) ((ptr) - string1)) \ + : ((regoff_t) ((ptr) - string2 + size1))) + +/* Macros for dealing with the split strings in re_match_2. */ + +#define MATCHING_IN_FIRST_STRING (dend == end_match_1) + +/* Call before fetching a character with *d. This switches over to + string2 if necessary. */ +#define PREFETCH() \ + while (d == dend) \ + { \ + /* End of string2 => fail. */ \ + if (dend == end_match_2) \ + goto fail; \ + /* End of string1 => advance to string2. */ \ + d = string2; \ + dend = end_match_2; \ + } + + +/* Test if at very beginning or at very end of the virtual concatenation + of `string1' and `string2'. If only one string, it's `string2'. */ +#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) +#define AT_STRINGS_END(d) ((d) == end2) + + +/* Test if D points to a character which is word-constituent. We have + two special cases to check for: if past the end of string1, look at + the first character in string2; and if before the beginning of + string2, look at the last character in string1. */ +#define WORDCHAR_P(d) \ + (SYNTAX ((d) == end1 ? *string2 \ + : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \ + == Sword) + +/* Disabled due to a compiler bug -- see comment at case wordbound */ +#if 0 +/* Test if the character before D and the one at D differ with respect + to being word-constituent. */ +#define AT_WORD_BOUNDARY(d) \ + (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \ + || WORDCHAR_P (d - 1) != WORDCHAR_P (d)) +#endif + +/* Free everything we malloc. */ +#ifdef MATCH_MAY_ALLOCATE +#define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL +#define FREE_VARIABLES() \ + do { \ + REGEX_FREE_STACK (fail_stack.stack); \ + FREE_VAR (regstart); \ + FREE_VAR (regend); \ + FREE_VAR (old_regstart); \ + FREE_VAR (old_regend); \ + FREE_VAR (best_regstart); \ + FREE_VAR (best_regend); \ + FREE_VAR (reg_info); \ + FREE_VAR (reg_dummy); \ + FREE_VAR (reg_info_dummy); \ + } while (0) +#else +#define FREE_VARIABLES() ((void)0) /* Do nothing! But inhibit gcc warning. */ +#endif /* not MATCH_MAY_ALLOCATE */ + +/* These values must meet several constraints. They must not be valid + register values; since we have a limit of 255 registers (because + we use only one byte in the pattern for the register number), we can + use numbers larger than 255. They must differ by 1, because of + NUM_FAILURE_ITEMS above. And the value for the lowest register must + be larger than the value for the highest register, so we do not try + to actually save any registers when none are active. */ +#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH) +#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1) + +/* Matching routines. */ + +#ifndef emacs /* Emacs never uses this. */ +/* re_match is like re_match_2 except it takes only a single string. */ + +int +re_match (bufp, string, size, pos, regs) + struct re_pattern_buffer *bufp; + const char *string; + int size, pos; + struct re_registers *regs; +{ + int result = re_match_2_internal (bufp, NULL, 0, string, size, + pos, regs, size); +#ifndef REGEX_MALLOC +#ifdef C_ALLOCA + alloca (0); +#endif +#endif + return result; +} +#endif /* not emacs */ + +static boolean group_match_null_string_p _RE_ARGS ((unsigned char **p, + unsigned char *end, + register_info_type *reg_info)); +static boolean alt_match_null_string_p _RE_ARGS ((unsigned char *p, + unsigned char *end, + register_info_type *reg_info)); +static boolean common_op_match_null_string_p _RE_ARGS ((unsigned char **p, + unsigned char *end, + register_info_type *reg_info)); +static int bcmp_translate _RE_ARGS ((const char *s1, const char *s2, + int len, char *translate)); + +/* re_match_2 matches the compiled pattern in BUFP against the + the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1 + and SIZE2, respectively). We start matching at POS, and stop + matching at STOP. + + If REGS is non-null and the `no_sub' field of BUFP is nonzero, we + store offsets for the substring each group matched in REGS. See the + documentation for exactly how many groups we fill. + + We return -1 if no match, -2 if an internal error (such as the + failure stack overflowing). Otherwise, we return the length of the + matched substring. */ + +int +re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) + struct re_pattern_buffer *bufp; + const char *string1, *string2; + int size1, size2; + int pos; + struct re_registers *regs; + int stop; +{ + int result = re_match_2_internal (bufp, string1, size1, string2, size2, + pos, regs, stop); +#ifndef REGEX_MALLOC +#ifdef C_ALLOCA + alloca (0); +#endif +#endif + return result; +} + +/* This is a separate function so that we can force an alloca cleanup + afterwards. */ +static int +re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) + struct re_pattern_buffer *bufp; + const char *string1, *string2; + int size1, size2; + int pos; + struct re_registers *regs; + int stop; +{ + /* General temporaries. */ + int mcnt; + unsigned char *p1; + + /* Just past the end of the corresponding string. */ + const char *end1, *end2; + + /* Pointers into string1 and string2, just past the last characters in + each to consider matching. */ + const char *end_match_1, *end_match_2; + + /* Where we are in the data, and the end of the current string. */ + const char *d, *dend; + + /* Where we are in the pattern, and the end of the pattern. */ + unsigned char *p = bufp->buffer; + register unsigned char *pend = p + bufp->used; + + /* Mark the opcode just after a start_memory, so we can test for an + empty subpattern when we get to the stop_memory. */ + unsigned char *just_past_start_mem = 0; + + /* We use this to map every character in the string. */ + RE_TRANSLATE_TYPE translate = bufp->translate; + + /* Failure point stack. Each place that can handle a failure further + down the line pushes a failure point on this stack. It consists of + restart, regend, and reg_info for all registers corresponding to + the subexpressions we're currently inside, plus the number of such + registers, and, finally, two char *'s. The first char * is where + to resume scanning the pattern; the second one is where to resume + scanning the strings. If the latter is zero, the failure point is + a ``dummy''; if a failure happens and the failure point is a dummy, + it gets discarded and the next next one is tried. */ +#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */ + fail_stack_type fail_stack; +#endif +#ifdef DEBUG + static unsigned failure_id = 0; + unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0; +#endif + +#ifdef REL_ALLOC + /* This holds the pointer to the failure stack, when + it is allocated relocatably. */ + fail_stack_elt_t *failure_stack_ptr; +#endif + + /* We fill all the registers internally, independent of what we + return, for use in backreferences. The number here includes + an element for register zero. */ + size_t num_regs = bufp->re_nsub + 1; + + /* The currently active registers. */ + active_reg_t lowest_active_reg = NO_LOWEST_ACTIVE_REG; + active_reg_t highest_active_reg = NO_HIGHEST_ACTIVE_REG; + + /* Information on the contents of registers. These are pointers into + the input strings; they record just what was matched (on this + attempt) by a subexpression part of the pattern, that is, the + regnum-th regstart pointer points to where in the pattern we began + matching and the regnum-th regend points to right after where we + stopped matching the regnum-th subexpression. (The zeroth register + keeps track of what the whole pattern matches.) */ +#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */ + const char **regstart, **regend; +#endif + + /* If a group that's operated upon by a repetition operator fails to + match anything, then the register for its start will need to be + restored because it will have been set to wherever in the string we + are when we last see its open-group operator. Similarly for a + register's end. */ +#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */ + const char **old_regstart, **old_regend; +#endif + + /* The is_active field of reg_info helps us keep track of which (possibly + nested) subexpressions we are currently in. The matched_something + field of reg_info[reg_num] helps us tell whether or not we have + matched any of the pattern so far this time through the reg_num-th + subexpression. These two fields get reset each time through any + loop their register is in. */ +#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */ + register_info_type *reg_info; +#endif + + /* The following record the register info as found in the above + variables when we find a match better than any we've seen before. + This happens as we backtrack through the failure points, which in + turn happens only if we have not yet matched the entire string. */ + unsigned best_regs_set = false; +#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */ + const char **best_regstart, **best_regend; +#endif + + /* Logically, this is `best_regend[0]'. But we don't want to have to + allocate space for that if we're not allocating space for anything + else (see below). Also, we never need info about register 0 for + any of the other register vectors, and it seems rather a kludge to + treat `best_regend' differently than the rest. So we keep track of + the end of the best match so far in a separate variable. We + initialize this to NULL so that when we backtrack the first time + and need to test it, it's not garbage. */ + const char *match_end = NULL; + + /* This helps SET_REGS_MATCHED avoid doing redundant work. */ + int set_regs_matched_done = 0; + + /* Used when we pop values we don't care about. */ +#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */ + const char **reg_dummy; + register_info_type *reg_info_dummy; +#endif + +#ifdef DEBUG + /* Counts the total number of registers pushed. */ + unsigned num_regs_pushed = 0; +#endif + + DEBUG_PRINT1 ("\n\nEntering re_match_2.\n"); + + INIT_FAIL_STACK (); + +#ifdef MATCH_MAY_ALLOCATE + /* Do not bother to initialize all the register variables if there are + no groups in the pattern, as it takes a fair amount of time. If + there are groups, we include space for register 0 (the whole + pattern), even though we never use it, since it simplifies the + array indexing. We should fix this. */ + if (bufp->re_nsub) + { + regstart = REGEX_TALLOC (num_regs, const char *); + regend = REGEX_TALLOC (num_regs, const char *); + old_regstart = REGEX_TALLOC (num_regs, const char *); + old_regend = REGEX_TALLOC (num_regs, const char *); + best_regstart = REGEX_TALLOC (num_regs, const char *); + best_regend = REGEX_TALLOC (num_regs, const char *); + reg_info = REGEX_TALLOC (num_regs, register_info_type); + reg_dummy = REGEX_TALLOC (num_regs, const char *); + reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type); + + if (!(regstart && regend && old_regstart && old_regend && reg_info + && best_regstart && best_regend && reg_dummy && reg_info_dummy)) + { + FREE_VARIABLES (); + return -2; + } + } + else + { + /* We must initialize all our variables to NULL, so that + `FREE_VARIABLES' doesn't try to free them. */ + regstart = regend = old_regstart = old_regend = best_regstart + = best_regend = reg_dummy = NULL; + reg_info = reg_info_dummy = (register_info_type *) NULL; + } +#endif /* MATCH_MAY_ALLOCATE */ + + /* The starting position is bogus. */ + if (pos < 0 || pos > size1 + size2) + { + FREE_VARIABLES (); + return -1; + } + + /* Initialize subexpression text positions to -1 to mark ones that no + start_memory/stop_memory has been seen for. Also initialize the + register information struct. */ + for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++) + { + regstart[mcnt] = regend[mcnt] + = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE; + + REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE; + IS_ACTIVE (reg_info[mcnt]) = 0; + MATCHED_SOMETHING (reg_info[mcnt]) = 0; + EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0; + } + + /* We move `string1' into `string2' if the latter's empty -- but not if + `string1' is null. */ + if (size2 == 0 && string1 != NULL) + { + string2 = string1; + size2 = size1; + string1 = 0; + size1 = 0; + } + end1 = string1 + size1; + end2 = string2 + size2; + + /* Compute where to stop matching, within the two strings. */ + if (stop <= size1) + { + end_match_1 = string1 + stop; + end_match_2 = string2; + } + else + { + end_match_1 = end1; + end_match_2 = string2 + stop - size1; + } + + /* `p' scans through the pattern as `d' scans through the data. + `dend' is the end of the input string that `d' points within. `d' + is advanced into the following input string whenever necessary, but + this happens before fetching; therefore, at the beginning of the + loop, `d' can be pointing at the end of a string, but it cannot + equal `string2'. */ + if (size1 > 0 && pos <= size1) + { + d = string1 + pos; + dend = end_match_1; + } + else + { + d = string2 + pos - size1; + dend = end_match_2; + } + + DEBUG_PRINT1 ("The compiled pattern is:\n"); + DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend); + DEBUG_PRINT1 ("The string to match is: `"); + DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); + DEBUG_PRINT1 ("'\n"); + + /* This loops over pattern commands. It exits by returning from the + function if the match is complete, or it drops through if the match + fails at this starting point in the input data. */ + for (;;) + { +#ifdef _LIBC + DEBUG_PRINT2 ("\n%p: ", p); +#else + DEBUG_PRINT2 ("\n0x%x: ", p); +#endif + + if (p == pend) + { /* End of pattern means we might have succeeded. */ + DEBUG_PRINT1 ("end of pattern ... "); + + /* If we haven't matched the entire string, and we want the + longest match, try backtracking. */ + if (d != end_match_2) + { + /* 1 if this match ends in the same string (string1 or string2) + as the best previous match. */ + boolean same_str_p = (FIRST_STRING_P (match_end) + == MATCHING_IN_FIRST_STRING); + /* 1 if this match is the best seen so far. */ + boolean best_match_p; + + /* AIX compiler got confused when this was combined + with the previous declaration. */ + if (same_str_p) + best_match_p = d > match_end; + else + best_match_p = !MATCHING_IN_FIRST_STRING; + + DEBUG_PRINT1 ("backtracking.\n"); + + if (!FAIL_STACK_EMPTY ()) + { /* More failure points to try. */ + + /* If exceeds best match so far, save it. */ + if (!best_regs_set || best_match_p) + { + best_regs_set = true; + match_end = d; + + DEBUG_PRINT1 ("\nSAVING match as best so far.\n"); + + for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++) + { + best_regstart[mcnt] = regstart[mcnt]; + best_regend[mcnt] = regend[mcnt]; + } + } + goto fail; + } + + /* If no failure points, don't restore garbage. And if + last match is real best match, don't restore second + best one. */ + else if (best_regs_set && !best_match_p) + { + restore_best_regs: + /* Restore best match. It may happen that `dend == + end_match_1' while the restored d is in string2. + For example, the pattern `x.*y.*z' against the + strings `x-' and `y-z-', if the two strings are + not consecutive in memory. */ + DEBUG_PRINT1 ("Restoring best registers.\n"); + + d = match_end; + dend = ((d >= string1 && d <= end1) + ? end_match_1 : end_match_2); + + for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++) + { + regstart[mcnt] = best_regstart[mcnt]; + regend[mcnt] = best_regend[mcnt]; + } + } + } /* d != end_match_2 */ + + succeed_label: + DEBUG_PRINT1 ("Accepting match.\n"); + + /* If caller wants register contents data back, do it. */ + if (regs && !bufp->no_sub) + { + /* Have the register data arrays been allocated? */ + if (bufp->regs_allocated == REGS_UNALLOCATED) + { /* No. So allocate them with malloc. We need one + extra element beyond `num_regs' for the `-1' marker + GNU code uses. */ + regs->num_regs = MAX (RE_NREGS, num_regs + 1); + regs->start = TALLOC (regs->num_regs, regoff_t); + regs->end = TALLOC (regs->num_regs, regoff_t); + if (regs->start == NULL || regs->end == NULL) + { + FREE_VARIABLES (); + return -2; + } + bufp->regs_allocated = REGS_REALLOCATE; + } + else if (bufp->regs_allocated == REGS_REALLOCATE) + { /* Yes. If we need more elements than were already + allocated, reallocate them. If we need fewer, just + leave it alone. */ + if (regs->num_regs < num_regs + 1) + { + regs->num_regs = num_regs + 1; + RETALLOC (regs->start, regs->num_regs, regoff_t); + RETALLOC (regs->end, regs->num_regs, regoff_t); + if (regs->start == NULL || regs->end == NULL) + { + FREE_VARIABLES (); + return -2; + } + } + } + else + { + /* These braces fend off a "empty body in an else-statement" + warning under GCC when assert expands to nothing. */ + assert (bufp->regs_allocated == REGS_FIXED); + } + + /* Convert the pointer data in `regstart' and `regend' to + indices. Register zero has to be set differently, + since we haven't kept track of any info for it. */ + if (regs->num_regs > 0) + { + regs->start[0] = pos; + regs->end[0] = (MATCHING_IN_FIRST_STRING + ? ((regoff_t) (d - string1)) + : ((regoff_t) (d - string2 + size1))); + } + + /* Go through the first `min (num_regs, regs->num_regs)' + registers, since that is all we initialized. */ + for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs); + mcnt++) + { + if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt])) + regs->start[mcnt] = regs->end[mcnt] = -1; + else + { + regs->start[mcnt] + = (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]); + regs->end[mcnt] + = (regoff_t) POINTER_TO_OFFSET (regend[mcnt]); + } + } + + /* If the regs structure we return has more elements than + were in the pattern, set the extra elements to -1. If + we (re)allocated the registers, this is the case, + because we always allocate enough to have at least one + -1 at the end. */ + for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++) + regs->start[mcnt] = regs->end[mcnt] = -1; + } /* regs && !bufp->no_sub */ + + DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n", + nfailure_points_pushed, nfailure_points_popped, + nfailure_points_pushed - nfailure_points_popped); + DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed); + + mcnt = d - pos - (MATCHING_IN_FIRST_STRING + ? string1 + : string2 - size1); + + DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt); + + FREE_VARIABLES (); + return mcnt; + } + + /* Otherwise match next pattern command. */ + switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++)) + { + /* Ignore these. Used to ignore the n of succeed_n's which + currently have n == 0. */ + case no_op: + DEBUG_PRINT1 ("EXECUTING no_op.\n"); + break; + + case succeed: + DEBUG_PRINT1 ("EXECUTING succeed.\n"); + goto succeed_label; + + /* Match the next n pattern characters exactly. The following + byte in the pattern defines n, and the n bytes after that + are the characters to match. */ + case exactn: + mcnt = *p++; + DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt); + + /* This is written out as an if-else so we don't waste time + testing `translate' inside the loop. */ + if (translate) + { + do + { + PREFETCH (); + if ((unsigned char) translate[(unsigned char) *d++] + != (unsigned char) *p++) + goto fail; + } + while (--mcnt); + } + else + { + do + { + PREFETCH (); + if (*d++ != (char) *p++) goto fail; + } + while (--mcnt); + } + SET_REGS_MATCHED (); + break; + + + /* Match any character except possibly a newline or a null. */ + case anychar: + DEBUG_PRINT1 ("EXECUTING anychar.\n"); + + PREFETCH (); + + if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n') + || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000')) + goto fail; + + SET_REGS_MATCHED (); + DEBUG_PRINT2 (" Matched `%d'.\n", *d); + d++; + break; + + + case charset: + case charset_not: + { + register unsigned char c; + boolean not = (re_opcode_t) *(p - 1) == charset_not; + + DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : ""); + + PREFETCH (); + c = TRANSLATE (*d); /* The character to match. */ + + /* Cast to `unsigned' instead of `unsigned char' in case the + bit list is a full 32 bytes long. */ + if (c < (unsigned) (*p * BYTEWIDTH) + && p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH))) + not = !not; + + p += 1 + *p; + + if (!not) goto fail; + + SET_REGS_MATCHED (); + d++; + break; + } + + + /* The beginning of a group is represented by start_memory. + The arguments are the register number in the next byte, and the + number of groups inner to this one in the next. The text + matched within the group is recorded (in the internal + registers data structure) under the register number. */ + case start_memory: + DEBUG_PRINT3 ("EXECUTING start_memory %d (%d):\n", *p, p[1]); + + /* Find out if this group can match the empty string. */ + p1 = p; /* To send to group_match_null_string_p. */ + + if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE) + REG_MATCH_NULL_STRING_P (reg_info[*p]) + = group_match_null_string_p (&p1, pend, reg_info); + + /* Save the position in the string where we were the last time + we were at this open-group operator in case the group is + operated upon by a repetition operator, e.g., with `(a*)*b' + against `ab'; then we want to ignore where we are now in + the string in case this attempt to match fails. */ + old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) + ? REG_UNSET (regstart[*p]) ? d : regstart[*p] + : regstart[*p]; + DEBUG_PRINT2 (" old_regstart: %d\n", + POINTER_TO_OFFSET (old_regstart[*p])); + + regstart[*p] = d; + DEBUG_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p])); + + IS_ACTIVE (reg_info[*p]) = 1; + MATCHED_SOMETHING (reg_info[*p]) = 0; + + /* Clear this whenever we change the register activity status. */ + set_regs_matched_done = 0; + + /* This is the new highest active register. */ + highest_active_reg = *p; + + /* If nothing was active before, this is the new lowest active + register. */ + if (lowest_active_reg == NO_LOWEST_ACTIVE_REG) + lowest_active_reg = *p; + + /* Move past the register number and inner group count. */ + p += 2; + just_past_start_mem = p; + + break; + + + /* The stop_memory opcode represents the end of a group. Its + arguments are the same as start_memory's: the register + number, and the number of inner groups. */ + case stop_memory: + DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]); + + /* We need to save the string position the last time we were at + this close-group operator in case the group is operated + upon by a repetition operator, e.g., with `((a*)*(b*)*)*' + against `aba'; then we want to ignore where we are now in + the string in case this attempt to match fails. */ + old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) + ? REG_UNSET (regend[*p]) ? d : regend[*p] + : regend[*p]; + DEBUG_PRINT2 (" old_regend: %d\n", + POINTER_TO_OFFSET (old_regend[*p])); + + regend[*p] = d; + DEBUG_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p])); + + /* This register isn't active anymore. */ + IS_ACTIVE (reg_info[*p]) = 0; + + /* Clear this whenever we change the register activity status. */ + set_regs_matched_done = 0; + + /* If this was the only register active, nothing is active + anymore. */ + if (lowest_active_reg == highest_active_reg) + { + lowest_active_reg = NO_LOWEST_ACTIVE_REG; + highest_active_reg = NO_HIGHEST_ACTIVE_REG; + } + else + { /* We must scan for the new highest active register, since + it isn't necessarily one less than now: consider + (a(b)c(d(e)f)g). When group 3 ends, after the f), the + new highest active register is 1. */ + unsigned char r = *p - 1; + while (r > 0 && !IS_ACTIVE (reg_info[r])) + r--; + + /* If we end up at register zero, that means that we saved + the registers as the result of an `on_failure_jump', not + a `start_memory', and we jumped to past the innermost + `stop_memory'. For example, in ((.)*) we save + registers 1 and 2 as a result of the *, but when we pop + back to the second ), we are at the stop_memory 1. + Thus, nothing is active. */ + if (r == 0) + { + lowest_active_reg = NO_LOWEST_ACTIVE_REG; + highest_active_reg = NO_HIGHEST_ACTIVE_REG; + } + else + highest_active_reg = r; + } + + /* If just failed to match something this time around with a + group that's operated on by a repetition operator, try to + force exit from the ``loop'', and restore the register + information for this group that we had before trying this + last match. */ + if ((!MATCHED_SOMETHING (reg_info[*p]) + || just_past_start_mem == p - 1) + && (p + 2) < pend) + { + boolean is_a_jump_n = false; + + p1 = p + 2; + mcnt = 0; + switch ((re_opcode_t) *p1++) + { + case jump_n: + is_a_jump_n = true; + case pop_failure_jump: + case maybe_pop_jump: + case jump: + case dummy_failure_jump: + EXTRACT_NUMBER_AND_INCR (mcnt, p1); + if (is_a_jump_n) + p1 += 2; + break; + + default: + /* do nothing */ ; + } + p1 += mcnt; + + /* If the next operation is a jump backwards in the pattern + to an on_failure_jump right before the start_memory + corresponding to this stop_memory, exit from the loop + by forcing a failure after pushing on the stack the + on_failure_jump's jump in the pattern, and d. */ + if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump + && (re_opcode_t) p1[3] == start_memory && p1[4] == *p) + { + /* If this group ever matched anything, then restore + what its registers were before trying this last + failed match, e.g., with `(a*)*b' against `ab' for + regstart[1], and, e.g., with `((a*)*(b*)*)*' + against `aba' for regend[3]. + + Also restore the registers for inner groups for, + e.g., `((a*)(b*))*' against `aba' (register 3 would + otherwise get trashed). */ + + if (EVER_MATCHED_SOMETHING (reg_info[*p])) + { + unsigned r; + + EVER_MATCHED_SOMETHING (reg_info[*p]) = 0; + + /* Restore this and inner groups' (if any) registers. */ + for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1); + r++) + { + regstart[r] = old_regstart[r]; + + /* xx why this test? */ + if (old_regend[r] >= regstart[r]) + regend[r] = old_regend[r]; + } + } + p1++; + EXTRACT_NUMBER_AND_INCR (mcnt, p1); + PUSH_FAILURE_POINT (p1 + mcnt, d, -2); + + goto fail; + } + } + + /* Move past the register number and the inner group count. */ + p += 2; + break; + + + /* \ has been turned into a `duplicate' command which is + followed by the numeric value of as the register number. */ + case duplicate: + { + register const char *d2, *dend2; + int regno = *p++; /* Get which register to match against. */ + DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno); + + /* Can't back reference a group which we've never matched. */ + if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno])) + goto fail; + + /* Where in input to try to start matching. */ + d2 = regstart[regno]; + + /* Where to stop matching; if both the place to start and + the place to stop matching are in the same string, then + set to the place to stop, otherwise, for now have to use + the end of the first string. */ + + dend2 = ((FIRST_STRING_P (regstart[regno]) + == FIRST_STRING_P (regend[regno])) + ? regend[regno] : end_match_1); + for (;;) + { + /* If necessary, advance to next segment in register + contents. */ + while (d2 == dend2) + { + if (dend2 == end_match_2) break; + if (dend2 == regend[regno]) break; + + /* End of string1 => advance to string2. */ + d2 = string2; + dend2 = regend[regno]; + } + /* At end of register contents => success */ + if (d2 == dend2) break; + + /* If necessary, advance to next segment in data. */ + PREFETCH (); + + /* How many characters left in this segment to match. */ + mcnt = dend - d; + + /* Want how many consecutive characters we can match in + one shot, so, if necessary, adjust the count. */ + if (mcnt > dend2 - d2) + mcnt = dend2 - d2; + + /* Compare that many; failure if mismatch, else move + past them. */ + if (translate + ? bcmp_translate (d, d2, mcnt, translate) + : bcmp (d, d2, mcnt)) + goto fail; + d += mcnt, d2 += mcnt; + + /* Do this because we've match some characters. */ + SET_REGS_MATCHED (); + } + } + break; + + + /* begline matches the empty string at the beginning of the string + (unless `not_bol' is set in `bufp'), and, if + `newline_anchor' is set, after newlines. */ + case begline: + DEBUG_PRINT1 ("EXECUTING begline.\n"); + + if (AT_STRINGS_BEG (d)) + { + if (!bufp->not_bol) break; + } + else if (d[-1] == '\n' && bufp->newline_anchor) + { + break; + } + /* In all other cases, we fail. */ + goto fail; + + + /* endline is the dual of begline. */ + case endline: + DEBUG_PRINT1 ("EXECUTING endline.\n"); + + if (AT_STRINGS_END (d)) + { + if (!bufp->not_eol) break; + } + + /* We have to ``prefetch'' the next character. */ + else if ((d == end1 ? *string2 : *d) == '\n' + && bufp->newline_anchor) + { + break; + } + goto fail; + + + /* Match at the very beginning of the data. */ + case begbuf: + DEBUG_PRINT1 ("EXECUTING begbuf.\n"); + if (AT_STRINGS_BEG (d)) + break; + goto fail; + + + /* Match at the very end of the data. */ + case endbuf: + DEBUG_PRINT1 ("EXECUTING endbuf.\n"); + if (AT_STRINGS_END (d)) + break; + goto fail; + + + /* on_failure_keep_string_jump is used to optimize `.*\n'. It + pushes NULL as the value for the string on the stack. Then + `pop_failure_point' will keep the current value for the + string, instead of restoring it. To see why, consider + matching `foo\nbar' against `.*\n'. The .* matches the foo; + then the . fails against the \n. But the next thing we want + to do is match the \n against the \n; if we restored the + string value, we would be back at the foo. + + Because this is used only in specific cases, we don't need to + check all the things that `on_failure_jump' does, to make + sure the right things get saved on the stack. Hence we don't + share its code. The only reason to push anything on the + stack at all is that otherwise we would have to change + `anychar's code to do something besides goto fail in this + case; that seems worse than this. */ + case on_failure_keep_string_jump: + DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump"); + + EXTRACT_NUMBER_AND_INCR (mcnt, p); +#ifdef _LIBC + DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt); +#else + DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt); +#endif + + PUSH_FAILURE_POINT (p + mcnt, NULL, -2); + break; + + + /* Uses of on_failure_jump: + + Each alternative starts with an on_failure_jump that points + to the beginning of the next alternative. Each alternative + except the last ends with a jump that in effect jumps past + the rest of the alternatives. (They really jump to the + ending jump of the following alternative, because tensioning + these jumps is a hassle.) + + Repeats start with an on_failure_jump that points past both + the repetition text and either the following jump or + pop_failure_jump back to this on_failure_jump. */ + case on_failure_jump: + on_failure: + DEBUG_PRINT1 ("EXECUTING on_failure_jump"); + + EXTRACT_NUMBER_AND_INCR (mcnt, p); +#ifdef _LIBC + DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt); +#else + DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt); +#endif + + /* If this on_failure_jump comes right before a group (i.e., + the original * applied to a group), save the information + for that group and all inner ones, so that if we fail back + to this point, the group's information will be correct. + For example, in \(a*\)*\1, we need the preceding group, + and in \(zz\(a*\)b*\)\2, we need the inner group. */ + + /* We can't use `p' to check ahead because we push + a failure point to `p + mcnt' after we do this. */ + p1 = p; + + /* We need to skip no_op's before we look for the + start_memory in case this on_failure_jump is happening as + the result of a completed succeed_n, as in \(a\)\{1,3\}b\1 + against aba. */ + while (p1 < pend && (re_opcode_t) *p1 == no_op) + p1++; + + if (p1 < pend && (re_opcode_t) *p1 == start_memory) + { + /* We have a new highest active register now. This will + get reset at the start_memory we are about to get to, + but we will have saved all the registers relevant to + this repetition op, as described above. */ + highest_active_reg = *(p1 + 1) + *(p1 + 2); + if (lowest_active_reg == NO_LOWEST_ACTIVE_REG) + lowest_active_reg = *(p1 + 1); + } + + DEBUG_PRINT1 (":\n"); + PUSH_FAILURE_POINT (p + mcnt, d, -2); + break; + + + /* A smart repeat ends with `maybe_pop_jump'. + We change it to either `pop_failure_jump' or `jump'. */ + case maybe_pop_jump: + EXTRACT_NUMBER_AND_INCR (mcnt, p); + DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt); + { + register unsigned char *p2 = p; + + /* Compare the beginning of the repeat with what in the + pattern follows its end. If we can establish that there + is nothing that they would both match, i.e., that we + would have to backtrack because of (as in, e.g., `a*a') + then we can change to pop_failure_jump, because we'll + never have to backtrack. + + This is not true in the case of alternatives: in + `(a|ab)*' we do need to backtrack to the `ab' alternative + (e.g., if the string was `ab'). But instead of trying to + detect that here, the alternative has put on a dummy + failure point which is what we will end up popping. */ + + /* Skip over open/close-group commands. + If what follows this loop is a ...+ construct, + look at what begins its body, since we will have to + match at least one of that. */ + while (1) + { + if (p2 + 2 < pend + && ((re_opcode_t) *p2 == stop_memory + || (re_opcode_t) *p2 == start_memory)) + p2 += 3; + else if (p2 + 6 < pend + && (re_opcode_t) *p2 == dummy_failure_jump) + p2 += 6; + else + break; + } + + p1 = p + mcnt; + /* p1[0] ... p1[2] are the `on_failure_jump' corresponding + to the `maybe_finalize_jump' of this case. Examine what + follows. */ + + /* If we're at the end of the pattern, we can change. */ + if (p2 == pend) + { + /* Consider what happens when matching ":\(.*\)" + against ":/". I don't really understand this code + yet. */ + p[-3] = (unsigned char) pop_failure_jump; + DEBUG_PRINT1 + (" End of pattern: change to `pop_failure_jump'.\n"); + } + + else if ((re_opcode_t) *p2 == exactn + || (bufp->newline_anchor && (re_opcode_t) *p2 == endline)) + { + register unsigned char c + = *p2 == (unsigned char) endline ? '\n' : p2[2]; + + if ((re_opcode_t) p1[3] == exactn && p1[5] != c) + { + p[-3] = (unsigned char) pop_failure_jump; + DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", + c, p1[5]); + } + + else if ((re_opcode_t) p1[3] == charset + || (re_opcode_t) p1[3] == charset_not) + { + int not = (re_opcode_t) p1[3] == charset_not; + + if (c < (unsigned char) (p1[4] * BYTEWIDTH) + && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH))) + not = !not; + + /* `not' is equal to 1 if c would match, which means + that we can't change to pop_failure_jump. */ + if (!not) + { + p[-3] = (unsigned char) pop_failure_jump; + DEBUG_PRINT1 (" No match => pop_failure_jump.\n"); + } + } + } + else if ((re_opcode_t) *p2 == charset) + { +#ifdef DEBUG + register unsigned char c + = *p2 == (unsigned char) endline ? '\n' : p2[2]; +#endif + +#if 0 + if ((re_opcode_t) p1[3] == exactn + && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5] + && (p2[2 + p1[5] / BYTEWIDTH] + & (1 << (p1[5] % BYTEWIDTH))))) +#else + if ((re_opcode_t) p1[3] == exactn + && ! ((int) p2[1] * BYTEWIDTH > (int) p1[4] + && (p2[2 + p1[4] / BYTEWIDTH] + & (1 << (p1[4] % BYTEWIDTH))))) +#endif + { + p[-3] = (unsigned char) pop_failure_jump; + DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", + c, p1[5]); + } + + else if ((re_opcode_t) p1[3] == charset_not) + { + int idx; + /* We win if the charset_not inside the loop + lists every character listed in the charset after. */ + for (idx = 0; idx < (int) p2[1]; idx++) + if (! (p2[2 + idx] == 0 + || (idx < (int) p1[4] + && ((p2[2 + idx] & ~ p1[5 + idx]) == 0)))) + break; + + if (idx == p2[1]) + { + p[-3] = (unsigned char) pop_failure_jump; + DEBUG_PRINT1 (" No match => pop_failure_jump.\n"); + } + } + else if ((re_opcode_t) p1[3] == charset) + { + int idx; + /* We win if the charset inside the loop + has no overlap with the one after the loop. */ + for (idx = 0; + idx < (int) p2[1] && idx < (int) p1[4]; + idx++) + if ((p2[2 + idx] & p1[5 + idx]) != 0) + break; + + if (idx == p2[1] || idx == p1[4]) + { + p[-3] = (unsigned char) pop_failure_jump; + DEBUG_PRINT1 (" No match => pop_failure_jump.\n"); + } + } + } + } + p -= 2; /* Point at relative address again. */ + if ((re_opcode_t) p[-1] != pop_failure_jump) + { + p[-1] = (unsigned char) jump; + DEBUG_PRINT1 (" Match => jump.\n"); + goto unconditional_jump; + } + /* Note fall through. */ + + + /* The end of a simple repeat has a pop_failure_jump back to + its matching on_failure_jump, where the latter will push a + failure point. The pop_failure_jump takes off failure + points put on by this pop_failure_jump's matching + on_failure_jump; we got through the pattern to here from the + matching on_failure_jump, so didn't fail. */ + case pop_failure_jump: + { + /* We need to pass separate storage for the lowest and + highest registers, even though we don't care about the + actual values. Otherwise, we will restore only one + register from the stack, since lowest will == highest in + `pop_failure_point'. */ + active_reg_t dummy_low_reg, dummy_high_reg; + unsigned char *pdummy; + const char *sdummy; + + DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n"); + POP_FAILURE_POINT (sdummy, pdummy, + dummy_low_reg, dummy_high_reg, + reg_dummy, reg_dummy, reg_info_dummy); + } + /* Note fall through. */ + + unconditional_jump: +#ifdef _LIBC + DEBUG_PRINT2 ("\n%p: ", p); +#else + DEBUG_PRINT2 ("\n0x%x: ", p); +#endif + /* Note fall through. */ + + /* Unconditionally jump (without popping any failure points). */ + case jump: + EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */ + DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt); + p += mcnt; /* Do the jump. */ +#ifdef _LIBC + DEBUG_PRINT2 ("(to %p).\n", p); +#else + DEBUG_PRINT2 ("(to 0x%x).\n", p); +#endif + break; + + + /* We need this opcode so we can detect where alternatives end + in `group_match_null_string_p' et al. */ + case jump_past_alt: + DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n"); + goto unconditional_jump; + + + /* Normally, the on_failure_jump pushes a failure point, which + then gets popped at pop_failure_jump. We will end up at + pop_failure_jump, also, and with a pattern of, say, `a+', we + are skipping over the on_failure_jump, so we have to push + something meaningless for pop_failure_jump to pop. */ + case dummy_failure_jump: + DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n"); + /* It doesn't matter what we push for the string here. What + the code at `fail' tests is the value for the pattern. */ + PUSH_FAILURE_POINT (0, 0, -2); + goto unconditional_jump; + + + /* At the end of an alternative, we need to push a dummy failure + point in case we are followed by a `pop_failure_jump', because + we don't want the failure point for the alternative to be + popped. For example, matching `(a|ab)*' against `aab' + requires that we match the `ab' alternative. */ + case push_dummy_failure: + DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n"); + /* See comments just above at `dummy_failure_jump' about the + two zeroes. */ + PUSH_FAILURE_POINT (0, 0, -2); + break; + + /* Have to succeed matching what follows at least n times. + After that, handle like `on_failure_jump'. */ + case succeed_n: + EXTRACT_NUMBER (mcnt, p + 2); + DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt); + + assert (mcnt >= 0); + /* Originally, this is how many times we HAVE to succeed. */ + if (mcnt > 0) + { + mcnt--; + p += 2; + STORE_NUMBER_AND_INCR (p, mcnt); +#ifdef _LIBC + DEBUG_PRINT3 (" Setting %p to %d.\n", p - 2, mcnt); +#else + DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p - 2, mcnt); +#endif + } + else if (mcnt == 0) + { +#ifdef _LIBC + DEBUG_PRINT2 (" Setting two bytes from %p to no_op.\n", p+2); +#else + DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n", p+2); +#endif + p[2] = (unsigned char) no_op; + p[3] = (unsigned char) no_op; + goto on_failure; + } + break; + + case jump_n: + EXTRACT_NUMBER (mcnt, p + 2); + DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt); + + /* Originally, this is how many times we CAN jump. */ + if (mcnt) + { + mcnt--; + STORE_NUMBER (p + 2, mcnt); +#ifdef _LIBC + DEBUG_PRINT3 (" Setting %p to %d.\n", p + 2, mcnt); +#else + DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p + 2, mcnt); +#endif + goto unconditional_jump; + } + /* If don't have to jump any more, skip over the rest of command. */ + else + p += 4; + break; + + case set_number_at: + { + DEBUG_PRINT1 ("EXECUTING set_number_at.\n"); + + EXTRACT_NUMBER_AND_INCR (mcnt, p); + p1 = p + mcnt; + EXTRACT_NUMBER_AND_INCR (mcnt, p); +#ifdef _LIBC + DEBUG_PRINT3 (" Setting %p to %d.\n", p1, mcnt); +#else + DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt); +#endif + STORE_NUMBER (p1, mcnt); + break; + } + +#if 0 + /* The DEC Alpha C compiler 3.x generates incorrect code for the + test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of + AT_WORD_BOUNDARY, so this code is disabled. Expanding the + macro and introducing temporary variables works around the bug. */ + + case wordbound: + DEBUG_PRINT1 ("EXECUTING wordbound.\n"); + if (AT_WORD_BOUNDARY (d)) + break; + goto fail; + + case notwordbound: + DEBUG_PRINT1 ("EXECUTING notwordbound.\n"); + if (AT_WORD_BOUNDARY (d)) + goto fail; + break; +#else + case wordbound: + { + boolean prevchar, thischar; + + DEBUG_PRINT1 ("EXECUTING wordbound.\n"); + if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d)) + break; + + prevchar = WORDCHAR_P (d - 1); + thischar = WORDCHAR_P (d); + if (prevchar != thischar) + break; + goto fail; + } + + case notwordbound: + { + boolean prevchar, thischar; + + DEBUG_PRINT1 ("EXECUTING notwordbound.\n"); + if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d)) + goto fail; + + prevchar = WORDCHAR_P (d - 1); + thischar = WORDCHAR_P (d); + if (prevchar != thischar) + goto fail; + break; + } +#endif + + case wordbeg: + DEBUG_PRINT1 ("EXECUTING wordbeg.\n"); + if (WORDCHAR_P (d) && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1))) + break; + goto fail; + + case wordend: + DEBUG_PRINT1 ("EXECUTING wordend.\n"); + if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1) + && (!WORDCHAR_P (d) || AT_STRINGS_END (d))) + break; + goto fail; + +#ifdef emacs + case before_dot: + DEBUG_PRINT1 ("EXECUTING before_dot.\n"); + if (PTR_CHAR_POS ((unsigned char *) d) >= point) + goto fail; + break; + + case at_dot: + DEBUG_PRINT1 ("EXECUTING at_dot.\n"); + if (PTR_CHAR_POS ((unsigned char *) d) != point) + goto fail; + break; + + case after_dot: + DEBUG_PRINT1 ("EXECUTING after_dot.\n"); + if (PTR_CHAR_POS ((unsigned char *) d) <= point) + goto fail; + break; + + case syntaxspec: + DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt); + mcnt = *p++; + goto matchsyntax; + + case wordchar: + DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n"); + mcnt = (int) Sword; + matchsyntax: + PREFETCH (); + /* Can't use *d++ here; SYNTAX may be an unsafe macro. */ + d++; + if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt) + goto fail; + SET_REGS_MATCHED (); + break; + + case notsyntaxspec: + DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt); + mcnt = *p++; + goto matchnotsyntax; + + case notwordchar: + DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n"); + mcnt = (int) Sword; + matchnotsyntax: + PREFETCH (); + /* Can't use *d++ here; SYNTAX may be an unsafe macro. */ + d++; + if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt) + goto fail; + SET_REGS_MATCHED (); + break; + +#else /* not emacs */ + case wordchar: + DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n"); + PREFETCH (); + if (!WORDCHAR_P (d)) + goto fail; + SET_REGS_MATCHED (); + d++; + break; + + case notwordchar: + DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n"); + PREFETCH (); + if (WORDCHAR_P (d)) + goto fail; + SET_REGS_MATCHED (); + d++; + break; +#endif /* not emacs */ + + default: + abort (); + } + continue; /* Successfully executed one pattern command; keep going. */ + + + /* We goto here if a matching operation fails. */ + fail: + if (!FAIL_STACK_EMPTY ()) + { /* A restart point is known. Restore to that state. */ + DEBUG_PRINT1 ("\nFAIL:\n"); + POP_FAILURE_POINT (d, p, + lowest_active_reg, highest_active_reg, + regstart, regend, reg_info); + + /* If this failure point is a dummy, try the next one. */ + if (!p) + goto fail; + + /* If we failed to the end of the pattern, don't examine *p. */ + assert (p <= pend); + if (p < pend) + { + boolean is_a_jump_n = false; + + /* If failed to a backwards jump that's part of a repetition + loop, need to pop this failure point and use the next one. */ + switch ((re_opcode_t) *p) + { + case jump_n: + is_a_jump_n = true; + case maybe_pop_jump: + case pop_failure_jump: + case jump: + p1 = p + 1; + EXTRACT_NUMBER_AND_INCR (mcnt, p1); + p1 += mcnt; + + if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n) + || (!is_a_jump_n + && (re_opcode_t) *p1 == on_failure_jump)) + goto fail; + break; + default: + /* do nothing */ ; + } + } + + if (d >= string1 && d <= end1) + dend = end_match_1; + } + else + break; /* Matching at this starting point really fails. */ + } /* for (;;) */ + + if (best_regs_set) + goto restore_best_regs; + + FREE_VARIABLES (); + + return -1; /* Failure to match. */ +} /* re_match_2 */ + +/* Subroutine definitions for re_match_2. */ + + +/* We are passed P pointing to a register number after a start_memory. + + Return true if the pattern up to the corresponding stop_memory can + match the empty string, and false otherwise. + + If we find the matching stop_memory, sets P to point to one past its number. + Otherwise, sets P to an undefined byte less than or equal to END. + + We don't handle duplicates properly (yet). */ + +static boolean +group_match_null_string_p (p, end, reg_info) + unsigned char **p, *end; + register_info_type *reg_info; +{ + int mcnt; + /* Point to after the args to the start_memory. */ + unsigned char *p1 = *p + 2; + + while (p1 < end) + { + /* Skip over opcodes that can match nothing, and return true or + false, as appropriate, when we get to one that can't, or to the + matching stop_memory. */ + + switch ((re_opcode_t) *p1) + { + /* Could be either a loop or a series of alternatives. */ + case on_failure_jump: + p1++; + EXTRACT_NUMBER_AND_INCR (mcnt, p1); + + /* If the next operation is not a jump backwards in the + pattern. */ + + if (mcnt >= 0) + { + /* Go through the on_failure_jumps of the alternatives, + seeing if any of the alternatives cannot match nothing. + The last alternative starts with only a jump, + whereas the rest start with on_failure_jump and end + with a jump, e.g., here is the pattern for `a|b|c': + + /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6 + /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3 + /exactn/1/c + + So, we have to first go through the first (n-1) + alternatives and then deal with the last one separately. */ + + + /* Deal with the first (n-1) alternatives, which start + with an on_failure_jump (see above) that jumps to right + past a jump_past_alt. */ + + while ((re_opcode_t) p1[mcnt-3] == jump_past_alt) + { + /* `mcnt' holds how many bytes long the alternative + is, including the ending `jump_past_alt' and + its number. */ + + if (!alt_match_null_string_p (p1, p1 + mcnt - 3, + reg_info)) + return false; + + /* Move to right after this alternative, including the + jump_past_alt. */ + p1 += mcnt; + + /* Break if it's the beginning of an n-th alternative + that doesn't begin with an on_failure_jump. */ + if ((re_opcode_t) *p1 != on_failure_jump) + break; + + /* Still have to check that it's not an n-th + alternative that starts with an on_failure_jump. */ + p1++; + EXTRACT_NUMBER_AND_INCR (mcnt, p1); + if ((re_opcode_t) p1[mcnt-3] != jump_past_alt) + { + /* Get to the beginning of the n-th alternative. */ + p1 -= 3; + break; + } + } + + /* Deal with the last alternative: go back and get number + of the `jump_past_alt' just before it. `mcnt' contains + the length of the alternative. */ + EXTRACT_NUMBER (mcnt, p1 - 2); + + if (!alt_match_null_string_p (p1, p1 + mcnt, reg_info)) + return false; + + p1 += mcnt; /* Get past the n-th alternative. */ + } /* if mcnt > 0 */ + break; + + + case stop_memory: + assert (p1[1] == **p); + *p = p1 + 2; + return true; + + + default: + if (!common_op_match_null_string_p (&p1, end, reg_info)) + return false; + } + } /* while p1 < end */ + + return false; +} /* group_match_null_string_p */ + + +/* Similar to group_match_null_string_p, but doesn't deal with alternatives: + It expects P to be the first byte of a single alternative and END one + byte past the last. The alternative can contain groups. */ + +static boolean +alt_match_null_string_p (p, end, reg_info) + unsigned char *p, *end; + register_info_type *reg_info; +{ + int mcnt; + unsigned char *p1 = p; + + while (p1 < end) + { + /* Skip over opcodes that can match nothing, and break when we get + to one that can't. */ + + switch ((re_opcode_t) *p1) + { + /* It's a loop. */ + case on_failure_jump: + p1++; + EXTRACT_NUMBER_AND_INCR (mcnt, p1); + p1 += mcnt; + break; + + default: + if (!common_op_match_null_string_p (&p1, end, reg_info)) + return false; + } + } /* while p1 < end */ + + return true; +} /* alt_match_null_string_p */ + + +/* Deals with the ops common to group_match_null_string_p and + alt_match_null_string_p. + + Sets P to one after the op and its arguments, if any. */ + +static boolean +common_op_match_null_string_p (p, end, reg_info) + unsigned char **p, *end; + register_info_type *reg_info; +{ + int mcnt; + boolean ret; + int reg_no; + unsigned char *p1 = *p; + + switch ((re_opcode_t) *p1++) + { + case no_op: + case begline: + case endline: + case begbuf: + case endbuf: + case wordbeg: + case wordend: + case wordbound: + case notwordbound: +#ifdef emacs + case before_dot: + case at_dot: + case after_dot: +#endif + break; + + case start_memory: + reg_no = *p1; + assert (reg_no > 0 && reg_no <= MAX_REGNUM); + ret = group_match_null_string_p (&p1, end, reg_info); + + /* Have to set this here in case we're checking a group which + contains a group and a back reference to it. */ + + if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE) + REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret; + + if (!ret) + return false; + break; + + /* If this is an optimized succeed_n for zero times, make the jump. */ + case jump: + EXTRACT_NUMBER_AND_INCR (mcnt, p1); + if (mcnt >= 0) + p1 += mcnt; + else + return false; + break; + + case succeed_n: + /* Get to the number of times to succeed. */ + p1 += 2; + EXTRACT_NUMBER_AND_INCR (mcnt, p1); + + if (mcnt == 0) + { + p1 -= 4; + EXTRACT_NUMBER_AND_INCR (mcnt, p1); + p1 += mcnt; + } + else + return false; + break; + + case duplicate: + if (!REG_MATCH_NULL_STRING_P (reg_info[*p1])) + return false; + break; + + case set_number_at: + p1 += 4; + + default: + /* All other opcodes mean we cannot match the empty string. */ + return false; + } + + *p = p1; + return true; +} /* common_op_match_null_string_p */ + + +/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN + bytes; nonzero otherwise. */ + +static int +bcmp_translate (s1, s2, len, translate) + const char *s1, *s2; + register int len; + RE_TRANSLATE_TYPE translate; +{ + register const unsigned char *p1 = (const unsigned char *) s1; + register const unsigned char *p2 = (const unsigned char *) s2; + while (len) + { + if (translate[*p1++] != translate[*p2++]) return 1; + len--; + } + return 0; +} + +/* Entry points for GNU code. */ + +/* re_compile_pattern is the GNU regular expression compiler: it + compiles PATTERN (of length SIZE) and puts the result in BUFP. + Returns 0 if the pattern was valid, otherwise an error string. + + Assumes the `allocated' (and perhaps `buffer') and `translate' fields + are set in BUFP on entry. + + We call regex_compile to do the actual compilation. */ + +const char * +re_compile_pattern (pattern, length, bufp) + const char *pattern; + size_t length; + struct re_pattern_buffer *bufp; +{ + reg_errcode_t ret; + + /* GNU code is written to assume at least RE_NREGS registers will be set + (and at least one extra will be -1). */ + bufp->regs_allocated = REGS_UNALLOCATED; + + /* And GNU code determines whether or not to get register information + by passing null for the REGS argument to re_match, etc., not by + setting no_sub. */ + bufp->no_sub = 0; + + /* Match anchors at newline. */ + bufp->newline_anchor = 1; + + ret = regex_compile (pattern, length, re_syntax_options, bufp); + + if (!ret) + return NULL; + return gettext (re_error_msgid[(int) ret]); +} + +/* Entry points compatible with 4.2 BSD regex library. We don't define + them unless specifically requested. */ + +#if defined (_REGEX_RE_COMP) || defined (_LIBC) + +/* BSD has one and only one pattern buffer. */ +static struct re_pattern_buffer re_comp_buf; + +char * +#ifdef _LIBC +/* Make these definitions weak in libc, so POSIX programs can redefine + these names if they don't use our functions, and still use + regcomp/regexec below without link errors. */ +weak_function +#endif +re_comp (s) + const char *s; +{ + reg_errcode_t ret; + + if (!s) + { + if (!re_comp_buf.buffer) + return gettext ("No previous regular expression"); + return 0; + } + + if (!re_comp_buf.buffer) + { + re_comp_buf.buffer = (unsigned char *) malloc (200); + if (re_comp_buf.buffer == NULL) + return gettext (re_error_msgid[(int) REG_ESPACE]); + re_comp_buf.allocated = 200; + + re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH); + if (re_comp_buf.fastmap == NULL) + return gettext (re_error_msgid[(int) REG_ESPACE]); + } + + /* Since `re_exec' always passes NULL for the `regs' argument, we + don't need to initialize the pattern buffer fields which affect it. */ + + /* Match anchors at newlines. */ + re_comp_buf.newline_anchor = 1; + + ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf); + + if (!ret) + return NULL; + + /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ + return (char *) gettext (re_error_msgid[(int) ret]); +} + + +int +#ifdef _LIBC +weak_function +#endif +re_exec (s) + const char *s; +{ + const int len = strlen (s); + return + 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); +} + +#endif /* _REGEX_RE_COMP */ + +/* POSIX.2 functions. Don't define these for Emacs. */ + +#ifndef emacs + +/* regcomp takes a regular expression as a string and compiles it. + + PREG is a regex_t *. We do not expect any fields to be initialized, + since POSIX says we shouldn't. Thus, we set + + `buffer' to the compiled pattern; + `used' to the length of the compiled pattern; + `syntax' to RE_SYNTAX_POSIX_EXTENDED if the + REG_EXTENDED bit in CFLAGS is set; otherwise, to + RE_SYNTAX_POSIX_BASIC; + `newline_anchor' to REG_NEWLINE being set in CFLAGS; + `fastmap' and `fastmap_accurate' to zero; + `re_nsub' to the number of subexpressions in PATTERN. + + PATTERN is the address of the pattern string. + + CFLAGS is a series of bits which affect compilation. + + If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we + use POSIX basic syntax. + + If REG_NEWLINE is set, then . and [^...] don't match newline. + Also, regexec will try a match beginning after every newline. + + If REG_ICASE is set, then we considers upper- and lowercase + versions of letters to be equivalent when matching. + + If REG_NOSUB is set, then when PREG is passed to regexec, that + routine will report only success or failure, and nothing about the + registers. + + It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for + the return codes and their meanings.) */ + +int +regcomp (preg, pattern, cflags) + regex_t *preg; + const char *pattern; + int cflags; +{ + reg_errcode_t ret; + reg_syntax_t syntax + = (cflags & REG_EXTENDED) ? + RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC; + + /* regex_compile will allocate the space for the compiled pattern. */ + preg->buffer = 0; + preg->allocated = 0; + preg->used = 0; + + /* Don't bother to use a fastmap when searching. This simplifies the + REG_NEWLINE case: if we used a fastmap, we'd have to put all the + characters after newlines into the fastmap. This way, we just try + every character. */ + preg->fastmap = 0; + + if (cflags & REG_ICASE) + { + unsigned i; + + preg->translate + = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE + * sizeof (*(RE_TRANSLATE_TYPE)0)); + if (preg->translate == NULL) + return (int) REG_ESPACE; + + /* Map uppercase characters to corresponding lowercase ones. */ + for (i = 0; i < CHAR_SET_SIZE; i++) + preg->translate[i] = ISUPPER (i) ? tolower (i) : i; + } + else + preg->translate = NULL; + + /* If REG_NEWLINE is set, newlines are treated differently. */ + if (cflags & REG_NEWLINE) + { /* REG_NEWLINE implies neither . nor [^...] match newline. */ + syntax &= ~RE_DOT_NEWLINE; + syntax |= RE_HAT_LISTS_NOT_NEWLINE; + /* It also changes the matching behavior. */ + preg->newline_anchor = 1; + } + else + preg->newline_anchor = 0; + + preg->no_sub = !!(cflags & REG_NOSUB); + + /* POSIX says a null character in the pattern terminates it, so we + can use strlen here in compiling the pattern. */ + ret = regex_compile (pattern, strlen (pattern), syntax, preg); + + /* POSIX doesn't distinguish between an unmatched open-group and an + unmatched close-group: both are REG_EPAREN. */ + if (ret == REG_ERPAREN) ret = REG_EPAREN; + + return (int) ret; +} + + +/* regexec searches for a given pattern, specified by PREG, in the + string STRING. + + If NMATCH is zero or REG_NOSUB was set in the cflags argument to + `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at + least NMATCH elements, and we set them to the offsets of the + corresponding matched substrings. + + EFLAGS specifies `execution flags' which affect matching: if + REG_NOTBOL is set, then ^ does not match at the beginning of the + string; if REG_NOTEOL is set, then $ does not match at the end. + + We return 0 if we find a match and REG_NOMATCH if not. */ + +int +regexec (preg, string, nmatch, pmatch, eflags) + const regex_t *preg; + const char *string; + size_t nmatch; + regmatch_t pmatch[]; + int eflags; +{ + int ret; + struct re_registers regs; + regex_t private_preg; + int len = strlen (string); + boolean want_reg_info = !preg->no_sub && nmatch > 0; + + private_preg = *preg; + + private_preg.not_bol = !!(eflags & REG_NOTBOL); + private_preg.not_eol = !!(eflags & REG_NOTEOL); + + /* The user has told us exactly how many registers to return + information about, via `nmatch'. We have to pass that on to the + matching routines. */ + private_preg.regs_allocated = REGS_FIXED; + + if (want_reg_info) + { + regs.num_regs = nmatch; + regs.start = TALLOC (nmatch, regoff_t); + regs.end = TALLOC (nmatch, regoff_t); + if (regs.start == NULL || regs.end == NULL) + return (int) REG_NOMATCH; + } + + /* Perform the searching operation. */ + ret = re_search (&private_preg, string, len, + /* start: */ 0, /* range: */ len, + want_reg_info ? ®s : (struct re_registers *) 0); + + /* Copy the register information to the POSIX structure. */ + if (want_reg_info) + { + if (ret >= 0) + { + unsigned r; + + for (r = 0; r < nmatch; r++) + { + pmatch[r].rm_so = regs.start[r]; + pmatch[r].rm_eo = regs.end[r]; + } + } + + /* If we needed the temporary register info, free the space now. */ + free (regs.start); + free (regs.end); + } + + /* We want zero return to mean success, unlike `re_search'. */ + return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH; +} + + +/* Returns a message corresponding to an error code, ERRCODE, returned + from either regcomp or regexec. We don't use PREG here. */ + +size_t +regerror (int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) +{ + const char *msg; + size_t msg_size; + + if (errcode < 0 + || errcode >= (int) (sizeof (re_error_msgid) + / sizeof (re_error_msgid[0]))) + /* Only error codes returned by the rest of the code should be passed + to this routine. If we are given anything else, or if other regex + code generates an invalid error code, then the program has a bug. + Dump core so we can fix it. */ + abort (); + + msg = gettext (re_error_msgid[errcode]); + + msg_size = strlen (msg) + 1; /* Includes the null. */ + + if (errbuf_size != 0) + { + if (msg_size > errbuf_size) + { + strncpy (errbuf, msg, errbuf_size - 1); + errbuf[errbuf_size - 1] = 0; + } + else + strcpy (errbuf, msg); + } + + return msg_size; +} + + +/* Free dynamically allocated space used by PREG. */ + +void +regfree (preg) + regex_t *preg; +{ + if (preg->buffer != NULL) + free (preg->buffer); + preg->buffer = NULL; + + preg->allocated = 0; + preg->used = 0; + + if (preg->fastmap != NULL) + free (preg->fastmap); + preg->fastmap = NULL; + preg->fastmap_accurate = 0; + + if (preg->translate != NULL) + free (preg->translate); + preg->translate = NULL; +} + +#endif /* not emacs */ diff --git a/src/utilfuns/roman.cpp b/src/utilfuns/roman.cpp new file mode 100644 index 0000000..85f361d --- /dev/null +++ b/src/utilfuns/roman.cpp @@ -0,0 +1,87 @@ +/* + * roman.c + * Copyright 2001 by CrossWire Bible Society + * + * 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. + * + */ + +#include +#include +#include + +SWORD_NAMESPACE_START + +char isroman (const char* str) { + char * ch = (char*)str; + for (; *ch; ch++) + if (!strchr("IVXLCDMivxlcdm ", *ch)) + return 0; + return 1; +} + +int from_rom(const char* str) { + int i, n = strlen(str); + short * num= (short *) calloc(n, sizeof(short)); + for (i = 0; str[i]; i++) { + switch(str[i]) { + case 'i': + case 'I': + num[i] = 1; + break; + case 'v': + case 'V': + num[i] = 5; + break; + case 'x': + case 'X': + num[i] = 10; + break; + case 'l': + case 'L': + num[i] = 50; + break; + case 'c': + case 'C': + num[i] = 100; + break; + case 'd': + case 'D': + num[i] = 500; + break; + case 'm': + case 'M': + num[i] = 1000; + break; + default: + num[i] = 0; + } + } + for (i = 1; str[i]; i++) { + if (num[i] > num[i-1]) { + num[i] -= num[i-1]; + num[i-1] = 0; + } + } + n = 0; + for (i = 0; str[i]; i++) { + n += num[i]; + } + free(num); + return n; +} + +SWORD_NAMESPACE_END diff --git a/src/utilfuns/sub.c b/src/utilfuns/sub.c new file mode 100644 index 0000000..fcea6e2 --- /dev/null +++ b/src/utilfuns/sub.c @@ -0,0 +1,36 @@ + +#include +#include + +main(int argc, char **argv) +{ + FILE *fp; + char *buf; + int size; + + if ((argc < 3) || (argc > 4)) { + fprintf(stderr, "usage: %s [filename]\n", *argv); + exit(-1); + } + + if (argc > 3) + fp = fopen(argv[3], "r"); + else fp = stdin; + + size = strlen(argv[1]); + buf = (char *)calloc(size + 1, 1); + + while ((buf[size - 1] = fgetc(fp)) != EOF) { + if (!strcmp(buf, argv[1])) { + printf("\n%s", argv[2]); + memset(buf, 0, size); + continue; + } + if (*buf) { + printf("%c", *buf); + } + memmove(buf, &buf[1], size); + } + buf[size - 1] = 0; + printf("%s", buf); +} diff --git a/src/utilfuns/swbuf.cpp b/src/utilfuns/swbuf.cpp new file mode 100644 index 0000000..430a705 --- /dev/null +++ b/src/utilfuns/swbuf.cpp @@ -0,0 +1,167 @@ +/****************************************************************************** +* swbuf.cpp - code for SWBuf used as a transport and utility for data buffers +* +* $Id: swbuf.cpp 2169 2008-05-18 02:50:53Z scribe $ +* +* Copyright 2003 CrossWire Bible Society (http://www.crosswire.org) +* CrossWire Bible Society +* P. O. Box 2528 +* Tempe, AZ 85280-2528 +* +* 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 version 2. +* +* 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. +* +*/ + +#include + +#include +#include +#include + +SWORD_NAMESPACE_START + +char *SWBuf::nullStr = (char *)""; +char SWBuf::junkBuf[JUNKBUFSIZE]; + +/****************************************************************************** +* SWBuf Constructor - Creates an empty SWBuf object or an SWBuf initialized +* to a value from a const char * +* +*/ +SWBuf::SWBuf(const char *initVal, unsigned long initSize) { + init(initSize); + if (initVal) + set(initVal); +} + +/****************************************************************************** +* SWBuf Constructor - Creates an SWBuf initialized +* to a value from another SWBuf +* +*/ +SWBuf::SWBuf(const SWBuf &other, unsigned long initSize) { + init(initSize); + set(other); +} + +/****************************************************************************** +* SWBuf Constructor - Creates an SWBuf initialized +* to a value from a char +* +*/ +SWBuf::SWBuf(char initVal, unsigned long initSize) { + init(initSize+1); + *buf = initVal; + end = buf+1; + *end = 0; +} + +/* +SWBuf::SWBuf(unsigned long initSize) { + init(initSize); + set((const char *)0); +} +*/ + + +/****************************************************************************** +* SWBuf::setFormatted - sets this buf to a formatted string +* WARNING: This function can only write at most +* JUNKBUFSIZE to the string per call. +*/ +void SWBuf::setFormatted(const char *format, ...) { + va_list argptr; + + va_start(argptr, format); +#ifdef NO_VSNPRINTF + int len = vsprintf(junkBuf, format, argptr)+1; +#else + int len = vsnprintf(0, 0, format, argptr)+1; +#endif + va_end(argptr); + assureSize(len); + va_start(argptr, format); + end = vsprintf(buf, format, argptr) + buf; + va_end(argptr); +} + +/****************************************************************************** +* SWBuf::append - appends a value to the current value of this SWBuf +* +*/ +void SWBuf::append(const char *str, long max) { +// if (!str) //A null string was passed +// return; + if (max < 0) + max = strlen(str); + assureMore(max+1); + for (;((max)&&(*str));max--) + *end++ = *str++; + *end = 0; +} + +/****************************************************************************** +* SWBuf::setSize - Size this buffer to a specific length +*/ +void SWBuf::setSize(unsigned long len) { + assureSize(len+1); + if ((unsigned)(end - buf) < len) + memset(end, fillByte, len - (end-buf)); + end = buf + len; + *end = 0; +} + +/****************************************************************************** +* SWBuf::appendFormatted - appends formatted strings to the current value of this SWBuf +* WARNING: This function can only write at most +* JUNKBUFSIZE to the string per call. +*/ +void SWBuf::appendFormatted(const char *format, ...) { + va_list argptr; + + va_start(argptr, format); +#ifdef NO_VSNPRINTF + int len = vsprintf(junkBuf, format, argptr)+1; +#else + int len = vsnprintf(0, 0, format, argptr)+1; +#endif + va_end(argptr); + assureMore(len); + va_start(argptr, format); + end += vsprintf(end, format, argptr); + va_end(argptr); +} + +void SWBuf::insert(unsigned long pos, const char* str, unsigned long start, signed long max) { +// if (!str) //A null string was passed +// return; + + str += start; + int len = (max > -1) ? max : strlen(str); + + if (!len || (pos > length())) //nothing to do, return + return; + + // pos==length(), so we can call append in this case + if (pos == length()) { //append is more efficient + append(str, max); + return; + } + + assureMore( len ); + + memmove(buf + pos + len, buf + pos, (end - buf) - pos); //make a gap of "len" bytes + memcpy(buf+pos, str, len); + + end += len; + *end = 0; +} + +SWORD_NAMESPACE_END diff --git a/src/utilfuns/swobject.cpp b/src/utilfuns/swobject.cpp new file mode 100644 index 0000000..227911b --- /dev/null +++ b/src/utilfuns/swobject.cpp @@ -0,0 +1,46 @@ +/****************************************************************************** +* swobject.cpp - code for SWObject used as lowest base class for many +* SWORD objects +* +* $Id: swobject.cpp 1785 2005-04-30 19:11:12Z scribe $ +* +* Copyright 2005 CrossWire Bible Society (http://www.crosswire.org) +* CrossWire Bible Society +* P. O. Box 2528 +* Tempe, AZ 85280-2528 +* +* 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 version 2. +* +* 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. +* +*/ + +#include + +// hack. remove this when we figure out our link error +#ifndef __CYGWIN__ +#include +#else +#include +#endif + +SWORD_NAMESPACE_START + +bool SWClass::isAssignableFrom(const char *className) const { + for (int i = 0; descends[i]; i++) { +#ifndef __CYGWIN__ + if (!sword::stricmp(descends[i], className)) +#else + if (!stricmp(descends[i], className)) +#endif + return true; + } + return false; +} + +SWORD_NAMESPACE_END diff --git a/src/utilfuns/swunicod.cpp b/src/utilfuns/swunicod.cpp new file mode 100644 index 0000000..4b338eb --- /dev/null +++ b/src/utilfuns/swunicod.cpp @@ -0,0 +1,138 @@ +/* + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include "swunicod.h" +SWORD_NAMESPACE_START +unsigned char* UTF32to8 (unsigned long utf32, unsigned char * utf8) { + unsigned int i; + for (i = 0; i < 6; i++) utf8[i] = 0; + + if (utf32 < 0x80) { + utf8[0] = (char)utf32; + } + else if (utf32 < 0x800) { + i = utf32 & 0x3f; + utf8[1] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x1f; + utf8[0] = 0xc0 | i; + } + else if (utf32 < 0x10000) { + i = utf32 & 0x3f; + utf8[2] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[1] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x0f; + utf8[0] = 0xe0 | i; + } + else if (utf32 < 0x200000) { + i = utf32 & 0x3f; + utf8[3] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[2] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[1] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x07; + utf8[0] = 0xf0 | i; + } + else if (utf32 < 0x4000000) { + i = utf32 & 0x3f; + utf8[4] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[3] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[2] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[1] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x03; + utf8[0] = 0xf8 | i; + } + else if (utf32 < 0x80000000) { + i = utf32 & 0x3f; + utf8[5] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[4] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[3] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[2] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x3f; + utf8[1] = 0x80 | i; + utf32 >>= 6; + + i = utf32 & 0x01; + utf8[0] = 0xfc | i; + } + return utf8; +} + +unsigned long UTF8to32 (unsigned char * utf8) { + + unsigned char i = utf8[0]; + unsigned char count; + unsigned long utf32 = 0; + + for (count = 0; i & 0x80; count++) i <<= 1; + if (!count) { + return utf8[0]; + } + else if (count == 1) { + return 0xffff; + } + else { + count--; + utf32 = i >> count; + for (i = 1; i <= count; i++) { + if ((0xc0 & utf8[i]) != 0x80) { + return 0xffff; + } + utf32 <<= 6; + utf32 |= (utf8[i] & 0x3f); + } + } + return utf32; +} + +SWORD_NAMESPACE_END diff --git a/src/utilfuns/swversion.cpp b/src/utilfuns/swversion.cpp new file mode 100644 index 0000000..9e61f06 --- /dev/null +++ b/src/utilfuns/swversion.cpp @@ -0,0 +1,83 @@ +#include + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +SWVersion SWVersion::currentVersion( VERSION ); + +/****************************************************************************** + * SWVersion c-tor - Constructs a new SWVersion + * + * ENT: version - const version string + */ + +SWVersion::SWVersion(const char *version) { + char *buf = new char[ strlen(version) + 1 ]; + char *tok; + major = minor = minor2 = minor3 = -1; + + strcpy(buf, version); + tok = strtok(buf, "."); + if (tok) + major = atoi(tok); + tok = strtok(0, "."); + if (tok) + minor = atoi(tok); + tok = strtok(0, "."); + if (tok) + minor2 = atoi(tok); + tok = strtok(0, "."); + if (tok) + minor3 = atoi(tok); + delete [] buf; +} + + +/****************************************************************************** + * compare - compares this version to another version + * + * ENT: vi - other version with which to compare + * + * RET: = 0 if equal; + * < 0 if this version is less than other version; + * > 0 if this version is greater than other version + */ + +int SWVersion::compare(const SWVersion &vi) const { + if (major == vi.major) + if (minor == vi.minor) + if (minor2 == vi.minor2) + if (minor3 == vi.minor3) + return 0; + else return minor3 - vi.minor3; + else return minor2 - vi.minor2; + else return minor - vi.minor; + else return major - vi.major; +} + + +const char *SWVersion::getText() const { + + // 255 is safe because there is no way 4 integers (plus 3 '.'s) can have + // a string representation that will overrun this buffer + static char buf[255]; + + if (minor > -1) { + if (minor2 > -1) { + if (minor3 > -1) { + sprintf(buf, "%d.%d.%d.%d", major, minor, minor2, minor3); + } + else sprintf(buf, "%d.%d.%d", major, minor, minor2); + } + else sprintf(buf, "%d.%d", major, minor); + } + else sprintf(buf, "%d", major); + + return buf; +} + +SWORD_NAMESPACE_END diff --git a/src/utilfuns/url.cpp b/src/utilfuns/url.cpp new file mode 100644 index 0000000..3a50e2c --- /dev/null +++ b/src/utilfuns/url.cpp @@ -0,0 +1,269 @@ +/****************************************************************************** +* url.cpp - code for an URL parser utility class +* +* $Id: url.cpp 2013 2006-11-25 22:01:04Z dglassey $ +* +* Copyright 2003 CrossWire Bible Society (http://www.crosswire.org) +* CrossWire Bible Society +* P. O. Box 2528 +* Tempe, AZ 85280-2528 +* +* 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 version 2. +* +* 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. +* +*/ + +//Sword includes +#include +#include + +//system includes +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +/** + * Constructors/Destructors + */ +URL::URL(const char* url) + : url(""), + protocol(""), + hostname(""), + path("") +{ + if (url && strlen(url)) { + this->url = url; + parse(); + } +} + +const char* URL::getProtocol() const { + return protocol.c_str(); +} + +const char* URL::getHostName () const { + return hostname.c_str(); +} + +const char* URL::getPath() const { + return path.c_str(); +} + +const URL::ParameterMap &URL::getParameters() const { + return parameterMap; +} + +/** + * Returns the value of an URL parameter. For the URL "http://www.crosswire.org/index.jsp?page=test&user=nobody" the value of the parameter "page" would be "test". + * If the parameter is not set an empty string is returned. + */ +const char* URL::getParameterValue(const char* name) const { + static SWBuf emptyStr(""); + + ParameterMap::const_iterator it = parameterMap.find(name); + static SWBuf retVal; + + if (it != parameterMap.end()) + retVal = it->second.c_str(); + else + retVal = emptyStr.c_str(); + + return retVal.c_str(); +} + + +/** Parse the URL. + * Parse the URL into the protocol, the hostname, the path and the paramters with their values + * + */ +void URL::parse () { + /* format example protocol://hostname/path/path/path.pl?param1=value1&param2=value2 + * we include the script name in the path, so the path would be /path/path/path.pl in this example + * & could also be & + */ + + //1. Init + const char* urlPtr = url.c_str(); + + protocol = ""; + hostname = ""; + path = ""; + parameterMap.clear(); + + // 2. Get the protocol, which is from the begining to the first :// + const char* end = strchr( urlPtr, ':' ); + if (end) { //protocol was found + protocol.append(urlPtr, end-urlPtr); + urlPtr = end + 1; + + //find the end of the protocol separator (e.g. "://") + for (; (*urlPtr == ':') || (*urlPtr == '/'); urlPtr++); + } + + //3.Get the hostname part. This is the part from pos up to the first slash + bool checkPath = true; + bool checkParams = true; + bool checkAnchor = true; + + end = strchr(urlPtr, '/'); + if (!end) { + checkPath = false; + end = strchr(urlPtr, '?'); + } + if (!end) { + checkParams = false; + end = strchr(urlPtr, '#'); + } + if (!end) { + checkAnchor = false; + end = urlPtr+strlen(urlPtr); + } + + hostname.append(urlPtr, end-urlPtr); + + urlPtr = end + ((*end)? 1 : 0); + + if (checkPath) { + end = strchr(urlPtr, '?'); + if (!end) { + checkParams = false; + end = strchr(urlPtr, '#'); + } + if (!end) { + checkAnchor = false; + end = urlPtr+strlen(urlPtr); + } + + path.append(urlPtr, end-urlPtr); + + urlPtr = end + ((*end)? 1 : 0); + } + + if (checkParams) { + //5. Fill the map with the parameters and their values + SWBuf paramName; + SWBuf paramValue; + +/* + end = strchr(urlPtr, '#'); + if (!end) { + checkAnchor = false; + end = urlPtr+strlen(urlPtr); + } +*/ + //end = (start && strchr(start, '?')) ? strchr(start, '?')+1 :0; + end = urlPtr; + while (end) { + paramName = ""; + paramValue = ""; + + //search for the equal sign to find the value part + const char* valueStart = strchr(end, '='); + if (valueStart) { + const char* valueEnd = strstr(valueStart, "&") ? strstr(valueStart, "&") : strstr(valueStart, "&"); //try to find a new paramter part + + if (valueEnd) { + paramName.append(end, valueStart-end); + paramValue.append(valueStart+1, valueEnd-(valueStart+1)); + } + else { //this is the last paramter of the URL + paramName.append(end, valueStart-end); + paramValue.append(valueStart+1); + } + + if (paramName.length() && paramValue.length()) {//insert the param into the map if it's valid + paramName = decode(paramName.c_str()); + paramValue = decode(paramValue.c_str()); + + parameterMap[ paramName ] = paramValue; + } + } + else { + break; //no valid parameter in the url + } + + const char *start = end+1; + end = strstr(start, "&") ? strstr(start, "&")+5 : (strstr(start, "&") ? strstr(start, "&")+1 : 0); //try to find a new paramter part + } + } +} + +const SWBuf URL::encode(const char *urlText) { + /*static*/ SWBuf url; + url = urlText; + + typedef std::map< unsigned char, SWBuf > DataMap; + DataMap m; + for (unsigned short int c = 32; c <= 255; ++c) { //first set all encoding chars + if ( (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || strchr("-_.!~*'()", c)) { + continue; //we don't need an encoding for this char + } + + SWBuf buf; + buf.setFormatted("%%%-.2X", c); + m[c] = buf; + } + //the special encodings for certain chars + m[' '] = '+'; + + SWBuf buf; + const int length = url.length(); + for (int i = 0; i < length; i++) { //fill "buf" + const char& c = url[i]; + buf.append( ((m[c].length()) ? m[c] : SWBuf(c)) ); + } + + url = buf; + return url; +} + +const SWBuf URL::decode(const char *encoded) { + /*static*/ SWBuf text; + text = encoded; + + SWBuf decoded; + const int length = text.length(); + int i = 0; + + while (i < length) { + char a = text[i]; + + if ( a == '+' ) { //handle special cases + decoded.append(' '); + } + else if ( (a == '%') && (i+2 < length)) { //decode the %ab hex encoded char + const char b = toupper( text[i+1] ); + const char c = toupper( text[i+2] ); + + if (isxdigit(b) && isxdigit(c)) { //valid %ab part + unsigned int dec = 16 * ((b >= 'A' && b <= 'F') ? (b - 'A' + 10) : (b - '0')); //dec value of the most left digit (b) + dec += (c >= 'A' && c <= 'F') ? (c - 'A' + 10) : (c - '0'); //dec value of the right digit (c) + + decoded.append((char)dec); //append the decoded char + + i += 2; //we jump over the %ab part; we have to leave out three, but the while loop adds one, too + } + } + else { //just append the char + decoded.append(a); + } + + i++; + } + + if (decoded.length()) { + text = decoded; + } + return text; +} + +SWORD_NAMESPACE_END diff --git a/src/utilfuns/utilstr.cpp b/src/utilfuns/utilstr.cpp new file mode 100644 index 0000000..52dc286 --- /dev/null +++ b/src/utilfuns/utilstr.cpp @@ -0,0 +1,241 @@ +#include +#include +#include + +#include + + +#ifdef _ICU_ +#include +#include +#include +#include + +#include +#include + +#endif + +SWORD_NAMESPACE_START + +const unsigned char SW_toupper_array[256] = + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xf7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xff + }; + + + +/****************************************************************************** + * stdstr - clones a string + * + * ENT: ipstr - pointer to a string pointer to set if necessary + * istr - string to set to *ipstr + * 0 - only get + * + * RET: *ipstr + */ + +char *stdstr(char **ipstr, const char *istr, unsigned int memPadFactor) { + if (istr) { + if (*ipstr) + delete [] *ipstr; + int len = strlen(istr) + 1; + *ipstr = new char [ len * memPadFactor ]; + memcpy(*ipstr, istr, len); + } + return *ipstr; +} + + +/****************************************************************************** + * strstrip - Removes leading and trailing spaces from a string + * + * ENT: istr - string pointer to strip + * + * RET: *istr + */ + +char *strstrip(char *istr) { + char *tmp = istr; + char *rtmp; + + int len = strlen(istr); + if (len < 1) + return istr; + rtmp = istr + (len - 1); + + while ((rtmp > istr)&&((*rtmp == ' ')||(*rtmp == '\t')||(*rtmp == 10)||(*rtmp == 13))) *(rtmp--) = 0; + while ((*tmp == ' ')||(*tmp == '\t')||(*tmp == 10)||(*tmp == 13)) tmp++; + memmove(istr, tmp, (rtmp - tmp) + 1); + istr[(rtmp - tmp) + 1] = 0; + + return istr; +} + + +/****************************************************************************** + * stristr - Scans a string for the occurrence of a given substring, no case + * + * ENT: scans s1 for the first occurrence of the substring s2, ingnoring case + * + * RET: a pointer to the element in s1, where s2 begins (points to s2 in s1). + * If s2 does not occur in s1, returns null. + */ + +const char *stristr(const char *s1, const char *s2) { + int tLen = strlen(s2); + int cLen = strlen(s1); + char *target = new char [ tLen + 1 ]; + int i, j; + const char *retVal = 0; + + strcpy(target, s2); + for (i = 0; i < tLen; i++) + target[i] = SW_toupper(target[i]); + + for (i = 0; i < (cLen - tLen)+1; i++) { + if (SW_toupper(s1[i]) == (unsigned char)*target) { + for (j = 1; j < tLen; j++) { + if (SW_toupper(s1[i+j]) != (unsigned char)target[j]) + break; + } + if (j == tLen) { + retVal = s1+i; + break; + } + } + } + delete [] target; + return retVal; +} + +/****************************************************************************** + * strnicmp - compares the first n bytes of 2 strings ignoring case + * + * ENT: compares s1 to s2 comparing the first n byte ingnoring case + * + * RET: same as strcmp + */ + +int strnicmp(const char *s1, const char *s2, int len) { + int tLen = strlen(s2); + int cLen = strlen(s1); + char diff; + int i; + for (i = 0; ((i < len) && (i < tLen) && (i < cLen)); i++) { + if ((diff = SW_toupper(*s1) - SW_toupper(*s2))) + return diff; + s1++; + s2++; + } + return (i < len) ? cLen - tLen : 0; +} + +int stricmp(const char *s1, const char *s2) { +#if defined(__GNUC__) + return ::strcasecmp(s1, s2); +#else + #if defined(_WIN32_WCE) + return ::_stricmp(s1, s2); + #else + return ::stricmp(s1, s2); + #endif +#endif +} + +/****************************************************************************** + * toupperstr - converts a string to uppercase string + * + * ENT: target - string to convert + * + * RET: target + */ + +// char *toupperstr(char *buf) { +// char *ret = buf; +// +// /*if (StringHelper::getSystemStringHelper()) { +// StringHelper::getSystemStringHelper()->upperStringLatin1( ret ); +// } +// else*/ { +// while (*buf) { +// *buf++ = SW_toupper(*buf); +// } +// // } +// return ret; +// } + + +/****************************************************************************** + * toupperstr - converts a string to uppercase string + * + * ENT: target - string to convert + * + * RET: target + */ + +// char *toupperstr_utf8(char *buf, unsigned int max) { +// char *ret = buf; +// +// /* if (StringHelper::getSystemStringHelper()) { +// StringHelper::getSystemStringHelper()->upperStringUtf8( ret ); +// return ret; +// }*/ +// +// #ifndef _ICU_ +// // try to decide if it's worth trying to toupper. Do we have more +// // characters that are probably lower latin than not? +// long performOp = 0; +// for (const char *ch = buf; *ch; ch++) +// performOp += (*ch > 0) ? 1 : -1; +// +// if (performOp > 0) { +// while (*buf) +// *buf = SW_toupper(*buf++); +// } +// #else +// if (!max) +// max = strlen(ret); +// UErrorCode err = U_ZERO_ERROR; +// UConverter *conv = ucnv_open("UTF-8", &err); +// UnicodeString str(buf, -1, conv, err); +// UnicodeString ustr = str.toUpper(); +// ustr.extract(ret, max, conv, err); +// ucnv_close(conv); +// #endif +// +// return ret; +// } + +SWORD_NAMESPACE_END diff --git a/src/utilfuns/utilxml.cpp b/src/utilfuns/utilxml.cpp new file mode 100644 index 0000000..9184102 --- /dev/null +++ b/src/utilfuns/utilxml.cpp @@ -0,0 +1,296 @@ +/****************************************************************************** + * utilxml.cpp - implementaion of utility classes to handle XML processing + * + * $Id: utilxml.cpp 2096 2007-10-07 00:40:00Z scribe $ + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include +#include + +SWORD_NAMESPACE_START + +const char *XMLTag::nullstr = ""; +void XMLTag::parse() const { + int i; + int start; + char *name = 0; + char *value = 0; + attributes.clear(); + + if (!buf) + return; + for (i = 0; ((buf[i]) && (!isalpha(buf[i]))); i++); + for (; buf[i]; i++) { + if (strchr("\t\r\n ", buf[i])) { + // Convert newlines, carriage returns and tabs to spaces + buf[i] = ' '; + + for (; ((buf[i]) && (!isalpha(buf[i]))); i++); + if (buf[i]) { // we have an attribute name + start = i; + // Deprecated: check for following whitespacee + // Should be: for (; (buf[i] && buf[i] != '='; i++); + for (; ((buf[i]) && (!strchr(" =", buf[i]))); i++); + + if (i-start) { + if (name) + delete [] name; + name = new char [ (i-start) + 1 ]; + strncpy(name, buf+start, i-start); + name[i-start] = 0; + } + + // The following does not allow for empty attributes + //for (; ((buf[i]) && (strchr(" =\"\'", buf[i]))); i++); + + // skip space preceding the = sign + // Deprecated: this is not part of the xml spec + for (; buf[i] == ' '; i++) ; + + // skip the = sign + if (buf[i]) + i++; + + // skip space following the = sign + // Deprecated: this is not part of the xml spec + for (; buf[i] == ' '; i++) ; + + // remember and skip the quote sign + char quoteChar = buf[i]; + if (quoteChar) + i++; + + if (buf[i]) { // we have attribute value + start = i; + // Skip until matching quote character + for (; ((buf[i]) && (buf[i] != quoteChar)); i++); + + // Allow for empty quotes + //if (i-start) { + if (value) + delete [] value; + value = new char [ (i-start) + 1 ]; + if (i-start) { + strncpy(value, buf+start, i-start); + } + value[i-start] = 0; + attributes[name] = value; + //} + } + } + } + + // if there are no more characters left then quit + if (!buf[i]) + break; + + } + for (;i;i--) { + if (buf[i] == '/') + empty = true; + if (!strchr(" \t\r\n>\t", buf[i])) + break; + } + + parsed = true; + if (name) delete [] name; + if (value) delete [] value; +} + + +XMLTag::XMLTag(const char *tagString) { + + name = 0; + buf = 0; + setText(tagString); +} + +void XMLTag::setText(const char *tagString) { + parsed = false; + empty = false; + endTag = false; + + if (buf) { + delete [] buf; + buf = 0; + } + + if (!tagString) // assert tagString before proceeding + return; + + stdstr(&buf, tagString); + + int start = 0; + int i; + + // skip beginning silliness + for (i = 0; ((tagString[i]) && (!isalpha(tagString[i]))); i++) { + if (tagString[i] == '/') + endTag = true; + } + start = i; + for (; ((tagString[i]) && (!strchr("\t\r\n />", tagString[i]))); i++); + if (i-start) { + if (name) + delete [] name; + name = new char [ (i-start) + 1 ]; + strncpy(name, tagString+start, i-start); + name[i-start] = 0; + if (tagString[i] == '/') + empty = true; + } +} + +XMLTag::~XMLTag() { + if (buf) + delete [] buf; + if (name) + delete [] name; +} + +const StringList XMLTag::getAttributeNames() const { + StringList retVal; + + if (!parsed) + parse(); + + for (StringPairMap::const_iterator it = attributes.begin(); it != attributes.end(); it++) + retVal.push_back(it->first.c_str()); + + return retVal; +} + + +const char *XMLTag::getPart(const char *buf, int partNum, char partSplit) const { + for (; (buf && partNum); partNum--) { + buf = strchr(buf, partSplit); + if (buf) + buf++; + } + if (buf) { + const char *end = strchr(buf, partSplit); + junkBuf = buf; + if (end) + junkBuf.setSize(end - buf); + return junkBuf.c_str(); + } + return 0; +} + + +int XMLTag::getAttributePartCount(const char *attribName, char partSplit) const { + int count; + const char *buf = getAttribute(attribName); + for (count = 0; buf; count++) { + buf = strchr(buf, partSplit); + if (buf) + buf++; + } + return count; +} + + +const char *XMLTag::getAttribute(const char *attribName, int partNum, char partSplit) const { + + if (!parsed) + parse(); + + StringPairMap::const_iterator it = attributes.find(attribName); + + const char *retVal = 0; + if (it != attributes.end()) + retVal = it->second.c_str(); + + if ((retVal) && (partNum > -1)) + retVal = getPart(retVal, partNum, partSplit); + + return retVal; +} + + +const char *XMLTag::setAttribute(const char *attribName, const char *attribValue, int partNum, char partSplit) { + if (!parsed) + parse(); + + SWBuf newVal = ""; + // set part of an attribute + if (partNum > -1) { + const char *wholeAttr = getAttribute(attribName); + int attrCount = getAttributePartCount(attribName, partSplit); + for (int i = 0; i < attrCount; i++) { + if (i == partNum) { + if (attribValue) { + newVal += attribValue; + newVal += partSplit; + } + else { + // discard this part per null attribValue + } + } + else { + newVal += getPart(wholeAttr, i, partSplit); + newVal += partSplit; + } + } + if (newVal.length()) newVal--; // discard the last partSplit + attribValue = (!attribValue && !newVal.length()) ? 0 : newVal.c_str(); + } + + // perform the actual set + if (attribValue) + attributes[attribName] = attribValue; + else attributes.erase(attribName); + + return attribValue; +} + +const char *XMLTag::toString() const { + SWBuf tag = "<"; + if (!parsed) + parse(); + + if (isEndTag()) + tag.append('/'); + + tag.append(getName()); + for (StringPairMap::iterator it = attributes.begin(); it != attributes.end(); it++) { + //tag.appendFormatted(" %s=\"%s\"", it->first.c_str(), it->second.c_str()); + tag.append(' '); + tag.append(it->first.c_str()); + tag.append((strchr(it->second.c_str(), '\"')) ? "=\'" : "=\""); + tag.append(it->second.c_str()); + tag.append((strchr(it->second.c_str(), '\"'))? '\'' : '\"'); + } + + if (isEmpty()) + tag.append('/'); + + tag.append('>'); + + + if (buf) + delete [] buf; + buf = new char [ tag.length() + 1 ]; + strcpy(buf, tag.c_str()); + + return buf; +} + + +SWORD_NAMESPACE_END diff --git a/src/utilfuns/win32/dirent.cpp b/src/utilfuns/win32/dirent.cpp new file mode 100644 index 0000000..150bf10 --- /dev/null +++ b/src/utilfuns/win32/dirent.cpp @@ -0,0 +1,131 @@ +/* + + Implementation of POSIX directory browsing functions and types for Win32. + + Kevlin Henney (mailto:kevlin@acm.org), March 1997. + + Copyright Kevlin Henney, 1997. All rights reserved. + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose is hereby granted without fee, provided + that this copyright and permissions notice appear in all copies and + derivatives, and that no charge may be made for the software and its + documentation except to cover cost of distribution. + + This software is supplied "as is" without express or implied warranty. + + But that said, if there are any problems please get in touch. + +*/ + +#include +#include +#include +#include +#include + +struct DIR +{ + long handle; /* -1 for failed rewind */ + struct _finddata_t info; + struct dirent result; /* d_name null iff first time */ + char *name; /* NTBS */ +}; + +DIR *opendir(const char *name) +{ + DIR *dir = 0; + + if(name && name[0]) + { + size_t base_length = strlen(name); + const char *all = /* the root directory is a special case... */ + strchr("/\\", name[base_length - 1]) ? "*" : "/*"; + + if((dir = (DIR *) malloc(sizeof *dir)) != 0 && + (dir->name = (char *) malloc(base_length + strlen(all) + 1)) != 0) + { + strcat(strcpy(dir->name, name), all); + + if((dir->handle = _findfirst(dir->name, &dir->info)) != -1) + { + dir->result.d_name = 0; + } + else /* rollback */ + { + free(dir->name); + free(dir); + dir = 0; + } + } + else /* rollback */ + { + free(dir); + dir = 0; + errno = ENOMEM; + } + } + else + { + errno = EINVAL; + } + + return dir; +} + +int closedir(DIR *dir) +{ + int result = -1; + + if(dir) + { + if(dir->handle != -1) + { + result = _findclose(dir->handle); + } + + free(dir->name); + free(dir); + } + + if(result == -1) /* map all errors to EBADF */ + { + errno = EBADF; + } + + return result; +} + +struct dirent *readdir(DIR *dir) +{ + struct dirent *result = 0; + + if(dir && dir->handle != -1) + { + if(!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1) + { + result = &dir->result; + result->d_name = dir->info.name; + } + } + else + { + errno = EBADF; + } + + return result; +} + +void rewinddir(DIR *dir) +{ + if(dir && dir->handle != -1) + { + _findclose(dir->handle); + dir->handle = _findfirst(dir->name, &dir->info); + dir->result.d_name = 0; + } + else + { + errno = EBADF; + } +} diff --git a/src/utilfuns/win32/dirent.h b/src/utilfuns/win32/dirent.h new file mode 100644 index 0000000..ba22833 --- /dev/null +++ b/src/utilfuns/win32/dirent.h @@ -0,0 +1,32 @@ +/* + + Declaration of POSIX directory browsing functions and types for Win32. + + Kevlin Henney (mailto:kevlin@acm.org), March 1997. + + Copyright Kevlin Henney, 1997. All rights reserved. + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose is hereby granted without fee, provided + that this copyright and permissions notice appear in all copies and + derivatives, and that no charge may be made for the software and its + documentation except to cover cost of distribution. + +*/ + +#ifndef DIRENT_INCLUDED +#define DIRENT_INCLUDED + +typedef struct DIR DIR; + +struct dirent +{ + char *d_name; +}; + +DIR *opendir(const char *); +int closedir(DIR *); +struct dirent *readdir(DIR *); +void rewinddir(DIR *); + +#endif diff --git a/src/utilfuns/zlib/adler32.c b/src/utilfuns/zlib/adler32.c new file mode 100644 index 0000000..c786e9a --- /dev/null +++ b/src/utilfuns/zlib/adler32.c @@ -0,0 +1,48 @@ +/* adler32.c -- compute the Adler-32 checksum of a data stream + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: adler32.c 1688 2005-01-01 04:42:26Z scribe $ */ + +#include "zlib.h" + +#define BASE 65521L /* largest prime smaller than 65536 */ +#define NMAX 5552 +/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ + +#define DO1(buf,i) {s1 += buf[i]; s2 += s1;} +#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); +#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); +#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); +#define DO16(buf) DO8(buf,0); DO8(buf,8); + +/* ========================================================================= */ +uLong ZEXPORT adler32(adler, buf, len) + uLong adler; + const Bytef *buf; + uInt len; +{ + unsigned long s1 = adler & 0xffff; + unsigned long s2 = (adler >> 16) & 0xffff; + int k; + + if (buf == Z_NULL) return 1L; + + while (len > 0) { + k = len < NMAX ? len : NMAX; + len -= k; + while (k >= 16) { + DO16(buf); + buf += 16; + k -= 16; + } + if (k != 0) do { + s1 += *buf++; + s2 += s1; + } while (--k); + s1 %= BASE; + s2 %= BASE; + } + return (s2 << 16) | s1; +} diff --git a/src/utilfuns/zlib/compress.c b/src/utilfuns/zlib/compress.c new file mode 100644 index 0000000..2b1f048 --- /dev/null +++ b/src/utilfuns/zlib/compress.c @@ -0,0 +1,68 @@ +/* compress.c -- compress a memory buffer + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: compress.c 1688 2005-01-01 04:42:26Z scribe $ */ + +#include "zlib.h" + +/* =========================================================================== + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least 0.1% larger than sourceLen plus + 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ +int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; + int level; +{ + z_stream stream; + int err; + + stream.next_in = (Bytef*)source; + stream.avail_in = (uInt)sourceLen; +#ifdef MAXSEG_64K + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; +#endif + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + stream.opaque = (voidpf)0; + + err = deflateInit(&stream, level); + if (err != Z_OK) return err; + + err = deflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + deflateEnd(&stream); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *destLen = stream.total_out; + + err = deflateEnd(&stream); + return err; +} + +/* =========================================================================== + */ +int ZEXPORT compress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); +} diff --git a/src/utilfuns/zlib/crc32.c b/src/utilfuns/zlib/crc32.c new file mode 100644 index 0000000..e44440c --- /dev/null +++ b/src/utilfuns/zlib/crc32.c @@ -0,0 +1,162 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: crc32.c 1688 2005-01-01 04:42:26Z scribe $ */ + +#include "zlib.h" + +#define local static + +#ifdef DYNAMIC_CRC_TABLE + +local int crc_table_empty = 1; +local uLongf crc_table[256]; +local void make_crc_table OF((void)); + +/* + Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + The table is simply the CRC of all possible eight bit values. This is all + the information needed to generate CRC's on data a byte at a time for all + combinations of CRC register values and incoming bytes. +*/ +local void make_crc_table() +{ + uLong c; + int n, k; + uLong poly; /* polynomial exclusive-or pattern */ + /* terms of polynomial defining this crc (except x^32): */ + static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + + /* make exclusive-or pattern from polynomial (0xedb88320L) */ + poly = 0L; + for (n = 0; n < sizeof(p)/sizeof(Byte); n++) + poly |= 1L << (31 - p[n]); + + for (n = 0; n < 256; n++) + { + c = (uLong)n; + for (k = 0; k < 8; k++) + c = c & 1 ? poly ^ (c >> 1) : c >> 1; + crc_table[n] = c; + } + crc_table_empty = 0; +} +#else +/* ======================================================================== + * Table of CRC-32's of all single-byte values (made by make_crc_table) + */ +local const uLongf crc_table[256] = { + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL +}; +#endif + +/* ========================================================================= + * This function can be used by asm versions of crc32() + */ +const uLongf * ZEXPORT get_crc_table() +{ +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) make_crc_table(); +#endif + return (const uLongf *)crc_table; +} + +/* ========================================================================= */ +#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8); +#define DO2(buf) DO1(buf); DO1(buf); +#define DO4(buf) DO2(buf); DO2(buf); +#define DO8(buf) DO4(buf); DO4(buf); + +/* ========================================================================= */ +uLong ZEXPORT crc32(crc, buf, len) + uLong crc; + const Bytef *buf; + uInt len; +{ + if (buf == Z_NULL) return 0L; +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) + make_crc_table(); +#endif + crc = crc ^ 0xffffffffL; + while (len >= 8) + { + DO8(buf); + len -= 8; + } + if (len) do { + DO1(buf); + } while (--len); + return crc ^ 0xffffffffL; +} diff --git a/src/utilfuns/zlib/deflate.c b/src/utilfuns/zlib/deflate.c new file mode 100644 index 0000000..43ea588 --- /dev/null +++ b/src/utilfuns/zlib/deflate.c @@ -0,0 +1,1350 @@ +/* deflate.c -- compress data using the deflation algorithm + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process depends on being able to identify portions + * of the input text which are identical to earlier input (within a + * sliding window trailing behind the input currently being processed). + * + * The most straightforward technique turns out to be the fastest for + * most input files: try all possible matches and select the longest. + * The key feature of this algorithm is that insertions into the string + * dictionary are very simple and thus fast, and deletions are avoided + * completely. Insertions are performed at each input character, whereas + * string matches are performed only when the previous match ends. So it + * is preferable to spend more time in matches to allow very fast string + * insertions and avoid deletions. The matching algorithm for small + * strings is inspired from that of Rabin & Karp. A brute force approach + * is used to find longer strings when a small match has been found. + * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze + * (by Leonid Broukhis). + * A previous version of this file used a more sophisticated algorithm + * (by Fiala and Greene) which is guaranteed to run in linear amortized + * time, but has a larger average cost, uses more memory and is patented. + * However the F&G algorithm may be faster for some highly redundant + * files if the parameter max_chain_length (described below) is too large. + * + * ACKNOWLEDGEMENTS + * + * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and + * I found it in 'freeze' written by Leonid Broukhis. + * Thanks to many people for bug reports and testing. + * + * REFERENCES + * + * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". + * Available in ftp://ds.internic.net/rfc/rfc1951.txt + * + * A description of the Rabin and Karp algorithm is given in the book + * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. + * + * Fiala,E.R., and Greene,D.H. + * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 + * + */ + +/* @(#) $Id: deflate.c 1688 2005-01-01 04:42:26Z scribe $ */ + +#include "deflate.h" + +const char deflate_copyright[] = + " deflate 1.1.4 Copyright 1995-2002 Jean-loup Gailly "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* =========================================================================== + * Function prototypes. + */ +typedef enum { + need_more, /* block not completed, need more input or more output */ + block_done, /* block flush performed */ + finish_started, /* finish started, need only more output at next deflate */ + finish_done /* finish done, accept no more input or output */ +} block_state; + +typedef block_state (*compress_func) OF((deflate_state *s, int flush)); +/* Compression function. Returns the block state after the call. */ + +local void fill_window OF((deflate_state *s)); +local block_state deflate_stored OF((deflate_state *s, int flush)); +local block_state deflate_fast OF((deflate_state *s, int flush)); +local block_state deflate_slow OF((deflate_state *s, int flush)); +local void lm_init OF((deflate_state *s)); +local void putShortMSB OF((deflate_state *s, uInt b)); +local void flush_pending OF((z_streamp strm)); +local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); +#ifdef ASMV + void match_init OF((void)); /* asm code initialization */ + uInt longest_match OF((deflate_state *s, IPos cur_match)); +#else +local uInt longest_match OF((deflate_state *s, IPos cur_match)); +#endif + +#ifdef DEBUG +local void check_match OF((deflate_state *s, IPos start, IPos match, + int length)); +#endif + +/* =========================================================================== + * Local data + */ + +#define NIL 0 +/* Tail of hash chains */ + +#ifndef TOO_FAR +# define TOO_FAR 4096 +#endif +/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +typedef struct config_s { + ush good_length; /* reduce lazy search above this match length */ + ush max_lazy; /* do not perform lazy search above this match length */ + ush nice_length; /* quit search above this match length */ + ush max_chain; + compress_func func; +} config; + +local const config configuration_table[10] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ +/* 1 */ {4, 4, 8, 4, deflate_fast}, /* maximum speed, no lazy matches */ +/* 2 */ {4, 5, 16, 8, deflate_fast}, +/* 3 */ {4, 6, 32, 32, deflate_fast}, + +/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ +/* 5 */ {8, 16, 32, 32, deflate_slow}, +/* 6 */ {8, 16, 128, 128, deflate_slow}, +/* 7 */ {8, 32, 128, 256, deflate_slow}, +/* 8 */ {32, 128, 258, 1024, deflate_slow}, +/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* maximum compression */ + +/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 + * For deflate_fast() (levels <= 3) good is ignored and lazy has a different + * meaning. + */ + +#define EQUAL 0 +/* result of memcmp for equal strings */ + +struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ + +/* =========================================================================== + * Update a hash value with the given input byte + * IN assertion: all calls to to UPDATE_HASH are made with consecutive + * input characters, so that a running hash key can be computed from the + * previous key instead of complete recalculation each time. + */ +#define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) + + +/* =========================================================================== + * Insert string str in the dictionary and set match_head to the previous head + * of the hash chain (the most recent string with same hash key). Return + * the previous length of the hash chain. + * If this file is compiled with -DFASTEST, the compression level is forced + * to 1, and no hash chains are maintained. + * IN assertion: all calls to to INSERT_STRING are made with consecutive + * input characters and the first MIN_MATCH bytes of str are valid + * (except for the last MIN_MATCH-1 bytes of the input file). + */ +#ifdef FASTEST +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + match_head = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#else +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#endif + +/* =========================================================================== + * Initialize the hash table (avoiding 64K overflow for 16 bit systems). + * prev[] will be initialized on the fly. + */ +#define CLEAR_HASH(s) \ + s->head[s->hash_size-1] = NIL; \ + zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); + +/* ========================================================================= */ +int ZEXPORT deflateInit_(strm, level, version, stream_size) + z_streamp strm; + int level; + const char *version; + int stream_size; +{ + return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, + Z_DEFAULT_STRATEGY, version, stream_size); + /* To do: ignore strm->next_in if we use it as window */ +} + +/* ========================================================================= */ +int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + version, stream_size) + z_streamp strm; + int level; + int method; + int windowBits; + int memLevel; + int strategy; + const char *version; + int stream_size; +{ + deflate_state *s; + int noheader = 0; + static const char* my_version = ZLIB_VERSION; + + ushf *overlay; + /* We overlay pending_buf and d_buf+l_buf. This works since the average + * output size for (length,distance) codes is <= 24 bits. + */ + + if (version == Z_NULL || version[0] != my_version[0] || + stream_size != sizeof(z_stream)) { + return Z_VERSION_ERROR; + } + if (strm == Z_NULL) return Z_STREAM_ERROR; + + strm->msg = Z_NULL; + if (strm->zalloc == Z_NULL) { + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + } + if (strm->zfree == Z_NULL) strm->zfree = zcfree; + + if (level == Z_DEFAULT_COMPRESSION) level = 6; +#ifdef FASTEST + level = 1; +#endif + + if (windowBits < 0) { /* undocumented feature: suppress zlib header */ + noheader = 1; + windowBits = -windowBits; + } + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || + windowBits < 9 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_HUFFMAN_ONLY) { + return Z_STREAM_ERROR; + } + s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); + if (s == Z_NULL) return Z_MEM_ERROR; + strm->state = (struct internal_state FAR *)s; + s->strm = strm; + + s->noheader = noheader; + s->w_bits = windowBits; + s->w_size = 1 << s->w_bits; + s->w_mask = s->w_size - 1; + + s->hash_bits = memLevel + 7; + s->hash_size = 1 << s->hash_bits; + s->hash_mask = s->hash_size - 1; + s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); + + s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); + s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); + s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); + + s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + s->pending_buf = (uchf *) overlay; + s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); + + if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || + s->pending_buf == Z_NULL) { + strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); + deflateEnd (strm); + return Z_MEM_ERROR; + } + s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + + s->level = level; + s->strategy = strategy; + s->method = (Byte)method; + + return deflateReset(strm); +} + +/* ========================================================================= */ +int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) + z_streamp strm; + const Bytef *dictionary; + uInt dictLength; +{ + deflate_state *s; + uInt length = dictLength; + uInt n; + IPos hash_head = 0; + + if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL || + strm->state->status != INIT_STATE) return Z_STREAM_ERROR; + + s = strm->state; + strm->adler = adler32(strm->adler, dictionary, dictLength); + + if (length < MIN_MATCH) return Z_OK; + if (length > MAX_DIST(s)) { + length = MAX_DIST(s); +#ifndef USE_DICT_HEAD + dictionary += dictLength - length; /* use the tail of the dictionary */ +#endif + } + zmemcpy(s->window, dictionary, length); + s->strstart = length; + s->block_start = (long)length; + + /* Insert all strings in the hash table (except for the last two bytes). + * s->lookahead stays null, so s->ins_h will be recomputed at the next + * call of fill_window. + */ + s->ins_h = s->window[0]; + UPDATE_HASH(s, s->ins_h, s->window[1]); + for (n = 0; n <= length - MIN_MATCH; n++) { + INSERT_STRING(s, n, hash_head); + } + if (hash_head) hash_head = 0; /* to make compiler happy */ + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateReset (strm) + z_streamp strm; +{ + deflate_state *s; + + if (strm == Z_NULL || strm->state == Z_NULL || + strm->zalloc == Z_NULL || strm->zfree == Z_NULL) return Z_STREAM_ERROR; + + strm->total_in = strm->total_out = 0; + strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ + strm->data_type = Z_UNKNOWN; + + s = (deflate_state *)strm->state; + s->pending = 0; + s->pending_out = s->pending_buf; + + if (s->noheader < 0) { + s->noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */ + } + s->status = s->noheader ? BUSY_STATE : INIT_STATE; + strm->adler = 1; + s->last_flush = Z_NO_FLUSH; + + _tr_init(s); + lm_init(s); + + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateParams(strm, level, strategy) + z_streamp strm; + int level; + int strategy; +{ + deflate_state *s; + compress_func func; + int err = Z_OK; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + s = strm->state; + + if (level == Z_DEFAULT_COMPRESSION) { + level = 6; + } + if (level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) { + return Z_STREAM_ERROR; + } + func = configuration_table[s->level].func; + + if (func != configuration_table[level].func && strm->total_in != 0) { + /* Flush the last buffer: */ + err = deflate(strm, Z_PARTIAL_FLUSH); + } + if (s->level != level) { + s->level = level; + s->max_lazy_match = configuration_table[level].max_lazy; + s->good_match = configuration_table[level].good_length; + s->nice_match = configuration_table[level].nice_length; + s->max_chain_length = configuration_table[level].max_chain; + } + s->strategy = strategy; + return err; +} + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +local void putShortMSB (s, b) + deflate_state *s; + uInt b; +{ + put_byte(s, (Byte)(b >> 8)); + put_byte(s, (Byte)(b & 0xff)); +} + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->next_out buffer and copying into it. + * (See also read_buf()). + */ +local void flush_pending(strm) + z_streamp strm; +{ + unsigned len = strm->state->pending; + + if (len > strm->avail_out) len = strm->avail_out; + if (len == 0) return; + + zmemcpy(strm->next_out, strm->state->pending_out, len); + strm->next_out += len; + strm->state->pending_out += len; + strm->total_out += len; + strm->avail_out -= len; + strm->state->pending -= len; + if (strm->state->pending == 0) { + strm->state->pending_out = strm->state->pending_buf; + } +} + +/* ========================================================================= */ +int ZEXPORT deflate (strm, flush) + z_streamp strm; + int flush; +{ + int old_flush; /* value of flush param for previous deflate call */ + deflate_state *s; + + if (strm == Z_NULL || strm->state == Z_NULL || + flush > Z_FINISH || flush < 0) { + return Z_STREAM_ERROR; + } + s = strm->state; + + if (strm->next_out == Z_NULL || + (strm->next_in == Z_NULL && strm->avail_in != 0) || + (s->status == FINISH_STATE && flush != Z_FINISH)) { + ERR_RETURN(strm, Z_STREAM_ERROR); + } + if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); + + s->strm = strm; /* just in case */ + old_flush = s->last_flush; + s->last_flush = flush; + + /* Write the zlib header */ + if (s->status == INIT_STATE) { + + uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; + uInt level_flags = (s->level-1) >> 1; + + if (level_flags > 3) level_flags = 3; + header |= (level_flags << 6); + if (s->strstart != 0) header |= PRESET_DICT; + header += 31 - (header % 31); + + s->status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s->strstart != 0) { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + strm->adler = 1L; + } + + /* Flush as much pending output as possible */ + if (s->pending != 0) { + flush_pending(strm); + if (strm->avail_out == 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s->last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUFF_ERROR. + */ + } else if (strm->avail_in == 0 && flush <= old_flush && + flush != Z_FINISH) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s->status == FINISH_STATE && strm->avail_in != 0) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm->avail_in != 0 || s->lookahead != 0 || + (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { + block_state bstate; + + bstate = (*(configuration_table[s->level].func))(s, flush); + + if (bstate == finish_started || bstate == finish_done) { + s->status = FINISH_STATE; + } + if (bstate == need_more || bstate == finish_started) { + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate == block_done) { + if (flush == Z_PARTIAL_FLUSH) { + _tr_align(s); + } else { /* FULL_FLUSH or SYNC_FLUSH */ + _tr_stored_block(s, (char*)0, 0L, 0); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush == Z_FULL_FLUSH) { + CLEAR_HASH(s); /* forget history */ + } + } + flush_pending(strm); + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + Assert(strm->avail_out > 0, "bug2"); + + if (flush != Z_FINISH) return Z_OK; + if (s->noheader) return Z_STREAM_END; + + /* Write the zlib trailer (adler32) */ + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + s->noheader = -1; /* write the trailer only once! */ + return s->pending != 0 ? Z_OK : Z_STREAM_END; +} + +/* ========================================================================= */ +int ZEXPORT deflateEnd (strm) + z_streamp strm; +{ + int status; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + + status = strm->state->status; + if (status != INIT_STATE && status != BUSY_STATE && + status != FINISH_STATE) { + return Z_STREAM_ERROR; + } + + /* Deallocate in reverse order of allocations: */ + TRY_FREE(strm, strm->state->pending_buf); + TRY_FREE(strm, strm->state->head); + TRY_FREE(strm, strm->state->prev); + TRY_FREE(strm, strm->state->window); + + ZFREE(strm, strm->state); + strm->state = Z_NULL; + + return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; +} + +/* ========================================================================= + * Copy the source state to the destination state. + * To simplify the source, this is not supported for 16-bit MSDOS (which + * doesn't have enough memory anyway to duplicate compression states). + */ +int ZEXPORT deflateCopy (dest, source) + z_streamp dest; + z_streamp source; +{ +#ifdef MAXSEG_64K + return Z_STREAM_ERROR; +#else + deflate_state *ds; + deflate_state *ss; + ushf *overlay; + + + if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { + return Z_STREAM_ERROR; + } + + ss = source->state; + + *dest = *source; + + ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); + if (ds == Z_NULL) return Z_MEM_ERROR; + dest->state = (struct internal_state FAR *) ds; + *ds = *ss; + ds->strm = dest; + + ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); + ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); + ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); + overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); + ds->pending_buf = (uchf *) overlay; + + if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || + ds->pending_buf == Z_NULL) { + deflateEnd (dest); + return Z_MEM_ERROR; + } + /* following zmemcpy do not work for 16-bit MSDOS */ + zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); + zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos)); + zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos)); + zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); + + ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); + ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); + ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; + + ds->l_desc.dyn_tree = ds->dyn_ltree; + ds->d_desc.dyn_tree = ds->dyn_dtree; + ds->bl_desc.dyn_tree = ds->bl_tree; + + return Z_OK; +#endif +} + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->next_in buffer and copying from it. + * (See also flush_pending()). + */ +local int read_buf(strm, buf, size) + z_streamp strm; + Bytef *buf; + unsigned size; +{ + unsigned len = strm->avail_in; + + if (len > size) len = size; + if (len == 0) return 0; + + strm->avail_in -= len; + + if (!strm->state->noheader) { + strm->adler = adler32(strm->adler, strm->next_in, len); + } + zmemcpy(buf, strm->next_in, len); + strm->next_in += len; + strm->total_in += len; + + return (int)len; +} + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +local void lm_init (s) + deflate_state *s; +{ + s->window_size = (ulg)2L*s->w_size; + + CLEAR_HASH(s); + + /* Set the default configuration parameters: + */ + s->max_lazy_match = configuration_table[s->level].max_lazy; + s->good_match = configuration_table[s->level].good_length; + s->nice_match = configuration_table[s->level].nice_length; + s->max_chain_length = configuration_table[s->level].max_chain; + + s->strstart = 0; + s->block_start = 0L; + s->lookahead = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + s->ins_h = 0; +#ifdef ASMV + match_init(); /* initialize the asm code */ +#endif +} + +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +#ifndef ASMV +/* For 80x86 and 680x0, an optimized version will be provided in match.asm or + * match.S. The code will be functionally equivalent. + */ +#ifndef FASTEST +local uInt longest_match(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + unsigned chain_length = s->max_chain_length;/* max hash chain length */ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + int best_len = s->prev_length; /* best match length so far */ + int nice_match = s->nice_match; /* stop if match long enough */ + IPos limit = s->strstart > (IPos)MAX_DIST(s) ? + s->strstart - (IPos)MAX_DIST(s) : NIL; + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + Posf *prev = s->prev; + uInt wmask = s->w_mask; + +#ifdef UNALIGNED_OK + /* Compare two bytes at a time. Note: this is not always beneficial. + * Try with and without -DUNALIGNED_OK to check. + */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; + register ush scan_start = *(ushf*)scan; + register ush scan_end = *(ushf*)(scan+best_len-1); +#else + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + register Byte scan_end1 = scan[best_len-1]; + register Byte scan_end = scan[best_len]; +#endif + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s->prev_length >= s->good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + Assert(cur_match < s->strstart, "no future"); + match = s->window + cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2: + */ +#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) + /* This code assumes sizeof(unsigned short) == 2. Do not use + * UNALIGNED_OK if your compiler uses a different size. + */ + if (*(ushf*)(match+best_len-1) != scan_end || + *(ushf*)match != scan_start) continue; + + /* It is not necessary to compare scan[2] and match[2] since they are + * always equal when the other bytes match, given that the hash keys + * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at + * strstart+3, +5, ... up to strstart+257. We check for insufficient + * lookahead only every 4th comparison; the 128th check will be made + * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is + * necessary to put more guard bytes at the end of the window, or + * to check more often for insufficient lookahead. + */ + Assert(scan[2] == match[2], "scan[2]?"); + scan++, match++; + do { + } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + scan < strend); + /* The funny "do {}" generates better code on most compilers */ + + /* Here, scan <= window+strstart+257 */ + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + if (*scan == *match) scan++; + + len = (MAX_MATCH - 1) - (int)(strend-scan); + scan = strend - (MAX_MATCH-1); + +#else /* UNALIGNED_OK */ + + if (match[best_len] != scan_end || + match[best_len-1] != scan_end1 || + *match != *scan || + *++match != scan[1]) continue; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match++; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + scan = strend - MAX_MATCH; + +#endif /* UNALIGNED_OK */ + + if (len > best_len) { + s->match_start = cur_match; + best_len = len; + if (len >= nice_match) break; +#ifdef UNALIGNED_OK + scan_end = *(ushf*)(scan+best_len-1); +#else + scan_end1 = scan[best_len-1]; + scan_end = scan[best_len]; +#endif + } + } while ((cur_match = prev[cur_match & wmask]) > limit + && --chain_length != 0); + + if ((uInt)best_len <= s->lookahead) return (uInt)best_len; + return s->lookahead; +} + +#else /* FASTEST */ +/* --------------------------------------------------------------------------- + * Optimized version for level == 1 only + */ +local uInt longest_match(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + Assert(cur_match < s->strstart, "no future"); + + match = s->window + cur_match; + + /* Return failure if the match length is less than 2: + */ + if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match += 2; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + + if (len < MIN_MATCH) return MIN_MATCH - 1; + + s->match_start = cur_match; + return len <= s->lookahead ? len : s->lookahead; +} +#endif /* FASTEST */ +#endif /* ASMV */ + +#ifdef DEBUG +/* =========================================================================== + * Check that the match at match_start is indeed a match. + */ +local void check_match(s, start, match, length) + deflate_state *s; + IPos start, match; + int length; +{ + /* check that the match is indeed a match */ + if (zmemcmp(s->window + match, + s->window + start, length) != EQUAL) { + fprintf(stderr, " start %u, match %u, length %d\n", + start, match, length); + do { + fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); + } while (--length != 0); + z_error("invalid match"); + } + if (z_verbose > 1) { + fprintf(stderr,"\\[%d,%d]", start-match, length); + do { putc(s->window[start++], stderr); } while (--length != 0); + } +} +#else +# define check_match(s, start, match, length) +#endif + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +local void fill_window(s) + deflate_state *s; +{ + register unsigned n, m; + register Posf *p; + unsigned more; /* Amount of free space at the end of the window. */ + uInt wsize = s->w_size; + + do { + more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); + + /* Deal with !@#$% 64K limit: */ + if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + more = wsize; + + } else if (more == (unsigned)(-1)) { + /* Very unlikely, but possible on 16 bit machine if strstart == 0 + * and lookahead == 1 (input done one byte at time) + */ + more--; + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + } else if (s->strstart >= wsize+MAX_DIST(s)) { + + zmemcpy(s->window, s->window+wsize, (unsigned)wsize); + s->match_start -= wsize; + s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ + s->block_start -= (long) wsize; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + n = s->hash_size; + p = &s->head[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + } while (--n); + + n = wsize; +#ifndef FASTEST + p = &s->prev[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); +#endif + more += wsize; + } + if (s->strm->avail_in == 0) return; + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + Assert(more >= 2, "more < 2"); + + n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); + s->lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s->lookahead >= MIN_MATCH) { + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); +} + +/* =========================================================================== + * Flush the current block, with given end-of-file flag. + * IN assertion: strstart is set to the end of the current match. + */ +#define FLUSH_BLOCK_ONLY(s, eof) { \ + _tr_flush_block(s, (s->block_start >= 0L ? \ + (charf *)&s->window[(unsigned)s->block_start] : \ + (charf *)Z_NULL), \ + (ulg)((long)s->strstart - s->block_start), \ + (eof)); \ + s->block_start = s->strstart; \ + flush_pending(s->strm); \ + Tracev((stderr,"[FLUSH]")); \ +} + +/* Same but force premature exit if necessary. */ +#define FLUSH_BLOCK(s, eof) { \ + FLUSH_BLOCK_ONLY(s, eof); \ + if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \ +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +local block_state deflate_stored(s, flush) + deflate_state *s; + int flush; +{ + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + ulg max_block_size = 0xffff; + ulg max_start; + + if (max_block_size > s->pending_buf_size - 5) { + max_block_size = s->pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s->lookahead <= 1) { + + Assert(s->strstart < s->w_size+MAX_DIST(s) || + s->block_start >= (long)s->w_size, "slide too late"); + + fill_window(s); + if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; + + if (s->lookahead == 0) break; /* flush the current block */ + } + Assert(s->block_start >= 0L, "block gone"); + + s->strstart += s->lookahead; + s->lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + max_start = s->block_start + max_block_size; + if (s->strstart == 0 || (ulg)s->strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s->lookahead = (uInt)(s->strstart - max_start); + s->strstart = (uInt)max_start; + FLUSH_BLOCK(s, 0); + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { + FLUSH_BLOCK(s, 0); + } + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +local block_state deflate_fast(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head = NIL; /* head of the hash chain */ + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + if (s->strategy != Z_HUFFMAN_ONLY) { + s->match_length = longest_match (s, hash_head); + } + /* longest_match() sets match_start */ + } + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->match_start, s->match_length); + + _tr_tally_dist(s, s->strstart - s->match_start, + s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ +#ifndef FASTEST + if (s->match_length <= s->max_insert_length && + s->lookahead >= MIN_MATCH) { + s->match_length--; /* string at strstart already in hash table */ + do { + s->strstart++; + INSERT_STRING(s, s->strstart, hash_head); + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s->match_length != 0); + s->strstart++; + } else +#endif + { + s->strstart += s->match_length; + s->match_length = 0; + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +local block_state deflate_slow(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head = NIL; /* head of hash chain */ + int bflush; /* set if current block must be flushed */ + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + */ + s->prev_length = s->match_length, s->prev_match = s->match_start; + s->match_length = MIN_MATCH-1; + + if (hash_head != NIL && s->prev_length < s->max_lazy_match && + s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + if (s->strategy != Z_HUFFMAN_ONLY) { + s->match_length = longest_match (s, hash_head); + } + /* longest_match() sets match_start */ + + if (s->match_length <= 5 && (s->strategy == Z_FILTERED || + (s->match_length == MIN_MATCH && + s->strstart - s->match_start > TOO_FAR))) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s->match_length = MIN_MATCH-1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { + uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + check_match(s, s->strstart-1, s->prev_match, s->prev_length); + + _tr_tally_dist(s, s->strstart -1 - s->prev_match, + s->prev_length - MIN_MATCH, bflush); + + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s->lookahead -= s->prev_length-1; + s->prev_length -= 2; + do { + if (++s->strstart <= max_insert) { + INSERT_STRING(s, s->strstart, hash_head); + } + } while (--s->prev_length != 0); + s->match_available = 0; + s->match_length = MIN_MATCH-1; + s->strstart++; + + if (bflush) FLUSH_BLOCK(s, 0); + + } else if (s->match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + if (bflush) { + FLUSH_BLOCK_ONLY(s, 0); + } + s->strstart++; + s->lookahead--; + if (s->strm->avail_out == 0) return need_more; + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s->match_available = 1; + s->strstart++; + s->lookahead--; + } + } + Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s->match_available) { + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + s->match_available = 0; + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} diff --git a/src/utilfuns/zlib/deflate.h b/src/utilfuns/zlib/deflate.h new file mode 100644 index 0000000..965e0a3 --- /dev/null +++ b/src/utilfuns/zlib/deflate.h @@ -0,0 +1,318 @@ +/* deflate.h -- internal compression state + * Copyright (C) 1995-2002 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id: deflate.h 1688 2005-01-01 04:42:26Z scribe $ */ + +#ifndef _DEFLATE_H +#define _DEFLATE_H + +#include "zutil.h" + +/* =========================================================================== + * Internal compression state. + */ + +#define LENGTH_CODES 29 +/* number of length codes, not counting the special END_BLOCK code */ + +#define LITERALS 256 +/* number of literal bytes 0..255 */ + +#define L_CODES (LITERALS+1+LENGTH_CODES) +/* number of Literal or Length codes, including the END_BLOCK code */ + +#define D_CODES 30 +/* number of distance codes */ + +#define BL_CODES 19 +/* number of codes used to transfer the bit lengths */ + +#define HEAP_SIZE (2*L_CODES+1) +/* maximum heap size */ + +#define MAX_BITS 15 +/* All codes must not exceed MAX_BITS bits */ + +#define INIT_STATE 42 +#define BUSY_STATE 113 +#define FINISH_STATE 666 +/* Stream status */ + + +/* Data structure describing a single value and its code string. */ +typedef struct ct_data_s { + union { + ush freq; /* frequency count */ + ush code; /* bit string */ + } fc; + union { + ush dad; /* father node in Huffman tree */ + ush len; /* length of bit string */ + } dl; +} FAR ct_data; + +#define Freq fc.freq +#define Code fc.code +#define Dad dl.dad +#define Len dl.len + +typedef struct static_tree_desc_s static_tree_desc; + +typedef struct tree_desc_s { + ct_data *dyn_tree; /* the dynamic tree */ + int max_code; /* largest code with non zero frequency */ + static_tree_desc *stat_desc; /* the corresponding static tree */ +} FAR tree_desc; + +typedef ush Pos; +typedef Pos FAR Posf; +typedef unsigned IPos; + +/* A Pos is an index in the character window. We use short instead of int to + * save space in the various tables. IPos is used only for parameter passing. + */ + +typedef struct internal_state { + z_streamp strm; /* pointer back to this zlib stream */ + int status; /* as the name implies */ + Bytef *pending_buf; /* output still pending */ + ulg pending_buf_size; /* size of pending_buf */ + Bytef *pending_out; /* next pending byte to output to the stream */ + int pending; /* nb of bytes in the pending buffer */ + int noheader; /* suppress zlib header and adler32 */ + Byte data_type; /* UNKNOWN, BINARY or ASCII */ + Byte method; /* STORED (for zip only) or DEFLATED */ + int last_flush; /* value of flush param for previous deflate call */ + + /* used by deflate.c: */ + + uInt w_size; /* LZ77 window size (32K by default) */ + uInt w_bits; /* log2(w_size) (8..16) */ + uInt w_mask; /* w_size - 1 */ + + Bytef *window; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. Also, it limits + * the window size to 64K, which is quite useful on MSDOS. + * To do: use the user input buffer as sliding window. + */ + + ulg window_size; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + Posf *prev; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + Posf *head; /* Heads of the hash chains or NIL. */ + + uInt ins_h; /* hash index of string to be inserted */ + uInt hash_size; /* number of elements in hash table */ + uInt hash_bits; /* log2(hash_size) */ + uInt hash_mask; /* hash_size-1 */ + + uInt hash_shift; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + long block_start; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + uInt match_length; /* length of best match */ + IPos prev_match; /* previous match */ + int match_available; /* set if previous match exists */ + uInt strstart; /* start of string to insert */ + uInt match_start; /* start of matching string */ + uInt lookahead; /* number of valid bytes ahead in window */ + + uInt prev_length; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + uInt max_chain_length; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + uInt max_lazy_match; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ +# define max_insert_length max_lazy_match + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + int level; /* compression level (1..9) */ + int strategy; /* favor or force Huffman coding*/ + + uInt good_match; + /* Use a faster search when the previous match is longer than this */ + + int nice_match; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + /* Didn't use ct_data typedef below to supress compiler warning */ + struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + struct tree_desc_s l_desc; /* desc. for literal tree */ + struct tree_desc_s d_desc; /* desc. for distance tree */ + struct tree_desc_s bl_desc; /* desc. for bit length tree */ + + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + int heap_len; /* number of elements in the heap */ + int heap_max; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + uch depth[2*L_CODES+1]; + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + uchf *l_buf; /* buffer for literals or lengths */ + + uInt lit_bufsize; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + uInt last_lit; /* running index in l_buf */ + + ushf *d_buf; + /* Buffer for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + ulg opt_len; /* bit length of current block with optimal trees */ + ulg static_len; /* bit length of current block with static trees */ + uInt matches; /* number of string matches in current block */ + int last_eob_len; /* bit length of EOB code for last block */ + +#ifdef DEBUG + ulg compressed_len; /* total bit length of compressed file mod 2^32 */ + ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ +#endif + + ush bi_buf; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + int bi_valid; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + +} FAR deflate_state; + +/* Output a byte on the stream. + * IN assertion: there is enough room in pending_buf. + */ +#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} + + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) +/* In order to simplify the code, particularly on 16 bit machines, match + * distances are limited to MAX_DIST instead of WSIZE. + */ + + /* in trees.c */ +void _tr_init OF((deflate_state *s)); +int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); +void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, + int eof)); +void _tr_align OF((deflate_state *s)); +void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, + int eof)); + +#define d_code(dist) \ + ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) +/* Mapping from a distance to a distance code. dist is the distance - 1 and + * must not have side effects. _dist_code[256] and _dist_code[257] are never + * used. + */ + +#ifndef DEBUG +/* Inline versions of _tr_tally for speed: */ + +#if defined(GEN_TREES_H) || !defined(STDC) + extern uch _length_code[]; + extern uch _dist_code[]; +#else + extern const uch _length_code[]; + extern const uch _dist_code[]; +#endif + +# define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ + s->d_buf[s->last_lit] = 0; \ + s->l_buf[s->last_lit++] = cc; \ + s->dyn_ltree[cc].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +# define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (length); \ + ush dist = (distance); \ + s->d_buf[s->last_lit] = dist; \ + s->l_buf[s->last_lit++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +#else +# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) +# define _tr_tally_dist(s, distance, length, flush) \ + flush = _tr_tally(s, distance, length) +#endif + +#endif diff --git a/src/utilfuns/zlib/gzio.c b/src/utilfuns/zlib/gzio.c new file mode 100644 index 0000000..612c154 --- /dev/null +++ b/src/utilfuns/zlib/gzio.c @@ -0,0 +1,875 @@ +/* gzio.c -- IO on .gz files + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Compile this file with -DNO_DEFLATE to avoid the compression code. + */ + +/* @(#) $Id: gzio.c 1688 2005-01-01 04:42:26Z scribe $ */ + +#include + +#include "zutil.h" + +struct internal_state {int dummy;}; /* for buggy compilers */ + +#ifndef Z_BUFSIZE +# ifdef MAXSEG_64K +# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */ +# else +# define Z_BUFSIZE 16384 +# endif +#endif +#ifndef Z_PRINTF_BUFSIZE +# define Z_PRINTF_BUFSIZE 4096 +#endif + +#define ALLOC(size) malloc(size) +#define TRYFREE(p) {if (p) free(p);} + +static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define RESERVED 0xE0 /* bits 5..7: reserved */ + +typedef struct gz_stream { + z_stream stream; + int z_err; /* error code for last stream operation */ + int z_eof; /* set if end of input file */ + FILE *file; /* .gz file */ + Byte *inbuf; /* input buffer */ + Byte *outbuf; /* output buffer */ + uLong crc; /* crc32 of uncompressed data */ + char *msg; /* error message */ + char *path; /* path name for debugging only */ + int transparent; /* 1 if input file is not a .gz file */ + char mode; /* 'w' or 'r' */ + long startpos; /* start of compressed data in file (header skipped) */ +} gz_stream; + + +local gzFile gz_open OF((const char *path, const char *mode, int fd)); +local int do_flush OF((gzFile file, int flush)); +local int get_byte OF((gz_stream *s)); +local void check_header OF((gz_stream *s)); +local int destroy OF((gz_stream *s)); +local void putLong OF((FILE *file, uLong x)); +local uLong getLong OF((gz_stream *s)); + +/* =========================================================================== + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb"). The file is given either by file descriptor + or path name (if fd == -1). + gz_open return NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). +*/ +local gzFile gz_open (path, mode, fd) + const char *path; + const char *mode; + int fd; +{ + int err; + int level = Z_DEFAULT_COMPRESSION; /* compression level */ + int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */ + char *p = (char*)mode; + gz_stream *s; + char fmode[80]; /* copy of mode, without the compression level */ + char *m = fmode; + + if (!path || !mode) return Z_NULL; + + s = (gz_stream *)ALLOC(sizeof(gz_stream)); + if (!s) return Z_NULL; + + s->stream.zalloc = (alloc_func)0; + s->stream.zfree = (free_func)0; + s->stream.opaque = (voidpf)0; + s->stream.next_in = s->inbuf = Z_NULL; + s->stream.next_out = s->outbuf = Z_NULL; + s->stream.avail_in = s->stream.avail_out = 0; + s->file = NULL; + s->z_err = Z_OK; + s->z_eof = 0; + s->crc = crc32(0L, Z_NULL, 0); + s->msg = NULL; + s->transparent = 0; + + s->path = (char*)ALLOC(strlen(path)+1); + if (s->path == NULL) { + return destroy(s), (gzFile)Z_NULL; + } + strcpy(s->path, path); /* do this early for debugging */ + + s->mode = '\0'; + do { + if (*p == 'r') s->mode = 'r'; + if (*p == 'w' || *p == 'a') s->mode = 'w'; + if (*p >= '0' && *p <= '9') { + level = *p - '0'; + } else if (*p == 'f') { + strategy = Z_FILTERED; + } else if (*p == 'h') { + strategy = Z_HUFFMAN_ONLY; + } else { + *m++ = *p; /* copy the mode */ + } + } while (*p++ && m != fmode + sizeof(fmode)); + if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL; + + if (s->mode == 'w') { +#ifdef NO_DEFLATE + err = Z_STREAM_ERROR; +#else + err = deflateInit2(&(s->stream), level, + Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy); + /* windowBits is passed < 0 to suppress zlib header */ + + s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); +#endif + if (err != Z_OK || s->outbuf == Z_NULL) { + return destroy(s), (gzFile)Z_NULL; + } + } else { + s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); + + err = inflateInit2(&(s->stream), -MAX_WBITS); + /* windowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are + * present after the compressed stream. + */ + if (err != Z_OK || s->inbuf == Z_NULL) { + return destroy(s), (gzFile)Z_NULL; + } + } + s->stream.avail_out = Z_BUFSIZE; + + errno = 0; + s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode); + + if (s->file == NULL) { + return destroy(s), (gzFile)Z_NULL; + } + if (s->mode == 'w') { + /* Write a very simple .gz header: + */ + fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], + Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE); + s->startpos = 10L; + /* We use 10L instead of ftell(s->file) to because ftell causes an + * fflush on some systems. This version of the library doesn't use + * startpos anyway in write mode, so this initialization is not + * necessary. + */ + } else { + check_header(s); /* skip the .gz header */ + s->startpos = (ftell(s->file) - s->stream.avail_in); + } + + return (gzFile)s; +} + +/* =========================================================================== + Opens a gzip (.gz) file for reading or writing. +*/ +gzFile ZEXPORT gzopen (path, mode) + const char *path; + const char *mode; +{ + return gz_open (path, mode, -1); +} + +/* =========================================================================== + Associate a gzFile with the file descriptor fd. fd is not dup'ed here + to mimic the behavio(u)r of fdopen. +*/ +gzFile ZEXPORT gzdopen (fd, mode) + int fd; + const char *mode; +{ + char name[20]; + + if (fd < 0) return (gzFile)Z_NULL; + sprintf(name, "", fd); /* for debugging */ + + return gz_open (name, mode, fd); +} + +/* =========================================================================== + * Update the compression level and strategy + */ +int ZEXPORT gzsetparams (file, level, strategy) + gzFile file; + int level; + int strategy; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + /* Make room to allow flushing */ + if (s->stream.avail_out == 0) { + + s->stream.next_out = s->outbuf; + if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { + s->z_err = Z_ERRNO; + } + s->stream.avail_out = Z_BUFSIZE; + } + + return deflateParams (&(s->stream), level, strategy); +} + +/* =========================================================================== + Read a byte from a gz_stream; update next_in and avail_in. Return EOF + for end of file. + IN assertion: the stream s has been sucessfully opened for reading. +*/ +local int get_byte(s) + gz_stream *s; +{ + if (s->z_eof) return EOF; + if (s->stream.avail_in == 0) { + errno = 0; + s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file); + if (s->stream.avail_in == 0) { + s->z_eof = 1; + if (ferror(s->file)) s->z_err = Z_ERRNO; + return EOF; + } + s->stream.next_in = s->inbuf; + } + s->stream.avail_in--; + return *(s->stream.next_in)++; +} + +/* =========================================================================== + Check the gzip header of a gz_stream opened for reading. Set the stream + mode to transparent if the gzip magic header is not present; set s->err + to Z_DATA_ERROR if the magic header is present but the rest of the header + is incorrect. + IN assertion: the stream s has already been created sucessfully; + s->stream.avail_in is zero for the first time, but may be non-zero + for concatenated .gz files. +*/ +local void check_header(s) + gz_stream *s; +{ + int method; /* method byte */ + int flags; /* flags byte */ + uInt len; + int c; + + /* Check the gzip magic header */ + for (len = 0; len < 2; len++) { + c = get_byte(s); + if (c != gz_magic[len]) { + if (len != 0) s->stream.avail_in++, s->stream.next_in--; + if (c != EOF) { + s->stream.avail_in++, s->stream.next_in--; + s->transparent = 1; + } + s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END; + return; + } + } + method = get_byte(s); + flags = get_byte(s); + if (method != Z_DEFLATED || (flags & RESERVED) != 0) { + s->z_err = Z_DATA_ERROR; + return; + } + + /* Discard time, xflags and OS code: */ + for (len = 0; len < 6; len++) (void)get_byte(s); + + if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */ + len = (uInt)get_byte(s); + len += ((uInt)get_byte(s))<<8; + /* len is garbage if EOF but the loop below will quit anyway */ + while (len-- != 0 && get_byte(s) != EOF) ; + } + if ((flags & ORIG_NAME) != 0) { /* skip the original file name */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & COMMENT) != 0) { /* skip the .gz file comment */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & HEAD_CRC) != 0) { /* skip the header crc */ + for (len = 0; len < 2; len++) (void)get_byte(s); + } + s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK; +} + + /* =========================================================================== + * Cleanup then free the given gz_stream. Return a zlib error code. + Try freeing in the reverse order of allocations. + */ +local int destroy (s) + gz_stream *s; +{ + int err = Z_OK; + + if (!s) return Z_STREAM_ERROR; + + TRYFREE(s->msg); + + if (s->stream.state != NULL) { + if (s->mode == 'w') { +#ifdef NO_DEFLATE + err = Z_STREAM_ERROR; +#else + err = deflateEnd(&(s->stream)); +#endif + } else if (s->mode == 'r') { + err = inflateEnd(&(s->stream)); + } + } + if (s->file != NULL && fclose(s->file)) { +#ifdef ESPIPE + if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */ +#endif + err = Z_ERRNO; + } + if (s->z_err < 0) err = s->z_err; + + TRYFREE(s->inbuf); + TRYFREE(s->outbuf); + TRYFREE(s->path); + TRYFREE(s); + return err; +} + +/* =========================================================================== + Reads the given number of uncompressed bytes from the compressed file. + gzread returns the number of bytes actually read (0 for end of file). +*/ +int ZEXPORT gzread (file, buf, len) + gzFile file; + voidp buf; + unsigned len; +{ + gz_stream *s = (gz_stream*)file; + Bytef *start = (Bytef*)buf; /* starting point for crc computation */ + Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */ + + if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR; + + if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1; + if (s->z_err == Z_STREAM_END) return 0; /* EOF */ + + next_out = (Byte*)buf; + s->stream.next_out = (Bytef*)buf; + s->stream.avail_out = len; + + while (s->stream.avail_out != 0) { + + if (s->transparent) { + /* Copy first the lookahead bytes: */ + uInt n = s->stream.avail_in; + if (n > s->stream.avail_out) n = s->stream.avail_out; + if (n > 0) { + zmemcpy(s->stream.next_out, s->stream.next_in, n); + next_out += n; + s->stream.next_out = next_out; + s->stream.next_in += n; + s->stream.avail_out -= n; + s->stream.avail_in -= n; + } + if (s->stream.avail_out > 0) { + s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out, + s->file); + } + len -= s->stream.avail_out; + s->stream.total_in += (uLong)len; + s->stream.total_out += (uLong)len; + if (len == 0) s->z_eof = 1; + return (int)len; + } + if (s->stream.avail_in == 0 && !s->z_eof) { + + errno = 0; + s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file); + if (s->stream.avail_in == 0) { + s->z_eof = 1; + if (ferror(s->file)) { + s->z_err = Z_ERRNO; + break; + } + } + s->stream.next_in = s->inbuf; + } + s->z_err = inflate(&(s->stream), Z_NO_FLUSH); + + if (s->z_err == Z_STREAM_END) { + /* Check CRC and original size */ + s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); + start = s->stream.next_out; + + if (getLong(s) != s->crc) { + s->z_err = Z_DATA_ERROR; + } else { + (void)getLong(s); + /* The uncompressed length returned by above getlong() may + * be different from s->stream.total_out) in case of + * concatenated .gz files. Check for such files: + */ + check_header(s); + if (s->z_err == Z_OK) { + uLong total_in = s->stream.total_in; + uLong total_out = s->stream.total_out; + + inflateReset(&(s->stream)); + s->stream.total_in = total_in; + s->stream.total_out = total_out; + s->crc = crc32(0L, Z_NULL, 0); + } + } + } + if (s->z_err != Z_OK || s->z_eof) break; + } + s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); + + return (int)(len - s->stream.avail_out); +} + + +/* =========================================================================== + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +*/ +int ZEXPORT gzgetc(file) + gzFile file; +{ + unsigned char c; + + return gzread(file, &c, 1) == 1 ? c : -1; +} + + +/* =========================================================================== + Reads bytes from the compressed file until len-1 characters are + read, or a newline character is read and transferred to buf, or an + end-of-file condition is encountered. The string is then terminated + with a null character. + gzgets returns buf, or Z_NULL in case of error. + + The current implementation is not optimized at all. +*/ +char * ZEXPORT gzgets(file, buf, len) + gzFile file; + char *buf; + int len; +{ + char *b = buf; + if (buf == Z_NULL || len <= 0) return Z_NULL; + + while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ; + *buf = '\0'; + return b == buf && len > 0 ? Z_NULL : b; +} + + +#ifndef NO_DEFLATE +/* =========================================================================== + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of bytes actually written (0 in case of error). +*/ +int ZEXPORT gzwrite (file, buf, len) + gzFile file; + const voidp buf; + unsigned len; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + s->stream.next_in = (Bytef*)buf; + s->stream.avail_in = len; + + while (s->stream.avail_in != 0) { + + if (s->stream.avail_out == 0) { + + s->stream.next_out = s->outbuf; + if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { + s->z_err = Z_ERRNO; + break; + } + s->stream.avail_out = Z_BUFSIZE; + } + s->z_err = deflate(&(s->stream), Z_NO_FLUSH); + if (s->z_err != Z_OK) break; + } + s->crc = crc32(s->crc, (const Bytef *)buf, len); + + return (int)(len - s->stream.avail_in); +} + +/* =========================================================================== + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). +*/ +#ifdef STDC +#include + +int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) +{ + char buf[Z_PRINTF_BUFSIZE]; + va_list va; + int len; + + va_start(va, format); +#ifdef HAS_vsnprintf + (void)vsnprintf(buf, sizeof(buf), format, va); +#else + (void)vsprintf(buf, format, va); +#endif + va_end(va); + len = strlen(buf); /* some *sprintf don't return the nb of bytes written */ + if (len <= 0) return 0; + + return gzwrite(file, buf, (unsigned)len); +} +#else /* not ANSI C */ + +int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) + gzFile file; + const char *format; + int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; +{ + char buf[Z_PRINTF_BUFSIZE]; + int len; + +#ifdef HAS_snprintf + snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +#else + sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +#endif + len = strlen(buf); /* old sprintf doesn't return the nb of bytes written */ + if (len <= 0) return 0; + + return gzwrite(file, buf, len); +} +#endif + +/* =========================================================================== + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +*/ +int ZEXPORT gzputc(file, c) + gzFile file; + int c; +{ + unsigned char cc = (unsigned char) c; /* required for big endian systems */ + + return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1; +} + + +/* =========================================================================== + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + gzputs returns the number of characters written, or -1 in case of error. +*/ +int ZEXPORT gzputs(file, s) + gzFile file; + const char *s; +{ + return gzwrite(file, (char*)s, (unsigned)strlen(s)); +} + + +/* =========================================================================== + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. +*/ +local int do_flush (file, flush) + gzFile file; + int flush; +{ + uInt len; + int done = 0; + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + s->stream.avail_in = 0; /* should be zero already anyway */ + + for (;;) { + len = Z_BUFSIZE - s->stream.avail_out; + + if (len != 0) { + if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) { + s->z_err = Z_ERRNO; + return Z_ERRNO; + } + s->stream.next_out = s->outbuf; + s->stream.avail_out = Z_BUFSIZE; + } + if (done) break; + s->z_err = deflate(&(s->stream), flush); + + /* Ignore the second of two consecutive flushes: */ + if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK; + + /* deflate has finished flushing only when it hasn't used up + * all the available space in the output buffer: + */ + done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END); + + if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break; + } + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} + +int ZEXPORT gzflush (file, flush) + gzFile file; + int flush; +{ + gz_stream *s = (gz_stream*)file; + int err = do_flush (file, flush); + + if (err) return err; + fflush(s->file); + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} +#endif /* NO_DEFLATE */ + +/* =========================================================================== + Sets the starting position for the next gzread or gzwrite on the given + compressed file. The offset represents a number of bytes in the + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error. + SEEK_END is not implemented, returns error. + In this version of the library, gzseek can be extremely slow. +*/ +z_off_t ZEXPORT gzseek (file, offset, whence) + gzFile file; + z_off_t offset; + int whence; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || whence == SEEK_END || + s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) { + return -1L; + } + + if (s->mode == 'w') { +#ifdef NO_DEFLATE + return -1L; +#else + if (whence == SEEK_SET) { + offset -= s->stream.total_in; + } + if (offset < 0) return -1L; + + /* At this point, offset is the number of zero bytes to write. */ + if (s->inbuf == Z_NULL) { + s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */ + zmemzero(s->inbuf, Z_BUFSIZE); + } + while (offset > 0) { + uInt size = Z_BUFSIZE; + if (offset < Z_BUFSIZE) size = (uInt)offset; + + size = gzwrite(file, s->inbuf, size); + if (size == 0) return -1L; + + offset -= size; + } + return (z_off_t)s->stream.total_in; +#endif + } + /* Rest of function is for reading only */ + + /* compute absolute position */ + if (whence == SEEK_CUR) { + offset += s->stream.total_out; + } + if (offset < 0) return -1L; + + if (s->transparent) { + /* map to fseek */ + s->stream.avail_in = 0; + s->stream.next_in = s->inbuf; + if (fseek(s->file, offset, SEEK_SET) < 0) return -1L; + + s->stream.total_in = s->stream.total_out = (uLong)offset; + return offset; + } + + /* For a negative seek, rewind and use positive seek */ + if ((uLong)offset >= s->stream.total_out) { + offset -= s->stream.total_out; + } else if (gzrewind(file) < 0) { + return -1L; + } + /* offset is now the number of bytes to skip. */ + + if (offset != 0 && s->outbuf == Z_NULL) { + s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); + } + while (offset > 0) { + int size = Z_BUFSIZE; + if (offset < Z_BUFSIZE) size = (int)offset; + + size = gzread(file, s->outbuf, (uInt)size); + if (size <= 0) return -1L; + offset -= size; + } + return (z_off_t)s->stream.total_out; +} + +/* =========================================================================== + Rewinds input file. +*/ +int ZEXPORT gzrewind (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'r') return -1; + + s->z_err = Z_OK; + s->z_eof = 0; + s->stream.avail_in = 0; + s->stream.next_in = s->inbuf; + s->crc = crc32(0L, Z_NULL, 0); + + if (s->startpos == 0) { /* not a compressed file */ + rewind(s->file); + return 0; + } + + (void) inflateReset(&s->stream); + return fseek(s->file, s->startpos, SEEK_SET); +} + +/* =========================================================================== + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. +*/ +z_off_t ZEXPORT gztell (file) + gzFile file; +{ + return gzseek(file, 0L, SEEK_CUR); +} + +/* =========================================================================== + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ +int ZEXPORT gzeof (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + return (s == NULL || s->mode != 'r') ? 0 : s->z_eof; +} + +/* =========================================================================== + Outputs a long in LSB order to the given file +*/ +local void putLong (file, x) + FILE *file; + uLong x; +{ + int n; + for (n = 0; n < 4; n++) { + fputc((int)(x & 0xff), file); + x >>= 8; + } +} + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets z_err in case + of error. +*/ +local uLong getLong (s) + gz_stream *s; +{ + uLong x = (uLong)get_byte(s); + int c; + + x += ((uLong)get_byte(s))<<8; + x += ((uLong)get_byte(s))<<16; + c = get_byte(s); + if (c == EOF) s->z_err = Z_DATA_ERROR; + x += ((uLong)c)<<24; + return x; +} + +/* =========================================================================== + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. +*/ +int ZEXPORT gzclose (file) + gzFile file; +{ + int err; + gz_stream *s = (gz_stream*)file; + + if (s == NULL) return Z_STREAM_ERROR; + + if (s->mode == 'w') { +#ifdef NO_DEFLATE + return Z_STREAM_ERROR; +#else + err = do_flush (file, Z_FINISH); + if (err != Z_OK) return destroy((gz_stream*)file); + + putLong (s->file, s->crc); + putLong (s->file, s->stream.total_in); +#endif + } + return destroy((gz_stream*)file); +} + +/* =========================================================================== + Returns the error message for the last error which occured on the + given compressed file. errnum is set to zlib error number. If an + error occured in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +*/ +const char* ZEXPORT gzerror (file, errnum) + gzFile file; + int *errnum; +{ + char *m; + gz_stream *s = (gz_stream*)file; + + if (s == NULL) { + *errnum = Z_STREAM_ERROR; + return (const char*)ERR_MSG(Z_STREAM_ERROR); + } + *errnum = s->z_err; + if (*errnum == Z_OK) return (const char*)""; + + m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg); + + if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err); + + TRYFREE(s->msg); + s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); + strcpy(s->msg, s->path); + strcat(s->msg, ": "); + strcat(s->msg, m); + return (const char*)s->msg; +} diff --git a/src/utilfuns/zlib/infblock.c b/src/utilfuns/zlib/infblock.c new file mode 100644 index 0000000..dd7a6d4 --- /dev/null +++ b/src/utilfuns/zlib/infblock.c @@ -0,0 +1,403 @@ +/* infblock.c -- interpret and process block types to last block + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infblock.h" +#include "inftrees.h" +#include "infcodes.h" +#include "infutil.h" + +struct inflate_codes_state {int dummy;}; /* for buggy compilers */ + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* Table for deflate from PKZIP's appnote.txt. */ +local const uInt border[] = { /* Order of the bit length code lengths */ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + +/* + Notes beyond the 1.93a appnote.txt: + + 1. Distance pointers never point before the beginning of the output + stream. + 2. Distance pointers can point back across blocks, up to 32k away. + 3. There is an implied maximum of 7 bits for the bit length table and + 15 bits for the actual data. + 4. If only one code exists, then it is encoded using one bit. (Zero + would be more efficient, but perhaps a little confusing.) If two + codes exist, they are coded using one bit each (0 and 1). + 5. There is no way of sending zero distance codes--a dummy must be + sent if there are none. (History: a pre 2.0 version of PKZIP would + store blocks with no distance codes, but this was discovered to be + too harsh a criterion.) Valid only for 1.93a. 2.04c does allow + zero distance codes, which is sent as one code of zero bits in + length. + 6. There are up to 286 literal/length codes. Code 256 represents the + end-of-block. Note however that the static length tree defines + 288 codes just to fill out the Huffman codes. Codes 286 and 287 + cannot be used though, since there is no length base or extra bits + defined for them. Similarily, there are up to 30 distance codes. + However, static trees define 32 codes (all 5 bits) to fill out the + Huffman codes, but the last two had better not show up in the data. + 7. Unzip can check dynamic Huffman blocks for complete code sets. + The exception is that a single code would not be complete (see #4). + 8. The five bits following the block type is really the number of + literal codes sent minus 257. + 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits + (1+6+6). Therefore, to output three times the length, you output + three codes (1+1+1), whereas to output four times the same length, + you only need two codes (1+3). Hmm. + 10. In the tree reconstruction algorithm, Code = Code + Increment + only if BitLength(i) is not zero. (Pretty obvious.) + 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) + 12. Note: length code 284 can represent 227-258, but length code 285 + really is 258. The last length deserves its own, short code + since it gets used a lot in very redundant files. The length + 258 is special since 258 - 3 (the min match length) is 255. + 13. The literal/length and distance code bit lengths are read as a + single stream of lengths. It is possible (and advantageous) for + a repeat code (16, 17, or 18) to go across the boundary between + the two sets of lengths. + */ + + +void inflate_blocks_reset(s, z, c) +inflate_blocks_statef *s; +z_streamp z; +uLongf *c; +{ + if (c != Z_NULL) + *c = s->check; + if (s->mode == BTREE || s->mode == DTREE) + ZFREE(z, s->sub.trees.blens); + if (s->mode == CODES) + inflate_codes_free(s->sub.decode.codes, z); + s->mode = TYPE; + s->bitk = 0; + s->bitb = 0; + s->read = s->write = s->window; + if (s->checkfn != Z_NULL) + z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)Z_NULL, 0); + Tracev((stderr, "inflate: blocks reset\n")); +} + + +inflate_blocks_statef *inflate_blocks_new(z, c, w) +z_streamp z; +check_func c; +uInt w; +{ + inflate_blocks_statef *s; + + if ((s = (inflate_blocks_statef *)ZALLOC + (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL) + return s; + if ((s->hufts = + (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL) + { + ZFREE(z, s); + return Z_NULL; + } + if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL) + { + ZFREE(z, s->hufts); + ZFREE(z, s); + return Z_NULL; + } + s->end = s->window + w; + s->checkfn = c; + s->mode = TYPE; + Tracev((stderr, "inflate: blocks allocated\n")); + inflate_blocks_reset(s, z, Z_NULL); + return s; +} + + +int inflate_blocks(s, z, r) +inflate_blocks_statef *s; +z_streamp z; +int r; +{ + uInt t; /* temporary storage */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Bytef *p; /* input data pointer */ + uInt n; /* bytes available there */ + Bytef *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + + /* copy input/output information to locals (UPDATE macro restores) */ + LOAD + + /* process input based on current state */ + while (1) switch (s->mode) + { + case TYPE: + NEEDBITS(3) + t = (uInt)b & 7; + s->last = t & 1; + switch (t >> 1) + { + case 0: /* stored */ + Tracev((stderr, "inflate: stored block%s\n", + s->last ? " (last)" : "")); + DUMPBITS(3) + t = k & 7; /* go to byte boundary */ + DUMPBITS(t) + s->mode = LENS; /* get length of stored block */ + break; + case 1: /* fixed */ + Tracev((stderr, "inflate: fixed codes block%s\n", + s->last ? " (last)" : "")); + { + uInt bl, bd; + inflate_huft *tl, *td; + + inflate_trees_fixed(&bl, &bd, &tl, &td, z); + s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z); + if (s->sub.decode.codes == Z_NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + } + DUMPBITS(3) + s->mode = CODES; + break; + case 2: /* dynamic */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + s->last ? " (last)" : "")); + DUMPBITS(3) + s->mode = TABLE; + break; + case 3: /* illegal */ + DUMPBITS(3) + s->mode = BAD; + z->msg = (char*)"invalid block type"; + r = Z_DATA_ERROR; + LEAVE + } + break; + case LENS: + NEEDBITS(32) + if ((((~b) >> 16) & 0xffff) != (b & 0xffff)) + { + s->mode = BAD; + z->msg = (char*)"invalid stored block lengths"; + r = Z_DATA_ERROR; + LEAVE + } + s->sub.left = (uInt)b & 0xffff; + b = k = 0; /* dump bits */ + Tracev((stderr, "inflate: stored length %u\n", s->sub.left)); + s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE); + break; + case STORED: + if (n == 0) + LEAVE + NEEDOUT + t = s->sub.left; + if (t > n) t = n; + if (t > m) t = m; + zmemcpy(q, p, t); + p += t; n -= t; + q += t; m -= t; + if ((s->sub.left -= t) != 0) + break; + Tracev((stderr, "inflate: stored end, %lu total out\n", + z->total_out + (q >= s->read ? q - s->read : + (s->end - s->read) + (q - s->window)))); + s->mode = s->last ? DRY : TYPE; + break; + case TABLE: + NEEDBITS(14) + s->sub.trees.table = t = (uInt)b & 0x3fff; +#ifndef PKZIP_BUG_WORKAROUND + if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) + { + s->mode = BAD; + z->msg = (char*)"too many length or distance symbols"; + r = Z_DATA_ERROR; + LEAVE + } +#endif + t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); + if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + DUMPBITS(14) + s->sub.trees.index = 0; + Tracev((stderr, "inflate: table sizes ok\n")); + s->mode = BTREE; + case BTREE: + while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10)) + { + NEEDBITS(3) + s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7; + DUMPBITS(3) + } + while (s->sub.trees.index < 19) + s->sub.trees.blens[border[s->sub.trees.index++]] = 0; + s->sub.trees.bb = 7; + t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb, + &s->sub.trees.tb, s->hufts, z); + if (t != Z_OK) + { + r = t; + if (r == Z_DATA_ERROR) + { + ZFREE(z, s->sub.trees.blens); + s->mode = BAD; + } + LEAVE + } + s->sub.trees.index = 0; + Tracev((stderr, "inflate: bits tree ok\n")); + s->mode = DTREE; + case DTREE: + while (t = s->sub.trees.table, + s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) + { + inflate_huft *h; + uInt i, j, c; + + t = s->sub.trees.bb; + NEEDBITS(t) + h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]); + t = h->bits; + c = h->base; + if (c < 16) + { + DUMPBITS(t) + s->sub.trees.blens[s->sub.trees.index++] = c; + } + else /* c == 16..18 */ + { + i = c == 18 ? 7 : c - 14; + j = c == 18 ? 11 : 3; + NEEDBITS(t + i) + DUMPBITS(t) + j += (uInt)b & inflate_mask[i]; + DUMPBITS(i) + i = s->sub.trees.index; + t = s->sub.trees.table; + if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || + (c == 16 && i < 1)) + { + ZFREE(z, s->sub.trees.blens); + s->mode = BAD; + z->msg = (char*)"invalid bit length repeat"; + r = Z_DATA_ERROR; + LEAVE + } + c = c == 16 ? s->sub.trees.blens[i - 1] : 0; + do { + s->sub.trees.blens[i++] = c; + } while (--j); + s->sub.trees.index = i; + } + } + s->sub.trees.tb = Z_NULL; + { + uInt bl, bd; + inflate_huft *tl, *td; + inflate_codes_statef *c; + + bl = 9; /* must be <= 9 for lookahead assumptions */ + bd = 6; /* must be <= 9 for lookahead assumptions */ + t = s->sub.trees.table; + t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), + s->sub.trees.blens, &bl, &bd, &tl, &td, + s->hufts, z); + if (t != Z_OK) + { + if (t == (uInt)Z_DATA_ERROR) + { + ZFREE(z, s->sub.trees.blens); + s->mode = BAD; + } + r = t; + LEAVE + } + Tracev((stderr, "inflate: trees ok\n")); + if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + s->sub.decode.codes = c; + } + ZFREE(z, s->sub.trees.blens); + s->mode = CODES; + case CODES: + UPDATE + if ((r = inflate_codes(s, z, r)) != Z_STREAM_END) + return inflate_flush(s, z, r); + r = Z_OK; + inflate_codes_free(s->sub.decode.codes, z); + LOAD + Tracev((stderr, "inflate: codes end, %lu total out\n", + z->total_out + (q >= s->read ? q - s->read : + (s->end - s->read) + (q - s->window)))); + if (!s->last) + { + s->mode = TYPE; + break; + } + s->mode = DRY; + case DRY: + FLUSH + if (s->read != s->write) + LEAVE + s->mode = DONE; + case DONE: + r = Z_STREAM_END; + LEAVE + case BAD: + r = Z_DATA_ERROR; + LEAVE + default: + r = Z_STREAM_ERROR; + LEAVE + } +} + + +int inflate_blocks_free(s, z) +inflate_blocks_statef *s; +z_streamp z; +{ + inflate_blocks_reset(s, z, Z_NULL); + ZFREE(z, s->window); + ZFREE(z, s->hufts); + ZFREE(z, s); + Tracev((stderr, "inflate: blocks freed\n")); + return Z_OK; +} + + +void inflate_set_dictionary(s, d, n) +inflate_blocks_statef *s; +const Bytef *d; +uInt n; +{ + zmemcpy(s->window, d, n); + s->read = s->write = s->window + n; +} + + +/* Returns true if inflate is currently at the end of a block generated + * by Z_SYNC_FLUSH or Z_FULL_FLUSH. + * IN assertion: s != Z_NULL + */ +int inflate_blocks_sync_point(s) +inflate_blocks_statef *s; +{ + return s->mode == LENS; +} diff --git a/src/utilfuns/zlib/infblock.h b/src/utilfuns/zlib/infblock.h new file mode 100644 index 0000000..173b226 --- /dev/null +++ b/src/utilfuns/zlib/infblock.h @@ -0,0 +1,39 @@ +/* infblock.h -- header to use infblock.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +struct inflate_blocks_state; +typedef struct inflate_blocks_state FAR inflate_blocks_statef; + +extern inflate_blocks_statef * inflate_blocks_new OF(( + z_streamp z, + check_func c, /* check function */ + uInt w)); /* window size */ + +extern int inflate_blocks OF(( + inflate_blocks_statef *, + z_streamp , + int)); /* initial return code */ + +extern void inflate_blocks_reset OF(( + inflate_blocks_statef *, + z_streamp , + uLongf *)); /* check value on output */ + +extern int inflate_blocks_free OF(( + inflate_blocks_statef *, + z_streamp)); + +extern void inflate_set_dictionary OF(( + inflate_blocks_statef *s, + const Bytef *d, /* dictionary */ + uInt n)); /* dictionary length */ + +extern int inflate_blocks_sync_point OF(( + inflate_blocks_statef *s)); diff --git a/src/utilfuns/zlib/infcodes.c b/src/utilfuns/zlib/infcodes.c new file mode 100644 index 0000000..0d54ea7 --- /dev/null +++ b/src/utilfuns/zlib/infcodes.c @@ -0,0 +1,251 @@ +/* infcodes.c -- process literals and length/distance pairs + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "infblock.h" +#include "infcodes.h" +#include "infutil.h" +#include "inffast.h" + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ + START, /* x: set up for LEN */ + LEN, /* i: get length/literal/eob next */ + LENEXT, /* i: getting length extra (have base) */ + DIST, /* i: get distance next */ + DISTEXT, /* i: getting distance extra */ + COPY, /* o: copying bytes in window, waiting for space */ + LIT, /* o: got literal, waiting for output space */ + WASH, /* o: got eob, possibly still output waiting */ + END, /* x: got eob and all data flushed */ + BADCODE} /* x: got error */ +inflate_codes_mode; + +/* inflate codes private state */ +struct inflate_codes_state { + + /* mode */ + inflate_codes_mode mode; /* current inflate_codes mode */ + + /* mode dependent information */ + uInt len; + union { + struct { + inflate_huft *tree; /* pointer into tree */ + uInt need; /* bits needed */ + } code; /* if LEN or DIST, where in tree */ + uInt lit; /* if LIT, literal */ + struct { + uInt get; /* bits to get for extra */ + uInt dist; /* distance back to copy from */ + } copy; /* if EXT or COPY, where and how much */ + } sub; /* submode */ + + /* mode independent information */ + Byte lbits; /* ltree bits decoded per branch */ + Byte dbits; /* dtree bits decoder per branch */ + inflate_huft *ltree; /* literal/length/eob tree */ + inflate_huft *dtree; /* distance tree */ + +}; + + +inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z) +uInt bl, bd; +inflate_huft *tl; +inflate_huft *td; /* need separate declaration for Borland C++ */ +z_streamp z; +{ + inflate_codes_statef *c; + + if ((c = (inflate_codes_statef *) + ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL) + { + c->mode = START; + c->lbits = (Byte)bl; + c->dbits = (Byte)bd; + c->ltree = tl; + c->dtree = td; + Tracev((stderr, "inflate: codes new\n")); + } + return c; +} + + +int inflate_codes(s, z, r) +inflate_blocks_statef *s; +z_streamp z; +int r; +{ + uInt j; /* temporary storage */ + inflate_huft *t; /* temporary pointer */ + uInt e; /* extra bits or operation */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Bytef *p; /* input data pointer */ + uInt n; /* bytes available there */ + Bytef *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + unsigned long csf; /* pointer to copy strings from */ + inflate_codes_statef *c = s->sub.decode.codes; /* codes state */ + + /* copy input/output information to locals (UPDATE macro restores) */ + LOAD + + /* process input and output based on current state */ + while (1) switch (c->mode) + { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ + case START: /* x: set up for LEN */ +#ifndef SLOW + if (m >= 258 && n >= 10) + { + UPDATE + r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z); + LOAD + if (r != Z_OK) + { + c->mode = r == Z_STREAM_END ? WASH : BADCODE; + break; + } + } +#endif /* !SLOW */ + c->sub.code.need = c->lbits; + c->sub.code.tree = c->ltree; + c->mode = LEN; + case LEN: /* i: get length/literal/eob next */ + j = c->sub.code.need; + NEEDBITS(j) + t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); + DUMPBITS(t->bits) + e = (uInt)(t->exop); + if (e == 0) /* literal */ + { + c->sub.lit = t->base; + Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", t->base)); + c->mode = LIT; + break; + } + if (e & 16) /* length */ + { + c->sub.copy.get = e & 15; + c->len = t->base; + c->mode = LENEXT; + break; + } + if ((e & 64) == 0) /* next table */ + { + c->sub.code.need = e; + c->sub.code.tree = t + t->base; + break; + } + if (e & 32) /* end of block */ + { + Tracevv((stderr, "inflate: end of block\n")); + c->mode = WASH; + break; + } + c->mode = BADCODE; /* invalid code */ + z->msg = (char*)"invalid literal/length code"; + r = Z_DATA_ERROR; + LEAVE + case LENEXT: /* i: getting length extra (have base) */ + j = c->sub.copy.get; + NEEDBITS(j) + c->len += (uInt)b & inflate_mask[j]; + DUMPBITS(j) + c->sub.code.need = c->dbits; + c->sub.code.tree = c->dtree; + Tracevv((stderr, "inflate: length %u\n", c->len)); + c->mode = DIST; + case DIST: /* i: get distance next */ + j = c->sub.code.need; + NEEDBITS(j) + t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); + DUMPBITS(t->bits) + e = (uInt)(t->exop); + if (e & 16) /* distance */ + { + c->sub.copy.get = e & 15; + c->sub.copy.dist = t->base; + c->mode = DISTEXT; + break; + } + if ((e & 64) == 0) /* next table */ + { + c->sub.code.need = e; + c->sub.code.tree = t + t->base; + break; + } + c->mode = BADCODE; /* invalid code */ + z->msg = (char*)"invalid distance code"; + r = Z_DATA_ERROR; + LEAVE + case DISTEXT: /* i: getting distance extra */ + j = c->sub.copy.get; + NEEDBITS(j) + c->sub.copy.dist += (uInt)b & inflate_mask[j]; + DUMPBITS(j) + Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); + c->mode = COPY; + case COPY: /* o: copying bytes in window, waiting for space */ + csf = (unsigned long)q - c->sub.copy.dist; + while (csf < (unsigned long)s->window) /* modulo window size-"while" instead */ + csf += (unsigned long)(s->end - s->window); /* of "if" handles invalid distances */ + while (c->len) + { + NEEDOUT + OUTBYTE(*(Bytef *)csf++) + if (csf == (unsigned long)s->end) + csf = (unsigned long)s->window; + c->len--; + } + c->mode = START; + break; + case LIT: /* o: got literal, waiting for output space */ + NEEDOUT + OUTBYTE(c->sub.lit) + c->mode = START; + break; + case WASH: /* o: got eob, possibly more output */ + if (k > 7) /* return unused byte, if any */ + { + Assert(k < 16, "inflate_codes grabbed too many bytes") + k -= 8; + n++; + p--; /* can always return one */ + } + FLUSH + if (s->read != s->write) + LEAVE + c->mode = END; + case END: + r = Z_STREAM_END; + LEAVE + case BADCODE: /* x: got error */ + r = Z_DATA_ERROR; + LEAVE + default: + r = Z_STREAM_ERROR; + LEAVE + } +#ifdef NEED_DUMMY_RETURN + return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ +#endif +} + + +void inflate_codes_free(c, z) +inflate_codes_statef *c; +z_streamp z; +{ + ZFREE(z, c); + Tracev((stderr, "inflate: codes free\n")); +} diff --git a/src/utilfuns/zlib/infcodes.h b/src/utilfuns/zlib/infcodes.h new file mode 100644 index 0000000..46821a0 --- /dev/null +++ b/src/utilfuns/zlib/infcodes.h @@ -0,0 +1,27 @@ +/* infcodes.h -- header to use infcodes.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +struct inflate_codes_state; +typedef struct inflate_codes_state FAR inflate_codes_statef; + +extern inflate_codes_statef *inflate_codes_new OF(( + uInt, uInt, + inflate_huft *, inflate_huft *, + z_streamp )); + +extern int inflate_codes OF(( + inflate_blocks_statef *, + z_streamp , + int)); + +extern void inflate_codes_free OF(( + inflate_codes_statef *, + z_streamp )); + diff --git a/src/utilfuns/zlib/inffast.c b/src/utilfuns/zlib/inffast.c new file mode 100644 index 0000000..a7ebc64 --- /dev/null +++ b/src/utilfuns/zlib/inffast.c @@ -0,0 +1,183 @@ +/* inffast.c -- process literals and length/distance pairs fast + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "infblock.h" +#include "infcodes.h" +#include "infutil.h" +#include "inffast.h" + +struct inflate_codes_state {int dummy;}; /* for buggy compilers */ + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* macros for bit input with no checking and for returning unused bytes */ +#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<avail_in-n;c=(k>>3)>3:c;n+=c;p-=c;k-=c<<3;} + +/* Called with number of bytes left to write in window at least 258 + (the maximum string length) and number of input bytes available + at least ten. The ten bytes are six bytes for the longest length/ + distance pair plus four bytes for overloading the bit buffer. */ + +int inflate_fast(bl, bd, tl, td, s, z) +uInt bl, bd; +inflate_huft *tl; +inflate_huft *td; /* need separate declaration for Borland C++ */ +inflate_blocks_statef *s; +z_streamp z; +{ + inflate_huft *t; /* temporary pointer */ + uInt e; /* extra bits or operation */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Bytef *p; /* input data pointer */ + uInt n; /* bytes available there */ + Bytef *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + uInt ml; /* mask for literal/length tree */ + uInt md; /* mask for distance tree */ + uInt c; /* bytes to copy */ + uInt d; /* distance back to copy from */ + unsigned long csp; /* copy source pointer */ + + /* load input, output, bit values */ + LOAD + + /* initialize masks */ + ml = inflate_mask[bl]; + md = inflate_mask[bd]; + + /* do until not enough input or output space for fast loop */ + do { /* assume called with m >= 258 && n >= 10 */ + /* get literal/length code */ + GRABBITS(20) /* max bits for literal/length code */ + if ((e = (t = tl + ((uInt)b & ml))->exop) == 0) + { + DUMPBITS(t->bits) + Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? + "inflate: * literal '%c'\n" : + "inflate: * literal 0x%02x\n", t->base)); + *q++ = (Byte)t->base; + m--; + continue; + } + do { + DUMPBITS(t->bits) + if (e & 16) + { + /* get extra bits for length */ + e &= 15; + c = t->base + ((uInt)b & inflate_mask[e]); + DUMPBITS(e) + Tracevv((stderr, "inflate: * length %u\n", c)); + + /* decode distance base of block to copy */ + GRABBITS(15); /* max bits for distance code */ + e = (t = td + ((uInt)b & md))->exop; + do { + DUMPBITS(t->bits) + if (e & 16) + { + /* get extra bits to add to distance base */ + e &= 15; + GRABBITS(e) /* get extra bits (up to 13) */ + d = t->base + ((uInt)b & inflate_mask[e]); + DUMPBITS(e) + Tracevv((stderr, "inflate: * distance %u\n", d)); + + /* do the copy */ + m -= c; + csp = (unsigned long)q - d; + if (csp < (unsigned long)s->window) /* wrap if needed */ + { + do { + csp += (unsigned long)(s->end - s->window); /* force pointer in window */ + } while (csp < (unsigned long)s->window); /* covers invalid distances */ + e = (unsigned long)s->end - csp; + if (c > e) + { + c -= e; /* wrapped copy */ + do { + *q++ = *(Bytef *)csp++; + } while (--e); + csp = s->window; + do { + *q++ = *(Bytef *)csp++; + } while (--c); + } + else /* normal copy */ + { + *q++ = *(Bytef *)csp++; c--; + *q++ = *(Bytef *)csp++; c--; + do { + *q++ = *(Bytef *)csp++; + } while (--c); + } + } + else /* normal copy */ + { + *q++ = *(Bytef *)csp++; c--; + *q++ = *(Bytef *)csp++; c--; + do { + *q++ = *(Bytef *)csp++; + } while (--c); + } + break; + } + else if ((e & 64) == 0) + { + t += t->base; + e = (t += ((uInt)b & inflate_mask[e]))->exop; + } + else + { + z->msg = (char*)"invalid distance code"; + UNGRAB + UPDATE + return Z_DATA_ERROR; + } + } while (1); + break; + } + if ((e & 64) == 0) + { + t += t->base; + if ((e = (t += ((uInt)b & inflate_mask[e]))->exop) == 0) + { + DUMPBITS(t->bits) + Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? + "inflate: * literal '%c'\n" : + "inflate: * literal 0x%02x\n", t->base)); + *q++ = (Byte)t->base; + m--; + break; + } + } + else if (e & 32) + { + Tracevv((stderr, "inflate: * end of block\n")); + UNGRAB + UPDATE + return Z_STREAM_END; + } + else + { + z->msg = (char*)"invalid literal/length code"; + UNGRAB + UPDATE + return Z_DATA_ERROR; + } + } while (1); + } while (m >= 258 && n >= 10); + + /* not enough input or output--restore pointers and return */ + UNGRAB + UPDATE + return Z_OK; +} diff --git a/src/utilfuns/zlib/inffast.h b/src/utilfuns/zlib/inffast.h new file mode 100644 index 0000000..a31a4bb --- /dev/null +++ b/src/utilfuns/zlib/inffast.h @@ -0,0 +1,17 @@ +/* inffast.h -- header to use inffast.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +extern int inflate_fast OF(( + uInt, + uInt, + inflate_huft *, + inflate_huft *, + inflate_blocks_statef *, + z_streamp )); diff --git a/src/utilfuns/zlib/inffixed.h b/src/utilfuns/zlib/inffixed.h new file mode 100644 index 0000000..77f7e76 --- /dev/null +++ b/src/utilfuns/zlib/inffixed.h @@ -0,0 +1,151 @@ +/* inffixed.h -- table for decoding fixed codes + * Generated automatically by the maketree.c program + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +local uInt fixed_bl = 9; +local uInt fixed_bd = 5; +local inflate_huft fixed_tl[] = { + {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, + {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192}, + {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160}, + {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},224}, + {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},144}, + {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},208}, + {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},176}, + {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},240}, + {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, + {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},200}, + {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},168}, + {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},232}, + {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},152}, + {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},216}, + {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},184}, + {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},248}, + {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, + {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},196}, + {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},164}, + {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},228}, + {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},148}, + {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},212}, + {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},180}, + {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},244}, + {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},204}, + {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},172}, + {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},236}, + {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},156}, + {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},220}, + {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},188}, + {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},252}, + {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, + {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},194}, + {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},162}, + {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},226}, + {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},146}, + {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},210}, + {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},178}, + {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},242}, + {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, + {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},202}, + {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},170}, + {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},234}, + {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},154}, + {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},218}, + {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},186}, + {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},250}, + {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, + {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},198}, + {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},166}, + {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},230}, + {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},150}, + {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},214}, + {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},182}, + {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},246}, + {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},206}, + {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},174}, + {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},238}, + {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},158}, + {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},222}, + {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},190}, + {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},254}, + {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, + {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},193}, + {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},161}, + {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},225}, + {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},145}, + {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},209}, + {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},177}, + {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},241}, + {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, + {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},201}, + {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},169}, + {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},233}, + {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},153}, + {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},217}, + {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},185}, + {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},249}, + {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, + {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},197}, + {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},165}, + {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},229}, + {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},149}, + {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},213}, + {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},181}, + {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},245}, + {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},205}, + {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},173}, + {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},237}, + {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},157}, + {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},221}, + {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},189}, + {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},253}, + {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, + {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},195}, + {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},163}, + {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},227}, + {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},147}, + {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},211}, + {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},179}, + {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},243}, + {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, + {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},203}, + {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},171}, + {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},235}, + {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},155}, + {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},219}, + {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},187}, + {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},251}, + {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, + {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},199}, + {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},167}, + {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},231}, + {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},151}, + {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},215}, + {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},183}, + {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},247}, + {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},207}, + {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},175}, + {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},239}, + {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},159}, + {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},223}, + {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191}, + {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255} + }; +local inflate_huft fixed_td[] = { + {{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097}, + {{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385}, + {{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193}, + {{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577}, + {{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145}, + {{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577}, + {{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289}, + {{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577} + }; diff --git a/src/utilfuns/zlib/inflate.c b/src/utilfuns/zlib/inflate.c new file mode 100644 index 0000000..dfb2e86 --- /dev/null +++ b/src/utilfuns/zlib/inflate.c @@ -0,0 +1,366 @@ +/* inflate.c -- zlib interface to inflate modules + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infblock.h" + +struct inflate_blocks_state {int dummy;}; /* for buggy compilers */ + +typedef enum { + METHOD, /* waiting for method byte */ + FLAG, /* waiting for flag byte */ + DICT4, /* four dictionary check bytes to go */ + DICT3, /* three dictionary check bytes to go */ + DICT2, /* two dictionary check bytes to go */ + DICT1, /* one dictionary check byte to go */ + DICT0, /* waiting for inflateSetDictionary */ + BLOCKS, /* decompressing blocks */ + CHECK4, /* four check bytes to go */ + CHECK3, /* three check bytes to go */ + CHECK2, /* two check bytes to go */ + CHECK1, /* one check byte to go */ + DONE, /* finished check, done */ + BAD} /* got an error--stay here */ +inflate_mode; + +/* inflate private state */ +struct internal_state { + + /* mode */ + inflate_mode mode; /* current inflate mode */ + + /* mode dependent information */ + union { + uInt method; /* if FLAGS, method byte */ + struct { + uLong was; /* computed check value */ + uLong need; /* stream check value */ + } check; /* if CHECK, check values to compare */ + uInt marker; /* if BAD, inflateSync's marker bytes count */ + } sub; /* submode */ + + /* mode independent information */ + int nowrap; /* flag for no wrapper */ + uInt wbits; /* log2(window size) (8..15, defaults to 15) */ + inflate_blocks_statef + *blocks; /* current inflate_blocks state */ + +}; + + +int ZEXPORT inflateReset(z) +z_streamp z; +{ + if (z == Z_NULL || z->state == Z_NULL) + return Z_STREAM_ERROR; + z->total_in = z->total_out = 0; + z->msg = Z_NULL; + z->state->mode = z->state->nowrap ? BLOCKS : METHOD; + inflate_blocks_reset(z->state->blocks, z, Z_NULL); + Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + + +int ZEXPORT inflateEnd(z) +z_streamp z; +{ + if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL) + return Z_STREAM_ERROR; + if (z->state->blocks != Z_NULL) + inflate_blocks_free(z->state->blocks, z); + ZFREE(z, z->state); + z->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} + + +int ZEXPORT inflateInit2_(z, w, version, stream_size) +z_streamp z; +int w; +const char *version; +int stream_size; +{ + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != sizeof(z_stream)) + return Z_VERSION_ERROR; + + /* initialize state */ + if (z == Z_NULL) + return Z_STREAM_ERROR; + z->msg = Z_NULL; + if (z->zalloc == Z_NULL) + { + z->zalloc = zcalloc; + z->opaque = (voidpf)0; + } + if (z->zfree == Z_NULL) z->zfree = zcfree; + if ((z->state = (struct internal_state FAR *) + ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL) + return Z_MEM_ERROR; + z->state->blocks = Z_NULL; + + /* handle undocumented nowrap option (no zlib header or check) */ + z->state->nowrap = 0; + if (w < 0) + { + w = - w; + z->state->nowrap = 1; + } + + /* set window size */ + if (w < 8 || w > 15) + { + inflateEnd(z); + return Z_STREAM_ERROR; + } + z->state->wbits = (uInt)w; + + /* create inflate_blocks state */ + if ((z->state->blocks = + inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w)) + == Z_NULL) + { + inflateEnd(z); + return Z_MEM_ERROR; + } + Tracev((stderr, "inflate: allocated\n")); + + /* reset state */ + inflateReset(z); + return Z_OK; +} + + +int ZEXPORT inflateInit_(z, version, stream_size) +z_streamp z; +const char *version; +int stream_size; +{ + return inflateInit2_(z, DEF_WBITS, version, stream_size); +} + + +#define NEEDBYTE {if(z->avail_in==0)return r;r=f;} +#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) + +int ZEXPORT inflate(z, f) +z_streamp z; +int f; +{ + int r; + uInt b; + + if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL) + return Z_STREAM_ERROR; + f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; + r = Z_BUF_ERROR; + while (1) switch (z->state->mode) + { + case METHOD: + NEEDBYTE + if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED) + { + z->state->mode = BAD; + z->msg = (char*)"unknown compression method"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + if ((z->state->sub.method >> 4) + 8 > z->state->wbits) + { + z->state->mode = BAD; + z->msg = (char*)"invalid window size"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + z->state->mode = FLAG; + case FLAG: + NEEDBYTE + b = NEXTBYTE; + if (((z->state->sub.method << 8) + b) % 31) + { + z->state->mode = BAD; + z->msg = (char*)"incorrect header check"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + Tracev((stderr, "inflate: zlib header ok\n")); + if (!(b & PRESET_DICT)) + { + z->state->mode = BLOCKS; + break; + } + z->state->mode = DICT4; + case DICT4: + NEEDBYTE + z->state->sub.check.need = (uLong)NEXTBYTE << 24; + z->state->mode = DICT3; + case DICT3: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 16; + z->state->mode = DICT2; + case DICT2: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 8; + z->state->mode = DICT1; + case DICT1: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE; + z->adler = z->state->sub.check.need; + z->state->mode = DICT0; + return Z_NEED_DICT; + case DICT0: + z->state->mode = BAD; + z->msg = (char*)"need dictionary"; + z->state->sub.marker = 0; /* can try inflateSync */ + return Z_STREAM_ERROR; + case BLOCKS: + r = inflate_blocks(z->state->blocks, z, r); + if (r == Z_DATA_ERROR) + { + z->state->mode = BAD; + z->state->sub.marker = 0; /* can try inflateSync */ + break; + } + if (r == Z_OK) + r = f; + if (r != Z_STREAM_END) + return r; + r = f; + inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was); + if (z->state->nowrap) + { + z->state->mode = DONE; + break; + } + z->state->mode = CHECK4; + case CHECK4: + NEEDBYTE + z->state->sub.check.need = (uLong)NEXTBYTE << 24; + z->state->mode = CHECK3; + case CHECK3: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 16; + z->state->mode = CHECK2; + case CHECK2: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 8; + z->state->mode = CHECK1; + case CHECK1: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE; + + if (z->state->sub.check.was != z->state->sub.check.need) + { + z->state->mode = BAD; + z->msg = (char*)"incorrect data check"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + Tracev((stderr, "inflate: zlib check ok\n")); + z->state->mode = DONE; + case DONE: + return Z_STREAM_END; + case BAD: + return Z_DATA_ERROR; + default: + return Z_STREAM_ERROR; + } +#ifdef NEED_DUMMY_RETURN + return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ +#endif +} + + +int ZEXPORT inflateSetDictionary(z, dictionary, dictLength) +z_streamp z; +const Bytef *dictionary; +uInt dictLength; +{ + uInt length = dictLength; + + if (z == Z_NULL || z->state == Z_NULL || z->state->mode != DICT0) + return Z_STREAM_ERROR; + + if (adler32(1L, dictionary, dictLength) != z->adler) return Z_DATA_ERROR; + z->adler = 1L; + + if (length >= ((uInt)1<state->wbits)) + { + length = (1<state->wbits)-1; + dictionary += dictLength - length; + } + inflate_set_dictionary(z->state->blocks, dictionary, length); + z->state->mode = BLOCKS; + return Z_OK; +} + + +int ZEXPORT inflateSync(z) +z_streamp z; +{ + uInt n; /* number of bytes to look at */ + Bytef *p; /* pointer to bytes */ + uInt m; /* number of marker bytes found in a row */ + uLong r, w; /* temporaries to save total_in and total_out */ + + /* set up */ + if (z == Z_NULL || z->state == Z_NULL) + return Z_STREAM_ERROR; + if (z->state->mode != BAD) + { + z->state->mode = BAD; + z->state->sub.marker = 0; + } + if ((n = z->avail_in) == 0) + return Z_BUF_ERROR; + p = z->next_in; + m = z->state->sub.marker; + + /* search */ + while (n && m < 4) + { + static const Byte mark[4] = {0, 0, 0xff, 0xff}; + if (*p == mark[m]) + m++; + else if (*p) + m = 0; + else + m = 4 - m; + p++, n--; + } + + /* restore */ + z->total_in += p - z->next_in; + z->next_in = p; + z->avail_in = n; + z->state->sub.marker = m; + + /* return no joy or set up to restart on a new block */ + if (m != 4) + return Z_DATA_ERROR; + r = z->total_in; w = z->total_out; + inflateReset(z); + z->total_in = r; z->total_out = w; + z->state->mode = BLOCKS; + return Z_OK; +} + + +/* Returns true if inflate is currently at the end of a block generated + * by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + * implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH + * but removes the length bytes of the resulting empty stored block. When + * decompressing, PPP checks that at the end of input packet, inflate is + * waiting for these length bytes. + */ +int ZEXPORT inflateSyncPoint(z) +z_streamp z; +{ + if (z == Z_NULL || z->state == Z_NULL || z->state->blocks == Z_NULL) + return Z_STREAM_ERROR; + return inflate_blocks_sync_point(z->state->blocks); +} diff --git a/src/utilfuns/zlib/inftrees.c b/src/utilfuns/zlib/inftrees.c new file mode 100644 index 0000000..4c32ca3 --- /dev/null +++ b/src/utilfuns/zlib/inftrees.c @@ -0,0 +1,454 @@ +/* inftrees.c -- generate Huffman trees for efficient decoding + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" + +#if !defined(BUILDFIXED) && !defined(STDC) +# define BUILDFIXED /* non ANSI compilers may not accept inffixed.h */ +#endif + +const char inflate_copyright[] = + " inflate 1.1.4 Copyright 1995-2002 Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ +struct internal_state {int dummy;}; /* for buggy compilers */ + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + + +local int huft_build OF(( + uIntf *, /* code lengths in bits */ + uInt, /* number of codes */ + uInt, /* number of "simple" codes */ + const uIntf *, /* list of base values for non-simple codes */ + const uIntf *, /* list of extra bits for non-simple codes */ + inflate_huft * FAR*,/* result: starting table */ + uIntf *, /* maximum lookup bits (returns actual) */ + inflate_huft *, /* space for trees */ + uInt *, /* hufts used in space */ + uIntf * )); /* space for values */ + +/* Tables for deflate from PKZIP's appnote.txt. */ +local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + /* see note #13 above about 258 */ +local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */ +local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577}; +local const uInt cpdext[30] = { /* Extra bits for distance codes */ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13}; + +/* + Huffman code decoding is performed using a multi-level table lookup. + The fastest way to decode is to simply build a lookup table whose + size is determined by the longest code. However, the time it takes + to build this table can also be a factor if the data being decoded + is not very long. The most common codes are necessarily the + shortest codes, so those codes dominate the decoding time, and hence + the speed. The idea is you can have a shorter table that decodes the + shorter, more probable codes, and then point to subsidiary tables for + the longer codes. The time it costs to decode the longer codes is + then traded against the time it takes to make longer tables. + + This results of this trade are in the variables lbits and dbits + below. lbits is the number of bits the first level table for literal/ + length codes can decode in one step, and dbits is the same thing for + the distance codes. Subsequent tables are also less than or equal to + those sizes. These values may be adjusted either when all of the + codes are shorter than that, in which case the longest code length in + bits is used, or when the shortest code is *longer* than the requested + table size, in which case the length of the shortest code in bits is + used. + + There are two different values for the two tables, since they code a + different number of possibilities each. The literal/length table + codes 286 possible values, or in a flat code, a little over eight + bits. The distance table codes 30 possible values, or a little less + than five bits, flat. The optimum values for speed end up being + about one bit more than those, so lbits is 8+1 and dbits is 5+1. + The optimum values may differ though from machine to machine, and + possibly even between compilers. Your mileage may vary. + */ + + +/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ +#define BMAX 15 /* maximum bit length of any code */ + +local int huft_build(b, n, s, d, e, t, m, hp, hn, v) +uIntf *b; /* code lengths in bits (all assumed <= BMAX) */ +uInt n; /* number of codes (assumed <= 288) */ +uInt s; /* number of simple-valued codes (0..s-1) */ +const uIntf *d; /* list of base values for non-simple codes */ +const uIntf *e; /* list of extra bits for non-simple codes */ +inflate_huft * FAR *t; /* result: starting table */ +uIntf *m; /* maximum lookup bits, returns actual */ +inflate_huft *hp; /* space for trees */ +uInt *hn; /* hufts used in space */ +uIntf *v; /* working area: values in order of bit length */ +/* Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR + if the given code set is incomplete (the tables are still built in this + case), or Z_DATA_ERROR if the input is invalid. */ +{ + + uInt a; /* counter for codes of length k */ + uInt c[BMAX+1]; /* bit length count table */ + uInt f; /* i repeats in table every f entries */ + int g; /* maximum code length */ + int h; /* table level */ + register uInt i; /* counter, current code */ + register uInt j; /* counter */ + register int k; /* number of bits in current code */ + int l; /* bits per table (returned in m) */ + uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */ + register uIntf *p; /* pointer into c[], b[], or v[] */ + inflate_huft *q; /* points to current table */ + struct inflate_huft_s r; /* table entry for structure assignment */ + inflate_huft *u[BMAX]; /* table stack */ + register int w; /* bits before this table == (l * h) */ + uInt x[BMAX+1]; /* bit offsets, then code stack */ + uIntf *xp; /* pointer into x */ + int y; /* number of dummy codes added */ + uInt z; /* number of entries in current table */ + + + /* Generate counts for each bit length */ + p = c; +#define C0 *p++ = 0; +#define C2 C0 C0 C0 C0 +#define C4 C2 C2 C2 C2 + C4 /* clear c[]--assume BMAX+1 is 16 */ + p = b; i = n; + do { + c[*p++]++; /* assume all entries <= BMAX */ + } while (--i); + if (c[0] == n) /* null input--all zero length codes */ + { + *t = (inflate_huft *)Z_NULL; + *m = 0; + return Z_OK; + } + + + /* Find minimum and maximum length, bound *m by those */ + l = *m; + for (j = 1; j <= BMAX; j++) + if (c[j]) + break; + k = j; /* minimum code length */ + if ((uInt)l < j) + l = j; + for (i = BMAX; i; i--) + if (c[i]) + break; + g = i; /* maximum code length */ + if ((uInt)l > i) + l = i; + *m = l; + + + /* Adjust last length count to fill out codes, if needed */ + for (y = 1 << j; j < i; j++, y <<= 1) + if ((y -= c[j]) < 0) + return Z_DATA_ERROR; + if ((y -= c[i]) < 0) + return Z_DATA_ERROR; + c[i] += y; + + + /* Generate starting offsets into the value table for each length */ + x[1] = j = 0; + p = c + 1; xp = x + 2; + while (--i) { /* note that i == g from above */ + *xp++ = (j += *p++); + } + + + /* Make a table of values in order of bit lengths */ + p = b; i = 0; + do { + if ((j = *p++) != 0) + v[x[j]++] = i; + } while (++i < n); + n = x[g]; /* set n to length of v */ + + + /* Generate the Huffman codes and for each, make the table entries */ + x[0] = i = 0; /* first Huffman code is zero */ + p = v; /* grab values in bit order */ + h = -1; /* no tables yet--level -1 */ + w = -l; /* bits decoded == (l * h) */ + u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */ + q = (inflate_huft *)Z_NULL; /* ditto */ + z = 0; /* ditto */ + + /* go through the bit lengths (k already is bits in shortest code) */ + for (; k <= g; k++) + { + a = c[k]; + while (a--) + { + /* here i is the Huffman code of length k bits for value *p */ + /* make tables up to required level */ + while (k > w + l) + { + h++; + w += l; /* previous table always l bits */ + + /* compute minimum size table less than or equal to l bits */ + z = g - w; + z = z > (uInt)l ? l : z; /* table size upper limit */ + if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ + { /* too few codes for k-w bit table */ + f -= a + 1; /* deduct codes from patterns left */ + xp = c + k; + if (j < z) + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ + } + } + z = 1 << j; /* table entries for j-bit table */ + + /* allocate new table */ + if (*hn + z > MANY) /* (note: doesn't matter for fixed) */ + return Z_DATA_ERROR; /* overflow of MANY */ + u[h] = q = hp + *hn; + *hn += z; + + /* connect to last table, if there is one */ + if (h) + { + x[h] = i; /* save pattern for backing up */ + r.bits = (Byte)l; /* bits to dump before this table */ + r.exop = (Byte)j; /* bits in this table */ + j = i >> (w - l); + r.base = (uInt)(q - u[h-1] - j); /* offset to this table */ + u[h-1][j] = r; /* connect to last table */ + } + else + *t = q; /* first table is returned result */ + } + + /* set up table entry in r */ + r.bits = (Byte)(k - w); + if (p >= v + n) + r.exop = 128 + 64; /* out of values--invalid code */ + else if (*p < s) + { + r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */ + r.base = *p++; /* simple code is just the value */ + } + else + { + r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */ + r.base = d[*p++ - s]; + } + + /* fill code-like entries with r */ + f = 1 << (k - w); + for (j = i >> w; j < z; j += f) + q[j] = r; + + /* backwards increment the k-bit code i */ + for (j = 1 << (k - 1); i & j; j >>= 1) + i ^= j; + i ^= j; + + /* backup over finished tables */ + mask = (1 << w) - 1; /* needed on HP, cc -O bug */ + while ((i & mask) != x[h]) + { + h--; /* don't need to update q */ + w -= l; + mask = (1 << w) - 1; + } + } + } + + + /* Return Z_BUF_ERROR if we were given an incomplete table */ + return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; +} + + +int inflate_trees_bits(c, bb, tb, hp, z) +uIntf *c; /* 19 code lengths */ +uIntf *bb; /* bits tree desired/actual depth */ +inflate_huft * FAR *tb; /* bits tree result */ +inflate_huft *hp; /* space for trees */ +z_streamp z; /* for messages */ +{ + int r; + uInt hn = 0; /* hufts used in space */ + uIntf *v; /* work area for huft_build */ + + if ((v = (uIntf*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL) + return Z_MEM_ERROR; + r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, + tb, bb, hp, &hn, v); + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed dynamic bit lengths tree"; + else if (r == Z_BUF_ERROR || *bb == 0) + { + z->msg = (char*)"incomplete dynamic bit lengths tree"; + r = Z_DATA_ERROR; + } + ZFREE(z, v); + return r; +} + + +int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, hp, z) +uInt nl; /* number of literal/length codes */ +uInt nd; /* number of distance codes */ +uIntf *c; /* that many (total) code lengths */ +uIntf *bl; /* literal desired/actual bit depth */ +uIntf *bd; /* distance desired/actual bit depth */ +inflate_huft * FAR *tl; /* literal/length tree result */ +inflate_huft * FAR *td; /* distance tree result */ +inflate_huft *hp; /* space for trees */ +z_streamp z; /* for messages */ +{ + int r; + uInt hn = 0; /* hufts used in space */ + uIntf *v; /* work area for huft_build */ + + /* allocate work area */ + if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) + return Z_MEM_ERROR; + + /* build literal/length tree */ + r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v); + if (r != Z_OK || *bl == 0) + { + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed literal/length tree"; + else if (r != Z_MEM_ERROR) + { + z->msg = (char*)"incomplete literal/length tree"; + r = Z_DATA_ERROR; + } + ZFREE(z, v); + return r; + } + + /* build distance tree */ + r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v); + if (r != Z_OK || (*bd == 0 && nl > 257)) + { + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed distance tree"; + else if (r == Z_BUF_ERROR) { +#ifdef PKZIP_BUG_WORKAROUND + r = Z_OK; + } +#else + z->msg = (char*)"incomplete distance tree"; + r = Z_DATA_ERROR; + } + else if (r != Z_MEM_ERROR) + { + z->msg = (char*)"empty distance tree with lengths"; + r = Z_DATA_ERROR; + } + ZFREE(z, v); + return r; +#endif + } + + /* done */ + ZFREE(z, v); + return Z_OK; +} + + +/* build fixed tables only once--keep them here */ +#ifdef BUILDFIXED +local int fixed_built = 0; +#define FIXEDH 544 /* number of hufts used by fixed tables */ +local inflate_huft fixed_mem[FIXEDH]; +local uInt fixed_bl; +local uInt fixed_bd; +local inflate_huft *fixed_tl; +local inflate_huft *fixed_td; +#else +#include "inffixed.h" +#endif + + +int inflate_trees_fixed(bl, bd, tl, td, z) +uIntf *bl; /* literal desired/actual bit depth */ +uIntf *bd; /* distance desired/actual bit depth */ +inflate_huft * FAR *tl; /* literal/length tree result */ +inflate_huft * FAR *td; /* distance tree result */ +z_streamp z; /* for memory allocation */ +{ +#ifdef BUILDFIXED + /* build fixed tables if not already */ + if (!fixed_built) + { + int k; /* temporary variable */ + uInt f = 0; /* number of hufts used in fixed_mem */ + uIntf *c; /* length list for huft_build */ + uIntf *v; /* work area for huft_build */ + + /* allocate memory */ + if ((c = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) + return Z_MEM_ERROR; + if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) + { + ZFREE(z, c); + return Z_MEM_ERROR; + } + + /* literal table */ + for (k = 0; k < 144; k++) + c[k] = 8; + for (; k < 256; k++) + c[k] = 9; + for (; k < 280; k++) + c[k] = 7; + for (; k < 288; k++) + c[k] = 8; + fixed_bl = 9; + huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, + fixed_mem, &f, v); + + /* distance table */ + for (k = 0; k < 30; k++) + c[k] = 5; + fixed_bd = 5; + huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, + fixed_mem, &f, v); + + /* done */ + ZFREE(z, v); + ZFREE(z, c); + fixed_built = 1; + } +#endif + *bl = fixed_bl; + *bd = fixed_bd; + *tl = fixed_tl; + *td = fixed_td; + return Z_OK; +} diff --git a/src/utilfuns/zlib/inftrees.h b/src/utilfuns/zlib/inftrees.h new file mode 100644 index 0000000..04b73b7 --- /dev/null +++ b/src/utilfuns/zlib/inftrees.h @@ -0,0 +1,58 @@ +/* inftrees.h -- header to use inftrees.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Huffman code lookup table entry--this entry is four bytes for machines + that have 16-bit pointers (e.g. PC's in the small or medium model). */ + +typedef struct inflate_huft_s FAR inflate_huft; + +struct inflate_huft_s { + union { + struct { + Byte Exop; /* number of extra bits or operation */ + Byte Bits; /* number of bits in this code or subcode */ + } what; + uInt pad; /* pad structure to a power of 2 (4 bytes for */ + } word; /* 16-bit, 8 bytes for 32-bit int's) */ + uInt base; /* literal, length base, distance base, + or table offset */ +}; + +/* Maximum size of dynamic tree. The maximum found in a long but non- + exhaustive search was 1004 huft structures (850 for length/literals + and 154 for distances, the latter actually the result of an + exhaustive search). The actual maximum is not known, but the + value below is more than safe. */ +#define MANY 1440 + +extern int inflate_trees_bits OF(( + uIntf *, /* 19 code lengths */ + uIntf *, /* bits tree desired/actual depth */ + inflate_huft * FAR *, /* bits tree result */ + inflate_huft *, /* space for trees */ + z_streamp)); /* for messages */ + +extern int inflate_trees_dynamic OF(( + uInt, /* number of literal/length codes */ + uInt, /* number of distance codes */ + uIntf *, /* that many (total) code lengths */ + uIntf *, /* literal desired/actual bit depth */ + uIntf *, /* distance desired/actual bit depth */ + inflate_huft * FAR *, /* literal/length tree result */ + inflate_huft * FAR *, /* distance tree result */ + inflate_huft *, /* space for trees */ + z_streamp)); /* for messages */ + +extern int inflate_trees_fixed OF(( + uIntf *, /* literal desired/actual bit depth */ + uIntf *, /* distance desired/actual bit depth */ + inflate_huft * FAR *, /* literal/length tree result */ + inflate_huft * FAR *, /* distance tree result */ + z_streamp)); /* for memory allocation */ diff --git a/src/utilfuns/zlib/infutil.c b/src/utilfuns/zlib/infutil.c new file mode 100644 index 0000000..9a07622 --- /dev/null +++ b/src/utilfuns/zlib/infutil.c @@ -0,0 +1,87 @@ +/* inflate_util.c -- data and routines common to blocks and codes + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infblock.h" +#include "inftrees.h" +#include "infcodes.h" +#include "infutil.h" + +struct inflate_codes_state {int dummy;}; /* for buggy compilers */ + +/* And'ing with mask[n] masks the lower n bits */ +uInt inflate_mask[17] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + + +/* copy as much as possible from the sliding window to the output area */ +int inflate_flush(s, z, r) +inflate_blocks_statef *s; +z_streamp z; +int r; +{ + uInt n; + Bytef *p; + Bytef *q; + + /* local copies of source and destination pointers */ + p = z->next_out; + q = s->read; + + /* compute number of bytes to copy as far as end of window */ + n = (uInt)((q <= s->write ? s->write : s->end) - q); + if (n > z->avail_out) n = z->avail_out; + if (n && r == Z_BUF_ERROR) r = Z_OK; + + /* update counters */ + z->avail_out -= n; + z->total_out += n; + + /* update check information */ + if (s->checkfn != Z_NULL) + z->adler = s->check = (*s->checkfn)(s->check, q, n); + + /* copy as far as end of window */ + zmemcpy(p, q, n); + p += n; + q += n; + + /* see if more to copy at beginning of window */ + if (q == s->end) + { + /* wrap pointers */ + q = s->window; + if (s->write == s->end) + s->write = s->window; + + /* compute bytes to copy */ + n = (uInt)(s->write - q); + if (n > z->avail_out) n = z->avail_out; + if (n && r == Z_BUF_ERROR) r = Z_OK; + + /* update counters */ + z->avail_out -= n; + z->total_out += n; + + /* update check information */ + if (s->checkfn != Z_NULL) + z->adler = s->check = (*s->checkfn)(s->check, q, n); + + /* copy */ + zmemcpy(p, q, n); + p += n; + q += n; + } + + /* update pointers */ + z->next_out = p; + s->read = q; + + /* done */ + return r; +} diff --git a/src/utilfuns/zlib/infutil.h b/src/utilfuns/zlib/infutil.h new file mode 100644 index 0000000..4401df8 --- /dev/null +++ b/src/utilfuns/zlib/infutil.h @@ -0,0 +1,98 @@ +/* infutil.h -- types and macros common to blocks and codes + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +#ifndef _INFUTIL_H +#define _INFUTIL_H + +typedef enum { + TYPE, /* get type bits (3, including end bit) */ + LENS, /* get lengths for stored */ + STORED, /* processing stored block */ + TABLE, /* get table lengths */ + BTREE, /* get bit lengths tree for a dynamic block */ + DTREE, /* get length, distance trees for a dynamic block */ + CODES, /* processing fixed or dynamic block */ + DRY, /* output remaining window bytes */ + DONE, /* finished last block, done */ + BAD} /* got a data error--stuck here */ +inflate_block_mode; + +/* inflate blocks semi-private state */ +struct inflate_blocks_state { + + /* mode */ + inflate_block_mode mode; /* current inflate_block mode */ + + /* mode dependent information */ + union { + uInt left; /* if STORED, bytes left to copy */ + struct { + uInt table; /* table lengths (14 bits) */ + uInt index; /* index into blens (or border) */ + uIntf *blens; /* bit lengths of codes */ + uInt bb; /* bit length tree depth */ + inflate_huft *tb; /* bit length decoding tree */ + } trees; /* if DTREE, decoding info for trees */ + struct { + inflate_codes_statef + *codes; + } decode; /* if CODES, current state */ + } sub; /* submode */ + uInt last; /* true if this block is the last block */ + + /* mode independent information */ + uInt bitk; /* bits in bit buffer */ + uLong bitb; /* bit buffer */ + inflate_huft *hufts; /* single malloc for tree space */ + Bytef *window; /* sliding window */ + Bytef *end; /* one byte after sliding window */ + Bytef *read; /* window read pointer */ + Bytef *write; /* window write pointer */ + check_func checkfn; /* check function */ + uLong check; /* check on output */ + +}; + + +/* defines for inflate input/output */ +/* update pointers and return */ +#define UPDBITS {s->bitb=b;s->bitk=k;} +#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;} +#define UPDOUT {s->write=q;} +#define UPDATE {UPDBITS UPDIN UPDOUT} +#define LEAVE {UPDATE return inflate_flush(s,z,r);} +/* get bytes and bits */ +#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;} +#define NEEDBYTE {if(n)r=Z_OK;else LEAVE} +#define NEXTBYTE (n--,*p++) +#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<>=(j);k-=(j);} +/* output bytes */ +#define WAVAIL (uInt)(qread?s->read-q-1:s->end-q) +#define LOADOUT {q=s->write;m=(uInt)WAVAIL;} +#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}} +#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT} +#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;} +#define OUTBYTE(a) {*q++=(Byte)(a);m--;} +/* load local pointers */ +#define LOAD {LOADIN LOADOUT} + +/* masks for lower bits (size given to avoid silly warnings with Visual C++) */ +extern uInt inflate_mask[17]; + +/* copy as much as possible from the sliding window to the output area */ +extern int inflate_flush OF(( + inflate_blocks_statef *, + z_streamp , + int)); + +struct internal_state {int dummy;}; /* for buggy compilers */ + +#endif diff --git a/src/utilfuns/zlib/maketree.c b/src/utilfuns/zlib/maketree.c new file mode 100644 index 0000000..a16d4b1 --- /dev/null +++ b/src/utilfuns/zlib/maketree.c @@ -0,0 +1,85 @@ +/* maketree.c -- make inffixed.h table for decoding fixed codes + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* This program is included in the distribution for completeness. + You do not need to compile or run this program since inffixed.h + is already included in the distribution. To use this program + you need to compile zlib with BUILDFIXED defined and then compile + and link this program with the zlib library. Then the output of + this program can be piped to inffixed.h. */ + +#include +#include +#include "zutil.h" +#include "inftrees.h" + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* generate initialization table for an inflate_huft structure array */ +void maketree(uInt b, inflate_huft *t) +{ + int i, e; + + i = 0; + while (1) + { + e = t[i].exop; + if (e && (e & (16+64)) == 0) /* table pointer */ + { + fprintf(stderr, "maketree: cannot initialize sub-tables!\n"); + exit(1); + } + if (i % 4 == 0) + printf("\n "); + printf(" {{{%u,%u}},%u}", t[i].exop, t[i].bits, t[i].base); + if (++i == (1< +#endif + +/* =========================================================================== + * Constants + */ + +#define MAX_BL_BITS 7 +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +#define END_BLOCK 256 +/* end of block literal code */ + +#define REP_3_6 16 +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +#define REPZ_3_10 17 +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +#define REPZ_11_138 18 +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ + = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; + +local const int extra_dbits[D_CODES] /* extra bits for each distance code */ + = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; + +local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ + = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; + +local const uch bl_order[BL_CODES] + = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +#define Buf_size (8 * 2*sizeof(char)) +/* Number of bits used within bi_buf. (bi_buf might be implemented on + * more than 16 bits on some systems.) + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ + +#if defined(GEN_TREES_H) || !defined(STDC) +/* non ANSI compilers may not accept trees.h */ + +local ct_data static_ltree[L_CODES+2]; +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +local ct_data static_dtree[D_CODES]; +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +uch _dist_code[DIST_CODE_LEN]; +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +uch _length_code[MAX_MATCH-MIN_MATCH+1]; +/* length code for each normalized match length (0 == MIN_MATCH) */ + +local int base_length[LENGTH_CODES]; +/* First normalized length for each code (0 = MIN_MATCH) */ + +local int base_dist[D_CODES]; +/* First normalized distance for each code (0 = distance of 1) */ + +#else +# include "trees.h" +#endif /* GEN_TREES_H */ + +struct static_tree_desc_s { + const ct_data *static_tree; /* static tree or NULL */ + const intf *extra_bits; /* extra bits for each code or NULL */ + int extra_base; /* base index for extra_bits */ + int elems; /* max number of elements in the tree */ + int max_length; /* max bit length for the codes */ +}; + +local static_tree_desc static_l_desc = +{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; + +local static_tree_desc static_d_desc = +{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; + +local static_tree_desc static_bl_desc = +{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; + +/* =========================================================================== + * Local (static) routines in this file. + */ + +local void tr_static_init OF((void)); +local void init_block OF((deflate_state *s)); +local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); +local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); +local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); +local void build_tree OF((deflate_state *s, tree_desc *desc)); +local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local int build_bl_tree OF((deflate_state *s)); +local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, + int blcodes)); +local void compress_block OF((deflate_state *s, ct_data *ltree, + ct_data *dtree)); +local void set_data_type OF((deflate_state *s)); +local unsigned bi_reverse OF((unsigned value, int length)); +local void bi_windup OF((deflate_state *s)); +local void bi_flush OF((deflate_state *s)); +local void copy_block OF((deflate_state *s, charf *buf, unsigned len, + int header)); + +#ifdef GEN_TREES_H +local void gen_trees_header OF((void)); +#endif + +#ifndef DEBUG +# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) + /* Send a code of the given tree. c and tree must not have side effects */ + +#else /* DEBUG */ +# define send_code(s, c, tree) \ + { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ + send_bits(s, tree[c].Code, tree[c].Len); } +#endif + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +#define put_short(s, w) { \ + put_byte(s, (uch)((w) & 0xff)); \ + put_byte(s, (uch)((ush)(w) >> 8)); \ +} + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +#ifdef DEBUG +local void send_bits OF((deflate_state *s, int value, int length)); + +local void send_bits(s, value, length) + deflate_state *s; + int value; /* value to send */ + int length; /* number of bits */ +{ + Tracevv((stderr," l %2d v %4x ", length, value)); + Assert(length > 0 && length <= 15, "invalid length"); + s->bits_sent += (ulg)length; + + /* If not enough room in bi_buf, use (valid) bits from bi_buf and + * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) + * unused bits in value. + */ + if (s->bi_valid > (int)Buf_size - length) { + s->bi_buf |= (value << s->bi_valid); + put_short(s, s->bi_buf); + s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); + s->bi_valid += length - Buf_size; + } else { + s->bi_buf |= value << s->bi_valid; + s->bi_valid += length; + } +} +#else /* !DEBUG */ + +#define send_bits(s, value, length) \ +{ int len = length;\ + if (s->bi_valid > (int)Buf_size - len) {\ + int val = value;\ + s->bi_buf |= (val << s->bi_valid);\ + put_short(s, s->bi_buf);\ + s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ + s->bi_valid += len - Buf_size;\ + } else {\ + s->bi_buf |= (value) << s->bi_valid;\ + s->bi_valid += len;\ + }\ +} +#endif /* DEBUG */ + + +#define MAX(a,b) (a >= b ? a : b) +/* the arguments must not have side effects */ + +/* =========================================================================== + * Initialize the various 'constant' tables. + */ +local void tr_static_init() +{ +#if defined(GEN_TREES_H) || !defined(STDC) + static int static_init_done = 0; + int n; /* iterates over tree elements */ + int bits; /* bit counter */ + int length; /* length value */ + int code; /* code value */ + int dist; /* distance index */ + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + if (static_init_done) return; + + /* For some embedded targets, global variables are not initialized: */ + static_l_desc.static_tree = static_ltree; + static_l_desc.extra_bits = extra_lbits; + static_d_desc.static_tree = static_dtree; + static_d_desc.extra_bits = extra_dbits; + static_bl_desc.extra_bits = extra_blbits; + + /* Initialize the mapping length (0..255) -> length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES-1; code++) { + base_length[code] = length; + for (n = 0; n < (1< dist code (0..29) */ + dist = 0; + for (code = 0 ; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ + for ( ; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { + _dist_code[256 + dist++] = (uch)code; + } + } + Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; + n = 0; + while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; + while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; + while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; + while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n].Len = 5; + static_dtree[n].Code = bi_reverse((unsigned)n, 5); + } + static_init_done = 1; + +# ifdef GEN_TREES_H + gen_trees_header(); +# endif +#endif /* defined(GEN_TREES_H) || !defined(STDC) */ +} + +/* =========================================================================== + * Genererate the file trees.h describing the static trees. + */ +#ifdef GEN_TREES_H +# ifndef DEBUG +# include +# endif + +# define SEPARATOR(i, last, width) \ + ((i) == (last)? "\n};\n\n" : \ + ((i) % (width) == (width)-1 ? ",\n" : ", ")) + +void gen_trees_header() +{ + FILE *header = fopen("trees.h", "w"); + int i; + + Assert (header != NULL, "Can't open trees.h"); + fprintf(header, + "/* header created automatically with -DGEN_TREES_H */\n\n"); + + fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); + for (i = 0; i < L_CODES+2; i++) { + fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, + static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); + } + + fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, + static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); + } + + fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n"); + for (i = 0; i < DIST_CODE_LEN; i++) { + fprintf(header, "%2u%s", _dist_code[i], + SEPARATOR(i, DIST_CODE_LEN-1, 20)); + } + + fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); + for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { + fprintf(header, "%2u%s", _length_code[i], + SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); + } + + fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); + for (i = 0; i < LENGTH_CODES; i++) { + fprintf(header, "%1u%s", base_length[i], + SEPARATOR(i, LENGTH_CODES-1, 20)); + } + + fprintf(header, "local const int base_dist[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "%5u%s", base_dist[i], + SEPARATOR(i, D_CODES-1, 10)); + } + + fclose(header); +} +#endif /* GEN_TREES_H */ + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +void _tr_init(s) + deflate_state *s; +{ + tr_static_init(); + + s->l_desc.dyn_tree = s->dyn_ltree; + s->l_desc.stat_desc = &static_l_desc; + + s->d_desc.dyn_tree = s->dyn_dtree; + s->d_desc.stat_desc = &static_d_desc; + + s->bl_desc.dyn_tree = s->bl_tree; + s->bl_desc.stat_desc = &static_bl_desc; + + s->bi_buf = 0; + s->bi_valid = 0; + s->last_eob_len = 8; /* enough lookahead for inflate */ +#ifdef DEBUG + s->compressed_len = 0L; + s->bits_sent = 0L; +#endif + + /* Initialize the first block of the first file: */ + init_block(s); +} + +/* =========================================================================== + * Initialize a new block. + */ +local void init_block(s) + deflate_state *s; +{ + int n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; + for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; + for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; + + s->dyn_ltree[END_BLOCK].Freq = 1; + s->opt_len = s->static_len = 0L; + s->last_lit = s->matches = 0; +} + +#define SMALLEST 1 +/* Index within the heap array of least frequent node in the Huffman tree */ + + +/* =========================================================================== + * Remove the smallest element from the heap and recreate the heap with + * one less element. Updates heap and heap_len. + */ +#define pqremove(s, tree, top) \ +{\ + top = s->heap[SMALLEST]; \ + s->heap[SMALLEST] = s->heap[s->heap_len--]; \ + pqdownheap(s, tree, SMALLEST); \ +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +#define smaller(tree, n, m, depth) \ + (tree[n].Freq < tree[m].Freq || \ + (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +local void pqdownheap(s, tree, k) + deflate_state *s; + ct_data *tree; /* the tree to restore */ + int k; /* node to move down */ +{ + int v = s->heap[k]; + int j = k << 1; /* left son of k */ + while (j <= s->heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s->heap_len && + smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s->heap[j], s->depth)) break; + + /* Exchange v with the smallest son */ + s->heap[k] = s->heap[j]; k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s->heap[k] = v; +} + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +local void gen_bitlen(s, desc) + deflate_state *s; + tree_desc *desc; /* the tree descriptor */ +{ + ct_data *tree = desc->dyn_tree; + int max_code = desc->max_code; + const ct_data *stree = desc->stat_desc->static_tree; + const intf *extra = desc->stat_desc->extra_bits; + int base = desc->stat_desc->extra_base; + int max_length = desc->stat_desc->max_length; + int h; /* heap index */ + int n, m; /* iterate over the tree elements */ + int bits; /* bit length */ + int xbits; /* extra bits */ + ush f; /* frequency */ + int overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ + + for (h = s->heap_max+1; h < HEAP_SIZE; h++) { + n = s->heap[h]; + bits = tree[tree[n].Dad].Len + 1; + if (bits > max_length) bits = max_length, overflow++; + tree[n].Len = (ush)bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) continue; /* not a leaf node */ + + s->bl_count[bits]++; + xbits = 0; + if (n >= base) xbits = extra[n-base]; + f = tree[n].Freq; + s->opt_len += (ulg)f * (bits + xbits); + if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); + } + if (overflow == 0) return; + + Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length-1; + while (s->bl_count[bits] == 0) bits--; + s->bl_count[bits]--; /* move one leaf down the tree */ + s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ + s->bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits != 0; bits--) { + n = s->bl_count[bits]; + while (n != 0) { + m = s->heap[--h]; + if (m > max_code) continue; + if (tree[m].Len != (unsigned) bits) { + Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s->opt_len += ((long)bits - (long)tree[m].Len) + *(long)tree[m].Freq; + tree[m].Len = (ush)bits; + } + n--; + } + } +} + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +local void gen_codes (tree, max_code, bl_count) + ct_data *tree; /* the tree to decorate */ + int max_code; /* largest code with non zero frequency */ + ushf *bl_count; /* number of codes at each bit length */ +{ + ush next_code[MAX_BITS+1]; /* next code value for each bit length */ + ush code = 0; /* running code value */ + int bits; /* bit index */ + int n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits-1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; + const ct_data *stree = desc->stat_desc->static_tree; + int elems = desc->stat_desc->elems; + int n, m; /* iterate over heap elements */ + int max_code = -1; /* largest code with non zero frequency */ + int node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s->heap_len = 0, s->heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n].Freq != 0) { + s->heap[++(s->heap_len)] = max_code = n; + s->depth[n] = 0; + } else { + tree[n].Len = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s->heap_len < 2) { + node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); + tree[node].Freq = 1; + s->depth[node] = 0; + s->opt_len--; if (stree) s->static_len -= stree[node].Len; + /* node is 0 or 1 so it does not have extra bits */ + } + desc->max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + pqremove(s, tree, n); /* n = node of least frequency */ + m = s->heap[SMALLEST]; /* m = node of next least frequency */ + + s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ + s->heap[--(s->heap_max)] = m; + + /* Create a new node father of n and m */ + tree[node].Freq = tree[n].Freq + tree[m].Freq; + s->depth[node] = (uch) (MAX(s->depth[n], s->depth[m]) + 1); + tree[n].Dad = tree[m].Dad = (ush)node; +#ifdef DUMP_BL_TREE + if (tree == s->bl_tree) { + fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", + node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); + } +#endif + /* and insert the new node in the heap */ + s->heap[SMALLEST] = node++; + pqdownheap(s, tree, SMALLEST); + + } while (s->heap_len >= 2); + + s->heap[--(s->heap_max)] = s->heap[SMALLEST]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, (tree_desc *)desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes ((ct_data *)tree, max_code, s->bl_count); +} + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +local void scan_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + if (nextlen == 0) max_count = 138, min_count = 3; + tree[max_code+1].Len = (ush)0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + s->bl_tree[curlen].Freq += count; + } else if (curlen != 0) { + if (curlen != prevlen) s->bl_tree[curlen].Freq++; + s->bl_tree[REP_3_6].Freq++; + } else if (count <= 10) { + s->bl_tree[REPZ_3_10].Freq++; + } else { + s->bl_tree[REPZ_11_138].Freq++; + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +local void send_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen == 0) max_count = 138, min_count = 3; + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + do { send_code(s, curlen, s->bl_tree); } while (--count != 0); + + } else if (curlen != 0) { + if (curlen != prevlen) { + send_code(s, curlen, s->bl_tree); count--; + } + Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); + + } else { + send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +local int build_bl_tree(s) + deflate_state *s; +{ + int max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); + scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, (tree_desc *)(&(s->bl_desc))); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { + if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; + } + /* Update opt_len to include the bit length tree and counts */ + s->opt_len += 3*(max_blindex+1) + 5+5+4; + Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + s->opt_len, s->static_len)); + + return max_blindex; +} + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +local void send_all_trees(s, lcodes, dcodes, blcodes) + deflate_state *s; + int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + int rank; /* index in bl_order */ + + Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + "too many codes"); + Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes-1, 5); + send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); + } + Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ + Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ + Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + +/* =========================================================================== + * Send a stored block + */ +void _tr_stored_block(s, buf, stored_len, eof) + deflate_state *s; + charf *buf; /* input block */ + ulg stored_len; /* length of input block */ + int eof; /* true if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */ +#ifdef DEBUG + s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; + s->compressed_len += (stored_len + 4) << 3; +#endif + copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ +} + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + * The current inflate code requires 9 bits of lookahead. If the + * last two codes for the previous block (real code plus EOB) were coded + * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode + * the last real code. In this case we send two empty static blocks instead + * of one. (There are no problems if the previous block is stored or fixed.) + * To simplify the code, we assume the worst case of last real code encoded + * on one bit only. + */ +void _tr_align(s) + deflate_state *s; +{ + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef DEBUG + s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ +#endif + bi_flush(s); + /* Of the 10 bits for the empty block, we have already sent + * (10 - bi_valid) bits. The lookahead for the last real code (before + * the EOB of the previous block) was thus at least one plus the length + * of the EOB plus what we have just sent of the empty static block. + */ + if (1 + s->last_eob_len + 10 - s->bi_valid < 9) { + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef DEBUG + s->compressed_len += 10L; +#endif + bi_flush(s); + } + s->last_eob_len = 7; +} + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +void _tr_flush_block(s, buf, stored_len, eof) + deflate_state *s; + charf *buf; /* input block, or NULL if too old */ + ulg stored_len; /* length of input block */ + int eof; /* true if this is the last block for a file */ +{ + ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + int max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s->level > 0) { + + /* Check if the file is ascii or binary */ + if (s->data_type == Z_UNKNOWN) set_data_type(s); + + /* Construct the literal and distance trees */ + build_tree(s, (tree_desc *)(&(s->l_desc))); + Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + + build_tree(s, (tree_desc *)(&(s->d_desc))); + Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute first the block length in bytes*/ + opt_lenb = (s->opt_len+3+7)>>3; + static_lenb = (s->static_len+3+7)>>3; + + Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + s->last_lit)); + + if (static_lenb <= opt_lenb) opt_lenb = static_lenb; + + } else { + Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + +#ifdef FORCE_STORED + if (buf != (char*)0) { /* force stored block */ +#else + if (stored_len+4 <= opt_lenb && buf != (char*)0) { + /* 4: two words for the lengths */ +#endif + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, eof); + +#ifdef FORCE_STATIC + } else if (static_lenb >= 0) { /* force static trees */ +#else + } else if (static_lenb == opt_lenb) { +#endif + send_bits(s, (STATIC_TREES<<1)+eof, 3); + compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); +#ifdef DEBUG + s->compressed_len += 3 + s->static_len; +#endif + } else { + send_bits(s, (DYN_TREES<<1)+eof, 3); + send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, + max_blindex+1); + compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); +#ifdef DEBUG + s->compressed_len += 3 + s->opt_len; +#endif + } + Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (eof) { + bi_windup(s); +#ifdef DEBUG + s->compressed_len += 7; /* align on byte boundary */ +#endif + } + Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + s->compressed_len-7*eof)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +int _tr_tally (s, dist, lc) + deflate_state *s; + unsigned dist; /* distance of matched string */ + unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + s->d_buf[s->last_lit] = (ush)dist; + s->l_buf[s->last_lit++] = (uch)lc; + if (dist == 0) { + /* lc is the unmatched char */ + s->dyn_ltree[lc].Freq++; + } else { + s->matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + Assert((ush)dist < (ush)MAX_DIST(s) && + (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; + s->dyn_dtree[d_code(dist)].Freq++; + } + +#ifdef TRUNCATE_BLOCK + /* Try to guess if it is profitable to stop the current block here */ + if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { + /* Compute an upper bound for the compressed length */ + ulg out_length = (ulg)s->last_lit*8L; + ulg in_length = (ulg)((long)s->strstart - s->block_start); + int dcode; + for (dcode = 0; dcode < D_CODES; dcode++) { + out_length += (ulg)s->dyn_dtree[dcode].Freq * + (5L+extra_dbits[dcode]); + } + out_length >>= 3; + Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", + s->last_lit, in_length, out_length, + 100L - out_length*100L/in_length)); + if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; + } +#endif + return (s->last_lit == s->lit_bufsize-1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +local void compress_block(s, ltree, dtree) + deflate_state *s; + ct_data *ltree; /* literal tree */ + ct_data *dtree; /* distance tree */ +{ + unsigned dist; /* distance of matched string */ + int lc; /* match length or unmatched char (if dist == 0) */ + unsigned lx = 0; /* running index in l_buf */ + unsigned code; /* the code to send */ + int extra; /* number of extra bits to send */ + + if (s->last_lit != 0) do { + dist = s->d_buf[lx]; + lc = s->l_buf[lx++]; + if (dist == 0) { + send_code(s, lc, ltree); /* send a literal byte */ + Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code+LITERALS+1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra != 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra != 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow"); + + } while (lx < s->last_lit); + + send_code(s, END_BLOCK, ltree); + s->last_eob_len = ltree[END_BLOCK].Len; +} + +/* =========================================================================== + * Set the data type to ASCII or BINARY, using a crude approximation: + * binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise. + * IN assertion: the fields freq of dyn_ltree are set and the total of all + * frequencies does not exceed 64K (to fit in an int on 16 bit machines). + */ +local void set_data_type(s) + deflate_state *s; +{ + int n = 0; + unsigned ascii_freq = 0; + unsigned bin_freq = 0; + while (n < 7) bin_freq += s->dyn_ltree[n++].Freq; + while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq; + while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq; + s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII); +} + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +local unsigned bi_reverse(code, len) + unsigned code; /* the value to invert */ + int len; /* its bit length */ +{ + register unsigned res = 0; + do { + res |= code & 1; + code >>= 1, res <<= 1; + } while (--len > 0); + return res >> 1; +} + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +local void bi_flush(s) + deflate_state *s; +{ + if (s->bi_valid == 16) { + put_short(s, s->bi_buf); + s->bi_buf = 0; + s->bi_valid = 0; + } else if (s->bi_valid >= 8) { + put_byte(s, (Byte)s->bi_buf); + s->bi_buf >>= 8; + s->bi_valid -= 8; + } +} + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +local void bi_windup(s) + deflate_state *s; +{ + if (s->bi_valid > 8) { + put_short(s, s->bi_buf); + } else if (s->bi_valid > 0) { + put_byte(s, (Byte)s->bi_buf); + } + s->bi_buf = 0; + s->bi_valid = 0; +#ifdef DEBUG + s->bits_sent = (s->bits_sent+7) & ~7; +#endif +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +local void copy_block(s, buf, len, header) + deflate_state *s; + charf *buf; /* the input data */ + unsigned len; /* its length */ + int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + s->last_eob_len = 8; /* enough lookahead for inflate */ + + if (header) { + put_short(s, (ush)len); + put_short(s, (ush)~len); +#ifdef DEBUG + s->bits_sent += 2*16; +#endif + } +#ifdef DEBUG + s->bits_sent += (ulg)len<<3; +#endif + while (len--) { + put_byte(s, *buf++); + } +} diff --git a/src/utilfuns/zlib/trees.h b/src/utilfuns/zlib/trees.h new file mode 100644 index 0000000..72facf9 --- /dev/null +++ b/src/utilfuns/zlib/trees.h @@ -0,0 +1,128 @@ +/* header created automatically with -DGEN_TREES_H */ + +local const ct_data static_ltree[L_CODES+2] = { +{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, +{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, +{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, +{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, +{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, +{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, +{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, +{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, +{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, +{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, +{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, +{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, +{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, +{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, +{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, +{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, +{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, +{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, +{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, +{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, +{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, +{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, +{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, +{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, +{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, +{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, +{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, +{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, +{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, +{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, +{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, +{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, +{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, +{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, +{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, +{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, +{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, +{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, +{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, +{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, +{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, +{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, +{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, +{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, +{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, +{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, +{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, +{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, +{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, +{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, +{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, +{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, +{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, +{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, +{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, +{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, +{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, +{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} +}; + +local const ct_data static_dtree[D_CODES] = { +{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, +{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, +{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, +{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, +{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, +{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} +}; + +const uch _dist_code[DIST_CODE_LEN] = { + 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, +12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, +18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 +}; + +const uch _length_code[MAX_MATCH-MIN_MATCH+1]= { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, +13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, +17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, +19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 +}; + +local const int base_length[LENGTH_CODES] = { +0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, +64, 80, 96, 112, 128, 160, 192, 224, 0 +}; + +local const int base_dist[D_CODES] = { + 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, + 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, + 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 +}; + diff --git a/src/utilfuns/zlib/uncompr.c b/src/utilfuns/zlib/uncompr.c new file mode 100644 index 0000000..45a4687 --- /dev/null +++ b/src/utilfuns/zlib/uncompr.c @@ -0,0 +1,58 @@ +/* uncompr.c -- decompress a memory buffer + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: uncompr.c 1688 2005-01-01 04:42:26Z scribe $ */ + +#include "zlib.h" + +/* =========================================================================== + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +*/ +int ZEXPORT uncompress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + z_stream stream; + int err; + + stream.next_in = (Bytef*)source; + stream.avail_in = (uInt)sourceLen; + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; + + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + + err = inflateInit(&stream); + if (err != Z_OK) return err; + + err = inflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + inflateEnd(&stream); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *destLen = stream.total_out; + + err = inflateEnd(&stream); + return err; +} diff --git a/src/utilfuns/zlib/untgz.c b/src/utilfuns/zlib/untgz.c new file mode 100644 index 0000000..2919656 --- /dev/null +++ b/src/utilfuns/zlib/untgz.c @@ -0,0 +1,436 @@ +/* + * untgz.c -- Display contents and/or extract file from + * a gzip'd TAR file + * written by "Pedro A. Aranda Guti\irrez" + * adaptation to Unix by Jean-loup Gailly + */ + +#include +#include +#include +#include +#include +#include +#ifdef unix +# include +#else +# include +# include +#endif + +#include "zlib.h" + +#ifdef WIN32 +# include +# ifndef F_OK +# define F_OK (0) +# endif +# ifdef _MSC_VER +# define mkdir(dirname,mode) _mkdir(dirname) +# define strdup(str) _strdup(str) +# define unlink(fn) _unlink(fn) +# define access(path,mode) _access(path,mode) +# else +# define mkdir(dirname,mode) _mkdir(dirname) +# endif +#else +# include +#endif + + +/* Values used in typeflag field. */ + +#define REGTYPE '0' /* regular file */ +#define AREGTYPE '\0' /* regular file */ +#define LNKTYPE '1' /* link */ +#define SYMTYPE '2' /* reserved */ +#define CHRTYPE '3' /* character special */ +#define BLKTYPE '4' /* block special */ +#define DIRTYPE '5' /* directory */ +#define FIFOTYPE '6' /* FIFO special */ +#define CONTTYPE '7' /* reserved */ + +#define BLOCKSIZE 512 + +struct tar_header +{ /* byte offset */ + char name[100]; /* 0 */ + char mode[8]; /* 100 */ + char uid[8]; /* 108 */ + char gid[8]; /* 116 */ + char size[12]; /* 124 */ + char mtime[12]; /* 136 */ + char chksum[8]; /* 148 */ + char typeflag; /* 156 */ + char linkname[100]; /* 157 */ + char magic[6]; /* 257 */ + char version[2]; /* 263 */ + char uname[32]; /* 265 */ + char gname[32]; /* 297 */ + char devmajor[8]; /* 329 */ + char devminor[8]; /* 337 */ + char prefix[155]; /* 345 */ + /* 500 */ +}; + +union tar_buffer { + char buffer[BLOCKSIZE]; + struct tar_header header; +}; + +enum { TGZ_EXTRACT = 0, TGZ_LIST }; + +static char *TGZfname OF((const char *)); +void TGZnotfound OF((const char *)); + +int getoct OF((char *, int)); +char *strtime OF((time_t *)); +int ExprMatch OF((char *,char *)); + +int makedir OF((char *)); +int matchname OF((int,int,char **,char *)); + +void error OF((const char *)); +int tar OF((gzFile, int, int, int, char **)); + +void help OF((int)); +int main OF((int, char **)); + +char *prog; + +/* This will give a benign warning */ + +static char *TGZprefix[] = { "\0", ".tgz", ".tar.gz", ".tar", NULL }; + +/* Return the real name of the TGZ archive */ +/* or NULL if it does not exist. */ + +static char *TGZfname OF((const char *fname)) +{ + static char buffer[1024]; + int origlen,i; + + strcpy(buffer,fname); + origlen = strlen(buffer); + + for (i=0; TGZprefix[i]; i++) + { + strcpy(buffer+origlen,TGZprefix[i]); + if (access(buffer,F_OK) == 0) + return buffer; + } + return NULL; +} + +/* error message for the filename */ + +void TGZnotfound OF((const char *fname)) +{ + int i; + + fprintf(stderr,"%s : couldn't find ",prog); + for (i=0;TGZprefix[i];i++) + fprintf(stderr,(TGZprefix[i+1]) ? "%s%s, " : "or %s%s\n", + fname, + TGZprefix[i]); + exit(1); +} + + +/* help functions */ + +int getoct(char *p,int width) +{ + int result = 0; + char c; + + while (width --) + { + c = *p++; + if (c == ' ') + continue; + if (c == 0) + break; + result = result * 8 + (c - '0'); + } + return result; +} + +char *strtime (time_t *t) +{ + struct tm *local; + static char result[32]; + + local = localtime(t); + sprintf(result,"%2d/%02d/%4d %02d:%02d:%02d", + local->tm_mday, local->tm_mon+1, local->tm_year+1900, + local->tm_hour, local->tm_min, local->tm_sec); + return result; +} + + +/* regular expression matching */ + +#define ISSPECIAL(c) (((c) == '*') || ((c) == '/')) + +int ExprMatch(char *string,char *expr) +{ + while (1) + { + if (ISSPECIAL(*expr)) + { + if (*expr == '/') + { + if (*string != '\\' && *string != '/') + return 0; + string ++; expr++; + } + else if (*expr == '*') + { + if (*expr ++ == 0) + return 1; + while (*++string != *expr) + if (*string == 0) + return 0; + } + } + else + { + if (*string != *expr) + return 0; + if (*expr++ == 0) + return 1; + string++; + } + } +} + +/* recursive make directory */ +/* abort if you get an ENOENT errno somewhere in the middle */ +/* e.g. ignore error "mkdir on existing directory" */ +/* */ +/* return 1 if OK */ +/* 0 on error */ + +int makedir (char *newdir) +{ + char *buffer = strdup(newdir); + char *p; + int len = strlen(buffer); + + if (len <= 0) { + free(buffer); + return 0; + } + if (buffer[len-1] == '/') { + buffer[len-1] = '\0'; + } + if (mkdir(buffer, 0775) == 0) + { + free(buffer); + return 1; + } + + p = buffer+1; + while (1) + { + char hold; + + while(*p && *p != '\\' && *p != '/') + p++; + hold = *p; + *p = 0; + if ((mkdir(buffer, 0775) == -1) && (errno == ENOENT)) + { + fprintf(stderr,"%s: couldn't create directory %s\n",prog,buffer); + free(buffer); + return 0; + } + if (hold == 0) + break; + *p++ = hold; + } + free(buffer); + return 1; +} + +int matchname (int arg,int argc,char **argv,char *fname) +{ + if (arg == argc) /* no arguments given (untgz tgzarchive) */ + return 1; + + while (arg < argc) + if (ExprMatch(fname,argv[arg++])) + return 1; + + return 0; /* ignore this for the moment being */ +} + + +/* Tar file list or extract */ + +int untar (gzFile in, const char *dest) { + union tar_buffer buffer; + int len; + int err; + int getheader = 1; + int remaining = 0; + FILE *outfile = NULL; + char fname[BLOCKSIZE]; + time_t tartime; + + while (1) { + len = gzread(in, &buffer, BLOCKSIZE); + if (len < 0) + error (gzerror(in, &err)); + /* + * Always expect complete blocks to process + * the tar information. + */ + if (len != BLOCKSIZE) + error("gzread: incomplete block read"); + + /* + * If we have to get a tar header + */ + if (getheader == 1) { + /* + * if we met the end of the tar + * or the end-of-tar block, + * we are done + */ + if ((len == 0) || (buffer.header.name[0]== 0)) break; + + tartime = (time_t)getoct(buffer.header.mtime,12); + strcpy(fname, dest); + if ((fname[strlen(fname)-1] != '/') && (fname[strlen(fname)-1] != '\\')) + strcat(fname, "/"); + strcat(fname, buffer.header.name); + + switch (buffer.header.typeflag) { + case DIRTYPE: + makedir(fname); + break; + case REGTYPE: + case AREGTYPE: + remaining = getoct(buffer.header.size,12); + if (remaining) { + outfile = fopen(fname,"wb"); + if (outfile == NULL) { + // try creating directory + char *p = strrchr(fname, '/'); + if (p != NULL) { + *p = '\0'; + makedir(fname); + *p = '/'; + outfile = fopen(fname,"wb"); + } + } +/* + fprintf(stderr, + "%s %s\n", + (outfile) ? "Extracting" : "Couldn't create", + fname); +*/ + } + else + outfile = NULL; + /* + * could have no contents + */ + getheader = (remaining) ? 0 : 1; + break; + default: + break; + } + } + else { + unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining; + + if (outfile != NULL) { + if (fwrite(&buffer,sizeof(char),bytes,outfile) != bytes) { + fprintf(stderr,"%s : error writing %s skipping...\n",prog,fname); + fclose(outfile); + unlink(fname); + } + } + remaining -= bytes; + if (remaining == 0) { + getheader = 1; + if (outfile != NULL) { +#ifdef WIN32 + HANDLE hFile; + FILETIME ftm,ftLocal; + SYSTEMTIME st; + struct tm localt; + + fclose(outfile); + + localt = *localtime(&tartime); + + hFile = CreateFile(fname, GENERIC_READ | GENERIC_WRITE, + 0, NULL, OPEN_EXISTING, 0, NULL); + + st.wYear = (WORD)localt.tm_year+1900; + st.wMonth = (WORD)localt.tm_mon; + st.wDayOfWeek = (WORD)localt.tm_wday; + st.wDay = (WORD)localt.tm_mday; + st.wHour = (WORD)localt.tm_hour; + st.wMinute = (WORD)localt.tm_min; + st.wSecond = (WORD)localt.tm_sec; + st.wMilliseconds = 0; + SystemTimeToFileTime(&st,&ftLocal); + LocalFileTimeToFileTime(&ftLocal,&ftm); + SetFileTime(hFile,&ftm,NULL,&ftm); + CloseHandle(hFile); + + outfile = NULL; +#else + struct utimbuf settime; + + settime.actime = settime.modtime = tartime; + + fclose(outfile); + outfile = NULL; + utime(fname,&settime); +#endif + } + } + } + } + return 0; +} + + +/* =========================================================== */ + +void help(int exitval) +{ + fprintf(stderr, + "untgz v 0.1\n" + " an sample application of zlib 1.0.4\n\n" + "Usage : untgz TGZfile to extract all files\n" + " untgz TGZfile fname ... to extract selected files\n" + " untgz -l TGZfile to list archive contents\n" + " untgz -h to display this help\n\n"); + exit(exitval); +} + +void error(const char *msg) +{ + fprintf(stderr, "%s: %s\n", prog, msg); + exit(1); +} + + +int untargz(int fd, const char *dest) { + gzFile *f; + + f = gzdopen(fd, "rb"); + if (f == NULL) { + fprintf(stderr,"%s: Couldn't gzopen file\n", prog); + return 1; + } + + return untar(f, dest); +} diff --git a/src/utilfuns/zlib/zutil.c b/src/utilfuns/zlib/zutil.c new file mode 100644 index 0000000..55e047c --- /dev/null +++ b/src/utilfuns/zlib/zutil.c @@ -0,0 +1,225 @@ +/* zutil.c -- target dependent utility functions for the compression library + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: zutil.c 1688 2005-01-01 04:42:26Z scribe $ */ + +#include "zutil.h" + +struct internal_state {int dummy;}; /* for buggy compilers */ + +#ifndef STDC +extern void exit OF((int)); +#endif + +const char *z_errmsg[10] = { +"need dictionary", /* Z_NEED_DICT 2 */ +"stream end", /* Z_STREAM_END 1 */ +"", /* Z_OK 0 */ +"file error", /* Z_ERRNO (-1) */ +"stream error", /* Z_STREAM_ERROR (-2) */ +"data error", /* Z_DATA_ERROR (-3) */ +"insufficient memory", /* Z_MEM_ERROR (-4) */ +"buffer error", /* Z_BUF_ERROR (-5) */ +"incompatible version",/* Z_VERSION_ERROR (-6) */ +""}; + + +const char * ZEXPORT zlibVersion() +{ + return ZLIB_VERSION; +} + +#ifdef DEBUG + +# ifndef verbose +# define verbose 0 +# endif +int z_verbose = verbose; + +void z_error (m) + char *m; +{ + fprintf(stderr, "%s\n", m); + exit(1); +} +#endif + +/* exported to allow conversion of error code to string for compress() and + * uncompress() + */ +const char * ZEXPORT zError(err) + int err; +{ + return ERR_MSG(err); +} + + +#ifndef HAVE_MEMCPY + +void zmemcpy(dest, source, len) + Bytef* dest; + const Bytef* source; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = *source++; /* ??? to be unrolled */ + } while (--len != 0); +} + +int zmemcmp(s1, s2, len) + const Bytef* s1; + const Bytef* s2; + uInt len; +{ + uInt j; + + for (j = 0; j < len; j++) { + if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; + } + return 0; +} + +void zmemzero(dest, len) + Bytef* dest; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = 0; /* ??? to be unrolled */ + } while (--len != 0); +} +#endif + +#ifdef __TURBOC__ +#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__) +/* Small and medium model in Turbo C are for now limited to near allocation + * with reduced MAX_WBITS and MAX_MEM_LEVEL + */ +# define MY_ZCALLOC + +/* Turbo C malloc() does not allow dynamic allocation of 64K bytes + * and farmalloc(64K) returns a pointer with an offset of 8, so we + * must fix the pointer. Warning: the pointer must be put back to its + * original form in order to free it, use zcfree(). + */ + +#define MAX_PTR 10 +/* 10*64K = 640K */ + +local int next_ptr = 0; + +typedef struct ptr_table_s { + voidpf org_ptr; + voidpf new_ptr; +} ptr_table; + +local ptr_table table[MAX_PTR]; +/* This table is used to remember the original form of pointers + * to large buffers (64K). Such pointers are normalized with a zero offset. + * Since MSDOS is not a preemptive multitasking OS, this table is not + * protected from concurrent access. This hack doesn't work anyway on + * a protected system like OS/2. Use Microsoft C instead. + */ + +voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + voidpf buf = opaque; /* just to make some compilers happy */ + ulg bsize = (ulg)items*size; + + /* If we allocate less than 65520 bytes, we assume that farmalloc + * will return a usable pointer which doesn't have to be normalized. + */ + if (bsize < 65520L) { + buf = farmalloc(bsize); + if (*(ush*)&buf != 0) return buf; + } else { + buf = farmalloc(bsize + 16L); + } + if (buf == NULL || next_ptr >= MAX_PTR) return NULL; + table[next_ptr].org_ptr = buf; + + /* Normalize the pointer to seg:0 */ + *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; + *(ush*)&buf = 0; + table[next_ptr++].new_ptr = buf; + return buf; +} + +void zcfree (voidpf opaque, voidpf ptr) +{ + int n; + if (*(ush*)&ptr != 0) { /* object < 64K */ + farfree(ptr); + return; + } + /* Find the original pointer */ + for (n = 0; n < next_ptr; n++) { + if (ptr != table[n].new_ptr) continue; + + farfree(table[n].org_ptr); + while (++n < next_ptr) { + table[n-1] = table[n]; + } + next_ptr--; + return; + } + ptr = opaque; /* just to make some compilers happy */ + Assert(0, "zcfree: ptr not found"); +} +#endif +#endif /* __TURBOC__ */ + + +#if defined(M_I86) && !defined(__32BIT__) +/* Microsoft C in 16-bit mode */ + +# define MY_ZCALLOC + +#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) +# define _halloc halloc +# define _hfree hfree +#endif + +voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + return _halloc((long)items, size); +} + +void zcfree (voidpf opaque, voidpf ptr) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + _hfree(ptr); +} + +#endif /* MSC */ + + +#ifndef MY_ZCALLOC /* Any system without a special alloc function */ + +#ifndef STDC +extern voidp calloc OF((uInt items, uInt size)); +extern void free OF((voidpf ptr)); +#endif + +voidpf zcalloc (opaque, items, size) + voidpf opaque; + unsigned items; + unsigned size; +{ + if (opaque) items += size - size; /* make compiler happy */ + return (voidpf)calloc(items, size); +} + +void zcfree (opaque, ptr) + voidpf opaque; + voidpf ptr; +{ + free(ptr); + if (opaque) return; /* make compiler happy */ +} + +#endif /* MY_ZCALLOC */ diff --git a/src/utilfuns/zlib/zutil.h b/src/utilfuns/zlib/zutil.h new file mode 100644 index 0000000..538fc57 --- /dev/null +++ b/src/utilfuns/zlib/zutil.h @@ -0,0 +1,220 @@ +/* zutil.h -- internal interface and configuration of the compression library + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id: zutil.h 1688 2005-01-01 04:42:26Z scribe $ */ + +#ifndef _Z_UTIL_H +#define _Z_UTIL_H + +#include "zlib.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +typedef unsigned char uch; +typedef uch FAR uchf; +typedef unsigned short ush; +typedef ush FAR ushf; +typedef unsigned long ulg; + +extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ +/* (size given to avoid silly warnings with Visual C++) */ + +#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] + +#define ERR_RETURN(strm,err) \ + return (strm->msg = (char*)ERR_MSG(err), (err)) +/* To be used only when the state is known to be valid */ + + /* common constants */ + +#ifndef DEF_WBITS +# define DEF_WBITS MAX_WBITS +#endif +/* default windowBits for decompression. MAX_WBITS is for compression only */ + +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +/* default memLevel */ + +#define STORED_BLOCK 0 +#define STATIC_TREES 1 +#define DYN_TREES 2 +/* The three kinds of block type */ + +#define MIN_MATCH 3 +#define MAX_MATCH 258 +/* The minimum and maximum match lengths */ + +#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ + + /* target dependencies */ + +#ifdef MSDOS +# define OS_CODE 0x00 +# if defined(__TURBOC__) || defined(__BORLANDC__) +# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) + /* Allow compilation with ANSI keywords only enabled */ + void _Cdecl farfree( void *block ); + void *_Cdecl farmalloc( unsigned long nbytes ); +# else +# include +# endif +# else /* MSC or DJGPP */ +# include +# endif +#endif + +#ifdef OS2 +# define OS_CODE 0x06 +#endif + +#ifdef WIN32 /* Window 95 & Windows NT */ +# define OS_CODE 0x0b +#endif + +#if defined(VAXC) || defined(VMS) +# define OS_CODE 0x02 +# define F_OPEN(name, mode) \ + fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") +#endif + +#ifdef AMIGA +# define OS_CODE 0x01 +#endif + +#if defined(ATARI) || defined(atarist) +# define OS_CODE 0x05 +#endif + +#if defined(MACOS) || defined(TARGET_OS_MAC) +# define OS_CODE 0x07 +# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os +# include /* for fdopen */ +# else +# ifndef fdopen +# define fdopen(fd,mode) NULL /* No fdopen() */ +# endif +# endif +#endif + +#ifdef __50SERIES /* Prime/PRIMOS */ +# define OS_CODE 0x0F +#endif + +#ifdef TOPS20 +# define OS_CODE 0x0a +#endif + +#if defined(_BEOS_) || defined(RISCOS) +# define fdopen(fd,mode) NULL /* No fdopen() */ +#endif + +#if (defined(_MSC_VER) && (_MSC_VER > 600)) +# define fdopen(fd,type) _fdopen(fd,type) +#endif + + + /* Common defaults */ + +#ifndef OS_CODE +# define OS_CODE 0x03 /* assume Unix */ +#endif + +#ifndef F_OPEN +# define F_OPEN(name, mode) fopen((name), (mode)) +#endif + + /* functions */ + +#ifdef HAVE_STRERROR + extern char *strerror OF((int)); +# define zstrerror(errnum) strerror(errnum) +#else +# define zstrerror(errnum) "" +#endif + +#if defined(pyr) +# define NO_MEMCPY +#endif +#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) + /* Use our own functions for small and medium model with MSC <= 5.0. + * You may have to use the same strategy for Borland C (untested). + * The __SC__ check is for Symantec. + */ +# define NO_MEMCPY +#endif +#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) +# define HAVE_MEMCPY +#endif +#ifdef HAVE_MEMCPY +# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ +# define zmemcpy _fmemcpy +# define zmemcmp _fmemcmp +# define zmemzero(dest, len) _fmemset(dest, 0, len) +# else +# define zmemcpy memcpy +# define zmemcmp memcmp +# define zmemzero(dest, len) memset(dest, 0, len) +# endif +#else + extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); + extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); + extern void zmemzero OF((Bytef* dest, uInt len)); +#endif + +/* Diagnostic functions */ +#ifdef DEBUG +# include + extern int z_verbose; + extern void z_error OF((char *m)); +# define Assert(cond,msg) {if(!(cond)) z_error(msg);} +# define Trace(x) {if (z_verbose>=0) fprintf x ;} +# define Tracev(x) {if (z_verbose>0) fprintf x ;} +# define Tracevv(x) {if (z_verbose>1) fprintf x ;} +# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} +# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} +#else +# define Assert(cond,msg) +# define Trace(x) +# define Tracev(x) +# define Tracevv(x) +# define Tracec(c,x) +# define Tracecv(c,x) +#endif + + +typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf, + uInt len)); +voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); +void zcfree OF((voidpf opaque, voidpf ptr)); + +#define ZALLOC(strm, items, size) \ + (*((strm)->zalloc))((strm)->opaque, (items), (size)) +#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) +#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} + +#endif /* _Z_UTIL_H */ diff --git a/stamp-h.in b/stamp-h.in new file mode 100644 index 0000000..e69de29 diff --git a/sword-1.5.9.tar.gz b/sword-1.5.9.tar.gz deleted file mode 100644 index a7dc354..0000000 Binary files a/sword-1.5.9.tar.gz and /dev/null differ diff --git a/sword.bmp b/sword.bmp new file mode 100644 index 0000000..32c5606 Binary files /dev/null and b/sword.bmp differ diff --git a/sword.kdevprj b/sword.kdevprj new file mode 100644 index 0000000..4a44df4 --- /dev/null +++ b/sword.kdevprj @@ -0,0 +1,1989 @@ +[Config for BinMakefileAm] +addcxxflags= +bin_program= +cxxflags=\s-O0 -g3 -Wall +ldadd= +ldflags= +libtool_dir= +path_to_bin_program=. + +[General] +AMChanged=false +author=The Sword team +dir_where_make_will_be_called=./ +email=scribe@crosswire.org +kdevprj_version=1.3 +lfv_open_groups= +make_options=\s-j1 +makefiles=Makefile.am,sword/Makefile.am,sword/docs/Makefile.am,sword/docs/en/Makefile.am,po/Makefile.am,include/Makefile.am,src/mgr/Makefile.am,src/Makefile.am,src/keys/Makefile.am,src/frontend/Makefile.am,src/utilfuns/Makefile.am,src/utilfuns/zlib/Makefile.am,src/modules/Makefile.am,src/modules/comments/Makefile.am,src/modules/comments/hrefcom/Makefile.am,src/modules/comments/rawcom/Makefile.am,src/modules/comments/rawfiles/Makefile.am,src/modules/comments/zcom/Makefile.am,src/modules/common/Makefile.am,src/modules/lexdict/Makefile.am,src/modules/lexdict/rawld/Makefile.am,src/modules/lexdict/rawld4/Makefile.am,src/modules/texts/Makefile.am,src/modules/texts/rawtext/Makefile.am,src/modules/texts/ztext/Makefile.am,src/modules/filters/Makefile.am,src/frontend/im/Makefile.am,src/modules/genbook/Makefile.am,src/modules/genbook/rawgenbook/Makefile.am,src/modules/lexdict/zld/Makefile.am,tests/Makefile.am +modifyMakefiles=false +project_name=Sword +project_type=normal_empty +short_info= +sub_dir=sword/ +version=1.5.2 +version_control=CVS +workspace=1 + +[LFV Groups] +Andere=* +Benutzerschnittstelle=*.kdevdlg,*.ui,*.rc +Header=*.h,*.hh,*.hxx,*.hpp,*.H +Quellen=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l +groups=Header,Quellen,Benutzerschnittstelle,Andere + +[Makefile.am] +files=sword.kdevprj,buildtest.cpp +sub_dirs=sword,include,src,tests +type=static_library + +[include/Greek2Greek.h] +dist=true +install=false +install_location= +type=HEADER + +[include/GreekChars.h] +dist=true +install=false +install_location= +type=HEADER + +[include/Makefile.am] +files=include/canon.h,include/cipherfil.h,include/defs.h,include/echomod.h,include/entriesblk.h,include/femain.h,include/filemgr.h,include/gbffootnotes.h,include/gbfheadings.h,include/gbfhtml.h,include/swfilter.h,include/gbfhtmlhref.h,include/gbfmorph.h,include/gbfplain.h,include/gbfrtf.h,include/gbfstrongs.h,include/gbfthml.h,include/Greek2Greek.h,include/GreekChars.h,include/hrefcom.h,include/latin1utf16.h,include/latin1utf8.h,include/listkey.h,include/localemgr.h,include/lzsscomprs.h,include/plainfootnotes.h,include/plainhtml.h,include/rawcom.h,include/rawfiles.h,include/rawld.h,include/rawld4.h,include/rawstr.h,include/rawstr4.h,include/rawtext.h,include/rawverse.h,include/regex.h,include/roman.h,include/rtfhtml.h,include/rwphtml.h,include/rwprtf.h,include/sapphire.h,include/scsuutf8.h,include/strkey.h,include/swbasicfilter.h,include/swbyteswap.h,include/swcipher.h,include/swcom.h,include/swcomprs.h,include/swconfig.h,include/swdisp.h,include/swdisprtf.h,include/swdisprtfchap.h,include/swencodingmgr.h,include/swkey.h,include/swld.h,include/swlocale.h,include/swlog.h,include/swmacs.h,include/swmarkupmgr.h,include/swmgr.h,include/swmodule.h,include/swobject.h,include/swtext.h,include/swunicod.h,include/swwinlog.h,include/tbdisp.h,include/thmlgbf.h,include/thmlhtml.h,include/thmlhtmlhref.h,include/thmlplain.h,include/thmlrtf.h,include/unicodertf.h,include/unixstr.h,include/untgz.h,include/utf16utf8.h,include/utf8cantillation.h,include/utf8greekaccents.h,include/utf8hebrewpoints.h,include/utf8html.h,include/utf8latin1.h,include/utf8transliterator.h,include/utf8utf16.h,include/utilconf.h,include/utilfuns.h,include/utilstr.h,include/versekey.h,include/zcom.h,include/zconf.h,include/zipcomprs.h,include/zlib.h,include/ztext.h,include/zverse.h,include/thmlfootnotes.h,include/thmlheadings.h,include/thmllemma.h,include/thmlmorph.h,include/thmlscripref.h,include/thmlstrongs.h,include/utf8cnormalizer.h,include/utf8arshaping.h,include/utf8bidireorder.h,include/utf8nfc.h,include/utf8nfkd.h,include/encfiltmgr.h,include/swversion.h,include/swfiltermgr.h,include/markupfiltmgr.h,include/rawgenbook.h,include/swgenbook.h,include/treekey.h,include/thmlvariants.h,include/treekeyidx.h,include/zld.h,include/zstr.h,include/swinputmeth.h,include/nullim.h,include/hebrewmcim.h,include/flatapi.h,include/cdsourcemgr.h,include/ftpparse.h,include/gbfosis.h,include/gbfredletterwords.h,include/greeklexattribs.h,include/installmgr.h,include/osismorph.h,include/osisstrongs.h,include/remotesourcemgr.h,include/multimapwdef.h,include/swcacher.h,include/swinstallmgr.h,include/swremotemgr.h,include/swsourcemgr.h,include/sysdata.h,include/thmlosis.h,include/swbuf.h,include/osisplain.h,include/osisrtf.h +sub_dirs= +type=normal + +[include/canon.h] +dist=true +install=false +install_location= +type=HEADER + +[include/cdsourcemgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/cipherfil.h] +dist=true +install=false +install_location= +type=HEADER + +[include/defs.h] +dist=true +install=false +install_location= +type=HEADER + +[include/echomod.h] +dist=true +install=false +install_location= +type=HEADER + +[include/encfiltmgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/entriesblk.h] +dist=true +install=false +install_location= +type=HEADER + +[include/femain.h] +dist=true +install=false +install_location= +type=HEADER + +[include/filemgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/flatapi.h] +dist=true +install=false +install_location= +type=HEADER + +[include/ftpparse.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbffootnotes.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfheadings.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfhtml.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfhtmlhref.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfmorph.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfosis.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfplain.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfredletterwords.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfrtf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfstrongs.h] +dist=true +install=false +install_location= +type=HEADER + +[include/gbfthml.h] +dist=true +install=false +install_location= +type=HEADER + +[include/greeklexattribs.h] +dist=true +install=false +install_location= +type=HEADER + +[include/hebrewmcim.h] +dist=true +install=false +install_location= +type=HEADER + +[include/hrefcom.h] +dist=true +install=false +install_location= +type=HEADER + +[include/installmgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/latin1utf16.h] +dist=true +install=false +install_location= +type=HEADER + +[include/latin1utf8.h] +dist=true +install=false +install_location= +type=HEADER + +[include/listkey.h] +dist=true +install=false +install_location= +type=HEADER + +[include/localemgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/lzsscomprs.h] +dist=true +install=false +install_location= +type=HEADER + +[include/markupfiltmgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/multimapwdef.h] +dist=true +install=false +install_location= +type=HEADER + +[include/nullim.h] +dist=true +install=false +install_location= +type=HEADER + +[include/osismorph.h] +dist=true +install=false +install_location= +type=HEADER + +[include/osisplain.h] +dist=true +install=false +install_location= +type=HEADER + +[include/osisrtf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/osisstrongs.h] +dist=true +install=false +install_location= +type=HEADER + +[include/plainfootnotes.h] +dist=true +install=false +install_location= +type=HEADER + +[include/plainhtml.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rawcom.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rawfiles.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rawgenbook.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rawld.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rawld4.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rawstr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rawstr4.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rawtext.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rawverse.h] +dist=true +install=false +install_location= +type=HEADER + +[include/regex.h] +dist=true +install=false +install_location= +type=HEADER + +[include/remotesourcemgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/roman.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rtfhtml.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rwphtml.h] +dist=true +install=false +install_location= +type=HEADER + +[include/rwprtf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/sapphire.h] +dist=true +install=false +install_location= +type=HEADER + +[include/scsuutf8.h] +dist=true +install=false +install_location= +type=HEADER + +[include/strkey.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swbasicfilter.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swbuf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swbyteswap.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swcacher.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swcipher.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swcom.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swcomprs.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swconfig.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swdisp.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swdisprtf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swdisprtfchap.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swencodingmgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swfilter.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swfiltermgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swgenbook.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swinputmeth.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swinstallmgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swkey.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swld.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swlocale.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swlog.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swmacs.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swmarkupmgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swmgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swmodule.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swobject.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swremotemgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swsourcemgr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swtext.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swunicod.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swversion.h] +dist=true +install=false +install_location= +type=HEADER + +[include/swwinlog.h] +dist=true +install=false +install_location= +type=HEADER + +[include/sysdata.h] +dist=true +install=false +install_location= +type=HEADER + +[include/tbdisp.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlfootnotes.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlgbf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlheadings.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlhtml.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlhtmlhref.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmllemma.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlmorph.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlosis.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlplain.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlrtf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlscripref.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlstrongs.h] +dist=true +install=false +install_location= +type=HEADER + +[include/thmlvariants.h] +dist=true +install=false +install_location= +type=HEADER + +[include/treekey.h] +dist=true +install=false +install_location= +type=HEADER + +[include/treekeyidx.h] +dist=true +install=false +install_location= +type=HEADER + +[include/unicodertf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/unixstr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/untgz.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf16utf8.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8arshaping.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8bidireorder.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8cantillation.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8cnormalizer.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8greekaccents.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8hebrewpoints.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8html.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8latin1.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8nfc.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8nfkd.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8transliterator.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utf8utf16.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utilconf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utilfuns.h] +dist=true +install=false +install_location= +type=HEADER + +[include/utilstr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/versekey.h] +dist=true +install=false +install_location= +type=HEADER + +[include/zcom.h] +dist=true +install=false +install_location= +type=HEADER + +[include/zconf.h] +dist=true +install=false +install_location= +type=HEADER + +[include/zipcomprs.h] +dist=true +install=false +install_location= +type=HEADER + +[include/zld.h] +dist=true +install=false +install_location= +type=HEADER + +[include/zlib.h] +dist=true +install=false +install_location= +type=HEADER + +[include/zstr.h] +dist=true +install=false +install_location= +type=HEADER + +[include/ztext.h] +dist=true +install=false +install_location= +type=HEADER + +[include/zverse.h] +dist=true +install=false +install_location= +type=HEADER + +[po/Makefile.am] +sub_dirs= +type=po + +[src/Makefile.am] +sub_dirs=mgr,keys,frontend,utilfuns,modules +type=normal + +[src/frontend/Makefile.am] +files=src/frontend/swdisp.cpp,src/frontend/swlog.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=frontend +sub_dirs=im +type=static_library + +[src/frontend/im/Makefile.am] +files=src/frontend/im/swinputmeth.cpp,src/frontend/im/nullim.cpp,src/frontend/im/hebrewmcim.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=im +sub_dirs= +type=static_library + +[src/frontend/im/hebrewmcim.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/frontend/im/nullim.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/frontend/im/swinputmeth.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/frontend/swdisp.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/frontend/swlog.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/keys/Makefile.am] +files=src/keys/genarray.c,src/keys/listkey.cpp,src/keys/strkey.cpp,src/keys/swkey.cpp,src/keys/versekey.cpp,src/keys/treekey.cpp,src/keys/treekeyidx.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=keys +sub_dirs= +type=static_library + +[src/keys/genarray.c] +dist=true +install=false +install_location= +type=SOURCE + +[src/keys/listkey.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/keys/strkey.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/keys/swkey.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/keys/treekey.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/keys/treekeyidx.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/keys/versekey.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/Makefile.am] +files=src/mgr/filemgr.cpp,src/mgr/localemgr.cpp,src/mgr/swconfig.cpp,src/mgr/swencodingmgr.cpp,src/mgr/swlocale.cpp,src/mgr/swmarkupmgr.cpp,src/mgr/swmgr.cpp,src/mgr/markupfiltmgr.cpp,src/mgr/encfiltmgr.cpp,src/mgr/swfiltermgr.cpp,src/mgr/swcacher.cpp,src/mgr/installmgr.cpp,src/mgr/swsourcemgr.cpp,src/mgr/swsearchable.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=mgr +sub_dirs= +type=static_library + +[src/mgr/encfiltmgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/filemgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/installmgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/localemgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/markupfiltmgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/swcacher.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/swconfig.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/swencodingmgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/swfiltermgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/swlocale.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/swmarkupmgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/swmgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/swsearchable.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/mgr/swsourcemgr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/Makefile.am] +files=src/modules/swmodule.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=modules +sub_dirs=comments,common,lexdict,texts,filters,genbook +type=static_library + +[src/modules/comments/Makefile.am] +files=src/modules/comments/swcom.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=comments +sub_dirs=hrefcom,rawcom,rawfiles,zcom +type=static_library + +[src/modules/comments/hrefcom/Makefile.am] +files=src/modules/comments/hrefcom/hrefcom.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=hrefcom +sub_dirs= +type=static_library + +[src/modules/comments/hrefcom/hrefcom.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/comments/rawcom/Makefile.am] +files=src/modules/comments/rawcom/rawcom.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=rawcom +sub_dirs= +type=static_library + +[src/modules/comments/rawcom/rawcom.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/comments/rawfiles/Makefile.am] +files=src/modules/comments/rawfiles/rawfiles.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=rawfiles +sub_dirs= +type=static_library + +[src/modules/comments/rawfiles/rawfiles.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/comments/swcom.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/comments/zcom/Makefile.am] +files=src/modules/comments/zcom/zcom.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=zcom +sub_dirs= +type=static_library + +[src/modules/comments/zcom/zcom.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/Makefile.am] +files=src/modules/common/entriesblk.cpp,src/modules/common/compress.cpp,src/modules/common/lzsscomprs.cpp,src/modules/common/rawstr.cpp,src/modules/common/rawstr4.cpp,src/modules/common/rawverse.cpp,src/modules/common/sapphire.cpp,src/modules/common/swcipher.cpp,src/modules/common/swcomprs.cpp,src/modules/common/zipcomprs.cpp,src/modules/common/zverse.cpp,src/modules/common/zstr.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=common +sub_dirs= +type=static_library + +[src/modules/common/compress.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/entriesblk.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/lzsscomprs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/rawstr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/rawstr4.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/rawverse.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/sapphire.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/swcipher.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/swcomprs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/zipcomprs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/zstr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/common/zverse.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/Makefile.am] +files=src/modules/filters/cipherfil.cpp,src/modules/filters/gbffootnotes.cpp,src/modules/filters/gbfheadings.cpp,src/modules/filters/gbfhtml.cpp,src/modules/filters/gbfhtmlhref.cpp,src/modules/filters/gbfmorph.cpp,src/modules/filters/gbfplain.cpp,src/modules/filters/gbfrtf.cpp,src/modules/filters/gbfstrongs.cpp,src/modules/filters/gbfthml.cpp,src/modules/filters/latin1utf16.cpp,src/modules/filters/latin1utf8.cpp,src/modules/filters/plainfootnotes.cpp,src/modules/filters/plainhtml.cpp,src/modules/filters/rtfhtml.cpp,src/modules/filters/rwphtml.cpp,src/modules/filters/rwprtf.cpp,src/modules/filters/scsuutf8.cpp,src/modules/filters/swbasicfilter.cpp,src/modules/filters/thmlgbf.cpp,src/modules/filters/thmlhtml.cpp,src/modules/filters/thmlhtmlhref.cpp,src/modules/filters/thmlplain.cpp,src/modules/filters/thmlrtf.cpp,src/modules/filters/unicodertf.cpp,src/modules/filters/utf16utf8.cpp,src/modules/filters/utf8cantillation.cpp,src/modules/filters/utf8greekaccents.cpp,src/modules/filters/utf8hebrewpoints.cpp,src/modules/filters/utf8html.cpp,src/modules/filters/utf8latin1.cpp,src/modules/filters/utf8transliterator.cpp,src/modules/filters/utf8utf16.cpp,src/modules/filters/thmlfootnotes.cpp,src/modules/filters/thmlheadings.cpp,src/modules/filters/thmllemma.cpp,src/modules/filters/thmlmorph.cpp,src/modules/filters/thmlscripref.cpp,src/modules/filters/thmlstrongs.cpp,src/modules/filters/utf8nfc.cpp,src/modules/filters/utf8nfkd.cpp,src/modules/filters/utf8arshaping.cpp,src/modules/filters/utf8bidireorder.cpp,src/modules/filters/thmlvariants.cpp,src/modules/filters/gbfosis.cpp,src/modules/filters/gbfredletterwords.cpp,src/modules/filters/greeklexattribs.cpp,src/modules/filters/osismorph.cpp,src/modules/filters/osisstrongs.cpp,src/modules/filters/thmlosis.cpp,src/modules/filters/osisplain.cpp,src/modules/filters/osisrtf.cpp,src/modules/filters/gbfwebif.cpp,src/modules/filters/osisfootnotes.cpp,src/modules/filters/osisheadings.cpp,src/modules/filters/osishtmlhref.cpp,src/modules/filters/osislemma.cpp,src/modules/filters/osisredletterwords.cpp,src/modules/filters/osisscripref.cpp,src/modules/filters/osiswebif.cpp,src/modules/filters/swoptfilter.cpp,src/modules/filters/thmlwebif.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=filters +sub_dirs= +type=static_library + +[src/modules/filters/cipherfil.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbffootnotes.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfheadings.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfhtml.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfhtmlhref.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfmorph.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfosis.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfplain.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfredletterwords.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfrtf.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfstrongs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfthml.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/gbfwebif.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/greeklexattribs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/latin1utf16.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/latin1utf8.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osisfootnotes.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osisheadings.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osishtmlhref.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osislemma.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osismorph.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osisplain.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osisredletterwords.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osisrtf.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osisscripref.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osisstrongs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/osiswebif.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/plainfootnotes.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/plainhtml.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/rtfhtml.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/rwphtml.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/rwprtf.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/scsuutf8.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/swbasicfilter.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/swoptfilter.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlfootnotes.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlgbf.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlheadings.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlhtml.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlhtmlhref.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmllemma.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlmorph.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlosis.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlplain.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlrtf.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlscripref.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlstrongs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlvariants.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/thmlwebif.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/unicodertf.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf16utf8.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8arshaping.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8bidireorder.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8cantillation.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8greekaccents.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8hebrewpoints.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8html.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8latin1.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8nfc.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8nfkd.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8transliterator.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/filters/utf8utf16.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/genbook/Makefile.am] +files=src/modules/genbook/swgenbook.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=genbook +sub_dirs=rawgenbook +type=static_library + +[src/modules/genbook/rawgenbook/Makefile.am] +files=src/modules/genbook/rawgenbook/rawgenbook.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=rawgenbook +sub_dirs= +type=static_library + +[src/modules/genbook/rawgenbook/rawgenbook.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/genbook/swgenbook.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/lexdict/Makefile.am] +files=src/modules/lexdict/swld.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=lexdict +sub_dirs=rawld,rawld4,zld +type=static_library + +[src/modules/lexdict/rawld/Makefile.am] +files=src/modules/lexdict/rawld/rawld.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=rawld +sub_dirs= +type=static_library + +[src/modules/lexdict/rawld/rawld.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/lexdict/rawld4/Makefile.am] +files=src/modules/lexdict/rawld4/rawld4.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=rawld4 +sub_dirs= +type=static_library + +[src/modules/lexdict/rawld4/rawld4.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/lexdict/swld.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/lexdict/zld/Makefile.am] +files=src/modules/lexdict/zld/zld.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=zld +sub_dirs= +type=static_library + +[src/modules/lexdict/zld/zld.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/swmodule.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/texts/Makefile.am] +files=src/modules/texts/swtext.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=texts +sub_dirs=rawtext,ztext +type=static_library + +[src/modules/texts/rawtext/Makefile.am] +files=src/modules/texts/rawtext/rawtext.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=rawtext +sub_dirs= +type=static_library + +[src/modules/texts/rawtext/rawtext.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/texts/swtext.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/modules/texts/ztext/Makefile.am] +files=src/modules/texts/ztext/ztext.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=ztext +sub_dirs= +type=static_library + +[src/modules/texts/ztext/ztext.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/Greek2Greek.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/Makefile.am] +files=src/utilfuns/Greek2Greek.cpp,src/utilfuns/regex.c,src/utilfuns/roman.c,src/utilfuns/sub.c,src/utilfuns/swunicod.cpp,src/utilfuns/unixstr.cpp,src/utilfuns/utilconf.cpp,src/utilfuns/utilstr.cpp,src/utilfuns/swversion.cpp,src/utilfuns/roman.cpp,src/utilfuns/ftpparse.c,src/utilfuns/swbuf.cpp,src/utilfuns/utilweb.cpp,src/utilfuns/utilxml.cpp +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=utilfuns +sub_dirs=zlib +type=static_library + +[src/utilfuns/ftpparse.c] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/regex.c] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/roman.c] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/roman.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/sub.c] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/swbuf.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/swunicod.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/swversion.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/unixstr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/utilconf.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/utilstr.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/utilweb.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/utilxml.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/utilfuns/zlib/Makefile.am] +files= +sharedlib_LDFLAGS=-version-info 0:0:1 +sharedlib_rootname=zlib +sub_dirs= +type=static_library + +[sword.kdevprj] +dist=true +install=false +install_location= +type=DATA + +[sword/Makefile.am] +sub_dirs= +type=prog_main + +[sword/docs/Makefile.am] +sub_dirs= +type=normal + +[sword/docs/en/Makefile.am] +sub_dirs= +type=normal + +[buildtest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/Makefile.am] +files=tests/casttest.cpp,tests/complzss.cpp,tests/compnone.cpp,tests/compzip.cpp,tests/configtest.cpp,tests/filtertest.cpp,tests/genbooktest.cpp,tests/icutest.cpp,tests/indextest.cpp,tests/introtest.cpp,tests/keycast.cpp,tests/keytest.cpp,tests/lextest.cpp,tests/listtest.cpp,tests/localetest.cpp,tests/mgrtest.cpp,tests/modtest.cpp,tests/parsekey.cpp,tests/rawldidxtest.cpp,tests/romantest.cpp,tests/swaptest.cpp,tests/testblocks.cpp,tests/tlitmgrtest.cpp,tests/translittest.cpp,tests/treeidxtest.cpp +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=tests +sub_dirs= +type=static_library + +[tests/casttest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/complzss.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/compnone.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/compzip.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/configtest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/filtertest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/genbooktest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/icutest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/indextest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/introtest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/keycast.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/keytest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/lextest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/listtest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/localetest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/mgrtest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/modtest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/parsekey.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/rawldidxtest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/romantest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/swaptest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/testblocks.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/tlitmgrtest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/translittest.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[tests/treeidxtest.cpp] +dist=true +install=false +install_location= +type=SOURCE diff --git a/sword.pc.in b/sword.pc.in new file mode 100644 index 0000000..110f52e --- /dev/null +++ b/sword.pc.in @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + + +Name: SWORD +Description: Biblical Text Engine +Version: @VERSION@ +@SHAREDLIB_TRUE@Libs: -L${libdir} -lsword +@SHAREDLIB_FALSE@Libs: -L${libdir} -lsword -lz @CURL_LIBS@ @CLUCENE_LIBS@ @ICU_LIBS@ @ICU_IOLIBS@ +Libs.private: -L${libdir} -lsword -lz @CURL_LIBS@ @CLUCENE_LIBS@ @ICU_LIBS@ @ICU_IOLIBS@ +Cflags: -I${includedir}/sword + diff --git a/sword.spec.in b/sword.spec.in new file mode 100644 index 0000000..03a8521 --- /dev/null +++ b/sword.spec.in @@ -0,0 +1,90 @@ +Summary: The SWORD Project framework for manipulating Bible texts +Name: sword +%define version @VERSION@ +Version: %{version} +Release: 1 +#Icon: sword.gif +Copyright: GPL +Packager: CrossWire Bible Society +URL: http://www.crosswire.org/sword +Source: http://www.crosswire.org/download/ftpmirror.tmp/pub/sword/source/v1.5/sword-%{version}.tar.gz +Group: System Environment/Libraries +BuildRoot: %{_tmppath}/sword-root +Requires: curl +Requires: zlib +# Requires: icu >= 2.6 +# Patch0: sword-patch-curl.diff + +%description +The SWORD Project is an effort to create an ever expanding software package for research and study of God and His Word. +The SWORD Bible Framework allows easy manipulation of Bible texts, commentaries, lexicons, dictionaries, etc. Many frontends are build using this framework. +An installed module set may be shared between any frontend using the framework. + +%package devel +Summary: Include files and static libraries for developing sword applications. +Group: Development/Libraries +Requires: sword = %{version} +Requires: curl-devel >= 7.10.5 +Requires: zlib-devel + +%description devel +Include files and static libraries for developing sword applications. This package is required to compile Sword frontends, too. + +%prep +%setup -q +# %patch0 -p1 + +%build +export CFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$RPM_OPT_FLAGS" +export LDFLAGS='-s' + ./usrinst.sh --disable-dependency-tracking --prefix=/usr --sysconfdir=/etc --enable-utilities --with-curl --disable-debug --enable-shared --with-conf +make + +%install +rm -rf $RPM_BUILD_ROOT +make install-strip DESTDIR="$RPM_BUILD_ROOT" +make install_config DESTDIR="$RPM_BUILD_ROOT" +mkdir -p $RPM_BUILD_ROOT/usr/lib/sword +exit 0 + +%post devel -p /sbin/ldconfig + +%postun devel -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%config /etc/sword.conf +%config /usr/share/sword/mods.d/globals.conf +%config /usr/share/sword/locales.d/*.conf +%doc README AUTHORS NEWS INSTALL +/usr/lib/libsword*.so* +#Available when ICU is used in Sword +# /usr/lib/sword + +%files devel +%defattr(-,root,root) +%doc doc/* +/usr/include/sword +/usr/lib/libsword*.*a +/usr/bin/* + +%changelog +* Mon Dec 27 2003 Joachim Ansorg +- Version 1.5.7 +- Added a patch to make installmgr work on Curl version 7.10.5 +- We require libcurl now +* Mon May 20 2002 Joachim Ansorg +- Version 1.5.6 +* Mon May 20 2002 Stuart Gathman +- Version 1.5.3 +* Wed Dec 19 2001 Stuart Gathman +- add additional utilities, move to /usr/lib/sword +* Thu Dec 13 2001 Stuart Gathman +- add locales config +* Sat Jan 20 2001 Stuart Gathman +- mkfastmod and other utilities +* Thu Nov 30 2000 Stuart Gathman +- cheatah application +* Fri Nov 17 2000 Stuart Gathman +- initial release diff --git a/tests/.cvsignore b/tests/.cvsignore new file mode 100644 index 0000000..c524087 --- /dev/null +++ b/tests/.cvsignore @@ -0,0 +1,34 @@ +.deps +.libs +Makefile +Makefile.in +casttest +complzss +compnone +compzip +configtest +filtertest +genbooktest +indextest +introtest +keycast +keytest +lextest +listtest +localetest +mgrtest +modtest +parsekey +rawldidxtest +romantest +swaptest +swbuftest +testblocks +treeidxtest +webiftest +xmltest +nt +nt.vss +ot +ot.vss +test1.conf \ No newline at end of file diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..d5851ba --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,68 @@ +AUTOMAKE_OPTIONS = 1.6 +INCLUDES = -I $(top_srcdir)/include +LDADD = $(top_builddir)/lib/libsword.la + +SUBDIRS = cppunit + +noinst_PROGRAMS = ciphertest keytest mgrtest parsekey versekeytest listtest casttest \ +modtest compnone complzss localetest introtest indextest configtest keycast \ +romantest testblocks filtertest rawldidxtest lextest swaptest \ + swbuftest xmltest webiftest + +if ICU +ICUPROG = icutest translittest tlitmgrtest +else +ICUPROG = +endif + +noinst_PROGRAMS += $(ICUPROG) + +if ICU +icutest_SOURCES = icutest.cpp +translittest_SOURCES = translittest.cpp +tlitmgrtest_SOURCES = tlitmgrtest.cpp +#tlitmgrtest_LDADD = -lustdio +endif + +if ZLIB +ZLIBPROG = compzip +else +ZLIBPROG = +endif + +noinst_PROGRAMS += $(ZLIBPROG) + +if ZLIB +compzip_SOURCES = compzip.cpp +endif + +keytest_SOURCES = keytest.cpp +mgrtest_SOURCES = mgrtest.cpp +ciphertest_SOURCES = ciphertest.cpp +parsekey_SOURCES = parsekey.cpp +versekeytest_SOURCES = versekeytest.cpp +listtest_SOURCES = listtest.cpp +casttest_SOURCES = casttest.cpp +modtest_SOURCES = modtest.cpp +compnone_SOURCES = compnone.cpp +complzss_SOURCES = complzss.cpp +localetest_SOURCES = localetest.cpp +keycast_SOURCES = keycast.cpp +introtest_SOURCES = introtest.cpp +indextest_SOURCES = indextest.cpp +configtest_SOURCES = configtest.cpp +romantest_SOURCES = romantest.cpp +testblocks_SOURCES = testblocks.cpp +filtertest_SOURCES = filtertest.cpp +lextest_SOURCES = lextest.cpp +rawldidxtest_SOURCES = rawldidxtest.cpp +swaptest_SOURCES = swaptest.cpp +swbuftest_SOURCES = swbuftest.cpp +webiftest_SOURCES = webiftest.cpp +xmltest_SOURCES = xmltest.cpp + + +EXTRA_DIST = +include bcppmake/Makefile.am +include testsuite/Makefile.am +include tmp/Makefile.am diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 0000000..7e3a1c3 --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,882 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +noinst_PROGRAMS = ciphertest$(EXEEXT) keytest$(EXEEXT) \ + mgrtest$(EXEEXT) parsekey$(EXEEXT) versekeytest$(EXEEXT) \ + listtest$(EXEEXT) casttest$(EXEEXT) modtest$(EXEEXT) \ + compnone$(EXEEXT) complzss$(EXEEXT) localetest$(EXEEXT) \ + introtest$(EXEEXT) indextest$(EXEEXT) configtest$(EXEEXT) \ + keycast$(EXEEXT) romantest$(EXEEXT) testblocks$(EXEEXT) \ + filtertest$(EXEEXT) rawldidxtest$(EXEEXT) lextest$(EXEEXT) \ + swaptest$(EXEEXT) swbuftest$(EXEEXT) xmltest$(EXEEXT) \ + webiftest$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/bcppmake/Makefile.am $(srcdir)/testsuite/Makefile.am \ + $(srcdir)/tmp/Makefile.am +subdir = tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ + $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +@ICU_TRUE@am__EXEEXT_1 = icutest$(EXEEXT) translittest$(EXEEXT) \ +@ICU_TRUE@ tlitmgrtest$(EXEEXT) +@ZLIB_TRUE@am__EXEEXT_2 = compzip$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am_casttest_OBJECTS = casttest.$(OBJEXT) +casttest_OBJECTS = $(am_casttest_OBJECTS) +casttest_LDADD = $(LDADD) +casttest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_ciphertest_OBJECTS = ciphertest.$(OBJEXT) +ciphertest_OBJECTS = $(am_ciphertest_OBJECTS) +ciphertest_LDADD = $(LDADD) +ciphertest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_complzss_OBJECTS = complzss.$(OBJEXT) +complzss_OBJECTS = $(am_complzss_OBJECTS) +complzss_LDADD = $(LDADD) +complzss_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_compnone_OBJECTS = compnone.$(OBJEXT) +compnone_OBJECTS = $(am_compnone_OBJECTS) +compnone_LDADD = $(LDADD) +compnone_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am__compzip_SOURCES_DIST = compzip.cpp +@ZLIB_TRUE@am_compzip_OBJECTS = compzip.$(OBJEXT) +compzip_OBJECTS = $(am_compzip_OBJECTS) +compzip_LDADD = $(LDADD) +compzip_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_configtest_OBJECTS = configtest.$(OBJEXT) +configtest_OBJECTS = $(am_configtest_OBJECTS) +configtest_LDADD = $(LDADD) +configtest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_filtertest_OBJECTS = filtertest.$(OBJEXT) +filtertest_OBJECTS = $(am_filtertest_OBJECTS) +filtertest_LDADD = $(LDADD) +filtertest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am__icutest_SOURCES_DIST = icutest.cpp +@ICU_TRUE@am_icutest_OBJECTS = icutest.$(OBJEXT) +icutest_OBJECTS = $(am_icutest_OBJECTS) +icutest_LDADD = $(LDADD) +icutest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_indextest_OBJECTS = indextest.$(OBJEXT) +indextest_OBJECTS = $(am_indextest_OBJECTS) +indextest_LDADD = $(LDADD) +indextest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_introtest_OBJECTS = introtest.$(OBJEXT) +introtest_OBJECTS = $(am_introtest_OBJECTS) +introtest_LDADD = $(LDADD) +introtest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_keycast_OBJECTS = keycast.$(OBJEXT) +keycast_OBJECTS = $(am_keycast_OBJECTS) +keycast_LDADD = $(LDADD) +keycast_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_keytest_OBJECTS = keytest.$(OBJEXT) +keytest_OBJECTS = $(am_keytest_OBJECTS) +keytest_LDADD = $(LDADD) +keytest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_lextest_OBJECTS = lextest.$(OBJEXT) +lextest_OBJECTS = $(am_lextest_OBJECTS) +lextest_LDADD = $(LDADD) +lextest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_listtest_OBJECTS = listtest.$(OBJEXT) +listtest_OBJECTS = $(am_listtest_OBJECTS) +listtest_LDADD = $(LDADD) +listtest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_localetest_OBJECTS = localetest.$(OBJEXT) +localetest_OBJECTS = $(am_localetest_OBJECTS) +localetest_LDADD = $(LDADD) +localetest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_mgrtest_OBJECTS = mgrtest.$(OBJEXT) +mgrtest_OBJECTS = $(am_mgrtest_OBJECTS) +mgrtest_LDADD = $(LDADD) +mgrtest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_modtest_OBJECTS = modtest.$(OBJEXT) +modtest_OBJECTS = $(am_modtest_OBJECTS) +modtest_LDADD = $(LDADD) +modtest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_parsekey_OBJECTS = parsekey.$(OBJEXT) +parsekey_OBJECTS = $(am_parsekey_OBJECTS) +parsekey_LDADD = $(LDADD) +parsekey_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_rawldidxtest_OBJECTS = rawldidxtest.$(OBJEXT) +rawldidxtest_OBJECTS = $(am_rawldidxtest_OBJECTS) +rawldidxtest_LDADD = $(LDADD) +rawldidxtest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_romantest_OBJECTS = romantest.$(OBJEXT) +romantest_OBJECTS = $(am_romantest_OBJECTS) +romantest_LDADD = $(LDADD) +romantest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_swaptest_OBJECTS = swaptest.$(OBJEXT) +swaptest_OBJECTS = $(am_swaptest_OBJECTS) +swaptest_LDADD = $(LDADD) +swaptest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_swbuftest_OBJECTS = swbuftest.$(OBJEXT) +swbuftest_OBJECTS = $(am_swbuftest_OBJECTS) +swbuftest_LDADD = $(LDADD) +swbuftest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_testblocks_OBJECTS = testblocks.$(OBJEXT) +testblocks_OBJECTS = $(am_testblocks_OBJECTS) +testblocks_LDADD = $(LDADD) +testblocks_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am__tlitmgrtest_SOURCES_DIST = tlitmgrtest.cpp +@ICU_TRUE@am_tlitmgrtest_OBJECTS = tlitmgrtest.$(OBJEXT) +tlitmgrtest_OBJECTS = $(am_tlitmgrtest_OBJECTS) +tlitmgrtest_LDADD = $(LDADD) +tlitmgrtest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am__translittest_SOURCES_DIST = translittest.cpp +@ICU_TRUE@am_translittest_OBJECTS = translittest.$(OBJEXT) +translittest_OBJECTS = $(am_translittest_OBJECTS) +translittest_LDADD = $(LDADD) +translittest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_versekeytest_OBJECTS = versekeytest.$(OBJEXT) +versekeytest_OBJECTS = $(am_versekeytest_OBJECTS) +versekeytest_LDADD = $(LDADD) +versekeytest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_webiftest_OBJECTS = webiftest.$(OBJEXT) +webiftest_OBJECTS = $(am_webiftest_OBJECTS) +webiftest_LDADD = $(LDADD) +webiftest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_xmltest_OBJECTS = xmltest.$(OBJEXT) +xmltest_OBJECTS = $(am_xmltest_OBJECTS) +xmltest_LDADD = $(LDADD) +xmltest_DEPENDENCIES = $(top_builddir)/lib/libsword.la +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(casttest_SOURCES) $(ciphertest_SOURCES) \ + $(complzss_SOURCES) $(compnone_SOURCES) $(compzip_SOURCES) \ + $(configtest_SOURCES) $(filtertest_SOURCES) $(icutest_SOURCES) \ + $(indextest_SOURCES) $(introtest_SOURCES) $(keycast_SOURCES) \ + $(keytest_SOURCES) $(lextest_SOURCES) $(listtest_SOURCES) \ + $(localetest_SOURCES) $(mgrtest_SOURCES) $(modtest_SOURCES) \ + $(parsekey_SOURCES) $(rawldidxtest_SOURCES) \ + $(romantest_SOURCES) $(swaptest_SOURCES) $(swbuftest_SOURCES) \ + $(testblocks_SOURCES) $(tlitmgrtest_SOURCES) \ + $(translittest_SOURCES) $(versekeytest_SOURCES) \ + $(webiftest_SOURCES) $(xmltest_SOURCES) +DIST_SOURCES = $(casttest_SOURCES) $(ciphertest_SOURCES) \ + $(complzss_SOURCES) $(compnone_SOURCES) \ + $(am__compzip_SOURCES_DIST) $(configtest_SOURCES) \ + $(filtertest_SOURCES) $(am__icutest_SOURCES_DIST) \ + $(indextest_SOURCES) $(introtest_SOURCES) $(keycast_SOURCES) \ + $(keytest_SOURCES) $(lextest_SOURCES) $(listtest_SOURCES) \ + $(localetest_SOURCES) $(mgrtest_SOURCES) $(modtest_SOURCES) \ + $(parsekey_SOURCES) $(rawldidxtest_SOURCES) \ + $(romantest_SOURCES) $(swaptest_SOURCES) $(swbuftest_SOURCES) \ + $(testblocks_SOURCES) $(am__tlitmgrtest_SOURCES_DIST) \ + $(am__translittest_SOURCES_DIST) $(versekeytest_SOURCES) \ + $(webiftest_SOURCES) $(xmltest_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_CONFIG = @CPPUNIT_CONFIG@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CURL_AM_CFLAGS = @CURL_AM_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +GREP = @GREP@ +ICU_CONFIG = @ICU_CONFIG@ +ICU_IOLIBS = @ICU_IOLIBS@ +ICU_LIBS = @ICU_LIBS@ +ICU_VER = @ICU_VER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGDATA = @PKGDATA@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dir_confdef = @dir_confdef@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 +INCLUDES = -I $(top_srcdir)/include +LDADD = $(top_builddir)/lib/libsword.la +SUBDIRS = cppunit +@ICU_FALSE@ICUPROG = +@ICU_TRUE@ICUPROG = icutest translittest tlitmgrtest +@ICU_TRUE@icutest_SOURCES = icutest.cpp +@ICU_TRUE@translittest_SOURCES = translittest.cpp +@ICU_TRUE@tlitmgrtest_SOURCES = tlitmgrtest.cpp +@ZLIB_FALSE@ZLIBPROG = +#tlitmgrtest_LDADD = -lustdio +@ZLIB_TRUE@ZLIBPROG = compzip +@ZLIB_TRUE@compzip_SOURCES = compzip.cpp +keytest_SOURCES = keytest.cpp +mgrtest_SOURCES = mgrtest.cpp +ciphertest_SOURCES = ciphertest.cpp +parsekey_SOURCES = parsekey.cpp +versekeytest_SOURCES = versekeytest.cpp +listtest_SOURCES = listtest.cpp +casttest_SOURCES = casttest.cpp +modtest_SOURCES = modtest.cpp +compnone_SOURCES = compnone.cpp +complzss_SOURCES = complzss.cpp +localetest_SOURCES = localetest.cpp +keycast_SOURCES = keycast.cpp +introtest_SOURCES = introtest.cpp +indextest_SOURCES = indextest.cpp +configtest_SOURCES = configtest.cpp +romantest_SOURCES = romantest.cpp +testblocks_SOURCES = testblocks.cpp +filtertest_SOURCES = filtertest.cpp +lextest_SOURCES = lextest.cpp +rawldidxtest_SOURCES = rawldidxtest.cpp +swaptest_SOURCES = swaptest.cpp +swbuftest_SOURCES = swbuftest.cpp +webiftest_SOURCES = webiftest.cpp +xmltest_SOURCES = xmltest.cpp +EXTRA_DIST = $(swbcppdir)/filtertest.bpf $(swbcppdir)/filtertest.bpr \ + $(swbcppdir)/libsword.bpf $(swbcppdir)/libsword.bpr \ + $(swbcppdir)/mgrtest.bpf $(swbcppdir)/mgrtest.bpr \ + $(swbcppdir)/parsekey.bpf $(swbcppdir)/parsekey.bpr \ + $(swbcppdir)/tests.bpg $(swtspdir)/runall.sh \ + $(swtspdir)/runtest.sh $(swtspdir)/verseparsing.good \ + $(swtspdir)/verseparsing.sh $(swtesttmpdir)/README +swbcppdir = $(top_srcdir)/tests/bcppmake +swtspdir = $(top_srcdir)/tests/testsuite +swtesttmpdir = $(top_srcdir)/tests/tmp +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/bcppmake/Makefile.am $(srcdir)/testsuite/Makefile.am $(srcdir)/tmp/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +casttest$(EXEEXT): $(casttest_OBJECTS) $(casttest_DEPENDENCIES) + @rm -f casttest$(EXEEXT) + $(CXXLINK) $(casttest_OBJECTS) $(casttest_LDADD) $(LIBS) +ciphertest$(EXEEXT): $(ciphertest_OBJECTS) $(ciphertest_DEPENDENCIES) + @rm -f ciphertest$(EXEEXT) + $(CXXLINK) $(ciphertest_OBJECTS) $(ciphertest_LDADD) $(LIBS) +complzss$(EXEEXT): $(complzss_OBJECTS) $(complzss_DEPENDENCIES) + @rm -f complzss$(EXEEXT) + $(CXXLINK) $(complzss_OBJECTS) $(complzss_LDADD) $(LIBS) +compnone$(EXEEXT): $(compnone_OBJECTS) $(compnone_DEPENDENCIES) + @rm -f compnone$(EXEEXT) + $(CXXLINK) $(compnone_OBJECTS) $(compnone_LDADD) $(LIBS) +compzip$(EXEEXT): $(compzip_OBJECTS) $(compzip_DEPENDENCIES) + @rm -f compzip$(EXEEXT) + $(CXXLINK) $(compzip_OBJECTS) $(compzip_LDADD) $(LIBS) +configtest$(EXEEXT): $(configtest_OBJECTS) $(configtest_DEPENDENCIES) + @rm -f configtest$(EXEEXT) + $(CXXLINK) $(configtest_OBJECTS) $(configtest_LDADD) $(LIBS) +filtertest$(EXEEXT): $(filtertest_OBJECTS) $(filtertest_DEPENDENCIES) + @rm -f filtertest$(EXEEXT) + $(CXXLINK) $(filtertest_OBJECTS) $(filtertest_LDADD) $(LIBS) +icutest$(EXEEXT): $(icutest_OBJECTS) $(icutest_DEPENDENCIES) + @rm -f icutest$(EXEEXT) + $(CXXLINK) $(icutest_OBJECTS) $(icutest_LDADD) $(LIBS) +indextest$(EXEEXT): $(indextest_OBJECTS) $(indextest_DEPENDENCIES) + @rm -f indextest$(EXEEXT) + $(CXXLINK) $(indextest_OBJECTS) $(indextest_LDADD) $(LIBS) +introtest$(EXEEXT): $(introtest_OBJECTS) $(introtest_DEPENDENCIES) + @rm -f introtest$(EXEEXT) + $(CXXLINK) $(introtest_OBJECTS) $(introtest_LDADD) $(LIBS) +keycast$(EXEEXT): $(keycast_OBJECTS) $(keycast_DEPENDENCIES) + @rm -f keycast$(EXEEXT) + $(CXXLINK) $(keycast_OBJECTS) $(keycast_LDADD) $(LIBS) +keytest$(EXEEXT): $(keytest_OBJECTS) $(keytest_DEPENDENCIES) + @rm -f keytest$(EXEEXT) + $(CXXLINK) $(keytest_OBJECTS) $(keytest_LDADD) $(LIBS) +lextest$(EXEEXT): $(lextest_OBJECTS) $(lextest_DEPENDENCIES) + @rm -f lextest$(EXEEXT) + $(CXXLINK) $(lextest_OBJECTS) $(lextest_LDADD) $(LIBS) +listtest$(EXEEXT): $(listtest_OBJECTS) $(listtest_DEPENDENCIES) + @rm -f listtest$(EXEEXT) + $(CXXLINK) $(listtest_OBJECTS) $(listtest_LDADD) $(LIBS) +localetest$(EXEEXT): $(localetest_OBJECTS) $(localetest_DEPENDENCIES) + @rm -f localetest$(EXEEXT) + $(CXXLINK) $(localetest_OBJECTS) $(localetest_LDADD) $(LIBS) +mgrtest$(EXEEXT): $(mgrtest_OBJECTS) $(mgrtest_DEPENDENCIES) + @rm -f mgrtest$(EXEEXT) + $(CXXLINK) $(mgrtest_OBJECTS) $(mgrtest_LDADD) $(LIBS) +modtest$(EXEEXT): $(modtest_OBJECTS) $(modtest_DEPENDENCIES) + @rm -f modtest$(EXEEXT) + $(CXXLINK) $(modtest_OBJECTS) $(modtest_LDADD) $(LIBS) +parsekey$(EXEEXT): $(parsekey_OBJECTS) $(parsekey_DEPENDENCIES) + @rm -f parsekey$(EXEEXT) + $(CXXLINK) $(parsekey_OBJECTS) $(parsekey_LDADD) $(LIBS) +rawldidxtest$(EXEEXT): $(rawldidxtest_OBJECTS) $(rawldidxtest_DEPENDENCIES) + @rm -f rawldidxtest$(EXEEXT) + $(CXXLINK) $(rawldidxtest_OBJECTS) $(rawldidxtest_LDADD) $(LIBS) +romantest$(EXEEXT): $(romantest_OBJECTS) $(romantest_DEPENDENCIES) + @rm -f romantest$(EXEEXT) + $(CXXLINK) $(romantest_OBJECTS) $(romantest_LDADD) $(LIBS) +swaptest$(EXEEXT): $(swaptest_OBJECTS) $(swaptest_DEPENDENCIES) + @rm -f swaptest$(EXEEXT) + $(CXXLINK) $(swaptest_OBJECTS) $(swaptest_LDADD) $(LIBS) +swbuftest$(EXEEXT): $(swbuftest_OBJECTS) $(swbuftest_DEPENDENCIES) + @rm -f swbuftest$(EXEEXT) + $(CXXLINK) $(swbuftest_OBJECTS) $(swbuftest_LDADD) $(LIBS) +testblocks$(EXEEXT): $(testblocks_OBJECTS) $(testblocks_DEPENDENCIES) + @rm -f testblocks$(EXEEXT) + $(CXXLINK) $(testblocks_OBJECTS) $(testblocks_LDADD) $(LIBS) +tlitmgrtest$(EXEEXT): $(tlitmgrtest_OBJECTS) $(tlitmgrtest_DEPENDENCIES) + @rm -f tlitmgrtest$(EXEEXT) + $(CXXLINK) $(tlitmgrtest_OBJECTS) $(tlitmgrtest_LDADD) $(LIBS) +translittest$(EXEEXT): $(translittest_OBJECTS) $(translittest_DEPENDENCIES) + @rm -f translittest$(EXEEXT) + $(CXXLINK) $(translittest_OBJECTS) $(translittest_LDADD) $(LIBS) +versekeytest$(EXEEXT): $(versekeytest_OBJECTS) $(versekeytest_DEPENDENCIES) + @rm -f versekeytest$(EXEEXT) + $(CXXLINK) $(versekeytest_OBJECTS) $(versekeytest_LDADD) $(LIBS) +webiftest$(EXEEXT): $(webiftest_OBJECTS) $(webiftest_DEPENDENCIES) + @rm -f webiftest$(EXEEXT) + $(CXXLINK) $(webiftest_OBJECTS) $(webiftest_LDADD) $(LIBS) +xmltest$(EXEEXT): $(xmltest_OBJECTS) $(xmltest_DEPENDENCIES) + @rm -f xmltest$(EXEEXT) + $(CXXLINK) $(xmltest_OBJECTS) $(xmltest_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/casttest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ciphertest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complzss.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compnone.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compzip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filtertest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icutest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indextest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/introtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keycast.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keytest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lextest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localetest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mgrtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsekey.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawldidxtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/romantest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swaptest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swbuftest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testblocks.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlitmgrtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/translittest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versekeytest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webiftest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltest.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-noinstPROGRAMS ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/bcppmake/Makefile.am b/tests/bcppmake/Makefile.am new file mode 100644 index 0000000..6a959e5 --- /dev/null +++ b/tests/bcppmake/Makefile.am @@ -0,0 +1,11 @@ +swbcppdir = $(top_srcdir)/tests/bcppmake + +EXTRA_DIST += $(swbcppdir)/filtertest.bpf +EXTRA_DIST += $(swbcppdir)/filtertest.bpr +EXTRA_DIST += $(swbcppdir)/libsword.bpf +EXTRA_DIST += $(swbcppdir)/libsword.bpr +EXTRA_DIST += $(swbcppdir)/mgrtest.bpf +EXTRA_DIST += $(swbcppdir)/mgrtest.bpr +EXTRA_DIST += $(swbcppdir)/parsekey.bpf +EXTRA_DIST += $(swbcppdir)/parsekey.bpr +EXTRA_DIST += $(swbcppdir)/tests.bpg diff --git a/tests/bcppmake/filtertest.bpf b/tests/bcppmake/filtertest.bpf new file mode 100644 index 0000000..5bef665 --- /dev/null +++ b/tests/bcppmake/filtertest.bpf @@ -0,0 +1,10 @@ +USEUNIT("..\filtertest.cpp"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/tests/bcppmake/filtertest.bpr b/tests/bcppmake/filtertest.bpr new file mode 100644 index 0000000..5778bc4 --- /dev/null +++ b/tests/bcppmake/filtertest.bpr @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/tests/bcppmake/libsword.bpf b/tests/bcppmake/libsword.bpf new file mode 100644 index 0000000..9daa167 --- /dev/null +++ b/tests/bcppmake/libsword.bpf @@ -0,0 +1,116 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USEUNIT("..\..\src\keys\versekey.cpp"); +USEUNIT("..\..\src\keys\strkey.cpp"); +USEUNIT("..\..\src\keys\swkey.cpp"); +USEUNIT("..\..\src\keys\listkey.cpp"); +USEUNIT("..\..\src\mgr\swmgr.cpp"); +USEUNIT("..\..\src\mgr\localemgr.cpp"); +USEUNIT("..\..\src\mgr\swconfig.cpp"); +USEUNIT("..\..\src\mgr\swlocale.cpp"); +USEUNIT("..\..\src\mgr\filemgr.cpp"); +USEUNIT("..\..\src\utilfuns\utilstr.cpp"); +USEUNIT("..\..\src\utilfuns\utilconf.cpp"); +USEUNIT("..\..\src\utilfuns\Greek2Greek.cpp"); +USEUNIT("..\..\src\frontend\swlog.cpp"); +USEUNIT("..\..\src\frontend\swdisp.cpp"); +USEUNIT("..\..\src\modules\swmodule.cpp"); +USEUNIT("..\..\src\modules\comments\swcom.cpp"); +USEUNIT("..\..\src\modules\comments\hrefcom\hrefcom.cpp"); +USEUNIT("..\..\src\modules\comments\rawcom\rawcom.cpp"); +USEUNIT("..\..\src\modules\comments\rawfiles\rawfiles.cpp"); +USEUNIT("..\..\src\modules\common\lzsscomprs.cpp"); +USEUNIT("..\..\src\modules\common\rawstr.cpp"); +USEUNIT("..\..\src\modules\common\rawverse.cpp"); +USEUNIT("..\..\src\modules\common\sapphire.cpp"); +USEUNIT("..\..\src\modules\common\swcipher.cpp"); +USEUNIT("..\..\src\modules\common\swcomprs.cpp"); +USEUNIT("..\..\src\modules\filters\thmlrtf.cpp"); +USEUNIT("..\..\src\modules\filters\gbffootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\gbfhtml.cpp"); +USEUNIT("..\..\src\modules\filters\gbfplain.cpp"); +USEUNIT("..\..\src\modules\filters\gbfrtf.cpp"); +USEUNIT("..\..\src\modules\filters\gbfstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\gbfthml.cpp"); +USEUNIT("..\..\src\modules\filters\plainfootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\plainhtml.cpp"); +USEUNIT("..\..\src\modules\filters\rtfhtml.cpp"); +USEUNIT("..\..\src\modules\filters\rwphtml.cpp"); +USEUNIT("..\..\src\modules\filters\rwprtf.cpp"); +USEUNIT("..\..\src\modules\filters\thmlgbf.cpp"); +USEUNIT("..\..\src\modules\filters\thmlhtml.cpp"); +USEUNIT("..\..\src\modules\filters\thmlplain.cpp"); +USEUNIT("..\..\src\modules\filters\cipherfil.cpp"); +USEUNIT("..\..\src\modules\lexdict\swld.cpp"); +USEUNIT("..\..\src\modules\lexdict\rawld\rawld.cpp"); +USEUNIT("..\..\src\modules\texts\swtext.cpp"); +USEUNIT("..\..\src\modules\texts\rawtext\rawtext.cpp"); +USEUNIT("..\..\src\modules\texts\ztext\ztext.cpp"); +USEUNIT("..\..\src\modules\common\zverse.cpp"); +USEUNIT("..\..\src\keys\treekey.cpp"); +USEUNIT("..\..\src\keys\treekeyidx.cpp"); +USEUNIT("..\..\src\modules\common\rawstr4.cpp"); +USEUNIT("..\..\src\modules\common\zstr.cpp"); +USEUNIT("..\..\src\modules\genbook\swgenbook.cpp"); +USEUNIT("..\..\src\modules\genbook\rawgenbook\rawgenbook.cpp"); +USEUNIT("..\..\src\mgr\swfiltermgr.cpp"); +USEUNIT("..\..\src\modules\filters\utf8utf16.cpp"); +USEUNIT("..\..\src\modules\filters\gbfheadings.cpp"); +USEUNIT("..\..\src\modules\filters\gbfhtmlhref.cpp"); +USEUNIT("..\..\src\modules\filters\gbfmorph.cpp"); +USEUNIT("..\..\src\modules\filters\latin1utf16.cpp"); +USEUNIT("..\..\src\modules\filters\latin1utf8.cpp"); +USEUNIT("..\..\src\modules\filters\scsuutf8.cpp"); +USEUNIT("..\..\src\modules\filters\swbasicfilter.cpp"); +USEUNIT("..\..\src\modules\filters\thmlfootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\thmlheadings.cpp"); +USEUNIT("..\..\src\modules\filters\thmlhtmlhref.cpp"); +USEUNIT("..\..\src\modules\filters\thmllemma.cpp"); +USEUNIT("..\..\src\modules\filters\thmlmorph.cpp"); +USEUNIT("..\..\src\modules\filters\thmlscripref.cpp"); +USEUNIT("..\..\src\modules\filters\thmlstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\thmlvariants.cpp"); +USEUNIT("..\..\src\modules\filters\unicodertf.cpp"); +USEUNIT("..\..\src\modules\filters\utf16utf8.cpp"); +USEUNIT("..\..\src\modules\filters\utf8arshaping.cpp"); +USEUNIT("..\..\src\modules\filters\utf8bidireorder.cpp"); +USEUNIT("..\..\src\modules\filters\utf8cantillation.cpp"); +USEUNIT("..\..\src\modules\filters\utf8greekaccents.cpp"); +USEUNIT("..\..\src\modules\filters\utf8hebrewpoints.cpp"); +USEUNIT("..\..\src\modules\filters\utf8html.cpp"); +USEUNIT("..\..\src\modules\filters\utf8latin1.cpp"); +USEUNIT("..\..\src\modules\filters\utf8nfc.cpp"); +USEUNIT("..\..\src\modules\filters\utf8nfkd.cpp"); +USEUNIT("..\..\src\modules\filters\utf8transliterator.cpp"); +USEUNIT("..\..\src\utilfuns\roman.c"); +USEUNIT("..\..\src\modules\comments\zcom\zcom.cpp"); +USEUNIT("..\..\src\modules\lexdict\rawld4\rawld4.cpp"); +USEUNIT("..\..\src\modules\common\zipcomprs.cpp"); +USEUNIT("..\..\src\modules\lexdict\zld\zld.cpp"); +USEUNIT("..\..\src\modules\common\entriesblk.cpp"); +USEUNIT("..\..\src\utilfuns\zlib\zutil.c"); +USEUNIT("..\..\src\utilfuns\zlib\compress.c"); +USEUNIT("..\..\src\utilfuns\zlib\crc32.c"); +USEUNIT("..\..\src\utilfuns\zlib\deflate.c"); +USEUNIT("..\..\src\utilfuns\zlib\gzio.c"); +USEUNIT("..\..\src\utilfuns\zlib\infblock.c"); +USEUNIT("..\..\src\utilfuns\zlib\infcodes.c"); +USEUNIT("..\..\src\utilfuns\zlib\inffast.c"); +USEUNIT("..\..\src\utilfuns\zlib\inflate.c"); +USEUNIT("..\..\src\utilfuns\zlib\inftrees.c"); +USEUNIT("..\..\src\utilfuns\zlib\infutil.c"); +USEUNIT("..\..\src\utilfuns\zlib\trees.c"); +USEUNIT("..\..\src\utilfuns\zlib\uncompr.c"); +USEUNIT("..\..\src\utilfuns\zlib\untgz.c"); +USEUNIT("..\..\src\utilfuns\zlib\adler32.c"); +USEUNIT("..\..\src\modules\filters\thmlosis.cpp"); +USEUNIT("..\..\src\modules\filters\greeklexattribs.cpp"); +USEUNIT("..\..\src\mgr\swcacher.cpp"); +USEUNIT("..\..\src\modules\filters\gbfosis.cpp"); +//--------------------------------------------------------------------------- +#define Library + +// To add a file to the library use the Project menu 'Add to Project'. + diff --git a/tests/bcppmake/libsword.bpr b/tests/bcppmake/libsword.bpr new file mode 100644 index 0000000..dccd59d --- /dev/null +++ b/tests/bcppmake/libsword.bpr @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\include;$(BCB)\include;$(BCB)\include\vcl +Item4=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[HistoryLists\hlTlibPageSize] +Count=5 +Item0=0x0200 +Item1=0x0080 +Item2=0x0040 +Item3=0x0020 +Item4=0x0010 + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/tests/bcppmake/mgrtest.bpf b/tests/bcppmake/mgrtest.bpf new file mode 100644 index 0000000..580dad0 --- /dev/null +++ b/tests/bcppmake/mgrtest.bpf @@ -0,0 +1,10 @@ +USEUNIT("..\mgrtest.cpp"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/tests/bcppmake/mgrtest.bpr b/tests/bcppmake/mgrtest.bpr new file mode 100644 index 0000000..7ac16de --- /dev/null +++ b/tests/bcppmake/mgrtest.bpr @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/tests/bcppmake/parsekey.bpf b/tests/bcppmake/parsekey.bpf new file mode 100644 index 0000000..490b3c6 --- /dev/null +++ b/tests/bcppmake/parsekey.bpf @@ -0,0 +1,10 @@ +USEUNIT("..\parsekey.cpp"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/tests/bcppmake/parsekey.bpr b/tests/bcppmake/parsekey.bpr new file mode 100644 index 0000000..167a8ad --- /dev/null +++ b/tests/bcppmake/parsekey.bpr @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams="jn1:2 -3:4" +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/tests/bcppmake/tests.bpg b/tests/bcppmake/tests.bpg new file mode 100644 index 0000000..d9b64c4 --- /dev/null +++ b/tests/bcppmake/tests.bpg @@ -0,0 +1,33 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = libsword.lib parsekey.exe filtertest.exe mgrtest.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +parsekey.exe: parsekey.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +filtertest.exe: filtertest.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mgrtest.exe: mgrtest.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +libsword.lib: ..\..\lib\bcppmake\libsword.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + + diff --git a/tests/casttest.cpp b/tests/casttest.cpp new file mode 100644 index 0000000..7fdedca --- /dev/null +++ b/tests/casttest.cpp @@ -0,0 +1,30 @@ +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) { +// VerseKey x("jas"); + TreeKeyIdx x("jas"); +// ListKey x("jas"); + SWKey *y = &x; + TreeKeyIdx *v = &x; +// VerseKey *v = &x; +// ListKey *v = &x; + +// v = SWDYNAMIC_CAST(VerseKey, y); + v = SWDYNAMIC_CAST(TreeKeyIdx, y); +// v = SWDYNAMIC_CAST(ListKey, y); + std::cout << std::endl; + if (v) + std::cout << (const char *)(*v); + else + std::cout << "cast failed\n"; + + std::cout << std::endl; + std::cout << std::endl; + return 0; +} diff --git a/tests/ciphertest.cpp b/tests/ciphertest.cpp new file mode 100644 index 0000000..36fc0b9 --- /dev/null +++ b/tests/ciphertest.cpp @@ -0,0 +1,32 @@ +#include +#include +#include +#include + +using namespace sword; + +int main(int argc, char **argv) { + + if (argc != 3) { + std::cerr << "usage: " << *argv << " <0-encipher|1-decipher>\n"; + return -1; + } + + + int encipher = atoi(argv[2]); + + SWFilter *filter = new CipherFilter(argv[1]); + + SWBuf text; + char buf[4096]; + std::cin >> buf; + text = buf; + + filter->processText(text, (SWKey *)encipher); + + std::cout << text; + + + + return 0; +} diff --git a/tests/complzss.cpp b/tests/complzss.cpp new file mode 100644 index 0000000..6040605 --- /dev/null +++ b/tests/complzss.cpp @@ -0,0 +1,110 @@ + + +#include +#include +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +class FileCompress: public LZSSCompress { + int ifd; + int ofd; + int ufd; + int zfd; +public: + FileCompress(char *); + ~FileCompress(); + unsigned long GetChars(char *, unsigned long len); + unsigned long SendChars(char *, unsigned long len); + void Encode(); + void Decode(); +}; + + +FileCompress::FileCompress(char *fname) +{ + char buf[256]; + + ufd = FileMgr::createPathAndFile(fname); + + sprintf(buf, "%s.lzs", fname); + zfd = FileMgr::createPathAndFile(buf); +} + + +FileCompress::~FileCompress() +{ + close(ufd); + close(zfd); +} + + +unsigned long FileCompress::GetChars(char *buf, unsigned long len) +{ + return read(ifd, buf, len); +} + + +unsigned long FileCompress::SendChars(char *buf, unsigned long len) +{ + return write(ofd, buf, len); +} + + +void FileCompress::Encode() +{ + ifd = ufd; + ofd = zfd; + + LZSSCompress::Encode(); +} + + +void FileCompress::Decode() +{ + ifd = zfd; + ofd = ufd; + + LZSSCompress::Decode(); +} + + +int main(int argc, char **argv) +{ + int decomp = 0; + SWCompress *fobj; + + if (argc != 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + exit(1); + } + + if (strlen(argv[1]) > 4) { + if (!strcmp(&argv[1][strlen(argv[1])-4], ".lzs")) { + argv[1][strlen(argv[1])-4] = 0; + decomp = 1; + } + } + + fobj = new FileCompress(argv[1]); + + if (decomp) + fobj->Decode(); + else fobj->Encode(); + + delete fobj; +} diff --git a/tests/compnone.cpp b/tests/compnone.cpp new file mode 100644 index 0000000..9a01fef --- /dev/null +++ b/tests/compnone.cpp @@ -0,0 +1,110 @@ + + +#include +#include +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +class FileCompress: public SWCompress { + int ifd; + int ofd; + int ufd; + int zfd; +public: + FileCompress(char *); + ~FileCompress(); + unsigned long GetChars(char *, unsigned long len); + unsigned long SendChars(char *, unsigned long len); + void Encode(); + void Decode(); +}; + + +FileCompress::FileCompress(char *fname) +{ + char buf[256]; + + ufd = FileMgr::createPathAndFile(fname); + + sprintf(buf, "%s.zzz", fname); + zfd = FileMgr::createPathAndFile(buf); +} + + +FileCompress::~FileCompress() +{ + close(ufd); + close(zfd); +} + + +unsigned long FileCompress::GetChars(char *buf, unsigned long len) +{ + return read(ifd, buf, len); +} + + +unsigned long FileCompress::SendChars(char *buf, unsigned long len) +{ + return write(ofd, buf, len); +} + + +void FileCompress::Encode() +{ + ifd = ufd; + ofd = zfd; + + SWCompress::Encode(); +} + + +void FileCompress::Decode() +{ + ifd = zfd; + ofd = ufd; + + SWCompress::Decode(); +} + + +int main(int argc, char **argv) +{ + int decomp = 0; + SWCompress *fobj; + + if (argc != 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + exit(1); + } + + if (strlen(argv[1]) > 4) { + if (!strcmp(&argv[1][strlen(argv[1])-4], ".zzz")) { + argv[1][strlen(argv[1])-4] = 0; + decomp = 1; + } + } + + fobj = new FileCompress(argv[1]); + + if (decomp) + fobj->Decode(); + else fobj->Encode(); + + delete fobj; +} diff --git a/tests/compzip.cpp b/tests/compzip.cpp new file mode 100644 index 0000000..678410b --- /dev/null +++ b/tests/compzip.cpp @@ -0,0 +1,109 @@ +#include +#include +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +class FileCompress: public ZipCompress { + int ifd; + int ofd; + int ufd; + int zfd; +public: + FileCompress(char *); + ~FileCompress(); + unsigned long GetChars(char *, unsigned long len); + unsigned long SendChars(char *, unsigned long len); + void Encode(); + void Decode(); +}; + + +FileCompress::FileCompress(char *fname) +{ + char buf[256]; + + ufd = FileMgr::createPathAndFile(fname); + + sprintf(buf, "%s.zip", fname); + zfd = FileMgr::createPathAndFile(buf); +} + + +FileCompress::~FileCompress() +{ + close(ufd); + close(zfd); +} + + +unsigned long FileCompress::GetChars(char *buf, unsigned long len) +{ + return read(ifd, buf, len); +} + + +unsigned long FileCompress::SendChars(char *buf, unsigned long len) +{ + return write(ofd, buf, len); +} + + +void FileCompress::Encode() +{ + ifd = ufd; + ofd = zfd; + + ZipCompress::Encode(); +} + + +void FileCompress::Decode() +{ + ifd = zfd; + ofd = ufd; + + ZipCompress::Decode(); +} + + +int main(int argc, char **argv) +{ + int decomp = 0; + SWCompress *fobj; + + if (argc != 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + exit(1); + } + + if (strlen(argv[1]) > 4) { + if (!strcmp(&argv[1][strlen(argv[1])-4], ".zip")) { + argv[1][strlen(argv[1])-4] = 0; + decomp = 1; + } + } + + fobj = new FileCompress(argv[1]); + + if (decomp) + fobj->Decode(); + else fobj->Encode(); + + delete fobj; + return 0; +} diff --git a/tests/configtest.cpp b/tests/configtest.cpp new file mode 100644 index 0000000..b616cd5 --- /dev/null +++ b/tests/configtest.cpp @@ -0,0 +1,16 @@ +#include +#include +#ifndef NO_SWORD_NAMESPACE +using sword::SWConfig; +#endif + +int main(int argc, char **argv) { + SWConfig config("./test1.conf"); + config["Section1"]["Entry1"] = "Value1"; + config["Section1"]["Entry2"] = "oops"; + config["Section1"]["Entry2"] = "Value2"; + config.Save(); + SWConfig config2("./test1.conf"); + std::cout << "Should be Value2: " << config2["Section1"]["Entry2"] << std::endl; + return 0; +} diff --git a/tests/cppunit/Makefile.am b/tests/cppunit/Makefile.am new file mode 100644 index 0000000..2443be2 --- /dev/null +++ b/tests/cppunit/Makefile.am @@ -0,0 +1,16 @@ +LDADD = $(top_builddir)/lib/libsword.la + +# Rules for the test code (use `make check` to execute) +if HAVE_CPPUNIT +TESTS = LibSword +else +TESTS = +endif +check_PROGRAMS = $(TESTS) +LibSword_SOURCES = main.cpp stringmgr_test.cpp swbuf_test.cpp url_test.cpp versekey_test.cpp +LibSword_CXXFLAGS = $(CPPUNIT_CFLAGS) -I$(top_srcdir)/include +LibSword_LDFLAGS = $(CPPUNIT_LIBS) + +swcppunitpdir = $(top_srcdir)/tests/cppunit + +#all: check diff --git a/tests/cppunit/Makefile.in b/tests/cppunit/Makefile.in new file mode 100644 index 0000000..c35295f --- /dev/null +++ b/tests/cppunit/Makefile.in @@ -0,0 +1,630 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@HAVE_CPPUNIT_TRUE@TESTS = LibSword$(EXEEXT) +check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests/cppunit +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ + $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +@HAVE_CPPUNIT_TRUE@am__EXEEXT_1 = LibSword$(EXEEXT) +am_LibSword_OBJECTS = LibSword-main.$(OBJEXT) \ + LibSword-stringmgr_test.$(OBJEXT) \ + LibSword-swbuf_test.$(OBJEXT) LibSword-url_test.$(OBJEXT) \ + LibSword-versekey_test.$(OBJEXT) +LibSword_OBJECTS = $(am_LibSword_OBJECTS) +LibSword_LDADD = $(LDADD) +LibSword_DEPENDENCIES = $(top_builddir)/lib/libsword.la +LibSword_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(LibSword_CXXFLAGS) \ + $(CXXFLAGS) $(LibSword_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(LibSword_SOURCES) +DIST_SOURCES = $(LibSword_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_CONFIG = @CPPUNIT_CONFIG@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CURL_AM_CFLAGS = @CURL_AM_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +GREP = @GREP@ +ICU_CONFIG = @ICU_CONFIG@ +ICU_IOLIBS = @ICU_IOLIBS@ +ICU_LIBS = @ICU_LIBS@ +ICU_VER = @ICU_VER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGDATA = @PKGDATA@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dir_confdef = @dir_confdef@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +LDADD = $(top_builddir)/lib/libsword.la +LibSword_SOURCES = main.cpp stringmgr_test.cpp swbuf_test.cpp url_test.cpp versekey_test.cpp +LibSword_CXXFLAGS = $(CPPUNIT_CFLAGS) -I$(top_srcdir)/include +LibSword_LDFLAGS = $(CPPUNIT_LIBS) +swcppunitpdir = $(top_srcdir)/tests/cppunit +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/cppunit/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/cppunit/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +LibSword$(EXEEXT): $(LibSword_OBJECTS) $(LibSword_DEPENDENCIES) + @rm -f LibSword$(EXEEXT) + $(LibSword_LINK) $(LibSword_OBJECTS) $(LibSword_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LibSword-main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LibSword-stringmgr_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LibSword-swbuf_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LibSword-url_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LibSword-versekey_test.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +LibSword-main.o: main.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-main.o -MD -MP -MF $(DEPDIR)/LibSword-main.Tpo -c -o LibSword-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-main.Tpo $(DEPDIR)/LibSword-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cpp' object='LibSword-main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp + +LibSword-main.obj: main.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-main.obj -MD -MP -MF $(DEPDIR)/LibSword-main.Tpo -c -o LibSword-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-main.Tpo $(DEPDIR)/LibSword-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cpp' object='LibSword-main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` + +LibSword-stringmgr_test.o: stringmgr_test.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-stringmgr_test.o -MD -MP -MF $(DEPDIR)/LibSword-stringmgr_test.Tpo -c -o LibSword-stringmgr_test.o `test -f 'stringmgr_test.cpp' || echo '$(srcdir)/'`stringmgr_test.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-stringmgr_test.Tpo $(DEPDIR)/LibSword-stringmgr_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stringmgr_test.cpp' object='LibSword-stringmgr_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-stringmgr_test.o `test -f 'stringmgr_test.cpp' || echo '$(srcdir)/'`stringmgr_test.cpp + +LibSword-stringmgr_test.obj: stringmgr_test.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-stringmgr_test.obj -MD -MP -MF $(DEPDIR)/LibSword-stringmgr_test.Tpo -c -o LibSword-stringmgr_test.obj `if test -f 'stringmgr_test.cpp'; then $(CYGPATH_W) 'stringmgr_test.cpp'; else $(CYGPATH_W) '$(srcdir)/stringmgr_test.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-stringmgr_test.Tpo $(DEPDIR)/LibSword-stringmgr_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stringmgr_test.cpp' object='LibSword-stringmgr_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-stringmgr_test.obj `if test -f 'stringmgr_test.cpp'; then $(CYGPATH_W) 'stringmgr_test.cpp'; else $(CYGPATH_W) '$(srcdir)/stringmgr_test.cpp'; fi` + +LibSword-swbuf_test.o: swbuf_test.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-swbuf_test.o -MD -MP -MF $(DEPDIR)/LibSword-swbuf_test.Tpo -c -o LibSword-swbuf_test.o `test -f 'swbuf_test.cpp' || echo '$(srcdir)/'`swbuf_test.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-swbuf_test.Tpo $(DEPDIR)/LibSword-swbuf_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='swbuf_test.cpp' object='LibSword-swbuf_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-swbuf_test.o `test -f 'swbuf_test.cpp' || echo '$(srcdir)/'`swbuf_test.cpp + +LibSword-swbuf_test.obj: swbuf_test.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-swbuf_test.obj -MD -MP -MF $(DEPDIR)/LibSword-swbuf_test.Tpo -c -o LibSword-swbuf_test.obj `if test -f 'swbuf_test.cpp'; then $(CYGPATH_W) 'swbuf_test.cpp'; else $(CYGPATH_W) '$(srcdir)/swbuf_test.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-swbuf_test.Tpo $(DEPDIR)/LibSword-swbuf_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='swbuf_test.cpp' object='LibSword-swbuf_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-swbuf_test.obj `if test -f 'swbuf_test.cpp'; then $(CYGPATH_W) 'swbuf_test.cpp'; else $(CYGPATH_W) '$(srcdir)/swbuf_test.cpp'; fi` + +LibSword-url_test.o: url_test.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-url_test.o -MD -MP -MF $(DEPDIR)/LibSword-url_test.Tpo -c -o LibSword-url_test.o `test -f 'url_test.cpp' || echo '$(srcdir)/'`url_test.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-url_test.Tpo $(DEPDIR)/LibSword-url_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='url_test.cpp' object='LibSword-url_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-url_test.o `test -f 'url_test.cpp' || echo '$(srcdir)/'`url_test.cpp + +LibSword-url_test.obj: url_test.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-url_test.obj -MD -MP -MF $(DEPDIR)/LibSword-url_test.Tpo -c -o LibSword-url_test.obj `if test -f 'url_test.cpp'; then $(CYGPATH_W) 'url_test.cpp'; else $(CYGPATH_W) '$(srcdir)/url_test.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-url_test.Tpo $(DEPDIR)/LibSword-url_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='url_test.cpp' object='LibSword-url_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-url_test.obj `if test -f 'url_test.cpp'; then $(CYGPATH_W) 'url_test.cpp'; else $(CYGPATH_W) '$(srcdir)/url_test.cpp'; fi` + +LibSword-versekey_test.o: versekey_test.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-versekey_test.o -MD -MP -MF $(DEPDIR)/LibSword-versekey_test.Tpo -c -o LibSword-versekey_test.o `test -f 'versekey_test.cpp' || echo '$(srcdir)/'`versekey_test.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-versekey_test.Tpo $(DEPDIR)/LibSword-versekey_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='versekey_test.cpp' object='LibSword-versekey_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-versekey_test.o `test -f 'versekey_test.cpp' || echo '$(srcdir)/'`versekey_test.cpp + +LibSword-versekey_test.obj: versekey_test.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -MT LibSword-versekey_test.obj -MD -MP -MF $(DEPDIR)/LibSword-versekey_test.Tpo -c -o LibSword-versekey_test.obj `if test -f 'versekey_test.cpp'; then $(CYGPATH_W) 'versekey_test.cpp'; else $(CYGPATH_W) '$(srcdir)/versekey_test.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/LibSword-versekey_test.Tpo $(DEPDIR)/LibSword-versekey_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='versekey_test.cpp' object='LibSword-versekey_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(LibSword_CXXFLAGS) $(CXXFLAGS) -c -o LibSword-versekey_test.obj `if test -f 'versekey_test.cpp'; then $(CYGPATH_W) 'versekey_test.cpp'; else $(CYGPATH_W) '$(srcdir)/versekey_test.cpp'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *$$ws$$tst$$ws*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + echo "XPASS: $$tst"; \ + ;; \ + *) \ + echo "PASS: $$tst"; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *$$ws$$tst$$ws*) \ + xfail=`expr $$xfail + 1`; \ + echo "XFAIL: $$tst"; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all tests failed"; \ + else \ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +#all: check +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/cppunit/main.cpp b/tests/cppunit/main.cpp new file mode 100644 index 0000000..c1f69ee --- /dev/null +++ b/tests/cppunit/main.cpp @@ -0,0 +1,25 @@ +//LibSword tests + +//CppUnit includes +#include +#include +#include +#include + +#include + +int main( int argc, char* argv[] ) { + CppUnit::TextUi::TestRunner runner; + CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry(); + runner.addTest( registry.makeTest() ); + + // Change the default outputter to a compiler error format outputter + // uncomment the following line if you need a compiler outputter. + runner.setOutputter(new CppUnit::CompilerOutputter( &runner.result(), std::cout ) ); + + //runner.setOutputter( new CppUnit::XmlOutputter( &runner.result(), + // std::cerr ) ); + + bool success = runner.run(); + return success ? 0 : -1; + } diff --git a/tests/cppunit/stringmgr_test.cpp b/tests/cppunit/stringmgr_test.cpp new file mode 100644 index 0000000..545c910 --- /dev/null +++ b/tests/cppunit/stringmgr_test.cpp @@ -0,0 +1,43 @@ +#include + +#include + +#include "stringmgr.h" + +using namespace sword; +using namespace std; + +class StringMgrTest : public CppUnit::TestFixture { +CPPUNIT_TEST_SUITE( StringMgrTest ); +CPPUNIT_TEST( testUpperLatin1 ); +CPPUNIT_TEST( testUpperUTF8 ); +CPPUNIT_TEST_SUITE_END(); + +public: + void setUp() { + } + void tearDown() { + } + + void testUpperLatin1() { + StringMgr* mgr = StringMgr::getSystemStringMgr(); + + CPPUNIT_ASSERT( !strcmp(mgr->upperLatin1(""), "") ); + + char t[10] = "Test!"; + const char* ret = mgr->upperLatin1(t); + cout << ret << endl; + CPPUNIT_ASSERT( ret && !strcmp(ret, "TEST!") ); + } + + void testUpperUTF8() { + StringMgr* mgr = StringMgr::getSystemStringMgr(); + if (mgr->hasUTF8Support()) { + char t[10] = "hi"; + char* ret = mgr->upperUTF8(t); + CPPUNIT_ASSERT( ret && !strcmp(ret, "HI") ); + } + } +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(StringMgrTest); diff --git a/tests/cppunit/swbuf_test.cpp b/tests/cppunit/swbuf_test.cpp new file mode 100644 index 0000000..5c108b0 --- /dev/null +++ b/tests/cppunit/swbuf_test.cpp @@ -0,0 +1,113 @@ +#include + +#include + +#include "swbuf.h" +using namespace sword; +using namespace std; + +class SWBufTest : public CppUnit::TestFixture { +CPPUNIT_TEST_SUITE( SWBufTest ); +CPPUNIT_TEST( testEquality ); +CPPUNIT_TEST( testAppendString ); +CPPUNIT_TEST( testAppendChar ); +CPPUNIT_TEST( testInsertString ); +CPPUNIT_TEST( testInsertChar ); +CPPUNIT_TEST_SUITE_END(); + +public: + void setUp() { + } + void tearDown() { + } + + void testEquality() { + SWBuf s1("Hi, this is a test!"); + SWBuf s2("Hi, this is a test!"); + + CPPUNIT_ASSERT( s1 == s2 ); + CPPUNIT_ASSERT( s1 == "Hi, this is a test!" ); + CPPUNIT_ASSERT( !(s1 == "Hi, this is a wrong test!") ); + } + void testAppendString() { + SWBuf t; + + for (int i = 0; i < 5000; ++i) { + t.append("a"); + t.append("b"); + t.append("ccccc",1); + } + CPPUNIT_ASSERT( t.length() == 3*5000 ); + + char c = 'a'; + for (int i = 0; i < 5000; ++i) { //check whether the append calls worked right + CPPUNIT_ASSERT( t[i] == c ); + + c = (c=='a') ? 'b' : ((c=='b') ? 'c' : 'a'); + } + } + void testAppendChar() { + SWBuf t; + + for (int i = 0; i < 5000; ++i) { + t.append('a'); + t.append('b'); + t.append('c'); + } + CPPUNIT_ASSERT( t.length() == 3*5000 ); + + char c = 'a'; + for (int i = 0; i < 5000; ++i) { //check whether the append calls worked right + CPPUNIT_ASSERT( t[i] == c ); + + c = (c=='a') ? 'b' : ((c=='b') ? 'c' : 'a'); + } + } + + void testInsertString() { + SWBuf t = "end"; + + for (int i = 0; i < 5000; ++i) { + t.insert(0, "a"); + t.insert(1, "b"); + t.insert(2, "ccccccc", 0, 1); //only one c + } + CPPUNIT_ASSERT( t.length() == 3*5000+3 ); + + char c = 'a'; + for (int i = 0; i < 5000; ++i) { //check whether the append calls worked right + CPPUNIT_ASSERT( t[i] == c ); + + c = (c=='a') ? 'b' : ((c=='b') ? 'c' : 'a'); + } + //check if end is at the end + CPPUNIT_ASSERT( t[3*5000+0] == 'e'); + CPPUNIT_ASSERT( t[3*5000+1] == 'n'); + CPPUNIT_ASSERT( t[3*5000+2] == 'd'); + } + + void testInsertChar() { + SWBuf t = "end"; + + for (int i = 0; i < 5000; ++i) { + t.insert(0, 'a'); + t.insert(1, 'b'); + t.insert(2, 'c'); + } + CPPUNIT_ASSERT( t.length() == 3*5000+3 ); + + char c = 'a'; + for (int i = 0; i < 5000; ++i) { //check whether the insert calls worked right + CPPUNIT_ASSERT( t[i] == c ); + + c = (c=='a') ? 'b' : ((c=='b') ? 'c' : 'a'); + } + //check if end is at the end + CPPUNIT_ASSERT( t[3*5000+0] == 'e'); + CPPUNIT_ASSERT( t[3*5000+1] == 'n'); + CPPUNIT_ASSERT( t[3*5000+2] == 'd'); + } + +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(SWBufTest); diff --git a/tests/cppunit/url_test.cpp b/tests/cppunit/url_test.cpp new file mode 100644 index 0000000..a49dd10 --- /dev/null +++ b/tests/cppunit/url_test.cpp @@ -0,0 +1,108 @@ +#include + +#include + +#include "url.h" + +using namespace sword; +using namespace std; + +class URLTest : public CppUnit::TestFixture { +CPPUNIT_TEST_SUITE( URLTest ); +CPPUNIT_TEST( testProtocol ); +CPPUNIT_TEST( testHostName ); +CPPUNIT_TEST( testPath ); +CPPUNIT_TEST( testParametersMap ); +CPPUNIT_TEST( testParameterValue ); +CPPUNIT_TEST( testEncode ); +CPPUNIT_TEST( testDecode ); +CPPUNIT_TEST_SUITE_END(); + +private: + sword::URL* m_url1; + sword::URL* m_url2; + sword::URL* m_url3; + +public: + void setUp() { + m_url1 = new sword::URL("http://www.crosswire.org/index.jsp?page=help&user=foo&name=bar"); + m_url2 = new sword::URL("ftp://ftp.crosswire.org/sword/wiki/index.jsp?page=help&user=foo&name=foo%20bar"); + m_url3 = new sword::URL("crosswire.org/index.jsp"); + } + void tearDown() { + delete m_url1; + delete m_url2; + delete m_url3; + } + + void testProtocol() + { + CPPUNIT_ASSERT( !strcmp(m_url1->getProtocol(), "http") ); + CPPUNIT_ASSERT( !strcmp(m_url2->getProtocol(), "ftp") ); + CPPUNIT_ASSERT( m_url3->getProtocol() && strlen( m_url3->getProtocol() ) == 0 ); + } + + void testHostName() + { + CPPUNIT_ASSERT( !strcmp(m_url1->getHostName(), "www.crosswire.org") ); + CPPUNIT_ASSERT( !strcmp(m_url2->getHostName(), "ftp.crosswire.org") ); + CPPUNIT_ASSERT( !strcmp(m_url3->getHostName(), "crosswire.org") ); + } + + void testPath() + { + CPPUNIT_ASSERT( !strcmp(m_url1->getPath(), "/index.jsp") ); + CPPUNIT_ASSERT( !strcmp(m_url2->getPath(), "/sword/wiki/index.jsp") ); + CPPUNIT_ASSERT( !strcmp(m_url3->getPath(), "/index.jsp") ); + } + + void testParametersMap() + { + std::map< sword::SWBuf, sword::SWBuf > params = m_url1->getParameters(); + CPPUNIT_ASSERT( !strcmp(params[sword::SWBuf("page")].c_str(), "help") ); + CPPUNIT_ASSERT( !strcmp(params[sword::SWBuf("user")].c_str(), "foo") ); + CPPUNIT_ASSERT( !strcmp(params[sword::SWBuf("name")].c_str(), "bar") ); + + params = m_url2->getParameters(); //test url2 params + CPPUNIT_ASSERT( !strcmp(params[sword::SWBuf("page")].c_str(), "help") ); + CPPUNIT_ASSERT( !strcmp(params[sword::SWBuf("user")].c_str(), "foo") ); + CPPUNIT_ASSERT( !strcmp(params[sword::SWBuf("name")].c_str(), "foo bar") ); + + params = m_url3->getParameters(); //test url3 params + CPPUNIT_ASSERT( params.size() == 0 ); + } + + void testParameterValue() + { + CPPUNIT_ASSERT( !strcmp(m_url1->getParameterValue("page"), "help") ); + CPPUNIT_ASSERT( !strcmp(m_url1->getParameterValue("user"), "foo") ); + CPPUNIT_ASSERT( !strcmp(m_url1->getParameterValue("name"), "bar") ); + + CPPUNIT_ASSERT( !strcmp(m_url2->getParameterValue("page"), "help") ); + CPPUNIT_ASSERT( !strcmp(m_url2->getParameterValue("user"), "foo") ); + CPPUNIT_ASSERT( !strcmp(m_url2->getParameterValue("name"), "foo bar") ); + + CPPUNIT_ASSERT( m_url3->getParameterValue("page") && strlen(m_url3->getParameterValue("page")) == 0 ); + } + + void testEncode() { + cout << URL::encode("this is a test") << endl; + + SWBuf encoded = URL::encode("this is a test"); + CPPUNIT_ASSERT( !strcmp(encoded.c_str(), "this%20is%20a%20test") || !strcmp(encoded.c_str(), "this+is+a+test") ); + + CPPUNIT_ASSERT( !strcmp(URL::encode("this-is-a-test").c_str(), "this-is-a-test") ); + CPPUNIT_ASSERT( !strcmp(URL::encode("").c_str(), "") ); + } + + void testDecode() { + CPPUNIT_ASSERT( !strcmp(URL::decode("this%3Eis%3Ea%3Etest").c_str(), "this>is>a>test") ); + CPPUNIT_ASSERT( !strcmp(URL::decode("this%3Eis%3Ea%3Etest%3E").c_str(), "this>is>a>test>") ); + CPPUNIT_ASSERT( !strcmp(URL::decode("%3E%3E%3E%3E%3E%3E%3E%3E%3E%3E%20%20%20%20%20").c_str(), ">>>>>>>>>> ") ); + CPPUNIT_ASSERT( !strcmp(URL::decode("nothing%20").c_str(), "nothing ") ); + CPPUNIT_ASSERT( !strcmp(URL::decode("nothing").c_str(), "nothing") ); + CPPUNIT_ASSERT( !strcmp(URL::decode("").c_str(), "") ); + } +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(URLTest); diff --git a/tests/cppunit/versekey_test.cpp b/tests/cppunit/versekey_test.cpp new file mode 100644 index 0000000..6a615dc --- /dev/null +++ b/tests/cppunit/versekey_test.cpp @@ -0,0 +1,280 @@ +#include + +#include + +#include "localemgr.h" +#include "swbuf.h" +#include "versekey.h" + +using namespace sword; +using namespace std; + +class VerseKeyTest : public CppUnit::TestFixture { +CPPUNIT_TEST_SUITE( VerseKeyTest ); + +CPPUNIT_TEST( testSingleKeyParsing ); +CPPUNIT_TEST( testRangeKeyParsing ); +CPPUNIT_TEST( testListKeyParsing ); + +CPPUNIT_TEST( testLessThan ); +CPPUNIT_TEST( testLessEqualThan ); +CPPUNIT_TEST( testEquality ); +CPPUNIT_TEST( testGreaterEqualThan ); +CPPUNIT_TEST( testGreaterThan ); + +CPPUNIT_TEST( testDecrement ); +CPPUNIT_TEST( testIncrement ); + +CPPUNIT_TEST_SUITE_END(); + +protected: + SWBuf parseKey(const char* keyValue, const char* locale) { + sword::VerseKey vk; + vk.setLocale(locale); + vk.setText(keyValue); + + SWBuf ret( vk.getText() ); + //std::cout << ret.c_str(); + return ret; + }; + + SWBuf parseRangeKey(const char* keyValue, const char* locale) { + const char* oldLocale = LocaleMgr::getSystemLocaleMgr()->getDefaultLocaleName(); + LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(locale); + + SWBuf ret; + + VerseKey DefaultVSKey; + DefaultVSKey = "jas3:1"; + + ListKey verses = DefaultVSKey.ParseVerseList(keyValue, DefaultVSKey, true); + + for (int i = 0; i < verses.Count(); i++) { + VerseKey *element = dynamic_cast(verses.GetElement(i)); + if (element) { + if (ret.length()) { + ret.append(" "); + } + + ret.appendFormatted( "%s - %s;", (const char*)element->LowerBound(), (const char*)element->UpperBound() ); + } + else { + if (ret.length()) { + ret.append(" "); + } + + ret.appendFormatted("%s;", (const char *)*verses.GetElement(i)); + } + } + +// cout << ret.c_str() << endl; + LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(oldLocale); + return ret; + }; + +public: + void setUp() { +/* m_vk1 = new sword::VerseKey(); + m_vk2 = new sword::VerseKey(); + m_vk3 = new sword::VerseKey(); + + setLocaleToAll("en");*/ + } + void tearDown() { +/* delete m_vk1; + delete m_vk2; + delete m_vk3;*/ + } + + void testSingleKeyParsing() { + //testing with I John 2:3 and locale en + CPPUNIT_ASSERT( parseKey("1jn.2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("1 jn.2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("Ijn.2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("I jn.2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "1jn 2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "1 jn 2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "Ijn 2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "I jn 2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "1jn.2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "1 jn.2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "Ijn.2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "I jn.2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "1jn 2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "1 jn 2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey( "Ijn 2:3", "en") == "I John 2:3"); + + CPPUNIT_ASSERT( parseKey("1.jn.2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("1. jn.2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("I.jn.2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("I. jn.2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("1.jn 2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("1. jn 2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("I.jn 2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("I. jn 2.3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("1.jn.2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("1. jn.2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("I.jn.2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("I. jn.2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("1.jn 2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("1. jn 2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("I.jn 2:3", "en") == "I John 2:3"); + CPPUNIT_ASSERT( parseKey("I. jn 2:3", "en") == "I John 2:3"); + + + //testing the same with german locale + CPPUNIT_ASSERT( parseKey("1jn.2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("1 jn.2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("Ijn.2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("I jn.2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "1jn 2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "1 jn 2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "Ijn 2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "I jn 2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "1jn.2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "1 jn.2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "Ijn.2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "I jn.2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "1jn 2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "1 jn 2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey( "Ijn 2:3", "de") == "1. Johannes 2:3"); + + CPPUNIT_ASSERT( parseKey("1.jn.2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("1. jn.2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("I.jn.2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("I. jn.2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("1.jn 2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("1. jn 2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("I.jn 2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("I. jn 2.3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("1.jn.2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("1. jn.2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("I.jn.2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("I. jn.2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("1.jn 2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("1. jn 2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("I.jn 2:3", "de") == "1. Johannes 2:3"); + CPPUNIT_ASSERT( parseKey("I. jn 2:3", "de") == "1. Johannes 2:3"); + } + + void testRangeKeyParsing() { + //some range tests with the english locale + CPPUNIT_ASSERT( parseRangeKey("I. jn 1:1 - 3:10", "en") == "I John 1:1 - I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1 - 3:10", "en") == "I John 1:1 - I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1 -3:10", "en") == "I John 1:1 - I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1- 3:10", "en") == "I John 1:1 - I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1- 3:10", "en") == "I John 1:1 - I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1 -3:10", "en") == "I John 1:1 - I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1 -3:10; 1Jn 3:11", "en") == "I John 1:1 - I John 3:10; I John 3:11;"); + + //some range tests with german locale + CPPUNIT_ASSERT( parseRangeKey("I. jn 1:1 - 3:10", "de") == "1. Johannes 1:1 - 1. Johannes 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1. Joh 1:1 - 3:10", "de") == "1. Johannes 1:1 - 1. Johannes 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1. Johannes 1:1- 3:10", "de") == "1. Johannes 1:1 - 1. Johannes 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1. Joh 1:1- 3:10", "de") == "1. Johannes 1:1 - 1. Johannes 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1. Johannes 1:1 -3:10", "de") == "1. Johannes 1:1 - 1. Johannes 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1. Joh 1:1 -3:10", "de") == "1. Johannes 1:1 - 1. Johannes 3:10;"); + } + + void testListKeyParsing() { + //some range tests with the english locale + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1 3:10", "en") == "I John 1:1; I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1 3:10", "en") == "I John 1:1; I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1,3:10", "en") == "I John 1:1; I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1, 3:10", "en") == "I John 1:1; I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1 ,3:10", "en") == "I John 1:1; I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1 , 3:10", "en") == "I John 1:1; I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1;3:10", "en") == "I John 1:1; I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1; 3:10", "en") == "I John 1:1; I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1 ;3:10", "en") == "I John 1:1; I John 3:10;"); + CPPUNIT_ASSERT( parseRangeKey("1Jn 1:1 ; 3:10", "en") == "I John 1:1; I John 3:10;"); + } + + void testLessThan() { + VerseKey vk1("Luke 1:1"); + VerseKey vk2("Luke 1:1"); + VerseKey vk3("Luke 1:2"); + + CPPUNIT_ASSERT( !(vk1 < vk2) ); + CPPUNIT_ASSERT( vk1 < vk3 ); + + for (int n = 0; n < 30; n++) {//some more stress :) + vk1 = "Luke 1:1"; + vk3 = vk1; + + for (int j = 0; j < 30; ++j) { + vk1--; + CPPUNIT_ASSERT( vk1 < vk3 ); + CPPUNIT_ASSERT( vk1 < VerseKey("Revelation") ); + CPPUNIT_ASSERT( !(vk1 < VerseKey("Gen")) ); + } + } + } + void testLessEqualThan() { + VerseKey vk1("Luke 1:1"); + VerseKey vk2("Luke 1:1"); + VerseKey vk3("Luke 1:2"); + + CPPUNIT_ASSERT( vk1 <= vk2 ); + CPPUNIT_ASSERT( vk1 <= vk3 ); + + for (int n = 0; n < 30; n++) { //some more stress + vk1 = "Luke 1:1"; + vk3 = vk1; + + for (int j = 0; j < 30; ++j) { + CPPUNIT_ASSERT( vk1 <= vk3 ); + CPPUNIT_ASSERT( vk1 <= VerseKey("Revelation") ); + CPPUNIT_ASSERT( !(vk1 <= VerseKey("Gen")) ); + + vk1--; + } + } + } + void testEquality() { + VerseKey vk1("Luke 1:1"); + VerseKey vk2("Luke 1:1"); + VerseKey vk3("Luke 1:2"); + + CPPUNIT_ASSERT( vk1 == vk2 ); + CPPUNIT_ASSERT( !(vk1 == vk3) ); + } + void testGreaterEqualThan() { + VerseKey vk1("Luke 1:3"); + VerseKey vk2("Luke 1:3"); + VerseKey vk3("Luke 1:1"); + + CPPUNIT_ASSERT( vk1 >= vk2 ); + CPPUNIT_ASSERT( vk1 >= vk3 ); + } + void testGreaterThan() { + VerseKey vk1("Luke 1:3"); + VerseKey vk2("Luke 1:1"); + VerseKey vk3("Luke 1:2"); + + CPPUNIT_ASSERT( vk1 > vk2 ); + CPPUNIT_ASSERT( vk1 > vk3 ); + } + + void testDecrement() { + VerseKey vk("Matthew 1:1"); + const int delta = 10; + + for (int i =0; i < delta; ++i) { + vk--; + } + CPPUNIT_ASSERT( vk == VerseKey("Mal 3:15") ); + } + void testIncrement() { + VerseKey vk("Mal 3:15"); + const int delta = 10; + + for (int i =0; i < delta; ++i) { + vk++; + } + CPPUNIT_ASSERT( vk == VerseKey("Matthew 1:1") ); + } + +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(VerseKeyTest); diff --git a/tests/filtertest.cpp b/tests/filtertest.cpp new file mode 100644 index 0000000..d71bc91 --- /dev/null +++ b/tests/filtertest.cpp @@ -0,0 +1,23 @@ +#include +#include +#include +//#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif +using namespace std; + + +int main(int argc, char **argv) { +// SWMgr mgr; +// SWModule *module = mgr.getModule("KJV"); + PapyriPlain filter; + SWBuf buf; + buf = "This is txt which has papy-\nri markings in it.\n L[et's be] sure it gets--\n cleaned up well for s(earching)"; + std::cout << "Original:\n\n" << buf << "\n\n-------\n\n"; + filter.processText(buf); +// filter.processText(buf, module->getKey(), module); + std::cout << buf << "\n\n+++++++\n"; + + return 0; +} diff --git a/tests/icutest.cpp b/tests/icutest.cpp new file mode 100644 index 0000000..73cf999 --- /dev/null +++ b/tests/icutest.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +#include + +#include "unicode/utypes.h" /* Basic ICU data types */ +#include "unicode/ucnv.h" /* C Converter API */ +#include "unicode/ustring.h" /* some more string fcns*/ + +#include "unicode/translit.h" + +using namespace std; + +int main() { + + UChar * uBuf; + UChar * target; + UConverter *conv; + UErrorCode status = U_ZERO_ERROR; + int32_t uBufSize = 0, uLength = 0; + + const char * samplestring = "If this compiles and runs without errors, apparently ICU is working."; + + uLength = strlen(samplestring); + conv = ucnv_open("utf-8", &status); + uBufSize = (uLength/ucnv_getMinCharSize(conv)); + uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)); + + target = uBuf; + + ucnv_toUChars(conv, target, uLength, + samplestring, uLength, &status); + + cout << samplestring << endl; + + return 0; +} diff --git a/tests/indextest.cpp b/tests/indextest.cpp new file mode 100644 index 0000000..b3a712a --- /dev/null +++ b/tests/indextest.cpp @@ -0,0 +1,23 @@ +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) { + SWMgr mymgr; + + SWModule *bbe = mymgr.Modules["BBE"]; + + if (bbe) { + VerseKey vk; + vk.Persist(1); + bbe->setKey(vk); + for (; !bbe->Error(); (*bbe)++ ) { + std::cout << vk.NewIndex() << std::endl; + } + } + return 0; +} diff --git a/tests/installmgrtest.cpp b/tests/installmgrtest.cpp new file mode 100644 index 0000000..666f63b --- /dev/null +++ b/tests/installmgrtest.cpp @@ -0,0 +1,12 @@ +#include +#include + +using namespace std; +using namespace sword; + +int main(int argc, char **argv) { + InstallMgr inst("ftp://ftp.crosswire.org/pub/sword/raw"); + inst.Refresh(); + +} + diff --git a/tests/introtest.cpp b/tests/introtest.cpp new file mode 100644 index 0000000..162b960 --- /dev/null +++ b/tests/introtest.cpp @@ -0,0 +1,110 @@ +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) { + SWMgr mymgr; + + RawText::createModule("."); + RawText mod("."); + + VerseKey vk; + vk.Headings(1); + vk.AutoNormalize(0); + vk.Persist(1); + mod.setKey(vk); + + vk.Verse(0); + vk.Chapter(0); + vk.Book(0); + vk.Testament(0); + + mod << "Module heading text"; + + vk.Verse(0); + vk.Chapter(0); + vk.Book(0); + vk.Testament(1); + + mod << "OT heading text"; + + vk.Testament(1); + vk.Book(1); + vk.Chapter(0); + vk.Verse(0); + + mod << "Gen heading text"; + + vk.Testament(1); + vk.Book(1); + vk.Chapter(1); + vk.Verse(0); + + mod << "Gen 1 heading text"; + + vk.Testament(1); + vk.Book(1); + vk.Chapter(1); + vk.Verse(1); + + mod << "Gen 1:1 text"; + + + vk.Testament(0); + vk.Book(0); + vk.Chapter(0); + vk.Verse(0); + + std::cout << "Module heading text ?= " << (const char*)mod << std::endl; + + vk.Testament(1); + vk.Book(0); + vk.Chapter(0); + vk.Verse(0); + + std::cout << "OT heading text ?= " << (const char*)mod << std::endl; + + vk.Testament(1); + vk.Book(1); + vk.Chapter(0); + vk.Verse(0); + + std::cout << "Gen heading text ?= " << (const char*)mod << std::endl; + + vk.Testament(1); + vk.Book(1); + vk.Chapter(1); + vk.Verse(0); + + std::cout << "Gen 1 heading text ?= " << (const char*)mod << std::endl; + + vk.Testament(1); + vk.Book(1); + vk.Chapter(1); + vk.Verse(1); + + std::cout << "Gen 1:1 text ?= " << (const char*)mod << std::endl; + + /* old introtest + SWModule *mhc = mymgr.Modules["MHC"]; + + if (mhc) { + VerseKey vk; + vk.Headings(1); + vk.AutoNormalize(0); + vk.Persist(1); + vk = "jas 0:0"; + std::cout << vk << ":\n"; + mhc->setKey(vk); + std::cout << (const char *) mhc->Key() << ":\n"; + std::cout << (const char *) *mhc << "\n"; + } + */ + return 0; +} + + diff --git a/tests/keycast.cpp b/tests/keycast.cpp new file mode 100644 index 0000000..f037b0e --- /dev/null +++ b/tests/keycast.cpp @@ -0,0 +1,33 @@ +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main (int argc, char* argv[]) { + SWMgr mgr; + +//the commented out code works +/* + StringList globalOptions = mgr.getGlobalOptions(); + for (StringList::iterator it = globalOptions.begin(); it != globalOptions.end(); it++) { + std::cout << *it << std::endl; + + StringList values = mgr.getGlobalOptionValues((*it).c_str()); + for (StringList::iterator it2 = values.begin(); it2 != values.end(); it2++) { + std::cout << "\t"<< *it2 << std::endl; + } + } +*/ + +//crashes + StringList values = mgr.getGlobalOptionValues("Footnotes"); + for (StringList::iterator it2 = values.begin(); it2 != values.end(); it2++) { + std::cout << "\t"<< *it2 << std::endl; + } +}; + + + + + diff --git a/tests/keytest.cpp b/tests/keytest.cpp new file mode 100644 index 0000000..91e77ac --- /dev/null +++ b/tests/keytest.cpp @@ -0,0 +1,173 @@ +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) +{ + int loop; + int max; + + if (argc > 1) + LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(argv[1]); + + VerseKey bla; + long index; + + + if (argc < 2) + bla = "James 1:19"; + else bla = argv[1]; + + std::cout << "\n loop++; (.Index(Index()+1))\n"; + + max = (argc < 3) ? 10 : atoi(argv[2]); + + for (loop = 0; loop < max; loop++, bla++) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")"; + bla.Index(index+1); + std::cout << "-> " << (const char *)bla << "\n"; + } + + std::cout << "-----------------\n"; + std::cout << "\n loop--; (.Index(Index()-1))\n"; + if (argc < 2) + bla = "James 1:19"; + else bla = argv[1]; + + for (loop = max; loop; loop--, bla--) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")"; + bla.Index(index-1); + std::cout << "-> " << (const char *)bla << "\n"; + } + + std::cout << "-----------------\n"; + std::cout << "--------- No Headings --------\n"; + + if (argc < 2) + bla = "Matthew 1:5"; + else bla = argv[1]; + + for (loop = max; loop; loop--, bla--) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")\n"; + } + + std::cout << "-----------------\n"; + + if (argc < 2) + bla = "Genesis 1:5"; + else bla = argv[1]; + + for (loop = max; loop; loop--, bla--) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")\n"; + } + + std::cout << "-----------------\n"; + + if (argc < 2) + bla = "Malachi 4:2"; + else bla = argv[1]; + + for (loop = max; loop; loop--, bla++) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")\n"; + } + + std::cout << "-----------------\n"; + + if (argc < 2) + bla = "Revelation of John 22:17"; + else bla = argv[1]; + + for (loop = max; loop; loop--, bla++) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")\n"; + } + + + std::cout << "-----------------\n"; + std::cout << "-------- Headings ---------\n"; + + bla.Headings(1); + + if (argc < 2) + bla = "Matthew 1:5"; + else bla = argv[1]; + + for (loop = max; loop; loop--, bla--) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")\n"; + } + + std::cout << "-----------------\n"; + + if (argc < 2) + bla = "Genesis 1:5"; + else bla = argv[1]; + + for (loop = max; loop; loop--, bla--) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")\n"; + } + + std::cout << "-----------------\n"; + + if (argc < 2) + bla = "Malachi 4:2"; + else bla = argv[1]; + + for (loop = max; loop; loop--, bla++) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")\n"; + } + + std::cout << "-----------------\n"; + + if (argc < 2) + bla = "Revelation of John 22:17"; + else bla = argv[1]; + + for (loop = max; loop; loop--, bla++) { + index = bla.Index(); + std::cout << (const char *)bla << "(" << index << ")\n"; + } + + std::cout << "\n\n"; + + std::cout << "-------- Error Check ------------\n\n"; + bla = "Revelation of John 23:19"; + std::cout << "bla = \"Revelation of John 23:19\"\n"; + std::cout << "(const char *)bla = " << (const char *)bla << "\n"; + std::cout << "bla.Error() = " << (int)bla.Error() << " \n"; + std::cout << "bla++ \n"; + bla++; + std::cout << "bla.Error() = " << (int)bla.Error() << " \n"; + + bla.Headings(0); + for (bla = BOTTOM; !bla.Error(); bla.Book(bla.Book()-1)) + std::cout << (const char *)bla << "\n"; + bla.Testament(1); + bla = BOTTOM; + std::cout << bla.Index() << "\n"; + std::cout << bla.NewIndex() << "\n"; + std::cout << bla << "\n"; + bla.Testament(2); + bla = BOTTOM; + std::cout << bla.Index() << "\n"; + std::cout << bla.NewIndex() << "\n"; + std::cout << bla << "\n"; + return 0; +} diff --git a/tests/lextest.cpp b/tests/lextest.cpp new file mode 100644 index 0000000..9119a2a --- /dev/null +++ b/tests/lextest.cpp @@ -0,0 +1,26 @@ +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) +{ + RawLD::createModule("tmp/lextest"); + RawLD lex("tmp/lextest"); + + lex.setKey("b"); + lex << "x"; + + lex.setKey("a"); + lex << "x"; + + lex.setKey("a"); + lex.deleteEntry(); + +// lex.setKey("a"); +// lex << "y"; + + lex = BOTTOM; + return 0; +} diff --git a/tests/listtest.cpp b/tests/listtest.cpp new file mode 100644 index 0000000..fa94dcf --- /dev/null +++ b/tests/listtest.cpp @@ -0,0 +1,73 @@ +#include +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) +{ + ListKey lk, lk2; + VerseKey vk("jn 1:1", "jn 1:12"); + VerseKey vk2("jude", "jude"); + SWKey text; + + vk = "jas 1:19"; + text = (const char *)vk; + lk << text; + lk << text; + lk << text; + lk << "James 1:19"; + lk << "yoyo"; + lk << vk; + lk2 << "test1"; + lk2 << lk; + lk2 << vk2; + lk2 << "test2"; + for (lk2 = TOP; !lk2.Error(); lk2++) + std::cout << (const char *) lk2 << "\n"; + + + lk2 = VerseKey().ParseVerseList("mat-mark", 0, true); + + VerseKey yoyo("john"); + yoyo = MAXCHAPTER; + std::cout << yoyo; +/* + + for (int i = 0; i < 2; i++) { + VerseKey x, y; + ListKey lk3; + x = "rev"; + y = x; + x = "mat"; + VerseKey newElement; + newElement.LowerBound(x); + newElement.UpperBound(y); + lk3 << newElement; + + lk2 << lk3; + } + +*/ + std::cout << "---------\n"; + + for (lk2 = TOP; !lk2.Error(); lk2++) + std::cout << (const char *) lk2 << "\n"; + + lk.ClearList(); + lk << "john 3:16"; + std::cout << "\nCount should be 1: " << lk.Count(); + + lk = vk.ParseVerseList("mat;mark;luke", vk, true); + lk = (VerseKey)"john 3:16"; + std::cout << "\nError should be set: " << ((lk.Error()) ? "set":"not set"); + lk = vk.ParseVerseList("mk 3:16", vk, true); + lk = (VerseKey)"john 3:16"; + std::cout << "\nError should be set: " << ((lk.Error()) ? "set":"not set"); + + std::cout << "\n\n"; + return 0; +} diff --git a/tests/localetest.cpp b/tests/localetest.cpp new file mode 100644 index 0000000..895e67e --- /dev/null +++ b/tests/localetest.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) { + if (argc != 3) { + fprintf(stderr, "usage: %s \n", *argv); + exit(-1); + } + + LocaleMgr lm; + + printf("%s\n", lm.translate(argv[1], argv[2])); + + VerseKey bla; + bla = "James 1:19"; + + bla.setLocale("de"); + std::cout << bla << std::endl; + bla = "Johannes 1:1"; + std::cout << bla << std::endl; + + LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName("de"); + VerseKey key2; + key2.setLocale("en"); + ListKey list = key2.ParseVerseList("Luke 3:23-28",key2, true); + std::cout << list << std::endl; + + +} diff --git a/tests/mgrtest.cpp b/tests/mgrtest.cpp new file mode 100644 index 0000000..d1bce20 --- /dev/null +++ b/tests/mgrtest.cpp @@ -0,0 +1,44 @@ +#include +#include +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) { + std::cerr << "\n"; + SWLog::getSystemLog()->setLogLevel(SWLog::LOG_DEBUG); + SWConfig *sysConf = 0; + if (argc > 1) { + sysConf = new SWConfig(argv[1]); + } + SWMgr mymgr(0, sysConf); + std::cerr << "\n\nprefixPath: " << mymgr.prefixPath; + std::cerr << "\nconfigPath: " << mymgr.configPath << "\n\n"; + + + ModMap::iterator it; + + for (it = mymgr.Modules.begin(); it != mymgr.Modules.end(); it++) { + std::cout << "[" << (*it).second->Name() << "] (Writable: " << (it->second->isWritable()?"Yes":"No") << ") [" << (*it).second->Description() << "]\n"; + std::cout << "AbsoluteDataPath = " << it->second->getConfigEntry("AbsoluteDataPath") << "\n"; + std::cout << "Has Feature HebrewDef = " << it->second->getConfig().has("Feature", "HebrewDef") << "\n"; + if ((!strcmp((*it).second->Type(), "Biblical Texts")) || (!strcmp((*it).second->Type(), "Commentaries"))) { + it->second->setKey("James 1:19"); + std::cout << (const char *) *(*it).second << "\n\n"; + } + } + SWModule *mhc = mymgr.Modules["MHC"]; + if (mhc) { + for (mhc->Key("Gen 1:1"); mhc->Key() < (VerseKey) "Gen 1:10"; (*mhc)++) + std::cout << (const char *) *mhc << "\n"; + } + + if (sysConf) + delete sysConf; + + return 0; +} diff --git a/tests/modtest.cpp b/tests/modtest.cpp new file mode 100644 index 0000000..889d780 --- /dev/null +++ b/tests/modtest.cpp @@ -0,0 +1,21 @@ +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) { + SWMgr mymgr; + ModMap::iterator it; + SWModule *module = mymgr.Modules["KJV"]; + VerseKey parser; + ListKey lk = parser.ParseVerseList("mal4:6-rev", parser, true); + lk.Persist(1); + module->SetKey(lk); + + (*module) = TOP; + std::cout << module->KeyText() << "\n"; + return 0; +} diff --git a/tests/outputcps.cpp b/tests/outputcps.cpp new file mode 100644 index 0000000..32d618d --- /dev/null +++ b/tests/outputcps.cpp @@ -0,0 +1,59 @@ +#include +#include + +/* +This program requires versekey.h to be changed locally so that +otbks, otcps, ntbks and ntcps are public +*/ + +using namespace sword; + +int +main(int argc, char *argv[]) +{ + int i; + long offset1, offset2, otoffset; + int *vmaxarray; + int vmax; + sword::VerseKey *tk = new sword::VerseKey("Genesis 0:0"); + + //tk->Testament(1); + //tk->Book(1); + //tk->Chapter(0); + //tk->Verse(0); + //printf("bcv %d %d:%d\n", tk->Book(), tk->Chapter(), tk->Verse()); + printf("{0, 0}, // Module Header\n"); + printf("{1, 0}, // OT Header\n"); + while (tk->Testament() == 1) + { + offset1 = tk->otbks[tk->Book()]; + if (tk->Chapter() == 1) { + offset2 = tk->otcps[(int)offset1]; + printf("{%d, 0}, // %s:0\n", offset2, tk->getBookName()); + } + offset2 = tk->otcps[(int)offset1 + tk->Chapter()]; + vmaxarray = tk->builtin_books[tk->Testament()-1][tk->Book()-1].versemax; + vmax = vmaxarray[tk->Chapter()-1]; + + printf("{%d, %d}, // %s:%d\n", offset2, vmax, tk->getBookName(), tk->Chapter()); + tk->Chapter(tk->Chapter()+1); + otoffset = offset2+vmax+1; + } + printf("{%d, 0}, // NT Header\n", otoffset); + while (!tk->Error()) + { + offset1 = tk->ntbks[tk->Book()]; + if (tk->Chapter() == 1) { + offset2 = tk->ntcps[(int)offset1]+otoffset; + printf("{%d, 0}, // %s:0\n", offset2-1, tk->getBookName()); + } + offset2 = tk->ntcps[(int)offset1 + tk->Chapter()] + otoffset; + vmaxarray = tk->builtin_books[tk->Testament()-1][tk->Book()-1].versemax; + vmax = vmaxarray[tk->Chapter()-1]; + + printf("{%d, %d}, // %s:%d\n", offset2-1, vmax, tk->getBookName(), tk->Chapter()); + tk->Chapter(tk->Chapter()+1); + } + delete tk; + return 0; +} diff --git a/tests/parsekey.cpp b/tests/parsekey.cpp new file mode 100644 index 0000000..16b97c0 --- /dev/null +++ b/tests/parsekey.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) { + if ((argc < 2) || (argc > 4)) { + fprintf(stderr, "usage: %s <\"string to parse\"> [locale name] [test-in-set-verse]\n", *argv); + exit(-1); + } + + if (argc > 2) + LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(argv[2]); + + VerseKey DefaultVSKey; + + DefaultVSKey = "jas3:1"; + + ListKey verses = DefaultVSKey.ParseVerseList(argv[1], DefaultVSKey, true); + + for (int i = 0; i < verses.Count(); i++) { + VerseKey *element = SWDYNAMIC_CAST(VerseKey, verses.GetElement(i)); + if (element) { + std::cout << (SWBuf(element->LowerBound()) + " - " + SWBuf(element->UpperBound())).c_str() << "\n"; + } + else std::cout << (const char *)*verses.GetElement(i) << "\n"; +// else { +// std::cout << VerseKey(verses.GetElement(i)).getOSISRef() << "\n"; +// } + } + + if (argc > 3) { + verses.setText(argv[3]); + std::cout << "Verse is" << ((verses.Error()) ? " NOT" : "") << " in set.\n\n"; + } + + return 0; +} diff --git a/tests/rawldidxtest.cpp b/tests/rawldidxtest.cpp new file mode 100644 index 0000000..bc874dd --- /dev/null +++ b/tests/rawldidxtest.cpp @@ -0,0 +1,49 @@ +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) +{ + if (argc != 2) { + fprintf(stderr, "usage: %s \n\n", *argv); + exit(-1); + } + + RawStr mod(argv[1]); + char buf[127]; + + sprintf(buf, "%s.idx", argv[1]); + FileDesc *idxfd = FileMgr::getSystemFileMgr()->open(buf, FileMgr::RDONLY, true); + long maxoff = idxfd->seek(0, SEEK_END) - 6; + FileMgr::getSystemFileMgr()->close(idxfd); + + SWBuf last = ""; + bool first = true; + char *trybuf = 0; + for (long index = 0; index < maxoff; index+=6) { + mod.getIDXBuf(index, &trybuf); + if (!first) { + if (strcmp(trybuf, last.c_str()) < 0) { + printf("entry %ld(offset: %ld) (%s) is less than previous entry (%s)\n\n", index/6, index, trybuf, last.c_str()); + exit(-3); + } + } + else first = false; + last = trybuf; + } + if (trybuf) + delete [] trybuf; + + return 0; +} diff --git a/tests/refsystest.cpp b/tests/refsystest.cpp new file mode 100644 index 0000000..003ba7b --- /dev/null +++ b/tests/refsystest.cpp @@ -0,0 +1,29 @@ +#include +#include +#include +#include + +#include + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif +using std::cout; +using std::endl; + +int main(int argc, char **argv) +{ + cout << "Default refsys: " << + RefSysMgr::getSystemRefSysMgr()->getDefaultRefSysName() << endl; + StringList tlist = RefSysMgr::getSystemRefSysMgr()->getAvailableRefSys(); + for (StringList::const_iterator it = tlist.begin(); it != tlist.end(); it++) { + cout << (*it).c_str() << endl; + } + VerseKey2 *testkey; + testkey = RefSysMgr::getSystemRefSysMgr()->getVerseKey("WEB", "Judith 1:1"); + //testkey = RefSysMgr::getSystemRefSysMgr()->getVerseKey("KJV", "John 3:16"); + if (testkey) + cout << testkey->getText() << endl; + else + cout << "Failed to get key" << endl; +} diff --git a/tests/romantest.cpp b/tests/romantest.cpp new file mode 100644 index 0000000..3af0ae1 --- /dev/null +++ b/tests/romantest.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using sword::from_rom; +#endif + +int main(int argc, char **argv) { + if (argc != 2) { + fprintf(stderr, "usage: %s \n", *argv); + exit(-1); + } + /* I don't think we need to_rom, do we? anyway, it isn't written + char buf[127]; + if (isdigit(argv[1][0])) { + to_rom(atoi(argv[1]), buf); + std::cout << buf << std::endl; + } + */ + else std::cout << from_rom(argv[1]) << std::endl; + return 0; +} + diff --git a/tests/swaptest.cpp b/tests/swaptest.cpp new file mode 100644 index 0000000..2dc8daa --- /dev/null +++ b/tests/swaptest.cpp @@ -0,0 +1,9 @@ +#include +#include + +int main(int argc, char **argv) { + printf("0x%.4x 0x%.4x\n", 255, __swap16(255)); + printf("0x%.8x 0x%.8x\n", 255, __swap32(255)); +// printf("0x%.16x 0x%.16llx\n", 255, __swap64(255)); + return 0; +} diff --git a/tests/swbuftest.cpp b/tests/swbuftest.cpp new file mode 100644 index 0000000..92c43db --- /dev/null +++ b/tests/swbuftest.cpp @@ -0,0 +1,159 @@ +#include +#include + +#define BASEI 102400000L + +#include +typedef sword::SWBuf StringType; + +//#include +//typedef std::string StringType; + +using std::cout; +using std::cerr; + +void markTime() { + static clock_t start = clock(); + static clock_t last = start; + clock_t current = clock(); + cerr << ((float)(current - last)/CLOCKS_PER_SEC) << " / " << ((float)(current - start)/CLOCKS_PER_SEC) << " (Seconds Delta / Seconds Total)\n"; + cerr.flush(); + last = current; +} + +void appendChTest() { + cerr << "\nSTART: append ch test -------\n"; + cerr.flush(); + StringType s; + for (unsigned long i = 0; i < BASEI+14; i++) { + s += (char) (i%125)+1; + } + cerr << "\nEND: append ch test -------\n"; + cerr.flush(); +} + + +void appendStringTest() { + cerr << "\nSTART: append string test -------\n"; + cerr.flush(); + StringType s; + unsigned long iterations = BASEI/2L; + for (unsigned long i = 0; i < iterations; i++) { + s.append("this is a test", 3); + if (!(i%3))s.append("test"); + } + cerr << "\nEND: append string test -------\n"; + cerr.flush(); +} + + +void subscriptTest() { + cerr << "\nSTART: subscript access test -------\n"; + cerr.flush(); + StringType s; + for (int j = 0; j < 100; j++) { + s += "0123456789"; + } + for (int j = 0; j < BASEI/200; j++) { + for (unsigned long i = s.length()-1; i; i--) { + s[i] = (char) (i%40)+65; + } + } + cerr << "\nEND: subscript access test -------\n"; + cerr.flush(); +} + +void ctorAssignTest() { + cerr << "\nSTART: constructor and assign test -------\n"; + cerr.flush(); + StringType s; + for (int j = 0; j < 100; j++) { + s += "0123456789"; + } + for (unsigned long i = (BASEI/8); i; i--) { + StringType s2; + s2 = s; + s2[0] = '0'; // keep defeat copy on write optimizations + } + cerr << "\nEND: constructor and assign test -------\n"; + cerr.flush(); +} + +void compareTest() { + cerr << "\nSTART: compare test -------\n"; + cerr.flush(); + StringType first = "firsttestAfirst"; + StringType second = "firsttestBsecond"; + for (unsigned long i = (unsigned long)(BASEI/1.5); i; i--) { + if (first != second) { + if (first <= second) { + if (first > second) {;} + else if (!(BASEI%10000)) { + first[0] = 'f'; // keep us from being optimized out + } + } + } + } + cerr << "\nEND: compare test -------\n"; + cerr.flush(); +} + + +void insertStringTest() { + cerr << "\nSTART: insert string test -------\n"; + cerr.flush(); + StringType s; + StringType sub = "text ->this part should not appear :)"; + for (int j = 0; j < BASEI/7000; j++) { + s = "Start end"; + for (int i = 0; i < 1000; i++) { + s.insert(s.length()/2, sub, 0, 5); + } + } + cerr << "\nEND: insert string test -------\n"; + cerr.flush(); +} + +int main(int argc, char **argv) { + StringType x; + cout << "x should be (): (" << x << ")\n"; + cout << "size should be 0: " << x.size() << "\n"; + x = "hello"; + cout << "x should be (hello): (" << x << ")\n"; + x += " world"; + cout << "x should be (hello world): (" << x << ")\n"; + cout << "size should be 11: " << x.size() << "\n"; + cout << "x[7] should be 'o': '" << x[7] << "'\n"; + x[7] = 'u'; + cout << "x[7] should be 'u': '" << x[7] << "'\n"; + cout << "x should be (hello wurld): (" << x << ")\n"; + StringType y = x + " " + x; + cout << "should be (hello wurld hello wurld): (" << y << ")\n"; + + sword::SWBuf prefixTest = "prefix:value"; + cout << "Prefix test: " << prefixTest << "\n"; + cout << "Prefix should be (prefix): " << prefixTest.stripPrefix(':') << "\n"; + cout << "Value should be (value): " << prefixTest << "\n"; + +// y.appendFormatted(" from %d %s running %02.05f miles", 4, "dogs", 1.9f); +// cout << "should be (hello wurld hello wurld from 4 dogs running 1.90000 miles): (" << y << ")\n"; +// y += '!'; +// cout << "should be (hello wurld hello wurld from 4 dogs running 1.90000 miles!): (" << y << ")\n"; +// y.append(y.c_str(),5); +// cout << "should be (hello wurld hello wurld from 4 dogs running 1.90000 miles!hello): (" << y << ")\n"; + + markTime(); + appendChTest(); + markTime(); + appendStringTest(); + markTime(); + subscriptTest(); + markTime(); + ctorAssignTest(); + markTime(); + compareTest(); + markTime(); + insertStringTest(); + markTime(); +} + diff --git a/tests/testblocks.cpp b/tests/testblocks.cpp new file mode 100644 index 0000000..f386118 --- /dev/null +++ b/tests/testblocks.cpp @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include + +using namespace std; +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +void addEntry(EntriesBlock *eb) { + string input; + string body; + char line[1024]; + std::cout << "\nEnter new Entry's text. '.' on an empty line to finish:\n"; + do { + std::cout << "> "; + fgets(line, 1000, stdin); + input = line; + if (input.compare(".")) + body.append(input); + } + while (input.compare(".")); + std::cout << "Adding new entry. Index is: " << eb->addEntry(body.c_str()) << "\n\n"; +} + + +void printEntry(EntriesBlock *eb, int index) { + if (index < eb->getCount()) { + std::cout << "Contents of entry [" << index << "]:\n"; + std::cout << eb->getEntry(index) << "\n"; + } + else std::cout << "Invalid entry number\n\n"; +} + + +void printSize(EntriesBlock *eb) { + unsigned long size; + eb->getRawData(&size); + std::cout << "Size of raw data: " << size << "\n\n"; +} + + +void removeEntry(EntriesBlock *eb, int index) { + if (index < eb->getCount()) { + std::cout << "Removing entry [" << index << "]\n"; + eb->removeEntry(index); + } + else std::cout << "Invalid entry number\n\n"; +} + + +int main(int argc, char **argv) { + + EntriesBlock *eb = new EntriesBlock(); + string input; + char line[1024]; + + std::cout << "Initial entry count should be 0: " << eb->getCount() << "\n"; + + do { + std::cout << "[" << eb->getCount() << "] > "; + fgets(line, 1000, stdin); + input = line; + if (input.length() > 0) { + switch (input[0]) { + case 'a': addEntry(eb); break; + case 'p': printEntry(eb, atoi(input.c_str()+1)); break; + case 'r': removeEntry(eb, atoi(input.c_str()+1)); break; + case 's': printSize(eb); break; + case 'q': break; + case '?': + default: + std::cout << "\n a - add a new entry\n"; + std::cout << " p - print entry\n"; + std::cout << " r - remove entry\n"; + std::cout << " s - print size of raw data\n"; + std::cout << " q - quit\n\n"; + break; + } + } + } + while (input.compare("q")); + + delete eb; + + return 0; +} diff --git a/tests/testsuite/.cvsignore b/tests/testsuite/.cvsignore new file mode 100644 index 0000000..171f236 --- /dev/null +++ b/tests/testsuite/.cvsignore @@ -0,0 +1 @@ +verseparsing.try \ No newline at end of file diff --git a/tests/testsuite/Makefile.am b/tests/testsuite/Makefile.am new file mode 100644 index 0000000..db26c79 --- /dev/null +++ b/tests/testsuite/Makefile.am @@ -0,0 +1,6 @@ +swtspdir = $(top_srcdir)/tests/testsuite + +EXTRA_DIST += $(swtspdir)/runall.sh +EXTRA_DIST += $(swtspdir)/runtest.sh +EXTRA_DIST += $(swtspdir)/verseparsing.good +EXTRA_DIST += $(swtspdir)/verseparsing.sh diff --git a/tests/testsuite/runall.sh b/tests/testsuite/runall.sh new file mode 100755 index 0000000..d06e606 --- /dev/null +++ b/tests/testsuite/runall.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +TESTSUITE=`for i in *.good; do basename $i .good; done` + +for i in $TESTSUITE; do + echo -n "$i: " + ./runtest.sh $i -q + if [ $? -ne 0 ]; then + echo FAILED + echo "" + echo To see problems, try running: + echo ./runtest.sh $i + echo "" + exit 1 + else + echo PASSED. + fi +done +echo "ALL PASSED!" +exit 0 +fi diff --git a/tests/testsuite/runtest.sh b/tests/testsuite/runtest.sh new file mode 100755 index 0000000..d8ebee1 --- /dev/null +++ b/tests/testsuite/runtest.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +if [ "$1" = "" ]; then + echo usage: $0 "" + exit 1 +fi + +./$1.sh > $1.try +BAD=`diff -u $1.try $1.good` +if [ "$BAD" = "" ]; then + if [ "$2" = "-q" ]; then + exit 0 + else + echo PASSED! + fi + exit 0 +else + if [ "$2" = "-q" ]; then + exit 1 + else + echo "Script failed at: (- bad output; + should have been)" + diff -u $1.try $1.good + fi + exit 1 +fi diff --git a/tests/testsuite/versekey.good b/tests/testsuite/versekey.good new file mode 100644 index 0000000..afb0ab9 --- /dev/null +++ b/tests/testsuite/versekey.good @@ -0,0 +1,5 @@ +x: Amos 1:5 +Amos 1:5 +Amos 1:5 +Error: 1 +Error: 1 diff --git a/tests/testsuite/versekey.sh b/tests/testsuite/versekey.sh new file mode 100755 index 0000000..aeefcc9 --- /dev/null +++ b/tests/testsuite/versekey.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +../versekeytest diff --git a/tests/testsuite/verseparsing-utf8.good b/tests/testsuite/verseparsing-utf8.good new file mode 100644 index 0000000..2259a56 --- /dev/null +++ b/tests/testsuite/verseparsing-utf8.good @@ -0,0 +1,16 @@ +Matthäus 2:3 - Matthäus 2:12 +Römer 2:13 +Matthäus 1:2 - Römer 3:13 +1. Könige 2:1 - 1. Könige 2:46 +1. Könige 1:1 - 2. Könige 25:30 +Markus 1:1 +Matthäus 2:1 +Matthäus 1:1 - Matthäus 28:20 +1. Könige 1:1 - 1. Könige 22:53 +1. Könige 1:1 - 2. Könige 25:30 +Markus 1:1 +Matthäus 2:1 +Matthäus 1:1 - Matthäus 28:20 +1. Könige 1:1 - 2. Könige 25:30 +1. Könige 1:1 - Matthäus 28:20 +Maleachi 1:1 - Matthäus 2:1 diff --git a/tests/testsuite/verseparsing-utf8.sh b/tests/testsuite/verseparsing-utf8.sh new file mode 100755 index 0000000..9ab509e --- /dev/null +++ b/tests/testsuite/verseparsing-utf8.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# This only works if --with-icu was passed to configure + +### German test keys +../parsekey "Matthäus 2:3-12" "de" +../parsekey "Römer 2:13" "de" +../parsekey "Matthäus 1:2-Röm 3:13" "de" +../parsekey "1. Könige 2" "de" + +../parsekey "1. Könige - 2. Könige; Markus 1:1; Matthäus 2:1; Matthäus; 1.Kön" "de" +../parsekey "1. Könige - 2. Könige; Markus 1:1; Matthäus 2:1; Matthäus; 1.Kön-2.Kön;I Kings-Matthäus" "de" +../parsekey "Maleachi 1:1 - Matthäus 2:1" "de" diff --git a/tests/testsuite/verseparsing.good b/tests/testsuite/verseparsing.good new file mode 100644 index 0000000..dd001eb --- /dev/null +++ b/tests/testsuite/verseparsing.good @@ -0,0 +1,65 @@ +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +I John 2:3 +1. Johannes 2:3 +1. Johannes 1:1 - 1. Johannes 3:10 +1. Johannes 1:1 - 1. Johannes 3:10 +I John 1:1 - I John 3:10 +1. Johannes 1:1 - 1. Johannes 3:10 +1. Johannes 1:1 - 1. Johannes 3:10 +I John 1:1 - I John 3:10 +1. Johannes 1:1 - 1. Johannes 3:10 +1. Johannes 1:1 - 1. Johannes 3:10 +I John 1:1 - I John 3:10 +1. Johannes 1:1 - 1. Johannes 3:10 +1. Johannes 1:1 - 1. Johannes 3:10 +I John 1:1 - I John 3:10 +I John 1:1 +I John 3:10 +I John 1:1 +I John 3:10 +I John 1:1 +I John 3:10 +I John 1:1 +I John 3:10 +I John 1:1 +I John 3:10 +I John 1:1 +I John 3:10 +I John 1:1 +I John 3:10 +I John 1:1 +I John 3:10 +I John 1:1 +I John 3:10 +I John 1:1 +I John 3:10 diff --git a/tests/testsuite/verseparsing.sh b/tests/testsuite/verseparsing.sh new file mode 100755 index 0000000..889889e --- /dev/null +++ b/tests/testsuite/verseparsing.sh @@ -0,0 +1,64 @@ +#!/bin/sh + +../parsekey "1jn.2.3" +../parsekey "1 jn.2.3" +../parsekey "Ijn.2.3" +../parsekey "I jn.2.3" +../parsekey "1jn 2.3" +../parsekey "1 jn 2.3" +../parsekey "Ijn 2.3" +../parsekey "I jn 2.3" +../parsekey "1jn.2:3" +../parsekey "1 jn.2:3" +../parsekey "Ijn.2:3" +../parsekey "I jn.2:3" +../parsekey "1jn 2:3" +../parsekey "1 jn 2:3" +../parsekey "Ijn 2:3" +../parsekey "I jn 2:3" + +../parsekey "1.jn.2.3" +../parsekey "1. jn.2.3" +../parsekey "I.jn.2.3" +../parsekey "I. jn.2.3" +../parsekey "1.jn 2.3" +../parsekey "1. jn 2.3" +../parsekey "I.jn 2.3" +../parsekey "I. jn 2.3" +../parsekey "1.jn.2:3" +../parsekey "1. jn.2:3" +../parsekey "I.jn.2:3" +../parsekey "I. jn.2:3" +../parsekey "1.jn 2:3" +../parsekey "1. jn 2:3" +../parsekey "I.jn 2:3" +../parsekey "I. jn 2:3" + +### German test keys +../parsekey "1. Johannes 2:3" "de" + +### Range parsing tests +../parsekey "1. Johannes 1:1-3:10" "de" +../parsekey "1. Joh 1:1-3:10" "de" +../parsekey "1Jn 1:1-3:10" +../parsekey "1. Johannes 1:1 - 3:10" "de" +../parsekey "1. Joh 1:1 - 3:10" "de" +../parsekey "1Jn 1:1 - 3:10" +../parsekey "1. Johannes 1:1 -3:10" "de" +../parsekey "1. Joh 1:1 -3:10" "de" +../parsekey "1Jn 1:1 -3:10" +../parsekey "1. Johannes 1:1- 3:10" "de" +../parsekey "1. Joh 1:1- 3:10" "de" +../parsekey "1Jn 1:1- 3:10" + +### List parsing tests +../parsekey "1Jn 1:1 3:10" +../parsekey "1Jn 1:1 3:10" +../parsekey "1Jn 1:1,3:10" +../parsekey "1Jn 1:1, 3:10" +../parsekey "1Jn 1:1 ,3:10" +../parsekey "1Jn 1:1 , 3:10" +../parsekey "1Jn 1:1;3:10" +../parsekey "1Jn 1:1; 3:10" +../parsekey "1Jn 1:1 ;3:10" +../parsekey "1Jn 1:1 ; 3:10" diff --git a/tests/testsuite/xmltag.good b/tests/testsuite/xmltag.good new file mode 100644 index 0000000..a14c5d1 --- /dev/null +++ b/tests/testsuite/xmltag.good @@ -0,0 +1,136 @@ + + + +Tag name: [verse] + - attribute: [addedAttribute] = [with a " quote] + 4 parts: + with + a + " + quote + - attribute: [osisID] = [John.1.1] + 1 parts: + John.1.1 + - attribute: [type] = [test type] + 2 parts: + test + type + - attribute: [yeah] = [stuff] + 1 parts: + stuff + isEmpty: 1 + isEndTag: 0 + +Setting attribute 'multiPart' to: 'ABC D EF GHIJ' + +Setting part 2 to 'MMM' + +Removing part 1 + +Removing part 2 + + + + +Tag name: [yo] + - attribute: [addedAttribute] = [with a " quote] + 4 parts: + with + a + " + quote + - attribute: [mama] = [stuff] + 1 parts: + stuff + isEmpty: 1 + isEndTag: 0 + + + + +Tag name: [yo] + - attribute: [addedAttribute] = [with a " quote] + 4 parts: + with + a + " + quote + - attribute: [mama] = [stuff] + 1 parts: + stuff + isEmpty: 0 + isEndTag: 0 + + + + +Tag name: [yo] + - attribute: [addedAttribute] = [with a " quote] + 4 parts: + with + a + " + quote + - attribute: [mama] = [stuff] + 1 parts: + stuff + isEmpty: 0 + isEndTag: 0 + + + + +Tag name: [yo] + - attribute: [addedAttribute] = [with a " quote] + 4 parts: + with + a + " + quote + - attribute: [mama] = [stuff] + 1 parts: + stuff + - attribute: [yoyoma] = [hohum] + 1 parts: + hohum + isEmpty: 0 + isEndTag: 0 + +yo mama = 'stuff' yoyoma="hohum" + + +Tag name: [yo] + - attribute: [addedAttribute] = [with a " quote] + 4 parts: + with + a + " + quote + - attribute: [mama] = [stuff] + 1 parts: + stuff + - attribute: [yoyoma] = [hohum] + 1 parts: + hohum + isEmpty: 0 + isEndTag: 0 + +yo mama = 'stuff' yoyoma="hohum"/ + + +Tag name: [yo] + - attribute: [addedAttribute] = [with a " quote] + 4 parts: + with + a + " + quote + - attribute: [mama] = [stuff] + 1 parts: + stuff + - attribute: [yoyoma] = [hohum] + 1 parts: + hohum + isEmpty: 1 + isEndTag: 0 + diff --git a/tests/testsuite/xmltag.sh b/tests/testsuite/xmltag.sh new file mode 100755 index 0000000..958681c --- /dev/null +++ b/tests/testsuite/xmltag.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Just let it run the default +../xmltest + +#let's try some crazy stuff +../xmltest "" +../xmltest "" +../xmltest "" +../xmltest "" +../xmltest "yo mama = 'stuff' yoyoma=\"hohum\"" +../xmltest "yo mama = 'stuff' yoyoma=\"hohum\"/" diff --git a/tests/tlitmgrtest.cpp b/tests/tlitmgrtest.cpp new file mode 100644 index 0000000..891c234 --- /dev/null +++ b/tests/tlitmgrtest.cpp @@ -0,0 +1,715 @@ +/* + * void Transliterator::initializeRegistry(void) { + // Lock first, check registry pointer second + Mutex lock(®istryMutex); + if (registry != 0) { + // We were blocked by another thread in initializeRegistry() + return; + } + + UErrorCode status = U_ZERO_ERROR; + + registry = new TransliteratorRegistry(status); + if (registry == 0 || U_FAILURE(status)) { + return; // out of memory, no recovery + } + + * The following code parses the index table located in + * icu/data/translit_index.txt. The index is an n x 4 table + * that follows this format: + * + * :file:: + * :internal:: + * :alias:: + * + * is the ID of the system transliterator being defined. These + * are public IDs enumerated by Transliterator.getAvailableIDs(), + * unless the second field is "internal". + * + * is a ResourceReader resource name. Currently these refer + * to file names under com/ibm/text/resources. This string is passed + * directly to ResourceReader, together with . + * + * is either "FORWARD" or "REVERSE". + * + * is a string to be passed directly to + * Transliterator.getInstance(). The returned Transliterator object + * then has its ID changed to and is returned. + * + * The extra blank field on "alias" lines is to make the array square. + * + static const char translit_index[] = "translit_index"; + + UResourceBundle *bundle, *transIDs, *colBund; + bundle = ures_openDirect(0, translit_index, &status); + transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &status); + + int32_t row, maxRows; + if (U_SUCCESS(status)) { + maxRows = ures_getSize(transIDs); + for (row = 0; row < maxRows; row++) { + colBund = ures_getByIndex(transIDs, row, 0, &status); + + if (U_SUCCESS(status) && ures_getSize(colBund) == 4) { + UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status); + UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0); + UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status); + + if (U_SUCCESS(status)) { + switch (type) { + case 0x66: // 'f' + case 0x69: // 'i' + // 'file' or 'internal'; + // row[2]=resource, row[3]=direction + { + UBool visible = (type == 0x0066 /f/); + UTransDirection dir = + (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) == + 0x0046 /F/) ? + UTRANS_FORWARD : UTRANS_REVERSE; + registry->put(id, resString, dir, visible); + } + break; + case 0x61: // 'a' + // 'alias'; row[2]=createInstance argument + registry->put(id, resString, TRUE); + break; + } + } + } + + ures_close(colBund); + } + } + + ures_close(transIDs); + ures_close(bundle); + + specialInverses = new Hashtable(TRUE); + specialInverses->setValueDeleter(uhash_deleteUnicodeString); + _registerSpecialInverse(NullTransliterator::SHORT_ID, + NullTransliterator::SHORT_ID, FALSE); + + // Manually add prototypes that the system knows about to the + // cache. This is how new non-rule-based transliterators are + // added to the system. + + registry->put(new NullTransliterator(), TRUE); + registry->put(new LowercaseTransliterator(), TRUE); + registry->put(new UppercaseTransliterator(), TRUE); + registry->put(new TitlecaseTransliterator(), TRUE); + _registerSpecialInverse("Upper", "Lower", TRUE); + _registerSpecialInverse("Title", "Lower", FALSE); + registry->put(new UnicodeNameTransliterator(), TRUE); + registry->put(new NameUnicodeTransliterator(), TRUE); + RemoveTransliterator::registerIDs(); + EscapeTransliterator::registerIDs(); + UnescapeTransliterator::registerIDs(); + NormalizationTransliterator::registerIDs(); + ucln_i18n_registerCleanup(); +} +*/ + + +/*Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID, + Entry *entry, + TransliteratorAlias* &aliasReturn, + UParseError& parseError, + UErrorCode& status) { + + for (;;) { + if (entry->entryType == Entry::RBT_DATA) { + return new RuleBasedTransliterator(ID, entry->u.data); + } else if (entry->entryType == Entry::PROTOTYPE) { + return entry->u.prototype->clone(); + } else if (entry->entryType == Entry::ALIAS) { + aliasReturn = new TransliteratorAlias(entry->stringArg); + return 0; + } else if (entry->entryType == Entry::FACTORY) { + return entry->u.factory.function(ID, entry->u.factory.context); + } else if (entry->entryType == Entry::COMPOUND_RBT) { + UnicodeString id("_", ""); + Transliterator *t = new RuleBasedTransliterator(id, entry->u.data); + aliasReturn = new TransliteratorAlias(ID, entry->stringArg, t, entry->intArg, entry->compoundFilter); + return 0; + } + + TransliteratorParser parser; + + if (entry->entryType == Entry::LOCALE_RULES) { + parser.parse(entry->stringArg, (UTransDirection) entry->intArg, + parseError, status); + } else { + { + // At this point entry type must be either RULES_FORWARD or + // RULES_REVERSE. We process the rule data into a + // TransliteratorRuleData object, and possibly also into an + // ::id header and/or footer. Then we modify the registry with + // the parsed data and retry. + UBool isReverse = (entry->entryType == Entry::RULES_REVERSE); + + // We use the file name, taken from another resource bundle + // 2-d array at static init time, as a locale language. We're + // just using the locale mechanism to map through to a file + // name; this in no way represents an actual locale. + CharString ch(entry->stringArg); + UResourceBundle *bundle = ures_openDirect(0, ch, &status); + UnicodeString rules = ures_getUnicodeStringByKey(bundle, RB_RULE, &status); + ures_close(bundle); + + // If the status indicates a failure, then we don't have any + // rules -- there is probably an installation error. The list + // in the root locale should correspond to all the installed + // transliterators; if it lists something that's not + // installed, we'll get an error from ResourceBundle. + + parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD, + parseError, status); + } + + if (U_FAILURE(status)) { + // We have a failure of some kind. Remove the ID from the + // registry so we don't keep trying. NOTE: This will throw off + // anyone who is, at the moment, trying to iterate over the + // available IDs. That's acceptable since we should never + // really get here except under installation, configuration, + // or unrecoverable run time memory failures. + remove(ID); + break; + } + + entry->u.data = parser.orphanData(); + entry->stringArg = parser.idBlock; + entry->intArg = parser.idSplitPoint; + entry->compoundFilter = parser.orphanCompoundFilter(); + + // Reset entry->entryType to something that we process at the + // top of the loop, then loop back to the top. As long as we + // do this, we only loop through twice at most. + // NOTE: The logic here matches that in + // Transliterator::createFromRules(). + if (entry->stringArg.length() == 0) { + if (entry->u.data == 0) { + // No idBlock, no data -- this is just an + // alias for Null + entry->entryType = Entry::ALIAS; + entry->stringArg = NullTransliterator::ID; + } else { + // No idBlock, data != 0 -- this is an + // ordinary RBT_DATA + entry->entryType = Entry::RBT_DATA; + return new RuleBasedTransliterator(ID, entry->u.data); + } + } else { + if (entry->u.data == 0) { + // idBlock, no data -- this is an alias. The ID has + // been munged from reverse into forward mode, if + // necessary, so instantiate the ID in the forward + // direction. + entry->entryType = Entry::ALIAS; + } else { + // idBlock and data -- this is a compound + // RBT + entry->entryType = Entry::COMPOUND_RBT; + } + } + } + + return 0; // failed +} +*/ + +//#include "unicode/rbt.h" +#include "unicode/resbund.h" +#include "unicode/translit.h" +#include "unicode/ustream.h" +#include + +class SWCharString { + public: + inline SWCharString(const UnicodeString& str); + inline ~SWCharString(); + inline operator const char*() { return ptr; } + private: + char buf[128]; + char* ptr; +}; + +inline SWCharString::SWCharString(const UnicodeString& str) { + // TODO This isn't quite right -- we should probably do + // preflighting here to determine the real length. + if (str.length() >= (int32_t)sizeof(buf)) { + ptr = new char[str.length() + 8]; + } else { + ptr = buf; + } + str.extract(0, 0x7FFFFFFF, ptr, ""); +} + +inline SWCharString::~SWCharString() { + if (ptr != buf) { + delete[] ptr; + } +} + + + +static const char RB_RULE_BASED_IDS[] = "RuleBasedTransliteratorIDs"; + +static const char RB_RULE[] = "Rule"; + +static const char SW_RESDATA[] = "/usr/local/lib/sword/"; + +#include + +using namespace std; + +struct SWTransData { + UnicodeString resource; + UTransDirection dir; +}; + +typedef map SWTransMap; + +typedef pair SWTransPair; + +SWTransMap *sw_tmap; + +Transliterator * instantiateTrans(const UnicodeString& ID, const UnicodeString& resource, + UTransDirection dir, UParseError &parseError, UErrorCode &status ); + +Transliterator *SWTransFactory(const UnicodeString &ID, + Transliterator::Token context) +{ + std::cout << "running factory for " << ID << std::endl; + SWTransMap::iterator swelement; + if ((swelement = sw_tmap->find(ID)) != sw_tmap->end()) + { + std::cout << "found element in map" << std::endl; + SWTransData swstuff = (*swelement).second; + UParseError parseError; + UErrorCode status; + std::cout << "unregistering " << ID << std::endl; + Transliterator::unregister(ID); + std::cout << "resource is " << swstuff.resource << std::endl; + Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status); + return trans; + } + return NULL; +} + +void instantiateTransFactory(const UnicodeString& ID, const UnicodeString& resource, + UTransDirection dir, UParseError &parseError, UErrorCode &status ) +{ + std::cout << "making factory for ID " << ID << std::endl; + Transliterator::Token context; + SWTransData swstuff; + swstuff.resource = resource; + swstuff.dir = dir; + SWTransPair swpair; + swpair.first = ID; + swpair.second = swstuff; + sw_tmap->insert(swpair); + Transliterator::registerFactory(ID, &SWTransFactory, context); +} + +void registerTrans(const UnicodeString& ID, const UnicodeString& resource, + UTransDirection dir, UErrorCode &status ) +{ + std::cout << "registering ID locally " << ID << std::endl; + SWTransData swstuff; + swstuff.resource = resource; + swstuff.dir = dir; + SWTransPair swpair; + swpair.first = ID; + swpair.second = swstuff; + sw_tmap->insert(swpair); +} + +bool checkTrans(const UnicodeString& ID, UErrorCode &status ) +{ + Transliterator *trans = Transliterator::createInstance(ID, UTRANS_FORWARD, status); + if (!U_FAILURE(status)) + { + // already have it, clean up and return true + std::cout << "already have it " << ID << std::endl; + delete trans; + return true; + } + status = U_ZERO_ERROR; + + SWTransMap::iterator swelement; + if ((swelement = sw_tmap->find(ID)) != sw_tmap->end()) + { + std::cout << "found element in map" << std::endl; + SWTransData swstuff = (*swelement).second; + UParseError parseError; + //UErrorCode status; + //std::cout << "unregistering " << ID << std::endl; + //Transliterator::unregister(ID); + std::cout << "resource is " << swstuff.resource << std::endl; + + // Get the rules + //std::cout << "importing: " << ID << ", " << resource << std::endl; + SWCharString ch(swstuff.resource); + UResourceBundle *bundle = ures_openDirect(SW_RESDATA, ch, &status); + const UnicodeString rules = ures_getUnicodeStringByKey(bundle, RB_RULE, &status); + ures_close(bundle); + //parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD, + // parseError, status); + if (U_FAILURE(status)) { + std::cout << "Failed to get rules" << std::endl; + std::cout << "status " << u_errorName(status) << std::endl; + return false; + } + + + Transliterator *trans = Transliterator::createFromRules(ID, rules, swstuff.dir, + parseError,status); + if (U_FAILURE(status)) { + std::cout << "Failed to create transliterator" << std::endl; + std::cout << "status " << u_errorName(status) << std::endl; + std::cout << "Parse error: line " << parseError.line << std::endl; + std::cout << "Parse error: offset " << parseError.offset << std::endl; + std::cout << "Parse error: preContext " << *parseError.preContext << std::endl; + std::cout << "Parse error: postContext " << *parseError.postContext << std::endl; + std::cout << "rules were" << std::endl; + std::cout << rules << std::endl; + return false; + } + + Transliterator::registerInstance(trans); + return true; + + //Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status); + //return trans; + } + else + { + return false; + } +} + +Transliterator * createTrans(const UnicodeString& preID, const UnicodeString& ID, + const UnicodeString& postID, UTransDirection dir, UErrorCode &status ) +{ + // extract id to check from ID xxx;id;xxx + if (checkTrans(ID, status)) { + UnicodeString fullID = preID; + fullID += ID; + fullID += postID; + Transliterator *trans = Transliterator::createInstance(fullID,UTRANS_FORWARD,status); + if (U_FAILURE(status)) { + delete trans; + return NULL; + } + else { + return trans; + } + } + else { + return NULL; + } +} + +Transliterator * instantiateTrans(const UnicodeString& ID, const UnicodeString& resource, + UTransDirection dir, UParseError &parseError, UErrorCode &status ) +{ + //TransliterationRuleData *ruleData; + //TransliteratorParser parser; + + //entry->entryType is 'direction' from translit_index + //UBool isReverse = (entry->entryType == Entry::RULES_REVERSE); + //entry->stringArg is the 'resource' + //CharString ch(entry->stringArg); + std::cout << "importing: " << ID << ", " << resource << std::endl; + SWCharString ch(resource); + UResourceBundle *bundle = ures_openDirect(SW_RESDATA, ch, &status); + const UnicodeString rules = ures_getUnicodeStringByKey(bundle, RB_RULE, &status); + ures_close(bundle); + //parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD, + // parseError, status); + if (U_FAILURE(status)) { + std::cout << "Failed to get rules" << std::endl; + return NULL; + } + //ruleData = parser.orphanData(); + //entry->stringArg = parser.idBlock; + //entry->intArg = parser.idSplitPoint; + //entry->compoundFilter = parser.orphanCompoundFilter(); + + //entry->entryType = Entry::RBT_DATA; + //return new RuleBasedTransliterator(ID, ruleData); + Transliterator *trans = Transliterator::createFromRules(ID, rules, dir, parseError, status); + if (U_FAILURE(status)) { + std::cout << "Failed to create transliterator" << std::endl; + std::cout << "status " << u_errorName(status) << std::endl; + std::cout << "Parse error: line " << parseError.line << std::endl; + std::cout << "Parse error: offset " << parseError.offset << std::endl; + std::cout << "Parse error: preContext " << *parseError.preContext << std::endl; + std::cout << "Parse error: postContext " << *parseError.postContext << std::endl; + std::cout << "rules were" << std::endl; + std::cout << rules << std::endl; + return NULL; + } + + Transliterator::registerInstance(trans); + return trans; +} + +void initiateSwordTransliterators(UErrorCode &status) +{ + static const char translit_swordindex[] = "translit_swordindex"; + + UResourceBundle *bundle, *transIDs, *colBund; + bundle = ures_openDirect(SW_RESDATA, translit_swordindex, &status); + if (U_FAILURE(status)) { + std::cout << "no resource index to load" << std::endl; + return; + } + + transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &status); + UParseError parseError; + + int32_t row, maxRows; + if (U_SUCCESS(status)) { + maxRows = ures_getSize(transIDs); + for (row = 0; row < maxRows; row++) { + colBund = ures_getByIndex(transIDs, row, 0, &status); + + if (U_SUCCESS(status) && ures_getSize(colBund) == 4) { + UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status); + UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0); + UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status); + + if (U_SUCCESS(status)) { + switch (type) { + case 0x66: // 'f' + case 0x69: // 'i' + // 'file' or 'internal'; + // row[2]=resource, row[3]=direction + { + //UBool visible = (type == 0x0066 /*f*/); + UTransDirection dir = + (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) == + 0x0046 /*F*/) ? + UTRANS_FORWARD : UTRANS_REVERSE; + //registry->put(id, resString, dir, visible); + std::cout << "instantiating " << resString << std::endl; + instantiateTrans(id, resString, dir, parseError, status); + } + break; + case 0x61: // 'a' + // 'alias'; row[2]=createInstance argument + //registry->put(id, resString, TRUE); + break; + } + } + else std::cout << "Failed to get resString" << std:: endl; + } + else std::cout << "Failed to get row" << std:: endl; + + ures_close(colBund); + } + } + else + { + std::cout << "no resource index to load" << std::endl; + } + + ures_close(transIDs); + ures_close(bundle); +} + + + +void initiateSwordTransliteratorsByFactory(UErrorCode &status) +{ + static const char translit_swordindexf[] = "translit_swordindex"; + + UResourceBundle *bundle, *transIDs, *colBund; + bundle = ures_openDirect(SW_RESDATA, translit_swordindexf, &status); + if (U_FAILURE(status)) { + std::cout << "no resource index to load" << std::endl; + std::cout << "status " << u_errorName(status) << std::endl; + return; + } + + transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &status); + UParseError parseError; + + int32_t row, maxRows; + if (U_SUCCESS(status)) { + maxRows = ures_getSize(transIDs); + for (row = 0; row < maxRows; row++) { + colBund = ures_getByIndex(transIDs, row, 0, &status); + + if (U_SUCCESS(status) && ures_getSize(colBund) == 4) { + UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status); + UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0); + UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status); + std::cout << "ok so far" << std::endl; + + if (U_SUCCESS(status)) { + switch (type) { + case 0x66: // 'f' + case 0x69: // 'i' + // 'file' or 'internal'; + // row[2]=resource, row[3]=direction + { + //UBool visible = (type == 0x0066 /*f*/); + UTransDirection dir = + (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) == + 0x0046 /*F*/) ? + UTRANS_FORWARD : UTRANS_REVERSE; + //registry->put(id, resString, dir, visible); + std::cout << "instantiating " << resString << " ..." << std::endl; + instantiateTransFactory(id, resString, dir, parseError, status); + std::cout << "done." << std::endl; + } + break; + case 0x61: // 'a' + // 'alias'; row[2]=createInstance argument + //registry->put(id, resString, TRUE); + break; + } + } + else std::cout << "Failed to get resString" << std:: endl; + } + else std::cout << "Failed to get row" << std:: endl; + + ures_close(colBund); + } + } + else + { + std::cout << "no resource index to load" << std::endl; + std::cout << "status " << u_errorName(status) << std::endl; + } + + ures_close(transIDs); + ures_close(bundle); +} + + +void initiateSwordTransliteratorsToMap(UErrorCode &status) +{ + static const char translit_swordindexf[] = "translit_swordindex"; + + UResourceBundle *bundle, *transIDs, *colBund; + bundle = ures_openDirect(SW_RESDATA, translit_swordindexf, &status); + if (U_FAILURE(status)) { + std::cout << "no resource index to load" << std::endl; + std::cout << "status " << u_errorName(status) << std::endl; + return; + } + + transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &status); + //UParseError parseError; + + int32_t row, maxRows; + if (U_SUCCESS(status)) { + maxRows = ures_getSize(transIDs); + for (row = 0; row < maxRows; row++) { + colBund = ures_getByIndex(transIDs, row, 0, &status); + + if (U_SUCCESS(status) && ures_getSize(colBund) == 4) { + UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status); + UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0); + UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status); + std::cout << "ok so far" << std::endl; + + if (U_SUCCESS(status)) { + switch (type) { + case 0x66: // 'f' + case 0x69: // 'i' + // 'file' or 'internal'; + // row[2]=resource, row[3]=direction + { + //UBool visible = (type == 0x0066 /*f*/); + UTransDirection dir = + (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) == + 0x0046 /*F*/) ? + UTRANS_FORWARD : UTRANS_REVERSE; + //registry->put(id, resString, dir, visible); + std::cout << "instantiating " << resString << " ..." << std::endl; + registerTrans(id, resString, dir, status); + std::cout << "done." << std::endl; + } + break; + case 0x61: // 'a' + // 'alias'; row[2]=createInstance argument + //registry->put(id, resString, TRUE); + break; + } + } + else std::cout << "Failed to get resString" << std:: endl; + } + else std::cout << "Failed to get row" << std:: endl; + + ures_close(colBund); + } + } + else + { + std::cout << "no resource index to load" << std::endl; + std::cout << "status " << u_errorName(status) << std::endl; + } + + ures_close(transIDs); + ures_close(bundle); +} + + + + + +int main() +{ + sw_tmap = new SWTransMap(); + UErrorCode status = U_ZERO_ERROR; + std::cout << "Available before: " << Transliterator::countAvailableIDs() << std::endl; + //initiateSwordTransliterators(status); + //initiateSwordTransliteratorsByFactory(status); + initiateSwordTransliteratorsToMap(status); + int32_t cids = Transliterator::countAvailableIDs(); + std::cout << "Available after: " << cids << std::endl; + + //for ( int32_t i=0;i +#include + +#include "unicode/udata.h" /* Data structures */ +#include "unicode/ures.h" /* Data structures */ +#include "unicode/utypes.h" /* Basic ICU data types */ +#include "unicode/ucnv.h" /* C Converter API */ +#include "unicode/ustring.h" /* some more string fcns*/ + +#include "unicode/translit.h" + +#include "utf8transliterator.h" + +using namespace std; + +// Print the given string to stdout +void uprintf(const UnicodeString &str) { + char *buf = 0; + int32_t len = str.length(); + // int32_t bufLen = str.extract(0, len, buf); // Preflight + /* Preflighting seems to be broken now, so assume 1-1 conversion, + plus some slop. */ + int32_t bufLen = len + 16; + int32_t actualLen; + buf = new char[bufLen + 1]; + actualLen = str.extract(0, len, buf/*, bufLen*/); // Default codepage conversion + buf[actualLen] = 0; + //printf("%s", buf); + std::cout << buf; + delete buf; +} + + +int main() { + + + UErrorCode status = U_ZERO_ERROR; +// UDataMemory *pappData = udata_open("/usr/local/lib/sword/swicu", "res", "root", &status); + if (U_FAILURE(status)) + { + std::cout << "error: " << status << ":" << + u_errorName(status) << std::endl; + return 0; + } + UChar * uBuf; + UChar * target; + UConverter *conv; + //UParseError perr = U_ZERO_ERROR; + int32_t uBufSize = 0, uLength = 0; +// void * pAppData=NULL; + const char * samplestring = "If this compiles and runs without errors, apparently ICU is working."; + //ures_open("/usr/local/lib/sword/swicu.dat", + // NULL, &status); + //UDataMemory *pappData = udata_open("/usr/local/lib/sword/swicu", +// "res", "root", &status); + if (U_FAILURE(status)) + { + std::cout << "error: " << status << ":" << + u_errorName(status) << std::endl; + return 0; + } + //UDataMemory *pappData2 = udata_open("/usr/local/lib/sword/swicu", +// "res", "translit_Latin_Gothic", &status); + std::cout << status << std::endl; + if (U_FAILURE(status)) + { + std::cout << "error: " << status << ":" << + u_errorName(status) << std::endl; + return 0; + } + std::cout << "available " << Transliterator::countAvailableIDs() << std::endl; + //udata_setAppData("/usr/local/lib/sword/swicu.dat" , pAppData, &status); + //if (U_FAILURE(status)) + //{ + //std::cout << "error: " << status << ":" << + // u_errorName(status) << std::endl; + //return 0; + //} + + int32_t i_ids = Transliterator::countAvailableIDs(); + + std::cout << "available " << i_ids << std::endl; + for (int i=0; i +#include +#include + +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) { + VerseKey parser; + + ListKey scope = parser.ParseVerseList("amos", parser, true); + + ListKey result; + + scope++; + scope++; + scope++; + scope++; + + VerseKey x = scope; + x.clearBound(); + + std::cout << "x: " << x.getText() << "\n"; + + result << x; + + std::cout << result.getText() << "\n"; + + result = TOP; + + std::cout << result.getText() << "\n"; + + const char *bounds = "lk,acts"; + scope = parser.ParseVerseList(bounds, parser, true); + + VerseKey boundTest("lk", "acts"); + + boundTest.setText("Is.1.13"); + std::cout << "Error: " << (int)boundTest.Error() << "\n"; + boundTest.setText("1Sam.21.1"); + std::cout << "Error: " << (int)boundTest.Error() << "\n"; + + + x = "Is.1.13"; + scope = x; +// if (scope == x) std::cout << "Error restricting bounds: " << x.getText() << " is in " << bounds << "\n"; + if (!scope.Error()) std::cout << "Error restricting bounds: " << x.getText() << " is in " << bounds << "\n"; + + x = "1Sam.21.1"; + scope = x; + if (!scope.Error()) std::cout << "Error restricting bounds: " << x.getText() << " is in " << bounds << "\n"; + + return 0; +} diff --git a/tests/webiftest.cpp b/tests/webiftest.cpp new file mode 100644 index 0000000..5aa8d54 --- /dev/null +++ b/tests/webiftest.cpp @@ -0,0 +1,56 @@ +#ifndef __GNUC__ +#include +#else +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif +using namespace std; + +#define MAXBUF 30000 + +int main(int argc, char **argv) { + + const char* modName = (argc >= 2) ? argv[1] : "KJV"; + const char* keyName = (argc == 3) ? argv[2] : "John 1:1"; + + SWMgr mgr(0, 0, true, new MarkupFilterMgr(FMT_WEBIF, ENC_UTF8)); + mgr.setGlobalOption("Strong's Numbers", "on"); + mgr.setGlobalOption("Morphological Tags", "on"); + + SWModule *module = mgr.Modules[modName]; + if (!module) { + module = mgr.Modules.begin()->second; + } + module->setKey(keyName); + std::cout << module->RenderText() << std::endl<< std::endl<< std::endl; + + //------------------------ + + SWMgr mgr2(0, 0, true, new MarkupFilterMgr(FMT_HTMLHREF, ENC_UTF8)); + mgr2.setGlobalOption("Strong's Numbers", "on"); + mgr2.setGlobalOption("Morphological Tags", "on"); + module = mgr2.Modules[modName]; + if (!module) { + module = mgr2.Modules.begin()->second; + } + + module->setKey(keyName); + std::cout << module->RenderText() << std::endl; + + return 0; +} + diff --git a/tests/xmltest.cpp b/tests/xmltest.cpp new file mode 100644 index 0000000..c8e1830 --- /dev/null +++ b/tests/xmltest.cpp @@ -0,0 +1,52 @@ +#include +#include + +using namespace sword; +using namespace std; + +int main(int argc, char **argv) { + + const char *xml = ""; + cout << ((argc > 1) ? argv[1]: xml) << "\n"; + + XMLTag x((argc > 1) ? argv[1] : xml); + + cout << x.toString() << "\n"; + x.setAttribute("addedAttribute", "with a \" quote"); + cout << x.toString() << "\n"; + cout << "Tag name: [" << x.getName() << "]\n"; + StringList attributes = x.getAttributeNames(); + for (StringList::iterator it = attributes.begin(); it != attributes.end(); it++) { + const char *name = it->c_str(); + cout << " - attribute: [" << name << "] = ["; + cout << x.getAttribute(name) << "]\n"; + int count = x.getAttributePartCount(name, ' '); + cout << "\t" << count << " parts:\n"; + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + cout << "\t" << x.getAttribute(name, i, ' ') << "\n"; + if (i < 0) i = 0; // to handle our -1 condition + } while (++i < count); + } + cout << " isEmpty: " << x.isEmpty() << "\n"; + cout << " isEndTag: " << x.isEndTag() << "\n"; + cout << "\n"; + + + if (argc < 2) { // only run if we're defaulted + const char *testParts="ABC D EF GHIJ"; + cout << "Setting attribute 'multiPart' to: '" << testParts << "'\n"; + x.setAttribute("multiPart", testParts); + cout << x << "\n"; + cout << "Setting part 2 to 'MMM'\n"; + x.setAttribute("multiPart", "MMM", 2, ' '); + cout << x << "\n"; + cout << "Removing part 1\n"; + x.setAttribute("multiPart", 0, 1, ' '); + cout << x << "\n"; + cout << "Removing part 2\n"; + x.setAttribute("multiPart", 0, 2, ' '); + cout << x << "\n"; + } + +} diff --git a/usrinst.sh b/usrinst.sh new file mode 100755 index 0000000..7ba12ea --- /dev/null +++ b/usrinst.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +OPTIONS="--prefix=/usr $OPTIONS" +OPTIONS="--disable-shared $OPTIONS" +OPTIONS="--without-conf $OPTIONS" +OPTIONS="--sysconfdir=/etc $OPTIONS" +#OPTIONS="--with-vcl $OPTIONS" +#OPTIONS="--enable-debug $OPTIONS" +#OPTIONS="--enable-profile $OPTIONS" +OPTIONS="--with-icu $OPTIONS" +#OPTIONS="--without-clucene $OPTIONS" +#OPTIONS="--without-curl $OPTIONS" +OPTIONS="--enable-tests $OPTIONS" +#OPTIONS="--disable-utilities $OPTIONS" +#OPTIONS="--libdir=/usr/lib64 $OPTIONS" + + +CPPFLAGS="$CFLAGS $CPPFLAGS -DUSBINARY" ./configure $OPTIONS $* + +echo "" +echo "" +echo "" +echo "Configured to NOT write a global /etc/sword.conf on 'make install'." +echo "If this is the first time you've installed sword, be sure to run" +echo "'make install_config' if you would like a basic configuration installed" +echo "" +echo "Next you might try something like: " +echo "" +echo "make" +echo "su" +echo "make install" +echo "(and optionally)" +echo "make install_config" +echo "make register" +echo "" +echo "" +echo "" diff --git a/utilities/.cvsignore b/utilities/.cvsignore new file mode 100644 index 0000000..941045f --- /dev/null +++ b/utilities/.cvsignore @@ -0,0 +1,31 @@ +.deps +.libs +Makefile +Makefile.in +addgb +addld +addvs +cipherraw +ciphertest +ciphertest2 +emptyvss +gbfidx +imp2gbs +imp2ld +imp2vs +installmgr +lexdump +mkfastmod +mod2imp +mod2osis +mod2vpl +mod2zmod +modwrite +osis2mod +step2vpl +stepdump +thml2gbs +txt2sword +vpl2mod +vs2osisref +xml2gbs diff --git a/utilities/Makefile.am b/utilities/Makefile.am new file mode 100644 index 0000000..c453f80 --- /dev/null +++ b/utilities/Makefile.am @@ -0,0 +1,76 @@ +AUTOMAKE_OPTIONS = 1.6 +SUBDIRS = diatheke +INCLUDES = -I $(top_srcdir)/include +LDADD = $(top_builddir)/lib/libsword.la +noinst_PROGRAMS = cipherraw lexdump \ +stepdump step2vpl gbfidx modwrite addvs emptyvss \ +addgb genbookutil treeidxutil + +bin_PROGRAMS = mod2imp mod2osis osis2mod tei2mod vs2osisref mod2vpl \ + mkfastmod vpl2mod imp2vs installmgr xml2gbs imp2gbs + +#if INSTALLMGR +#IMGRPROG = +#else +#IMGRPROG = +#endif + + +#if ICU +#ICUPROG = +#else +#ICUPROG = +#endif + +if ZLIB +ZLIBPROG = mod2zmod addld imp2ld +else +ZLIBPROG = +endif + + + +#noinst_PROGRAMS += $(ICUPROG) +bin_PROGRAMS += $(ZLIBPROG) +#$(IMGRPROG) + +if ICU +endif + +cipherraw_SOURCES = cipherraw.cpp +lexdump_SOURCES = lexdump.c +lexdump_LDADD = -lstdc++ +mkfastmod_SOURCES = mkfastmod.cpp +mod2vpl_SOURCES = mod2vpl.cpp +vpl2mod_SOURCES = vpl2mod.cpp +stepdump_SOURCES = stepdump.cpp +step2vpl_SOURCES = step2vpl.cpp +gbfidx_SOURCES = gbfidx.cpp +modwrite_SOURCES = modwrite.cpp +addvs_SOURCES = addvs.cpp +emptyvss_SOURCES = emptyvss.cpp +addgb_SOURCES = addgb.cpp +imp2gbs_SOURCES = imp2gbs.cpp +imp2vs_SOURCES = imp2vs.cpp +mod2imp_SOURCES = mod2imp.cpp +mod2osis_SOURCES = mod2osis.cpp +xml2gbs_SOURCES = xml2gbs.cpp +osis2mod_SOURCES = osis2mod.cpp +tei2mod_SOURCES = tei2mod.cpp +vs2osisref_SOURCES = vs2osisref.cpp +genbookutil_SOURCES = genbookutil.cpp +treeidxutil_SOURCES = treeidxutil.cpp + +installmgr_SOURCES = installmgr.cpp +#installmgr_LDADD = -lcurl $(CURL_LIBS) $(LDADD) + +if ZLIB +mod2zmod_SOURCES = mod2zmod.cpp +addld_SOURCES = addld.cpp +imp2ld_SOURCES = imp2ld.cpp +endif + +EXTRA_DIST = +include bcppmake/Makefile.am +include kylixmake/Makefile.am +include perl/Makefile.am diff --git a/utilities/Makefile.in b/utilities/Makefile.in new file mode 100644 index 0000000..d27987e --- /dev/null +++ b/utilities/Makefile.in @@ -0,0 +1,949 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +noinst_PROGRAMS = cipherraw$(EXEEXT) lexdump$(EXEEXT) \ + stepdump$(EXEEXT) step2vpl$(EXEEXT) gbfidx$(EXEEXT) \ + modwrite$(EXEEXT) addvs$(EXEEXT) emptyvss$(EXEEXT) \ + addgb$(EXEEXT) genbookutil$(EXEEXT) treeidxutil$(EXEEXT) +bin_PROGRAMS = mod2imp$(EXEEXT) mod2osis$(EXEEXT) osis2mod$(EXEEXT) \ + tei2mod$(EXEEXT) vs2osisref$(EXEEXT) mod2vpl$(EXEEXT) \ + mkfastmod$(EXEEXT) vpl2mod$(EXEEXT) imp2vs$(EXEEXT) \ + installmgr$(EXEEXT) xml2gbs$(EXEEXT) imp2gbs$(EXEEXT) \ + $(am__EXEEXT_1) +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/bcppmake/Makefile.am $(srcdir)/kylixmake/Makefile.am \ + $(srcdir)/perl/Makefile.am +subdir = utilities +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ + $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +@ZLIB_TRUE@am__EXEEXT_1 = mod2zmod$(EXEEXT) addld$(EXEEXT) \ +@ZLIB_TRUE@ imp2ld$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +am_addgb_OBJECTS = addgb.$(OBJEXT) +addgb_OBJECTS = $(am_addgb_OBJECTS) +addgb_LDADD = $(LDADD) +addgb_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am__addld_SOURCES_DIST = addld.cpp +@ZLIB_TRUE@am_addld_OBJECTS = addld.$(OBJEXT) +addld_OBJECTS = $(am_addld_OBJECTS) +addld_LDADD = $(LDADD) +addld_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_addvs_OBJECTS = addvs.$(OBJEXT) +addvs_OBJECTS = $(am_addvs_OBJECTS) +addvs_LDADD = $(LDADD) +addvs_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_cipherraw_OBJECTS = cipherraw.$(OBJEXT) +cipherraw_OBJECTS = $(am_cipherraw_OBJECTS) +cipherraw_LDADD = $(LDADD) +cipherraw_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_emptyvss_OBJECTS = emptyvss.$(OBJEXT) +emptyvss_OBJECTS = $(am_emptyvss_OBJECTS) +emptyvss_LDADD = $(LDADD) +emptyvss_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_gbfidx_OBJECTS = gbfidx.$(OBJEXT) +gbfidx_OBJECTS = $(am_gbfidx_OBJECTS) +gbfidx_LDADD = $(LDADD) +gbfidx_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_genbookutil_OBJECTS = genbookutil.$(OBJEXT) +genbookutil_OBJECTS = $(am_genbookutil_OBJECTS) +genbookutil_LDADD = $(LDADD) +genbookutil_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_imp2gbs_OBJECTS = imp2gbs.$(OBJEXT) +imp2gbs_OBJECTS = $(am_imp2gbs_OBJECTS) +imp2gbs_LDADD = $(LDADD) +imp2gbs_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am__imp2ld_SOURCES_DIST = imp2ld.cpp +@ZLIB_TRUE@am_imp2ld_OBJECTS = imp2ld.$(OBJEXT) +imp2ld_OBJECTS = $(am_imp2ld_OBJECTS) +imp2ld_LDADD = $(LDADD) +imp2ld_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_imp2vs_OBJECTS = imp2vs.$(OBJEXT) +imp2vs_OBJECTS = $(am_imp2vs_OBJECTS) +imp2vs_LDADD = $(LDADD) +imp2vs_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_installmgr_OBJECTS = installmgr.$(OBJEXT) +installmgr_OBJECTS = $(am_installmgr_OBJECTS) +installmgr_LDADD = $(LDADD) +installmgr_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_lexdump_OBJECTS = lexdump.$(OBJEXT) +lexdump_OBJECTS = $(am_lexdump_OBJECTS) +lexdump_DEPENDENCIES = +am_mkfastmod_OBJECTS = mkfastmod.$(OBJEXT) +mkfastmod_OBJECTS = $(am_mkfastmod_OBJECTS) +mkfastmod_LDADD = $(LDADD) +mkfastmod_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_mod2imp_OBJECTS = mod2imp.$(OBJEXT) +mod2imp_OBJECTS = $(am_mod2imp_OBJECTS) +mod2imp_LDADD = $(LDADD) +mod2imp_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_mod2osis_OBJECTS = mod2osis.$(OBJEXT) +mod2osis_OBJECTS = $(am_mod2osis_OBJECTS) +mod2osis_LDADD = $(LDADD) +mod2osis_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_mod2vpl_OBJECTS = mod2vpl.$(OBJEXT) +mod2vpl_OBJECTS = $(am_mod2vpl_OBJECTS) +mod2vpl_LDADD = $(LDADD) +mod2vpl_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am__mod2zmod_SOURCES_DIST = mod2zmod.cpp +@ZLIB_TRUE@am_mod2zmod_OBJECTS = mod2zmod.$(OBJEXT) +mod2zmod_OBJECTS = $(am_mod2zmod_OBJECTS) +mod2zmod_LDADD = $(LDADD) +mod2zmod_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_modwrite_OBJECTS = modwrite.$(OBJEXT) +modwrite_OBJECTS = $(am_modwrite_OBJECTS) +modwrite_LDADD = $(LDADD) +modwrite_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_osis2mod_OBJECTS = osis2mod.$(OBJEXT) +osis2mod_OBJECTS = $(am_osis2mod_OBJECTS) +osis2mod_LDADD = $(LDADD) +osis2mod_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_step2vpl_OBJECTS = step2vpl.$(OBJEXT) +step2vpl_OBJECTS = $(am_step2vpl_OBJECTS) +step2vpl_LDADD = $(LDADD) +step2vpl_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_stepdump_OBJECTS = stepdump.$(OBJEXT) +stepdump_OBJECTS = $(am_stepdump_OBJECTS) +stepdump_LDADD = $(LDADD) +stepdump_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_tei2mod_OBJECTS = tei2mod.$(OBJEXT) +tei2mod_OBJECTS = $(am_tei2mod_OBJECTS) +tei2mod_LDADD = $(LDADD) +tei2mod_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_treeidxutil_OBJECTS = treeidxutil.$(OBJEXT) +treeidxutil_OBJECTS = $(am_treeidxutil_OBJECTS) +treeidxutil_LDADD = $(LDADD) +treeidxutil_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_vpl2mod_OBJECTS = vpl2mod.$(OBJEXT) +vpl2mod_OBJECTS = $(am_vpl2mod_OBJECTS) +vpl2mod_LDADD = $(LDADD) +vpl2mod_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_vs2osisref_OBJECTS = vs2osisref.$(OBJEXT) +vs2osisref_OBJECTS = $(am_vs2osisref_OBJECTS) +vs2osisref_LDADD = $(LDADD) +vs2osisref_DEPENDENCIES = $(top_builddir)/lib/libsword.la +am_xml2gbs_OBJECTS = xml2gbs.$(OBJEXT) +xml2gbs_OBJECTS = $(am_xml2gbs_OBJECTS) +xml2gbs_LDADD = $(LDADD) +xml2gbs_DEPENDENCIES = $(top_builddir)/lib/libsword.la +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(addgb_SOURCES) $(addld_SOURCES) $(addvs_SOURCES) \ + $(cipherraw_SOURCES) $(emptyvss_SOURCES) $(gbfidx_SOURCES) \ + $(genbookutil_SOURCES) $(imp2gbs_SOURCES) $(imp2ld_SOURCES) \ + $(imp2vs_SOURCES) $(installmgr_SOURCES) $(lexdump_SOURCES) \ + $(mkfastmod_SOURCES) $(mod2imp_SOURCES) $(mod2osis_SOURCES) \ + $(mod2vpl_SOURCES) $(mod2zmod_SOURCES) $(modwrite_SOURCES) \ + $(osis2mod_SOURCES) $(step2vpl_SOURCES) $(stepdump_SOURCES) \ + $(tei2mod_SOURCES) $(treeidxutil_SOURCES) $(vpl2mod_SOURCES) \ + $(vs2osisref_SOURCES) $(xml2gbs_SOURCES) +DIST_SOURCES = $(addgb_SOURCES) $(am__addld_SOURCES_DIST) \ + $(addvs_SOURCES) $(cipherraw_SOURCES) $(emptyvss_SOURCES) \ + $(gbfidx_SOURCES) $(genbookutil_SOURCES) $(imp2gbs_SOURCES) \ + $(am__imp2ld_SOURCES_DIST) $(imp2vs_SOURCES) \ + $(installmgr_SOURCES) $(lexdump_SOURCES) $(mkfastmod_SOURCES) \ + $(mod2imp_SOURCES) $(mod2osis_SOURCES) $(mod2vpl_SOURCES) \ + $(am__mod2zmod_SOURCES_DIST) $(modwrite_SOURCES) \ + $(osis2mod_SOURCES) $(step2vpl_SOURCES) $(stepdump_SOURCES) \ + $(tei2mod_SOURCES) $(treeidxutil_SOURCES) $(vpl2mod_SOURCES) \ + $(vs2osisref_SOURCES) $(xml2gbs_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_CONFIG = @CPPUNIT_CONFIG@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CURL_AM_CFLAGS = @CURL_AM_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +GREP = @GREP@ +ICU_CONFIG = @ICU_CONFIG@ +ICU_IOLIBS = @ICU_IOLIBS@ +ICU_LIBS = @ICU_LIBS@ +ICU_VER = @ICU_VER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGDATA = @PKGDATA@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dir_confdef = @dir_confdef@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 +SUBDIRS = diatheke +INCLUDES = -I $(top_srcdir)/include +LDADD = $(top_builddir)/lib/libsword.la +@ZLIB_FALSE@ZLIBPROG = + +#if INSTALLMGR +#IMGRPROG = +#else +#IMGRPROG = +#endif + +#if ICU +#ICUPROG = +#else +#ICUPROG = +#endif +@ZLIB_TRUE@ZLIBPROG = mod2zmod addld imp2ld +#$(IMGRPROG) +cipherraw_SOURCES = cipherraw.cpp +lexdump_SOURCES = lexdump.c +lexdump_LDADD = -lstdc++ +mkfastmod_SOURCES = mkfastmod.cpp +mod2vpl_SOURCES = mod2vpl.cpp +vpl2mod_SOURCES = vpl2mod.cpp +stepdump_SOURCES = stepdump.cpp +step2vpl_SOURCES = step2vpl.cpp +gbfidx_SOURCES = gbfidx.cpp +modwrite_SOURCES = modwrite.cpp +addvs_SOURCES = addvs.cpp +emptyvss_SOURCES = emptyvss.cpp +addgb_SOURCES = addgb.cpp +imp2gbs_SOURCES = imp2gbs.cpp +imp2vs_SOURCES = imp2vs.cpp +mod2imp_SOURCES = mod2imp.cpp +mod2osis_SOURCES = mod2osis.cpp +xml2gbs_SOURCES = xml2gbs.cpp +osis2mod_SOURCES = osis2mod.cpp +tei2mod_SOURCES = tei2mod.cpp +vs2osisref_SOURCES = vs2osisref.cpp +genbookutil_SOURCES = genbookutil.cpp +treeidxutil_SOURCES = treeidxutil.cpp +installmgr_SOURCES = installmgr.cpp +#installmgr_LDADD = -lcurl $(CURL_LIBS) $(LDADD) +@ZLIB_TRUE@mod2zmod_SOURCES = mod2zmod.cpp +@ZLIB_TRUE@addld_SOURCES = addld.cpp +@ZLIB_TRUE@imp2ld_SOURCES = imp2ld.cpp +EXTRA_DIST = $(swbcppmakedir)/imp2ld.bpf $(swbcppmakedir)/mod2imp.bpf \ + $(swbcppmakedir)/osis2mod.bpf $(swbcppmakedir)/utilities.bpg \ + $(swbcppmakedir)/imp2ld.bpr $(swbcppmakedir)/mod2imp.bpr \ + $(swbcppmakedir)/osis2mod.bpr $(swbcppmakedir)/vpl2mod.bpf \ + $(swbcppmakedir)/cipherraw.bpf $(swbcppmakedir)/imp2vs.bpf \ + $(swbcppmakedir)/mod2osis.bpf $(swbcppmakedir)/step2vpl.bpf \ + $(swbcppmakedir)/vpl2mod.bpr $(swbcppmakedir)/cipherraw.bpr \ + $(swbcppmakedir)/imp2vs.bpr $(swbcppmakedir)/mod2osis.bpr \ + $(swbcppmakedir)/step2vpl.bpr $(swbcppmakedir)/vs2osisref.bpf \ + $(swbcppmakedir)/diatheke.bpf $(swbcppmakedir)/libsword.bpf \ + $(swbcppmakedir)/mod2vpl.bpf $(swbcppmakedir)/stepdump.bpf \ + $(swbcppmakedir)/vs2osisref.bpr $(swbcppmakedir)/diatheke.bpr \ + $(swbcppmakedir)/libsword.bpr $(swbcppmakedir)/mod2vpl.bpr \ + $(swbcppmakedir)/stepdump.bpr $(swbcppmakedir)/xml2gbs.bpf \ + $(swbcppmakedir)/imp2gbs.bpf $(swbcppmakedir)/mkfastmod.bpf \ + $(swbcppmakedir)/mod2zmod.bpf $(swbcppmakedir)/xml2gbs.bpr \ + $(swbcppmakedir)/imp2gbs.bpr $(swbcppmakedir)/mkfastmod.bpr \ + $(swbcppmakedir)/mod2zmod.bpr $(swkylixmakedir)/libsword.bpf \ + $(swkylixmakedir)/mod2zmod.bpf $(swkylixmakedir)/mod2zmod.res \ + $(swkylixmakedir)/libsword.bpr $(swkylixmakedir)/mod2zmod.bpr \ + $(swkylixmakedir)/utilities.bpg \ + $(swperlutildir)/cipherkeygen.pl $(swperlutildir)/linkvers.pl \ + $(swperlutildir)/localecap.pl $(swperlutildir)/mkvsmod.pl +swbcppmakedir = $(top_srcdir)/utilities/bcppmake +swkylixmakedir = $(top_srcdir)/utilities/kylixmake +swperlutildir = $(top_srcdir)/utilities/perl +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/bcppmake/Makefile.am $(srcdir)/kylixmake/Makefile.am $(srcdir)/perl/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign utilities/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign utilities/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +addgb$(EXEEXT): $(addgb_OBJECTS) $(addgb_DEPENDENCIES) + @rm -f addgb$(EXEEXT) + $(CXXLINK) $(addgb_OBJECTS) $(addgb_LDADD) $(LIBS) +addld$(EXEEXT): $(addld_OBJECTS) $(addld_DEPENDENCIES) + @rm -f addld$(EXEEXT) + $(CXXLINK) $(addld_OBJECTS) $(addld_LDADD) $(LIBS) +addvs$(EXEEXT): $(addvs_OBJECTS) $(addvs_DEPENDENCIES) + @rm -f addvs$(EXEEXT) + $(CXXLINK) $(addvs_OBJECTS) $(addvs_LDADD) $(LIBS) +cipherraw$(EXEEXT): $(cipherraw_OBJECTS) $(cipherraw_DEPENDENCIES) + @rm -f cipherraw$(EXEEXT) + $(CXXLINK) $(cipherraw_OBJECTS) $(cipherraw_LDADD) $(LIBS) +emptyvss$(EXEEXT): $(emptyvss_OBJECTS) $(emptyvss_DEPENDENCIES) + @rm -f emptyvss$(EXEEXT) + $(CXXLINK) $(emptyvss_OBJECTS) $(emptyvss_LDADD) $(LIBS) +gbfidx$(EXEEXT): $(gbfidx_OBJECTS) $(gbfidx_DEPENDENCIES) + @rm -f gbfidx$(EXEEXT) + $(CXXLINK) $(gbfidx_OBJECTS) $(gbfidx_LDADD) $(LIBS) +genbookutil$(EXEEXT): $(genbookutil_OBJECTS) $(genbookutil_DEPENDENCIES) + @rm -f genbookutil$(EXEEXT) + $(CXXLINK) $(genbookutil_OBJECTS) $(genbookutil_LDADD) $(LIBS) +imp2gbs$(EXEEXT): $(imp2gbs_OBJECTS) $(imp2gbs_DEPENDENCIES) + @rm -f imp2gbs$(EXEEXT) + $(CXXLINK) $(imp2gbs_OBJECTS) $(imp2gbs_LDADD) $(LIBS) +imp2ld$(EXEEXT): $(imp2ld_OBJECTS) $(imp2ld_DEPENDENCIES) + @rm -f imp2ld$(EXEEXT) + $(CXXLINK) $(imp2ld_OBJECTS) $(imp2ld_LDADD) $(LIBS) +imp2vs$(EXEEXT): $(imp2vs_OBJECTS) $(imp2vs_DEPENDENCIES) + @rm -f imp2vs$(EXEEXT) + $(CXXLINK) $(imp2vs_OBJECTS) $(imp2vs_LDADD) $(LIBS) +installmgr$(EXEEXT): $(installmgr_OBJECTS) $(installmgr_DEPENDENCIES) + @rm -f installmgr$(EXEEXT) + $(CXXLINK) $(installmgr_OBJECTS) $(installmgr_LDADD) $(LIBS) +lexdump$(EXEEXT): $(lexdump_OBJECTS) $(lexdump_DEPENDENCIES) + @rm -f lexdump$(EXEEXT) + $(LINK) $(lexdump_OBJECTS) $(lexdump_LDADD) $(LIBS) +mkfastmod$(EXEEXT): $(mkfastmod_OBJECTS) $(mkfastmod_DEPENDENCIES) + @rm -f mkfastmod$(EXEEXT) + $(CXXLINK) $(mkfastmod_OBJECTS) $(mkfastmod_LDADD) $(LIBS) +mod2imp$(EXEEXT): $(mod2imp_OBJECTS) $(mod2imp_DEPENDENCIES) + @rm -f mod2imp$(EXEEXT) + $(CXXLINK) $(mod2imp_OBJECTS) $(mod2imp_LDADD) $(LIBS) +mod2osis$(EXEEXT): $(mod2osis_OBJECTS) $(mod2osis_DEPENDENCIES) + @rm -f mod2osis$(EXEEXT) + $(CXXLINK) $(mod2osis_OBJECTS) $(mod2osis_LDADD) $(LIBS) +mod2vpl$(EXEEXT): $(mod2vpl_OBJECTS) $(mod2vpl_DEPENDENCIES) + @rm -f mod2vpl$(EXEEXT) + $(CXXLINK) $(mod2vpl_OBJECTS) $(mod2vpl_LDADD) $(LIBS) +mod2zmod$(EXEEXT): $(mod2zmod_OBJECTS) $(mod2zmod_DEPENDENCIES) + @rm -f mod2zmod$(EXEEXT) + $(CXXLINK) $(mod2zmod_OBJECTS) $(mod2zmod_LDADD) $(LIBS) +modwrite$(EXEEXT): $(modwrite_OBJECTS) $(modwrite_DEPENDENCIES) + @rm -f modwrite$(EXEEXT) + $(CXXLINK) $(modwrite_OBJECTS) $(modwrite_LDADD) $(LIBS) +osis2mod$(EXEEXT): $(osis2mod_OBJECTS) $(osis2mod_DEPENDENCIES) + @rm -f osis2mod$(EXEEXT) + $(CXXLINK) $(osis2mod_OBJECTS) $(osis2mod_LDADD) $(LIBS) +step2vpl$(EXEEXT): $(step2vpl_OBJECTS) $(step2vpl_DEPENDENCIES) + @rm -f step2vpl$(EXEEXT) + $(CXXLINK) $(step2vpl_OBJECTS) $(step2vpl_LDADD) $(LIBS) +stepdump$(EXEEXT): $(stepdump_OBJECTS) $(stepdump_DEPENDENCIES) + @rm -f stepdump$(EXEEXT) + $(CXXLINK) $(stepdump_OBJECTS) $(stepdump_LDADD) $(LIBS) +tei2mod$(EXEEXT): $(tei2mod_OBJECTS) $(tei2mod_DEPENDENCIES) + @rm -f tei2mod$(EXEEXT) + $(CXXLINK) $(tei2mod_OBJECTS) $(tei2mod_LDADD) $(LIBS) +treeidxutil$(EXEEXT): $(treeidxutil_OBJECTS) $(treeidxutil_DEPENDENCIES) + @rm -f treeidxutil$(EXEEXT) + $(CXXLINK) $(treeidxutil_OBJECTS) $(treeidxutil_LDADD) $(LIBS) +vpl2mod$(EXEEXT): $(vpl2mod_OBJECTS) $(vpl2mod_DEPENDENCIES) + @rm -f vpl2mod$(EXEEXT) + $(CXXLINK) $(vpl2mod_OBJECTS) $(vpl2mod_LDADD) $(LIBS) +vs2osisref$(EXEEXT): $(vs2osisref_OBJECTS) $(vs2osisref_DEPENDENCIES) + @rm -f vs2osisref$(EXEEXT) + $(CXXLINK) $(vs2osisref_OBJECTS) $(vs2osisref_LDADD) $(LIBS) +xml2gbs$(EXEEXT): $(xml2gbs_OBJECTS) $(xml2gbs_DEPENDENCIES) + @rm -f xml2gbs$(EXEEXT) + $(CXXLINK) $(xml2gbs_OBJECTS) $(xml2gbs_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addgb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addld.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addvs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipherraw.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emptyvss.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfidx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genbookutil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp2gbs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp2ld.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp2vs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/installmgr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lexdump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkfastmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod2imp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod2osis.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod2vpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod2zmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modwrite.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osis2mod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step2vpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stepdump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tei2mod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/treeidxutil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vpl2mod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vs2osisref.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml2gbs.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool clean-noinstPROGRAMS ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/utilities/addcomment.cpp b/utilities/addcomment.cpp new file mode 100644 index 0000000..4872dbf --- /dev/null +++ b/utilities/addcomment.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + int loop; + int max; + RawFiles personal("modules/comments/rawfiles/personal/", "MINE", "Personal Comments"); + VerseKey mykey; + + if (argc < 3) { + fprintf(stderr, "usage: %s <\"comment\"> <\"verse\"> [count] [disable AutoNormalization]\n", argv[0]); + exit(-1); + } + + if (argc > 4) + mykey.AutoNormalize(0); // Turn off autonormalize if 3 args to allow for intros + // This is kludgy but at lease you can try it + // with something like: sword "Matthew 1:0" 1 1 + + mykey = argv[2]; + mykey.Persist(1); + personal.setKey(mykey); + + max = (argc < 4) ? 1 : atoi(argv[3]); + + for (loop = 0; loop < max; loop++) { + personal << argv[1]; + mykey++; + } + std::cout << "Added Comment" << std::endl; + return 0; +} diff --git a/utilities/addgb.cpp b/utilities/addgb.cpp new file mode 100644 index 0000000..c14a0e7 --- /dev/null +++ b/utilities/addgb.cpp @@ -0,0 +1,117 @@ +#include +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using sword::TreeKeyIdx; +using sword::RawGenBook; +using sword::SWKey; +#endif + + +void printTree(TreeKeyIdx treeKey, TreeKeyIdx *target = 0, int level = 1) { + if (!target) + target = &treeKey; + + unsigned long currentOffset = target->getOffset(); + std::cout << ((currentOffset == treeKey.getOffset()) ? "==>" : ""); + for (int i = 0; i < level; i++) std::cout << "\t"; + std::cout << treeKey.getLocalName() << "/\n"; + if (treeKey.firstChild()) { + printTree(treeKey, target, level+1); + treeKey.parent(); + } + if (treeKey.nextSibling()) + printTree(treeKey, target, level); + +} + + +int main(int argc, char **argv) { + + const char * helptext ="addgb 1.0 General Book module creation tool for the SWORD Project\nUse -a to add a new leaf entry from standard input or a file\n usage:\n %s -a []\n"; + + // const char * helptext ="addgb 1.0 General Book module creation tool for the SWORD Project\nUse -a to add a new leaf entry from standard input or a file, -d to delete an\nentry, -l to link two leaf entries.\n usage:\n %s -a []\n %s -d \n %s -l \n"; + + char mode; + unsigned long entrysize; + + if (argc < 3) { + fprintf(stderr, helptext, argv[0]); + exit(-1); + } + + mode = argv[1][1]; + + // Do some initialization stuff + TreeKeyIdx *treeKey = new TreeKeyIdx(argv[2]); + if (treeKey->Error()) { + treeKey->create(argv[2]); + delete treeKey; + treeKey = new TreeKeyIdx(argv[2]); + RawGenBook::createModule(argv[2]); + } + delete treeKey; + RawGenBook *book = new RawGenBook(argv[2]); + + if ((mode == 'a') && (argc == 4 || argc == 5)) { + char buffer[1048576]; //this is the max size of any entry + + + FILE *infile; + // case: add from text file + //Open our data file and read its contents into the buffer + if (argc == 5) infile = fopen(argv[4], "r"); + // case: add from stdin + else infile = stdin; + + entrysize = fread(buffer, sizeof(char), sizeof(buffer), infile); + book->setKey(argv[3]); + book->setEntry(buffer, entrysize); // save text to module at current position + } + + /* + // let's pretend these don't exist for the time being + + // Link 2 verses + else if ((mode == 'l') && argc == 5) { + *key = argv[3]; + mod.setKey(*key); + + SWKey tmpkey = argv[4]; + mod << &(tmpkey); + } + + // Delete an entry + else if ((mode == 'd') && argc == 4) { + mod.setKey(argv[3]); + mod.deleteEntry(); + } + */ + // Bad arguments, print usage + else { + fprintf(stderr, helptext, argv[0]); + exit(-1); + } + + //DEBUG printTree(root, treeKey); + + delete treeKey; + delete book; + return 0; +} diff --git a/utilities/addld.cpp b/utilities/addld.cpp new file mode 100644 index 0000000..5b7429e --- /dev/null +++ b/utilities/addld.cpp @@ -0,0 +1,200 @@ +#include +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include +#include +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using sword::SWMgr; +using sword::ZipCompress; +using sword::RawLD4; +using sword::SWKey; +using sword::zLD; +using sword::RawLD; +#endif + + +int main(int argc, char **argv) { + + const char * helptext ="addld 1.0 Lexicon & Dictionary module creation tool for the SWORD Project\nUse -a to add a new LD entry from standard input or a file, -d to delete an\nentry, -l to link two LD entries, -c to create a new module.\n usage:\n %s -a []\n %s -d \n %s -l \n %s -c \nTo use 4-byte LD instead of 2-byte, insert a 4 immediately after the '-'.\nTo use zLD instead of 2-byte, insert a z immediately after the '-'.\n"; + long entrysize; + + bool fourbyte = false; + bool compress = false; + char mode; + + if (argc < 3) { + fprintf(stderr, helptext, argv[0], argv[0], argv[0], argv[0]); + exit(-1); + } + + if (argv[1][1] == '4') { + fourbyte = false; + mode = argv[1][2]; + } + else if (argv[1][1] == 'z') { + compress = true; + mode = argv[1][2]; + } + else { + mode = argv[1][1]; + } + + if ((mode == 'a') && (argc == 4 || argc == 5)) { + + // Do some initialization stuff + if (fourbyte) { + char buffer[1048576]; //this is the max size of any entry + RawLD4 mod(argv[2]); // open our datapath with our RawText driver. + SWKey* key = mod.CreateKey(); + key->Persist(1); // the magical setting + + // Set our VerseKey + *key = argv[3]; + mod.setKey(*key); + FILE *infile; + // case: add from text file + //Open our data file and read its contents into the buffer + if (argc == 5) infile = fopen(argv[4], "r"); + // case: add from stdin + else infile = stdin; + + entrysize = fread(buffer, sizeof(char), sizeof(buffer), infile); + mod.setEntry(buffer, entrysize); // save text to module at current position + } + else if (compress) { + char buffer[1048576]; //this is the max size of any entry + zLD mod(argv[2], 0, 0, 200, new ZipCompress()); // open our datapath with our RawText driver. + SWKey* key = mod.CreateKey(); + key->Persist(1); // the magical setting + + // Set our VerseKey + *key = argv[3]; + mod.setKey(*key); + FILE *infile; + // case: add from text file + //Open our data file and read its contents into the buffer + if (argc == 5) infile = fopen(argv[4], "r"); + // case: add from stdin + else infile = stdin; + + entrysize = fread(buffer, sizeof(char), sizeof(buffer), infile); + mod.setEntry(buffer, entrysize); // save text to module at current position + } + else { + char buffer[65536]; //this is the max size of any entry + RawLD mod(argv[2]); // open our datapath with our RawText driver. + SWKey* key = mod.CreateKey(); + key->Persist(1); // the magical setting + + // Set our VerseKey + *key = argv[3]; + mod.setKey(*key); + FILE *infile; + // case: add from text file + //Open our data file and read its contents into the buffer + if (argc == 5) infile = fopen(argv[4], "r"); + // case: add from stdin + else infile = stdin; + + entrysize = fread(buffer, sizeof(char), sizeof(buffer), infile); + mod.setEntry(buffer, entrysize); // save text to module at current position + } + + } + // Link 2 verses + else if ((mode == 'l') && argc == 5) { + // Do some initialization stuff + if (fourbyte) { + RawLD4 mod(argv[2]); // open our datapath with our RawText driver. + SWKey* key = mod.CreateKey(); + key->Persist(1); // the magical setting + + *key = argv[3]; + mod.setKey(*key); + SWKey tmpkey = argv[4]; + mod << &(tmpkey); + } + else if (compress) { + zLD mod(argv[2]); // open our datapath with our RawText driver. + SWKey* key = mod.CreateKey(); + key->Persist(1); // the magical setting + + *key = argv[3]; + mod.setKey(*key); + + SWKey tmpkey = argv[4]; + mod << &(tmpkey); + } + else { + RawLD mod(argv[2]); // open our datapath with our RawText driver. + SWKey* key = mod.CreateKey(); + key->Persist(1); // the magical setting + + *key = argv[3]; + mod.setKey(*key); + + SWKey tmpkey = argv[4]; + mod << &(tmpkey); + } + } + else if ((mode == 'd') && argc == 4) { + if (fourbyte) { + RawLD4 mod(argv[2]); // open our datapath with our RawText driver. + mod.setKey(argv[3]); + mod.deleteEntry(); + } + if (compress) { + zLD mod(argv[2]); // open our datapath with our RawText driver. + mod.setKey(argv[3]); + mod.deleteEntry(); + } + else { + RawLD mod(argv[2]); // open our datapath with our RawText driver. + mod.setKey(argv[3]); + mod.deleteEntry(); + } + + } + // Make a new module + else if ((mode == 'c') && argc == 3) { + // Try to initialize a default set of datafiles and indicies at our + // datapath location passed to us from the user. + if (fourbyte) { + if (RawLD4::createModule(argv[2])) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", argv[0], argv[2]); + exit(-2); + } + } + if (compress) { + if (zLD::createModule(argv[2])) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", argv[0], argv[2]); + exit(-2); + } + } + else { + if (RawLD::createModule(argv[2])) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", argv[0], argv[2]); + exit(-2); + } + } + } + + // Bad arguments, print usage + else { + fprintf(stderr, helptext, argv[0], argv[0], argv[0], argv[0]); + exit(-1); + } +} diff --git a/utilities/addvs.cpp b/utilities/addvs.cpp new file mode 100644 index 0000000..3d73344 --- /dev/null +++ b/utilities/addvs.cpp @@ -0,0 +1,186 @@ +#include +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using sword::SWMgr; +using sword::RawText; +using sword::SWKey; +using sword::VerseKey; +using sword::ListKey; +using sword::SWModule; +#endif + +int main(int argc, char **argv) { + + const char * helptext = "addvs 1.1 Bible & Commentary module creation tool for the SWORD Project\nUse -a to add a new verse from standard input or a file, -d to delete a verse,\n-l to link two verses, -c to create a new module.\n usage:\n %s -a []\n %s -d \n %s -l \n %s -c \n"; + long entrysize; + + if (argc < 3) { + fprintf(stderr, helptext, argv[0], argv[0], argv[0], argv[0]); + exit(-1); + } + if (!strcmp(argv[1], "-a") && (argc == 4 || argc == 5)) { + + // Do some initialization stuff + char buffer[65536]; //this is the max size of any entry + RawText * mod = new RawText(argv[2]); // open our datapath with our RawText driver. + VerseKey *vkey = new VerseKey; + vkey->Headings(1); + vkey->AutoNormalize(0); + vkey->Persist(1); // the magical setting + *vkey = argv[3]; + // Set our VerseKey + mod->setKey(*vkey); + if (!vkey->Chapter()) { + // bad hack >> + // 0:0 is Book intro + // (chapter):0 is Chapter intro + // + // 0:2 is Module intro + // 0:1 is Testament intro + int backstep = vkey->Verse(); + vkey->Verse(0); + *mod -= backstep; + // << bad hack + + FILE *infile; + // case: add from text file + //Open our data file and read its contents into the buffer + if (argc == 5) infile = fopen(argv[4], "r"); + // case: add from stdin + else infile = stdin; + + entrysize = fread(buffer, sizeof(char), sizeof(buffer), infile); + + mod->setEntry(buffer, entrysize); // save text to module at current position + } + else { + ListKey listkey = vkey->ParseVerseList(argv[3], "Gen1:1", true); + int i; + bool havefirst = false; + VerseKey firstverse; + for (i = 0; i < listkey.Count(); i++) { + VerseKey *element = SWDYNAMIC_CAST(VerseKey, listkey.GetElement(i)); + if (element) { + mod->Key(element->LowerBound()); + VerseKey finalkey = element->UpperBound(); + std::cout << (const char*)mod->Key() << "-" << (const char*)finalkey << std::endl; + if (!havefirst) { + havefirst = true; + firstverse = mod->Key(); + FILE *infile; + // case: add from text file + //Open our data file and read its contents into the buffer + if (argc == 5) infile = fopen(argv[4], "r"); + // case: add from stdin + else infile = stdin; + + entrysize = fread(buffer, sizeof(char), sizeof(buffer), infile); + + mod->setEntry(buffer, entrysize); // save text to module at current position + std::cout << "f" << (const char*)firstverse << std::endl; + (*mod)++; + } + while (mod->Key() <= finalkey) { + std::cout << (const char*)mod->Key() << std::endl; + *(SWModule*)mod << &firstverse; + (*mod)++; + } + } + else { + if (havefirst) { + mod->Key(*listkey.GetElement(i)); + *(SWModule*)mod << &firstverse; + std::cout << (const char*)mod->Key() << std::endl; + } + else { + mod->Key(*listkey.GetElement(i)); + havefirst = true; + firstverse = mod->Key(); + FILE *infile; + // case: add from text file + //Open our data file and read its contents into the buffer + if (argc == 5) infile = fopen(argv[4], "r"); + // case: add from stdin + else infile = stdin; + + entrysize = fread(buffer, sizeof(char), sizeof(buffer), infile); + + mod->setEntry(buffer, entrysize); // save text to module at current position + std::cout << "f" << (const char*)firstverse << std::endl; + } + } + } + } + delete vkey; + } + // Link 2 verses + else if (!strcmp(argv[1], "-l") && argc == 5) { + // Do some initialization stuff + RawText *mod = new RawText(argv[2]); // open our datapath with our RawText driver. + + mod->setKey(argv[4]); // set key from argument + SWKey tmpkey = (SWKey) argv[3]; + *(SWModule*)mod << &(tmpkey); + delete mod; + } + + else if (!strcmp(argv[1], "-d") && argc == 4) { + RawText mod(argv[2]); // open our datapath with our RawText driver. + VerseKey *vkey = new VerseKey; + vkey->Headings(1); + vkey->AutoNormalize(0); + vkey->Persist(1); // the magical setting + + // Set our VerseKey + mod.setKey(*vkey); + *vkey = argv[3]; + + if (!vkey->Chapter()) + { + // bad hack >> + // 0:0 is Book intro + // (chapter):0 is Chapter intro + // + // 0:2 is Module intro + // 0:1 is Testament intro + int backstep = vkey->Verse(); + vkey->Verse(0); + mod -= backstep; + // << bad hack + } + + mod.deleteEntry(); + delete vkey; + } + + // Make a new module + else if (!strcmp(argv[1], "-c") && argc == 3) { + // Try to initialize a default set of datafiles and indicies at our + // datapath location passed to us from the user. + if (RawText::createModule(argv[2])) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", argv[0], argv[2]); + exit(-2); + } + } + + // Bad arguments, print usage + else { + fprintf(stderr, helptext, argv[0], argv[0], argv[0], argv[0]); + exit(-1); + } +} diff --git a/utilities/bcpp6make/cipherraw.bpf b/utilities/bcpp6make/cipherraw.bpf new file mode 100644 index 0000000..5da8824 --- /dev/null +++ b/utilities/bcpp6make/cipherraw.bpf @@ -0,0 +1,3 @@ +This file is used by the project manager only and should be treated like the project file + + main \ No newline at end of file diff --git a/utilities/bcpp6make/cipherraw.bpr b/utilities/bcpp6make/cipherraw.bpr new file mode 100644 index 0000000..25e48f3 --- /dev/null +++ b/utilities/bcpp6make/cipherraw.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/diatheke.bpf b/utilities/bcpp6make/diatheke.bpf new file mode 100644 index 0000000..4c1e949 --- /dev/null +++ b/utilities/bcpp6make/diatheke.bpf @@ -0,0 +1,6 @@ + +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcpp6make/diatheke.bpr b/utilities/bcpp6make/diatheke.bpr new file mode 100644 index 0000000..d1d25a8 --- /dev/null +++ b/utilities/bcpp6make/diatheke.bpr @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=8 +Item0=..\diatheke;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl;Z:\Biblie\SRC\icu-sword\source\common;Z:\Biblie\SRC\icu-sword\source\i18n +Item1=..\diatheke;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl;Z:\Biblie\SRC\icu-sword\source\common +Item2=..\diatheke;..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl;Z:\Biblie\SRC\icu-sword\source\common +Item3=..\diatheke;..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item4=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item5=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item6=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item7=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=..\diatheke;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\diatheke;..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item3=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=-b system -k modulelist +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication=Z:\Biblie\SRC\sword\utilities\CBuilder6\stage\diatheke.exe +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/imp2gbs.bpf b/utilities/bcpp6make/imp2gbs.bpf new file mode 100644 index 0000000..5da8824 --- /dev/null +++ b/utilities/bcpp6make/imp2gbs.bpf @@ -0,0 +1,3 @@ +This file is used by the project manager only and should be treated like the project file + + main \ No newline at end of file diff --git a/utilities/bcpp6make/imp2gbs.bpr b/utilities/bcpp6make/imp2gbs.bpr new file mode 100644 index 0000000..095e1a8 --- /dev/null +++ b/utilities/bcpp6make/imp2gbs.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/imp2ld.bpf b/utilities/bcpp6make/imp2ld.bpf new file mode 100644 index 0000000..5da8824 --- /dev/null +++ b/utilities/bcpp6make/imp2ld.bpf @@ -0,0 +1,3 @@ +This file is used by the project manager only and should be treated like the project file + + main \ No newline at end of file diff --git a/utilities/bcpp6make/imp2ld.bpr b/utilities/bcpp6make/imp2ld.bpr new file mode 100644 index 0000000..9d52d2f --- /dev/null +++ b/utilities/bcpp6make/imp2ld.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/imp2vs.bpf b/utilities/bcpp6make/imp2vs.bpf new file mode 100644 index 0000000..5da8824 --- /dev/null +++ b/utilities/bcpp6make/imp2vs.bpf @@ -0,0 +1,3 @@ +This file is used by the project manager only and should be treated like the project file + + main \ No newline at end of file diff --git a/utilities/bcpp6make/imp2vs.bpr b/utilities/bcpp6make/imp2vs.bpr new file mode 100644 index 0000000..78f3dd8 --- /dev/null +++ b/utilities/bcpp6make/imp2vs.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/mkfastmod.bpf b/utilities/bcpp6make/mkfastmod.bpf new file mode 100644 index 0000000..5da8824 --- /dev/null +++ b/utilities/bcpp6make/mkfastmod.bpf @@ -0,0 +1,3 @@ +This file is used by the project manager only and should be treated like the project file + + main \ No newline at end of file diff --git a/utilities/bcpp6make/mkfastmod.bpr b/utilities/bcpp6make/mkfastmod.bpr new file mode 100644 index 0000000..f91620b --- /dev/null +++ b/utilities/bcpp6make/mkfastmod.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/mod2imp.bpf b/utilities/bcpp6make/mod2imp.bpf new file mode 100644 index 0000000..5da8824 --- /dev/null +++ b/utilities/bcpp6make/mod2imp.bpf @@ -0,0 +1,3 @@ +This file is used by the project manager only and should be treated like the project file + + main \ No newline at end of file diff --git a/utilities/bcpp6make/mod2imp.bpr b/utilities/bcpp6make/mod2imp.bpr new file mode 100644 index 0000000..f5a9f9c --- /dev/null +++ b/utilities/bcpp6make/mod2imp.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/mod2osis.bpf b/utilities/bcpp6make/mod2osis.bpf new file mode 100644 index 0000000..5da8824 --- /dev/null +++ b/utilities/bcpp6make/mod2osis.bpf @@ -0,0 +1,3 @@ +This file is used by the project manager only and should be treated like the project file + + main \ No newline at end of file diff --git a/utilities/bcpp6make/mod2osis.bpr b/utilities/bcpp6make/mod2osis.bpr new file mode 100644 index 0000000..9755a8d --- /dev/null +++ b/utilities/bcpp6make/mod2osis.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=WHAC +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/mod2vpl.bpf b/utilities/bcpp6make/mod2vpl.bpf new file mode 100644 index 0000000..5da8824 --- /dev/null +++ b/utilities/bcpp6make/mod2vpl.bpf @@ -0,0 +1,3 @@ +This file is used by the project manager only and should be treated like the project file + + main \ No newline at end of file diff --git a/utilities/bcpp6make/mod2vpl.bpr b/utilities/bcpp6make/mod2vpl.bpr new file mode 100644 index 0000000..90ca034 --- /dev/null +++ b/utilities/bcpp6make/mod2vpl.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/mod2zmod.bpf b/utilities/bcpp6make/mod2zmod.bpf new file mode 100644 index 0000000..4c1e949 --- /dev/null +++ b/utilities/bcpp6make/mod2zmod.bpf @@ -0,0 +1,6 @@ + +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcpp6make/mod2zmod.bpr b/utilities/bcpp6make/mod2zmod.bpr new file mode 100644 index 0000000..867e102 --- /dev/null +++ b/utilities/bcpp6make/mod2zmod.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/obj/dummy b/utilities/bcpp6make/obj/dummy new file mode 100644 index 0000000..e69de29 diff --git a/utilities/bcpp6make/osis2mod.bpf b/utilities/bcpp6make/osis2mod.bpf new file mode 100644 index 0000000..4c1e949 --- /dev/null +++ b/utilities/bcpp6make/osis2mod.bpf @@ -0,0 +1,6 @@ + +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcpp6make/osis2mod.bpr b/utilities/bcpp6make/osis2mod.bpr new file mode 100644 index 0000000..2ba8c78 --- /dev/null +++ b/utilities/bcpp6make/osis2mod.bpr @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=3 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0 +Item2=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=WHAC +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/stage/dummy b/utilities/bcpp6make/stage/dummy new file mode 100644 index 0000000..e69de29 diff --git a/utilities/bcpp6make/step2vpl.bpf b/utilities/bcpp6make/step2vpl.bpf new file mode 100644 index 0000000..4c1e949 --- /dev/null +++ b/utilities/bcpp6make/step2vpl.bpf @@ -0,0 +1,6 @@ + +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcpp6make/step2vpl.bpr b/utilities/bcpp6make/step2vpl.bpr new file mode 100644 index 0000000..f29d65e --- /dev/null +++ b/utilities/bcpp6make/step2vpl.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/stepdump.bpf b/utilities/bcpp6make/stepdump.bpf new file mode 100644 index 0000000..4c1e949 --- /dev/null +++ b/utilities/bcpp6make/stepdump.bpf @@ -0,0 +1,6 @@ + +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcpp6make/stepdump.bpr b/utilities/bcpp6make/stepdump.bpr new file mode 100644 index 0000000..b3db81c --- /dev/null +++ b/utilities/bcpp6make/stepdump.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/utils.bpg b/utilities/bcpp6make/utils.bpg new file mode 100644 index 0000000..258f6bb --- /dev/null +++ b/utilities/bcpp6make/utils.bpg @@ -0,0 +1,89 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = icuinbcb6.lib icuucbcb6.lib libsword6icu.lib cipherraw.exe imp2gbs.exe imp2ld.exe imp2vs.exe mkfastmod.exe mod2imp.exe mod2osis.exe mod2vpl.exe mod2zmod.exe osis2mod.exe step2vpl.exe stepdump.exe vpl2mod.exe vs2osisref.exe xml2gbs.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +cipherraw.exe: cipherraw.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +imp2gbs.exe: imp2gbs.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +imp2ld.exe: imp2ld.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +imp2vs.exe: imp2vs.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mkfastmod.exe: mkfastmod.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mod2imp.exe: mod2imp.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mod2osis.exe: mod2osis.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mod2vpl.exe: mod2vpl.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mod2zmod.exe: mod2zmod.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +osis2mod.exe: osis2mod.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +step2vpl.exe: step2vpl.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +stepdump.exe: stepdump.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +vpl2mod.exe: vpl2mod.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +vs2osisref.exe: vs2osisref.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +xml2gbs.exe: xml2gbs.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +libsword6icu.lib: ..\..\..\sword\lib\bcppmake\libsword6icu.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +icuinbcb6.lib: ..\..\..\icu-sword\as_is\borland\icuinbcb6.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +icuucbcb6.lib: ..\..\..\icu-sword\as_is\borland\icuucbcb6.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + + diff --git a/utilities/bcpp6make/vpl2mod.bpf b/utilities/bcpp6make/vpl2mod.bpf new file mode 100644 index 0000000..4c1e949 --- /dev/null +++ b/utilities/bcpp6make/vpl2mod.bpf @@ -0,0 +1,6 @@ + +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcpp6make/vpl2mod.bpr b/utilities/bcpp6make/vpl2mod.bpr new file mode 100644 index 0000000..2c135d6 --- /dev/null +++ b/utilities/bcpp6make/vpl2mod.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/vs2osisref.bpf b/utilities/bcpp6make/vs2osisref.bpf new file mode 100644 index 0000000..4c1e949 --- /dev/null +++ b/utilities/bcpp6make/vs2osisref.bpf @@ -0,0 +1,6 @@ + +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcpp6make/vs2osisref.bpr b/utilities/bcpp6make/vs2osisref.bpr new file mode 100644 index 0000000..c2d8334 --- /dev/null +++ b/utilities/bcpp6make/vs2osisref.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcpp6make/xml2gbs.bpf b/utilities/bcpp6make/xml2gbs.bpf new file mode 100644 index 0000000..4c1e949 --- /dev/null +++ b/utilities/bcpp6make/xml2gbs.bpf @@ -0,0 +1,6 @@ + +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcpp6make/xml2gbs.bpr b/utilities/bcpp6make/xml2gbs.bpr new file mode 100644 index 0000000..a15c843 --- /dev/null +++ b/utilities/bcpp6make/xml2gbs.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_;USBINARY;_USE_OLD_RW_STL;U_HAVE_PLACEMENT_NEW=0;_DEBUG +Item1=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=obj +Item1=obj\ + +[HistoryLists\hlFinalOutputDir] +Count=1 +Item0=stage\ + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=test test.osis.xml 0 +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 + + \ No newline at end of file diff --git a/utilities/bcppmake/Makefile.am b/utilities/bcppmake/Makefile.am new file mode 100644 index 0000000..91c34d4 --- /dev/null +++ b/utilities/bcppmake/Makefile.am @@ -0,0 +1,37 @@ +swbcppmakedir = $(top_srcdir)/utilities/bcppmake + +EXTRA_DIST += $(swbcppmakedir)/imp2ld.bpf +EXTRA_DIST += $(swbcppmakedir)/mod2imp.bpf +EXTRA_DIST += $(swbcppmakedir)/osis2mod.bpf +EXTRA_DIST += $(swbcppmakedir)/utilities.bpg +EXTRA_DIST += $(swbcppmakedir)/imp2ld.bpr +EXTRA_DIST += $(swbcppmakedir)/mod2imp.bpr +EXTRA_DIST += $(swbcppmakedir)/osis2mod.bpr +EXTRA_DIST += $(swbcppmakedir)/vpl2mod.bpf +EXTRA_DIST += $(swbcppmakedir)/cipherraw.bpf +EXTRA_DIST += $(swbcppmakedir)/imp2vs.bpf +EXTRA_DIST += $(swbcppmakedir)/mod2osis.bpf +EXTRA_DIST += $(swbcppmakedir)/step2vpl.bpf +EXTRA_DIST += $(swbcppmakedir)/vpl2mod.bpr +EXTRA_DIST += $(swbcppmakedir)/cipherraw.bpr +EXTRA_DIST += $(swbcppmakedir)/imp2vs.bpr +EXTRA_DIST += $(swbcppmakedir)/mod2osis.bpr +EXTRA_DIST += $(swbcppmakedir)/step2vpl.bpr +EXTRA_DIST += $(swbcppmakedir)/vs2osisref.bpf +EXTRA_DIST += $(swbcppmakedir)/diatheke.bpf +EXTRA_DIST += $(swbcppmakedir)/libsword.bpf +EXTRA_DIST += $(swbcppmakedir)/mod2vpl.bpf +EXTRA_DIST += $(swbcppmakedir)/stepdump.bpf +EXTRA_DIST += $(swbcppmakedir)/vs2osisref.bpr +EXTRA_DIST += $(swbcppmakedir)/diatheke.bpr +EXTRA_DIST += $(swbcppmakedir)/libsword.bpr +EXTRA_DIST += $(swbcppmakedir)/mod2vpl.bpr +EXTRA_DIST += $(swbcppmakedir)/stepdump.bpr +EXTRA_DIST += $(swbcppmakedir)/xml2gbs.bpf +EXTRA_DIST += $(swbcppmakedir)/imp2gbs.bpf +EXTRA_DIST += $(swbcppmakedir)/mkfastmod.bpf +EXTRA_DIST += $(swbcppmakedir)/mod2zmod.bpf +EXTRA_DIST += $(swbcppmakedir)/xml2gbs.bpr +EXTRA_DIST += $(swbcppmakedir)/imp2gbs.bpr +EXTRA_DIST += $(swbcppmakedir)/mkfastmod.bpr +EXTRA_DIST += $(swbcppmakedir)/mod2zmod.bpr diff --git a/utilities/bcppmake/cipherraw.bdsproj b/utilities/bcppmake/cipherraw.bdsproj new file mode 100644 index 0000000..b36d5e5 --- /dev/null +++ b/utilities/bcppmake/cipherraw.bdsproj @@ -0,0 +1,322 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 3 + _ICU_;_ICUSWORD_;USBINARY + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + cipherraw.bpf + + + diff --git a/utilities/bcppmake/cipherraw.bpf b/utilities/bcppmake/cipherraw.bpf new file mode 100644 index 0000000..5d0b116 --- /dev/null +++ b/utilities/bcppmake/cipherraw.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\cipherraw.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/cipherraw.bpr b/utilities/bcppmake/cipherraw.bpr new file mode 100644 index 0000000..6a089de --- /dev/null +++ b/utilities/bcppmake/cipherraw.bpr @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=3 +Item0=_ICU_;_ICUSWORD_;USBINARY +Item1=_ICU_;_ICUSWORD_ +Item2=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/diatheke.bdsproj b/utilities/bcppmake/diatheke.bdsproj new file mode 100644 index 0000000..18546e6 --- /dev/null +++ b/utilities/bcppmake/diatheke.bdsproj @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 3 + ..\diatheke;$(BCB)\include;$(BCB)\include\vcl;..\..\include + ..\diatheke;$(BCB)\include;$(BCB)\include\vcl;..\..\include\ + ..\diatheke;$(BCB)\include;$(BCB)\include\vcl + + + 2 + ..\diatheke;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\diatheke;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 1 + _DEBUG + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + diatheke.bpf + + + diff --git a/utilities/bcppmake/diatheke.bpf b/utilities/bcppmake/diatheke.bpf new file mode 100644 index 0000000..c17d73c --- /dev/null +++ b/utilities/bcppmake/diatheke.bpf @@ -0,0 +1,17 @@ +USEUNIT("..\diatheke\diatheke.cpp"); +USEUNIT("..\diatheke\thmlcgi.cpp"); +USEUNIT("..\diatheke\corediatheke.cpp"); +USEUNIT("..\diatheke\diafiltmgr.cpp"); +USEUNIT("..\diatheke\diathekemgr.cpp"); +USEUNIT("..\diatheke\gbfcgi.cpp"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USEUNIT("..\diatheke\osiscgi.cpp"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/diatheke.bpr b/utilities/bcppmake/diatheke.bpr new file mode 100644 index 0000000..bd8ad36 --- /dev/null +++ b/utilities/bcppmake/diatheke.bpr @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..\diatheke;$(BCB)\include;$(BCB)\include\vcl;..\..\include +Item1=..\diatheke;$(BCB)\include;$(BCB)\include\vcl;..\..\include\ +Item2=..\diatheke;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\diatheke;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\diatheke;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/imp2gbs.bdsproj b/utilities/bcppmake/imp2gbs.bdsproj new file mode 100644 index 0000000..0db98c5 --- /dev/null +++ b/utilities/bcppmake/imp2gbs.bdsproj @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 2 + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + imp2gbs.bpf + + + diff --git a/utilities/bcppmake/imp2gbs.bpf b/utilities/bcppmake/imp2gbs.bpf new file mode 100644 index 0000000..9bd2a3f --- /dev/null +++ b/utilities/bcppmake/imp2gbs.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\imp2gbs.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/imp2gbs.bpr b/utilities/bcppmake/imp2gbs.bpr new file mode 100644 index 0000000..089b6ad --- /dev/null +++ b/utilities/bcppmake/imp2gbs.bpr @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\icu-sword\source\common +Item1=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_ +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/imp2ld.bdsproj b/utilities/bcppmake/imp2ld.bdsproj new file mode 100644 index 0000000..b02285d --- /dev/null +++ b/utilities/bcppmake/imp2ld.bdsproj @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 2 + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + imp2ld.bpf + + + diff --git a/utilities/bcppmake/imp2ld.bpf b/utilities/bcppmake/imp2ld.bpf new file mode 100644 index 0000000..e983517 --- /dev/null +++ b/utilities/bcppmake/imp2ld.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\imp2ld.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/imp2ld.bpr b/utilities/bcppmake/imp2ld.bpr new file mode 100644 index 0000000..6703191 --- /dev/null +++ b/utilities/bcppmake/imp2ld.bpr @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_ +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/imp2vs.bdsproj b/utilities/bcppmake/imp2vs.bdsproj new file mode 100644 index 0000000..5eddfb1 --- /dev/null +++ b/utilities/bcppmake/imp2vs.bdsproj @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 2 + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + imp2vs.bpf + + + diff --git a/utilities/bcppmake/imp2vs.bpf b/utilities/bcppmake/imp2vs.bpf new file mode 100644 index 0000000..d6b81dc --- /dev/null +++ b/utilities/bcppmake/imp2vs.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\imp2vs.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/imp2vs.bpr b/utilities/bcppmake/imp2vs.bpr new file mode 100644 index 0000000..8c4b229 --- /dev/null +++ b/utilities/bcppmake/imp2vs.bpr @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_ +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/installmgr.bdsproj b/utilities/bcppmake/installmgr.bdsproj new file mode 100644 index 0000000..ef5de9b --- /dev/null +++ b/utilities/bcppmake/installmgr.bdsproj @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 2 + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + RWP ./ 3 2 abc + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + installmgr.bpf + + + diff --git a/utilities/bcppmake/installmgr.bpf b/utilities/bcppmake/installmgr.bpf new file mode 100644 index 0000000..b9a4c05 --- /dev/null +++ b/utilities/bcppmake/installmgr.bpf @@ -0,0 +1,12 @@ +USEUNIT("..\installmgr.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +USELIB("..\..\..\biblecs\apps\InstallMgr\libcurl.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/installmgr.bpr b/utilities/bcppmake/installmgr.bpr new file mode 100644 index 0000000..a4fa19e --- /dev/null +++ b/utilities/bcppmake/installmgr.bpr @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_ +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=RWP ./ 3 2 abc +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/libsword.bpf b/utilities/bcppmake/libsword.bpf new file mode 100644 index 0000000..e4c4667 --- /dev/null +++ b/utilities/bcppmake/libsword.bpf @@ -0,0 +1,118 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USEUNIT("..\..\src\keys\versekey.cpp"); +USEUNIT("..\..\src\keys\strkey.cpp"); +USEUNIT("..\..\src\keys\swkey.cpp"); +USEUNIT("..\..\src\keys\listkey.cpp"); +USEUNIT("..\..\src\mgr\swmgr.cpp"); +USEUNIT("..\..\src\mgr\localemgr.cpp"); +USEUNIT("..\..\src\mgr\swconfig.cpp"); +USEUNIT("..\..\src\mgr\swlocale.cpp"); +USEUNIT("..\..\src\mgr\filemgr.cpp"); +USEUNIT("..\..\src\utilfuns\utilstr.cpp"); +USEUNIT("..\..\src\utilfuns\utilconf.cpp"); +USEUNIT("..\..\src\utilfuns\Greek2Greek.cpp"); +USEUNIT("..\..\src\frontend\swlog.cpp"); +USEUNIT("..\..\src\frontend\swdisp.cpp"); +USEUNIT("..\..\src\modules\swmodule.cpp"); +USEUNIT("..\..\src\modules\comments\swcom.cpp"); +USEUNIT("..\..\src\modules\comments\hrefcom\hrefcom.cpp"); +USEUNIT("..\..\src\modules\comments\rawcom\rawcom.cpp"); +USEUNIT("..\..\src\modules\comments\rawfiles\rawfiles.cpp"); +USEUNIT("..\..\src\modules\common\lzsscomprs.cpp"); +USEUNIT("..\..\src\modules\common\rawstr.cpp"); +USEUNIT("..\..\src\modules\common\rawverse.cpp"); +USEUNIT("..\..\src\modules\common\sapphire.cpp"); +USEUNIT("..\..\src\modules\common\swcipher.cpp"); +USEUNIT("..\..\src\modules\common\swcomprs.cpp"); +USEUNIT("..\..\src\modules\filters\thmlrtf.cpp"); +USEUNIT("..\..\src\modules\filters\gbffootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\gbfhtml.cpp"); +USEUNIT("..\..\src\modules\filters\gbfplain.cpp"); +USEUNIT("..\..\src\modules\filters\gbfrtf.cpp"); +USEUNIT("..\..\src\modules\filters\gbfstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\gbfthml.cpp"); +USEUNIT("..\..\src\modules\filters\plainfootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\plainhtml.cpp"); +USEUNIT("..\..\src\modules\filters\rtfhtml.cpp"); +USEUNIT("..\..\src\modules\filters\rwphtml.cpp"); +USEUNIT("..\..\src\modules\filters\rwprtf.cpp"); +USEUNIT("..\..\src\modules\filters\thmlgbf.cpp"); +USEUNIT("..\..\src\modules\filters\thmlhtml.cpp"); +USEUNIT("..\..\src\modules\filters\thmlplain.cpp"); +USEUNIT("..\..\src\modules\filters\cipherfil.cpp"); +USEUNIT("..\..\src\modules\lexdict\swld.cpp"); +USEUNIT("..\..\src\modules\lexdict\rawld\rawld.cpp"); +USEUNIT("..\..\src\modules\texts\swtext.cpp"); +USEUNIT("..\..\src\modules\texts\rawtext\rawtext.cpp"); +USEUNIT("..\..\src\modules\texts\ztext\ztext.cpp"); +USEUNIT("..\..\src\modules\common\zverse.cpp"); +USEUNIT("..\..\src\keys\treekey.cpp"); +USEUNIT("..\..\src\keys\treekeyidx.cpp"); +USEUNIT("..\..\src\modules\common\rawstr4.cpp"); +USEUNIT("..\..\src\modules\common\zstr.cpp"); +USEUNIT("..\..\src\modules\genbook\swgenbook.cpp"); +USEUNIT("..\..\src\modules\genbook\rawgenbook\rawgenbook.cpp"); +USEUNIT("..\..\src\mgr\swfiltermgr.cpp"); +USEUNIT("..\..\src\modules\filters\utf8utf16.cpp"); +USEUNIT("..\..\src\modules\filters\gbfheadings.cpp"); +USEUNIT("..\..\src\modules\filters\gbfhtmlhref.cpp"); +USEUNIT("..\..\src\modules\filters\gbfmorph.cpp"); +USEUNIT("..\..\src\modules\filters\latin1utf16.cpp"); +USEUNIT("..\..\src\modules\filters\latin1utf8.cpp"); +USEUNIT("..\..\src\modules\filters\scsuutf8.cpp"); +USEUNIT("..\..\src\modules\filters\swbasicfilter.cpp"); +USEUNIT("..\..\src\modules\filters\thmlfootnotes.cpp"); +USEUNIT("..\..\src\modules\filters\thmlheadings.cpp"); +USEUNIT("..\..\src\modules\filters\thmlhtmlhref.cpp"); +USEUNIT("..\..\src\modules\filters\thmllemma.cpp"); +USEUNIT("..\..\src\modules\filters\thmlmorph.cpp"); +USEUNIT("..\..\src\modules\filters\thmlscripref.cpp"); +USEUNIT("..\..\src\modules\filters\thmlstrongs.cpp"); +USEUNIT("..\..\src\modules\filters\thmlvariants.cpp"); +USEUNIT("..\..\src\modules\filters\unicodertf.cpp"); +USEUNIT("..\..\src\modules\filters\utf16utf8.cpp"); +USEUNIT("..\..\src\modules\filters\utf8arshaping.cpp"); +USEUNIT("..\..\src\modules\filters\utf8bidireorder.cpp"); +USEUNIT("..\..\src\modules\filters\utf8cantillation.cpp"); +USEUNIT("..\..\src\modules\filters\utf8greekaccents.cpp"); +USEUNIT("..\..\src\modules\filters\utf8hebrewpoints.cpp"); +USEUNIT("..\..\src\modules\filters\utf8html.cpp"); +USEUNIT("..\..\src\modules\filters\utf8latin1.cpp"); +USEUNIT("..\..\src\modules\filters\utf8nfc.cpp"); +USEUNIT("..\..\src\modules\filters\utf8nfkd.cpp"); +USEUNIT("..\..\src\modules\filters\utf8transliterator.cpp"); +USEUNIT("..\..\src\modules\comments\zcom\zcom.cpp"); +USEUNIT("..\..\src\modules\lexdict\rawld4\rawld4.cpp"); +USEUNIT("..\..\src\modules\common\zipcomprs.cpp"); +USEUNIT("..\..\src\modules\lexdict\zld\zld.cpp"); +USEUNIT("..\..\src\modules\common\entriesblk.cpp"); +USEUNIT("..\..\src\utilfuns\zlib\zutil.c"); +USEUNIT("..\..\src\utilfuns\zlib\compress.c"); +USEUNIT("..\..\src\utilfuns\zlib\crc32.c"); +USEUNIT("..\..\src\utilfuns\zlib\deflate.c"); +USEUNIT("..\..\src\utilfuns\zlib\gzio.c"); +USEUNIT("..\..\src\utilfuns\zlib\infblock.c"); +USEUNIT("..\..\src\utilfuns\zlib\infcodes.c"); +USEUNIT("..\..\src\utilfuns\zlib\inffast.c"); +USEUNIT("..\..\src\utilfuns\zlib\inflate.c"); +USEUNIT("..\..\src\utilfuns\zlib\inftrees.c"); +USEUNIT("..\..\src\utilfuns\zlib\infutil.c"); +USEUNIT("..\..\src\utilfuns\zlib\trees.c"); +USEUNIT("..\..\src\utilfuns\zlib\uncompr.c"); +USEUNIT("..\..\src\utilfuns\zlib\untgz.c"); +USEUNIT("..\..\src\utilfuns\zlib\adler32.c"); +USEUNIT("..\..\src\modules\filters\greeklexattribs.cpp"); +USEUNIT("..\..\src\mgr\swcacher.cpp"); +USEUNIT("..\..\src\modules\filters\gbfosis.cpp"); +USEUNIT("..\..\src\modules\filters\thmlosis.cpp"); +USEUNIT("..\..\src\mgr\encfiltmgr.cpp"); +USEUNIT("..\..\src\mgr\markupfiltmgr.cpp"); +USEUNIT("..\..\src\utilfuns\roman.cpp"); +//--------------------------------------------------------------------------- +#define Library + +// To add a file to the library use the Project menu 'Add to Project'. + diff --git a/utilities/bcppmake/libsword.bpr b/utilities/bcppmake/libsword.bpr new file mode 100644 index 0000000..8706c7a --- /dev/null +++ b/utilities/bcppmake/libsword.bpr @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=7 +Item0=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common;..\..\..\icu-sword\source\i18n +Item1=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\common +Item2=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item5=..\include;$(BCB)\include;$(BCB)\include\vcl +Item6=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\src\modules\texts\rawtext;..\src\modules\texts;..\src\modules\lexdict\rawld;..\src\modules\lexdict;..\src\modules\filters;..\src\modules\common;..\src\modules\comments\rawfiles;..\src\modules\comments\rawcom;..\src\modules\comments\hrefcom;..\src\modules\comments;..\src\modules;..\src\frontend;..\src\utilfuns;..\src\mgr;..\src\keys;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=5 +Item0=_ICU_;_ICUSWORD_;USBINARY +Item1=_ICU_;_ICUSWORD_;USBINARY;_DEBUG +Item2=_ICU_;_ICUSWORD_ +Item3=_ICU_;_ICUSWORD_;_DEBUG +Item4=_DEBUG + +[HistoryLists\hlTlibPageSize] +Count=5 +Item0=0x0200 +Item1=0x0080 +Item2=0x0040 +Item3=0x0020 +Item4=0x0010 + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/mkfastmod.bdsproj b/utilities/bcppmake/mkfastmod.bdsproj new file mode 100644 index 0000000..ffd1675 --- /dev/null +++ b/utilities/bcppmake/mkfastmod.bdsproj @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 3 + _ICU_;_ICUSWORD_;_DEBUG + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + KJV + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + mkfastmod.bpf + + + diff --git a/utilities/bcppmake/mkfastmod.bpf b/utilities/bcppmake/mkfastmod.bpf new file mode 100644 index 0000000..59da96b --- /dev/null +++ b/utilities/bcppmake/mkfastmod.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\mkfastmod.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/mkfastmod.bpr b/utilities/bcppmake/mkfastmod.bpr new file mode 100644 index 0000000..455ca6c --- /dev/null +++ b/utilities/bcppmake/mkfastmod.bpr @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=3 +Item0=_ICU_;_ICUSWORD_;_DEBUG +Item1=_ICU_;_ICUSWORD_ +Item2=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=KJV +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/mod2imp.bdsproj b/utilities/bcppmake/mod2imp.bdsproj new file mode 100644 index 0000000..d6f811b --- /dev/null +++ b/utilities/bcppmake/mod2imp.bdsproj @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 2 + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + mod2imp.bpf + + + diff --git a/utilities/bcppmake/mod2imp.bpf b/utilities/bcppmake/mod2imp.bpf new file mode 100644 index 0000000..ee00836 --- /dev/null +++ b/utilities/bcppmake/mod2imp.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\mod2imp.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/mod2imp.bpr b/utilities/bcppmake/mod2imp.bpr new file mode 100644 index 0000000..b18da0e --- /dev/null +++ b/utilities/bcppmake/mod2imp.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_ +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/mod2osis.bdsproj b/utilities/bcppmake/mod2osis.bdsproj new file mode 100644 index 0000000..72c5100 --- /dev/null +++ b/utilities/bcppmake/mod2osis.bdsproj @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 1 + _DEBUG + + + $(BCB)\source\vcl + + + KJV + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + mod2osis.bpf + + + diff --git a/utilities/bcppmake/mod2osis.bpf b/utilities/bcppmake/mod2osis.bpf new file mode 100644 index 0000000..0923831 --- /dev/null +++ b/utilities/bcppmake/mod2osis.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\mod2osis.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/mod2osis.bpr b/utilities/bcppmake/mod2osis.bpr new file mode 100644 index 0000000..ef275ef --- /dev/null +++ b/utilities/bcppmake/mod2osis.bpr @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=KJV +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/mod2vpl.bdsproj b/utilities/bcppmake/mod2vpl.bdsproj new file mode 100644 index 0000000..446bd36 --- /dev/null +++ b/utilities/bcppmake/mod2vpl.bdsproj @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 2 + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + RWP ./ 3 2 abc + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + mod2vpl.bpf + + + diff --git a/utilities/bcppmake/mod2vpl.bpf b/utilities/bcppmake/mod2vpl.bpf new file mode 100644 index 0000000..512ae0e --- /dev/null +++ b/utilities/bcppmake/mod2vpl.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\mod2vpl.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/mod2vpl.bpr b/utilities/bcppmake/mod2vpl.bpr new file mode 100644 index 0000000..780c5ba --- /dev/null +++ b/utilities/bcppmake/mod2vpl.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_ +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=RWP ./ 3 2 abc +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/mod2zmod.bdsproj b/utilities/bcppmake/mod2zmod.bdsproj new file mode 100644 index 0000000..84040df --- /dev/null +++ b/utilities/bcppmake/mod2zmod.bdsproj @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 5 + _ICU_;_ICUSWORD_;USBINARY + _ICU_;_ICUSWORD_;USBINARY;_DEBUG + _ICU_;_ICUSWORD_ + _ICU_;_ICUSWORD_;_DEBUG + _DEBUG + + + $(BCB)\source\vcl + + + KJV ./ 3 2 abc + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + mod2zmod.bpf + + + diff --git a/utilities/bcppmake/mod2zmod.bpf b/utilities/bcppmake/mod2zmod.bpf new file mode 100644 index 0000000..4e5b2f5 --- /dev/null +++ b/utilities/bcppmake/mod2zmod.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\mod2zmod.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/mod2zmod.bpr b/utilities/bcppmake/mod2zmod.bpr new file mode 100644 index 0000000..67a52b9 --- /dev/null +++ b/utilities/bcppmake/mod2zmod.bpr @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=5 +Item0=_ICU_;_ICUSWORD_;USBINARY +Item1=_ICU_;_ICUSWORD_;USBINARY;_DEBUG +Item2=_ICU_;_ICUSWORD_ +Item3=_ICU_;_ICUSWORD_;_DEBUG +Item4=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=KJV ./ 3 2 abc +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/osis2mod.bdsproj b/utilities/bcppmake/osis2mod.bdsproj new file mode 100644 index 0000000..33c9e37 --- /dev/null +++ b/utilities/bcppmake/osis2mod.bdsproj @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 1 + _DEBUG + + + $(BCB)\source\vcl + + + ./nasb nasb.xml + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + osis2mod.bpf + + + diff --git a/utilities/bcppmake/osis2mod.bpf b/utilities/bcppmake/osis2mod.bpf new file mode 100644 index 0000000..c8a2c8f --- /dev/null +++ b/utilities/bcppmake/osis2mod.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\osis2mod.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/osis2mod.bpr b/utilities/bcppmake/osis2mod.bpr new file mode 100644 index 0000000..457a4a9 --- /dev/null +++ b/utilities/bcppmake/osis2mod.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=./nasb nasb.xml +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/step2vpl.bdsproj b/utilities/bcppmake/step2vpl.bdsproj new file mode 100644 index 0000000..1310329 --- /dev/null +++ b/utilities/bcppmake/step2vpl.bdsproj @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 2 + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + step2vpl.bpf + + + diff --git a/utilities/bcppmake/step2vpl.bpf b/utilities/bcppmake/step2vpl.bpf new file mode 100644 index 0000000..6f6cce3 --- /dev/null +++ b/utilities/bcppmake/step2vpl.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\step2vpl.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/step2vpl.bpr b/utilities/bcppmake/step2vpl.bpr new file mode 100644 index 0000000..0c5961c --- /dev/null +++ b/utilities/bcppmake/step2vpl.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_ +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/stepdump.bdsproj b/utilities/bcppmake/stepdump.bdsproj new file mode 100644 index 0000000..7f74a93 --- /dev/null +++ b/utilities/bcppmake/stepdump.bdsproj @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 2 + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + stepdump.bpf + + + diff --git a/utilities/bcppmake/stepdump.bpf b/utilities/bcppmake/stepdump.bpf new file mode 100644 index 0000000..5ca67a5 --- /dev/null +++ b/utilities/bcppmake/stepdump.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\stepdump.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/stepdump.bpr b/utilities/bcppmake/stepdump.bpr new file mode 100644 index 0000000..62c43b3 --- /dev/null +++ b/utilities/bcppmake/stepdump.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_ +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/tei2mod.bpf b/utilities/bcppmake/tei2mod.bpf new file mode 100644 index 0000000..9ce2914 --- /dev/null +++ b/utilities/bcppmake/tei2mod.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\tei2mod.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/tei2mod.bpr b/utilities/bcppmake/tei2mod.bpr new file mode 100644 index 0000000..0691824 --- /dev/null +++ b/utilities/bcppmake/tei2mod.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=./nasb nasb.xml +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + diff --git a/utilities/bcppmake/utilities.bdsgroup b/utilities/bcppmake/utilities.bdsgroup new file mode 100644 index 0000000..278a47a --- /dev/null +++ b/utilities/bcppmake/utilities.bdsgroup @@ -0,0 +1,40 @@ + + + + + + + + + + + + + ..\..\..\icu-sword\as_is\borland\icuuc.bdsproj + ..\..\..\icu-sword\as_is\borland\icuin.bdsproj + ..\..\..\biblecs\apps\InstallMgr\libcurl.bdsproj + ..\..\..\biblecs\clucene\clucene.bdsproj + ..\..\lib\bcppmake\libsword.bdsproj + osis2mod.bdsproj + mod2zmod.bdsproj + mod2vpl.bdsproj + mkfastmod.bdsproj + imp2gbs.bdsproj + vpl2mod.bdsproj + imp2ld.bdsproj + imp2vs.bdsproj + mod2imp.bdsproj + cipherraw.bdsproj + step2vpl.bdsproj + stepdump.bdsproj + mod2osis.bdsproj + vs2osisref.bdsproj + diatheke.bdsproj + xml2gbs.bdsproj + installmgr.bdsproj + icuuc.lib icuin.lib libcurl.lib clucene.lib libsword.lib osis2mod.exe mod2zmod.exe mod2vpl.exe mkfastmod.exe imp2gbs.exe vpl2mod.exe imp2ld.exe imp2vs.exe mod2imp.exe cipherraw.exe step2vpl.exe stepdump.exe mod2osis.exe vs2osisref.exe diatheke.exe xml2gbs.exe installmgr.exe + + + + diff --git a/utilities/bcppmake/utilities.bpg b/utilities/bcppmake/utilities.bpg new file mode 100644 index 0000000..d5c0db4 --- /dev/null +++ b/utilities/bcppmake/utilities.bpg @@ -0,0 +1,113 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = icuuc.lib icuin.lib libcurl.lib clucene.lib libsword.lib \ + osis2mod.exe mod2zmod.exe mod2vpl.exe mkfastmod.exe imp2gbs.exe vpl2mod.exe \ + imp2ld.exe imp2vs.exe mod2imp.exe cipherraw.exe step2vpl.exe stepdump.exe \ + mod2osis.exe vs2osisref.exe xml2gbs.exe diatheke.exe installmgr.exe \ + tei2mod.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +mod2vpl.exe: mod2vpl.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +vpl2mod.exe: vpl2mod.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mkfastmod.exe: mkfastmod.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +cipherraw.exe: cipherraw.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +imp2gbs.exe: imp2gbs.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +imp2ld.exe: imp2ld.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +imp2vs.exe: imp2vs.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mod2zmod.exe: mod2zmod.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mod2imp.exe: mod2imp.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +stepdump.exe: stepdump.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +step2vpl.exe: step2vpl.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +mod2osis.exe: mod2osis.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +vs2osisref.exe: vs2osisref.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +libsword.lib: ..\..\lib\bcppmake\libsword.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +diatheke.exe: diatheke.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +icuuc.lib: ..\..\..\icu-sword\as_is\borland\icuuc.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +icuin.lib: ..\..\..\icu-sword\as_is\borland\icuin.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +xml2gbs.exe: xml2gbs.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +osis2mod.exe: osis2mod.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +tei2mod.exe: tei2mod.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +installmgr.exe: installmgr.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +clucene.lib: ..\..\..\biblecs\clucene\clucene.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +libcurl.lib: ..\..\..\biblecs\apps\InstallMgr\libcurl.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + + diff --git a/utilities/bcppmake/vpl2mod.bdsproj b/utilities/bcppmake/vpl2mod.bdsproj new file mode 100644 index 0000000..1c61323 --- /dev/null +++ b/utilities/bcppmake/vpl2mod.bdsproj @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 2 + _ICU_;_ICUSWORD_ + _DEBUG + + + $(BCB)\source\vcl + + + + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + vpl2mod.bpf + + + diff --git a/utilities/bcppmake/vpl2mod.bpf b/utilities/bcppmake/vpl2mod.bpf new file mode 100644 index 0000000..0eb123e --- /dev/null +++ b/utilities/bcppmake/vpl2mod.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\vpl2mod.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/vpl2mod.bpr b/utilities/bcppmake/vpl2mod.bpr new file mode 100644 index 0000000..4cde253 --- /dev/null +++ b/utilities/bcppmake/vpl2mod.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_ICU_;_ICUSWORD_ +Item1=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/vs2osisref.bdsproj b/utilities/bcppmake/vs2osisref.bdsproj new file mode 100644 index 0000000..e8867d6 --- /dev/null +++ b/utilities/bcppmake/vs2osisref.bdsproj @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 1 + _DEBUG + + + $(BCB)\source\vcl + + + Gen1:1 + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + vs2osisref.bpf + + + diff --git a/utilities/bcppmake/vs2osisref.bpf b/utilities/bcppmake/vs2osisref.bpf new file mode 100644 index 0000000..24f7f88 --- /dev/null +++ b/utilities/bcppmake/vs2osisref.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\vs2osisref.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/vs2osisref.bpr b/utilities/bcppmake/vs2osisref.bpr new file mode 100644 index 0000000..19db71e --- /dev/null +++ b/utilities/bcppmake/vs2osisref.bpr @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=Gen1:1 +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/bcppmake/xml2gbs.bdsproj b/utilities/bcppmake/xml2gbs.bdsproj new file mode 100644 index 0000000..d2d4ea3 --- /dev/null +++ b/utilities/bcppmake/xml2gbs.bdsproj @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + 4 + ..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..;..\..\include;$(BCB)\include;$(BCB)\include\vcl + ..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + + + 5 + ..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib + ..\;..;$(BCB)\lib\obj;$(BCB)\lib + ..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + ..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + + + 1 + $(BCB)\source\vcl + + + 3 + _ICU_;_ICUSWORD_ + _ICU_;_ICUSWORD_;_DEBUG + _DEBUG + + + $(BCB)\source\vcl + + + summatheologica.xml + + False + + + + + + + False + + False + + True + False + + + + $00000000 + + + + + + + + + + + xml2gbs.bpf + + + diff --git a/utilities/bcppmake/xml2gbs.bpf b/utilities/bcppmake/xml2gbs.bpf new file mode 100644 index 0000000..0f2437d --- /dev/null +++ b/utilities/bcppmake/xml2gbs.bpf @@ -0,0 +1,11 @@ +USEUNIT("..\xml2gbs.cpp"); +USELIB("..\..\..\icu-sword\as_is\borland\icuin.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib"); +USELIB("..\..\..\icu-sword\as_is\borland\icuuc.lib"); +USELIB("..\..\lib\libsword.lib"); +USELIB("..\..\..\biblecs\clucene\clucene.lib"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +main \ No newline at end of file diff --git a/utilities/bcppmake/xml2gbs.bpr b/utilities/bcppmake/xml2gbs.bpr new file mode 100644 index 0000000..7ba1477 --- /dev/null +++ b/utilities/bcppmake/xml2gbs.bpr @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\utilities;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\include;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\utilities;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\lib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\utilities;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=3 +Item0=_ICU_;_ICUSWORD_ +Item1=_ICU_;_ICUSWORD_;_DEBUG +Item2=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=summatheologica.xml +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/utilities/cipherraw.cpp b/utilities/cipherraw.cpp new file mode 100644 index 0000000..16aee18 --- /dev/null +++ b/utilities/cipherraw.cpp @@ -0,0 +1,104 @@ +#include +#include +#include +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include +#include +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +int main(int argc, char **argv) { + SWCipher *zobj; + VerseKey key; + RawVerse *rawdrv; + int ofd[2], oxfd[2]; + long tmpoff = 0, offset, loffset = 0, lzoffset = 0; + unsigned short size, lsize = 0, lzsize; + char *tmpbuf; + + if (argc != 3) { + fprintf(stderr, "usage: %s \"\"\n", argv[0]); + exit(1); + } + + rawdrv = new RawVerse(argv[1]); + zobj = new SWCipher((unsigned char *)argv[2]); + + tmpbuf = new char [ strlen(argv[1]) + 11 ]; + sprintf(tmpbuf, "%sot.zzz", argv[1]); + ofd[0] = FileMgr::createPathAndFile(tmpbuf); + sprintf(tmpbuf, "%sot.zzz.vss", argv[1]); + oxfd[0] = FileMgr::createPathAndFile(tmpbuf); + sprintf(tmpbuf, "%snt.zzz", argv[1]); + ofd[1] = FileMgr::createPathAndFile(tmpbuf); + sprintf(tmpbuf, "%snt.zzz.vss", argv[1]); + oxfd[1] = FileMgr::createPathAndFile(tmpbuf); + + delete [] tmpbuf; + + printf("\n"); + write(oxfd[0], &lzoffset, 4); + write(oxfd[0], &lzsize, 2); + write(oxfd[1], &lzoffset, 4); + write(oxfd[1], &lzsize, 2); + + key.AutoNormalize(0); + key.Headings(1); + for (key.Index(0); (!key.Error()); key++) { + rawdrv->findOffset(key.Testament(), key.Index(), &offset, &size); + printf("%s: OLD offset: %ld; size: %d\n", (const char *)key, offset, size); + + if ((offset == loffset) && (size == lsize)) { + printf("using previous offset,size %d\n", size); + offset = lseek(oxfd[key.Testament() - 1], 0, SEEK_CUR); + printf("%ld %ld %d \n", offset, lzoffset, lzsize); + write(oxfd[key.Testament() - 1], &lzoffset, 4); + write(oxfd[key.Testament() - 1], &lzsize, 2); + } + else { + lsize = size; + loffset = offset; + + if (size) { + SWBuf tmpbuf; + rawdrv->readText(key.Testament(), offset, size, tmpbuf); + zobj->Buf(tmpbuf.c_str(), size); + unsigned long ulSize = size; + zobj->cipherBuf(&ulSize); + size = (unsigned int)ulSize; + } + offset = lseek(ofd[key.Testament() - 1], 0, SEEK_CUR); + tmpoff = lseek(oxfd[key.Testament() - 1], 0, SEEK_CUR); + printf("%s: (%ld) NEW offset: %ld; size: %d\n", (const char *)key, tmpoff, offset, size); + write(oxfd[key.Testament() - 1], &offset, 4); + unsigned long ulSize = size; + if (size) + write(ofd[key.Testament() - 1], zobj->cipherBuf(&ulSize), size); + size = (unsigned int)ulSize; + lzoffset = offset; + write(oxfd[key.Testament() - 1], &size, 2); + lzsize = size; + } + } + delete zobj; + close(ofd[0]); + close(oxfd[0]); + close(ofd[1]); + close(oxfd[1]); + return 0; +} diff --git a/utilities/diatheke/.cvsignore b/utilities/diatheke/.cvsignore new file mode 100644 index 0000000..f5ce63f --- /dev/null +++ b/utilities/diatheke/.cvsignore @@ -0,0 +1,5 @@ +.deps +.libs +Makefile +Makefile.in +diatheke diff --git a/utilities/diatheke/Makefile.am b/utilities/diatheke/Makefile.am new file mode 100644 index 0000000..51a30c6 --- /dev/null +++ b/utilities/diatheke/Makefile.am @@ -0,0 +1,24 @@ +AUTOMAKE_OPTIONS = 1.6 + +INCLUDES = -I$(top_srcdir)/include + +bin_PROGRAMS = diatheke + +diatheke_SOURCES = diatheke.cpp corediatheke.cpp diathekemgr.cpp \ + diafiltmgr.cpp thmlcgi.cpp gbfcgi.cpp osiscgi.cpp + +if ICU +iculibs = -licui18n -licuuc +endif + +if USELUCENE +lucenelibs = -lclucene +endif + +diatheke_LDADD = $(top_builddir)/lib/libsword.la \ + $(iculibs) $(lucenelibs) + +noinst_HEADERS = corediatheke.h diafiltmgr.h diathekemgr.h gbfcgi.h thmlcgi.h \ + osiscgi.h + +include cgi/Makefile.am diff --git a/utilities/diatheke/Makefile.in b/utilities/diatheke/Makefile.in new file mode 100644 index 0000000..36d4273 --- /dev/null +++ b/utilities/diatheke/Makefile.in @@ -0,0 +1,521 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = diatheke$(EXEEXT) +DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/cgi/Makefile.am +subdir = utilities/diatheke +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_clucene.m4 \ + $(top_srcdir)/m4/cppunit.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_diatheke_OBJECTS = diatheke.$(OBJEXT) corediatheke.$(OBJEXT) \ + diathekemgr.$(OBJEXT) diafiltmgr.$(OBJEXT) thmlcgi.$(OBJEXT) \ + gbfcgi.$(OBJEXT) osiscgi.$(OBJEXT) +diatheke_OBJECTS = $(am_diatheke_OBJECTS) +am__DEPENDENCIES_1 = +diatheke_DEPENDENCIES = $(top_builddir)/lib/libsword.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(diatheke_SOURCES) +DIST_SOURCES = $(diatheke_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUCENE_CXXFLAGS = @CLUCENE_CXXFLAGS@ +CLUCENE_LIBS = @CLUCENE_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_CONFIG = @CPPUNIT_CONFIG@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CURL_AM_CFLAGS = @CURL_AM_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GENCCODE = @GENCCODE@ +GENCMN = @GENCMN@ +GENRB = @GENRB@ +GREP = @GREP@ +ICU_CONFIG = @ICU_CONFIG@ +ICU_IOLIBS = @ICU_IOLIBS@ +ICU_LIBS = @ICU_LIBS@ +ICU_VER = @ICU_VER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGDATA = @PKGDATA@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML_LIBS = @XML_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dir_confdef = @dir_confdef@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_debug = @enable_debug@ +enable_profile = @enable_profile@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_mingw32 = @target_mingw32@ +target_os = @target_os@ +target_system = @target_system@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_conf = @with_conf@ +with_icu = @with_icu@ +with_zlib = @with_zlib@ +AUTOMAKE_OPTIONS = 1.6 +INCLUDES = -I$(top_srcdir)/include +diatheke_SOURCES = diatheke.cpp corediatheke.cpp diathekemgr.cpp \ + diafiltmgr.cpp thmlcgi.cpp gbfcgi.cpp osiscgi.cpp + +@ICU_TRUE@iculibs = -licui18n -licuuc +@USELUCENE_TRUE@lucenelibs = -lclucene +diatheke_LDADD = $(top_builddir)/lib/libsword.la \ + $(iculibs) $(lucenelibs) + +noinst_HEADERS = corediatheke.h diafiltmgr.h diathekemgr.h gbfcgi.h thmlcgi.h \ + osiscgi.h + +swcgidir = $(top_srcdir)/utilities/diatheke/cgi +EXTRA_DIST = $(swcgidir)/dia-def.pl $(swcgidir)/diatheke.pl \ + $(swcgidir)/index-private.html $(swcgidir)/index-public.html +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/cgi/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign utilities/diatheke/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign utilities/diatheke/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +diatheke$(EXEEXT): $(diatheke_OBJECTS) $(diatheke_DEPENDENCIES) + @rm -f diatheke$(EXEEXT) + $(CXXLINK) $(diatheke_OBJECTS) $(diatheke_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corediatheke.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diafiltmgr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diatheke.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diathekemgr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gbfcgi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osiscgi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thmlcgi.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/utilities/diatheke/README b/utilities/diatheke/README new file mode 100644 index 0000000..5f1a793 --- /dev/null +++ b/utilities/diatheke/README @@ -0,0 +1,76 @@ +Diatheke Suite release 4.0 +by Chris Little + +This suite is intended for use with libraries and modules from +the SWORD Project, available at http://www.crosswire.org/ + +The latest versions of this suite and its components are available +at http://www.crosswire.org/sword/diatheke + +Version 4.0 of this suite consists of the following components: + +Diatheke 4.0 - a command line utility, good for lots of stuff +Diatheke/CGI 4.0 - a PERL CGI module interface to Diatheke 4.0 + +-------------------------------------------------------------------- +INSTALLING Diatheke/CGI + +To install Diatheke/CGI, first install PERL and a webserver such as +Apache that is capable of running PERL CGIs. Installing mod_perl is +recommended for a speed improvement, but is by no means necessary. + +Then copy the two .pl files from the ./cgi directory of this +distribution into your cgi-bin directory. Modify the top of +diatheke.pl to reflect the correct location of your your diatheke +command line utility binary and the default font if necessary. The +CGI is now installed and ready for access. + +diatheke.pl is the main lookup script. dia-def.pl is a supplemental +script used to set a default Bible translation (saved on the +user's computer as a cookie). + +Two sample HTML files are included as sample interfaces for an +general Web-Bible gateway. index-public.html includes all currently +available free texts while index-private.html includes all currently +available texts, including those which are encrypted because +of copyright and distribution restrictions. In any case, you should +only use these as a guide, adding and subtracting modules depending +on which modules you have installed and have permission to publish +on the internet or your intranet. The bottom section of each file +includes an example call to the dia-def.pl script to set a default +Bible version. + +You may also direct users directly to your perl script since it will +present a page with all of your modules. Or you may wish to use this +default page to create a custom index.html for your users. + +---------------------------------------------------------------------- +VERSION HISTORY + +4.0 July 8, 2001. + Updated to Sword 1.5.2 with innumerable bug fixes. + Now builds properly for Win32 using VC++. + Diatheke/Tcl and HANDiatheke were omitted, for the moment + from this release, but are still available in the CVS. + +3.0 March 31, 2001. + Self-generating HTML page for the lazy (Diatheke/CGI). + Localization support. (Diatheke and Diatheke/CGI). + +2.5 Now supports ThML. Numerous bugfixes. December 10, 2000. + Includes Diatheke 3.0, Diatheke/CGI 3.0, Diatheke/Tcl 3.0, + and HANDiatheke 3.0 (initial version, but version-synced) + +2.0 First public release, including Diatheke 2.0, Diatheke/CGI + 2.0, and Diatheke/Tcl 2.5. October 23, 1999. + +----------------------------------------------------------------------- +COPYRIGHT + +The Diatheke Suite and its components, Diatheke, Diatheke/CGI, and +Diatheke/Tcl are Copyright 1999, 2000, 2001 by CrossWire Bible Society. +HANDiatheke is Copyright 2000, 2001 by CrossWire Bible Society. +The Diatheke Suite and all of its components are licensed through +the GNU General Public License and are intended for free distribution. +See http://www.gnu.org/copyleft/gpl.html for details. + diff --git a/utilities/diatheke/cgi/Makefile.am b/utilities/diatheke/cgi/Makefile.am new file mode 100644 index 0000000..237aefd --- /dev/null +++ b/utilities/diatheke/cgi/Makefile.am @@ -0,0 +1,6 @@ +swcgidir = $(top_srcdir)/utilities/diatheke/cgi + +EXTRA_DIST = $(swcgidir)/dia-def.pl +EXTRA_DIST += $(swcgidir)/diatheke.pl +EXTRA_DIST += $(swcgidir)/index-private.html +EXTRA_DIST += $(swcgidir)/index-public.html diff --git a/utilities/diatheke/cgi/dia-def.pl b/utilities/diatheke/cgi/dia-def.pl new file mode 100755 index 0000000..e2f1d4f --- /dev/null +++ b/utilities/diatheke/cgi/dia-def.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl + +#change this variable to hostname of your server +@values = split(/\&/,$ENV{'QUERY_STRING'}); +$DOMAIN = $ENV{'REMOTE_ADDR'}; +$EXPIRES = 'Fri Dec 31 23:59:00 GMT 2005'; + +foreach $i (@values) { + ($varname, $mydata) = split(/=/,$i); + if ($varname eq "defversion") { + $COOKIE = "DEFTRANS=$mydata ; expires=$EXPIRES"; + } + elsif ($varname eq "locale") { + $COOKIE = "LOCALE=$mydata ; expires=$EXPIRES"; + } + elsif ($varname eq "settrans") { + $COOKIE = "SETTRANS=$mydata ; expires=$EXPIRES"; + } + elsif ($varname eq "setcomm") { + $COOKIE = "SETCOMM=$mydata ; expires=$EXPIRES"; + } + elsif ($varname eq "setld") { + $COOKIE = "SETLD=$mydata ; expires=$EXPIRES"; + } +} + +# Set the cookie and send the user the thank you page. +print "Set-cookie: $COOKIE\n"; +print "Content-type: text/html\n\n"; #Note extra newline to mark + #end of header. + +print ""; + + + + + + + + + diff --git a/utilities/diatheke/cgi/diatheke.pl b/utilities/diatheke/cgi/diatheke.pl new file mode 100755 index 0000000..ee36f11 --- /dev/null +++ b/utilities/diatheke/cgi/diatheke.pl @@ -0,0 +1,509 @@ +#!/usr/bin/perl + +# Typical Linux/Unix settings +$err = "2> /dev/null"; +$sword_path = "/home/sword"; # SWORD_PATH environment variable you want to use +$diatheke = "nice /usr/bin/diatheke"; # location of diatheke command line program + +# Typical Windows settings +#$err = ""; +#$sword_path = "C:\\Program Files\\CrossWire\\The SWORD Project"; # SWORD_PATH environment variable you want to use +#$diatheke = "$sword_path\\diatheke.exe"; # location of diatheke command line program + +$cgiurl = "http:\/\/www.crosswire.org\/cgi-bin"; + +$scriptname = "diatheke.pl"; +$defaultfontface = "Times New Roman, Times, Roman, serif"; # default font name +$maxverses = 50; # maximum number of verses diatheke will return per query (prevents people from asking for Gen1:1-Rev22:21) +$defaultbook = "KJV"; # book to query when none is selected, but a verse/search is entered +$deflocale = "abbr"; # this is just the default for cases where user has not selected a locale and his browser does not reveal one -- you can also set locale using locale= in the GET URL + +############################################################################### +## You should not need to edit anything below this line. +## Unless you want to modify functionality of course. :) +############################################################################### + +$version = "4.2"; + +sub shell_escape { + my $input = shift; + my $result = ''; + + foreach my $i (split //, $input) { + if ($i eq "'") { + $result .= "'\\''"; + } else { + $result .= $i; + } + } + return $result; +} + + +sub plussifyaddress { + ($p_ver = @_[0]) =~ tr/ /+/; + $p_newline = ""; + return $p_newline; +} + +sub urlvers { + $u_verse = @_[0]; + $u_version = @_[1]; + $u_oldverse = $u_verse; + $u_verse =~ tr/ /+/; + $u_newline = "$u_oldverse"; + return $u_newline; +} + +$ENV{'SWORD_PATH'} = $sword_path; + +print "Content-type: text/html\n\n"; + + +if ($ENV{'HTTP_COOKIE'}) { + + $cookie = $ENV{'HTTP_COOKIE'}; + $cookie =~ s/\; /=/g; + %cookiedata = split(/=/, $cookie); + + $defversion = $cookiedata{DEFTRANS}; + $locale = $cookiedata{LOCALE}; +} + +if ($defversion eq "") { + $defversion = 'KJV'; +} +if ($locale eq "") { + $locale = $ENV{'HTTP_ACCEPT_LANGUAGE'}; + $locale =~ s/(..).*/$1/; + if ($locale eq "") { + $locale = $deflocale; + } + elsif ($locale eq "en") { + $locale = "abbr"; + } +} + +$locale = shell_escape($locale); +$hostname = $ENV{'REMOTE_ADDR'}; +@values = split(/\&/,$ENV{'QUERY_STRING'}); +$n = 0; +$palm = 0; + +$latinxlit = ""; + +$optionfilters = ""; +$debug=1; +foreach $i (@values) { + ($varname, $mydata) = split(/=/,$i); + if ($varname ne "Submit" && $varname ne "lookup") { + if ($varname eq "verse") { + $verse = $mydata; + $verse =~ tr/+/ /; + $verse =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; + $verse = shell_escape($verse); + } + elsif ($varname eq "search" && $mydata ne "" && $mydata ne "off") { + $search = "-s '" . shell_escape($mydata) . "'"; + } + elsif ($varname eq "range" && $mydata ne "" && $mydata ne "off") { + $range = $mydata; + $range =~ tr/+/ /; + $range =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; + $range = "-r \"$range\""; + $range = shell_escape($range); + } + + elsif ($varname eq "strongs") { + $optionfilters .= "n"; + } + elsif ($varname eq "footnotes") { + $optionfilters .= "f"; + } + elsif ($varname eq "headings") { + $optionfilters .= "h"; + } + elsif ($varname eq "morph") { + $optionfilters .= "m"; + } + elsif ($varname eq "hebcant") { + $optionfilters .= "c"; + } + elsif ($varname eq "hebvowels") { + $optionfilters .= "v"; + } + elsif ($varname eq "grkacc") { + $optionfilters .= "a"; + } + elsif ($varname eq "lemmas") { + $optionfilters .= "l"; + } + elsif ($varname eq "scriprefs") { + $optionfilters .= "s"; + } + elsif ($varname eq "arshape") { + $optionfilters .= "r"; + } + elsif ($varname eq "bidi") { + $optionfilters .= "b"; + } + + elsif ($varname eq "latinxlit") { + $latinxlit = "-t Latin"; + } + + elsif ($varname eq "palm") { + $palm = 1; + } + elsif ($varname eq "debug") { + $debug = 1; + } + elsif ($varname eq "locale") { + $locale = shell_escape($mydata); + } + elsif ($varname eq "maxverses") { + $maxverses = shell_escape($mydata); + } + elsif ($mydata eq "on" || $mydata eq "ON") { + $versions[$n] = shell_escape($varname); + $n++; + } + } +} +if ($optionfilters ne "") { + $optionfilters = "-o " . $optionfilters; +} + + + +if ($n == 0) { + $versions[0] = $defaultbook; + $n++; +} + +if ($verse eq "") { + + @versionlist = `$diatheke -b system -k modulelist $err`; + @versionlist2 = @versionlist; + @localelist = `$diatheke -b system -k localelist $err`; + + print < + + +Diatheke Online Bible + + + + +
+

Verse/Commentary Lookup                                                                 + Verse or Search key:
+ Phrase Search
+ Multiple Word Search
+ Regular Expression Search
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ Custom Range Restriction + + +
+ +
+ + Show Strong's Numbers + + Show Section Headings
+ + Show Footnotes + + Show Scripture Cross-References
+ + Show Morphology + + Show Hebrew Vowels
+ + Show Lemmas + + Show Hebrew Cantillation + Marks
+ + Latin Transliterate + + + Show Greek Accents +
+
+ +DEF1 + + foreach $line (@versionlist) { + chomp($line); + + if ($line eq "Biblical Texts:") { + print ""; + } + elsif ($line eq "Commentaries:") { + print ""; + } + elsif ($line eq "Dictionaries:") { + print ""; + } + else { + $line =~ s/([^:]+) : (.+)/
Biblical Texts:
Commentaries:
Dictionaries & Lexica:
$2 ($1)<\/font><\/td><\/tr>/; + print "$line\n"; + } + + } + + print < + + +
+ Select default Bible version for cross-references: 

Select locale:  + +
+ + +DEF4 + +} +else { + + + +if ($palm == 0) { +print < +Diatheke Interlinear Bible + + + + + + + + + + +END +} +else { +print < +HANDiatheke + + + + + +END +} +for ($i = 0; $i < $n; $i++) { + + $line = "$diatheke $search $range $optionfilters $latinxlit -l '$locale' -m '$maxverses' -f cgi -b '$versions[$i]' -k '$verse' $err"; + + if ($debug) { + print "
command line: $line\n

"; + } + $line = `$line`; + + chomp($line); + + $line =~ s/!DIATHEKE_URL!/$scriptname\?/g; + +# Parse and link to Strong's references if present + + $info = `$diatheke -b info -k '$versions[$i]' $err`; + $info =~ /([^\;]+)\;([^\;]+)/; + $format = $1; + $type = $2; + + if ($versions[$i] eq "StrongsHebrew") { + $line =~ s/(see HEBREW for )([0-9]+)/$1$2\<\/a\>/g; + } + elsif($versions[$i] eq "StrongsGreek") { + $line =~ s/(see GREEK for )([0-9]+)/$1$2\<\/a\>/g; + } + #case for searches + elsif($search ne "") { + $line =~ s/([^<]+)<\/entry>/urlvers($1, $versions[$i])/eg; + } + #case for non-ThML, non-Bible texts + elsif($type ne "Biblical Texts") { + $book = $verse; + $book =~ s/^([A-Za-z0-9]+) [0-9]+:[0-9]+.*/$1/; + $chapter = $verse; + $chapter =~ s/[A-Za-z0-9]+ ([0-9]+):[0-9]+.*/$1/; + $line =~ s/\#*([1-9]*[A-Z][a-z]+\.*) ([0-9]+):([0-9]+-*,*[0-9]*)\|*/$1 $2:$3\<\/a\>/g; + $line =~ s/\#([0-9]+):([0-9]+-*,*[0-9]*)\|*/$book $1:$2\<\/a\>/g; + $line =~ s/\#([0-9]+-*,*[0-9]*)\|*/$book $chapter:$1\<\/a\>/g; + } + + if ($locale ne "abbr") { + $line =~ s/href=\"$scriptname([^\"]+)\"/href=\"$scriptname$1&locale=$locale\"/g; + } + if ($palm == 1) { + $line =~ s/href=\"$scriptname([^\"]+)\"/href=\"$cgiurl\/$scriptname$1&palm=on\"/g; + } + + print "$line

\n"; +} + +if ($palm == 1) { + print "
Powered by Diatheke (http:\/\/www.gotjesus.org\/sword\/diatheke) and the SWORD Project (http:\/\/www.crosswire.org\/sword)."; +} + +print "



"; + +} + + diff --git a/utilities/diatheke/cgi/index-private.html b/utilities/diatheke/cgi/index-private.html new file mode 100644 index 0000000..6afbc91 --- /dev/null +++ b/utilities/diatheke/cgi/index-private.html @@ -0,0 +1,1264 @@ + + + +Diatheke Online Bible + + + + +
+

Verse or Search key: + + + +
+
+ + Verse/Commentary Lookup
+ + Phrase Search
+ + Multiple Word Search
+ + Regular Expression Search
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + Show Strong's Numbers + + Show Section Headings
+ + Show Footnotes + + Show Scripture Cross-References
+ + Show Morphology + + Show Hebrew Vowels
+ + Show Lemmas + + Show Hebrew Cantillation + Marks
+ + Latin Transliterate + + + Show Greek Accents +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
English Biblical + Texts:
+
Non-English + Biblical Texts:
+ + American King James + Version (AKJV) + + Albanian Bible (ALB) +
+ + Analytical-Literal + Translation (ALT) + + 1953 Afrikaans Bybel + (Afr1953)
+ + 1901 American Standard + Version (ASV) + + 1983 Afrikaans Bybel + (Afr1983)
+ + 1965 Bible in Basic + English (BBE) + + Smith & Van Dyke Arabic + Bible (AraSVD)
+ + Bible in Worldwide + English (BWE) + + Chinese Glory Union + Bible (ChiGU)
+ + Brenton's English Translation + of the Septuagint (Brenton) + + Czech Bible Kralicka + (CzeBKR)
+ + The Common Edition: + New Testament (Common) + + Czech Ekumenicky Cesky + preklad (CzeCEP)
+ + Douay-Rheims Bible + (DR) + + Czech Preklad KMS Nova + smlouva (CzeKMS)
+ + Douay-Rheims 1899 American + Edition (DRA) + + Czech Nova kralicka + Bible (CzeNKB)
+ + 1889 Darby Bible (Darby) + + + Danske Bibel (Dan) +
+ + GOD'S WORD Translation + (GodsWord) + + Dutch Leidse Vertaling + (DutLEI)
+ + Hebrew Names Version + of the World English Bible (HNV) + + Dutch Lutherse Vertaling + (DutLU)
+ + Interlinear Greek New + Testament (IGNT) + + Dutch Netherlands Bijbelgenootschap + Vertaling 1951 (DutNBG)
+ + International Standard + Version (ISV) + + Dutch PALM-editie NT + (DutPALM)
+ + Jewish Publication + Society Old Testament (JPS) + + Dutch Statenvertaling + (DutSVV)
+ + 21st Century King James + Version (KJ21) + + Equadorian Shuar NT + (EquShr)
+ + King James Version + of 1611 w/ Strongs Numbers (KJV) + + Esperanto Bible (Esperanto)
+ + Green's Literal Translation + (LITV) + + Finnish 1938 PhyZ Raamattu + (FinPR)
+ + The Living Oracles + NT (LO) + + French Bible en francais + courant, edition revisee (FreBFC)
+ + Green's Modern King + James Version (MKJV) + + French Bible de Jerusalem + (FreBJ)
+ + Montgomery New Testament + (Montgomery) + + French Haitian Creole + Version (FreCrl)
+ + James Murdock's Translation + of the Syriac Peshitta (Murdock) + + French Darby Version + (FreDrb)
+ + New American Bible + (NAB) + + French 1910 Louis Segond + (FreLSG)
+ + New American Standard + Bible (NASB) + + French Nouvelle Edition + de Geneve 1979 (FreNEG)
+ + New American Standard + Bible 1995 Update (NASB95) + + French Traduction oecumenique + de la Bible (FreTOB)
+ + New Century Version + (NCV) + + German Bengel NT (GerBen)
+ + New International Version + (NIV) + + German Einheitsuebersetzung + der Heilegen Schrift (GerEin)
+ + New International Version, + British Edition (NIVBr) + + German Darby Unrevidierte + Elberfelder 1905 (GerElb)
+ + New Jerusalem Bible + (NJB) + + German 1912 Luther + (GerLut)
+ + New King James Version + (NKJV) + + German 1545 Luther + (GerLut1545)
+ + New Living Translation + (NLT) + + German Elberfelder + Bibel revidierte Fassung 1993 (GerRElb)
+ + New Revised Standard + Version (NRSV) + + German Revised Lutherbibel + 1984 (GerRLut)
+ + The Orthodox Jewish + Brit Chadasha (ORTHJBC) + + German 1951 Schlachter + Bibel (GerSch)
+ + J B Phillips New Testament + (Phillips) + + Gothic Codex Ambr. + A & Mss. (GothicA)
+ + Restored Name King + James Version (RNKJV) + + Gothic Codex Ambr. + B & Car. (GothicB)
+ + Revised Standard Version + (RSV) + + Hungarian Karoli (HunKar)
+ + Revised 1833 Webster + Version (RWebster) + + Icelandic Bible (Icelandic)
+ + The Emphasized Bible + by J. B. Rotherham (Rotherham) + + Indonesian Bahasa Indonesia + Sehari-hari (IndBIS)
+ + Todays English Version + (Good News Bible) 1966 and 1976 (TEV) + + Indonesian Terjemahan + Baru (IndTB)
+ + Third Millenium Bible + (TMB) + + Indonesian Terjemahan + Baru (IndTL)
+ + Twentieth Century New + Testament (Twenty) + + Italian NVB Nuovissima + Versione della Bibbbia San Paolo Edizione (ItaIEP)
+ + World English Bible + (WEB) + + Italian 1991 La Nuova + Diodati (ItaLND)
+ + Webster Bible (Websters) + + + Italian 1994 La Sacra + Bibbia Nuova Riveduta (ItaNRV)
+ + 1912 Weymouth NT (Weymouth) + + + Japanese JKUG Translation + (JapKUG)
+ + 1898 Young's Literal + Translation (YLT) + + Japanese JSNKI Translation + (JapSNKI)
  + + Ketchi Bible (Ketchi)
Unorthodox or + Heretical Biblical Texts: + + Korean Bible (Korean)
+ + Concordant Literal + New Testament (CLNT) + + Latvian New Testament + (Latvian)
+ + The Emphatic Diaglott + (Diaglott) + + Manx Gaelic Scripture + Portions (ManxGaelic)
+ + Joseph Smith Translation + (JST) + + Maori Bible (Maori)
+ + Revised Version, Improved + and Corrected (RVIC) + + Melanesian Pidgin Bible + (Mel)
  + + Norwegian 1930 Bokmal + (NorBok)
Original Language + Biblical Texts: + + Norwegian 1938 Nynorsk + (NorN38)
+ + Septuagint (LXX) + + Norwegian Bibel Konkordant + (NorNBK)
+ + Septuagint, Morphologically + Tagged Rahlfs' (LXXM) + + Norwegian 1994 Nynorsk + (NorNyn)
+ + Nestle Aland 27th Ed./ + UBS 4th Ed. Greek Text (N27U4) + + Norsk Bibelen (Norsk)
+ + Biblia Hebraica Stuttgartensia + (BHS) + + Philippine Nga Cebuano + (PhiCEB)
+ + 1991 Byzantine/Majority + Text (Byz) + + Polish Millenium Bible + 1984, 4th Ed. (PolBTP)
+ + 1894 Scrivener Textus + Receptus (Scrivner) + + Portuguese Joao Ferreira + de Almeida Atualizada (PorAA)
+ + 1550 Stephanus Textus + Receptus (Stephanus) + + Brazillian Portuguese + Joao Ferreira de Almeida, Corrigada Fiel 1995 (PorACF)
+ + Tischendorf's Eighth + Edition GNT (Tisch) + + Portuguese 1994 Almeida + Biblia (PorBRP)
+ + Latin Vulgate (Vulgate) + + Portuguese Almeida + Revista e Atualizada (PorRA)
+ + Latin Vulgate Psalms + from Hebrew (Vulgate_HebPs) + + Portuguese Almeida + Revista e Corrigida (PorRC)
+ + 1881 Westcott-Hort + Greek Text (WH) + + Russian Synodal Translation + (RST)
+ + Westcott-Hort with + NA27U4 variants (WHNU) + + Romanian Cornilescu + Version (RomCor)
  + + Romani (Gypsy) New + Testament (Romani)
Commentaries: + + Le Sainte Bible en + sango, 1996 (Sango)
+ + KJV Audio Bible read + by James Scourby (AudioKJV) + + Scots Gaelic Gospel + of Mark (ScotsGaelic)
+ + Barnes' New Testament + Notes (Barnes) + + Spanish La Biblia de + Las Americas (SpaLBA)
+ + Adam Clarke's Commentary + on the Bible (Clarke) + + Spanish Reina-Valera + (SpaRV)
+ + Darby Translation Notes + (DTN) + + Spanish Reina-Valera + Revised 1960 (SpaRV60)
+ + Family Bible Notes + (Family) + + Spanish Reina-Valera + Update 1995 (SpaRV95)
+ + Geneva Bible Translation + Notes (Geneva) + + Spanish Version Reina-Valera + Actualizada (SpaRVA)
+ + John Gill's Expositor + (Gill) + + Spanish 1569 Sagradas + Escrituras Version Antigua (SpaSEV)
+ + Jamieson Fausset Brown + Bible Commentary (JFB) + + Spanish 1858 Valera + New Testament (SpaVNT)
+ + Matthias Ansorgs Kommentar + (MAK) + + Swahili New Testament + (Swahili)
+ + Matthew Henry's Complete + Commentary on the Whole Bible (MHC) + + Swedish Bible 1917 + New Testament (SweSVE)
+ + Matthew Henry's Concise + Commentary on the Whole Bible (MHCC) + + Tagalog (John & James) + (Tagalog)
+ + The People's New Testament + (PNT) + + Tamil Bible (Tamil) +
+ + Personal Commentary + (Personal) + + Thai KJV (ThaiKJV) +
+ + Robertson's Word Pictures + (RWP) + + Turkish NT (Turkish) +
+ + Carl Heinrich Riegers + Kommentar (Rieger) + + Unaccented Modern Greek + Text (UMGreek)
+ + C. H. Spurgeon's Treasury + of David (TDavid) + + Ukrainian Bible (Ukrainian)
+ + The Fourfold Gospel + and Commentary on Acts of Apostles (TFG) + + Uma New Testament (Uma)
+ + Treasury of Scriptural + Knowledge (TSK) + + 1934 Vietnamese Bible + (Viet)
+ + John Wesley's Notes + on the Bible (Wesley) + + Xhosa Bible (Xhosa)
  
Dictionaries + & Lexica:Daily Devotionals: +
+ + American Tract Society + Bible Dictionary (AmTract) + + Jonathan Bagster's + Daily Light on the Daily Path (Daily)
+ + Brown-Driver-Briggs + Hebrew Lexicon (BDB) + + C. H. Spurgeon's Morning + and Evening: Daily Readins (SME)
+ + Easton's Bible Dictionary + (Eastons) + + 1989 Losung auf deutsch + (losung_de_89)
+ + Hitchcock's Bible Names + (Hitchcocks) + + 1990 Losung auf deutsch + (losung_de_90)
+ + International Standard + Bible Encyclopedia (ISBE) + + 1991 Losung auf deutsch + (losung_de_91)
+ + Nave's Topical Bible + (Naves) + + 1992 Losung auf deutsch + (losung_de_92)
+ + Packard's Morphological + Analysis Codes (Packard) + + 1993 Losung auf deutsch + (losung_de_93)
+ + Smith's Bible Dictionary + (Smiths) + + 1994 Losung auf deutsch + (losung_de_94)
+ + Strong's Greek Bible + Dictionary (StrongsGreek) + + 1995 Losung auf deutsch + (losung_de_95)
+ + Strong's Hebrew Bible + Dictionary (StrongsHebrew) + + 1996 Losung auf deutsch + (losung_de_96)
+ + Thayer's Greek Lexicon + (Thayer) + + 1997 Losung auf deutsch + (losung_de_97)
+ + R. A. Torrey's New + Topical Textbook (Torrey) + + 1998 Losung auf deutsch + (losung_de_98)
+ + Vines Bible Dictionary + (Vines) + + 1999 Losung auf deutsch + (losung_de_99)
+ + Webster's Revised Unabridged + Dictionary 1913 (WebstersDict) + + 1996 Watchwords (Losung) + in English (losung_en_96)
  + + 1997 Watchwords (Losung) + in English (losung_en_97)
  + + 1998 Watchwords (Losung) + in English (losung_en_98)
  + + 1999 Watchwords (Losung) + in English (losung_en_99)
  + + 1999 Watchwords (Losung) + en Castellano (losung_es_99)
  + + 1999 Watchwords (Losung) + in Dutch (losung_nl_99)
+

+ +
+ Select default Bible version for cross-references: 

Select locale:  + + +
+Many of these modules require a browser with good Unicode support such as Internet +Explorer 5.0+ and a good Unicode font such as Code 2000 (available at
http://home.att.net/~jameskass/). + + diff --git a/utilities/diatheke/cgi/index-public.html b/utilities/diatheke/cgi/index-public.html new file mode 100644 index 0000000..8406364 --- /dev/null +++ b/utilities/diatheke/cgi/index-public.html @@ -0,0 +1,883 @@ + + + +Diatheke Online Bible + + + + +
+

Verse or Search key: + + + +
+
+ + Verse/Commentary Lookup
+ + Phrase Search
+ + Multiple Word Search
+ + Regular Expression Search +
+

  + + + + + + + + + + + + + + + + + + + + + +
+ + Show Strong's Numbers + + Show Section Headings
+ + Show Footnotes + + Show Scripture Cross-References
+ + Show Morphology + + Show Hebrew Vowels
+ + Show Lemmas + + Show Hebrew Cantillation + Marks
+ + Latin Transliterate + + + Show Greek Accents +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
English Biblical + Texts:
+
Non-English + Biblical Texts:
+ + American King James + Version (AKJV) + + Albanian Bible (ALB) +
+ + 1901 American Standard + Version (ASV) + + Smith & Van Dyke Arabic + Bible (AraSVD)
+ + 1965 Bible in Basic + English (BBE) + + Chinese Glory Union + Bible (ChiGU)
+ + The Common Edition: + New Testament (Common) + + Czech Bible Kralicka + (CzeBKR)
+ + Douay-Rheims Bible + (DR) + + Czech Ekumenicky Cesky + preklad (CzeCEP)
+ + Douay-Rheims 1899 American + Edition (DRA) + + Czech Preklad KMS Nova + smlouva (CzeKMS)
+ + 1889 Darby Bible (Darby) + + + Czech Nova kralicka + Bible (CzeNKB)
+ + Hebrew Names Version + of the World English Bible (HNV) + + Danske Bibel (Dan) +
+ + Interlinear Greek New + Testament (IGNT) + + Esperanto Bible (Esperanto)
+ + International Standard + Version (ISV) + + Finnish 1938 PhyZ Raamattu + (FinPR)
+ + Jewish Publication + Society Old Testament (JPS) + + French Haitian Creole + Version (FreCrl)
+ + King James Version + of 1611 w/ Strongs Numbers (KJV) + + French 1910 Louis Segond + (FreLSG)
+ + The Living Oracles + NT (LO) + + German Bengel NT (GerBen)
+ + Montgomery New Testament + (Montgomery) + + German 1912 Luther + (GerLut)
+ + James Murdock's Translation + of the Syriac Peshitta (Murdock) + + German 1545 Luther + (GerLut1545)
+ + The Orthodox Jewish + Brit Chadasha (ORTHJBC) + + German 1951 Schlachter + Bibel (GerSch)
+ + Restored Name King + James Version (RNKJV) + + Gothic Codex Ambr. + A & Mss. (GothicA)
+ + Revised 1833 Webster + Version (RWebster) + + Gothic Codex Ambr. + B & Car. (GothicB)
+ + The Emphasized Bible + by J. B. Rotherham (Rotherham) + + Hungarian Karoli (HunKar)
+ + World English Bible + (WEB) + + Icelandic Bible (Icelandic)
+ + Webster Bible (Websters) + + + Indonesian Bahasa Indonesia + Sehari-hari (IndBIS)
+ + 1912 Weymouth NT (Weymouth) + + + Indonesian Terjemahan + Baru (IndTB)
+ + 1898 Young's Literal + Translation (YLT) + + Indonesian Terjemahan + Baru (IndTL)
  + + Italian 1991 La Nuova + Diodati (ItaLND)
Unorthodox or + Heretical Biblical Texts: + + Italian 1994 La Sacra + Bibbia Nuova Riveduta (ItaNRV)
+ + The Emphatic Diaglott + (Diaglott) + + Japanese JKUG Translation + (JapKUG)
+ + Joseph Smith Translation + (JST) + + Japanese JSNKI Translation + (JapSNKI)
  + + Ketchi Bible (Ketchi)
Original Language + Biblical Texts: + + Korean Bible (Korean)
+ + Septuagint (LXX) + + Latvian New Testament + (Latvian)
+ + Septuagint, Morphologically + Tagged Rahlfs' (LXXM) + + Manx Gaelic Scripture + Portions (ManxGaelic)
+ + Biblia Hebraica Stuttgartensia + (BHS) + + Maori Bible (Maori)
+ + 1991 Byzantine/Majority + Text (Byz) + + Melanesian Pidgin Bible + (Mel)
+ + 1894 Scrivener Textus + Receptus (Scrivner) + + Norsk Bibelen (Norsk)
+ + 1550 Stephanus Textus + Receptus (Stephanus) + + Portuguese Joao Ferreira + de Almeida Atualizada (PorAA)
+ + Tischendorf's Eighth + Edition GNT (Tisch) + + Russian Synodal Translation + (RST)
+ + Latin Vulgate (Vulgate) + + Romanian Cornilescu + Version (RomCor)
+ + Latin Vulgate Psalms + from Hebrew (Vulgate_HebPs) + + Scots Gaelic Gospel + of Mark (ScotsGaelic)
+ + 1881 Westcott-Hort + Greek Text (WH) + + Spanish Reina-Valera + (SpaRV)
+ + Westcott-Hort with + NA27U4 variants (WHNU) + + Spanish 1569 Sagradas + Escrituras Version Antigua (SpaSEV)
  + + Spanish 1858 Valera + New Testament (SpaVNT)
Commentaries: + + Swahili New Testament + (Swahili)
+ + Barnes' New Testament + Notes (Barnes) + + Swedish Bible 1917 + New Testament (SweSVE)
+ + Adam Clarke's Commentary + on the Bible (Clarke) + + Tagalog (John & James) + (Tagalog)
+ + Darby Translation Notes + (DTN) + + Thai KJV (ThaiKJV) +
+ + Family Bible Notes + (Family) + + Turkish NT (Turkish) +
+ + Geneva Bible Translation + Notes (Geneva) + + Unaccented Modern Greek + Text (UMGreek)
+ + Jamieson Fausset Brown + Bible Commentary (JFB) + + Ukrainian Bible (Ukrainian)
+ + Matthias Ansorgs Kommentar + (MAK) + + Uma New Testament (Uma)
+ + Matthew Henry's Complete + Commentary on the Whole Bible (MHC) + + 1934 Vietnamese Bible + (Viet)
+ + Matthew Henry's Concise + Commentary on the Whole Bible (MHCC) + + Xhosa Bible (Xhosa)
+ + The People's New Testament + (PNT) 
+ + Personal Commentary + (Personal)Daily Devotionals: +
+ + Robertson's Word Pictures + (RWP) + + Jonathan Bagster's + Daily Light on the Daily Path (Daily)
+ + Carl Heinrich Riegers + Kommentar (Rieger) + + C. H. Spurgeon's Morning + and Evening: Daily Readins (SME)
+ + C. H. Spurgeon's Treasury + of David (TDavid) + + 1989 Losung auf deutsch + (losung_de_89)
+ + The Fourfold Gospel + and Commentary on Acts of Apostles (TFG) + + 1990 Losung auf deutsch + (losung_de_90)
+ + Treasury of Scriptural + Knowledge (TSK) + + 1991 Losung auf deutsch + (losung_de_91)
+ + John Wesley's Notes + on the Bible (Wesley) + + 1992 Losung auf deutsch + (losung_de_92)
  + + 1993 Losung auf deutsch + (losung_de_93)
Dictionaries + & Lexica: + + 1994 Losung auf deutsch + (losung_de_94)
+ + American Tract Society + Bible Dictionary (AmTract) + + 1995 Losung auf deutsch + (losung_de_95)
+ + Brown-Driver-Briggs + Hebrew Lexicon (BDB) + + 1996 Losung auf deutsch + (losung_de_96)
+ + Easton's Bible Dictionary + (Eastons) + + 1997 Losung auf deutsch + (losung_de_97)
+ + Hitchcock's Bible Names + (Hitchcocks) + + 1998 Losung auf deutsch + (losung_de_98)
+ + International Standard + Bible Encyclopedia (ISBE) + + 1999 Losung auf deutsch + (losung_de_99)
+ + Nave's Topical Bible + (Naves) + + 1996 Watchwords (Losung) + in English (losung_en_96)
+ + Packard's Morphological + Analysis Codes (Packard) + + 1997 Watchwords (Losung) + in English (losung_en_97)
+ + Smith's Bible Dictionary + (Smiths) + + 1998 Watchwords (Losung) + in English (losung_en_98)
+ + Strong's Greek Bible + Dictionary (StrongsGreek) + + 1999 Watchwords (Losung) + in English (losung_en_99)
+ + Strong's Hebrew Bible + Dictionary (StrongsHebrew) + + 1999 Watchwords (Losung) + en Castellano (losung_es_99)
+ + Thayer's Greek Lexicon + (Thayer) + + 1999 Watchwords (Losung) + in Dutch (losung_nl_99)
+ + R. A. Torrey's New + Topical Textbook (Torrey) 
+ + Webster's Revised Unabridged + Dictionary 1913 (WebstersDict)  
+

+ +
+ Select default Bible version for cross-references: 

Select locale:  + + +
+Many of these modules require a browser with good Unicode support such as Internet Explorer 5.0+ and a good Unicode font such as Code 2000 (available at http://home.att.net/~jameskass/.) + + diff --git a/utilities/diatheke/corediatheke.cpp b/utilities/diatheke/corediatheke.cpp new file mode 100644 index 0000000..d691a2f --- /dev/null +++ b/utilities/diatheke/corediatheke.cpp @@ -0,0 +1,449 @@ +// Diatheke 4.2 by Chris Little +// Copyright 1999-2002 by CrossWire Bible Society +// http://www.crosswire.org/sword/diatheke +// Licensed under GNU General Public License (GPL) +// see accompanying LICENSE file for license details + +#include "corediatheke.h" +#include +#include +#include +#include +#include + +using std::list; +using std::cout; +using std::endl; +using std::ostream; + +void systemquery(const char * key, ostream* output){ + DiathekeMgr manager; + ModMap::iterator it; + + SWModule *target; + + bool types = false, descriptions = false, names = false; + + if (!::stricmp(key, "localelist")) { + LocaleMgr *lm = LocaleMgr::getSystemLocaleMgr(); + list loclist = lm->getAvailableLocales(); + list::iterator li = loclist.begin(); + for (;li != loclist.end(); li++) { + *output << li->c_str() << endl; + } + } + else if (!::stricmp(key, "modulelist")) { + types = true; + descriptions = true; + names = true; + } + else if (!::stricmp(key, "modulelistnames")) { + names = true; + } + else if (!::stricmp(key, "modulelistdescriptions")) { + descriptions = true; + } + + + if (types || descriptions || names) { + if (types) *output << "Biblical Texts:\n"; + for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { + target = it->second; + if (!strcmp(target->Type(), "Biblical Texts")) { + if (names) *output << target->Name(); + if (names && descriptions) *output << " : "; + if (descriptions) *output << target->Description(); + *output << endl; + } + } + if (types) *output << "Commentaries:\n"; + for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { + target = it->second; + if (!strcmp(target->Type(), "Commentaries")) { + if (names) *output << target->Name(); + if (names && descriptions) *output << " : "; + if (descriptions) *output << target->Description(); + *output << endl; + } + } + if (types) *output << "Dictionaries:\n"; + for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { + target = it->second; + if (!strcmp(target->Type(), "Lexicons / Dictionaries")) { + if (names) *output << target->Name(); + if (names && descriptions) *output << " : "; + if (descriptions) *output << target->Description(); + *output << endl; + } + } + } +} + +void doquery(unsigned long maxverses = -1, unsigned char outputformat = FMT_PLAIN, unsigned char outputencoding = ENC_UTF8, unsigned long optionfilters = 0, unsigned char searchtype = ST_NONE, const char *range = 0, const char *text = 0, const char *locale = 0, const char *ref = 0, ostream* output = &cout, const char *script = 0, signed short variants = 0) { + static DiathekeMgr manager; + + ModMap::iterator it; + ListKey listkey; + SectionMap::iterator sit; + ConfigEntMap::iterator eit; + + SWModule * target; + char *font = 0; + char inputformat = 0; + SWBuf encoding; + char querytype = 0; + + if (locale) { + LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(locale); + } + VerseKey vk; + + //deal with queries to "system" + if (!::stricmp(text, "system")) { + querytype = QT_SYSTEM; + systemquery(ref, output); + } + if (!strnicmp(text, "info", 4)) { + querytype = QT_INFO; + text = ref; + } + //otherwise, we have a real book + it = manager.Modules.find(text); + if (it == manager.Modules.end()) { //book not found + return; + } + target = (*it).second; + + manager.Markup(outputformat); + manager.Encoding(outputencoding); + manager.bidi = ((OP_BIDI & optionfilters) == OP_BIDI); + manager.shape = ((OP_ARSHAPE & optionfilters) == OP_ARSHAPE); + + if ((sit = manager.config->Sections.find((*it).second->Name())) != manager.config->Sections.end()) { + if ((eit = (*sit).second.find("SourceType")) != (*sit).second.end()) { + if (!::stricmp((char *)(*eit).second.c_str(), "GBF")) + inputformat = FMT_GBF; + else if (!::stricmp((char *)(*eit).second.c_str(), "ThML")) + inputformat = FMT_THML; + else if (!::stricmp((char *)(*eit).second.c_str(), "OSIS")) + inputformat = FMT_OSIS; + } + encoding = ((eit = (*sit).second.find("Encoding")) != (*sit).second.end()) ? (*eit).second : (SWBuf)""; + } + + + if (querytype == QT_INFO) { + switch (inputformat) { + case FMT_THML : + *output << "ThML"; + break; + case FMT_GBF : + *output << "GBF"; + break; + case FMT_OSIS : + *output << "OSIS"; + break; + default: + *output << "Other"; + } + *output << ";"; + *output << target->Type(); + *output << ";"; + return; + } + + if (searchtype) + querytype = QT_SEARCH; + else if (!strcmp(target->Type(), "Biblical Texts")) + querytype = QT_BIBLE; + else if (!strcmp(target->Type(), "Commentaries")) + querytype = QT_COMM; + else if (!strcmp(target->Type(), "Lexicons / Dictionaries")) + querytype = QT_LD; + + if (optionfilters & OP_FOOTNOTES) + manager.setGlobalOption("Footnotes","On"); + else + manager.setGlobalOption("Footnotes","Off"); + if (optionfilters & OP_HEADINGS) + manager.setGlobalOption("Headings","On"); + else + manager.setGlobalOption("Headings","Off"); + if (optionfilters & OP_STRONGS) + manager.setGlobalOption("Strong's Numbers","On"); + else + manager.setGlobalOption("Strong's Numbers","Off"); + if (optionfilters & OP_MORPH) + manager.setGlobalOption("Morphological Tags","On"); + else + manager.setGlobalOption("Morphological Tags","Off"); + if (optionfilters & OP_CANTILLATION) + manager.setGlobalOption("Hebrew Cantillation","On"); + else + manager.setGlobalOption("Hebrew Cantillation","Off"); + if (optionfilters & OP_HEBREWPOINTS) + manager.setGlobalOption("Hebrew Vowel Points","On"); + else + manager.setGlobalOption("Hebrew Vowel Points","Off"); + if (optionfilters & OP_GREEKACCENTS) + manager.setGlobalOption("Greek Accents","On"); + else + manager.setGlobalOption("Greek Accents","Off"); + if (optionfilters & OP_LEMMAS) + manager.setGlobalOption("Lemmas","On"); + else + manager.setGlobalOption("Lemmas","Off"); + if (optionfilters & OP_SCRIPREF) + manager.setGlobalOption("Cross-references","On"); + else + manager.setGlobalOption("Cross-references","Off"); + if (optionfilters & OP_RED) + manager.setGlobalOption("Words of Christ in Red","On"); + else + manager.setGlobalOption("Words of Christ in Red","Off"); + if (optionfilters & OP_VARIANTS && variants) { + if (variants == -1) + manager.setGlobalOption("Variants", "All Readings"); + else if (variants == 1) + manager.setGlobalOption("Variants", "Secondary Readings"); + } + else + manager.setGlobalOption("Transliteration", "Primary Readings"); + + if (optionfilters & OP_TRANSLITERATOR && script) + manager.setGlobalOption("Transliteration", script); + else + manager.setGlobalOption("Transliteration", "Off"); + + if (querytype == QT_SEARCH) { + + //this test is just to determine if we've got SWKeys or VerseKeys + if (!strcmp(target->Type(), "Biblical Texts")) + querytype = QT_BIBLE; + else if (!strcmp(target->Type(), "Commentaries")) + querytype = QT_BIBLE; + else if (!strcmp(target->Type(), "Lexicons / Dictionaries")) + querytype = QT_LD; + + //do search stuff + char st = 1 - searchtype; + if (querytype == QT_BIBLE) { + *output << "Verses containing \""; + } + else *output << "Entries containing \""; + *output << ref; + *output << "\"-- "; + + if (range) { + VerseKey parser; + ListKey scope = parser.ParseVerseList(range, parser, true); + listkey = target->Search(ref, st, REG_ICASE, &scope); + } + else listkey = target->Search(ref, st, REG_ICASE); + + if (strlen((const char*)listkey)) { + if (!listkey.Error()) { + if (outputformat == FMT_CGI) *output << ""; + if (querytype == QT_BIBLE) { + vk = listkey; + *output << (const char *)vk; + } + else *output << (const char *)listkey; + if (outputformat == FMT_CGI) *output << ""; + } + listkey++; + while (!listkey.Error()) { + *output << " ; "; + if (outputformat == FMT_CGI) *output << ""; + if (querytype == QT_BIBLE) { + vk = listkey; + *output << (const char *)vk; + } + else *output << (const char *)listkey; + if (outputformat == FMT_CGI) *output << ""; + listkey++; + } + *output << " -- "; + + char *temp = new char[10]; + sprintf(temp, "%u", listkey.Count()); + *output << temp; + delete [] temp; + + *output << " matches total ("; + *output << target->Name(); + *output << ")\n"; + } + else { + *output << "none ("; + *output << target->Name(); + *output << ")\n"; + } + } + + else if (querytype == QT_LD) { + //do dictionary stuff + + target->setKey(ref); + + const char * text = (const char *) *target; + + if (outputformat == FMT_RTF) { + *output << "{\\rtf1\\ansi{\\fonttbl{\\f0\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f1\\fdecor\\fprq2 "; + if (font) + *output << font; + else + *output << "Times New Roman"; + *output << ";}}"; + } + else if (outputformat == FMT_HTML) { + *output << ""; + } + + if (strlen(text)) { + *output << (char*)target->KeyText(); + if (font && (outputformat == FMT_HTML || outputformat == FMT_THML || outputformat == FMT_CGI)) { + *output << ": "; + } + else if (outputformat == FMT_RTF) { + *output << ": {\\f1 "; + } + else { + *output << ": "; + } + *output << text; + if (font && (outputformat == FMT_HTML || outputformat == FMT_THML || outputformat == FMT_CGI)) { + *output << ""; + } + else if (outputformat == FMT_RTF) { + *output << "}"; + } + + *output << "("; + *output << target->Name(); + *output << ")\n"; + } + + if (outputformat == FMT_RTF) { + *output << "}"; + } + + } + + else if (querytype == QT_BIBLE || querytype == QT_COMM) { + //do commentary/Bible stuff + + if ((sit = manager.config->Sections.find((*it).second->Name())) != manager.config->Sections.end()) { + if ((eit = (*sit).second.find("Font")) != (*sit).second.end()) { + font = (char *)(*eit).second.c_str(); + if (strlen(font) == 0) font = 0; + } + } + + listkey = vk.ParseVerseList(ref, "Gen1:1", true); + int i; + + if (outputformat == FMT_RTF) { + *output << "{\\rtf1\\ansi{\\fonttbl{\\f0\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f1\\fdecor\\fprq2 "; + if (font) + *output << font; + else + *output << "Times New Roman"; + *output << ";}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}}"; + } + else if (outputformat == FMT_HTML) { + *output << ""; + } + + for (i = 0; i < listkey.Count() && maxverses; i++) { + VerseKey *element = SWDYNAMIC_CAST(VerseKey, listkey.GetElement(i)); + if (element) { + target->Key(element->LowerBound()); + vk = element->UpperBound(); + while (maxverses && target->Key() <= vk) { + *output << (char*)target->KeyText(); + if (font && (outputformat == FMT_HTML || outputformat == FMT_THML || outputformat == FMT_CGI)) { + *output << ": "; + } + else if (outputformat == FMT_RTF) { + *output << ": {\\f1 "; + } + else { + *output << ": "; + } + *output << (const char*)*target; + if (font && (outputformat == FMT_HTML || outputformat == FMT_THML || outputformat == FMT_CGI)) { + *output << ""; + } + else if (outputformat == FMT_RTF) { + *output << "}"; + } + + if (inputformat != FMT_THML && (outputformat == FMT_HTML || outputformat == FMT_THML || outputformat == FMT_CGI)) + *output << "
"; + else if (outputformat == FMT_OSIS) + *output << ""; + else if (outputformat == FMT_RTF) + *output << "\\par "; + else if (outputformat == FMT_GBF) + *output << ""; + + *output << "\n"; + + if (target->Key() == vk) + break; + maxverses--; + (*target)++; + } + } + else { + target->Key(*listkey.GetElement(i)); + *output << (char*)target->KeyText(); + if (font && (outputformat == FMT_HTML || outputformat == FMT_THML || outputformat == FMT_CGI)) { + *output << ": "; + } + else if (outputformat == FMT_RTF) { + *output << ": {\\f1 "; + } + else { + *output << ": "; + } + *output << (const char*)*target; + if (font && (outputformat == FMT_HTML || outputformat == FMT_THML || outputformat == FMT_CGI)) { + *output << ""; + } + else if (outputformat == FMT_RTF) { + *output << "}"; + } + + if (inputformat != FMT_THML && (outputformat == FMT_HTML || outputformat == FMT_THML || outputformat == FMT_CGI)) + *output << "
"; + else if (outputformat == FMT_OSIS) + *output << ""; + else if (outputformat == FMT_RTF) + *output << "\\par "; + else if (outputformat == FMT_GBF) + *output << ""; + + *output << "\n"; + maxverses--; + } + } + + *output << "("; + *output << target->Name(); + *output << ")\n"; + + if (outputformat == FMT_RTF) { + *output << "}"; + } + + } +} + diff --git a/utilities/diatheke/corediatheke.h b/utilities/diatheke/corediatheke.h new file mode 100644 index 0000000..0364b37 --- /dev/null +++ b/utilities/diatheke/corediatheke.h @@ -0,0 +1,43 @@ +// Diatheke 4.2 by Chris Little +// Copyright 1999-2002 by CrossWire Bible Society http://www.crosswire.org +// Licensed under GNU General Public License (GPL) +// see accompanying LICENSE file for license details + +#include +#include + +#include "diathekemgr.h" +#include + +#define QT_BIBLE 1 +#define QT_COMM 2 +#define QT_LD 3 +#define QT_SEARCH 4 +#define QT_SYSTEM 5 +#define QT_INFO 6 + +#define OP_NONE 0 +#define OP_STRONGS 1 +#define OP_FOOTNOTES 2 +#define OP_HEADINGS 4 +#define OP_MORPH 8 +#define OP_CANTILLATION 16 +#define OP_HEBREWPOINTS 32 +#define OP_GREEKACCENTS 64 +#define OP_TRANSLITERATOR 128 +#define OP_LEMMAS 256 +#define OP_SCRIPREF 512 +#define OP_ARSHAPE 1024 +#define OP_BIDI 2048 +#define OP_VARIANTS 4096 +#define OP_RED 8192 + +#define ST_NONE 0 +#define ST_REGEX 1 //0 +#define ST_PHRASE 2 // -1 +#define ST_MULTIWORD 3 // -2 + +using namespace std; + +int hasalpha (char * string); +void doquery(unsigned long maxverses, unsigned char outputformat, unsigned char outputencoding, unsigned long optionfilters, unsigned char searchtype, const char *range, const char *text, const char *locale, const char *ref, ostream* output, const char* script, signed short variants); diff --git a/utilities/diatheke/diafiltmgr.cpp b/utilities/diatheke/diafiltmgr.cpp new file mode 100644 index 0000000..83b41ef --- /dev/null +++ b/utilities/diatheke/diafiltmgr.cpp @@ -0,0 +1,228 @@ +/****************************************************************************** + * diafiltmgr.cpp + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "diafiltmgr.h" +#include "thmlcgi.h" +#include "gbfcgi.h" +#include "osiscgi.h" + +DiathekeFilterMgr::DiathekeFilterMgr (char mark, char enc) + : EncodingFilterMgr(enc) { + + markup = mark; + + CreateFilters(markup); +} + +DiathekeFilterMgr::~DiathekeFilterMgr() { + if (fromthml) + delete (fromthml); + if (fromgbf) + delete (fromgbf); + if (fromplain) + delete (fromplain); + if (fromosis) + delete (fromosis); +} + +void DiathekeFilterMgr::AddRenderFilters(SWModule *module, ConfigEntMap §ion) { + switch (module->Markup()) { + case FMT_THML: + if (fromthml) + module->AddRenderFilter(fromthml); + break; + case FMT_GBF: + if (fromgbf) + module->AddRenderFilter(fromgbf); + break; + case FMT_PLAIN: + if (fromplain) + module->AddRenderFilter(fromplain); + break; + case FMT_OSIS: + if (fromosis) + module->AddRenderFilter(fromosis); + break; + } + EncodingFilterMgr::AddRenderFilters(module, section); +} + + +char DiathekeFilterMgr::Markup(char mark) { + if (mark && mark != markup) { + markup = mark; + ModMap::const_iterator module; + + SWFilter * oldplain = fromplain; + SWFilter * oldthml = fromthml; + SWFilter * oldgbf = fromgbf; + SWFilter * oldosis = fromosis; + + CreateFilters(markup); + + for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++) + switch (module->second->Markup()) { + case FMT_THML: + if (oldthml != fromthml) { + if (oldthml) { + if (!fromthml) { + module->second->RemoveRenderFilter(oldthml); + } + else { + module->second->ReplaceRenderFilter(oldthml, fromthml); + } + } + else if (fromthml) { + module->second->AddRenderFilter(fromthml); + } + } + break; + case FMT_GBF: + if (oldgbf != fromgbf) { + if (oldgbf) { + if (!fromgbf) { + module->second->RemoveRenderFilter(oldgbf); + } + else { + module->second->ReplaceRenderFilter(oldgbf, fromgbf); + } + } + else if (fromgbf) { + module->second->AddRenderFilter(fromgbf); + } + break; + } + case FMT_PLAIN: + if (oldplain != fromplain) { + if (oldplain) { + if (!fromplain) { + module->second->RemoveRenderFilter(oldplain); + } + else { + module->second->ReplaceRenderFilter(oldplain, fromplain); + } + } + else if (fromplain) { + module->second->AddRenderFilter(fromplain); + } + break; + } + case FMT_OSIS: + if (oldosis != fromosis) { + if (oldosis) { + if (!fromosis) { + module->second->RemoveRenderFilter(oldosis); + } + else { + module->second->ReplaceRenderFilter(oldosis, fromosis); + } + } + else if (fromosis) { + module->second->AddRenderFilter(fromosis); + } + break; + } + } + + if (oldthml) + delete oldthml; + if (oldgbf) + delete oldgbf; + if (oldplain) + delete oldplain; + if (oldosis) + delete oldosis; + } + return markup; +} + +void DiathekeFilterMgr::CreateFilters(char markup) { + + switch (markup) { + case FMT_CGI: + fromplain = NULL; + fromthml = new ThMLCGI(); + fromgbf = new GBFCGI(); + fromosis = new OSISCGI(); + break; + case FMT_PLAIN: + fromplain = NULL; + fromthml = new ThMLPlain(); + fromgbf = new GBFPlain(); + fromosis = new OSISPlain(); + break; + case FMT_THML: + fromplain = NULL; + fromthml = NULL; + fromgbf = new GBFThML(); + fromosis = NULL; + break; + case FMT_GBF: + fromplain = NULL; + fromthml = new ThMLGBF(); + fromgbf = NULL; + fromosis = NULL; + break; + case FMT_HTML: + fromplain = new PLAINHTML(); + fromthml = new ThMLHTML(); + fromgbf = new GBFHTML(); + fromosis = NULL; + break; + case FMT_HTMLHREF: + fromplain = NULL; + fromthml = new ThMLHTMLHREF(); + fromgbf = new GBFHTMLHREF(); + fromosis = new OSISHTMLHREF(); + break; + case FMT_RTF: + fromplain = NULL; + fromthml = new ThMLRTF(); + fromgbf = new GBFRTF(); + fromosis = new OSISRTF(); + break; + case FMT_OSIS: + fromplain = NULL; + fromthml = new ThMLOSIS(); + fromgbf = new GBFOSIS(); + fromosis = NULL; + break; + } + +} diff --git a/utilities/diatheke/diafiltmgr.h b/utilities/diatheke/diafiltmgr.h new file mode 100644 index 0000000..2ca34eb --- /dev/null +++ b/utilities/diatheke/diafiltmgr.h @@ -0,0 +1,47 @@ +/****************************************************************************** + * diafiltmgr.h + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 version 2. + * + * 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. + * + */ + +#ifndef DIAFILTMGR_H +#define DIAFILTMGR_H + +#define FMT_CGI 127 + +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +class SWDLLEXPORT DiathekeFilterMgr : public EncodingFilterMgr { +protected: + SWFilter* fromthml; + SWFilter* fromgbf; + SWFilter* fromplain; + SWFilter* fromosis; + + char markup; + + void CreateFilters(char markup); +public: + DiathekeFilterMgr(char markup = FMT_THML, char encoding = ENC_UTF8); + ~DiathekeFilterMgr(); + char Markup(char m = FMT_UNKNOWN); + virtual void AddRenderFilters(SWModule *module, ConfigEntMap §ion); +}; + +#endif diff --git a/utilities/diatheke/diatheke.cpp b/utilities/diatheke/diatheke.cpp new file mode 100644 index 0000000..0a99c07 --- /dev/null +++ b/utilities/diatheke/diatheke.cpp @@ -0,0 +1,225 @@ +// Diatheke 4.2.1 by Chris Little +// Copyright 1999-2005 by CrossWire Bible Society +// http://www.crosswire.org/sword/diatheke +// Licensed under GNU General Public License (GPL) +// see accompanying LICENSE file for license details + + +#include "corediatheke.h" +#include "diathekemgr.h" +#include "diafiltmgr.h" +#include + +using std::cout; + +#define RQ_REF 1 +#define RQ_BOOK 2 + +void printsyntax() { + //if we got this far without exiting, something went wrong, so print syntax + fprintf (stderr, "Diatheke command-line SWORD frontend Version 4.2.1\n"); + fprintf (stderr, "Copyright 1999-2005 by the CrossWire Bible Society\n"); + fprintf (stderr, "http://www.crosswire.org/sword/diatheke/\n"); + fprintf (stderr, "usage: \n "); + fprintf (stderr, "diatheke <-b module_name> [-s search_type] [-r search_range]\n"); + fprintf (stderr, "[-o option_filters] [-m maximum_verses] [-f output_format]\n"); + fprintf (stderr, "[-e output_encoding] [-t script] [-v variant#(-1=all|0|1)]\n"); + fprintf (stderr, "[-l locale] <-k query_key>\n"); + fprintf (stderr, "\n"); + fprintf (stderr, "If is \"system\" you may use these system keys: \"modulelist\",\n"); + fprintf (stderr, "\"modulelistnames\", and \"localelist\"."); + fprintf (stderr, "\n"); + fprintf (stderr, "Valid search_type values are: regex, multiword, and phrase(def).\n"); + fprintf (stderr, "Valid option_filters values are: n (Strong's numbers),\n"); + fprintf (stderr, " f (Footnotes), m (Morphology), h (Section Headings),\n"); + fprintf (stderr, " c (Cantillation), v (Hebrew Vowels), a (Greek Accents),\n"); + fprintf (stderr, " l (Lemmas), s (Scripture Crossrefs), r (Arabic Shaping,\n"); + fprintf (stderr, " b (Bi-Directional Reordering), x (Red Words of Christ)\n"); + + fprintf (stderr, "Maximum verses may be any integer value\n"); + fprintf (stderr, "Valid output_format values are: GBF, ThML, RTF, HTML, OSIS, CGI, and plain (def)\n"); + fprintf (stderr, "Valid output_encoding values are: Latin1, UTF8 (def), UTF16, HTML, and RTF\n"); + fprintf (stderr, "Valid locale values depend on installed locales. en is default.\n"); + fprintf (stderr, "The query_key must be the last argument because all following\n"); + fprintf (stderr, " arguments are added to the key.\n\n"); + + fprintf (stderr, "Example usage:\n"); + fprintf (stderr, " diatheke -b KJV -o fmnx -k Jn 3:16\n"); + fprintf (stderr, " diatheke -b WHNU -t Latin -o mn -k Mt 24\n"); + fprintf (stderr, " diatheke -b KJV -s phrase -r Mt -k love\n"); +} + +int main(int argc, char **argv) +{ + int maxverses = -1; + unsigned char outputformat = FMT_PLAIN, searchtype = ST_NONE, outputencoding = ENC_UTF8; + unsigned long optionfilters = OP_NONE; + char *text = 0, *locale = 0, *ref = 0, *script = 0, *range = 0; + signed short variants = 0; + + char runquery = 0; // used to check that we have enough arguments to perform a legal query + // (a querytype & text = 1 and a ref = 2) + + for (int i = 1; i < argc; i++) { + if (!::stricmp("-b", argv[i])) { + if (i+1 <= argc) { + text = argv[i+1]; + i++; + runquery |= RQ_BOOK; + } + } + else if (!::stricmp("-s", argv[i])) { + if (i+1 <= argc) { + if (!::stricmp("phrase", argv[i+1])) { + searchtype = ST_PHRASE; + i++; + } + else if (!::stricmp("regex", argv[i+1])) { + searchtype = ST_REGEX; + i++; + } + else if (!::stricmp("multiword", argv[i+1])) { + searchtype = ST_MULTIWORD; + i++; + } + else i++; + } + } + else if (!::stricmp("-r", argv[i])) { + if (i+1 <= argc) { + range = argv[i+1]; + i++; + } + } + else if (!::stricmp("-l", argv[i])) { + if (i+1 <= argc) { + locale = argv[i+1]; + i++; + } + } + else if (!::stricmp("-m", argv[i])) { + if (i+1 <= argc) { + maxverses = atoi(argv[i+1]); + i++; + } + } + else if (!::stricmp("-o", argv[i])) { + if (i+1 <= argc) { + if (strchr(argv[i+1], 'f')) + optionfilters |= OP_FOOTNOTES; + if (strchr(argv[i+1], 'n')) + optionfilters |= OP_STRONGS; + if (strchr(argv[i+1], 'h')) + optionfilters |= OP_HEADINGS; + if (strchr(argv[i+1], 'm')) + optionfilters |= OP_MORPH; + if (strchr(argv[i+1], 'c')) + optionfilters |= OP_CANTILLATION; + if (strchr(argv[i+1], 'v')) + optionfilters |= OP_HEBREWPOINTS; + if (strchr(argv[i+1], 'a')) + optionfilters |= OP_GREEKACCENTS; + if (strchr(argv[i+1], 'l')) + optionfilters |= OP_LEMMAS; + if (strchr(argv[i+1], 's')) + optionfilters |= OP_SCRIPREF; + if (strchr(argv[i+1], 'r')) + optionfilters |= OP_ARSHAPE; + if (strchr(argv[i+1], 'b')) + optionfilters |= OP_BIDI; + if (strchr(argv[i+1], 'x')) + optionfilters |= OP_RED; + i++; + } + } + else if (!::stricmp("-f", argv[i])) { + if (i+1 <= argc) { + if (!::stricmp("thml", argv[i+1])) { + outputformat = FMT_THML; + i++; + } + else if (!::stricmp("cgi", argv[i+1])) { + outputformat = FMT_CGI; + i++; + } + else if (!::stricmp("gbf", argv[i+1])) { + outputformat = FMT_GBF; + i++; + } + else if (!::stricmp("html", argv[i+1])) { + outputformat = FMT_HTML; + i++; + } + else if (!::stricmp("rtf", argv[i+1])) { + outputformat = FMT_RTF; + i++; + } + else if (!::stricmp("osis", argv[i+1])) { + outputformat = FMT_OSIS; + i++; + } + else i++; + } + } + else if (!::stricmp("-e", argv[i])) { + if (i+1 <= argc) { + if (!::stricmp("utf8", argv[i+1])) { + outputencoding = ENC_UTF8; + i++; + } + else if (!::stricmp("rtf", argv[i+1])) { + outputencoding = ENC_RTF; + i++; + } + else if (!::stricmp("html", argv[i+1])) { + outputencoding = ENC_HTML; + i++; + } + else if (!::stricmp("latin1", argv[i+1])) { + outputencoding = ENC_LATIN1; + i++; + } + else if (!::stricmp("utf16", argv[i+1])) { + outputencoding = ENC_UTF16; + i++; + } + else i++; + } + } + else if (!::stricmp("-k", argv[i])) { + i++; + if (i < argc) { + SWBuf key = argv[i]; + i++; + for (; i < argc; i++) + key = key + " " + argv[i]; + ref = new char[key.length() + 1]; + strcpy (ref, key.c_str()); + if (strlen(ref)) + runquery |= RQ_REF; + } + } + else if (!::stricmp("-v", argv[i])) { + if (i+1 <= argc) { + variants = atoi(argv[i+1]); + optionfilters |= OP_VARIANTS; + i++; + } + } + else if (!::stricmp("-t", argv[i])) { + if (i+1 <= argc) { + script = argv[i+1]; + optionfilters |= OP_TRANSLITERATOR; + i++; + } + } + } + + + if (runquery == (RQ_BOOK | RQ_REF)) { + doquery(maxverses, outputformat, outputencoding, optionfilters, searchtype, range, text, locale, ref, &cout, script, variants); + } + else printsyntax(); + + return 0; +} diff --git a/utilities/diatheke/diatheke.dsp b/utilities/diatheke/diatheke.dsp new file mode 100644 index 0000000..03085d3 --- /dev/null +++ b/utilities/diatheke/diatheke.dsp @@ -0,0 +1,204 @@ +# Microsoft Developer Studio Project File - Name="diatheke" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=diatheke - Win32 Debug with ICU +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "diatheke.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "diatheke.mak" CFG="diatheke - Win32 Debug with ICU" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "diatheke - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "diatheke - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "diatheke - Win32 Debug with ICU" (based on "Win32 (x86) Console Application") +!MESSAGE "diatheke - Win32 Release with ICU" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "diatheke - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /w /W0 /GX /O2 /I "../../include" /I "../../src/utilfuns/win32" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libswordvc6.lib /nologo /subsystem:console /machine:I386 /libpath:"../../lib" + +!ELSEIF "$(CFG)" == "diatheke - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /w /W0 /Gm /GX /ZI /Od /I "../../include" /I "../../src/utilfuns/win32" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libswordvc6d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../lib" + +!ELSEIF "$(CFG)" == "diatheke - Win32 Debug with ICU" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "diatheke___Win32_Debug_with_ICU" +# PROP BASE Intermediate_Dir "diatheke___Win32_Debug_with_ICU" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "ICUDebug" +# PROP Intermediate_Dir "ICUDebug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /w /W0 /Gm /GX /ZI /Od /I "../../include" /I "../../src/utilfuns/win32" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__VISUALC__" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MDd /w /W0 /Gm /GX /ZI /Od /I "../../include" /I "../../src/utilfuns/win32" /I "../../../icu-sword/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_ICU_" /D "_ICUSWORD_" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libsword.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../lib/vcppmake/vc6/Debug" +# ADD LINK32 icuin.lib icuuc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libswordvc6icud.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../icu-sword/lib" /libpath:"../../lib" + +!ELSEIF "$(CFG)" == "diatheke - Win32 Release with ICU" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "diatheke___Win32_Release_with_ICU" +# PROP BASE Intermediate_Dir "diatheke___Win32_Release_with_ICU" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ICURelease" +# PROP Intermediate_Dir "ICURelease" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /w /W0 /GX /O2 /I "../../include" /I "../../src/utilfuns/win32" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__VISUALC__" /FR /YX /FD /c +# ADD CPP /nologo /MD /w /W0 /GX /O2 /I "../../include" /I "../../src/utilfuns/win32" /I "../../../icu-sword/include" /D "NDEBUG" /D "_ICU_" /D "_ICUSWORD_" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libsword.lib /nologo /subsystem:console /machine:I386 /libpath:"../../lib/vcppmake/vc6/Release" +# ADD LINK32 icuin.lib icuuc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libswordvc6icu.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../icu-sword/lib" /libpath:"../../lib" + +!ENDIF + +# Begin Target + +# Name "diatheke - Win32 Release" +# Name "diatheke - Win32 Debug" +# Name "diatheke - Win32 Debug with ICU" +# Name "diatheke - Win32 Release with ICU" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\corediatheke.cpp +# End Source File +# Begin Source File + +SOURCE=.\diafiltmgr.cpp +# End Source File +# Begin Source File + +SOURCE=.\diatheke.cpp +# End Source File +# Begin Source File + +SOURCE=.\diathekemgr.cpp +# End Source File +# Begin Source File + +SOURCE=.\gbfcgi.cpp +# End Source File +# Begin Source File + +SOURCE=.\osiscgi.cpp +# End Source File +# Begin Source File + +SOURCE=.\thmlcgi.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\corediatheke.h +# End Source File +# Begin Source File + +SOURCE=.\diafiltmgr.h +# End Source File +# Begin Source File + +SOURCE=.\diathekemgr.h +# End Source File +# Begin Source File + +SOURCE=.\gbfcgi.h +# End Source File +# Begin Source File + +SOURCE=.\osiscgi.h +# End Source File +# Begin Source File + +SOURCE=.\thmlcgi.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/utilities/diatheke/diatheke.dsw b/utilities/diatheke/diatheke.dsw new file mode 100644 index 0000000..3bf8c0c --- /dev/null +++ b/utilities/diatheke/diatheke.dsw @@ -0,0 +1,44 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "diatheke"=.\diatheke.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libsword + End Project Dependency +}}} + +############################################################################### + +Project: "libsword"=..\..\lib\vcppmake\vc6\libsword.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/utilities/diatheke/diathekemgr.cpp b/utilities/diatheke/diathekemgr.cpp new file mode 100644 index 0000000..38cb46d --- /dev/null +++ b/utilities/diatheke/diathekemgr.cpp @@ -0,0 +1,109 @@ +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "diafiltmgr.h" + +#ifdef _ICU_ +#include +#include +#include +#endif + +#ifdef WIN32 +#include +#endif + +#include "diathekemgr.h" +#include "gbfcgi.h" +#include "thmlcgi.h" + +//--------------------------------------------------------------------------- +DiathekeMgr::DiathekeMgr (SWConfig * iconfig, SWConfig * isysconfig, bool autoload, char enc, char mark, bool ibidi, bool ishape) + : SWMgr(iconfig, isysconfig, autoload, new DiathekeFilterMgr(mark, enc)) +{ + bidi = ibidi; + shape = ishape; + +#ifdef _ICU_ + arshaping = new UTF8arShaping(); + bidireorder = new UTF8BiDiReorder(); + transliterator = new UTF8Transliterator(); +#endif + Load(); + +#ifdef WIN32 + OSVERSIONINFO osvi; + memset (&osvi, 0, sizeof(OSVERSIONINFO)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&osvi); + platformID = osvi.dwPlatformId; +#endif + +} + + +DiathekeMgr::~DiathekeMgr() +{ +#ifdef _ICU_ + if (arshaping) + delete arshaping; + if (bidireorder) + delete bidireorder; + if (transliterator) + delete transliterator; +#endif +} + + +void DiathekeMgr::AddRenderFilters(SWModule *module, ConfigEntMap §ion) +{ + SWBuf lang; + bool rtl; + ConfigEntMap::iterator entry; + + lang = ((entry = section.find("Lang")) != section.end()) ? (*entry).second : (SWBuf)"en"; + rtl = ((entry = section.find("Direction")) != section.end()) ? ((*entry).second == "RtoL") : false; + +#ifdef _ICU_ + if (shape && !strnicmp(lang.c_str(), "ar", 2)) { + module->AddRenderFilter(arshaping); + } + if (bidi && rtl) { + module->AddRenderFilter(bidireorder); + } +#endif + SWMgr::AddRenderFilters(module, section); +} + +signed char DiathekeMgr::Load () { + signed char retval = SWMgr::Load(); +#ifdef _ICU_ + optionFilters["UTF8Transliterator"] = transliterator; + options.push_back(transliterator->getOptionName()); +#endif + return retval; +}; + +void DiathekeMgr::AddGlobalOptions (SWModule * module, ConfigEntMap & section, + ConfigEntMap::iterator start, + ConfigEntMap::iterator end) { + + SWMgr::AddGlobalOptions(module, section, start, end); +#ifdef _ICU_ + module->AddOptionFilter(transliterator); +#endif +}; + diff --git a/utilities/diatheke/diathekemgr.h b/utilities/diatheke/diathekemgr.h new file mode 100644 index 0000000..cbd8e6f --- /dev/null +++ b/utilities/diatheke/diathekemgr.h @@ -0,0 +1,35 @@ +#ifndef DIATHEKEMGR_H +#define DIATHEKEMGR_H + +#include +#include "diafiltmgr.h" + +enum PlatformIDs { WIN32S = 0, WIN9X, WINNT, WINCE }; + +class DiathekeMgr : public SWMgr { + SWFilter *arshaping; + SWFilter *bidireorder; + SWOptionFilter *transliterator; + +#ifdef WIN32 + char platformID; +#endif + +protected: + virtual void AddRenderFilters(SWModule *module, ConfigEntMap §ion); + virtual signed char Load (); + virtual void AddGlobalOptions (SWModule * module, ConfigEntMap & section, ConfigEntMap::iterator start, ConfigEntMap::iterator end); + +public: + bool shape; + bool bidi; + + unsigned char Markup(unsigned char m = FMT_UNKNOWN) {return ((DiathekeFilterMgr*)filterMgr)->Markup(m);}; + unsigned char Encoding(unsigned char e = ENC_UNKNOWN) {return ((EncodingFilterMgr*)filterMgr)->Encoding(e);}; + + DiathekeMgr(SWConfig * iconf = NULL, SWConfig * isysconfig = NULL, bool autoload = false, char enc = ENC_UTF8, char mark = FMT_PLAIN, bool bidi = false, bool shape = false); + virtual ~DiathekeMgr(); +}; + +#endif + diff --git a/utilities/diatheke/gbfcgi.cpp b/utilities/diatheke/gbfcgi.cpp new file mode 100644 index 0000000..c581fa1 --- /dev/null +++ b/utilities/diatheke/gbfcgi.cpp @@ -0,0 +1,138 @@ +/*************************************************************************** + gbfcgi.cpp - GBF to Diatheke/CGI format + ------------------- + begin : 2001-11-12 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include "gbfcgi.h" + +SWORD_NAMESPACE_START + +GBFCGI::GBFCGI() { + setTokenStart("<"); + setTokenEnd(">"); + + setTokenCaseSensitive(true); + + addTokenSubstitute("Rf", ")
"); + addTokenSubstitute("FI", ""); // italics begin + addTokenSubstitute("Fi", ""); + addTokenSubstitute("FB", ""); // bold begin + addTokenSubstitute("Fb", ""); + addTokenSubstitute("FR", ""); // words of Jesus begin + addTokenSubstitute("Fr", ""); + addTokenSubstitute("FU", ""); // underline begin + addTokenSubstitute("Fu", ""); + addTokenSubstitute("FO", ""); // Old Testament quote begin + addTokenSubstitute("Fo", ""); + addTokenSubstitute("FS", ""); // Superscript begin// Subscript begin + addTokenSubstitute("Fs", ""); + addTokenSubstitute("FV", ""); // Subscript begin + addTokenSubstitute("Fv", ""); + addTokenSubstitute("TT", ""); // Book title begin + addTokenSubstitute("Tt", ""); + addTokenSubstitute("PP", ""); // poetry begin + addTokenSubstitute("Pp", ""); + addTokenSubstitute("Fn", "
"); // font end + addTokenSubstitute("CL", "
"); // new line + addTokenSubstitute("CM", "
"); // paragraph + addTokenSubstitute("CG", ">"); // ??? + addTokenSubstitute("CT", "<"); // ??? + addTokenSubstitute("JR", "
"); // right align begin + addTokenSubstitute("JC", "
"); // center align begin + addTokenSubstitute("JL", "
"); // align end + +} + + +bool GBFCGI::handleToken(SWBuf &buf, const char *token, DualStringMap &userData) { + unsigned long i; + if (!substituteToken(buf, token)) { + if (!strncmp(token, "WG", 2) || !strncmp(token, "WH", 2)) { // strong's numbers + buf += " <"; + for (i = 2; i < strlen(token); i++) + buf += token[i]; + buf += ">"; + } + + else if (!strncmp(token, "WTG", 3) || !strncmp(token, "WTH", 3)) { // strong's numbers tense + buf += " <"; + for (i = 3; i < strlen(token); i++) + buf += token[i]; + buf += ">"; + } + + else if (!strncmp(token, "WT", 2)) { // morph tags + buf += " ("; + for (i = 1; i < strlen(token); i++) + buf += token[i]; + buf += ")"; + } + + else if (!strncmp(token, "RB", 2)) { + buf += ""; + userData["hasFootnotePreTag"] = "true"; + } + + else if (!strncmp(token, "RF", 2)) { + if(userData["hasFootnotePreTag"] == "true") { + userData["hasFootnotePreTag"] = "false"; + buf += " "; + } + buf += " ("; + } + + else if (!strncmp(token, "FN", 2)) { + buf += ""; + } + + else if (!strncmp(token, "CA", 2)) { // ASCII value + buf += (char)atoi(&token[2]); + } + + else { + return false; + } + } + return true; +} + +SWORD_NAMESPACE_END diff --git a/utilities/diatheke/gbfcgi.h b/utilities/diatheke/gbfcgi.h new file mode 100644 index 0000000..c2b68c9 --- /dev/null +++ b/utilities/diatheke/gbfcgi.h @@ -0,0 +1,38 @@ +/*-************************************************************************* + gbfcgi.h - description + ------------------- + begin : 2001-11-12 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef GBFCGI_H +#define GBFCGI_H + +#include +#include +#include +#include + +SWORD_NAMESPACE_START + +typedef std::map DualStringMap; +/** this filter converts GBF text to Diatheke/CGI format + */ +class SWDLLEXPORT GBFCGI : public SWBasicFilter { +protected: + virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData); +public: + GBFCGI (); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/utilities/diatheke/osiscgi.cpp b/utilities/diatheke/osiscgi.cpp new file mode 100644 index 0000000..68298e9 --- /dev/null +++ b/utilities/diatheke/osiscgi.cpp @@ -0,0 +1,325 @@ +/*************************************************************************** + osiscgi.cpp - OSIS to Diatheke/CGI format + ------------------- + begin : 2003-10-21 + copyright : 2003 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include "osiscgi.h" +#include +#include +#include +#include + +SWORD_NAMESPACE_START + + +OSISCGI::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { + osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false"))); +} + + +OSISCGI::OSISCGI() { + setTokenStart("<"); + setTokenEnd(">"); + + setEscapeStart("&"); + setEscapeEnd(";"); + + setEscapeStringCaseSensitive(true); + + addEscapeStringSubstitute("amp", "&"); + addEscapeStringSubstitute("apos", "'"); + addEscapeStringSubstitute("lt", "<"); + addEscapeStringSubstitute("gt", ">"); + addEscapeStringSubstitute("quot", "\""); + addTokenSubstitute("lg", "
"); + addTokenSubstitute("/lg", "
"); + + setTokenCaseSensitive(true); +} + + +bool OSISCGI::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData) { + // manually process if it wasn't a simple substitution + if (!substituteToken(buf, token)) { + MyUserData *u = (MyUserData *)userData; + XMLTag tag(token); + + // tag + if (!strcmp(tag.getName(), "w")) { + + // start tag + if ((!tag.isEmpty()) && (!tag.isEndTag())) { + u->w = token; + } + + // end or empty tag + else { + bool endTag = tag.isEndTag(); + SWBuf lastText; + bool show = true; // to handle unplaced article in kjv2003-- temporary till combined + + if (endTag) { + tag = u->w.c_str(); + lastText = u->lastTextNode.c_str(); + } + else lastText = "stuff"; + + const char *attrib; + const char *val; + if ((attrib = tag.getAttribute("xlit"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + buf.appendFormatted(" %s", val); + } + if ((attrib = tag.getAttribute("gloss"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + buf.appendFormatted(" %s", val); + } + if ((attrib = tag.getAttribute("lemma"))) { + int count = tag.getAttributePartCount("lemma"); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + attrib = tag.getAttribute("lemma", i); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + const char *val2 = val; + if ((strchr("GH", *val)) && (isdigit(val[1]))) + val2++; + if ((!strcmp(val2, "3588")) && (lastText.length() < 1)) + show = false; + else { + if (!strchr("G", *val)) { + buf.appendFormatted(" <%s> ", val2, val); + } + else { + buf.appendFormatted(" <%s> ", val2, val); + } + } + } while (++i < count); + } + if ((attrib = tag.getAttribute("morph")) && (show)) { + SWBuf savelemma = tag.getAttribute("savlm"); + if ((strstr(savelemma.c_str(), "3588")) && (lastText.length() < 1)) + show = false; + if (show) { + int count = tag.getAttributePartCount("morph"); + int i = (count > 1) ? 0 : -1; // -1 for whole value cuz it's faster, but does the same thing as 0 + do { + attrib = tag.getAttribute("morph", i); + if (i < 0) i = 0; // to handle our -1 condition + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + const char *val2 = val; + if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2]))) + val2+=2; + if (!strchr("G", *val)) { + buf.appendFormatted(" (;%s) ", val+1, tag.getAttribute("morph")); + } + else if (!strchr("H", *val)) { + buf.appendFormatted(" (%s) ", val+1, tag.getAttribute("morph")); + } + else { + buf.appendFormatted(" (%s) ", val, tag.getAttribute("morph")); + } + } while (++i < count); + } + } + if ((attrib = tag.getAttribute("POS"))) { + val = strchr(attrib, ':'); + val = (val) ? (val + 1) : attrib; + buf.appendFormatted(" %s", val); + } + + /*if (endTag) + buf += "}";*/ + } + } + + // tag + else if (!strcmp(tag.getName(), "note")) { + if (!tag.isEndTag()) { + if (!tag.isEmpty()) { + SWBuf type = tag.getAttribute("type"); + + if (type != "x-strongsMarkup" && // leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off + type != "strongsMarkup") { // deprecated + SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + VerseKey *vkey = NULL; + // see if we have a VerseKey * or descendant + SWTRY { + vkey = SWDYNAMIC_CAST(VerseKey, u->key); + } + SWCATCH ( ... ) { } + if (vkey) { + char ch = ((tag.getAttribute("type") && (!strcmp(tag.getAttribute("type"), "crossReference"))) ? 'x':'n'); + buf.appendFormatted("*%c ", vkey->getText(), ch, footnoteNumber.c_str(), ch); + } + } + u->suspendTextPassThru = true; + } + } + if (tag.isEndTag()) { + u->suspendTextPassThru = false; + } + } + + //

paragraph tag + else if (!strcmp(tag.getName(), "p")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { // non-empty start tag + buf += "


"; + } + else if (tag.isEndTag()) { // end tag + buf += "


"; + userData->supressAdjacentWhitespace = true; + } + else { // empty paragraph break marker + buf += "


"; + userData->supressAdjacentWhitespace = true; + } + } + + // tag + else if (!strcmp(tag.getName(), "reference")) { + const char *attrib; + const char *val; + + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += ""; + } + else if (tag.isEndTag()) { + buf += ""; + } + } + + // poetry, etc + else if (!strcmp(tag.getName(), "l")) { + if (tag.isEmpty()) { + buf += "
"; + } + else if (tag.isEndTag()) { + buf += "
"; + } + else if (tag.getAttribute("sID")) { // empty line marker + buf += "
"; + } + } + + // or + else if ((!strcmp(tag.getName(), "lb")) || ((!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line")))) { + buf += "
"; + userData->supressAdjacentWhitespace = true; + } + + // + else if (!strcmp(tag.getName(), "title")) { + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + buf += "<b>"; + } + else if (tag.isEndTag()) { + buf += "</b><br />"; + } + } + + // <hi> hi? hi contrast? + else if (!strcmp(tag.getName(), "hi")) { + SWBuf type = tag.getAttribute("type"); + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + if (type == "bold" || type == "x-b") { + buf += "<b> "; + u->inBold = true; + } + else { // all other types + buf += "<i> "; + u->inBold = false; + } + } + else if (tag.isEndTag()) { + if(u->inBold) { + buf += "</b>"; + u->inBold = false; + } + else + buf += "</i>"; + } + else { // empty hi marker + // what to do? is this even valid? + } + } + + // <q> quote + else if (!strcmp(tag.getName(), "q")) { + SWBuf type = tag.getAttribute("type"); + SWBuf who = tag.getAttribute("who"); + const char *lev = tag.getAttribute("level"); + int level = (lev) ? atoi(lev) : 1; + + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + /*buf += "{";*/ + + //alternate " and ' + if (u->osisQToTick) + buf += (level % 2) ? '\"' : '\''; + + if (who == "Jesus") { + buf += "<font color=\"red\"> "; + } + } + else if (tag.isEndTag()) { + //alternate " and ' + if (u->osisQToTick) + buf += (level % 2) ? '\"' : '\''; + //buf += "</font>"; + } + else { // empty quote marker + //alternate " and ' + if (u->osisQToTick) + buf += (level % 2) ? '\"' : '\''; + } + } + + // <transChange> + else if (!strcmp(tag.getName(), "transChange")) { + SWBuf type = tag.getAttribute("type"); + + if ((!tag.isEndTag()) && (!tag.isEmpty())) { + +// just do all transChange tags this way for now +// if (type == "supplied") + buf += "<i>"; + } + else if (tag.isEndTag()) { + buf += "</i>"; + } + else { // empty transChange marker? + } + } + + else { + return false; // we still didn't handle token + } + } + return true; +} + + +SWORD_NAMESPACE_END diff --git a/utilities/diatheke/osiscgi.h b/utilities/diatheke/osiscgi.h new file mode 100644 index 0000000..c6c6411 --- /dev/null +++ b/utilities/diatheke/osiscgi.h @@ -0,0 +1,48 @@ +/*************************************************************************** + osiscgi.h - OSIS to Diatheke/CGI format + ------------------- + begin : 2003-10-21 + copyright : 2003 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef OSISCGI_H +#define OSISCGI_H + +#include <swbasicfilter.h> + +#include <defs.h> + +SWORD_NAMESPACE_START + +/** this filter converts OSIS text to Diatheke/CGI format + */ +class SWDLLEXPORT OSISCGI : public SWBasicFilter { +private: +protected: + class MyUserData : public BasicFilterUserData { + public: + bool osisQToTick; + bool inBold; + SWBuf w; + SWBuf fn; + MyUserData(const SWModule *module, const SWKey *key); + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + OSISCGI(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/utilities/diatheke/pqa/Diatheke.pqa b/utilities/diatheke/pqa/Diatheke.pqa new file mode 100644 index 0000000..f357b3d Binary files /dev/null and b/utilities/diatheke/pqa/Diatheke.pqa differ diff --git a/utilities/diatheke/pqa/src/README b/utilities/diatheke/pqa/src/README new file mode 100644 index 0000000..277a643 --- /dev/null +++ b/utilities/diatheke/pqa/src/README @@ -0,0 +1 @@ +Use Palm's PQA Builder with the contents of this directory (except the README file) to build Diatheke.PQA. \ No newline at end of file diff --git a/utilities/diatheke/pqa/src/all.html b/utilities/diatheke/pqa/src/all.html new file mode 100644 index 0000000..0974033 --- /dev/null +++ b/utilities/diatheke/pqa/src/all.html @@ -0,0 +1,170 @@ +<html> +<head> +<title>HANDiatheke + + +

+

Query: + + + +

+ +

+Stong's*| Footnotes| Search

+
+

English Bibles
+Analytical-Literal Trans. (ALT)
+American Standard Ver. (ASV)
+Bible in Basic English (BBE)
+Brenton's English LXX Trans. [OT]
+Darby's Bible
+Douay-Rheims (DR)
+Douay-Rheims 1899 American Ed.
+Hebrew Names Ver. (HNV)
+International Standard Ver. (ISV) [NT]
+JPS 1917 Tanakh [OT]
+21st Century King James Ver. (KJ21)
+King James Ver. (KJV/AV) *
+Green's Literal Trans. (LitV)
+The Living Oracles [NT]
+A Modern King James Ver. (MKJV)
+New American Standard (NASB)
+New American Standard, 95 Update
+New International Ver. (NIV)
+New International Ver., British Ed.
+New Jerusalem Bible (NJB)
+New King James Ver. (NKJV)
+New Living Trans. (NLT)
+New Revised Standard Ver. (NRSV)
+Orthodox Jewish Brit Chadasha [NT]
+Revised Standard Ver. (RSV)
+Revised 1833 Webster's Bible *
+World English Bible (WEB)
+Webster's Bible
+Weymouth New Testament [NT]
+Young's Literal Trans. (YLT)

+

Ancient Language Bibles
+Biblia Hebraica Stuttgartensia (BHS)
+1991 Byzantine/Majority Text
+Septuagint (LXX)
+Nestle-Aland 26th Ed. GNT
+1894 Scrivener Textus Receptus
+1550 Stephanus Textus Receptus
+Tischendorf's Eighth Ed. GNT
+Latin Vulgate
+1881 Westcott-Hort GNT
+Westcott-Hort with NA27U4 variants
+

+French Bibles
+French Haitian Creaole Ver.
+French Darby Trans.
+French 1910 Louis Segond (LSG)
+French Nouvelle Edition de Geneve 1979
+

+

German Bibles
+German Bengel [NT]
+German Einheitsuebersetzung
+German 1905 Darby Unrev. Elberfelder
+German 1912 Luther
+German 1545 Luther
+German 1993 Elberfelder, rev. Fassung
+German 1984 Revised Luther
+German 1951 Schlachter Bibel
+

+

+Spanish Bibles
+Spanish La Biblia de Las Americas (LBA)
+Spanish Reina-Valera
+Spanish 1960 Reina-Valera Revised
+Spanish 1995 Reina-Valera Update
+Spanish Ver. Reina-Valera Actualizada
+Spanish 1569 Ver. Antigua
+Spanish 1858 Valera[NT]
+

+

Other Bibles
+Albanian Bible
+Czech Bible Kralicka
+Czech Ekumenicky Cesky Preklad
+Czech Preklad KMS Nova Smlouva
+Czech Nova Kralicka Bible
+Danish Danske Bibel
+Dutch Leidse Vertaling
+Dutch Lutherse Vertaling
+Dutch 1951 Bijbelgenootschap Ver.
+Dutch Statenvertaling
+Equadoran Shuar [NT]
+Finish 1933 Phy~N Raamattu
+Hungarian Karoli
+Bahasa Indonesia Sehari-hari (BIS)
+Indonesian Terjemahan Baru (TB)
+Italian Nuovissima Ver., San Paolo Ed.
+Italian 1991 La Nuova Diodati
+Italian 1994 La Nuova Riveduta
+Maori Bible
+Melanesian Pidgin Bible
+Norwegian 1930 Bokmal
+Norwegian 1938 Bokmal
+Norwegian Bibel Konkordant
+Norwegian 1994 Nynorsk
+Norwegian Norsk Bible
+Philippine Nga Cebuano
+Polish 1984 Millenium Bible, 4th Ed.
+Portuguese 1995 Joao Ferreira
+Portuguese 1994 Almeida Biblia
+Romanian Cornilescu Ver.
+Swahili New Testament [NT]
+Swedish 1917 New Testament [NT]
+Turkish New Testament [NT]
+Uma New Testament [NT]
+Vietnamese 1934 Bible
+

+

English Commentaries
+Darby Translation Notes
+Family Bible Notes
+The Fourfold Gospel
+Geneva Bible Translation Notes
+Gill's Expositor
+Matthew Henry's Commentary
+Matthew Henry's Concise Commentary
+The People's New Testament
+Robertson's Word Pictures
+Scofield Reference Notes, 1917 Ed.
+John Wesley's Notes on the Bible
+

+

German Commentaries
+Matthias Ansorgs Kommentar
+Carl Heinrich Riegers Kommentar
+German Scofield 1917 Ed. (Gen-Eccl)
+

+

+Cross-references
+Treasury of Scriptural Knowledge
+

+

+Bible Dictionaries
+Easton's Bible Dictionary
+Hitchcock's Bible Names Dictionary
+Int'l Standard Bible Encyclopedia
+Smith's Bible Dictionary
+Vine's Bible Dictionary
+

+

+Topical References
+Naves' Topical Bible
+R. A. Torrey's New Topical Textbook
+

+

+Greek Lexica
+Strong's Greek Lexicon
+Thayer's Greek Lexicon
+

+

+Hebrew Lexica
+Strong's Hebrew Lexicon
+Brown-Driver-Briggs Hebrew Lexicon
+

+
+
+ + diff --git a/utilities/diatheke/pqa/src/ancient.html b/utilities/diatheke/pqa/src/ancient.html new file mode 100644 index 0000000..4be0036 --- /dev/null +++ b/utilities/diatheke/pqa/src/ancient.html @@ -0,0 +1,32 @@ + + +HANDiatheke + + +
+

Query: + + + +

+ +

+Stong's*| Footnotes| Search

+
+

+Bibles
+Biblia Hebraica Stuttgartensia (BHS)
+1991 Byzantine/Majority Text
+Septuagint (LXX)
+Nestle-Aland 26th Ed. GNT
+1894 Scrivener Textus Receptus
+1550 Stephanus Textus Receptus
+Tischendorf's Eighth Ed. GNT
+Latin Vulgate
+1881 Westcott-Hort GNT
+Westcott-Hort with NA27U4 variants
+

+
+
+ + diff --git a/utilities/diatheke/pqa/src/dict.html b/utilities/diatheke/pqa/src/dict.html new file mode 100644 index 0000000..944bce3 --- /dev/null +++ b/utilities/diatheke/pqa/src/dict.html @@ -0,0 +1,32 @@ + + +HANDiatheke + + +
+

Query: + + + +

+ +

+Stong's*| Footnotes| Search

+
+

+Bible Dictionaries
+Easton's Bible Dictionary
+Hitchcock's Bible Names Dictionary
+Int'l Standard Bible Encyclopedia
+Smith's Bible Dictionary
+Vine's Bible Dictionary
+

+

+Topical References
+Naves' Topical Bible
+R. A. Torrey's New Topical Textbook
+

+
+
+ + diff --git a/utilities/diatheke/pqa/src/english.html b/utilities/diatheke/pqa/src/english.html new file mode 100644 index 0000000..774245c --- /dev/null +++ b/utilities/diatheke/pqa/src/english.html @@ -0,0 +1,68 @@ + + +HANDiatheke + + +
+

Query: + + + +

+ +

+Stong's*| Footnotes| Search

+
+

+Bibles
+Analytical-Literal Trans. (ALT)
+American Standard Ver. (ASV)
+Bible in Basic English (BBE)
+Brenton's English LXX Trans. [OT]
+Darby's Bible
+Douay-Rheims (DR)
+Douay-Rheims 1899 American Ed.
+Hebrew Names Ver. (HNV)
+International Standard Ver. (ISV) [NT]
+JPS 1917 Tanakh [OT]
+21st Century King James Ver. (KJ21)
+King James Ver. (KJV/AV) *
+Green's Literal Trans. (LitV)
+The Living Oracles [NT]
+A Modern King James Ver. (MKJV)
+New American Standard (NASB)
+New American Standard, 95 Update
+New International Ver. (NIV)
+New International Ver., British Ed.
+New Jerusalem Bible (NJB)
+New King James Ver. (NKJV)
+New Living Trans. (NLT)
+New Revised Standard Ver. (NRSV)
+Orthodox Jewish Brit Chadasha [NT]
+Revised Standard Ver. (RSV)
+Revised 1833 Webster's Bible *
+World English Bible (WEB)
+Webster's Bible
+Weymouth New Testament [NT]
+Young's Literal Trans. (YLT)

+

+Commentaries
+Darby Translation Notes
+Family Bible Notes
+The Fourfold Gospel
+Geneva Bible Translation Notes
+Gill's Expositor
+Matthew Henry's Commentary
+Matthew Henry's Concise Commentary
+The People's New Testament
+Robertson's Word Pictures
+Scofield Reference Notes, 1917 Ed.
+John Wesley's Notes on the Bible
+

+Cross-references
+Treasury of Scriptural Knowledge
+

+
+
+ + diff --git a/utilities/diatheke/pqa/src/french.html b/utilities/diatheke/pqa/src/french.html new file mode 100644 index 0000000..4aeea79 --- /dev/null +++ b/utilities/diatheke/pqa/src/french.html @@ -0,0 +1,26 @@ + + +HANDiatheke + + +
+

Query: + + + +

+ +

+Stong's*| Footnotes| Search

+
+

+Bibles
+French Haitian Creaole Ver.
+French Darby Trans.
+French 1910 Louis Segond (LSG)
+French Nouvelle Edition de Geneve 1979
+

+
+
+ + diff --git a/utilities/diatheke/pqa/src/german.html b/utilities/diatheke/pqa/src/german.html new file mode 100644 index 0000000..d772a56 --- /dev/null +++ b/utilities/diatheke/pqa/src/german.html @@ -0,0 +1,35 @@ + + +HANDiatheke + + +
+

Query: + + + +

+ +

+Stong's*| Footnotes| Search

+
+

+Bibles
+German Bengel [NT]
+German Einheitsuebersetzung
+German 1905 Darby Unrev. Elberfelder
+German 1912 Luther
+German 1545 Luther
+German 1993 Elberfelder, rev. Fassung
+German 1984 Revised Luther
+German 1951 Schlachter Bibel
+

+

Commentaries
+Matthias Ansorgs Kommentar
+Carl Heinrich Riegers Kommentar
+German Scofield 1917 Ed. (Gen-Eccl)
+

+
+
+ + diff --git a/utilities/diatheke/pqa/src/index.html b/utilities/diatheke/pqa/src/index.html new file mode 100644 index 0000000..ff7a8c4 --- /dev/null +++ b/utilities/diatheke/pqa/src/index.html @@ -0,0 +1,43 @@ + + +HANDiatheke + + + + +
+
+ Quick lookup in KJV, NIV, NAS, & WEB:
+ + + + + + + +

+ All Books
+

+ + + + + +
Dictionaries & Topics Lexica
+

+ Bibles & Commentaries:
+ + + + + + + + + + + +
English French German
Ancient Spanish Other
+
+ + diff --git a/utilities/diatheke/pqa/src/lex.html b/utilities/diatheke/pqa/src/lex.html new file mode 100644 index 0000000..29fe0f7 --- /dev/null +++ b/utilities/diatheke/pqa/src/lex.html @@ -0,0 +1,29 @@ + + +HANDiatheke + + +
+

Query: + + + +

+ +

+Stong's*| Footnotes| Search

+
+

+Greek Lexica
+Strong's Greek Lexicon
+Thayer's Greek Lexicon
+

+

+Hebrew Lexica
+Strong's Hebrew Lexicon
+Brown-Driver-Briggs Hebrew Lexicon
+

+
+
+ + diff --git a/utilities/diatheke/pqa/src/other.html b/utilities/diatheke/pqa/src/other.html new file mode 100644 index 0000000..6184f94 --- /dev/null +++ b/utilities/diatheke/pqa/src/other.html @@ -0,0 +1,57 @@ + + +HANDiatheke + + +
+

Query: + + + +

+ +

+Stong's*| Footnotes| Search

+
+

+Bibles
+Albanian Bible
+Czech Bible Kralicka
+Czech Ekumenicky Cesky Preklad
+Czech Preklad KMS Nova Smlouva
+Czech Nova Kralicka Bible
+Danish Danske Bibel
+Dutch Leidse Vertaling
+Dutch Lutherse Vertaling
+Dutch 1951 Bijbelgenootschap Ver.
+Dutch Statenvertaling
+Equadoran Shuar [NT]
+Finish 1933 Phy~N Raamattu
+Hungarian Karoli
+Bahasa Indonesia Sehari-hari (BIS)
+Indonesian Terjemahan Baru (TB)
+Italian Nuovissima Ver., San Paolo Ed.
+Italian 1991 La Nuova Diodati
+Italian 1994 La Nuova Riveduta
+Maori Bible
+Melanesian Pidgin Bible
+Norwegian 1930 Bokmal
+Norwegian 1938 Bokmal
+Norwegian Bibel Konkordant
+Norwegian 1994 Nynorsk
+Norwegian Norsk Bible
+Philippine Nga Cebuano
+Polish 1984 Millenium Bible, 4th Ed.
+Portuguese 1995 Joao Ferreira
+Portuguese 1994 Almeida Biblia
+Romanian Cornilescu Ver.
+Swahili New Testament [NT]
+Swedish 1917 New Testament [NT]
+Turkish New Testament [NT]
+Uma New Testament [NT]
+Vietnamese 1934 Bible
+

+
+
+ + diff --git a/utilities/diatheke/pqa/src/spanish.html b/utilities/diatheke/pqa/src/spanish.html new file mode 100644 index 0000000..e848003 --- /dev/null +++ b/utilities/diatheke/pqa/src/spanish.html @@ -0,0 +1,29 @@ + + +HANDiatheke + + +
+

Query: + + + +

+ +

+Stong's*| Footnotes| Search

+
+

+Bibles
+Spanish La Biblia de Las Americas (LBA)
+Spanish Reina-Valera
+Spanish 1960 Reina-Valera Revised
+Spanish 1995 Reina-Valera Update
+Spanish Ver. Reina-Valera Actualizada
+Spanish 1569 Ver. Antigua
+Spanish 1858 Valera[NT]
+

+
+
+ + diff --git a/utilities/diatheke/soap/sapouni.cgi b/utilities/diatheke/soap/sapouni.cgi new file mode 100755 index 0000000..24df769 --- /dev/null +++ b/utilities/diatheke/soap/sapouni.cgi @@ -0,0 +1,97 @@ +#!/usr/bin/perl + +#version 1.0 + +package sapouni; +$sapouni = "nice /usr/bin/diatheke"; # location of diatheke command line program -- if you are using a MS Windows server, you might need to remove the "nice" + +$sword_path = "/home/sword"; # SWORD_PATH environment variable you want to use +$maxverses = 0; # maximum number of verses diatheke will return per query (prevents people from asking for Gen1:1-Rev22:21; 0 for unlim.) +$defversion = "KJV"; # book to query when none is selected, but a verse/search is entered +$deflocale = "abbr"; # this is just the default for cases where user has not selected a locale and his browser does not reveal one -- you can also set locale using locael= in the GET URL + + +############################################################################### +## You should not need to edit anything below this line. +## Unless you want to modify functionality of course. :) +############################################################################### + +$ENV{'SWORD_PATH'} = $sword_path; + +use SOAP::Transport::HTTP; + +SOAP::Transport::HTTP::CGI + -> dispatch_to('sapouni') + -> handle; + +package sapouni; + +sub biblequery { + my ($class, $books, $key, $options, $encoding, $markup, $searchtype, $locale, $script, $max) = @_; + + if ($key eq "") { + $key = "Jn 3:16"; + } + + @booklist = split ' ', $books; + + $n = scalar(@booklist); + if ($n == 0) { + @booklist[0] = $defversion; + $n++; + } + + $query = ""; + + if ($options ne "") { + $query .= " -o \"$options\""; + } + + if ($encoding ne "") { + $query .= " -e \"$encoding\""; + } + else { + $query .= " -e UTF8"; + } + + if ($markup ne "") { + $query .= " -f \"$markup\""; + } + else { + $query .= " -f ThML"; + } + + if ($searchtype ne "") { + $query .= " -s \"$searchtype\""; + } + + if ($locale ne "") { + $query .= " -l \"$locale\""; + } + else { + $query .= " -l $deflocale"; + } + + if ($script ne "") { + $query .= " -t \"$script\""; + } + + if ($max ne "" && $max ne 0) { + $query .= " -m \"$max\""; + } + + $rval = ""; + for ($i = 0; $i < $n; $i++) { + $line = "$sapouni $query -b $booklist[$i] -k \"$key\" 2> /dev/null"; + + # uncomment to print the command line send to Diatheke (for debugging) + # $rval .= "$line\n"; + + $line = `$line`; + chomp($line); + + $rval .= "$line\n"; + } + + return "$rval"; +} diff --git a/utilities/diatheke/soap/soapatheke.pl b/utilities/diatheke/soap/soapatheke.pl new file mode 100755 index 0000000..e3f88ed --- /dev/null +++ b/utilities/diatheke/soap/soapatheke.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +## This is a test app and has no other purpose. + +use SOAP::Lite; + +my ($books, $key, $options, $encoding, $markup, $searchtype, $locale, $script, $max) = @ARGV; + +# uncomment to see parameters being passed to the SOAP server (for debugging) +# print "$books\n$key\n$options\n$encoding\n$markup\n$searchtype\n$locale\n$script\n$max\n"; + +print SOAP::Lite + -> uri('http://bible.gotjesus.org/sapouni') + -> proxy('http://bible.gotjesus.org/cgi-bin/sapouni.cgi') + -> biblequery($books, $key, $options, $encoding, $markup, $searchtype, $locale, $script, $max) + -> result; diff --git a/utilities/diatheke/tcl/biblebot-diatheke.tcl b/utilities/diatheke/tcl/biblebot-diatheke.tcl new file mode 100644 index 0000000..1fea379 --- /dev/null +++ b/utilities/diatheke/tcl/biblebot-diatheke.tcl @@ -0,0 +1,2131 @@ +# Diatheke/Tcl 3.0 by Chris Little +# Based on code schema of + +# Copyright 1999 by Chris Little +# Licensed under GNU General Public License (GPL) +# see accompanying LICENSE file for license details + +# This script is intended for use with libraries and modules from +# the SWORD Project, available at http://www.crosswire.org/ +# +# To install Diatheke/Tcl, install an eggdrop IRC bot, copy the +# Diatheke/Tcl .tcl file to your eggdrop scripts directory, and +# add a line to the end of your bot startup script to load the +# Diatheke/Tcl script. This script has been tested with eggdrop 1.3.23 +# but should function fine in later versions. +# +# This is script assumes you have every single SWORD module installed +# that was available at the time of release. Since you probably do not, +# remove all modules listed in the pub_books function that you do not +# have installed to hide them from end-users. +# +# The !history command only works if you have LOGGING turned on in +# diatheke (the command line C program). This command is commented out +# of the help function and must be uncommented to make it show up for +# end-users. +# +# When you get the script loaded, type !biblehelp in a channel where +# the bot is present and it will give you a full list of commands. +# More commands will appear to you depending upon which mode the bot is +# in and whether you are an op on the bot or voiced in the channel. + +set diaver 4.0 + +#modify this to reflect actual location of diatheke and dict binaries +set diatheke "/usr/bin/diatheke" +set dict "/usr/bin/dict" + +proc publookupverse {vlookup} { + global botnick chan bibver diatheke + + set arg "-b" + set n [string first "@" $vlookup] + if {$n > -1 && $n < 2} { + append arg n + } + + set n [string first "#" $vlookup] + if {$n > -1 && $n < 2} { + append arg f + } + set vlookup [string trimleft $vlookup "#"] + set vlookup [string trimleft $vlookup "@"] + set vlookup [string trimleft $vlookup "#"] + + catch {exec $diatheke -f plaintext -o $arg -b $bibver -k "$vlookup" >& /tmp/fooout.$botnick} + catch {set foofile [open /tmp/fooout.$botnick]} + while {[gets $foofile fooverse] >= 0} { + set len [string length $fooverse] + set i 0 + set j 255 + while {$j < $len} { + if {[regexp ">" $fooverse]} { + while {[string index $fooverse $j] != ">" && [string index $fooverse $j] != "\n"} {set j [expr $j - 1]} + } else { + while {[string index $fooverse $j] != " " && [string index $fooverse $j] != "\n"} {set j [expr $j - 1]} + } + set foo2 [string range $fooverse $i $j] + set foo2 [string trim $foo2] + regsub -all -nocase {(||)} $foo2 {} foo2 + regsub -all {} $foo2 {(footnote: } foo2 + regsub -all {} $foo2 {)} foo2 + putmsg $chan "$foo2" + set i [expr $j + 1] + set j [expr $j + 256] + if {$j > $len} {set j $len} + } + set foo2 [string range $fooverse $i end] + set foo2 [string trim $foo2] + regsub -all -nocase {(||)} $foo2 {} foo2 + regsub -all {} $foo2 {(footnote: } foo2 + regsub -all {} $foo2 {)} foo2 + putmsg $chan "$foo2" + } + + catch {close $foofile} + exec rm /tmp/fooout.$botnick + return 1 +} + + +proc pub_lookup {nick uhost hand channel arg} { + global von chan bibver + set chan $channel + if {$von==0} { + putmsg $nick "Verse display is currently off." + return 0 + } + if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} { + putmsg $nick "Only ops can display verses at this time." + return 0 + } + + publookupverse $arg + +} + +bind pub - !kjv setver_kjv +bind pub - !english setver_kjv + +proc setver_kjv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver KJV + pub_lookup $nick $uhost $hand $channel $arg +} + + +bind pub - !niv setver_niv + +proc setver_niv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NIV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !dr setver_dr +bind pub - !douayrheims setver_dr +bind pub - !dre setver_dr + +proc setver_dr {nick uhost hand channel arg} { + global botnick chan bibver + set bibver DR + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !nas setver_nasb +bind pub - !nasb setver_nasb + +proc setver_nasb {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NASB + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !hnv setver_hnv + +proc setver_hnv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver HNV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !web setver_web + +proc setver_web {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WEB + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !akjv setver_akjv + +proc setver_akjv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver AKJV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !bbe setver_bbe + +proc setver_bbe {nick uhost hand channel arg} { + global botnick chan bibver + set bibver BBE + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !webster setver_webster + +proc setver_webster {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Websters + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !jbc setver_jbc + +proc setver_jbc {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ORTHJBC + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !rva setver_rva +bind pub - !spanish setver_rva + +proc setver_rva {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaRVA + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !lsg setver_lsg +bind pub - !french setver_lsg + +proc setver_lsg {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FreLSG + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !bis setver_bis +bind pub - !indonesian setver_bis + +proc setver_bis {nick uhost hand channel arg} { + global botnick chan bibver + set bibver IndBIS + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !tb setver_tb + +proc setver_tb {nick uhost hand channel arg} { + global botnick chan bibver + set bibver IndTB + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !sve setver_sve +bind pub - !swedish setver_sve + +proc setver_sve {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SweSve + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !vnt setver_vnt + +proc setver_vnt {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaVNT + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !asv setver_asv + +proc setver_asv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ASV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !rsv setver_rsv + +proc setver_rsv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver RSV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !alt setver_alt + +proc setver_alt {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ALT + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !dby setver_dby +bind pub - !darby setver_dby + +proc setver_dby {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Darby + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !pr setver_pr +bind pub - !finnish setver_pr + +proc setver_pr {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FinPR + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !lsg setver_lsg +bind pub - !french setver_lsg + +proc setver_lsg {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FreLSG + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !lut setver_lut +bind pub - !luther setver_lut +bind pub - !german setver_lut + +proc setver_lut {nick uhost hand channel arg} { + global botnick chan bibver + set bibver GerLut + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !sch setver_sch + +proc setver_sch {nick uhost hand channel arg} { + global botnick chan bibver + set bibver GerSch + pub_lookup $nick $uhost $hand $channel $arg +} + + +bind pub - !kar setver_kar +bind pub - !hungarian setver_kar + +proc setver_kar {nick uhost hand channel arg} { + global botnick chan bibver + set bibver HunKar + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !nrv setver_nrv +bind pub - !italian setver_nrv + +proc setver_nrv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ItaNRV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !jps setver_jps + +proc setver_jps {nick uhost hand channel arg} { + global botnick chan bibver + set bibver JPS + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !brp setver_brp +bind pub - !portuguese setver_brp + +proc setver_brp {nick uhost hand channel arg} { + global botnick chan bibver + set bibver PorBRP + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !sev setver_sev + +proc setver_sev {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaSEV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !swahili setver_swahili + +proc setver_swahili {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Swahili + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !wey setver_wey +bind pub - !weymouth setver_wey + +proc setver_wey {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Weymouth + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !ylt setver_ylt + +proc setver_ylt {nick uhost hand channel arg} { + global botnick chan bibver + set bibver YLT + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !alb setver_alb +bind pub - !albanian setver_alb + +proc setver_alb {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Alb + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !gnpu setver_gnpu +bind pub - !chinese setver_gnpu + +proc setver_gnpu {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ChiGNPU + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !dan setver_dan +bind pub - !danish setver_dan + +proc setver_dan {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Dan + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !lei setver_lei +bind pub - !dutch setver_lei + +proc setver_lei {nick uhost hand channel arg} { + global botnick chan bibver + set bibver DutLEI + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !lu setver_lu + +proc setver_lu {nick uhost hand channel arg} { + global botnick chan bibver + set bibver DutLU + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !svv setver_svv + +proc setver_svv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver DutSVV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !shr setver_shr +bind pub - !equadoran setver_shr + +proc setver_shr {nick uhost hand channel arg} { + global botnick chan bibver + set bibver EquShr + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !crl setver_crl +bind pub - !creole setver_crl + +proc setver_crl {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FreCrl + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !fredrb setver_fredrb + +proc setver_fredrb {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FreDrb + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !ben setver_ben + +proc setver_ben {nick uhost hand channel arg} { + global botnick chan bibver + set bibver GerBen + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !elb setver_elb + +proc setver_elb {nick uhost hand channel arg} { + global botnick chan bibver + set bibver GerElb + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !kj21 setver_kj21 + +proc setver_kj21 {nick uhost hand channel arg} { + global botnick chan bibver + set bibver KJ21 + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !litv setver_litv + +proc setver_litv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver LITV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !lo setver_lo + +proc setver_lo {nick uhost hand channel arg} { + global botnick chan bibver + set bibver LO + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !maori setver_maori + +proc setver_maori {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Maori + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !mkjv setver_mkjv + +proc setver_mkjv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver MKJV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !nkj setver_nkjv +bind pub - !nkjv setver_nkjv + +proc setver_nkjv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NKJV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !ceb setver_ceb +bind pub - !filipino setver_ceb + +proc setver_ceb {nick uhost hand channel arg} { + global botnick chan bibver + set bibver PhiCeb + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !rwebster setver_rwebster + +proc setver_rwebster {nick uhost hand channel arg} { + global botnick chan bibver + set bibver RWebster + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !rv setver_rv + +proc setver_rv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaRV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !turkish setver_turkish + +proc setver_turkish {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Turkish + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !uma setver_uma + +proc setver_uma {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Uma + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !vulgate setver_vulgate +bind pub - !vulg setver_vulgate +bind pub - !latin setver_vulgate + +proc setver_vulgate {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Vulgate + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !nasb95 setver_nasb95 +bind pub - !nas95 setver_nasb95 +bind pub - !nau setver_nasb95 + +proc setver_nasb95 {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NASB95 + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !nivbr setver_nivbr +bind pub - !nib setver_nivbr + +proc setver_nivbr {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NIVBr + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !nlt setver_nlt + +proc setver_nlt {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NLT + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !nrsv setver_nrsv + +proc setver_nrsv {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NRSV + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !neg setver_neg + +proc setver_neg {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FreNEG + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !lnd setver_lnd + +proc setver_lnd {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ItaLND + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !mel setver_mel +bind pub - !melanesian setver_mel + +proc setver_mel {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Mel + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !norsk setver_norsk + +proc setver_norsk {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Norsk + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !cor setver_cor + +proc setver_cor {nick uhost hand channel arg} { + global botnick chan bibver + set bibver RomCor + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !lba setver_lba + +proc setver_lba {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaLBA + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !byz setver_byz + +proc setver_byz {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ByzX + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !lxx setver_lxx + +proc setver_lxx {nick uhost hand channel arg} { + global botnick chan bibver + set bibver LXXX + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !na26 setver_na26 +bind pub - !greek setver_na26 + +proc setver_na26 {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NA26X + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !scrivner setver_scrivner + +proc setver_scrivner {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ScrivnerX + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !stephanus setver_stephanus + +proc setver_stephanus {nick uhost hand channel arg} { + global botnick chan bibver + set bibver StephanusX + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !tischendorf setver_tisch +bind pub - !tisch setver_tisch + +proc setver_tisch {nick uhost hand channel arg} { + global botnick chan bibver + set bibver TischX + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !wh setver_wh + +proc setver_wh {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WHX + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !whnu setver_whnu + +proc setver_whnu {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WHNUX + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !grkbyz setver_grkbyz + +proc setver_grkbyz {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Byz + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !grklxx setver_grklxx + +proc setver_grklxx {nick uhost hand channel arg} { + global botnick chan bibver + set bibver LXX + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !grkna26 setver_grkna26 +bind pub - !grkgreek setver_na26 + +proc setver_grkna26 {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NA26 + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !grkscrivner setver_grkscrivner + +proc setver_grkscrivner {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Scrivner + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !grkstephanus setver_grkstephanus + +proc setver_grkstephanus {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Stephanus + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !grktischendorf setver_grktisch +bind pub - !grktisch setver_grktisch + +proc setver_grktisch {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Tisch + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !grkwh setver_grkwh + +proc setver_grkwh {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WH + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !grkwhnu setver_grkwhnu + +proc setver_grkwhnu {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WHNU + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !bhs setver_bhs +bind pub - !hebrew setver_bhs + +proc setver_bhs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver BHS + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !rst setver_rst + +proc setver_rst {nick uhost hand channel arg} { + global botnick chan bibver + set bibver RST + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !ukrainian setver_ukrainian + +proc setver_ukrainian {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Ukrainian + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !arabic setver_arabic + +proc setver_arabic {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Arabic + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !n27u4 setver_n27u4 +bind pub - !nu setver_n27u4 +bind pub - !bgreek setver_n27u4 + +proc setver_n27u4 {nick uhost hand channel arg} { + global botnick chan bibver + set bibver N27U4 + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !umgreek setver_ukgreek + +proc setver_umgreek {nick uhost hand channel arg} { + global botnick chan bibver + set bibver UMGreek + pub_lookup $nick $uhost $hand $channel $arg +} + +bind pub - !viet setver_viet +bind pub - !vietnamese setver_viet + +proc setver_viet {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Viet + pub_lookup $nick $uhost $hand $channel $arg +} + + +# ---------------------------------------------------------------------- + +proc pubsearchword {vlookup} { + global botnick chan bibver diatheke + catch {exec $diatheke -s $bibver "$vlookup" >& /tmp/fooout.$botnick} + catch {set foofile [open /tmp/fooout.$botnick]} + + while {[gets $foofile fooverse] >= 0} { + set len [string length $fooverse] + set i 0 + set j 72 + while {$j < $len} { + while {[string index $fooverse $j] != ";" && [string index $fooverse $j] != ")" && [string index $fooverse $j] != "\n"} {set j [expr $j + 1]} + set foo2 [string range $fooverse $i $j] + set foo2 [string trim $foo2] + putmsg $chan "$foo2" + set i [expr $j + 1] + set j [expr $j + 73] + if {$j > $len} {set j $len} + } + set foo2 [string range $fooverse $i end] + set foo2 [string trim $foo2] + putmsg $chan "$foo2" + } + catch {close $foofile} + + putmsg $chan "$fooverse" + exec rm /tmp/fooout.$botnick + return 1 +} + + +proc pub_lookups {nick uhost hand channel arg} { + global von chan bibver + set chan $channel + if {$von==0} { + putmsg $nick "Verse display is currently off." + return 0 + } + if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $chan])} { + putmsg $nick "Sorry, only ops and voiced users can do searches right now." + return 0 + } + if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} { + putmsg $nick "Sorry, only ops can do searches right now." + return 0 + } + + pubsearchword $arg +} + +bind pub - !skjv setver_kjvs +bind pub - !senglish setver_kjvs + +proc setver_kjvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver KJV + pub_lookups $nick $uhost $hand $channel $arg +} + + +bind pub - !sniv setver_nivs + +proc setver_nivs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NIV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sdr setver_drs +bind pub - !sdouayrheims setver_drs +bind pub - !sdre setver_drs + +proc setver_drs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver DR + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !snas setver_nasbs +bind pub - !snasb setver_nasbs + +proc setver_nasbs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NASB + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !shnv setver_hnvs + +proc setver_hnvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver HNV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sweb setver_webs + +proc setver_webs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WEB + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sbbe setver_bbes + +proc setver_bbes {nick uhost hand channel arg} { + global botnick chan bibver + set bibver BBE + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !swebster setver_websters + +proc setver_websters {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Websters + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sjbc setver_jbcs + +proc setver_jbcs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ORTHJBC + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !srva setver_rvas +bind pub - !sspanish setver_rvas + +proc setver_rvas {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaRVA + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sbis setver_biss +bind pub - !sindonesian setver_biss + +proc setver_biss {nick uhost hand channel arg} { + global botnick chan bibver + set bibver IndBIS + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !stb setver_tbs + +proc setver_tbs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver IndTB + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !ssve setver_sves +bind pub - !sswedish setver_sves + +proc setver_sves {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SweSve + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !svnt setver_vnts + +proc setver_vnts {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaVNT + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sasv setver_asvs + +proc setver_asvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ASV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !srsv setver_rsvs + +proc setver_rsvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver RSV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !salt setver_alts + +proc setver_alts {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ALT + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sdby setver_dbys +bind pub - !sdarby setver_dbys + +proc setver_dbys {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Darby + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !spr setver_prs +bind pub - !sfinnish setver_prs + +proc setver_prs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FinPR + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !slsg setver_lsgs +bind pub - !sfrench setver_lsgs + +proc setver_lsgs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FreLSG + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !slut setver_luts +bind pub - !sluther setver_luts +bind pub - !sgerman setver_luts + +proc setver_luts {nick uhost hand channel arg} { + global botnick chan bibver + set bibver GerLut + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !ssch setver_schs + +proc setver_schs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver GerSch + pub_lookups $nick $uhost $hand $channel $arg +} + + +bind pub - !skar setver_kars +bind pub - !shungarian setver_kars + +proc setver_kars {nick uhost hand channel arg} { + global botnick chan bibver + set bibver HunKar + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !snrv setver_nrvs +bind pub - !sitalian setver_nrvs + +proc setver_nrvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ItaNRV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sjps setver_jpss + +proc setver_jpss {nick uhost hand channel arg} { + global botnick chan bibver + set bibver JPS + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sbrp setver_brps +bind pub - !sportuguese setver_brps + +proc setver_brps {nick uhost hand channel arg} { + global botnick chan bibver + set bibver PorBRP + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !ssev setver_sevs + +proc setver_sevs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaSEV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sswahili setver_swahilis + +proc setver_swahilis {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Swahili + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !swey setver_weys +bind pub - !sweymouth setver_weys + +proc setver_weys {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Weymouth + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sylt setver_ylts + +proc setver_ylts {nick uhost hand channel arg} { + global botnick chan bibver + set bibver YLT + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !salb setver_albs +bind pub - !salbanian setver_albs + +proc setver_albs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ALB + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sgnpu setver_gnpus +bind pub - !schinese setver_gnpus + +proc setver_gnpus {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ChiGNPU + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sdan setver_dans +bind pub - !sdanish setver_dans + +proc setver_dans {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Dan + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !slei setver_leis +bind pub - !sdutch setver_leis + +proc setver_leis {nick uhost hand channel arg} { + global botnick chan bibver + set bibver DutLEI + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !slu setver_lus + +proc setver_lus {nick uhost hand channel arg} { + global botnick chan bibver + set bibver DutLU + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !ssvv setver_svvs + +proc setver_svvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver DutSVV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sshr setver_shrs +bind pub - !sequadoran setver_shrs + +proc setver_shrs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver EquShr + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !scrl setver_crls +bind pub - !screole setver_crls + +proc setver_crls {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FreCrl + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sfredrb setver_fredrbs + +proc setver_fredrbs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FreDrb + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sben setver_bens + +proc setver_bens {nick uhost hand channel arg} { + global botnick chan bibver + set bibver BerBen + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !selb setver_elbs + +proc setver_elbs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver GerElb + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !skj21 setver_kj21s + +proc setver_kj21s {nick uhost hand channel arg} { + global botnick chan bibver + set bibver KJ21 + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !slitv setver_litvs + +proc setver_litvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver LITV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !slo setver_los + +proc setver_los {nick uhost hand channel arg} { + global botnick chan bibver + set bibver LO + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !smaori setver_maoris + +proc setver_maoris {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Mao + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !smkjv setver_mkjvs + +proc setver_mkjvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver MKJV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !snkjv setver_nkjvs + +proc setver_nkjvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NKJV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sceb setver_cebs +bind pub - !sfilipino setver_cebs + +proc setver_cebs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver PhiCeb + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !srwebster setver_rwebsters + +proc setver_rwebsters {nick uhost hand channel arg} { + global botnick chan bibver + set bibver RWebster + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !srv setver_rvs + +proc setver_rvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaRV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sturkish setver_turkishs + +proc setver_turkishs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Turkish + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !suma setver_umas + +proc setver_umas {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Uma + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !svulgate setver_vulgates +bind pub - !svulg setver_vulgates +bind pub - !slatin setver_vulgates + +proc setver_vulgates {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Vulgate + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !snasb95 setver_nasb95s +bind pub - !snas95 setver_nasb95s +bind pub - !snau setver_nasb95s + +proc setver_nasb95s {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NASB95 + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !snivbr setver_nivbrs +bind pub - !snib setver_nivbrs + +proc setver_nivbrs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NIVBr + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !snlt setver_nlts + +proc setver_nlts {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NLT + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !snrsv setver_nrsvs + +proc setver_nrsvs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NRSV + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sneg setver_negs + +proc setver_negs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver FreNEG + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !slnd setver_lnds + +proc setver_lnds {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ItaLND + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !smel setver_mels +bind pub - !smelanesian setver_mels + +proc setver_mels {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Mel + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !snorsk setver_norsks + +proc setver_norsks {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Norsk + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !scor setver_cors + +proc setver_cors {nick uhost hand channel arg} { + global botnick chan bibver + set bibver RomCor + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !slba setver_lbas + +proc setver_lbas {nick uhost hand channel arg} { + global botnick chan bibver + set bibver SpaLBA + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sbyz setver_byzs + +proc setver_byzs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ByzX + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !slxx setver_lxxs + +proc setver_lxxs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver LXXX + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sna26 setver_na26s +bind pub - !sgreek setver_na26s + +proc setver_na26s {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NA26X + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sscrivner setver_scrivners + +proc setver_scrivners {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ScrivnerX + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sstephanus setver_stephanuss + +proc setver_stephanuss {nick uhost hand channel arg} { + global botnick chan bibver + set bibver StephanusX + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !stischendorf setver_tischs +bind pub - !stisch setver_tischs + +proc setver_tischs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver TischX + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !swh setver_whs + +proc setver_whs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WHX + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !swhnu setver_whnus + +proc setver_whnus {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WHNUX + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sgrkbyz setver_grkbyzs + +proc setver_grkbyzs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Byz + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sgrklxx setver_grklxxs + +proc setver_grklxxs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver LXX + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sgrkna26 setver_grkna26s +bind pub - !sgrkgreek setver_na26s + +proc setver_grkna26s {nick uhost hand channel arg} { + global botnick chan bibver + set bibver NA26 + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sgrkscrivner setver_grkscrivners + +proc setver_grkscrivners {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Scrivner + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sgrkstephanus setver_grkstephanuss + +proc setver_grkstephanuss {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Stephanus + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sgrktischendorf setver_grktischs +bind pub - !sgrktisch setver_grktischs + +proc setver_grktischs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Tisch + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sgrkwh setver_grkwhs + +proc setver_grkwhs {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WH + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sgrkwhnu setver_grkwhnus + +proc setver_grkwhnus {nick uhost hand channel arg} { + global botnick chan bibver + set bibver WHNU + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sbhs setver_bhss +bind pub - !shebrew setver_bhss + +proc setver_bhss {nick uhost hand channel arg} { + global botnick chan bibver + set bibver BHS + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !srst setver_rsts + +proc setver_rsts {nick uhost hand channel arg} { + global botnick chan bibver + set bibver RST + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sukrainian setver_ukrainians + +proc setver_ukrainians {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Ukrainian + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sarabic setver_arabics + +proc setver_arabics {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Arabic + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sn27u4 setver_n27u4s +bind pub - !snu setver_n27u4s +bind pub - !sbgreek setver_n27u4s + +proc setver_n27u4s {nick uhost hand channel arg} { + global botnick chan bibver + set bibver N27U4 + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sumgreek setver_ukgreeks + +proc setver_umgreeks {nick uhost hand channel arg} { + global botnick chan bibver + set bibver UMGreek + pub_lookups $nick $uhost $hand $channel $arg +} + +bind pub - !sviet setver_viets +bind pub - !svietnamese setver_viets + +proc setver_viets {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Viet + pub_lookups $nick $uhost $hand $channel $arg +} + +#---------------------------------------------------------------------- + + +proc publookupdict {vlookup} { + global botnick chan bibver diatheke + catch {exec $diatheke -f plaintext -b $bibver -k "$vlookup" >& /tmp/fooout.$botnick} + catch {set foofile [open /tmp/fooout.$botnick]} + + while {[gets $foofile fooverse] >= 0} { + putmsg $chan "$fooverse" + } + catch {close $foofile} + # exec rm /tmp/fooout.$botnick + return 1 +} + + +proc pub_lookupd {nick uhost hand channel arg} { + global von chan bibver + set chan $channel + if {$von==0} { + putmsg $nick "Verse display is currently off." + return 0 + } + if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $chan])} { + putmsg $nick "Sorry, only ops and voiced users can use dictionaries and indices right now." + return 0 + } + if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} { + putmsg $nick "Sorry, only ops can use dictionaries and indices right now." + return 0 + } + + publookupdict $arg +} + +bind pub - !losung setver_losung + +proc setver_losung {nick uhost hand channel arg} { + global botnick chan bibver + set bibver losung_en_99 + set arg [exec date "+%m.%d"] + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !vines setver_vines + +proc setver_vines {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Vines + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !naves setver_naves + +proc setver_naves {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Naves + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !eastons setver_eastons + +proc setver_eastons {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Eastons + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !strheb setver_strheb + +proc setver_strheb {nick uhost hand channel arg} { + global botnick chan bibver + set bibver StrongsHebrew + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !strgrk setver_strgrk + +proc setver_strgrk {nick uhost hand channel arg} { + global botnick chan bibver + set bibver StrongsGreek + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !bdb setver_bdb + +proc setver_bdb {nick uhost hand channel arg} { + global botnick chan bibver + set bibver BDB + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !thayer setver_thayer + +proc setver_thayer {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Thayer + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !hitch setver_hitch + +proc setver_hitch {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Hitch + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !isbe setver_isbe + +proc setver_isbe {nick uhost hand channel arg} { + global botnick chan bibver + set bibver ISBE + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !smiths setver_smiths + +proc setver_smiths {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Smiths + pub_lookupd $nick $uhost $hand $channel $arg +} + +bind pub - !torrey setver_torrey + +proc setver_torrey {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Torrey + pub_lookupd $nick $uhost $hand $channel $arg +} + +#---------------------------------------------------------------------- + +proc publookupcomm {vlookup} { + global botnick chan bibver diatheke + catch {exec $diatheke -c $bibver "$vlookup" >& /tmp/fooout.$botnick} + catch {set foofile [open /tmp/fooout.$botnick]} + while {[gets $foofile fooverse] >= 0} { + set len [string length $fooverse] + set i 0 + set j 72 + while {$j < $len} { + while {[string index $fooverse $j] != " " && [string index $fooverse $j] != "\n"} {set j [expr $j + 1]} + set foo2 [string range $fooverse $i $j] + set foo2 [string trim $foo2] + regsub -all -nocase {(||)} $foo2 {} foo2 + regsub -all {} $foo2 {(footnote: } foo2 + regsub -all {} $foo2 {)} foo2 + putmsg $chan "$foo2" + set i [expr $j + 1] + set j [expr $j + 73] + if {$j > $len} {set j $len} + } + set foo2 [string range $fooverse $i end] + set foo2 [string trim $foo2] + regsub -all -nocase {(||)} $foo2 {} foo2 + regsub -all {} $foo2 {(footnote: } foo2 + regsub -all {} $foo2 {)} foo2 + putmsg $chan "$foo2" + } + catch {close $foofile} + exec rm /tmp/fooout.$botnick + return 1 +} + + +proc pub_lookupc {nick uhost hand channel arg} { + global von chan bibver + set chan $channel + if {$von==0} { + putmsg $nick "Verse display is currently off." + return 0 + } + if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $chan])} { + putmsg $nick "Sorry, only ops and voiced users can use commentaries right now." + return 0 + } + if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} { + putmsg $nick "Sorry, only ops can use commentaries right now." + return 0 + } + + publookupcomm $arg +} + +bind pub - !rwp setver_rwp + +proc setver_rwp {nick uhost hand channel arg} { + global botnick chan bibver + set bibver RWP + pub_lookupc $nick $uhost $hand $channel $arg +} + +bind pub - !mhc setver_mhc + +proc setver_mhc {nick uhost hand channel arg} { + global botnick chan bibver + set bibver MHC + pub_lookupc $nick $uhost $hand $channel $arg +} + +bind pub - !dtn setver_dtn + +proc setver_dtn {nick uhost hand channel arg} { + global botnick chan bibver + set bibver DTN + pub_lookupc $nick $uhost $hand $channel $arg +} + +bind pub - !family setver_family + +proc setver_family {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Family + pub_lookupc $nick $uhost $hand $channel $arg +} + +bind pub - !geneva setver_geneva + +proc setver_geneva {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Geneva + pub_lookupc $nick $uhost $hand $channel $arg +} + +bind pub - !gill setver_gill + +proc setver_gill {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Gill + pub_lookupc $nick $uhost $hand $channel $arg +} + +bind pub - !pnt setver_pnt + +proc setver_pnt {nick uhost hand channel arg} { + global botnick chan bibver + set bibver PNT + pub_lookupc $nick $uhost $hand $channel $arg +} + +bind pub - !tfg setver_tfg + +proc setver_tfg {nick uhost hand channel arg} { + global botnick chan bibver + set bibver TFG + pub_lookupc $nick $uhost $hand $channel $arg +} + +bind pub - !tsk setver_tsk + +proc setver_tsk {nick uhost hand channel arg} { + global botnick chan bibver + set bibver TSK + pub_lookupc $nick $uhost $hand $channel $arg +} + +bind pub - !wesley setver_wesley + +proc setver_wesley {nick uhost hand channel arg} { + global botnick chan bibver + set bibver Wesley + pub_lookupc $nick $uhost $hand $channel $arg +} + +#---------------------------------------------------------------------- + +bind pub - !dict dictlookup + +proc dictlookup {nick uhost hand channel arg} { + global botnick von dict + + if {$von==0} { + putmsg $nick "Verse display is currently off." + return 0 + } + if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $channel])} { + putmsg $nick "Sorry, only ops and voiced users can use dictionaries and indices right now." + return 0 + } + if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} { + putmsg $nick "Only ops can use dictionaries and indices right now." + return 0 + } + + catch {exec $dict "$arg" >& /tmp/fooout.$botnick} + catch {set foofile [open /tmp/fooout.$botnick]} + catch {set fooverse [gets $foofile]} + while {[gets $foofile fooverse] >= 0} { + set fooverse [string trim $fooverse] + putmsg $channel "$fooverse" + } + catch {close $foofile} + exec rm /tmp/fooout.$botnick + return 1 +} + +#---------------------------------------------------------------------- + +bind pub - !biblehelp pub_help +bind msg - biblehelp pub_help + +proc pub_help {nick uhost hand channel arg} { + global diaver + global von + putserv "NOTICE $nick :Diatheke/Tcl BibleBot version $diaver" + + if {(($von==0) || ($von==2)) && (![matchattr $hand 3]) && (![matchattr $hand o])} { + putserv "NOTICE $nick :BibleBot displays are currently turned off." + return 1 + } + + putserv "NOTICE $nick :Supported commands:" + putserv "NOTICE $nick :Help, using \"!biblehelp\"" + putserv "NOTICE $nick :Book list, using \"!books\" (it's long)" +# Uncomment the next line if you have turned LOGGING on in diatheke to enable +# the history function. +# putserv "NOTICE $nick :See last 5 calls to BibleBot, using \"!history\"" + putserv "NOTICE $nick :Check display status, using \"!status\"" + putserv "NOTICE $nick :Bible lookups, using \"! :\"" + putserv "NOTICE $nick :verse ranges can be specified by adding \"-\" to this" + putserv "NOTICE $nick :To turn Strong's numbers and/or footnotes on, use @ and/or # respectively before the book name. For example \"!kjv @#Gen 1:4\" will retrieve Genesis 1:3 with the Strong's numbers and footnotes associated with it." + + if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $channel])} { + return 1 + } + + putserv "NOTICE $nick :Commentary lookups, using \"! :\"" + putserv "NOTICE $nick :Dictionary/index lookups, using \"! \"" + putserv "NOTICE $nick :Bible searches, using \"!s \"" + putserv "NOTICE $nick :Diatheke/Tcl defaults to PHRASE search mode. To use MULTI-WORD search mode, preface your search with an @. To use REGEX mode, preface your search with a #. For example: \"!skjv @Jesus love\" will print a list of all verses in the KJV containing the words Jesus and love." + + if {(![matchattr $hand 3]) && (![matchattr $hand o])} { + return 1 + } + + putserv "NOTICE $nick :To turn verse display off, use \"!verseoff\"" + putserv "NOTICE $nick :To turn all displays on for all users, use \"!verseon\"" + putserv "NOTICE $nick :To turn all displays on for ops only, use \"!verseon o\"" + putserv "NOTICE $nick :To turn verse diaplays on for regular users and all other displays on for ops and voiced users only, use \"!verseon v\" (default)" +} + +bind pub - !books pub_books +bind msg - books pub_books + +proc pub_books {nick uhost hand channel arg} { + global von + + if {(($von==0) || ($von==2)) && (![matchattr $hand 3]) && (![matchattr $hand o])} { + putserv "NOTICE $nick :BibleBot displays are currently turned off." + return 1 + } + + putserv "NOTICE $nick :English language Bibles (26):" + putserv "NOTICE $nick :Ameican Standard Version (!asv), Analytical Literal Translation (!alt), Bible in Basic English (!bbe), Darby (!dby), Douay-Rheims Bible (!dr), Green's Literal Translation (!litv), Green's Modern King James Version (!mkjv), Hebrew Names Version (!hnv), Jewish Publication Society 1917 (!jps), King James Version (!kjv), The Living Oracles NT (!lo)," + putserv "NOTICE $nick :New American Standard Bible (!nasb), New American Standard Bible, 95 Update (!nasb95), New International Version (!niv), New Internation Version, British Edition (!nivbr), New King James Version (!nkjv), New Living Translation (!nlt), New Revised Standard Version (!nrsv), Orthodox Jewish Brit ChadashaNT only (!jbc)," + putserv "NOTICE $nick :Revised Standard Version (!rsv), Revised 1833 Webster's (!rwebster), World English Bible (!web), Webster's (!webster), Weymouth NT (!wey), Young's Literal Translation (!ylt), 21st Century King James Version (!kj21)" + putserv "NOTICE $nick :Non-English language Bibles (39):" + putserv "NOTICE $nick :Albanian Bible (!alb), Chinese GNPU (!gnpu), Danish Bible (!dan), Dutch Leidse Vertaling (!lei), Dutch Lutherse Vertaling (!lu), Dutch Statemvertaling (!svv), Equadoran Shuar NT (!shr), Filipino Nga Cebuano (!ceb), Finnish Pyhz Raamattu (!pr), French Louis Segond Version (!lsg), French Haitian Creole Version (!crl), French Darby's Version (!fredrb)," + putserv "NOTICE $nick :French Nouvelle Edition de Geneve (!neg), German Luther Version (!lut), German Schlachter (!sch), German Bengel NT (!ben), German Elberfelder Version (!elb), Hungarian Karoli (!kar), Indonesian Bahasa Indonesia Sehari-hari (!bis), Indonesian Terjemahan Baru (!tb), Italian La Nouva Diodati (!lnd), Italian La Sacra Bibbia Nuova Riveduta (!nrv)," + putserv "NOTICE $nick :Maori Bible (!maori), Melanesian Pidgin Bible (!mel), Norsk Bible (!norsk), Portuguese A Biblia Sagrada Traduzida em Portugues (!brp), Spanish La Biblia de Las Americas (!lba), Spanish Reina-Valera Actualizada (!rva), Spanish Reina-Valera (!rv), Spanish Sagradas Escrituras (!sev), Spanish Valera NT only (!vnt), Swahili NT (!swahili)," + putserv "NOTICE $nick :Swedish 1917 Bible NT only (!sve), Turkish NT (!turkish), Uma NT (!uma)" + putserv "NOTICE $nick :Original Language Bibles (18): (NB, /'s divide transliterated/non-roman versions)" + putserv "NOTICE $nick :1991 Byzantine/Majority Text (!byz/!grkbyz), Nestle-Aland 26th/27th Ed. (!na26/!grkna26), 1894 Scrivner Textus Receptus (!scrivner/!grkscrivner), 1550 Stephanus Textus Receptus (!stephanus/!grkstephanus), Tischendorf' 8th Ed. GNT (!tisch/!grktisch), 1881 Westcott-Hort GNT (!wh/!grkwh), 1881 Westcott-Hort with NA26 alternate readings (!whnu/!grkwhnu)" + putserv "NOTICE $nick: Nestle-Aland 27th Ed./UBS 4th Ed. (!n27u4), Septuagint/LXX (!lxx/!grklxx), Biblia Hebraica Stuttgartensia in Hebrew font (!bhs), Jerome's Latin Vulgate (!vulg)" + putserv "NOTICE $nick :Non-Roman character Bibles (5):" + putserv "NOTICE $nick :Arabic Bible (!arabic), Russian Synodal Translation (!rst), Ukrainian Bible (!ukrainian), Unaccented Modern Greek Bible (!umgreek), Vietnamese Bible (!viet)" + + if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $channel])} { + return 1 + } + + putserv "NOTICE $nick :Dictionaries & Indices (12):" + putserv "NOTICE $nick :Webster's Dictionary (!dict), Vine's Bible Dictionary(!vines), Easton's Bible Dictionary (!eastons), Nave's Topical Bible (!naves), Smith's Bible Dictionary (!smiths), Hitchcock's Bible Names Dictionary (!hitch), International Standard Bible Dictionary (!isbe), Torrey's New Topical Textbook (!torrey), Strong's Hebrew Bible Dictionary (!strheb), Strong's Greek Bible Dictionary (!strgrk), Brown-Driver-Briggs Hebrew Lexicon (!bdb), Thayer's Greek Lexicon (!thayer)" + putserv "NOTICE $nick :Commentaries (10):" + putserv "NOTICE $nick :Darby's Translation Notes (!dtn), Family Bible Notes (!family), Geneva Bible Translation Notes (!geneva), John Gill's Expositor (!gill), Matthew Henry's Concise (!mhc), The People's New Testament (!pnt), Robertson's Word Pictures (!rwp), The Fourfold Gospel (!tfg), Treasury of Scriptural Knowledge (!tsk), Wesley's Bible Notes (!wesley)" +} + +#---------------------------------------------------------------------- + +bind pub - !status pub_status +bind msg - status pub_status + +proc pub_status {nick uhost hand channel arg} { + global von + + if {$von==0} { + putserv "NOTICE $nick :All BibleBot displays are currently off." + } elseif {$von==1} { + putserv "NOTICE $nick :All BibleBot displays are currently on." + } elseif {$von==2} { + putserv "NOTICE $nick :All BibleBot displays are currently on for ops only." + } else { + putserv "NOTICE $nick :Verse displays are currently on for all users, but other BibleBot displays are currently restricted to ops and voiced users." + } + return 1 +} + + +bind pub - !history pub_hist +bind msg - history pub_hist + +proc pub_hist {nick uhost hand channel arg} { + global botnick + catch {exec tail -n 5 /var/log/diatheke.log >& /tmp/fooout.$botnick} + catch {set foofile [open /tmp/fooout.$botnick]} + catch {set fooverse [gets $foofile]} + putserv "NOTICE $nick :Last 5 calls to Diatheke/Tcl BibleBot" + putserv "NOTICE $nick :$fooverse" + while {[gets $foofile fooverse] >= 0} { + putserv "NOTICE $nick :$fooverse" + } + catch {close $foofile} + exec rm /tmp/fooout.$botnick + return 1 +} + +#--------------------------------------------------------------------- + +proc pub_verseon {nick uhost hand channel arg} { + global von + if {![matchattr $hand 3] && ![matchattr $hand o]} { + return 0 + } elseif {$arg=="v"} { + set von 3 +# putserv "NOTICE $nick :Long Text Display is now on for voiced only!" + } elseif {$arg=="o"} { + set von 2 +# putserv "NOTICE $nick :Verse Display is now on for ops only!" + } else { + set von 1 +# putserv "NOTICE $nick :All Display is now on!" + } + pub_status $nick $uhost $hand $channel $arg + return 1 +} +bind pub - !verseon pub_verseon +bind msg - verseon pub_verseon + +proc pub_verseoff {nick uhost hand channel arg} { + global von + + if {![matchattr $hand 3] && ![matchattr $hand o]} { + return 0 + } + set von 0 +# putserv "NOTICE $nick :Verse Display is now off!" + pub_status $nick $uhost $hand $channel $arg + return 1 +} +bind pub - !verseoff pub_verseoff +bind msg - verseoff pub_verseoff + +proc dcc_verseoff {hand idx arg} { + global von + global whovoff + if {![matchattr $hand 3] && ![matchattr $hand o]} { + return 0 + } + set von 0 + set whovoff $hand + return 1 +} +bind dcc - verseoff dcc_verseoff + +proc dcc_verseon {hand idx arg} { + global von + if {![matchattr $hand 3] && ![matchattr $hand o]} { + return 0 + } + elseif {$arg=="v"} { + set von 3 + } + elseif {$arg=="o"} { + set von 2 + } else { + set von 1 + } + return 1 +} +bind dcc - verseon dcc_verseon + +#sets default von mode +set von 1 + + + + + + + + + + + + + + + diff --git a/utilities/diatheke/thmlcgi.cpp b/utilities/diatheke/thmlcgi.cpp new file mode 100644 index 0000000..5ad180d --- /dev/null +++ b/utilities/diatheke/thmlcgi.cpp @@ -0,0 +1,193 @@ +/*************************************************************************** + thmlcgi.cpp - ThML to Diatheke/CGI format + ------------------- + begin : 2001-11-12 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include "thmlcgi.h" +#include + +SWORD_NAMESPACE_START + +ThMLCGI::ThMLCGI() { + setTokenStart("<"); + setTokenEnd(">"); + + setTokenCaseSensitive(true); + + addTokenSubstitute("note", " ("); + addTokenSubstitute("/note", ") "); +} + + +bool ThMLCGI::handleToken(SWBuf &buf, const char *token, DualStringMap &userData) { + unsigned long i; + if (!substituteToken(buf, token)) { + // manually process if it wasn't a simple substitution + if (!strncmp(token, "sync ", 5)) { + buf += ""; + + if (*val) { + buf += val; + } + buf += ""; + } + + else if (!strncmp(token, "scripRef p", 10) || !strncmp(token, "scripRef v", 10)) { + userData["inscriptRef"] = "true"; + buf += ""; + } + + // we're starting a scripRef like "John 3:16" + else if (!strcmp(token, "scripRef")) { + userData["inscriptRef"] = "false"; + // let's stop text from going to output + userData["suspendTextPassThru"] = "true"; + } + + // we've ended a scripRef + else if (!strcmp(token, "/scripRef")) { + if (userData["inscriptRef"] == "true") { // like "John 3:16" + userData["inscriptRef"] = "false"; + buf += ""; + } + + else { // like "John 3:16" + buf += ""; + buf += userData["lastTextNode"].c_str(); + // let's let text resume to output again + userData["suspendTextPassThru"] = "false"; + buf += ""; + } + } + + else if (!strncmp(token, "div class=\"sechead\"", 19)) { + userData["SecHead"] = "true"; + buf += "
"; + } + else if (!strncmp(token, "div class=\"title\"", 19)) { + userData["SecHead"] = "true"; + buf += "
"; + } + else if (!strncmp(token, "/div", 4)) { + if (userData["SecHead"] == "true") { + buf += "
"; + userData["SecHead"] = "false"; + } + } + + else if(!strncmp(token, "note", 4)) { + buf += " {"; + } + + else { + buf += '<'; + for (i = 0; i < strlen(token); i++) + buf += token[i]; + buf += '>'; + //return false; // we still didn't handle token + } + } + return true; +} + + + + + + +SWORD_NAMESPACE_END diff --git a/utilities/diatheke/thmlcgi.h b/utilities/diatheke/thmlcgi.h new file mode 100644 index 0000000..efa9018 --- /dev/null +++ b/utilities/diatheke/thmlcgi.h @@ -0,0 +1,38 @@ +/*************************************************************************** + thmlcgi.h - OSIS to Diatheke/CGI format + ------------------- + begin : 2001-11-12 + copyright : 2001 by CrossWire Bible Society + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef THMLCGI_H +#define THMLCGI_H + +#include +#include + +#include + +SWORD_NAMESPACE_START + +typedef std::map DualStringMap; +/** this filter converts ThML text to Diatheke/CGI format + */ +class SWDLLEXPORT ThMLCGI : public SWBasicFilter { +protected: + virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData); +public: + ThMLCGI(); +}; + +SWORD_NAMESPACE_END +#endif diff --git a/utilities/emptyvss.cpp b/utilities/emptyvss.cpp new file mode 100644 index 0000000..366aa21 --- /dev/null +++ b/utilities/emptyvss.cpp @@ -0,0 +1,54 @@ +#include +#include +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using sword::SWMgr; +using sword::VerseKey; +using sword::ModMap; +using sword::SWKey; +using sword::SWModule; +using sword::SW_POSITION; +#endif + +int main(int argc, char **argv) { + if (argc < 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + exit(-1); + } + + SWMgr mgr; + + ModMap::iterator it = mgr.Modules.find(argv[1]); + if (it == mgr.Modules.end()) { + fprintf(stderr, "error: %s: couldn't find module: %s \n", argv[0], argv[1]); + exit(-2); + } + + SWModule *mod = it->second; + + SWKey *key = (*mod); + VerseKey *vkey = 0; + SWTRY { + vkey = dynamic_cast(key); + } + SWCATCH (...) {} + + if (!vkey) { + fprintf(stderr, "error: %s: %s module is not keyed to verses \n", argv[0], argv[1]); + exit(-3); + } + + vkey->Headings(1); // turn on mod/testmnt/book/chap headings + + (*mod) = TOP; + + while (!mod->Error()) { + + if (vkey->Verse()) + if (!strlen ((const char *)(*mod))) + std::cout << *vkey << std::endl; + (*mod)++; + } +} diff --git a/utilities/gbfidx.cpp b/utilities/gbfidx.cpp new file mode 100644 index 0000000..88921ac --- /dev/null +++ b/utilities/gbfidx.cpp @@ -0,0 +1,288 @@ +/***************************************************************************** + * + * This code wreaks but works (at least for WEB). Good luck! + */ + +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include +#include + +using namespace sword; + +void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size); +char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size); +void openfiles(char *fname); +void checkparams(int argc, char **argv); + + +VerseKey key1, key2, key3; +int fp, vfp, cfp, bfp; +long chapoffset; +short chapsize; +char testmnt; + + +int main(int argc, char **argv) +{ + long pos, offset; + int num1, num2, rangemax; + char startflag = 0; + short size; + + checkparams(argc, argv); + + openfiles(argv[1]); + + testmnt = key1.Testament(); + num1 = key1.Chapter(); + num2 = key1.Verse(); + pos = 0; + write(bfp, &pos, 4); /* Book offset for testament intros */ + pos = 4; + write(cfp, &pos, 4); /* Chapter offset for testament intro */ + + +/* Right now just zero out intros until parsing correctly */ + pos = 0; + size = 0; + write(vfp, &pos, 4); /* Module intro */ + write(vfp, &size, 2); + write(vfp, &pos, 4); /* Testament intro */ + write(vfp, &size, 2); + + while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) { + if (!startflag) { + startflag = 1; + } + else { + if (num2 < key2.Verse()) { // new chapter + if (num1 <= key2.Chapter()) { // new book + key2.Verse(1); + key2.Chapter(1); + key2.Book(key2.Book()+1); + } + printf("Found Chapter Break: %d ('%s')\n", num1, (const char *)key2); + chapoffset = offset; + chapsize = size; +// continue; + } + } + key2.Verse(1); + key2.Chapter(num1); + key2.Verse(num2); + + key3 = key2; +// key3 += (rangemax - key3.Verse()); + + writeidx(key1, key2, key3, offset, size); + } + close(vfp); + close(cfp); + close(bfp); + close(fp); + return 0; +} + + +/************************************************************************** + * ENT: key1 - current location of index + * key2 - minimum keyval for which this offset is valid + * key3 - maximum keyval for which this offset is valid + */ + +void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size) +{ + long pos; + short tmp; + + for (; ((key1 <= key3) && (key1.Error() != KEYERR_OUTOFBOUNDS) && (key1.Testament() == testmnt)); key1+=1) { + if (key1.Verse() == 1) { // new chapter + if (key1.Chapter() == 1) { // new book + pos = lseek(cfp, 0, SEEK_CUR); + write(bfp, &pos, 4); + pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */ + write(cfp, &pos, 4); + write(vfp, &chapoffset, 4); /* Book intro (vss) set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/ + write(vfp, &chapsize, 2); + } + pos = lseek(vfp, 0, SEEK_CUR); + write(cfp, &pos, 4); + write(vfp, &chapoffset, 4); /* Chapter intro */ + write(vfp, &chapsize, 2); + } + if (key1 >= key2) { + write(vfp, &offset, 4); + write(vfp, &size, 2); + } + else { + pos = 0; + tmp = 0; + write(vfp, &pos, 4); + write(vfp, &tmp, 2); + } + } +} + + +char startchap(char *buf) +{ + if (buf[0] != '<') + return 0; + if (buf[1] != 'S') + return 0; + if (buf[2] != 'C') + return 0; +/* + if (!isdigit(buf[2])) + return 0; + for (loop = 3; loop < 7; loop++) { + if (buf[loop] == ' ') + break; + if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-')) + return 0; + } +*/ + return 1; +} + + +char startentry(char *buf) +{ + if (buf[0] != '<') + return 0; + if (buf[1] != 'S') + return 0; + if (buf[2] != 'V') + return 0; +/* + if (!isdigit(buf[2])) + return 0; + for (loop = 3; loop < 7; loop++) { + if (buf[loop] == ' ') + break; + if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-')) + return 0; + } +*/ + return 1; +} + + +char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size) +{ + char buf[7]; + int loop; + long offset2; + int ch2, vs2, rm2; + bool flag; + long chapstart = 0; + + memset(buf, ' ', 7); + + while (1) { + if (startchap(buf)) { + chapstart = lseek(fp, 0, SEEK_CUR) - 7; + memset(buf, ' ', 3); + flag = false; + for (loop = 3; loop < 6; loop++) { + if (isdigit(buf[loop])) + flag = true; + else { + buf[loop] = 0; + break; + } + } + if (flag) + *num1 = atoi(buf); + else (*num1)++; + } + if (startentry(buf)) { + memset(buf, ' ', 3); + flag = false; + for (loop = 3; loop < 6; loop++) { + if (isdigit(buf[loop])) + flag = true; + else { + buf[loop] = 0; + break; + } + if (flag) + *num2 = atoi(buf); + else (*num2)++; + } + loop++; + if (size) + *offset = lseek(fp, 0, SEEK_CUR) - (7 - loop); + else *offset = (chapstart) ? chapstart : lseek(fp, 0, SEEK_CUR) - 7; + if (size) { + ch2 = *num1; + vs2 = *num2; + if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) { + *size = (short) (lseek(fp, 0, SEEK_END) - (*offset)); + } + else { + if (vs2) { + *size = (offset2 - (*offset)); + } + } + lseek(fp, *offset, SEEK_SET); + } + return 0; + } + memmove(buf, &buf[1], 6); + if (read(fp, &buf[6], 1) != 1) + return 1; + } +} + + +void openfiles(char *fname) +{ + SWBuf buf; + + if ((fp = FileMgr::openFileReadOnly(fname)) < 0) { + fprintf(stderr, "Couldn't open file: %s\n", fname); + exit(1); + } + + buf.setFormatted("%s.vss", fname); + if ((vfp = FileMgr::createPathAndFile(buf.c_str())) < 0) { + fprintf(stderr, "Couldn't open file: %s\n", buf.c_str()); + exit(1); + } + + buf.setFormatted("%s.cps", fname); + if ((cfp = FileMgr::createPathAndFile(buf.c_str())) < 0) { + fprintf(stderr, "Couldn't open file: %s\n", buf.c_str()); + exit(1); + } + + buf.setFormatted("%s.bks", fname); + if ((bfp = FileMgr::createPathAndFile(buf.c_str())) < 0) { + fprintf(stderr, "Couldn't open file: %s\n", buf.c_str()); + exit(1); + } +} + + +void checkparams(int argc, char **argv) +{ + if (argc < 2) { + fprintf(stderr, "usage: %s [nt - for new testmt file]\n", argv[0]); + exit(1); + } + if (argc == 3) + key1 = key2 = key3 = "Matthew 1:1"; + else key1 = key2 = key3 = "Genesis 1:1"; +} diff --git a/utilities/genbookutil.cpp b/utilities/genbookutil.cpp new file mode 100644 index 0000000..e9beb72 --- /dev/null +++ b/utilities/genbookutil.cpp @@ -0,0 +1,201 @@ +#include +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +void printTree(TreeKeyIdx treeKey, TreeKeyIdx *target = 0, int level = 1) { + if (!target) + target = &treeKey; + + unsigned long currentOffset = target->getOffset(); + std::cout << ((currentOffset == treeKey.getOffset()) ? "==>" : ""); + for (int i = 0; i < level; i++) std::cout << "\t"; + std::cout << treeKey.getLocalName() << "/\n"; + if (treeKey.firstChild()) { + printTree(treeKey, target, level+1); + treeKey.parent(); + } + if (treeKey.nextSibling()) + printTree(treeKey, target, level); + +} + + +void printLocalName(TreeKeyIdx *treeKey) { + std::cout << "locaName: " << treeKey->getLocalName() << "\n"; +} + + +void setLocalName(TreeKeyIdx *treeKey) { + char buf[1023]; + std::cout << "Enter New Node Name: "; + fgets(buf, 1000, stdin); + SWBuf name = buf; + treeKey->setLocalName(name.trim()); + treeKey->save(); +} + + +void gotoPath(TreeKeyIdx *treeKey) { + char buf[1023]; + std::cout << "Enter Path: "; + fgets(buf, 1000, stdin); + SWBuf path = buf; + (*treeKey) = path.trim(); +} + + +void assurePath(TreeKeyIdx *treeKey) { + char buf[1023]; + std::cout << "Enter Path: "; + fgets(buf, 1000, stdin); + SWBuf path = buf; + treeKey->assureKeyPath(path.trim()); +} + + +void viewEntryText(RawGenBook *book) { + std::cout << "\n"; + std::cout << book->RenderText(); + std::cout << "\n"; +} + + +void setEntryText(RawGenBook *book) { + SWBuf body; + TreeKeyIdx *treeKey = (TreeKeyIdx *)(SWKey *)(*book); + if (treeKey->getOffset()) { + char buf[1023]; + std::cout << "Enter New Entry Text ('.' on a line by itself to end): \n"; + do { + fgets(buf, 1000, stdin); + SWBuf text = buf; + text.trim(); + if ((text[0] == '.') && (text[1] == 0)) + break; + body += text; + body += "\n"; + } while (true); + + (*book) << body.c_str(); + } + else std::cout << "Can't add entry text to root node\n"; +} + + +void appendSibbling(TreeKeyIdx *treeKey) { + if (treeKey->getOffset()) { + char buf[1023]; + std::cout << "Enter New Sibbling Name: "; + fgets(buf, 1000, stdin); + SWBuf name = buf; + treeKey->append(); + treeKey->setLocalName(name.trim()); + treeKey->save(); + } + else std::cout << "Can't add sibling to root node\n"; +} + + +void appendChild(TreeKeyIdx *treeKey) { + char buf[1023]; + std::cout << "Enter New Child Name: "; + fgets(buf, 1000, stdin); + SWBuf name = buf; + treeKey->appendChild(); + treeKey->setLocalName(name.trim()); + treeKey->save(); +} + + +void deleteNode(TreeKeyIdx *treeKey) { + std::cout << "Removing entry [" << treeKey->getText() << "]\n"; + treeKey->remove(); +} + + +void removeEntry(EntriesBlock *eb, int index) { + if (index < eb->getCount()) { + std::cout << "Removing entry [" << index << "]\n"; + eb->removeEntry(index); + } + else std::cout << "Invalid entry number\n\n"; +} + + +int main(int argc, char **argv) { + + if (argc != 2) { + fprintf(stderr, "usage: %s \n", *argv); + exit(-1); + } + + TreeKeyIdx *treeKey = new TreeKeyIdx(argv[1]); + + if (treeKey->Error()) { + RawGenBook::createModule(argv[1]); + } + delete treeKey; + + RawGenBook *book = new RawGenBook(argv[1]); + TreeKeyIdx root = *((TreeKeyIdx *)((SWKey *)(*book))); + treeKey = (TreeKeyIdx *)(SWKey *)(*book); + + SWBuf input; + char line[1024]; + + do { + std::cout << "[" << treeKey->getText() << "] > "; + fgets(line, 1000, stdin); + input = line; + input.trim(); + if (input.length() > 0) { + switch (input[0]) { + case 'n': printLocalName(treeKey); break; + case 's': setLocalName(treeKey); break; + case 'g': gotoPath(treeKey); break; + case 'G': assurePath(treeKey); break; + case 'p': root.root(); printTree(root, treeKey); break; + case 'a': appendSibbling(treeKey); break; + case 'c': appendChild(treeKey); break; + case 'd': deleteNode(treeKey); break; + case 'j': treeKey->nextSibling(); break; + case 'k': treeKey->previousSibling(); break; + case 'h': treeKey->parent(); break; + case 'l': treeKey->firstChild(); break; + case 'r': treeKey->root(); break; + case 't': setEntryText(book); break; + case 'v': viewEntryText(book); break; + case 'q': break; + case '?': + default: + std::cout << "\n p - print tree\n"; + std::cout << " n - get local name\n"; + std::cout << " s - set local name\n"; + std::cout << " j - next sibbling\n"; + std::cout << " k - previous sibbling\n"; + std::cout << " h - parent\n"; + std::cout << " l - first child\n"; + std::cout << " r - root\n"; + std::cout << " g - goto path\n"; + std::cout << " G goto path; create if it doesn't exist\n"; + std::cout << " a - append sibbling\n"; + std::cout << " c - append child\n"; + std::cout << " d - delete node\n"; + std::cout << " v - view entry text\n"; + std::cout << " t - set entry text\n"; + std::cout << " q - quit\n\n"; + break; + } + } + } + while (input.compare("q")); + + delete treeKey; + + return 0; +} diff --git a/utilities/imp2gbs.cpp b/utilities/imp2gbs.cpp new file mode 100644 index 0000000..9488eef --- /dev/null +++ b/utilities/imp2gbs.cpp @@ -0,0 +1,254 @@ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _ICU_ + +#include +#include +#include +#include + +#include +#include + +#include + +#endif + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +SWBuf outPath; +SWBuf inFile; +bool toUpper = false; +bool greekFilter = false; +bool augMod = false; +bool augEnt = true; +int lexLevels = 0; +UTF8GreekAccents greekAccentsFilter; + + +void usage(const char *app) { + fprintf(stderr, "imp2gbs 1.0 General Book module creation tool for the SWORD Project\n\n"); + fprintf(stderr, "usage: %s [OPTIONS]\n", app); + fprintf(stderr, "\t-o \n\t\tSpecify an output Path other than inFile location.\n"); + fprintf(stderr, "\t-a\n\t\tAugment Module [default: create new]\n"); + fprintf(stderr, "\t-O\n\t\tOverwrite entries of same key [default: append to]\n"); + fprintf(stderr, "\t-U\n\t\tKey filter: Convert toUpper\n"); + fprintf(stderr, "\t-g\n\t\tKey filter: Strip Greek diacritics\n"); + fprintf(stderr, "\t-l \n\t\tKey filter: Pseudo-Lexicon n-level generation using first character\n"); + fprintf(stderr, "\t\te.g. -l 2 \"Abbey\" -> \"A/AB/Abbey\"\n"); + fprintf(stderr, "\n"); + exit (-1); +} + + +void parseParams(int argc, char **argv) { + + if (argc < 2) { + usage(*argv); + } + + inFile = argv[1]; + + for (int i = 2; i < argc; i++) { + if (!strcmp(argv[i], "-o")) { + if ((i+1 < argc) && (argv[i+1][0] != '-')) { + outPath = argv[i+1]; + i++; + } + else usage(*argv); + } + else if (!strcmp(argv[i], "-U")) { + if (StringMgr::hasUTF8Support()) { + toUpper = true; + } + else { + fprintf(stderr, "Error: %s. Cannot reliably toUpper without UTF8 support\n\t(recompile with ICU enabled)\n\n", *argv); + usage(*argv); + } + } + else if (!strcmp(argv[i], "-g")) { + greekFilter = true; + } + else if (!strcmp(argv[i], "-O")) { + augEnt = false; + } + else if (!strcmp(argv[i], "-a")) { + augMod = true; + } + else if (!strcmp(argv[i], "-l")) { + if (i+1 < argc) { + lexLevels = atoi(argv[i+1]); + i++; + } + if (!lexLevels) usage(*argv); + } + } + if (!outPath.size()) { + outPath = inFile; + unsigned int i; + for (i = 0; (i < outPath.size() && outPath[i] != '.'); i++); + outPath.size(i); + } +} + + +void writeEntry(SWModule *book, SWBuf keyBuffer, SWBuf entBuffer) { + + + if (greekFilter) { + greekAccentsFilter.processText(keyBuffer); + } + + if (toUpper) { + unsigned size = (keyBuffer.size()+5)*3; + keyBuffer.setFillByte(0); + keyBuffer.resize(size); + StringMgr::getSystemStringMgr()->upperUTF8(keyBuffer.getRawData(), size-2); + } + +// Added for Hesychius, but this stuff should be pushed back into new StringMgr +// functionality +#ifdef _ICU_ +// if (lexLevels) { + if (lexLevels && !keyBuffer.startsWith("/Intro")) { + unsigned size = (keyBuffer.size()+(lexLevels*2)); + keyBuffer.setFillByte(0); + keyBuffer.resize(size); + + UErrorCode err = U_ZERO_ERROR; + + int max = (size+5)*3; + UChar *ubuffer = new UChar[max+10]; + int32_t len; + + u_strFromUTF8(ubuffer, max+9, &len, keyBuffer.c_str(), -1, &err); + if (err == U_ZERO_ERROR) { + UChar *upper = new UChar[(lexLevels+1)*3]; + memcpy(upper, ubuffer, lexLevels*sizeof(UChar)); + upper[lexLevels] = 0; + len = u_strToUpper(upper, (lexLevels+1)*3, upper, -1, 0, &err); + memmove(ubuffer+len+1, ubuffer, (max-len)*sizeof(UChar)); + memcpy(ubuffer, upper, len*sizeof(UChar)); + ubuffer[len] = '/'; + delete [] upper; + + int totalShift = 0; + for (int i = lexLevels-1; i; i--) { + int shift = (i < len)? i : len; + memmove(ubuffer+(shift+1), ubuffer, (max-shift)*sizeof(UChar)); + ubuffer[shift] = '/'; + totalShift += (shift+1); + } + u_strToUTF8(keyBuffer.getRawData(), max, 0, ubuffer, -1, &err); + } + +/* + u_strFromUTF8(ubuffer, max+9, &len, keyBuffer.c_str(), -1, &err); + if (err == U_ZERO_ERROR) { + int totalShift = 0; + for (int i = lexLevels; i; i--) { + int shift = (i < len)? i : len; + memmove(ubuffer+(shift+1), ubuffer, (max-shift)*sizeof(UChar)); + ubuffer[shift] = '/'; + totalShift += (shift+1); + } + UChar *upper = new UChar[(totalShift+1)*3]; + memcpy(upper, ubuffer, totalShift*sizeof(UChar)); + upper[totalShift] = 0; + len = u_strToUpper(upper, (totalShift+1)*3, upper, -1, 0, &err); + memmove(ubuffer+len, ubuffer+totalShift, (max-totalShift)*sizeof(UChar)); + memcpy(ubuffer, upper, len*sizeof(UChar)); + delete [] upper; + u_strToUTF8(keyBuffer.getRawData(), max, 0, ubuffer, -1, &err); + } +*/ + + delete [] ubuffer; + } +#endif + + std::cout << keyBuffer << std::endl; + + book->setKey(keyBuffer.c_str()); + + // check to see if we already have an entry + for (int i = 2; book->getKey()->Error() != KEYERR_OUTOFBOUNDS; i++) { + SWBuf key; + key.setFormatted("%s {%d}", keyBuffer.c_str(), i); + std::cout << "dup key, trying: " << key << std::endl; + book->setKey(key.c_str()); + } + + book->setEntry(entBuffer); +} + + +int main(int argc, char **argv) { + greekAccentsFilter.setOptionValue("Off"); // off = accents off + parseParams(argc, argv); + + // Let's see if we can open our input file + FileDesc *fd = FileMgr::getSystemFileMgr()->open(inFile, FileMgr::RDONLY); + if (fd->getFd() < 0) { + fprintf(stderr, "error: %s: couldn't open input file: %s \n", argv[0], inFile.c_str()); + exit(-2); + } + + RawGenBook *book; + + // Do some initialization stuff + if (!augMod) { + RawGenBook::createModule(outPath); + } + book = new RawGenBook(outPath); + + SWBuf lineBuffer; + SWBuf keyBuffer; + SWBuf entBuffer; + + bool more = true; + do { + more = FileMgr::getLine(fd, lineBuffer); + if (lineBuffer.startsWith("$$$")) { + if ((keyBuffer.size()) && (entBuffer.size())) { + writeEntry(book, keyBuffer, entBuffer); + } + keyBuffer = lineBuffer; + keyBuffer << 3; + keyBuffer.trim(); + entBuffer.size(0); + } + else { + if (keyBuffer.size()) { + entBuffer += lineBuffer; + entBuffer += "\n"; + } + } + } while (more); + if ((keyBuffer.size()) && (entBuffer.size())) { + writeEntry(book, keyBuffer, entBuffer); + } + + delete book; + + FileMgr::getSystemFileMgr()->close(fd); + + return 0; +} + + + diff --git a/utilities/imp2ld.cpp b/utilities/imp2ld.cpp new file mode 100644 index 0000000..bde5b18 --- /dev/null +++ b/utilities/imp2ld.cpp @@ -0,0 +1,175 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using std::string; + +#ifndef NO_SWORD_NAMESPACE +using sword::zLD; +using sword::ZipCompress; +using sword::RawLD4; +using sword::RawLD; +using sword::SWKey; +#endif + + +int main(int argc, char **argv) { + + const char * helptext ="imp2ld 1.0 Lexicon/Dictionary/Daily Devotional/Glossary module creation tool for the SWORD Project\n usage:\n %s [modname] [ 4 (default) | 2 | z - module driver]\n"; + + signed long i = 0; + string keybuffer; + string entbuffer; + string linebuffer; + char modname[16]; + char links = 0; + std::vector linkbuffer; + + if (argc > 2) { + strcpy (modname, argv[2]); + } + else if (argc > 1) { + for (i = 0; (i < 16) && (argv[1][i]) && (argv[1][i] != '.'); i++) { + modname[i] = argv[1][i]; + } + modname[i] = 0; + } + else { + fprintf(stderr, helptext, argv[0]); + exit(-1); + } + + std::ifstream infile(argv[1]); + + char mode = 1; + if (argc > 3) { + switch (*argv[3]) { + case 'z': + mode = 3; + break; + case '2': + mode = 2; + break; + default: + mode = 1; + } + } + + zLD* modZ = NULL; + RawLD* mod2 = NULL; + RawLD4* mod4 = NULL; + SWKey* key; + + if (mode == 3) { + zLD::createModule(modname); + modZ = new zLD(modname, 0, 0, 30, new ZipCompress()); + key = modZ->CreateKey(); + } + else if (mode == 2) { + RawLD::createModule(modname); + mod2 = new RawLD(modname); + key = mod2->CreateKey(); + } + else if (mode == 1) { + RawLD4::createModule(modname); + mod4 = new RawLD4(modname); + key = mod4->CreateKey(); + } + + key->Persist(1); + + while (!infile.eof()) { + std::getline(infile, linebuffer); + if (linebuffer.size() > 3 && linebuffer.substr(0,3) == "$$$") { + if (keybuffer.size() && entbuffer.size()) { + std::cout << keybuffer << std::endl; + *key = keybuffer.c_str(); + + if (mode == 3) { + modZ->setKey(*key); + modZ->setEntry(entbuffer.c_str(), entbuffer.size()); + for (i = 0; i < links; i++) { + SWKey tmpkey = linkbuffer[i].c_str(); + modZ->linkEntry(&tmpkey); + std::cout << "Linking: " << linkbuffer[i] << std::endl; + } + } + else if (mode == 2) { + mod2->setKey(*key); + mod2->setEntry(entbuffer.c_str(), entbuffer.size()); + for (i = 0; i < links; i++) { + SWKey tmpkey = linkbuffer[i].c_str(); + mod2->linkEntry(&tmpkey); + std::cout << "Linking: " << linkbuffer[i] << std::endl; + } + } + else if (mode == 1) { + mod4->setKey(*key); + mod4->setEntry(entbuffer.c_str(), entbuffer.size()); + for (i = 0; i < links; i++) { + SWKey tmpkey = linkbuffer[i].c_str(); + mod4->linkEntry(&tmpkey); + std::cout << "Linking: " << linkbuffer[i] << std::endl; + } + } + } + if (linebuffer.size() > 3) + keybuffer = linebuffer.substr(3,linebuffer.size()) ; + entbuffer.resize(0); + linkbuffer.clear(); + links = 0; + } + else if (linebuffer.size() > 3 && linebuffer.substr(0,3) == "%%%") { + linkbuffer.push_back(linebuffer.substr(3,linebuffer.size())); + links++; + } + else { + entbuffer += linebuffer; + } + } + + //handle final entry + if (keybuffer.size() && entbuffer.size()) { + std::cout << keybuffer << std::endl; + *key = keybuffer.c_str(); + + if (mode == 3) { + modZ->setKey(*key); + modZ->setEntry(entbuffer.c_str(), entbuffer.size()); + for (i = 0; i < links; i++) { + SWKey tmpkey = linkbuffer[i].c_str(); + modZ->linkEntry(&tmpkey); + std::cout << "Linking: " << linkbuffer[i] << std::endl; + } + } + else if (mode == 2) { + mod2->setKey(*key); + mod2->setEntry(entbuffer.c_str(), entbuffer.size()); + for (i = 0; i < links; i++) { + SWKey tmpkey = linkbuffer[i].c_str(); + mod2->linkEntry(&tmpkey); + std::cout << "Linking: " << linkbuffer[i] << std::endl; + } + + } + else if (mode == 1) { + mod4->setKey(*key); + mod4->setEntry(entbuffer.c_str(), entbuffer.size()); + for (i = 0; i < links; i++) { + SWKey tmpkey = linkbuffer[i].c_str(); + mod4->linkEntry(&tmpkey); + std::cout << "Linking: " << linkbuffer[i] << std::endl; + } + + } + } + infile.close(); + + return 0; +} diff --git a/utilities/imp2vs.cpp b/utilities/imp2vs.cpp new file mode 100644 index 0000000..9ae3881 --- /dev/null +++ b/utilities/imp2vs.cpp @@ -0,0 +1,182 @@ +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +#include +#include + #include +#include + + +#ifndef NO_SWORD_NAMESPACE +using sword::RawText; +using sword::RawText4; +using sword::VerseKey; +using sword::SWText; +using sword::ListKey; +#endif + +int main(int argc, char **argv) { + + const string helptext ="imp2vs 1.0 Bible/Commentary module creation tool for the SWORD Project\n usage:\n %s [output dir] \n"; + + string keybuffer = ""; + string entbuffer = ""; + string linebuffer = ""; + string modname = ""; + + if (argc > 2) { + modname = argv[2]; + } + else if (argc > 1) { + modname = "./"; + } + else { + fprintf(stderr, helptext.c_str(), argv[0]); + exit(-1); + } + int mode = 1; + if (argc > 3) { + switch (*argv[3]) { + case '4': + mode = 2; + break; + default: + mode = 1; + } + } + + + + try { + + ifstream infile(argv[1]); + + SWText* mod; + RawText * modRaw; + RawText4 * modRaw4; + + if (mode == 1) { + RawText::createModule(modname.c_str()); + modRaw= new RawText(modname.c_str()); + mod = modRaw; + } else { + RawText4::createModule(modname.c_str()); + modRaw4= new RawText4(modname.c_str()); + mod = modRaw4; + } + + VerseKey* vkey = new VerseKey; + vkey->Headings(1); + vkey->AutoNormalize(0); + vkey->Persist(1); + mod->setKey(*vkey); + char final; // 2 == pre-final line; 1 == final line; 0 == EOF + + getline(infile,linebuffer); + final = (!infile.eof()) + 1; + + while (final) { + if (final == 1 || (linebuffer.size() > 3 && linebuffer.substr(0,3) == "$$$")) { + if (keybuffer.size() && entbuffer.size()) { + std::cout << "from file: " << keybuffer << std::endl; + *vkey = keybuffer.c_str(); + if (!vkey->Chapter()) { + // bad hack: 0:0 is Book intro; (chapter):0 is Chapter intro; 0:2 is Module intro; 0:1 is Testament intro + int backstep = vkey->Verse(); + if (backstep) { + vkey->Verse(1); + vkey->Chapter(1); + switch (backstep) { + case 2: + vkey->Book(1); + vkey->Testament(0); + case 1: + vkey->Book(0); + vkey->Chapter(0); + } + vkey->Verse(0); + } + + std::cout << "adding entry: " << *vkey << " length " << entbuffer.size() << "/" << (unsigned short)entbuffer.size() << std::endl; + mod->setEntry(entbuffer.c_str(), entbuffer.size()); + } + else { + ListKey listkey = vkey->ParseVerseList(keybuffer.c_str(), "Gen1:1", true); + int i; + bool havefirst = false; + VerseKey firstverse; + firstverse.Headings(1); + firstverse.AutoNormalize(0); + for (i = 0; i < listkey.Count(); i++) { + VerseKey *element = SWDYNAMIC_CAST(VerseKey, listkey.GetElement(i)); + if (element) { + *vkey = element->LowerBound(); + VerseKey finalkey = element->UpperBound(); + finalkey.Headings(1); + finalkey.AutoNormalize(0); + if (!havefirst) { + havefirst = true; + firstverse = *vkey; + + std::cout << "adding entry: " << *vkey << " length " << entbuffer.size() << "/" << (unsigned short)entbuffer.size() << std::endl; + mod->setEntry(entbuffer.c_str(), entbuffer.size()); + (*vkey)++; + } + while (! (finalkey < (*vkey))) { + std::cout << "linking entry: " << *vkey << " to " << firstverse << std::endl; + *mod << &firstverse; + (*vkey)++; + } + } + else { + if (havefirst) { + *vkey = (*listkey.GetElement(i)); + std::cout << "linking entry: " << *vkey << " to " << firstverse << std::endl; + *mod << &firstverse; + } + else { + *vkey = (*listkey.GetElement(i)); + havefirst = true; + firstverse = *vkey; + + std::cout << "adding entry: " << *vkey << " length " << entbuffer.size() << "/" << (unsigned short)entbuffer.size() << std::endl; + mod->setEntry(entbuffer.c_str(), entbuffer.size()); + } + } + } + } + } + if (linebuffer.size() > 3) + keybuffer = linebuffer.substr(3,linebuffer.size()) ; + entbuffer.resize(0); + } + else { + entbuffer.append(linebuffer); + } + final--; + if (final) { + getline(infile,linebuffer); + final = (!infile.eof()) + 1; + } + } + } + catch (const std::exception& e) { + std::cerr << "Exception: imp2vs failed: " << e.what() << std::endl; + std::cerr << "Line: " << linebuffer.size() << " " << linebuffer << std::endl; + std::cerr << "Key: " << keybuffer.size() << " " << keybuffer << std::endl; + std::cerr << "Ent: " << entbuffer.size() << " " << entbuffer << std::endl; + return -2; + } + catch (...) { + std::cerr << "Exception: imp2vs failed" << std::endl; + return -3; + } + + return 0; +} diff --git a/utilities/installmgr.cpp b/utilities/installmgr.cpp new file mode 100644 index 0000000..60fc7ce --- /dev/null +++ b/utilities/installmgr.cpp @@ -0,0 +1,287 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace sword; +using std::cout; +using std::cerr; +using std::cin; +using std::map; + + +SWMgr *mgr; +InstallMgr *installMgr; + + +void finish(int status) { + delete installMgr; + delete mgr; + cout << "\n"; + exit(status); +} + + +void usage(const char *progName) { + fprintf(stderr, "usage: %s
\n"; + if (openbook) + cout << "\t
\n"; + if (opentest) + cout << "\t\n"; + cout << "\t
\n"; + opentest = true; + newTest = true; + } + if ((vkey->Book() != lastBook) || newTest) { + if (!newTest) { + if (openchap) + cout << "\t\n"; + if (openbook) + cout << "\t
\n"; + } + *buf = 0; + tmpKey = *vkey; + tmpKey.Chapter(0); + tmpKey.Verse(0); + sprintf(buf, "\t
\n", tmpKey.getOSISRef()); +// filter.ProcessText(buf, 200 - 3, &lastHeading, inModule); + cout << "" << buf << endl; + openbook = true; + newBook = true; + } + if ((vkey->Chapter() != lastChap) || newBook) { + if (!newBook) { + if (openchap) + cout << "\t\n"; + } + *buf = 0; + tmpKey = *vkey; + tmpKey.Verse(0); + sprintf(buf, "\t\n", tmpKey.getOSISRef()); +// filter.ProcessText(buf, 200 - 3, &lastHeading, inModule); + cout << "" << buf; + openchap = true; + } + SWBuf verseText = inModule->getRawEntry(); + sprintf(buf, "\t\t", vkey->getOSISRef()); + cout << buf << verseText.c_str() << "\n" << endl; + lastChap = vkey->Chapter(); + lastBook = vkey->Book(); + lastTest = vkey->Testament(); + } + if (openchap) + cout << "\t\n"; + if (openbook) + cout << "\t
\n"; + if (opentest) + cout << "\t\n"; + cout << "\t\n"; + cout << "\n"; + return 0; +} + + diff --git a/utilities/mod2vpl.cpp b/utilities/mod2vpl.cpp new file mode 100644 index 0000000..edcbfc6 --- /dev/null +++ b/utilities/mod2vpl.cpp @@ -0,0 +1,85 @@ +#include +#include +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using sword::SWMgr; +using sword::VerseKey; +using sword::SWModule; +using sword::SWKey; +using sword::SW_POSITION; +using sword::ModMap; +#endif + +void cleanbuf(char *buf) { + char *from = buf; + char *to = buf; + + while (*from) { + if ((*from != 10) && (*from != 13)) { + *to++ = *from++; + } + else { + from++; + } + } + *to = 0; +} + +int main(int argc, char **argv) { + char *buffer = 0; + + if (argc < 2) { + fprintf(stderr, "usage: %s [0|1 - prepend verse reference to each line]\n", argv[0]); + exit(-1); + } + + SWMgr mgr; + + ModMap::iterator it = mgr.Modules.find(argv[1]); + if (it == mgr.Modules.end()) { + fprintf(stderr, "error: %s: couldn't find module: %s \n", argv[0], argv[1]); + exit(-2); + } + + bool vref = false; + if (argc > 2) + vref = (argv[2][0] == '0') ? false : true; + + + SWModule *mod = it->second; + + SWKey *key = (*mod); + VerseKey *vkey = 0; + SWTRY { + vkey = dynamic_cast(key); + } + SWCATCH (...) {} + + if (!vkey) { + fprintf(stderr, "error: %s: %s module is not keyed to verses \n", argv[0], argv[1]); + exit(-3); + } + + vkey->Headings(1); // turn on mod/testmnt/book/chap headings + + (*mod) = TOP; + + while (!mod->Error()) { + buffer = new char [ strlen ((const char *)(*mod)) + 1 ]; + strcpy(buffer, (const char *)(*mod)); + cleanbuf(buffer); + if (vref) { + if ((strlen(buffer) > 0) && (vref)) { + std::cout << (const char *)(*vkey) << " "; + std::cout << buffer << std::endl; + } + } + else std::cout << buffer << std::endl; + + delete [] buffer; + (*mod)++; + } +} diff --git a/utilities/mod2zmod.cpp b/utilities/mod2zmod.cpp new file mode 100644 index 0000000..4e91ea3 --- /dev/null +++ b/utilities/mod2zmod.cpp @@ -0,0 +1,189 @@ +// Compression on variable granularity + +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef NO_SWORD_NAMESPACE +using sword::SWCompress; +using sword::CipherFilter; +using sword::SWModule; +using sword::SWMgr; +using sword::ModMap; +using sword::zText; +using sword::zLD; +using sword::zCom; +using sword::SWFilter; +using sword::VerseKey; +using sword::SWKey; +using sword::SW_POSITION; +using sword::ZipCompress; +using sword::LZSSCompress; +#endif + +using std::cerr; +using std::string; +using std::cout; + +void errorOutHelp(char *appName) { + cerr << appName << " - a tool to create compressed Sword modules\n"; + cerr << "version 0.1\n\n"; + cerr << "usage: "<< appName << " [blockType [compressType [cipherKey]]]\n\n"; + cerr << "datapath: the directory in which to write the zModule\n"; + cerr << "blockType : (default 4)\n\t2 - verses\n\t3 - chapters\n\t4 - books\n"; + cerr << "compressType: (default 1):\n\t1 - LZSS\n\t2 - Zip\n"; + cerr << "\n\n"; + exit(-1); +} + + +int main(int argc, char **argv) +{ + int iType = 4; + int compType = 1; + string cipherKey = ""; + SWCompress *compressor = 0; + SWModule *inModule = 0; + SWModule *outModule = 0; + + + if ((argc < 3) || (argc > 6)) { + errorOutHelp(argv[0]); + } + + if (argc > 3) { + iType = atoi(argv[3]); + if (argc > 4) { + compType = atoi(argv[4]); + if (argc > 5) { + cipherKey = argv[5]; + } + } + } + + if ((iType < 2) || (compType < 1) || (compType > 2) || (!strcmp(argv[1], "-h")) || (!strcmp(argv[1], "--help")) || (!strcmp(argv[1], "/?")) || (!strcmp(argv[1], "-?")) || (!strcmp(argv[1], "-help"))) { + errorOutHelp(argv[0]); + } + + SWMgr mgr; + + ModMap::iterator it = mgr.Modules.find(argv[1]); + if (it == mgr.Modules.end()) { + fprintf(stderr, "error: %s: couldn't find module: %s\n", argv[0], argv[1]); + exit(-2); + } + + inModule = it->second; + + // Try to initialize a default set of datafiles and indicies at our + // datapath location passed to us from the user. + +#define BIBLE 1 +#define LEX 2 +#define COM 3 + + int modType = 0; + if (!strcmp(inModule->Type(), "Biblical Texts")) modType = BIBLE; + if (!strcmp(inModule->Type(), "Lexicons / Dictionaries")) modType = LEX; + if (!strcmp(inModule->Type(), "Commentaries")) modType = COM; + + switch (compType) { // these are deleted by zText + case 1: compressor = new LZSSCompress(); break; + case 2: compressor = new ZipCompress(); break; + } + + int result = 0; + switch (modType) { + case BIBLE: + case COM: + result = zText::createModule(argv[2], iType); + break; + case LEX: + result = zLD::createModule(argv[2]); + break; + } + + if (result) { + fprintf(stderr, "error: %s: couldn't create module at path: %s\n", argv[0], argv[2]); + exit(-3); + } + + switch (modType) { + case BIBLE: + case COM: + outModule = new zText(argv[2], 0, 0, iType, compressor); // open our datapath with our RawText driver. + ((VerseKey *)(SWKey *)(*inModule))->Headings(1); + break; + case LEX: + outModule = new zLD(argv[2], 0, 0, iType, compressor); // open our datapath with our RawText driver. + break; + } + + SWFilter *cipherFilter = 0; + if (!cipherKey.empty()) { + cipherFilter = new CipherFilter(cipherKey.c_str()); + outModule->AddRawFilter(cipherFilter); + } + + string lastBuffer = "Something that would never be first module entry"; + SWKey bufferKey; + SWKey lastBufferKey; + SWKey *outModuleKey = outModule->CreateKey(); + VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, outModuleKey); + outModuleKey->Persist(1); + if (vkey) { + vkey->Headings(1); + vkey->AutoNormalize(0); + } + outModule->setKey(*outModuleKey); + + inModule->setSkipConsecutiveLinks(false); + (*inModule) = TOP; + while (!inModule->Error()) { + bufferKey = *(SWKey *)(*inModule); + // pseudo-check for link. Will get most common links. + if ((lastBuffer == inModule->getRawEntry()) &&(lastBuffer.length() > 0)) { + *outModuleKey = bufferKey; + outModule->linkEntry(&lastBufferKey); // link to last key + cout << "Adding [" << bufferKey << "] link to: [" << lastBufferKey << "]\n"; + } + else { + lastBuffer = inModule->getRawEntry(); + lastBufferKey = inModule->KeyText(); + if (lastBuffer.length() > 0) { + cout << "Adding [" << bufferKey << "] new text.\n"; + *outModuleKey = bufferKey; +// outModule->getRawEntry(); // snap +// outModule->setKey(bufferKey); + (*outModule) << lastBuffer.c_str(); // save new text; + } + else { + cout << "Skipping [" << bufferKey << "] no entry in Module.\n"; + } + } + (*inModule)++; + } + delete outModule; + delete outModuleKey; + if (cipherFilter) + delete cipherFilter; +} + diff --git a/utilities/mod2zmod2.cpp b/utilities/mod2zmod2.cpp new file mode 100644 index 0000000..d552e35 --- /dev/null +++ b/utilities/mod2zmod2.cpp @@ -0,0 +1,205 @@ +// Compression on variable granularity + +#include +#include +#include +#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +//#include +#include +//#include +//#include +#include +#include +#include +#include +#include +#include +#include +#ifndef NO_SWORD_NAMESPACE +using sword::SWCompress; +using sword::CipherFilter; +using sword::SWModule; +using sword::SWMgr; +using sword::ModMap; +using sword::zText2; +//using sword::zLD; +//using sword::zCom; +using sword::SWFilter; +using sword::VerseKey2; +using sword::VerseKey; +using sword::SWKey; +using sword::SW_POSITION; +using sword::ZipCompress; +using sword::LZSSCompress; +#endif + +using std::cerr; +using std::string; +using std::cout; +using std::endl; + +void errorOutHelp(char *appName) { + cerr << appName << " - a tool to create compressed Sword modules\n"; + cerr << "version 0.1\n\n"; + cerr << "usage: "<< appName << " [blockType [blockNum [compressType [cipherKey]]]]\n\n"; + cerr << "datapath: the directory in which to write the zModule\n"; + cerr << "blockType : (default 4)\n\t2 - verses\n\t3 - chapters\n\t4 - books\n"; + cerr << "blockNum : (default 1)\n\tnumber of blockType per block\n"; + cerr << "compressType: (default 1):\n\t1 - LZSS\n\t2 - Zip\n"; + cerr << "\n\n"; + exit(-1); +} + + +int main(int argc, char **argv) +{ + int iType = 4; + int iPerBlock = 1; + int compType = 1; + string cipherKey = ""; + SWCompress *compressor = 0; + SWModule *inModule = 0; + SWModule *outModule = 0; + + + if ((argc < 3) || (argc > 6)) { + errorOutHelp(argv[0]); + } + + if (argc > 3) { + iType = atoi(argv[3]); + if (argc > 4) { + iPerBlock = atoi(argv[4]); + if (argc > 5) { + compType = atoi(argv[5]); + if (argc > 6) { + cipherKey = argv[6]; + } + } + } + } + + if ((iType < 2) || (iType > 5) || (iPerBlock < 1) || (compType < 1) || (compType > 2) || (!strcmp(argv[1], "-h")) || + (!strcmp(argv[1], "--help")) || (!strcmp(argv[1], "/?")) || (!strcmp(argv[1], "-?")) || (!strcmp(argv[1], "-help"))) { + errorOutHelp(argv[0]); + } + + SWMgr mgr; + + ModMap::iterator it = mgr.Modules.find(argv[1]); + if (it == mgr.Modules.end()) { + fprintf(stderr, "error: %s: couldn't find module: %s \n", argv[0], argv[1]); + exit(-2); + } + + inModule = it->second; + + // Try to initialize a default set of datafiles and indicies at our + // datapath location passed to us from the user. + +#define BIBLE 1 +#define LEX 2 +#define COM 3 + + int modType = 0; + if (!strcmp(inModule->Type(), "Biblical Texts")) modType = BIBLE; + if (!strcmp(inModule->Type(), "Lexicons / Dictionaries")) modType = LEX; + if (!strcmp(inModule->Type(), "Commentaries")) modType = COM; + + switch (compType) { // these are deleted by zText + case 1: compressor = new LZSSCompress(); break; + case 2: compressor = new ZipCompress(); break; + } + cout << "Creating module " << argv[2] << endl; + int result = 1; + switch (modType) { + case BIBLE: + result = zText2::createModule(argv[2], iType); + break; + case LEX: + //result = zLD::createModule(argv[2]); + result = 1; + break; + case COM: + result = zText2::createModule(argv[2], iType); + break; + } + + if (result) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", argv[0], argv[2]); + exit(-3); + } + + cout << "Opening datapath with driver " << argv[2] << " Type " << iType << " PerBlock " << iPerBlock << endl; + switch (modType) { + case BIBLE: + outModule = new zText2(argv[2], 0, 0, iType, iPerBlock, compressor); // open our datapath with our RawText driver. + ((VerseKey *)(SWKey *)(*inModule))->Headings(1); + break; + case LEX: + //outModule = new zLD(argv[2], 0, 0, iType, compressor); // open our datapath with our RawText driver. + break; + case COM: + outModule = new zText2(argv[2], 0, 0, iType, iPerBlock, compressor); // open our datapath with our RawText driver. + ((VerseKey *)(SWKey *)(*inModule))->Headings(1); + break; + } + + SWFilter *cipherFilter = 0; + if (!cipherKey.empty()) { + cipherFilter = new CipherFilter(cipherKey.c_str()); + outModule->AddRawFilter(cipherFilter); + } + + string lastBuffer = "Something that would never be first module entry"; + SWKey bufferKey; + SWKey lastBufferKey; + SWKey *outModuleKey = outModule->CreateKey(); + VerseKey2 *vkey = SWDYNAMIC_CAST(VerseKey2, outModuleKey); + outModuleKey->Persist(1); + if (vkey) { + vkey->Headings(1); + vkey->AutoNormalize(0); + } + outModule->setKey(*outModuleKey); + + inModule->setSkipConsecutiveLinks(false); + (*inModule) = TOP; + while (!inModule->Error()) { + bufferKey = *(SWKey *)(*inModule); + cout << bufferKey << endl; + // pseudo-check for link. Will get most common links. + if ((lastBuffer == inModule->getRawEntry()) &&(lastBuffer.length() > 0)) { + *outModuleKey = bufferKey; + outModule->linkEntry(&lastBufferKey); // link to last key + //cout << "Adding [" << bufferKey << "] link to: [" << lastBufferKey << "]\n"; + } + else { + lastBuffer = inModule->getRawEntry(); + lastBufferKey = inModule->KeyText(); + if (lastBuffer.length() > 0) { + //cout << "Adding [" << bufferKey << "] new text. \n"; + *outModuleKey = bufferKey; +// outModule->getRawEntry(); // snap +// outModule->setKey(bufferKey); + (*outModule) << lastBuffer.c_str(); // save new text; + } + else { + cout << "Skipping [" << bufferKey << "] no entry in inModule. \n"; + } + } + (*inModule)++; + } + delete outModule; + delete outModuleKey; + if (cipherFilter) + delete cipherFilter; +} + diff --git a/utilities/modwrite.cpp b/utilities/modwrite.cpp new file mode 100644 index 0000000..deec68e --- /dev/null +++ b/utilities/modwrite.cpp @@ -0,0 +1,63 @@ +// Compression on variable granularity + +#include +#include +#include +//#include + +#ifndef __GNUC__ +#include +#else +#include +#endif + +#include +#include +#include + +#ifndef NO_SWORD_NAMESPACE +using sword::SWMgr; +using sword::SWModule; +using sword::ModMap; +using sword::SWKey; +#endif + +using std::cerr; + +int main(int argc, char **argv) +{ + int action = 0; + + if ((argc < 4) || (argc > 6)) { + cerr << "usage: " << argv[0] << " [0(deflt) - normal; 1 - link]\n"; + exit(-1); + } + + if (argc > 4) + action = atoi(argv[4]); + + SWMgr mgr; + + ModMap::iterator it = mgr.Modules.find(argv[1]); + if (it == mgr.Modules.end()) { + fprintf(stderr, "error: %s: couldn't find module: %s \n", argv[0], argv[1]); + exit(-2); + } + + SWModule *module = it->second; + module->setKey(argv[2]); + + switch (action) { + case 0: + if (strlen(argv[3])) + (*module) << argv[3]; + else module->deleteEntry(); + break; + case 1: + (*module) << (SWKey)argv[3]; + break; + default: + cerr << "Unknown action " << action << "\n"; + exit(-3); + } +} diff --git a/utilities/no13.c b/utilities/no13.c new file mode 100644 index 0000000..5245d27 --- /dev/null +++ b/utilities/no13.c @@ -0,0 +1,34 @@ +#include +#include + +main(int argc, char **argv) +{ + int fd, loop; + char ch; + char breakcnt = 0; + + if (argc != 2) { + fprintf(stderr, "This program writes to stdout, so to be useful,\n\tit should be redirected (e.g no13 bla > bla.dat)\nusage: %s \n", argv[0]); + exit(1); + } + fd = open(argv[1], O_RDONLY, S_IREAD|S_IWRITE|S_IRGRP|S_IROTH); + while (read(fd, &ch, 1) == 1) { + if (ch == 0x0d) { // CR + breakcnt++; + continue; + } + if (ch == 0x1a) // Ctrl-Z + continue; + + if (ch != 0x0a) { // LF + if (breakcnt > 1) { + for (loop = breakcnt; loop > 0; loop--) + putchar(0x0d); + putchar(0x0a); + } + breakcnt=0; + } + putchar(ch); + } + close(fd); +} diff --git a/utilities/osis2mod.cpp b/utilities/osis2mod.cpp new file mode 100644 index 0000000..69d984d --- /dev/null +++ b/utilities/osis2mod.cpp @@ -0,0 +1,1090 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +// #include +// #include +#include +#include +#include + +#ifdef _ICU_ +#include +#include +#endif + +//#define DEBUG + +// Debug for simple transformation stack +//#define DEBUG_XFORM + +// Debug for parsing osisRefs +//#define DEBUG_REF + +// Debug for tag stack +//#define DEBUG_STACK + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +using namespace std; + +#ifdef _ICU_ +UTF8NFC normalizer; +int normalized = 0; + +Latin1UTF8 converter; +int converted = 0; +#endif + +SWText *module = 0; +VerseKey *currentVerse = 0; +char activeOsisID[255]; +char currentOsisID[255]; +const char *osisabbrevs[] = {"Gen", "Exod", "Lev", "Num", "Deut", "Josh", "Judg", + "Ruth", "1Sam", "2Sam", "1Kgs", "2Kgs", "1Chr", "2Chr", "Ezra", "Neh", + "Esth", "Job", "Ps", "Prov", "Eccl", "Song", "Isa", "Jer", "Lam", "Ezek", + "Dan", "Hos", "Joel", "Amos", "Obad", "Jonah", "Mic", "Nah", "Hab", + "Zeph", "Hag", "Zech", "Mal", + + "Matt", "Mark", "Luke", "John", "Acts", "Rom", "1Cor", "2Cor", "Gal", + "Eph", "Phil", "Col", "1Thess", "2Thess", "1Tim", "2Tim", "Titus", + "Phlm", "Heb", "Jas", "1Pet", "2Pet", "1John", "2John", "3John", + "Jude", "Rev"}; + +static bool inCanonicalOSISBook = true; // osisID is for a book that is not in Sword's canon +static bool normalize = true; // Whether to normalize UTF-8 to NFC + +bool isOSISAbbrev(const char *buf) { + bool match = false; + for (int i = 0; i < 66; i++) { + if (!strcmp(buf, osisabbrevs[i])) { + match = true; + break; + } + } + return match; +} + + +/** + * Determine whether the string contains a valid unicode sequence. + * The following table give the pattern of a valid UTF-8 character. + * Unicode Range 1st 2nd 3rd 4th + * U-00000000 - U-0000007F 0nnnnnnn + * U-00000080 - U-000007FF 110nnnnn 10nnnnnn + * U-00000800 - U-0000FFFF 1110nnnn 10nnnnnn 10nnnnnn + * U-00010000 - U-001FFFFF 11110nnn 10nnnnnn 10nnnnnn 10nnnnnn + * Note: + * 1. The latest UTF-8 RFC allows for a max of 4 bytes. + * Earlier allowed 6. + * 2. The number of bits of the leading byte before the first 0 + * is the total number of bytes. + * 3. The "n" are the bits of the unicode codepoint. + * This routine does not check to see if the code point is in the range. + * It could. + * + * param txt the text to check + * return 1 if all high order characters form a valid unicode sequence + * -1 if there are no high order characters. + * Note: this is also a valid unicode sequence + * 0 if there are high order characters that do not form + * a valid unicode sequence + * author DM Smith + */ +int detectUTF8(const char *txt) { + unsigned int countUTF8 = 0; + int count = 0; + + // Cast it to make masking and shifting easier + const unsigned char *p = (const unsigned char*) txt; + while (*p) { + // Is the high order bit set? + if (*p & 0x80) { + // Then count the number of high order bits that are set. + // This determines the number of following bytes + // that are a part of the unicode character + unsigned char i = *p; + for (count = 0; i & 0x80; count++) { + i <<= 1; + } + + // Validate count: + // Count 0: bug in code that would cause core walking + // Count 1: is a pattern of 10nnnnnn, + // which does not signal the start of a unicode character + // Count 5 to 8: 111110nn, 1111110n and 11111110 and 11111111 + // are not legal starts, either + if (count < 2 || count > 4) return 0; + + // At this point we expect (count - 1) following characters + // of the pattern 10nnnnnn + while (--count && *++p) { + // The pattern of each following character must be: 10nnnnnn + // So, compare the top 2 bits. + if ((0xc0 & *p) != 0x80) return 0; + } + + // Oops, we've run out of bytes too soon: Cannot be UTF-8 + if (count) return 0; + + // We have a valid UTF-8 character, so count it + countUTF8++; + } + + // Advance to the next character to examine. + p++; + } + + // At this point it is either UTF-8 or 7-bit ascii + return countUTF8 ? 1 : -1; +} + +// This routine converts an osisID or osisRef into one that SWORD can parse into a verse list +// An osisRef is made up of: +// a single osisID +// an osisID-osisID +// or +// an osisRef osisRef +// +// An osisID can have a work prefix which is terminated by a : and may have a grain +// which is started by a ! +// +// However, SWORD cannot handle work prefixes or grains and expects ranges to be +// separated with a single; +void prepareSWVerseKey(SWBuf &buf) { + // This routine modifies the buf in place + char* s = buf.getRawData(); + char* p = s; + bool inRange = false; + while (*p) { + if (inRange) { +#ifdef DEBUG_REF + cout << "Copy range marker:" << *p << endl;; +#endif + // Range markers are copied as is + *s++ = *p++; + } + + // Look ahead to see if we are in a work prefix + // but don't look past an osisID + char *n = p; + while (*n && *n != ':' && *n != ' ' && *n != '-') { + n++; + } + + // We have found a work prefix + if (*n == ':') { + // set p to skip the work prefix + p = n + 1; +#ifdef DEBUG_REF + cout << "Found a work prefix "; + for (char *x = s; x <= n; x++) { + cout << *x; + } + cout << endl; +#endif + } + + // Now we are in the meat of an osisID. + // Copy it to its end but stop on a grain marker of '!' +#ifdef DEBUG_REF + cout << "Copy osisID:"; +#endif + while (*p && *p != '!' && *p != ' ' && *p != '-') { +#ifdef DEBUG_REF + cout << *p; +#endif + *s++ = *p++; + } +#ifdef DEBUG_REF + cout << endl; +#endif + + // The ! and everything following until we hit + // the end of the osisID is part of the grain reference + if (*p == '!') { + n = p; + while (*n && *n != ' ' && *n != '-') { + n++; + } +#ifdef DEBUG_REF + cout << "Found a grain suffix "; + for (char *x = p; x < n; x++) { + cout << *x; + } + cout << endl; +#endif + p = n; + } + + // At this point we have processed an osisID + + // if we are not in a range and the next characer is a - + // then we are entering a range + inRange = !inRange && *p == '-'; + +#ifdef DEBUG_REF + if (inRange) { + cout << "Found a range" << endl; + } +#endif + + // between ranges and stand alone osisIDs we might have whitespace + if (!inRange && *p == ' ') { + // skip this and subsequent spaces + while (*p == ' ') { + p++; + } + // replacing them all with a ';' + *s++ = ';'; +#ifdef DEBUG_REF + cout << "replacing space with ;. Remaining: " << p << endl; +#endif + } + } + + // Determine whether we have modified the buffer + // We have modified the buffer if s is not sitting on the null byte of the original + if (*s) { + // null terminate the reference + *s = '\0'; + // Since we modified the swbuf, we need to tell it what we have done + buf.setSize(s - buf.c_str()); +#ifdef DEBUG_REF + cout << "shortended keyVal to`" << buf.c_str() << "`"<< endl; +#endif + } +} + +bool isKJVRef(const char *buf) { + VerseKey vk, test; + vk.AutoNormalize(0); + vk.Headings(1); // turn on mod/testmnt/book/chap headings + vk.Persist(1); + // lets do some tests on the verse -------------- + vk = buf; + test = buf; + + if (vk.Testament() && vk.Book() && vk.Chapter() && vk.Verse()) { // if we're not a heading +#ifdef DEBUG + cout << (const char*)vk << " == " << (const char*)test << endl; +#endif + return (vk == test); + } + else return true; // no check if we're a heading... Probably bad. +} + + +void makeKJVRef(VerseKey &key) { + cout << "re-versified " << key; +#ifdef DEBUG + cout << "\tC" << (int)(key.builtin_books[key.Testament()-1][key.Book()-1].chapmax) << ":V" << (int)(key.builtin_books[key.Testament()-1][key.Book()-1].versemax[key.Chapter()-1]); +#endif + if (key.Chapter() > key.builtin_books[key.Testament()-1][key.Book()-1].chapmax) { + key.Chapter(key.builtin_books[key.Testament()-1][key.Book()-1].chapmax); + key.Verse(key.builtin_books[key.Testament()-1][key.Book()-1].versemax[key.Chapter()-1]); + } + else if (key.Verse() > key.builtin_books[key.Testament()-1][key.Book()-1].versemax[key.Chapter()-1]) { + key.Verse(key.builtin_books[key.Testament()-1][key.Book()-1].versemax[key.Chapter()-1]); + } + cout << "\tas " << key << endl; +} + + +void writeEntry(VerseKey &key, SWBuf &text, bool force = false) { + static SWBuf activeVerseText; + char keyOsisID[255]; + + if (inCanonicalOSISBook) { + strcpy(keyOsisID, key.getOSISRef()); + + // set keyOsisID to anything that an osisID cannot be. + if (force) { + strcpy(keyOsisID, "-force"); + } + + static VerseKey lastKey; + lastKey.AutoNormalize(0); + lastKey.Headings(1); + + VerseKey saveKey; + saveKey.AutoNormalize(0); + saveKey.Headings(1); + saveKey = key; + + // If we have seen a verse and the supplied one is different then we output the collected one. + if (*activeOsisID && strcmp(activeOsisID, keyOsisID)) { + + key = lastKey; + + if (!isKJVRef(key)) { + makeKJVRef(key); + } + +#ifdef _ICU_ + int utf8State = detectUTF8(activeVerseText.c_str()); + if (normalize) { + // Don't need to normalize text that is ASCII + // But assume other non-UTF-8 text is Latin1 (cp1252) and convert it to UTF-8 + if (!utf8State) { + cout << "Warning: " << activeOsisID << ": Converting to UTF-8 (" << activeVerseText << ")" << endl; + converter.processText(activeVerseText, (SWKey *)2); // note the hack of 2 to mimic a real key. TODO: remove all hacks + converted++; + + // Prepare for double check. This probably can be removed. + // But for now we are running the check again. + // This is to determine whether we need to normalize output of the conversion. + utf8State = detectUTF8(activeVerseText.c_str()); + } + + // Double check. This probably can be removed. + if (!utf8State) { + cout << "Error: " << activeOsisID << ": Converting to UTF-8 (" << activeVerseText << ")" << endl; + } + + if (utf8State > 0) { + SWBuf before = activeVerseText; + normalizer.processText(activeVerseText, (SWKey *)2); // note the hack of 2 to mimic a real key. TODO: remove all hacks + if (before != activeVerseText) { + normalized++; + } + } + } +#endif + + SWBuf currentText = module->getRawEntry(); + if (currentText.length()) { + cout << "Appending entry: " << key.getOSISRef() << ": " << activeVerseText << endl; + activeVerseText = currentText + " " + activeVerseText; + } + +#ifdef DEBUG + cout << "Write: " << activeOsisID << ":" << key.getOSISRef() << ": " << activeVerseText << endl; +#endif + + module->setEntry(activeVerseText); + activeVerseText = ""; + } + + // eliminate leading whitespace on the beginning of each verse and + // before we append to current content, since we just added one + text.trimStart(); + if (activeVerseText.length()) { + activeVerseText += " "; + activeVerseText += text; + } + else { + activeVerseText = text; + } + + key = saveKey; + lastKey = key; + strcpy(activeOsisID, keyOsisID); + } +} + + +void linkToEntry(VerseKey& dest) { + //cout << "Verse: " << key << "\n"; + //cout << "TEXT: " << text << "\n\n"; + //SWBuf currentText = module->getRawEntry(); + //if (currentText.length()) + // text = currentText + " " + text; + VerseKey saveKey; + saveKey.AutoNormalize(0); + saveKey.Headings(1); + saveKey = *currentVerse; + + if (!isKJVRef(*currentVerse)) { + makeKJVRef(*currentVerse); + } + + cout << "Linking " << module->KeyText() << " to " << dest.getText() << "\n"; + module->linkEntry(&dest); + + *currentVerse = saveKey; +} + +// Return true if the content was handled or is to be ignored. +// false if the what has been seen is to be accumulated and considered later. +bool handleToken(SWBuf &text, XMLTag *token) { + + // Everything between the begin book tag and the first begin chapter tag is inBookHeader + static bool inBookHeader = false; + // Everything between the begin chapter tag and the first begin verse tag is inChapterHeader + static bool inChapterHeader = false; + + // Flags to indicate whether we are in a book, chapter and/or verse + //static bool inBook = false; + //static bool inChapter = false; + static bool inVerse = true; + + static SWBuf header = ""; + + // Used to remember titles that need to be handle specially + static SWBuf lastTitle = ""; + static int titleOffset = -1; + static bool inTitle = false; + static int titleDepth = 0; + + static ListKey lastVerseIDs = ListKey(); + + // Stack of elements used to validate that books, chapters and verses are well-formed + // This goes beyond simple xml well-formed and also considers milestoned div, chapter and verse + // to be begin and end tags, too. + // It is an error if books and chapters are not well formed (though not required by OSIS) + // It is a warning that verses are not well formed (because some clients are not ready) + static std::stack tagStack; + // The following are used to validate well-formedness + static int chapterDepth = 0; + static int bookDepth = 0; + static int verseDepth = 0; + + int tagDepth = tagStack.size(); + const char *tokenName = token->getName(); + bool isEndTag = token->isEndTag() || token->getAttribute("eID"); + const char *typeAttr = token->getAttribute("type"); + + //Titles are treated specially. + // If the title has an attribute type of "main" or "chapter" + // it belongs to its
or and is treated as part of its heading + // Otherwise if it a title in a chapter before the first the first verse it + // is put into the verse as a preverse title. + if (!token->isEmpty() && !isEndTag && titleDepth == 0 && (!strcmp(tokenName, "title")) && (!typeAttr || (strcmp(typeAttr, "main") && strcmp(typeAttr, "chapter")))) { + titleOffset = text.length(); //start of the title tag + lastTitle = ""; + inTitle = true; + tagStack.push(token); +#ifdef DEBUG_STACK + cout << currentOsisID << ": push (" << tagStack.size() << ") " << token->getName() << endl; +#endif + titleDepth = tagStack.size(); + return false; + } + // Check titleDepth since titles can be nested. Don't want to quit too early. + else if (isEndTag && tagDepth == titleDepth && (!strcmp(tokenName, "title"))) { + lastTitle.append(text.c_str() + titleOffset); // up to the end + lastTitle.append(*token); // + +#ifdef DEBUG + cout << currentOsisID << ":" << endl; + cout << "\tlastTitle: " << lastTitle.c_str() << endl; + cout << "\ttext-lastTitle: " << text.c_str()+titleOffset << endl; + cout << "\ttext: " << text.c_str() << endl; +#endif + inTitle = false; + titleDepth = 0; +#ifdef DEBUG_STACK + cout << currentOsisID << ": pop(" << tagStack.size() << ") " << tagStack.top()->getName() << endl; +#endif + tagStack.pop(); + return false; // don't add to the text itself + } + + + +//-- START TAG ------------------------------------------------------------------------- + + if (!isEndTag) { + + // Remember non-empty start tags + if (!token->isEmpty()) { + tagStack.push(token); +#ifdef DEBUG_STACK + cout << currentOsisID << ": push (" << tagStack.size() << ") " << token->getName() << endl; +#endif + } + + //-- WITH OSIS ID ------------------------------------------------------------------------- + //-- OR ANNOTATE REF ------------------------------------------------------------------------- + if (token->getAttribute("osisID") || token->getAttribute("annotateRef")) { + + // BOOK START + if ((!strcmp(tokenName, "div")) && (typeAttr && !strcmp(typeAttr, "book"))) { + inVerse = false; + if (inBookHeader || inChapterHeader) { // this one should never happen, but just in case +#ifdef DEBUG + cout << currentOsisID << ": HEADING "; +#endif + currentVerse->Testament(0); + currentVerse->Book(0); + currentVerse->Chapter(0); + currentVerse->Verse(0); + writeEntry(*currentVerse, text); + } + strcpy(currentOsisID, token->getAttribute("osisID")); + *currentVerse = currentOsisID; + currentVerse->Chapter(0); + currentVerse->Verse(0); + inBookHeader = true; + inChapterHeader = false; + lastTitle = ""; + text = ""; + bookDepth = tagStack.size(); + chapterDepth = 0; + verseDepth = 0; + + inCanonicalOSISBook = isOSISAbbrev(token->getAttribute("osisID")); + + return true; + } + + // CHAPTER START + else if (((!strcmp(tokenName, "div")) && (typeAttr && !strcmp(typeAttr, "chapter"))) + || (!strcmp(tokenName, "chapter")) + ) { + inVerse = false; + if (inBookHeader) { +#ifdef DEBUG + cout << currentOsisID << ": BOOK HEADING "<< text.c_str() << endl; +#endif + writeEntry(*currentVerse, text); + } + + strcpy(currentOsisID, token->getAttribute("osisID")); + *currentVerse = currentOsisID; + currentVerse->Verse(0); + inBookHeader = false; + inChapterHeader = true; + lastTitle = ""; + text = ""; + chapterDepth = tagStack.size(); + verseDepth = 0; + + return true; + } + + // VERSE OR COMMENTARY START + else if (!strcmp(tokenName, "verse") || + (!strcmp(tokenName, "div") && + token->getAttribute("annotateType"))) { +#ifdef DEBUG + cout << "Entering verse" << endl; +#endif + inVerse = true; + if (inChapterHeader) { + SWBuf heading = text; + + //make sure we don't insert the preverse title which belongs to the first verse of this chapter! + // Did we have a preverse title? + if (lastTitle.length()) + { + //Was the preVerse title in the header (error if not)? + const char* header = heading.c_str(); + const char* preVerse = strstr(header, lastTitle); + if (preVerse) { + if (preVerse == header) { + heading = ""; // do nothing + } + else { + // remove everything before the title from the beginning. + text = preVerse; + // Remove text from the end of the header. + heading.setSize(preVerse - header); + } + } + else { + cout << currentOsisID << ": Warning: Bug in code. Could not find title." << endl; + } + } + else { + text = ""; + } + + if (heading.length()) { +#ifdef DEBUG + cout << currentOsisID << ": CHAPTER HEADING "<< heading.c_str() << endl; +#endif + writeEntry(*currentVerse, heading); + } + + inChapterHeader = false; + } + + SWBuf keyVal = token->getAttribute(strcmp(tokenName, "verse") ? "annotateRef" : "osisID"); + prepareSWVerseKey(keyVal); + lastVerseIDs = currentVerse->ParseVerseList(keyVal, *currentVerse, true); + + // set currentVerse to the first value in the keyVal + VerseKey *element = SWDYNAMIC_CAST(VerseKey, lastVerseIDs.GetElement(0)); + if (element) { + *currentVerse = element->LowerBound().getText(); + } + else { + *currentVerse = lastVerseIDs.GetElement(0)->getText(); + } + + strcpy(currentOsisID, currentVerse->getOSISRef()); +#ifdef DEBUG + cout << "Current verse is " << *currentVerse << endl; + cout << "osisID/annotateRef is adjusted to" << keyVal << endl; +#endif + + verseDepth = tagStack.size(); + + return true; + } + } + // Handle stuff between the verses + // Whitespace producing empty tokens are appended to prior entry + // Also the quote + // This is a hack to get ESV to work + else if (!inTitle && !inVerse && token->isEmpty()) { // && !inBookHeader && !inChapterHeader) { + if (!strcmp(tokenName, "p") || + !strcmp(tokenName, "div") || + !strcmp(tokenName, "q") || + !strcmp(tokenName, "l") || + !strcmp(tokenName, "lb") || + !strcmp(tokenName, "lg") + ) { +#ifdef DEBUG + if (token) { + cout << currentOsisID << ": appending interverse start token " << *token << ":" << text.c_str() << endl; + } +#endif + SWBuf tmp = token->toString(); + writeEntry(*currentVerse, tmp); + return true; + } +#ifdef DEBUG + else { + if (token) { + cout << currentOsisID << ": interverse start token " << *token << ":" << text.c_str() << endl; + } + } +#endif + } + } + +//-- EMPTY and END TAG --------------------------------------------------------------------------------------------- + + else { + + if (tagStack.empty()) { + cout << currentOsisID << ": tag expected" << endl; + exit(1); + } + + XMLTag* topToken = 0; + if (!token->isEmpty()) { + topToken = tagStack.top(); + tagDepth = tagStack.size(); +#ifdef DEBUG_STACK + cout << currentOsisID << ": pop(" << tagDepth << ") " << topToken->getName() << endl; +#endif + tagStack.pop(); + + if (strcmp(topToken->getName(), tokenName)) { + cout << "Error: " << currentOsisID << ": Expected " << topToken->getName() << " found " << tokenName << endl; +// exit(1); // I'm sure this validity check is a good idea, but there's a but somewhere that's killing the converter here. + // So I'm disabling this line. Unvalidated OSIS files shouldn't be run through the converter anyway. + } + } + + // VERSE and COMMENTARY END + if (!strcmp(tokenName, "verse") || (inVerse && !strcmp(tokenName, "div"))) { + inVerse = false; + + if (tagDepth != verseDepth) { + cout << "Warning verse " << currentOsisID << " is not well formed:(" << verseDepth << "," << tagDepth << ")" << endl; + } + + if (lastTitle.length()) { + const char* end = strchr(lastTitle, '>'); +#ifdef DEBUG + cout << currentOsisID << ":" << endl; + cout << "\t" << lastTitle << endl; + cout << "\tlength=" << int(end+1 - lastTitle.c_str()) << ", tag:" << lastTitle.c_str() << endl; +#endif + + SWBuf titleTagText; + titleTagText.append(lastTitle.c_str(), end+1 - lastTitle.c_str()); +#ifdef DEBUG + cout << currentOsisID << ": tagText: " << titleTagText.c_str() << endl;; +#endif + + XMLTag titleTag(titleTagText); + titleTag.setAttribute("type", "section"); + titleTag.setAttribute("subType", "x-preverse"); + + //we insert the title into the text again - make sure to remove the old title text + const char* pos = strstr(text, lastTitle); + if (pos) { + SWBuf temp; + temp.append(text, pos-text.c_str()); + temp.append(pos+lastTitle.length()); + text = temp; + } + + //if a title was already inserted at the beginning insert this one after that first title + int titlePos = 0; + if (!strncmp(text.c_str(),""); + if (tmp) { + titlePos = (tmp-text.c_str()) + 8; + } + } + text.insert(titlePos, end+1); + text.insert(titlePos, titleTag); + } + // text += token; + writeEntry(*currentVerse, text); + + // If we found an osisID like osisID="Gen.1.1 Gen.1.2 Gen.1.3" we have to link Gen.1.2 and Gen.1.3 to Gen.1.1 + VerseKey dest = *currentVerse; + VerseKey linkKey; + linkKey.AutoNormalize(0); + linkKey.Headings(1); // turn on mod/testmnt/book/chap headings + linkKey.Persist(1); + for (lastVerseIDs = TOP; !lastVerseIDs.Error(); lastVerseIDs++) { + linkKey = lastVerseIDs; + + if (linkKey.Verse() != dest.Verse() || + linkKey.Chapter() != dest.Chapter() || + linkKey.Book() != dest.Book() || + linkKey.Testament() != dest.Testament()) + { + *currentVerse = linkKey; + linkToEntry(dest); + } + } + + lastTitle = ""; + text = ""; + verseDepth = 0; + return true; + } + else if (!inTitle && !inVerse && !inBookHeader && !inChapterHeader) { + // Is this the end of a chapter. + if (tagDepth == chapterDepth && (!strcmp(tokenName, "div") || !strcmp(tokenName, "chapter"))) { + chapterDepth = 0; + verseDepth = 0; + text = ""; + return true; + } + // Or is it the end of a book + else if (tagDepth == bookDepth && (!strcmp(tokenName, "div"))) { + bookDepth = 0; + chapterDepth = 0; + verseDepth = 0; + text = ""; + return true; + } + // Or is it the end of an osis document + else if (!strcmp(tokenName, "osisText") || !strcmp(tokenName, "osis")) { + bookDepth = 0; + chapterDepth = 0; + verseDepth = 0; + text = ""; + return true; + } + // OTHER MISC END TAGS WHEN !INVERSE + // Test that is between verses, or after the last is appended to the preceeding verse. + else if (!strcmp(tokenName, "p") || + !strcmp(tokenName, "div") || + !strcmp(tokenName, "q") || + !strcmp(tokenName, "l") || + !strcmp(tokenName, "lb") || + !strcmp(tokenName, "lg") + ) { + text.append(*token); + writeEntry(*currentVerse, text); + text = ""; +#ifdef DEBUG + cout << currentOsisID << ": appending interverse end tag: " << tokenName << "(" << tagDepth << "," << chapterDepth << "," << bookDepth << ")" << endl; +#endif + return true; + } +#ifdef DEBUG + cout << currentOsisID << ": interverse end tag: " << tokenName << "(" << tagDepth << "," << chapterDepth << "," << bookDepth << ")" << endl; +#endif + } + } + return false; +} + +XMLTag* transform(XMLTag* t) { + static std::stack<XMLTag*> tagStack; + static int sID = 1; + char buf[11]; + + // Support simplification transformations + if (!t->isEmpty()) { + if (!t->isEndTag()) { + tagStack.push(t); +#ifdef DEBUG_XFORM + cout << currentOsisID << ": xform push (" << tagStack.size() << ") " << t->getName() << endl; +#endif + // Transform <q> into <q sID=""/> except for <q who="Jesus"> + if ((!strcmp(t->getName(), "q")) && (!t->getAttribute("who") || strcmp(t->getAttribute("who"), "Jesus"))) { + t->setEmpty(true); + sprintf(buf, "q%d", sID++); + t->setAttribute("sID", buf); + } + + // Transform <p> into <lb type="x-begin-paragraph"/> + else if (!strcmp(t->getName(), "p")) { + // note there is no process that should care about type, it is there for reversability + t->setText("<lb type=\"x-begin-paragraph\" />"); + } + } + else { + XMLTag *topToken = tagStack.top(); +#ifdef DEBUG_XFORM + cout << currentOsisID << ": xform pop(" << tagStack.size() << ") " << topToken->getName() << endl; +#endif + tagStack.pop(); + + // If we have found an end tag for a <q> that was transformed then transform this one as well. + if ((!strcmp(t->getName(), "q")) && (!strcmp(topToken->getName(), "q")) && (!topToken->getAttribute("who") || strcmp(topToken->getAttribute("who"), "Jesus"))) { + // make this a clone of the start tag with sID changed to eID + *t = *topToken; + t->setAttribute("eID", t->getAttribute("sID")); + t->setAttribute("sID", 0); + } + + // Look for paragraph tags. + // If we have found an end tag for a <p> that was transformed then transform this as well. + else if ((!strcmp(t->getName(), "p")) && (!strcmp(topToken->getName(), "lb"))) { + t->setText("<lb type=\"x-end-paragraph\" />"); + } + } + } + return t; +} + +void usage(const char *app, const char *error = 0) { + + if (error) fprintf(stderr, "\n%s: %s\n", app, error); + + fprintf(stderr, "\nusage: %s <output/path> <osisDoc> [OPTIONS]\n", app); + fprintf(stderr, " -a\t\t\t augment module if exists (default is to create new)\n"); + fprintf(stderr, " -z\t\t\t use ZIP compression (default no compression)\n"); + fprintf(stderr, " -Z\t\t\t use LZSS compression (default no compression)\n"); + fprintf(stderr, " -b <2|3|4>\t\t compression block size (default 4):\n"); + fprintf(stderr, "\t\t\t\t 2 - verse; 3 - chapter; 4 - book\n"); + fprintf(stderr, " -c <cipher_key>\t encipher module using supplied key\n"); + fprintf(stderr, "\t\t\t\t (default no enciphering)\n"); + fprintf(stderr, " -N\t\t\t Do not convert UTF-8 or normalize UTF-8 to NFC\n"); + fprintf(stderr, "\t\t\t\t (default is to convert to UTF-8, if needed, and then normalize to NFC"); + fprintf(stderr, "\t\t\t\t Note: all UTF-8 texts should be normalized to NFC\n"); + exit(-1); +} + +int main(int argc, char **argv) { + + fprintf(stderr, "You are running osis2mod: $Rev: 2169 $\n"); + + // Let's test our command line arguments + if (argc < 3) { + usage(*argv); + } + + // variables for arguments, holding defaults + const char* program = argv[0]; + const char* path = argv[1]; + const char* osisDoc = argv[2]; + int append = 0; + int compType = 0; + int iType = 4; + string cipherKey = ""; + + SWCompress *compressor = 0; + + for (int i = 3; i < argc; i++) { + if (!strcmp(argv[i], "-a")) { + append = 1; + } + else if (!strcmp(argv[i], "-z")) { + if (compType) usage(*argv, "Cannot specify both -z and -Z"); + compType = 2; + } + else if (!strcmp(argv[i], "-Z")) { + if (compType) usage(*argv, "Cannot specify both -z and -Z"); + compType = 1; + } + else if (!strcmp(argv[i], "-b")) { + if (i+1 < argc) { + iType = atoi(argv[++i]); + if ((iType >= 2) && (iType <= 4)) continue; + } + usage(*argv, "-b requires one of <2|3|4>"); + } + else if (!strcmp(argv[i], "-N")) { + normalize = false; + } + else if (!strcmp(argv[i], "-c")) { + if (i+1 < argc) cipherKey = argv[++i]; + else usage(*argv, "-c requires <cipher_key>"); + } + else usage(*argv, (((SWBuf)"Unknown argument: ")+ argv[i]).c_str()); + } + + switch (compType) { // these are deleted by zText + case 0: break; + case 1: compressor = new LZSSCompress(); break; + case 2: compressor = new ZipCompress(); break; + } + +#ifndef _ICU_ + if (normalize) { + normalize = false; + cout << program << " is not compiled with support for ICU. Ignoring -n flag." << endl; + } +#endif + +#ifdef DEBUG + cout << "path: " << path << " osisDoc: " << osisDoc << " create: " << append << " compressType: " << compType << " blockType: " << iType << " cipherKey: " << cipherKey.c_str() << " normalize: " << normalize << "\n"; + cout << ""; +// exit(-3); +#endif + + + if (!append) { // == 0 then create module + // Try to initialize a default set of datafiles and indicies at our + // datapath location passed to us from the user. + if ( compressor ) { + if ( zText::createModule(path, iType) ) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", program, path); + exit(-3); + } + } + else if (RawText::createModule(path)) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", program, path); + exit(-3); + } + } + + // Let's see if we can open our input file + ifstream infile(osisDoc); + if (infile.fail()) { + fprintf(stderr, "error: %s: couldn't open input file: %s \n", program, osisDoc); + exit(-2); + } + + // Do some initialization stuff + if (compressor) { + module = new zText(path, 0, 0, iType, compressor); + } + else{ + module = new RawText(path); // open our datapath with our RawText driver. + } + + SWFilter *cipherFilter = 0; + + if (!cipherKey.empty()) { + fprintf(stderr, "Adding cipher filter with phrase: %s\n", cipherKey.c_str() ); + cipherFilter = new CipherFilter(cipherKey.c_str()); + module->AddRawFilter(cipherFilter); + } + + if (!module->isWritable()) { + fprintf(stderr, "The module is not writable. Writing text to it will not work.\nExiting.\n" ); + exit(-1); + } + + activeOsisID[0] = '\0'; + strcpy(currentOsisID,"N/A"); + + currentVerse = new VerseKey(); + currentVerse->AutoNormalize(0); + currentVerse->Headings(1); // turn on mod/testmnt/book/chap headings + currentVerse->Persist(1); + + module->setKey(*currentVerse); + + (*module) = TOP; + + SWBuf token; + SWBuf text; + bool intoken = false; + bool inWhitespace = false; + bool seeingSpace = false; + char curChar = '\0'; + + while (infile.good()) { + + curChar = infile.get(); + + // skip the character if it is bad. infile.good() will catch the problem + if (curChar == -1) { + continue; + } + + if (!intoken && curChar == '<') { + intoken = true; + token = "<"; + continue; + } + + // Outside of tokens merge adjacent whitespace + if (!intoken) { + seeingSpace = isspace(curChar); + if (seeingSpace) { + if (inWhitespace) { + continue; + } + // convert all whitespace to blanks + curChar = ' '; + } + inWhitespace = seeingSpace; + } + + if (intoken && curChar == '>') { + intoken = false; + inWhitespace = false; + token.append('>'); + // take this isalpha if out to check for bugs in text + if ((isalpha(token[1])) || (isalpha(token[2]))) { + //cout << "Handle:" << token.c_str() << endl; + XMLTag *t = new XMLTag(token.c_str()); + + if (!handleToken(text, transform(t))) { + text.append(*t); + } + } + continue; + } + + if (intoken) + token.append(curChar); + else + switch (curChar) { + case '>' : text.append(">"); break; + case '<' : text.append("<"); break; + default : text.append(curChar); break; + } + } + + // Force the last entry from the text buffer. + text = ""; + writeEntry(*currentVerse, text, true); + delete module; + delete currentVerse; + if (cipherFilter) + delete cipherFilter; + infile.close(); + +#ifdef _ICU_ + if (converted) fprintf(stderr, "osis2mod converted %d verses to UTF-8\n", converted); + if (normalized) fprintf(stderr, "osis2mod normalized %d verses to NFC\n", normalized); +#endif +} + diff --git a/utilities/perl/Makefile.am b/utilities/perl/Makefile.am new file mode 100644 index 0000000..d9c9556 --- /dev/null +++ b/utilities/perl/Makefile.am @@ -0,0 +1,6 @@ +swperlutildir = $(top_srcdir)/utilities/perl + +EXTRA_DIST += $(swperlutildir)/cipherkeygen.pl +EXTRA_DIST += $(swperlutildir)/linkvers.pl +EXTRA_DIST += $(swperlutildir)/localecap.pl +EXTRA_DIST += $(swperlutildir)/mkvsmod.pl diff --git a/utilities/perl/cipherkeygen.pl b/utilities/perl/cipherkeygen.pl new file mode 100755 index 0000000..db53d88 --- /dev/null +++ b/utilities/perl/cipherkeygen.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +# cipherkeygen.pl + +# generates a cipher key of the format \d{4}[a-zA-Z]{4}\d{4}[a-zA-Z]{4}. +# because I'm lazy and not random enough. +# and because the utilities/perl directory is kinda bare... + + +# let's get a base key of \d{4}[A-Z]{4}\d{4}[A-Z]{4} +$key = int(rand() * 10) . int(rand() * 10) . int(rand() * 10) . int(rand() * 10) . chr(int(rand() * 26) + 0x41) . chr(int(rand() * 26) + 0x41) . chr(int(rand() * 26) + 0x41) . chr(int(rand() * 26) + 0x41) . int(rand() * 10) . int(rand() * 10) . int(rand() * 10) . int(rand() * 10) . chr(int(rand() * 26) + 0x41) . chr(int(rand() * 26) + 0x41) . chr(int(rand() * 26) + 0x41) . chr(int(rand() * 26) + 0x41); + +# now randomly lowercase the letters, printing as we go +foreach $c (unpack ("cccccccccccccccc", $key)) { + $c = chr($c); + if (rand() < 0.5) { + $c = lc($c); + } + print $c; +} +print "\n"; + + + diff --git a/utilities/perl/linkvers.pl b/utilities/perl/linkvers.pl new file mode 100755 index 0000000..caf3192 --- /dev/null +++ b/utilities/perl/linkvers.pl @@ -0,0 +1,44 @@ +#!/usr/bin/perl + +$vplfile = $ARGV[0]; + +if ($vplfile eq "") { + die("linkvers.pl Syntax:\n./linkvers.pl <vpl file> [1 - checking mode on].\nMust be run AFTER vpl2mod is completed.\n"); +} + +$check = $ARGV[1]; + +open(INF,$vplfile) or die; +while (<INF>) { + $line = $_; + + $line =~ /([\w ]+:[\d\-]+)\s+(.*)/; + $vref = $1; + + if ($vref =~ /\-/) { + $vref =~ /(.*:)(\d+)\-(\d+)/; + $ch = $1; + $fv = $2; + $lv = $3; + if ($fv + 1 == $lv) { + $sv = $lv; + } + else { + $sv = $fv + 1; + $sv .= "-" . $lv; + } + $first = $ch . $fv; + $last = $ch . $sv; + + if ($check ne "") { + print "$first\t\t$last\n"; + } else { + `addvs -l ./ \"$first\" \"$last\"`; + } + } +} +close(INF); + + + + diff --git a/utilities/perl/localecap.pl b/utilities/perl/localecap.pl new file mode 100755 index 0000000..f5d846e --- /dev/null +++ b/utilities/perl/localecap.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +# This tool is only for locales in Latin-1, not UTF-8 (should such locales be supported at a later date) + +use locale; + +$abbrevs = 0; + +open (INPUT, "$ARGV[0]") or print "Give the locale file as an argument.\n"; +@loc = <INPUT>; +close (INPUT); +open (OUTPUT, ">$ARGV[0]"); +foreach $line (@loc) { + + if ($line =~ /\[Book Abbrevs\]/) { + $abbrevs = 1; + } + elsif ($abbrevs == 1) { + $line = uc($line); + } + print OUTPUT $line; +} +close (OUTPUT); diff --git a/utilities/perl/mkvsmod.pl b/utilities/perl/mkvsmod.pl new file mode 100755 index 0000000..e44c27d --- /dev/null +++ b/utilities/perl/mkvsmod.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +open (INF, $ARGV[0]); + +`addvs -c ./`; +while (<INF>) { + + $line = $_; + $line =~ s/[\r\n]//g; + $line =~ /(.+\d+:\d+:?) +(.*)/; + $ref = $1; + $ver = $2; + open (BUF, ">buffer"); + print BUF "$ver"; + close (BUF); + $x = `addvs -a ./ \"$ref\" buffer`; + print "$ref\n"; + +} + +close (INF); diff --git a/utilities/step2vpl.cpp b/utilities/step2vpl.cpp new file mode 100644 index 0000000..b76dd6a --- /dev/null +++ b/utilities/step2vpl.cpp @@ -0,0 +1,429 @@ +#include <iostream> +#include <string> +#include <stdio.h> +#include <sys/stat.h> + +#include <fcntl.h> + +#ifndef __GNUC__ +#include <io.h> +#else +#include <unistd.h> +#endif + +#include <filemgr.h> +#include <lzsscomprs.h> + +using namespace std; +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +long SECTIONSLEVELSTART = 38; +long SECTIONSLEVELSIZE = 29; + +long VIEWABLEBLOCKSTART = 0; +long VIEWABLEBLOCKSIZE = 0; + +typedef struct { + short versionRecordSize; + short publisherID; + short bookID; + short setID; + char conversionProgramVerMajor; + char conversionProgramVerMinor; + char leastCompatSTEPVerMajor; + char leastCompatSTEPVerMinor; + char encryptionType; + char editionID; + short modifiedBy; +} Version; + +typedef struct { + short sectionsHeaderRecordSize; + long levelEntriesCount; // this is listed as nonGlossBlocksCount in spec! + long glossEntriesCount; + short levelEntriesSize; + long reserved; +} SectionsHeader; + +typedef struct { + short viewableHeaderRecordSize; + long viewableBlocksCount; // this is listed as nonGlossBlocksCount in spec! + long glossBlocksCount; + char compressionType; // 0 - none; 1 - LZSS + char reserved1; + short blockEntriesSize; + short reserved2; +} ViewableHeader; + +typedef struct { + short vSyncHeaderRecordSize; + short startBookNumber; + short endBookNumber; + short bookPointerEntriesSize; + short syncPointEntriesSize; + long reserved1_1; + short reserved1_2; +} VSyncHeader; + +typedef struct { + long offset; + long uncompressedSize; + long size; +} ViewableBlock; + +typedef struct { + long offset; // offset into VSYNC.IDX to first VSyncPoint + short count; // number of VSyncPoints for this book +} VSyncBooksInfo; + +typedef struct { + short chapter; + short verse; + long offset; // offset into SECTIONS.IDX +} VSyncPoint; + +typedef struct { + long parentOffset; // many of these are 0 if glossary + long previousOffset; + long nextOffset; + long viewableOffset; + short startLevel; + char level; + long nameOffset; + long outSync_1; + short outSync_2; +} SectionLevelInfo; + +void readVersion(int fd, Version *versionRecord); +void readHeaderControlWordAreaText(int fd, char **buf); +void readViewableHeader(int fd, ViewableHeader *viewableHeaderRecord); +void readVSyncHeader(int fd, VSyncHeader *vSyncHeaderRecord); +void readVSyncBooksInfo(int fd, VSyncHeader *, VSyncBooksInfo **vSyncBooksInfo); +void readViewableBlock(int fd, ViewableBlock *vb); +void readViewableBlockText(int fd, ViewableBlock *vb, char **buf); +void readSectionsHeader(int fd, SectionsHeader *sectionsHeaderRecord); +void readSectionLevelInfo(int fd, SectionLevelInfo *sli); +void readSectionName(int fd, SectionLevelInfo *sli, char **name); +void displayBook(int fdbook, int fdviewable, int fdvsync, int fdsections, VSyncBooksInfo *vSyncBooksInfo); +void extractVerseText(int fdviewable, int fdbook, SectionLevelInfo *sectionLevelInfo, char **verseText); +void cleanBuf(char *buf); + +SWCompress *compress = 0; + +int main(int argc, char **argv) { + + compress = new LZSSCompress(); + char *buf; + Version versionRecord; + VSyncHeader vSyncHeaderRecord; + VSyncBooksInfo *vSyncBooksInfo; + SectionsHeader sectionsHeaderRecord; + ViewableHeader viewableHeaderRecord; + + + if (argc < 2) { + cerr << "usage: "<< *argv << " <database to step module>\n"; + exit (-1); + } + + string bookpath = argv[1]; + string fileName; + + if ((argv[1][strlen(argv[1])-1] != '/') && + (argv[1][strlen(argv[1])-1] != '\\')) + bookpath += "/"; + + fileName = bookpath + "Book.dat"; + int fdbook = FileMgr::openFileReadOnly(fileName.c_str()); + + if (fdbook < 1) { + cerr << "error, couldn't open file: " << fileName << "\n"; + exit (-2); + } + + readVersion(fdbook, &versionRecord); + readHeaderControlWordAreaText(fdbook, &buf); + delete [] buf; + + + fileName = bookpath + "Viewable.idx"; + int fdviewable = FileMgr::openFileReadOnly(fileName.c_str()); + + if (fdviewable < 1) { + cerr << "error, couldn't open file: " << fileName << "\n"; + exit (-3); + } + + readVersion(fdviewable, &versionRecord); + readViewableHeader(fdviewable, &viewableHeaderRecord); + + VIEWABLEBLOCKSTART = lseek(fdviewable, 0, SEEK_CUR); + VIEWABLEBLOCKSIZE = viewableHeaderRecord.blockEntriesSize; + + + fileName = bookpath + "Vsync.idx"; + int fdvsync = FileMgr::openFileReadOnly(fileName.c_str()); + + if (fdvsync < 1) { + cerr << "error, couldn't open file: " << fileName << "\n"; + exit (-4); + } + + fileName = bookpath + "Sections.idx"; + int fdsections = FileMgr::openFileReadOnly(fileName.c_str()); + + if (fdsections < 1) { + cerr << "error, couldn't open file: " << fileName << "\n"; + exit (-4); + } + readVersion(fdsections, &versionRecord); + readSectionsHeader(fdsections, §ionsHeaderRecord); + SECTIONSLEVELSTART = lseek(fdsections, 0, SEEK_CUR); + SECTIONSLEVELSIZE = sectionsHeaderRecord.levelEntriesSize; + + readVersion(fdvsync, &versionRecord); + readVSyncHeader(fdvsync, &vSyncHeaderRecord); + readVSyncBooksInfo(fdvsync, &vSyncHeaderRecord, &vSyncBooksInfo); + int bookCount = vSyncHeaderRecord.endBookNumber - vSyncHeaderRecord.startBookNumber; + for (int i = 0; i <= bookCount; i++) { + displayBook(fdbook, fdviewable, fdvsync, fdsections, &vSyncBooksInfo[i]); + } + + close(fdviewable); + close(fdvsync); + close(fdsections); + close(fdbook); + +} + + + +void readVersion(int fd, Version *versionRecord) { + + read(fd, &(versionRecord->versionRecordSize), 2); + read(fd, &(versionRecord->publisherID), 2); + read(fd, &(versionRecord->bookID), 2); + read(fd, &(versionRecord->setID), 2); + read(fd, &(versionRecord->conversionProgramVerMajor), 1); + read(fd, &(versionRecord->conversionProgramVerMinor), 1); + read(fd, &(versionRecord->leastCompatSTEPVerMajor), 1); + read(fd, &(versionRecord->leastCompatSTEPVerMinor), 1); + read(fd, &(versionRecord->encryptionType), 1); + read(fd, &(versionRecord->editionID), 1); + read(fd, &(versionRecord->modifiedBy), 2); + + int skip = versionRecord->versionRecordSize - 16/*sizeof(struct Version*/; + + if (skip) { + char *skipbuf = new char[skip]; + read(fd, skipbuf, skip); + delete [] skipbuf; + } +} + + +void readSectionsHeader(int fd, SectionsHeader *sectionsHeaderRecord) { + + read(fd, &(sectionsHeaderRecord->sectionsHeaderRecordSize), 2); + read(fd, &(sectionsHeaderRecord->levelEntriesCount), 4); + read(fd, &(sectionsHeaderRecord->glossEntriesCount), 4); + read(fd, &(sectionsHeaderRecord->levelEntriesSize), 2); + read(fd, &(sectionsHeaderRecord->reserved), 4); + + int skip = sectionsHeaderRecord->sectionsHeaderRecordSize - 16/*sizeof(struct ViewableHeader)*/; + + if (skip) { + char *skipbuf = new char[skip]; + read(fd, skipbuf, skip); + delete [] skipbuf; + } +} + + +void readViewableHeader(int fd, ViewableHeader *viewableHeaderRecord) { + + read(fd, &(viewableHeaderRecord->viewableHeaderRecordSize), 2); + read(fd, &(viewableHeaderRecord->viewableBlocksCount), 4); + read(fd, &(viewableHeaderRecord->glossBlocksCount), 4); + read(fd, &(viewableHeaderRecord->compressionType), 1); + read(fd, &(viewableHeaderRecord->reserved1), 1); + read(fd, &(viewableHeaderRecord->blockEntriesSize), 2); + read(fd, &(viewableHeaderRecord->reserved2), 2); + + int skip = viewableHeaderRecord->viewableHeaderRecordSize - 16/*sizeof(struct ViewableHeader)*/; + + if (skip) { + char *skipbuf = new char[skip]; + read(fd, skipbuf, skip); + delete [] skipbuf; + } +} + + +void readVSyncHeader(int fd, VSyncHeader *vSyncHeaderRecord) { + + read(fd, &(vSyncHeaderRecord->vSyncHeaderRecordSize), 2); + read(fd, &(vSyncHeaderRecord->startBookNumber), 2); + read(fd, &(vSyncHeaderRecord->endBookNumber), 2); + read(fd, &(vSyncHeaderRecord->bookPointerEntriesSize), 2); + read(fd, &(vSyncHeaderRecord->syncPointEntriesSize), 2); + read(fd, &(vSyncHeaderRecord->reserved1_1), 4); + read(fd, &(vSyncHeaderRecord->reserved1_2), 2); + + int skip = vSyncHeaderRecord->vSyncHeaderRecordSize - 16/*sizeof(VSyncHeader)*/; + + if (skip) { + char *skipbuf = new char[skip]; + read(fd, skipbuf, skip); + delete [] skipbuf; + } +} + + +void readViewableBlockText(int fd, ViewableBlock *vb, char **buf) { + unsigned long size = vb->size; + + *buf = new char [ ((vb->size > vb->uncompressedSize) ? vb->size : vb->uncompressedSize) + 1 ]; + lseek(fd, vb->offset, SEEK_SET); + read(fd, *buf, vb->size); + + compress->zBuf(&size, *buf); + strcpy(*buf, compress->Buf()); +} + + +void readViewableBlock(int fd, ViewableBlock *vb) { + + read(fd, &(vb->offset), 4); + read(fd, &(vb->uncompressedSize), 4); + read(fd, &(vb->size), 4); +} + + +void readHeaderControlWordAreaText(int fd, char **buf) { + long headerControlWordAreaSize; + read(fd, &headerControlWordAreaSize, 4); + + *buf = new char [headerControlWordAreaSize + 1]; + + read(fd, *buf, headerControlWordAreaSize); + (*buf)[headerControlWordAreaSize] = 0; + +} + +void readVSyncBooksInfo(int fd, VSyncHeader *vSyncHeaderRecord, VSyncBooksInfo **vSyncBooksInfo) { + + int bookCount = vSyncHeaderRecord->endBookNumber - vSyncHeaderRecord->startBookNumber; + *vSyncBooksInfo = new VSyncBooksInfo[bookCount]; + for (int i = 0; i <= bookCount; i++) { + read(fd, &(*vSyncBooksInfo)[i].offset, 4); + read(fd, &(*vSyncBooksInfo)[i].count, 2); + } +} + +void displayBook(int fdbook, int fdviewable, int fdvsync, int fdsections, VSyncBooksInfo *vSyncBooksInfo) { + VSyncPoint vSyncPoint; + + lseek(fdvsync, vSyncBooksInfo->offset, SEEK_SET); + + for (int i = 0; i < vSyncBooksInfo->count; i++) { + + SectionLevelInfo sectionLevelInfo; + char *sectionName; + char *verseText; + + read(fdvsync, &(vSyncPoint.chapter), 2); + read(fdvsync, &(vSyncPoint.verse), 2); + read(fdvsync, &(vSyncPoint.offset), 4); + vSyncPoint.offset = SECTIONSLEVELSTART + (vSyncPoint.offset * SECTIONSLEVELSIZE); + lseek(fdsections, vSyncPoint.offset, SEEK_SET); + readSectionLevelInfo(fdsections, §ionLevelInfo); + readSectionName(fdsections, §ionLevelInfo, §ionName); + cout << sectionName << " "; + delete [] sectionName; + extractVerseText(fdviewable, fdbook, §ionLevelInfo, &verseText); + cleanBuf(verseText); + cout << verseText << "\n"; + delete [] verseText; + } +} + + +void extractVerseText(int fdviewable, int fdbook, SectionLevelInfo *sectionLevelInfo, char **verseText) { + char numberBuf[16]; + string startToken; + ViewableBlock vb; + int len = 0; + static long lastEntryOffset = -1; + static class FreeCachedEntryText { + public: + char *entryText; + FreeCachedEntryText() { entryText = 0; } + ~FreeCachedEntryText() { if (entryText) delete [] entryText; } + } _freeCachedEntryText; + + if (sectionLevelInfo->viewableOffset != lastEntryOffset) { + if (_freeCachedEntryText.entryText) + delete [] _freeCachedEntryText.entryText; + + lseek(fdviewable, sectionLevelInfo->viewableOffset, SEEK_SET); + readViewableBlock(fdviewable, &vb); + readViewableBlockText(fdbook, &vb, &(_freeCachedEntryText.entryText)); + lastEntryOffset = sectionLevelInfo->viewableOffset; + } + sprintf(numberBuf, "%d", sectionLevelInfo->startLevel); + startToken = "\\stepstartlevel"; + startToken += numberBuf; + char *start = strstr(_freeCachedEntryText.entryText, startToken.c_str()); + if (start) { + start += strlen(startToken.c_str()); + char *end = strstr(start, "\\stepstartlevel"); + if (end) + len = end - start; + else len = strlen(start); + } + *verseText = new char [ len + 1 ]; + strncpy(*verseText, start, len); + (*verseText)[len] = 0; +} + + +void readSectionName(int fd, SectionLevelInfo *sli, char **name) { + short size; + lseek(fd, sli->nameOffset, SEEK_SET); + read(fd, &size, 2); + *name = new char [ size + 1 ]; + read(fd, *name, size); + (*name)[size] = 0; +} + +void readSectionLevelInfo(int fd, SectionLevelInfo *sli) { + + read(fd, &(sli->parentOffset), 4); + read(fd, &(sli->previousOffset), 4); + read(fd, &(sli->nextOffset), 4); + read(fd, &(sli->viewableOffset), 4); + sli->viewableOffset = VIEWABLEBLOCKSTART + (VIEWABLEBLOCKSIZE * sli->viewableOffset); + read(fd, &(sli->startLevel), 2); + read(fd, &(sli->level), 1); + read(fd, &(sli->nameOffset), 4); + read(fd, &(sli->outSync_1), 4); + read(fd, &(sli->outSync_2), 2); +} + +void cleanBuf(char *buf) { + char *from = buf; + char *to = buf; + + while (*from) { + if ((*from != 10) && (*from != 13)) { + *to++ = *from++; + } + else { + from++; + } + } + *to = 0; +} diff --git a/utilities/stepdump.cpp b/utilities/stepdump.cpp new file mode 100644 index 0000000..b34bd0a --- /dev/null +++ b/utilities/stepdump.cpp @@ -0,0 +1,253 @@ +#include <iostream> +#include <string> +#include <sys/stat.h> +#include <fcntl.h> + +#ifndef __GNUC__ +#include <io.h> +#else +#include <unistd.h> +#endif + +#include <filemgr.h> +#include <lzsscomprs.h> + +using namespace std; +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +typedef struct { + short versionRecordSize; + short publisherID; + short bookID; + short setID; + char conversionProgramVerMajor; + char conversionProgramVerMinor; + char leastCompatSTEPVerMajor; + char leastCompatSTEPVerMinor; + char encryptionType; + char editionID; + short modifiedBy; +} Version; + +typedef struct { + short viewableHeaderRecordSize; + long viewableBlocksCount; // this is listed as nonGlossBlocksCount in spec! + long glossBlocksCount; + char compressionType; // 0 - none; 1 - LZSS + char reserved1; + short blockEntriesSize; + short reserved2; +} ViewableHeader; + +typedef struct { + long offset; + long uncompressedSize; + long size; +} ViewableBlock; + +void readVersion(int fd, Version *versionRecord); +void readHeaderControlWordAreaText(int fd, char **buf); +void readViewableHeader(int fd, ViewableHeader *viewableHeaderRecord); +void readViewableBlock(int fd, ViewableBlock *vb); +void readViewableBlockText(int fd, ViewableBlock *vb, char **buf); + +SWCompress *compress = 0; + +int main(int argc, char **argv) { + + compress = new LZSSCompress(); + char *buf; + Version versionRecord; + ViewableHeader viewableHeaderRecord; + + if (argc < 2) { + cerr << "usage: "<< *argv << " <database to step module>\n"; + exit (-1); + } + + string bookpath = argv[1]; + string fileName; + + if ((argv[1][strlen(argv[1])-1] != '/') && + (argv[1][strlen(argv[1])-1] != '\\')) + bookpath += "/"; + + fileName = bookpath + "Book.dat"; + int fd = FileMgr::openFileReadOnly(fileName.c_str()); + + if (fd < 1) { + cerr << "error, couldn't open file: " << fileName << "\n"; + exit (-2); + } + + readVersion(fd, &versionRecord); + readHeaderControlWordAreaText(fd, &buf); + delete [] buf; + + + fileName = bookpath + "Viewable.idx"; + int fdv = FileMgr::openFileReadOnly(fileName.c_str()); + + if (fdv < 1) { + cerr << "error, couldn't open file: " << fileName << "\n"; + exit (-3); + } + + readVersion(fdv, &versionRecord); + readViewableHeader(fdv, &viewableHeaderRecord); + + ViewableBlock vb; + + cout << "\n\nReading special preface viewable BLOCK 0"; + + readViewableBlock(fdv, &vb); + readViewableBlockText(fd, &vb, &buf); + delete [] buf; + + int nonGlossBlocksCount = viewableHeaderRecord.viewableBlocksCount + - viewableHeaderRecord.glossBlocksCount; + + cout << "\n\nReading " << nonGlossBlocksCount << " non-glossary viewable blocks"; + // 1 because we already read the first block above + for (int i = 1; i < nonGlossBlocksCount; i++) { + cout << "\nNon-Glossary viewable block: " << i; + readViewableBlock(fdv, &vb); + readViewableBlockText(fd, &vb, &buf); + delete [] buf; + } + + cout << "\n\nReading " << viewableHeaderRecord.glossBlocksCount << " glossary viewable blocks"; + for (int i = 0; i < viewableHeaderRecord.glossBlocksCount; i++) { + cout << "\nGlossary viewable block: " << i; + readViewableBlock(fdv, &vb); + readViewableBlockText(fd, &vb, &buf); + delete [] buf; + } + + close(fdv); + close(fd); + +} + + + +void readVersion(int fd, Version *versionRecord) { + + cout << "\n\nReading Version Record (" << 16/*sizeof(struct Version)*/ << " bytes)\n\n"; +// DO NOT USE BECAUSE OF RECORD BYTE ALIGNMENT PROBLEMS +// read(fd, &versionRecord, sizeof(struct Version)); + + cout << "Version Record Information\n"; + read(fd, &(versionRecord->versionRecordSize), 2); + cout << "\tversionRecordSize: " << versionRecord->versionRecordSize << "\n"; + read(fd, &(versionRecord->publisherID), 2); + cout << "\tpublisherID: " << versionRecord->publisherID << "\n"; + read(fd, &(versionRecord->bookID), 2); + cout << "\tbookID: " << versionRecord->bookID << "\n"; + read(fd, &(versionRecord->setID), 2); + cout << "\tsetID: " << versionRecord->setID << "\n"; + read(fd, &(versionRecord->conversionProgramVerMajor), 1); + cout << "\tconversionProgramVerMajor: " << (int)versionRecord->conversionProgramVerMajor << "\n"; + read(fd, &(versionRecord->conversionProgramVerMinor), 1); + cout << "\tconversionProgramVerMinor: " << (int)versionRecord->conversionProgramVerMinor << "\n"; + read(fd, &(versionRecord->leastCompatSTEPVerMajor), 1); + cout << "\tleastCompatSTEPVerMajor: " << (int)versionRecord->leastCompatSTEPVerMajor << "\n"; + read(fd, &(versionRecord->leastCompatSTEPVerMinor), 1); + cout << "\tleastCompatSTEPVerMinor: " << (int)versionRecord->leastCompatSTEPVerMinor << "\n"; + read(fd, &(versionRecord->encryptionType), 1); + cout << "\tencryptionType: " << (int)versionRecord->encryptionType << "\n"; + read(fd, &(versionRecord->editionID), 1); + cout << "\teditionID: " << (int)versionRecord->editionID << "\n"; + read(fd, &(versionRecord->modifiedBy), 2); + cout << "\tmodifiedBy: " << versionRecord->modifiedBy << "\n"; + + int skip = versionRecord->versionRecordSize - 16/*sizeof(struct Version*/; + + if (skip) { + cout << "\nSkipping " << skip << " unknown bytes.\n"; + char *skipbuf = new char[skip]; + read(fd, skipbuf, skip); + delete [] skipbuf; + } +} + + +void readViewableHeader(int fd, ViewableHeader *viewableHeaderRecord) { + + cout << "\n\nReading Viewable Header Record (" << 16/*sizeof(struct ViewableHeader)*/ << " bytes)\n\n"; + +// DO NOT USE BECAUSE OF RECORD BYTE ALIGNMENT PROBLEMS +// read(fd, &viewableHeaderRecord, sizeof(struct ViewableHeader)); + + cout << "Viewable Header Record Information\n"; + read(fd, &(viewableHeaderRecord->viewableHeaderRecordSize), 2); + cout << "\tviewableHeaderRecordSize: " << viewableHeaderRecord->viewableHeaderRecordSize << "\n"; + read(fd, &(viewableHeaderRecord->viewableBlocksCount), 4); + cout << "\tviewableBlocksCount: " << viewableHeaderRecord->viewableBlocksCount << "\n"; + read(fd, &(viewableHeaderRecord->glossBlocksCount), 4); + cout << "\tglossBlocksCount: " << viewableHeaderRecord->glossBlocksCount << "\n"; + read(fd, &(viewableHeaderRecord->compressionType), 1); + cout << "\tcompressionType: " << (int)viewableHeaderRecord->compressionType << "(0 - none; 1 - LZSS)\n"; + read(fd, &(viewableHeaderRecord->reserved1), 1); + cout << "\treserved1: " << (int)viewableHeaderRecord->reserved1 << "\n"; + read(fd, &(viewableHeaderRecord->blockEntriesSize), 2); + cout << "\tblockEntriesSize: " << viewableHeaderRecord->blockEntriesSize << "\n"; + read(fd, &(viewableHeaderRecord->reserved2), 2); + cout << "\treserved2: " << viewableHeaderRecord->reserved2 << "\n"; + + int skip = viewableHeaderRecord->viewableHeaderRecordSize - 16/*sizeof(struct ViewableHeader)*/; + + if (skip) { + cout << "\nSkipping " << skip << " unknown bytes.\n"; + char *skipbuf = new char[skip]; + read(fd, skipbuf, skip); + delete [] skipbuf; + } +} + + +void readViewableBlockText(int fd, ViewableBlock *vb, char **buf) { + unsigned long size = vb->size; + + *buf = new char [ ((vb->size > vb->uncompressedSize) ? vb->size : vb->uncompressedSize) + 1 ]; + lseek(fd, vb->offset, SEEK_SET); + read(fd, *buf, vb->size); + + compress->zBuf(&size, *buf); + strcpy(*buf, compress->Buf()); + cout << "Viewable Block Text:\n"; + cout << *buf << "\n\n"; +} + + +void readViewableBlock(int fd, ViewableBlock *vb) { + + cout << "\n\nReading Viewable Block (" << 12/*sizeof(struct ViewableHeader)*/ << " bytes)\n\n"; + +// DO NOT USE BECAUSE OF RECORD BYTE ALIGNMENT PROBLEMS +// read(fd, &vb, sizeof(struct ViewableBlock)); + + cout << "Viewable Block Information\n"; + read(fd, &(vb->offset), 4); + cout << "\toffset: " << vb->offset << "\n"; + read(fd, &(vb->uncompressedSize), 4); + cout << "\tuncompressedSize: " << vb->uncompressedSize << "\n"; + read(fd, &(vb->size), 4); + cout << "\tsize: " << vb->size << "\n"; +} + + +void readHeaderControlWordAreaText(int fd, char **buf) { + long headerControlWordAreaSize; + read(fd, &headerControlWordAreaSize, 4); + cout << "Reading Header Control Word Area (" << headerControlWordAreaSize << " bytes)\n\n"; + + *buf = new char [headerControlWordAreaSize + 1]; + + read(fd, *buf, headerControlWordAreaSize); + (*buf)[headerControlWordAreaSize] = 0; + + cout << "headerControlWordArea:\n" << *buf << "\n"; +} diff --git a/utilities/tei2mod.cpp b/utilities/tei2mod.cpp new file mode 100644 index 0000000..a5ae6f4 --- /dev/null +++ b/utilities/tei2mod.cpp @@ -0,0 +1,531 @@ +/** + * This program handles xml files of the form: + * <TEI.2> + * <text> + * <body> + * <entry key="xxx">...</entry> + * <entryFree key="yyy">...</entryFree> + * <superentry key="zzz">...</superentry> + * </body> + * </text> + * </TEI.2> + * The document is assumed to be well-formed and valid. + * Three kinds of entries are allowed, + * <entry> - a very restricted form of a dictionary entry. + * <entryFree> - a very unrestricted form of a dictionary entry. + * <superentry> - an entry which can have other entries. + * The value of the key attribute is used as the key for the entry in the module. + * Note, for a <superentry> only it's key becomes a SWORD key. + * Keys of entries internal to it are not used. + * + * The entries must be sorted according to an ASCII collation of their bytes. + * This should be the same for Latin-1 and for UTF-8 + * + * Sword will allow for any tags, but only a few have any styling. + * + * author DM Smith + */ +#include <string> +#include <vector> +#include <fstream> +#include <iostream> +#include <swbuf.h> +#include <utilxml.h> +#include <rawld.h> +#include <rawld4.h> +#include <zld.h> +#include <zipcomprs.h> +#include <lzsscomprs.h> +#include <stdio.h> +#include <cipherfil.h> + +#ifdef _ICU_ +#include <utf8nfc.h> +#include <latin1utf8.h> +#endif + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +using namespace std; + +#ifdef _ICU_ +UTF8NFC normalizer; +int normalized = 0; + +Latin1UTF8 converter; +int converted = 0; +#endif + +//#define DEBUG + +SWLD *module = NULL; +SWKey *currentKey = NULL; +bool normalize = true; + +/** + * Determine whether the string contains a valid unicode sequence. + * The following table give the pattern of a valid UTF-8 character. + * Unicode Range 1st 2nd 3rd 4th + * U-00000000 - U-0000007F 0nnnnnnn + * U-00000080 - U-000007FF 110nnnnn 10nnnnnn + * U-00000800 - U-0000FFFF 1110nnnn 10nnnnnn 10nnnnnn + * U-00010000 - U-001FFFFF 11110nnn 10nnnnnn 10nnnnnn 10nnnnnn + * Note: + * 1. The latest UTF-8 RFC allows for a max of 4 bytes. + * Earlier allowed 6. + * 2. The number of bits of the leading byte before the first 0 + * is the total number of bytes. + * 3. The "n" are the bits of the unicode codepoint. + * This routine does not check to see if the code point is in the range. + * It could. + * + * param txt the text to check + * return 1 if all high order characters form a valid unicode sequence + * -1 if there are no high order characters. + * Note: this is also a valid unicode sequence + * 0 if there are high order characters that do not form + * a valid unicode sequence + * author DM Smith + */ +int detectUTF8(const char *txt) { + unsigned int countUTF8 = 0; + int count = 0; + + // Cast it to make masking and shifting easier + const unsigned char *p = (const unsigned char*) txt; + while (*p) { + // Is the high order bit set? + if (*p & 0x80) { + // Then count the number of high order bits that are set. + // This determines the number of following bytes + // that are a part of the unicode character + unsigned char i = *p; + for (count = 0; i & 0x80; count++) { + i <<= 1; + } + + // Validate count: + // Count 0: bug in code that would cause core walking + // Count 1: is a pattern of 10nnnnnn, + // which does not signal the start of a unicode character + // Count 5 to 8: 111110nn, 1111110n and 11111110 and 11111111 + // are not legal starts, either + if (count < 2 || count > 4) return 0; + + // At this point we expect (count - 1) following characters + // of the pattern 10nnnnnn + while (--count && *++p) { + // The pattern of each following character must be: 10nnnnnn + // So, compare the top 2 bits. + if ((0xc0 & *p) != 0x80) return 0; + } + + // Oops, we've run out of bytes too soon: Cannot be UTF-8 + if (count) return 0; + + // We have a valid UTF-8 character, so count it + countUTF8++; + } + + // Advance to the next character to examine. + p++; + } + + // At this point it is either UTF-8 or 7-bit ascii + return countUTF8 ? 1 : -1; +} + +void normalizeInput(SWKey &key, SWBuf &text) { +#ifdef _ICU_ + int utf8State = detectUTF8(text.c_str()); + if (normalize) { + // Don't need to normalize text that is ASCII + // But assume other non-UTF-8 text is Latin1 (cp1252) and convert it to UTF-8 + if (!utf8State) { + cout << "Warning: " << key << ": Converting to UTF-8 (" << text << ")" << endl; + converter.processText(text, (SWKey *)2); // note the hack of 2 to mimic a real key. TODO: remove all hacks + converted++; + + // Prepare for double check. This probably can be removed. + // But for now we are running the check again. + // This is to determine whether we need to normalize output of the conversion. + utf8State = detectUTF8(text.c_str()); + } + + // Double check. This probably can be removed. + if (!utf8State) { + cout << "Error: " << key << ": Converting to UTF-8 (" << text << ")" << endl; + } + + if (utf8State > 0) { + SWBuf before = text; + normalizer.processText(text, (SWKey *)2); // note the hack of 2 to mimic a real key. TODO: remove all hacks + if (before != text) { + normalized++; + } + } + } +#endif +} + +void writeEntry(SWKey &key, SWBuf &text) { +#ifdef DEBUG + cout << key << endl; +#endif + + module->setKey(key); + + normalizeInput(key, text); + + module->setEntry(text); +} + +void linkToEntry(SWBuf &keyBuf, vector<string> &linkBuf) { + +/* + char links = linkBuf.size(); + for (int i = 0; i < links; i++) { + SWKey tmpkey = linkBuf[i].c_str(); + module->linkEntry(&tmpkey); + cout << "Linking: " << linkBuf[i] << endl; + } +*/ +} + +// Return true if the content was handled or is to be ignored. +// false if the what has been seen is to be accumulated and considered later. +bool handleToken(SWBuf &text, XMLTag *token) { + // The start token for the current entry; + static XMLTag startTag; + static SWBuf keyBuf; + + // Flags to indicate whether we are in a entry, entryFree or superentry + static bool inEntry = false; + static bool inEntryFree = false; + static bool inSuperEntry = false; + + const char *tokenName = token->getName(); +//-- START TAG ------------------------------------------------------------------------- + if (!token->isEndTag()) { + + // If we are not in an "entry" and we see one, then enter it. + if (!inEntry && !inEntryFree && !inSuperEntry) { + inEntry = !strcmp(tokenName, "entry"); + inEntryFree = !strcmp(tokenName, "entryFree"); + inSuperEntry = !strcmp(tokenName, "superentry"); + if (inEntry || inEntryFree || inSuperEntry) { +#ifdef DEBUG + cout << "Entering " << tokenName << endl; +#endif + startTag = *token; + text = ""; + *currentKey = token->getAttribute("key"); + + return false; // make tag be part of the output + } + } + } + +//-- EMPTY and END TAG --------------------------------------------------------------------------------------------- + else { + + // ENTRY end + // If we see the end of an entry that we are in, then leave it + if ((inEntry && !strcmp(tokenName, "entry" )) || + (inEntryFree && !strcmp(tokenName, "entryFree" )) || + (inSuperEntry && !strcmp(tokenName, "superentry"))) { +#ifdef DEBUG + cout << "Leaving " << tokenName << endl; +#endif + // Only one is false coming into here, + // but all must be on leaving. + inEntry = false; + inEntryFree = false; + inSuperEntry = false; + text += token->toString(); + writeEntry(*currentKey, text); + + // Since we consumed the text, clear it + // and tell the caller that the tag was consumed. + text = ""; + return true; + } + } + return false; +} + +void usage(const char *app, const char *error = 0) { + + if (error) fprintf(stderr, "\n%s: %s\n", app, error); + + fprintf(stderr, "TEI Lexicon/Dictionary/Daily Devotional/Glossary module creation tool for the SWORD Project\n"); + fprintf(stderr, "\nusage: %s <output/path> <teiDoc> [OPTIONS]\n", app); + fprintf(stderr, " -z\t\t\t use ZIP compression (default no compression)\n"); + fprintf(stderr, " -Z\t\t\t use LZSS compression (default no compression)\n"); + fprintf(stderr, " -s <2|4>\t\t max text size per entry(default 4):\n"); + fprintf(stderr, " -c <cipher_key>\t encipher module using supplied key\n"); + fprintf(stderr, "\t\t\t\t (default no enciphering)\n"); + fprintf(stderr, " -N\t\t\t Do not convert UTF-8 or normalize UTF-8 to NFC\n"); + fprintf(stderr, "\t\t\t\t (default is to convert to UTF-8, if needed, and then normalize to NFC"); + fprintf(stderr, "\t\t\t\t Note: all UTF-8 texts should be normalized to NFC\n"); + fprintf(stderr, "-z, -Z, and -s are mutually exclusive\n"); + exit(-1); +} + +int main(int argc, char **argv) { + + SWBuf program = argv[0]; + fprintf(stderr, "You are running %s: $Rev: 2138 $\n", argv[0]); + + // Let's test our command line arguments + if (argc < 3) { + usage(*argv); + } + + // variables for arguments, holding defaults + SWBuf path = argv[1]; + SWBuf teiDoc = argv[2]; + SWBuf compType = ""; + SWBuf modDrv = ""; + SWBuf recommendedPath = "./modules/lexdict/"; + SWBuf cipherKey = ""; + SWCompress *compressor = 0; + + for (int i = 3; i < argc; i++) { + if (!strcmp(argv[i], "-z")) { + if (compType.size()) usage(*argv, "Cannot specify both -z and -Z"); + if (modDrv.size()) usage(*argv, "Cannot specify both -z and -s"); + compType = "ZIP"; + modDrv = "zLD"; + recommendedPath += "zld/"; + } + else if (!strcmp(argv[i], "-Z")) { + if (compType.size()) usage(*argv, "Cannot specify both -z and -Z"); + if (modDrv.size()) usage(*argv, "Cannot specify both -Z and -s"); + compType = "LZSS"; + recommendedPath += "zld/"; + } + else if (!strcmp(argv[i], "-s")) { + if (compType.size()) usage(*argv, "Cannot specify both -s and -z or -Z"); + if (i+1 < argc) { + int size = atoi(argv[++i]); + if (size == 2) { + modDrv = "RawLD"; + recommendedPath += "rawld/"; + continue; + } + if (size == 4) { + modDrv = "RawLD4"; + recommendedPath += "rawld4/"; + continue; + } + } + usage(*argv, "-s requires one of <2|4>"); + } + else if (!strcmp(argv[i], "-N")) { + normalize = false; + } + else if (!strcmp(argv[i], "-c")) { + if (i+1 < argc) cipherKey = argv[++i]; + else usage(*argv, "-c requires <cipher_key>"); + } + else usage(*argv, (((SWBuf)"Unknown argument: ")+ argv[i]).c_str()); + } + if (!modDrv.size()) { + modDrv = "RawLD4"; + recommendedPath += "rawld4/"; + } + +#ifndef _ICU_ + if (normalize) { + normalize = false; + cout << program << " is not compiled with support for ICU. Setting -N flag." << endl; + } +#endif + + if (compType == "ZIP") { + compressor = new ZipCompress(); + } + else if (compType = "LZSS") { + compressor = new LZSSCompress(); + } + +#ifdef DEBUG + // cout << "path: " << path << " teiDoc: " << teiDoc << " compressType: " << compType << " ldType: " << modDrv << " cipherKey: " << cipherKey.c_str() << " normalize: " << normalize << "\n"; + cout << "path: " << path << " teiDoc: " << teiDoc << " compressType: " << compType << " ldType: " << modDrv << " normalize: " << normalize << "\n"; + cout << ""; +// exit(-3); +#endif + + SWBuf modName = path; + int pathlen = path.length(); + char lastChar = path[pathlen - 1]; + if (lastChar != '/' && lastChar != '\\') { + modName += "/"; + } + modName += "dict"; + + SWBuf keyBuf; + SWBuf entBuf; + SWBuf lineBuf; + vector<string> linkBuf; + + if (modDrv == "zLD") { + if (zLD::createModule(modName)) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", program.c_str(), modName.c_str()); + exit(-3); + } + module = new zLD(modName, 0, 0, 30, compressor); + } + else if (modDrv == "RawLD") { + if (RawLD::createModule(modName)) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", program.c_str(), modName.c_str()); + exit(-3); + } + module = new RawLD(modName); + } + else { + if (RawLD4::createModule(modName)) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", program.c_str(), modName.c_str()); + exit(-3); + } + module = new RawLD4(modName); + } + + SWFilter *cipherFilter = 0; + + if (cipherKey.size()) { + fprintf(stderr, "Adding cipher filter with phrase: %s\n", cipherKey.c_str() ); + cipherFilter = new CipherFilter(cipherKey.c_str()); + module->AddRawFilter(cipherFilter); + } + + if (!module->isWritable()) { + fprintf(stderr, "The module is not writable. Writing text to it will not work.\nExiting.\n" ); + exit(-1); + } + + // Let's see if we can open our input file + ifstream infile(teiDoc); + if (infile.fail()) { + fprintf(stderr, "error: %s: couldn't open input file: %s \n", program.c_str(), teiDoc.c_str()); + exit(-2); + } + + currentKey = module->CreateKey(); + currentKey->Persist(1); + module->setKey(*currentKey); + + (*module) = TOP; + + SWBuf token; + SWBuf text; + bool intoken = false; + char curChar = '\0'; + + while (infile.good()) { + + curChar = infile.get(); + + // skip the character if it is bad. infile.good() will catch the problem + if (curChar == -1) { + continue; + } + + if (!intoken && curChar == '<') { + intoken = true; + token = "<"; + continue; + } + + if (intoken && curChar == '>') { + intoken = false; + token.append('>'); + + XMLTag *t = new XMLTag(token.c_str()); + if (!handleToken(text, t)) { + text.append(*t); + } + continue; + } + + if (intoken) + token.append(curChar); + else + switch (curChar) { + case '>' : text.append(">"); break; + case '<' : text.append("<"); break; + default : text.append(curChar); break; + } + } + + // Force the last entry from the text buffer. + //text = ""; + //writeEntry(*currentKey, text); + + delete module; + delete currentKey; + if (cipherFilter) + delete cipherFilter; + infile.close(); + +#ifdef _ICU_ + if (converted) fprintf(stderr, "tei2mod converted %d verses to UTF-8\n", converted); + if (normalized) fprintf(stderr, "tei2mod normalized %d verses to NFC\n", normalized); +#endif + + /* + * Suggested module name detection. + * Only used for suggesting a conf. + * + * Various forms of path. + * . and .. - no module name given, use "dict". + * Or one of the following where z is the module name + * and x may be . or .. + * z + * x/y/z + * x/y/z/ + * x/y/z/z + */ + SWBuf suggestedModuleName = path; + if (lastChar == '/' || lastChar == '\\') { + suggestedModuleName.setSize(--pathlen); + } + + lastChar = suggestedModuleName[pathlen - 1]; + if (lastChar == '.') { + suggestedModuleName = "???"; + } + else { + /* At this point the suggestion is either + * what follows the last / or \ + * or the entire string + */ + const char *m = strrchr(suggestedModuleName.c_str(), '/'); + if (!m) { + m = strrchr(suggestedModuleName.c_str(), '\\'); + } + if (m) { + suggestedModuleName = m+1; + } + } + + recommendedPath += suggestedModuleName; + recommendedPath += "/dict"; + + fprintf(stderr, "\nSuggested conf (replace ??? with appropriate values)\n\n"); + fprintf(stderr, "[%s]\n", suggestedModuleName.c_str()); + fprintf(stderr, "DataPath=%s\n", recommendedPath.c_str()); + fprintf(stderr, "Description=???\n"); + fprintf(stderr, "SourceType=TEI\n"); + fprintf(stderr, "Encoding=%s\n", (normalize ? "UTF-8" : "???")); + fprintf(stderr, "ModDrv=%s\n", modDrv.c_str()); + if (compressor) { + fprintf(stderr, "CompressType=%s\n", compType.c_str()); + } + if (cipherKey.size()) { + fprintf(stderr, "CipherKey=%s\n", cipherKey.c_str()); + } +} diff --git a/utilities/treeidxutil.cpp b/utilities/treeidxutil.cpp new file mode 100644 index 0000000..7aa6a68 --- /dev/null +++ b/utilities/treeidxutil.cpp @@ -0,0 +1,145 @@ +#include <entriesblk.h> +#include <iostream> +#include <string> +#include <stdio.h> +#include <treekeyidx.h> + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif + +void printTree(TreeKeyIdx treeKey, TreeKeyIdx *target = 0, int level = 1) { + if (!target) + target = &treeKey; + + unsigned long currentOffset = target->getOffset(); + std::cout << ((currentOffset == treeKey.getOffset()) ? "==>" : ""); + for (int i = 0; i < level; i++) std::cout << "\t"; + std::cout << treeKey.getLocalName() << std::endl; + if (treeKey.firstChild()) { + printTree(treeKey, target, level+1); + treeKey.parent(); + } + if (treeKey.nextSibling()) + printTree(treeKey, target, level); + +} + + +void printLocalName(TreeKeyIdx *treeKey) { + std::cout << "locaName: " << treeKey->getLocalName() << std::endl; +} + + +void setLocalName(TreeKeyIdx *treeKey) { + char buf[1023]; + std::cout << "Enter New Node Name: "; + fgets(buf, 1000, stdin); + treeKey->setLocalName(buf); + treeKey->save(); +} + + +void assurePath(TreeKeyIdx *treeKey) { + char buf[1023]; + std::cout << "Enter path: "; + fgets(buf, 1000, stdin); + treeKey->assureKeyPath(buf); +} + + +void appendSibbling(TreeKeyIdx *treeKey) { + if (treeKey->getOffset()) { + char buf[1023]; + std::cout << "Enter New Sibbling Name: "; + fgets(buf, 1000, stdin); + treeKey->append(); + treeKey->setLocalName(buf); + treeKey->save(); + } + else std::cout << "Can't add sibling to root node\n"; +} + + +void appendChild(TreeKeyIdx *treeKey) { + char buf[1023]; + std::cout << "Enter New Child Name: "; + fgets(buf, 1000, stdin); + treeKey->appendChild(); + treeKey->setLocalName(buf); + treeKey->save(); +} + + +void removeEntry(EntriesBlock *eb, int index) { + if (index < eb->getCount()) { + std::cout << "Removing entry [" << index << "]\n"; + eb->removeEntry(index); + } + else std::cout << "Invalid entry number\n\n"; +} + + +int main(int argc, char **argv) { + + if (argc != 2) { + fprintf(stderr, "usage: %s <tree/key/data/path>\n", *argv); + exit(-1); + } + + TreeKeyIdx *treeKey = new TreeKeyIdx(argv[1]); + + if (treeKey->Error()) { + treeKey->create(argv[1]); + delete treeKey; + treeKey = new TreeKeyIdx(argv[1]); + } + TreeKeyIdx root = *treeKey; + + std::string input; + char line[1024]; + + do { + std::cout << "[" << treeKey->getText() << "] > "; + fgets(line, 1000, stdin); + input = line; + if (input.length() > 0) { + switch (input[0]) { + case 'n': printLocalName(treeKey); break; + case 's': setLocalName(treeKey); break; + case 'p': root.root(); printTree(root, treeKey); break; + case 'a': appendSibbling(treeKey); break; + case 'c': appendChild(treeKey); break; + case 'j': treeKey->nextSibling(); break; + case 'g': assurePath(treeKey); break; + case 'k': treeKey->previousSibling(); break; + case 'h': treeKey->parent(); break; + case 'l': treeKey->firstChild(); break; + case 'r': treeKey->root(); break; + case 'q': break; + case '?': + default: + std::cout << "\n p - print tree\n"; + std::cout << " n - get local name\n"; + std::cout << " s - set local name\n"; + std::cout << " j - next sibbling\n"; + std::cout << " k - previous sibbling\n"; + std::cout << " h - parent\n"; + std::cout << " l - first child\n"; + std::cout << " r - root\n"; + std::cout << " a - append sibbling\n"; + std::cout << " c - append child\n"; + std::cout << " u - get user data\n"; + std::cout << " d - set user data\n"; + std::cout << " g - goto path; create if it doesn't exist\n"; + std::cout << " q - quit\n\n"; + break; + } + } + } + while (input.compare("q")); + + delete treeKey; + + return 0; +} diff --git a/utilities/vpl2mod.cpp b/utilities/vpl2mod.cpp new file mode 100644 index 0000000..ee3831c --- /dev/null +++ b/utilities/vpl2mod.cpp @@ -0,0 +1,263 @@ +#include <ctype.h> +#include <stdio.h> +#include <fcntl.h> +#include <errno.h> +#include <stdlib.h> +#include <sys/stat.h> + +#ifndef __GNUC__ +#include <io.h> +#else +#include <unistd.h> +#endif + +#include <filemgr.h> +#include <swmgr.h> +#include <rawtext.h> +#include <iostream> +#include <string> +#include <versekey.h> + +#ifndef NO_SWORD_NAMESPACE +using sword::FileMgr; +using sword::SWMgr; +using sword::RawText; +using sword::VerseKey; +using sword::SW_POSITION; +#endif + +using std::string; + +char readline(int fd, char **buf) { + char ch; + if (*buf) + delete [] *buf; + *buf = 0; + int len; + + + long index = lseek(fd, 0, SEEK_CUR); + // clean up any preceding white space + while ((len = read(fd, &ch, 1)) == 1) { + if ((ch != 13) && (ch != ' ') && (ch != '\t')) + break; + else index++; + } + + + while (ch != 10) { + if ((len = read(fd, &ch, 1)) != 1) + break; + } + + int size = (lseek(fd, 0, SEEK_CUR) - index) - 1; + + *buf = new char [ size + 1 ]; + + if (size > 0) { + lseek(fd, index, SEEK_SET); + read(fd, *buf, size); + read(fd, &ch, 1); //pop terminating char + (*buf)[size] = 0; + + // clean up any trailing junk on buf + for (char *it = *buf+(strlen(*buf)-1); it > *buf; it--) { + if ((*it != 10) && (*it != 13) && (*it != ' ') && (*it != '\t')) + break; + else *it = 0; + } + } + else **buf = 0; + return !len; +} + + +char *parseVReg(char *buf) { + char stage = 0; + + while (*buf) { + switch (stage) { + case 0: + if (isalpha(*buf)) + stage++; + break; + case 1: + if (isdigit(*buf)) + stage++; + break; + case 2: + if (*buf == ':') + stage++; + break; + case 3: + if (isdigit(*buf)) + stage++; + break; + case 4: + if (*buf == ' ') { + *buf = 0; + return ++buf; + } + break; + } + buf++; + } + return (stage == 4) ? buf : 0; // if we got to stage 4 return after key buf, else return 0; +} + + +bool isKJVRef(const char *buf) { + VerseKey vk, test; + vk.AutoNormalize(0); + vk.Headings(1); // turn on mod/testmnt/book/chap headings + vk.Persist(1); + // lets do some tests on the verse -------------- + vk = buf; + test = buf; + + if (vk.Testament() && vk.Book() && vk.Chapter() && vk.Verse()) { // if we're not a heading +// std::cerr << (const char*)vk << " == " << (const char*)test << std::endl; + return (vk == test); + } + else return true; // no check if we're a heading... Probably bad. +} + + +void fixText(char *text) { + char *to = text; + while(*text) { + *to++ = *text++; + *to++ = *text++; + if (!*text) + break; + if (*text != ' ') + std::cerr << "problem\n"; + else text++; + } + *to = 0; +} + +int main(int argc, char **argv) { + + // Let's test our command line arguments + if (argc < 2) { +// fprintf(stderr, "usage: %s <vpl_file> </path/to/mod> [0|1 - file includes prepended verse references]\n", argv[0]); + fprintf(stderr, "usage: %s <source_vpl_file> </path/to/output/mod/> [0|1 - prepended verse refs] [0|1 - NT only]\n\n", argv[0]); + fprintf(stderr, "\tWith no verse refs, source file must contain exactly 31102 lines.\n"); + fprintf(stderr, "\tThis is KJV verse count plus headings for MODULE,\n"); + fprintf(stderr, "\tTESTAMENT, BOOK, CHAPTER. An example snippet follows:\n\n"); + fprintf(stderr, "\t\tMODULE HEADER\n"); + fprintf(stderr, "\t\tOLD TESTAMENT HEADER\n"); + fprintf(stderr, "\t\tGENESIS HEADER\n"); + fprintf(stderr, "\t\tCHAPTER 1 HEADER\n"); + fprintf(stderr, "\t\tIn the beginning...\n\n"); + fprintf(stderr, "\t... implying there must also be a CHAPTER2 HEADER,\n"); + fprintf(stderr, "\tEXODUS HEADER, NEW TESTAMENT HEADER, etc. If there is no text for\n"); + fprintf(stderr, "\tthe header, a blank line must, at least, hold place.\n\n"); + fprintf(stderr, "\tWith verse refs, source file must simply contain any number of lines,\n"); + fprintf(stderr, "\tthat begin with the verse reference for which it is an entry. e.g.:\n\n"); + fprintf(stderr, "\t\tgen 1:0 CHAPTER 1 HEADER\n"); + fprintf(stderr, "\t\tgen 1:1 In the beginning...\n\n"); + exit(-1); + } + + // Let's see if we can open our input file + int fd = FileMgr::openFileReadOnly(argv[1]); + if (fd < 0) { + fprintf(stderr, "error: %s: couldn't open input file: %s \n", argv[0], argv[1]); + exit(-2); + } + + // Try to initialize a default set of datafiles and indicies at our + // datapath location passed to us from the user. + if (RawText::createModule(argv[2])) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", argv[0], argv[2]); + exit(-3); + } + + // not used yet, but for future support of a vpl file with each line + // prepended with verse reference, eg. "Gen 1:1 In the beginning..." + bool vref = false; + if (argc > 3) + vref = (argv[3][0] == '0') ? false : true; + + // if 'nt' is the 4th arg, our vpl file only has the NT + bool ntonly = false; + if (argc > 4) + ntonly = (argv[4][0] == '0') ? false : true; + + // Do some initialization stuff + char *buffer = 0; + RawText mod(argv[2]); // open our datapath with our RawText driver. + VerseKey vk; + vk.AutoNormalize(0); + vk.Headings(1); // turn on mod/testmnt/book/chap headings + vk.Persist(1); + + mod.setKey(vk); + + // Loop through module from TOP to BOTTOM and set next line from + // input file as text for this entry in the module + mod = TOP; + if (ntonly) vk = "Matthew 1:1"; + + int successive = 0; //part of hack below + while ((!mod.Error()) && (!readline(fd, &buffer))) { + if (*buffer == '|') // comments, ignore line + continue; + if (vref) { + const char *verseText = parseVReg(buffer); + if (!verseText) { // if we didn't find a valid verse ref + std::cerr << "No valid verse ref found on line: " << buffer << "\n"; + exit(-4); + } + + vk = buffer; + if (vk.Error()) { + std::cerr << "Error parsing key: " << buffer << "\n"; + exit(-5); + } + string orig = mod.getRawEntry(); + + if (!isKJVRef(buffer)) { + VerseKey origVK = vk; + /* This block is functioning improperly -- problem with AutoNormalize??? + do { + vk--; + } + while (!vk.Error() && !isKJVRef(vk)); */ + //hack to replace above: + successive++; + vk -= successive; + orig = mod.getRawEntry(); + + std::cerr << "Not a valid KJV ref: " << origVK << "\n"; + std::cerr << "appending to ref: " << vk << "\n"; + orig += " [ ("; + orig += origVK; + orig += ") "; + orig += verseText; + orig += " ] "; + verseText = orig.c_str(); + } + else { + successive = 0; + } + + if (orig.length() > 1) + std::cerr << "Warning, overwriting verse: " << vk << std::endl; + + // ------------- End verse tests ----------------- + mod << verseText; // save text to module at current position + } + else { + fixText(buffer); + mod << buffer; // save text to module at current position + mod++; // increment module position + } + } + + // clear up our buffer that readline might have allocated + if (buffer) + delete [] buffer; +} diff --git a/utilities/vpl2zmod2.cpp b/utilities/vpl2zmod2.cpp new file mode 100644 index 0000000..61e4f24 --- /dev/null +++ b/utilities/vpl2zmod2.cpp @@ -0,0 +1,293 @@ +#include <ctype.h> +#include <stdio.h> +#include <fcntl.h> +#include <errno.h> +#include <stdlib.h> +#include <sys/stat.h> + +#ifndef __GNUC__ +#include <io.h> +#else +#include <unistd.h> +#endif + +#include <swmgr.h> +#include <ztext2.h> +#include <iostream> +#include <swbuf.h> +#include <lzsscomprs.h> +#include <zipcomprs.h> +#include <versekey2.h> + +#ifndef NO_SWORD_NAMESPACE +using sword::SWMgr; +using sword::SWBuf; +using sword::zText2; +using sword::VerseKey2; +using sword::SW_POSITION; +using sword::SWCompress; +//using sword::CipherFilter; +using sword::zText2; +using sword::ZipCompress; +using sword::LZSSCompress; +#endif + +using std::string; + +char readline(int fd, char **buf) { + char ch; + if (*buf) + delete [] *buf; + *buf = 0; + int len; + + + long index = lseek(fd, 0, SEEK_CUR); + // clean up any preceding white space + while ((len = read(fd, &ch, 1)) == 1) { + if ((ch != 13) && (ch != ' ') && (ch != '\t')) + break; + else index++; + } + + + while (ch != 10) { + if ((len = read(fd, &ch, 1)) != 1) + break; + } + + int size = (lseek(fd, 0, SEEK_CUR) - index) - 1; + + *buf = new char [ size + 1 ]; + + if (size > 0) { + lseek(fd, index, SEEK_SET); + read(fd, *buf, size); + read(fd, &ch, 1); //pop terminating char + (*buf)[size] = 0; + + // clean up any trailing junk on buf + for (char *it = *buf+(strlen(*buf)-1); it > *buf; it--) { + if ((*it != 10) && (*it != 13) && (*it != ' ') && (*it != '\t')) + break; + else *it = 0; + } + } + else **buf = 0; + return !len; +} + + +char *parseVReg(char *buf) { + char stage = 0; + + while (*buf) { + switch (stage) { + case 0: + if (isalpha(*buf)) + stage++; + break; + case 1: + if (isdigit(*buf)) + stage++; + break; + case 2: + if (*buf == ':') + stage++; + break; + case 3: + if (isdigit(*buf)) + stage++; + break; + case 4: + if (*buf == ' ') { + *buf = 0; + return ++buf; + } + break; + } + buf++; + } + return (stage == 4) ? buf : 0; // if we got to stage 4 return after key buf, else return 0; +} + + +bool isKJVRef(const char *buf) { + VerseKey2 vk, test; + vk.AutoNormalize(0); + vk.Headings(1); // turn on mod/testmnt/book/chap headings + vk.Persist(1); + // lets do some tests on the verse -------------- + vk = buf; + test = buf; + + if (vk.Book() && vk.Chapter() && vk.Verse()) { // if we're not a heading + //std::cerr << (const char*)vk << " == " << (const char*)test << std::endl; + return (vk == test); + } + else return true; // no check if we're a heading... Probably bad. +} + + +void fixText(char *text) { + char *to = text; + while(*text) { + *to++ = *text++; + *to++ = *text++; + if (!*text) + break; + if (*text != ' ') + std::cerr << "problem\n"; + else text++; + } + *to = 0; +} + +int main(int argc, char **argv) { + int iType = 3; + int iPerBlock = 7; + int compType = 2; + SWBuf cipherKey = ""; + SWCompress *compressor = 0; + + // Let's test our command line arguments + if (argc < 2) { +// fprintf(stderr, "usage: %s <vpl_file> </path/to/mod> [0|1 - file includes prepended verse references]\n", argv[0]); + fprintf(stderr, "usage: %s <source_vpl_file> </path/to/output/mod/> [0|1 - prepended verse refs] [0|1 - NT only]\n\n", argv[0]); + fprintf(stderr, "\tWith no verse refs, source file must contain exactly 31102 lines.\n"); + fprintf(stderr, "\tThis is KJV verse count plus headings for MODULE,\n"); + fprintf(stderr, "\tTESTAMENT, BOOK, CHAPTER. An example snippet follows:\n\n"); + fprintf(stderr, "\t\tMODULE HEADER\n"); + fprintf(stderr, "\t\tOLD TESTAMENT HEADER\n"); + fprintf(stderr, "\t\tGENESIS HEADER\n"); + fprintf(stderr, "\t\tCHAPTER 1 HEADER\n"); + fprintf(stderr, "\t\tIn the beginning...\n\n"); + fprintf(stderr, "\t... implying there must also be a CHAPTER2 HEADER,\n"); + fprintf(stderr, "\tEXODUS HEADER, NEW TESTAMENT HEADER, etc. If there is no text for\n"); + fprintf(stderr, "\tthe header, a blank line must, at least, hold place.\n\n"); + fprintf(stderr, "\tWith verse refs, source file must simply contain any number of lines,\n"); + fprintf(stderr, "\tthat begin with the verse reference for which it is an entry. e.g.:\n\n"); + fprintf(stderr, "\t\tgen 1:0 CHAPTER 1 HEADER\n"); + fprintf(stderr, "\t\tgen 1:1 In the beginning...\n\n"); + exit(-1); + } + + // Let's see if we can open our input file + int fd = FileMgr::openFileReadOnly(argv[1]); + if (fd < 0) { + fprintf(stderr, "error: %s: couldn't open input file: %s \n", argv[0], argv[1]); + exit(-2); + } + + // not used yet, but for future support of a vpl file with each line + // prepended with verse reference, eg. "Gen 1:1 In the beginning..." + bool vref = false; + + // if 'nt' is the 4th arg, our vpl file only has the NT + bool ntonly = false; + + if (argc > 3) { + vref = (argv[3][0] == '0') ? false : true; + if (argc > 4) { + ntonly = (argv[4][0] == '0') ? false : true; + if (argc > 5) { + iType = atoi(argv[5]); + if (argc > 6) { + iPerBlock = atoi(argv[6]); + if (argc > 7) { + compType = atoi(argv[7]); + if (argc > 8) { + cipherKey = argv[8]; + } + } + } + } + } + } + + // Try to initialize a default set of datafiles and indicies at our + // datapath location passed to us from the user. + if (zText2::createModule(argv[2], iType)) { + fprintf(stderr, "error: %s: couldn't create module at path: %s \n", argv[0], argv[2]); + exit(-3); + } + switch (compType) { // these are deleted by zText + case 1: compressor = new LZSSCompress(); break; + case 2: compressor = new ZipCompress(); break; + } + + // Do some initialization stuff + char *buffer = 0; + zText2 mod(argv[2], 0, 0, iType, iPerBlock, compressor); // open our datapath with our zText2 driver. + VerseKey2 vk; + vk.AutoNormalize(0); + vk.Headings(1); // turn on mod/testmnt/book/chap headings + vk.Persist(1); + + mod.setKey(vk); + + // Loop through module from TOP to BOTTOM and set next line from + // input file as text for this entry in the module + mod = TOP; + if (ntonly) vk = "Matthew 1:1"; + + int successive = 0; //part of hack below + while ((!mod.Error()) && (!readline(fd, &buffer))) { + if (*buffer == '|') // comments, ignore line + continue; + if (vref) { + const char *verseText = parseVReg(buffer); + if (!verseText) { // if we didn't find a valid verse ref + std::cerr << "No valid verse ref found on line: " << buffer << "\n"; + exit(-4); + } + + vk = buffer; + if (vk.Error()) { + std::cerr << "Error parsing key: " << buffer << "\n"; + exit(-5); + } + string orig = mod.getRawEntry(); + + if (!isKJVRef(buffer)) { + VerseKey2 origVK = vk; + /* This block is functioning improperly -- problem with AutoNormalize??? + do { + vk--; + } + while (!vk.Error() && !isKJVRef(vk)); */ + //hack to replace above: + successive++; + vk -= successive; + orig = mod.getRawEntry(); + + std::cerr << "Not a valid KJV ref: " << origVK << "\n"; + std::cerr << "appending to ref: " << vk << "\n"; + orig += " [ ("; + orig += origVK; + orig += ") "; + orig += verseText; + orig += " ] "; + verseText = orig.c_str(); + } + else { + successive = 0; + } + + if (orig.length() > 1) + std::cerr << "Warning, overwriting verse: " << vk << std::endl; + + // ------------- End verse tests ----------------- + mod << verseText; // save text to module at current position + } + else { + fixText(buffer); + mod << buffer; // save text to module at current position + mod++; // increment module position + } + } + + // clear up our buffer that readline might have allocated + if (buffer) + delete [] buffer; +} diff --git a/utilities/vs2osisref.cpp b/utilities/vs2osisref.cpp new file mode 100644 index 0000000..220e743 --- /dev/null +++ b/utilities/vs2osisref.cpp @@ -0,0 +1,57 @@ +// Compression on variable granularity +#include <fcntl.h> +#include <iostream> +#include <fstream> + +#ifndef __GNUC__ +#include <io.h> +#else +#include <unistd.h> +#endif + +#include <ztext.h> +#include <zld.h> +#include <zcom.h> +#include <swmgr.h> +#include <lzsscomprs.h> +#include <zipcomprs.h> +#include <versekey.h> +#include <thmlosis.h> +#include <stdio.h> +#include <markupfiltmgr.h> +#include <algorithm> + +#ifndef NO_SWORD_NAMESPACE +using namespace sword; +#endif +using std::endl; +using std::cerr; +using std::cout; + + +int main(int argc, char **argv) +{ + if (argc < 2) { + cerr << argv[0] << " - a tool to convert verse references from English to OSIS\n"; + cerr << "usage: "<< argv[0] << " <verse ref> [verse context]\n"; + cerr << "\n\n"; + exit(-1); + } + VerseKey verseKey; + int i = strlen(argv[1]) + 1; + char * verseString = new char[i]; + strcpy (verseString, argv[1]); + verseString[i - 1] = 0; + + if (argc > 2) { + verseKey = argv[2]; + } + else { + verseKey = "Gen 1:1"; + } + + std::cout << VerseKey::convertToOSIS(verseString, &verseKey) << "\n"; + + return 0; +} + diff --git a/utilities/xml2gbs.cpp b/utilities/xml2gbs.cpp new file mode 100644 index 0000000..45ec256 --- /dev/null +++ b/utilities/xml2gbs.cpp @@ -0,0 +1,363 @@ +#include <ctype.h> +#include <stdio.h> +#include <fcntl.h> +#include <errno.h> +#include <stdlib.h> + +#include <entriesblk.h> +#include <iostream> +#include <string> +#include <fstream> +#include <treekeyidx.h> +#include <rawgenbook.h> + + +#ifndef NO_SWORD_NAMESPACE +using sword::TreeKeyIdx; +using sword::RawGenBook; +using sword::SWKey; +#endif + +//#define DEBUG + + +enum XML_FORMATS { F_AUTODETECT, F_OSIS, F_THML }; + +#define HELPTEXT "xml2gbs 1.0 OSIS/ThML General Book module creation tool for the SWORD Project\n usage:\n xml2gbs [-l] [-i] [-fT|-fO] <filename> [modname]\n -l uses long div names in ThML files\n -i exports to IMP format instead of creating a module\n -fO and -fT will set the importer to expect OSIS or ThML format respectively\n (otherwise it attempts to autodetect)\n" + +unsigned char detectFormat(char* filename) { + + unsigned char format = F_AUTODETECT; + + std::ifstream infile(filename); + std::string entbuffer; + + if (!infile.is_open()) { + std::cerr << HELPTEXT; + std::cerr << std::endl << std::endl << "Could not open file \"" << filename << "\"" << std::endl; + } + else { + while (std::getline(infile, entbuffer) && format == F_AUTODETECT) { + if (strstr(entbuffer.c_str(), "<osis")) { + format = F_OSIS; + } + else if (strstr(entbuffer.c_str(), "<ThML")) { + format = F_THML; + } + } + infile.close(); + } + + return format; +} + +int processXML(const char* filename, char* modname, bool longnames, bool exportfile, unsigned char format) { + signed long i = 0; + char* strtmp; + std::string entbuffer; + +#ifdef DEBUG + printf ("%s :%s :%d :%d :%d\n\n", filename, modname, longnames, exportfile, format); +#endif + + std::ifstream infile(filename); + if (!infile.is_open()) { + std::cerr << HELPTEXT; + std::cerr << std::endl << std::endl << "Could not open file \"" << filename << "\"" << std::endl; + return -1; + } + std::ofstream outfile; + if (exportfile) { + strcat (modname, ".imp"); + outfile.open(modname); + } + + TreeKeyIdx * treeKey; + RawGenBook * book = NULL; + + std::string divs[32]; + + int level = 0; + std::string keybuffer = ""; + std::string keybuffer2; + std::string n; + std::string type; + std::string title; + unsigned long entrysize = 0; + unsigned long keysize = 0; + bool closer = false; + + if (!exportfile) { + // Do some initialization stuff + TreeKeyIdx::create(modname); + treeKey = new TreeKeyIdx(modname); + RawGenBook::createModule(modname); + delete treeKey; + book = new RawGenBook(modname); + } + +#ifdef DEBUG +// TreeKeyIdx root = *((TreeKeyIdx *)((SWKey *)(*book))); +#endif + + int c; + while ((c = infile.get()) != EOF) { + if (c == '<') { + { + keybuffer = ""; + while ((c = infile.get()) != '>') + keybuffer += c; + keybuffer += c; + } + + if (keybuffer.length()) { + if (((format == F_OSIS) && ((!strncmp(keybuffer.c_str(), "/div>", 5)) || (!strncmp(keybuffer.c_str(), "/verse>", 7)) || (!strncmp(keybuffer.c_str(), "/chapter>", 9)))) || + ((format == F_THML) && ((!strncmp(keybuffer.c_str(), "/div", 4)) && (keybuffer[4] > '0' && keybuffer[4] < '7')))) { + if (!closer) { + keysize = 0; + keybuffer2 = ""; + for (i = 0; i < level; i++) { + keybuffer2 += '/'; + keysize++; + keybuffer2 += divs[i]; + keysize += divs[i].length(); + std::cout << keybuffer2 << std::endl; + } + + if (level) { + std::cout << keybuffer2 << std::endl; + if (exportfile) { + outfile << "$$$" << keybuffer2 << std::endl << entbuffer << std::endl; + } + else { + book->setKey(keybuffer2.c_str()); + book->setEntry(entbuffer.c_str(), entrysize); // save text to module at current position + } + } + } + level--; + entbuffer = ""; + entrysize = 0; + + closer = true; + } + else if (((format == F_OSIS) && !((!strncmp(keybuffer.c_str(), "div>", 4) || !strncmp(keybuffer.c_str(), "div ", 4)) || (!strncmp(keybuffer.c_str(), "verse>", 6) || !strncmp(keybuffer.c_str(), "verse ", 6)) || (!strncmp(keybuffer.c_str(), "chapter>", 8) || !strncmp(keybuffer.c_str(), "chapter ", 8)))) || + ((format == F_THML) && !((!strncmp(keybuffer.c_str(), "div", 3)) && (keybuffer[3] > '0' && keybuffer[3] < '7')))) { + entbuffer += '<'; + entrysize++; + entrysize += keybuffer.length(); + entbuffer += keybuffer; + } + else { + //we have a divN... + if (!closer) { + keysize = 0; + keybuffer2= ""; + for (i = 0; i < level; i++) { + keybuffer2 += '/'; + keysize++; + keybuffer2 += divs[i]; + keysize += divs[i].length(); + std::cout << keybuffer2 << std::endl; + } + + if (level) { + std::cout << keybuffer2 << std::endl; + if (exportfile) { + outfile << "$$$" << keybuffer2 << std::endl << entbuffer << std::endl; + } + else { + book->setKey(keybuffer2.c_str()); + book->setEntry(entbuffer.c_str(), entrysize); // save text to module at current position + } + } + } + + entbuffer= ""; + entrysize = 0; + + level++; + keysize = keybuffer.length()-1; + + type = ""; + n = ""; + title = ""; + + if (format == F_OSIS && longnames == false) { + strtmp = (char*)strstr(keybuffer.c_str(), "osisID=\""); + if (strtmp) { + strtmp += 8; + for (;*strtmp != '\"'; strtmp++) { + if (*strtmp == 10) { + title += ' '; + } + else if (*strtmp == '.') { + title = ""; + } + else if (*strtmp != 13) { + title += *strtmp; + } + } + } + keybuffer = title; + } + else { + strtmp = (char*)strstr(keybuffer.c_str(), "type=\""); + if (strtmp) { + strtmp += 6; + for (;*strtmp != '\"'; strtmp++) { + if (*strtmp == 10) { + type+= ' '; + } + else if (*strtmp != 13) { + type+= *strtmp; + } + } + } + + strtmp = (char*)strstr(keybuffer.c_str(), "n=\""); + if (strtmp) { + strtmp += 3; + for (;*strtmp != '\"'; strtmp++) { + if (*strtmp == 10) { + n += ' '; + } + else if (*strtmp != 13) { + n += *strtmp; + } + } + } + + if (format == F_OSIS) { + strtmp = (char*)strstr(keybuffer.c_str(), "title=\""); + if (strtmp) { + strtmp += 7; + for (;*strtmp != '\"'; strtmp++) { + if (*strtmp == 10) { + title += ' '; + } + else if (*strtmp != 13) { + title += *strtmp; + } + } + } + } + else if (format == F_THML) { + strtmp = (char*)strstr(keybuffer.c_str(), "title=\""); + if (strtmp) { + strtmp += 7; + for (;*strtmp != '\"'; strtmp++) { + if (*strtmp == 10) { + title += ' '; + } + else if (*strtmp != 13) { + title += *strtmp; + } + } + } + } + + keybuffer = type; + if (keybuffer.length() && n.length()) + keybuffer += " "; + keybuffer += n; + + if (longnames && keybuffer.length()) + keybuffer += ": "; + if (longnames || !keybuffer.length()) + keybuffer += title; + } + divs[level-1] = keybuffer; + + closer = false; + } + } + } + else if (c != 13) { + entbuffer += c; + entrysize++; + } + } + +#ifdef DEBUG +// printTree(root, treeKey); +#endif + +// delete book; //causes nasty-bad errors upon execution + return 0; +} + +int main(int argc, char **argv) { + int i = 0; + + char modname[256]; + *modname = 0; + char filename[256]; + *filename = 0; + + bool longnames = false; + bool exportfile = false; + unsigned char format = F_AUTODETECT; + + if (argc > 2) { + for (i = 1; i < argc; i++) { + if (argv[i][0] == '-') { + switch (argv[i][1]) { + case 'l': + longnames = true; + continue; + case 'i': + exportfile = true; + continue; + case 'f': + if (argv[i][2] == 'O') { + format = F_OSIS; + } + else if (argv[i][2] == 'T') { + format = F_OSIS; + } + else { + format = F_AUTODETECT; + } + continue; + } + } + else if (*filename == 0) { + strncpy (filename, argv[i], 200); + } + else if (*modname == 0) { + strncpy (modname, argv[i], 200); + } + } + } + else if (argc > 1) { + strncpy (filename, argv[1], 200); + } + + if (!*filename) { + std::cerr << HELPTEXT << std::endl; + return -1; + } + else { + if (!*modname) { + for (i = 0; (i < 256) && (filename[i]) && (filename[i] != '.'); i++) { + modname[i] = filename[i]; + } + modname[i] = 0; + } + + format = (format == F_AUTODETECT) ? detectFormat(filename) : format; + if (format == F_AUTODETECT) { + fprintf(stderr, HELPTEXT); + fprintf(stderr, "\n\nCould not detect file format for file \"%s\", please specify.\n", filename); + return -1; + } + + int retCode = processXML (filename, modname, longnames, exportfile, format); + + return retCode; + } +} + + + -- cgit v1.2.3