pax_global_header00006660000000000000000000000064120512554710014514gustar00rootroot0000000000000052 comment=72476f6f530674394aeb398578f0d808fb2b76e5 lierolibre-0.5/000077500000000000000000000000001205125547100135105ustar00rootroot00000000000000lierolibre-0.5/AUTHORS000066400000000000000000000006021205125547100145560ustar00rootroot00000000000000Joosa Reikkinen, also known as Mets„nEl„imet created the original Liero game and graphics. Erik Lindroos "Gliptic", with help from Mario Carbajal "basro", re-created Liero as OpenLiero, which later became the official version of Liero. Martin Erik Werner "arand" created lierolibre as a direct fork from Liero (OpenLiero). "sea" created the replacement sounds used in lierolibre. lierolibre-0.5/COPYING000066400000000000000000000276561205125547100145630ustar00rootroot00000000000000lierolibre, the gvl library, and the data helper scripts are released under the BDS-2-Clause License. The original graphics for Liero, the new replacement sounds, and the configuration variables extracted from the original game are released under the WTFPL License. Note that the old freeware license in data/LIERO(ENG).TXT and the information about the old LIERO.EXE and LIERO.SND in data/LICENSE.TXT no longer applies. The filesystem code and the lfs header originates from Boost and is licensed under the Boost Software License 1.0 and under the BSD-2-Clause License. The type_info header is licensed under the Boost Software License 1.0, and is included in the gvl library. The SDL m4 script is LGPLv2.1+. The autotools content is in part licensed under the BSD-2-Clause License of lierolibre, and also under various custom permissive free software licenses. The content under the BSD-2-Clause license falls under the GPL-2+ if used outside of lierolibre. Content without a specified license is assumed to be released under the BSD-2-Clause license. The following section is written in the 'machine-readable copyright format' as specified by the Debian project. -----//----- Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: https://gitorious.org/lierolibre Upstream-Contact: Martin Erik Werner Files: * Copyright: 2012, Martin Erik Werner License: BSD-2-Clause Comment: The full license texts in this document are separate entities with separate licenses, and not covered under the BSD-2-Clause license Files: NEWS Copyright: 1998-1999 Joosa Reikkinen "Mets„nEl„imet" 2007-2010, Erik Lindroos 2012, Martin Erik Werner License: WTFPL and BSD-2-Clause Files: src/argParse.* src/boostTesting.cpp src/configCompat.cpp src/configHelper.* src/configInit.* src/dataPath.* src/to_string.* Copyright: 2012, Martin Erik Werner License: BSD-2-Clause Files: src/console.* src/exactObjectList.hpp src/fastObjectList.hpp src/rand.* src/rect.hpp src/sdlmain.cpp src/sfx.* src/sobject.* src/sys.* src/text.* src/_build/* Copyright: 2007-2010, Erik Lindroos License: BSD-2-Clause Files: src/filesystem.hpp Copyright: 2001, Dietmar Kühl 2002, Jan Langer 2002-2003, Beman Dawes 2007-2010, Erik Lindroos 2010, "basro" License: BSL-1.0 and BSD-2-Clause Files: src/filesystem.cpp Copyright: 2002, Jens Maurer 2007-2010, Erik Lindroos License: BSL-1.0 and BSD-2-Clause Files: src/binReader.* src/constants.* src/main.cpp src/math.* src/reader.* Copyright: 2007-2010, Erik Lindroos 2012, Martin Erik Werner License: BSD-2-Clause Files: src/common.* src/controller/localController.cpp src/gfx.* src/gfx/font.* src/Jamfile src/level.* src/menu/menu.* src/settings.* src/worm.* Copyright: 2007-2010, Erik Lindroos 2010, Mario Carbajal "basro" 2012, Martin Erik Werner License: BSD-2-Clause Files: data/* Copyright: 1998-1999 Joosa Reikkinen "Mets„nEl„imet" License: WTFPL Comment: Note that the old freeware license in data/LIERO(ENG).TXT and the information about the old LIERO.EXE and LIERO.SND in data/LICENSE.TXT no longer applies. Files: data/sounds/*.wav data/LIERO.SND Copyright: 2012, "sea" License: WTFPL Files: data/liero.cfg Copyright: 1998-1999 Joosa Reikkinen "Mets„nEl„imet" 2012 Martin Erik Werner License: WTFPL Files: scripts/lierolibre-extractsounds scripts/lierolibre-packsounds scripts/lierolibre-extractgfx scripts/lierolibre-packgfx scripts/lierolibre-extractlev scripts/lierolibre-packlev Copyright: 2012, Martin Erik Werner License: BSD-2-Clause Files: src/gvl/* Copyright: 2007-2010, Erik Lindroos License: BSD-2-Clause Files: src/gvl/support/type_info.hpp Copyright: 2002 David Abrahams License: BSL-1.0 Files: aclocal.m4 src/config.h.in build-aux/* Copyright: 1992-2011, Free Software Foundation, Inc. License: GPL-2+ or BSD-2-Clause Comment: Autotools content is distributed under the lierolibre license, if it is used outside of lierolibre the GPL-2+ license applies instead. Files: configure Copyright: 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. License: This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Files: INSTALL Copyright: 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. License: Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Files: Makefile.in Copyright: 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. License: 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. Files: src/build-aux/install-sh Copyright: 1994 X Consortium FSF License: 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. Files: src/m4/* Copyright: 1996-2011 Free Software Foundation, Inc. License: 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. Files: src/m4/sdl.m4 Copyright: 1997-2012 Sam Lantinga License: LGPL-2.1+ License: BSD-2-Clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: WTFPL DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 . Copyright (C) 2004 Sam Hocevar . Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. . DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION . 0. You just DO WHAT THE FUCK YOU WANT TO. License: BSL-1.0 Boost Software License - Version 1.0 - August 17th, 2003 . Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: . The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. . 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: GPL-2+ 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 License: LGPL-2.1+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . A copy of the LGPL version 2.1 is available in the file "lgpl-2.1.txt". lierolibre-0.5/COPYING_winbin000066400000000000000000000034301205125547100161110ustar00rootroot00000000000000START_HUMAN_READABLE The included SDL shared library is licensed under LGPLv2.1+. The source code for this library is located in "libsrc\SDL-1.2.15". The statically linked libconfig++ library is licensed under LGPLv2.1+. The source code for this library is located in "libsrc\libconfig-1.4.8". The included SDL_mixer shared library is licensed under the Zlib license. The included Zlib shared library is licensed under the Zlib license. The included boost_program_options shared library is licensed under the BSL-1.0. The included MS Visual Studio C++ shared libraries are included under the same license as lierolibre, namely the BSD-2-Clause license. END_HUMAN_READABLE START_MACHINE_READABLE Files: lierolibre.exe Copyright: 2007-2010, Erik Lindroos 2010, Mario Carbajal "basro" 2012, Martin Erik Werner 2005-2011 Mark A Lindner License: BSD-2-Clause Comment: The LGPL-2.1+ libconfig++ library is statically linked into this binary. Files: data/lierocfg.txt Copyright: 1998-1999 Joosa Reikkinen "Mets„nEl„imet" 2012 Martin Erik Werner License: WTFPL Files: NEWS.txt Copyright: 1998-1999 Joosa Reikkinen "Mets„nEl„imet" 2007-2010, Erik Lindroos 2012, Martin Erik Werner License: WTFPL and BSD-2-Clause Files: SDL.dll libsrc/SDL-1.2.15/* Copyright: 1997-2012 Sam Lantinga License: LGPL-2.1+ Files: libsrc/libconfig-1.4.8/* Copyright: 2005-2011 Mark A Lindner License: LGPL-2.1+ Files: SDL_mixer.dll Copyright: 1997-2012 Sam Lantinga License: Zlib Files: boost_program_options.dll Copyright: Various Boost authors License: BSL-1.0 END_MACHINE_READABLE lierolibre-0.5/ChangeLog000066400000000000000000007567321205125547100153060ustar00rootroot00000000000000commit 1ba4f6e602b56a0f0b1c397eb76e80baac1a1b92 (origin/master) Author: Martin Erik Werner Date: Thu Nov 15 18:06:40 2012 +0100 no need to copy README_linuxbin again Makefile.am | 1 - 1 file changed, 1 deletion(-) commit 898f85de8ad0a75eefd020b20c347fc8b97d65fe Author: Martin Erik Werner Date: Thu Nov 15 14:30:26 2012 +0100 dist-nixbin-libcopyright is .PHONY as well Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfe2fd607270309c9ec3313c3112f1b06bfd99fc Author: Martin Erik Werner Date: Thu Nov 15 14:16:18 2012 +0100 windows distdir: do space renaming here as well Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d8637fded328d1e7d291e0f9e77cc9d01d0f92bb Author: Martin Erik Werner Date: Thu Nov 15 11:34:40 2012 +0100 manpages: fix small typo man/lierolibre.6.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e17e87a6443b5f9429bd47eedd3859c7bfc791c Author: Martin Erik Werner Date: Mon Nov 12 22:02:31 2012 +0100 mktemp has different syntax... src/filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ceee53293230ab7ec0ffc61663414a72ef10a06 Author: Martin Erik Werner Date: Mon Nov 12 21:56:39 2012 +0100 _mktemp_s() is not in mingw (yet), use _mktemp() src/filesystem.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1ccdf977346a879ef29e486939b979c7b91e5c87 Author: Martin Erik Werner Date: Mon Nov 12 13:54:08 2012 +0100 windows submodule: boost and folder filters for VSC windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4be38ae08258f82a2b79952934b0ae6bbcdffa2 Author: Martin Erik Werner Date: Sun Nov 11 17:03:27 2012 +0100 custom jam file for mingw, windows submodule Makefile.am | 2 +- windows | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cec89caf5749a8432130a3180b5e77a41f80d72a Author: Martin Erik Werner Date: Sun Nov 11 13:06:43 2012 +0100 windows submodule: working visualC windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaa5268734fb53533a2c4a7464b9dd4bb9fb1686 Author: Martin Erik Werner Date: Sat Nov 10 11:03:43 2012 +0100 windows submodule: fix some visualC paths windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be6f9e61172b2da628b0b54f95598a83e1ddbde4 Author: Martin Erik Werner Date: Fri Nov 9 00:05:34 2012 +0100 Makefile.am: nodist_pkgdata_DATA no longer exist Makefile.am | 1 - 1 file changed, 1 deletion(-) commit b9d3a6fa50dee4a978a58cce1b56956105c0f566 Author: Martin Erik Werner Date: Thu Nov 8 23:56:35 2012 +0100 nixbin: don't copy CHR/SND blobs, libcap location Makefile.am | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit e1415d732b91275f4ce4e48a06b1418555b633b6 Author: Martin Erik Werner Date: Thu Nov 8 23:14:41 2012 +0100 License for bits from boost filesystem and lfs COPYING | 24 ++++++++++++++++++++---- src/filesystem.cpp | 38 +++++++++++++++++++++++++++++++++++--- src/filesystem.hpp | 40 +++++++++++++++++++++++++++++++++++++--- src/lfs.hpp | 33 +++++++++++++++++++++++++++++++-- 4 files changed, 123 insertions(+), 12 deletions(-) commit f47a7c09a76d059ed4aede2b8c34b8d3bb685d9a Author: Martin Erik Werner Date: Thu Nov 8 22:17:38 2012 +0100 add boostTesting.cpp to tarball Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 269f2d95ac48d05a274673b5a1d6df7748c21932 Author: Martin Erik Werner Date: Thu Nov 8 22:02:49 2012 +0100 define LIBCONFIGXX_STATIC for cross-compile Makefile.am | 2 +- configure.ac | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 68c18525cfe13024de4526cf2dffffaf1fefc1bd Author: Martin Erik Werner Date: Thu Nov 8 17:21:24 2012 +0100 include sounds.txt in tarball Makefile.am | 1 + 1 file changed, 1 insertion(+) commit 3470157b8f1c509ecdac12b0775e2bfcd973fff1 Author: Martin Erik Werner Date: Thu Nov 8 13:57:40 2012 +0100 describe --enable-windows-libraries more configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit dcade6c235a72ee29ccdab2e46c60b4c340e8de9 Author: Martin Erik Werner Date: Thu Nov 8 12:47:13 2012 +0100 set relevant doc files as no-install Makefile.am | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit bcfdc76861fb6d9c6a91e91bc8deacf4a0d91885 Author: Martin Erik Werner Date: Wed Nov 7 16:46:26 2012 +0100 Revert "Special case key remap only on *nix" This reverts commit 2e54d8665e632d4a9d7c5626ddc6e5ed45643f92. Turns out it's windows emitting LCTRL + RALT on AltGr press, needs solving elsewise. src/keys.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 375fffc7c512150173df588eee5dfbb1242eb146 Author: Martin Erik Werner Date: Wed Nov 7 14:58:49 2012 +0100 Update NEWS NEWS | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d5b8c7d7443f81553ccc0ed065f2f6e00ca72012 Author: Martin Erik Werner Date: Wed Nov 7 14:56:44 2012 +0100 run distdir in cross-compile script scripts/cross-compile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0c018105205bfe75d40c83bd2a016cfa676a5a52 Author: Martin Erik Werner Date: Wed Nov 7 14:41:55 2012 +0100 fix MetsänEläimet chars :) COPYING_winbin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0abf193784a17c46d3dfd238266f4af73957e4b4 Author: Martin Erik Werner Date: Wed Nov 7 14:36:25 2012 +0100 remove COPYING.txt in Makefile Makefile.am | 1 - 1 file changed, 1 deletion(-) commit b9e265fdb8f08c5b8fb7acaee880ad8ee7951525 Author: Martin Erik Werner Date: Wed Nov 7 14:35:14 2012 +0100 add msvc*100.dll files to archive Makefile.am | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit abd27e4010fd5de5f208f6ad616ed3b562071b6a Author: Martin Erik Werner Date: Wed Nov 7 14:33:25 2012 +0100 tweak COPYING: sound blob, disregard LICENSE.TXT COPYING | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a613a5d9ccc7766df1da1170cd6eeb38e18e3c09 Author: Martin Erik Werner Date: Wed Nov 7 14:29:46 2012 +0100 Don't store COPYING.txt COPYING.txt | 198 ----------------------------------------------------------- 1 file changed, 198 deletions(-) commit dce7c026eb96d8eab2ef8f526fc82c2f53af2dd6 Author: Martin Erik Werner Date: Wed Nov 7 14:26:47 2012 +0100 Create winbin COPYING.txt by insertion COPYING_winbin | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 18 +++++++++++--- 2 files changed, 86 insertions(+), 3 deletions(-) commit be8e548ccc0af9ba51630b4a68bf4b1001fc107a Author: Martin Erik Werner Date: Wed Nov 7 13:43:41 2012 +0100 ship LIERO.CHR and LIERO.SND packed Makefile.am | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit dc7fc7a3a908e8d65deb4e0e1a6fa76cc6782ee7 Author: Martin Erik Werner Date: Wed Nov 7 00:39:15 2012 +0100 update COPYING.txt a bit, needs much more COPYING.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit caabc075fd647fa19c35981e2e91c4867af76c5a Author: Martin Erik Werner Date: Wed Nov 7 00:25:43 2012 +0100 fix miss in makefile sed command Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 870ed4ba13d5dedff2b7256d6751d97b758ddd2b Author: Martin Erik Werner Date: Wed Nov 7 00:21:51 2012 +0100 don't use tagged names for boost lib Makefile.am | 6 +++--- configure.ac | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9f0e478bf415f349046734ecdd1f6f1a768254c5 Author: Martin Erik Werner Date: Tue Nov 6 23:47:37 2012 +0100 store and ship windows text files as CRLF COPYING.txt | 400 +++++++++++------------ Makefile.am | 6 +- README.txt | 116 +++---- data | 2 +- lgpl-2.1.txt | 1004 +++++++++++++++++++++++++++++----------------------------- 5 files changed, 764 insertions(+), 764 deletions(-) commit 2e54d8665e632d4a9d7c5626ddc6e5ed45643f92 Author: Martin Erik Werner Date: Tue Nov 6 23:30:31 2012 +0100 Special case key remap only on *nix It appears RALT is really inconsistent between *nix and win, make it only apply for linux then, I guess. src/keys.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit e5559be791aad2dbb0d1827ca158d2b987afdd4b Author: Martin Erik Werner Date: Tue Nov 6 23:29:53 2012 +0100 work around boost inability to do simple clean Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b71a19b8b59f6fd677810f9eefa3ed53fa62064a Author: Martin Erik Werner Date: Tue Nov 6 20:35:59 2012 +0100 data submodule: revert RALT rebind data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 802d007cfe47513d85a3a2346af0c80748c03ce3 Author: Martin Erik Werner Date: Tue Nov 6 20:27:57 2012 +0100 Fix windows archive, ship full source Makefile.am | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 3d167bbce23f6b1d16f485d597545ec62d6f9791 Author: Martin Erik Werner Date: Tue Nov 6 18:58:36 2012 +0100 Avoid stdc++ and gcc by linking libconfig++ statically Since we don't want to ship DLL files for libgcc and libstdc++ and libconfig seems unable to produce a DLL file where these two are statically linked, the only way around seems to be to link libconfig++ statically. This means we need to ship the full lierolibre source to enable relinking, even in the binary package. Makefile.am | 15 +++++++++------ configure.ac | 10 ++++------ 2 files changed, 13 insertions(+), 12 deletions(-) commit c9c4fe009e23dd7a8be249f0d55323230d6ae6aa Author: Martin Erik Werner Date: Mon Nov 5 15:03:50 2012 +0100 Special case for RALT on *nix in SDLToDOSKey() On *nix, RALT seems to produce a different scancode than on windows, in order to use one keybind for both, translate the *nix code to the windows equivalent (default for liero), in an ugly special case. src/keys.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 896728996366ff40d18e8b6de94752d106b72123 Author: Martin Erik Werner Date: Fri Nov 2 14:46:01 2012 +0100 include libgcc_s and libstdc++ dlls Makefile.am | 5 ++++- configure.ac | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) commit df1bd1cb3959e0e59bd4c17e87347b089a0569b4 Author: Martin Erik Werner Date: Fri Nov 2 12:36:40 2012 +0100 strip and static-link dll files Makefile.am | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit a358115e62d2ac7e2483f8f47e4499b0221b7bed Author: Martin Erik Werner Date: Wed Oct 31 21:43:32 2012 +0100 create empty user dir in win dist Makefile.am | 1 + 1 file changed, 1 insertion(+) commit f1f7728d6cb4036385dee79b4551c1daec14b52d Author: Martin Erik Werner Date: Wed Oct 31 21:42:33 2012 +0100 changelog: settings->user on windows NEWS | 1 + 1 file changed, 1 insertion(+) commit 0538e8d6f58e425089a45d5c904aea70ce6ad85b Author: Martin Erik Werner Date: Wed Oct 31 21:24:05 2012 +0100 fix boost dll lib name Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b21eca3c7b9894350d0bf5cee745cae7621330b Author: Martin Erik Werner Date: Wed Oct 31 21:20:01 2012 +0100 add missing make in cross-compile scripts/cross-compile | 1 + 1 file changed, 1 insertion(+) commit 395d7176e1f0c04e40afbbda972e9ae68a98e7db Author: Martin Erik Werner Date: Wed Oct 31 21:12:12 2012 +0100 Implement winbin distdir * Checks HAS_WINDOWS_LDFLAGS and if true adds to dist-hook target + Copies (strips) and/or renames win-specific files + Adds libsrc with SDL and libconfig Makefile.am | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit c80da179507684ba251c49f4f13f7999e7a47c33 Author: Martin Erik Werner Date: Wed Oct 31 21:11:37 2012 +0100 windows submodule: set dll files executable windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42153a4ee9854fbfd11e519ace5072b707dda83d Author: Martin Erik Werner Date: Wed Oct 31 18:16:57 2012 +0100 use "user" instead of "settings" as homedir on windows README.txt | 4 ++-- src/dataPath.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit d40e0764d0a0f86230df1cc926aaef50f8cba459 Author: Martin Erik Werner Date: Tue Oct 30 23:29:45 2012 +0100 reduce cross-compiling script to invoking autotools correctly scripts/cross-compile | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) commit 861ab160fa970ed98b2a427564a0f49892ecee02 Author: Martin Erik Werner Date: Tue Oct 30 22:29:35 2012 +0100 move cross-compile script contents to autotools * Add configure options + --enable-windows-includes sets CPPFLAGS + --enable-windows-libraries sets LDFLAGS * Add (hardcoded path) dependencies on dll files * lierolibre now depends on dll files if --enable-windows-libraries is used * Add make targets for all dll files * Tweak some x"$var" = xyes tests Makefile.am | 33 +++++++++++++++++++++++++++++++-- configure.ac | 17 +++++++++++++++-- 2 files changed, 46 insertions(+), 4 deletions(-) commit 3aaf7680f66cdbcf5afdf82f0267ad4d340c3360 Author: Martin Erik Werner Date: Sun Oct 28 18:49:22 2012 +0100 single line in cross-compile, easier to test scripts/cross-compile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit c347c4c61bd9159c5dc5f0cbf7a498d308d671ef Author: Martin Erik Werner Date: Sat Oct 27 16:22:27 2012 +0200 fix path and revert to blob SDL_mixer in cross-compile scripts/cross-compile | 17 ++++++----------- windows | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) commit 7c81be9af0e6e38a0053d354cdf5fbfc9fd36be6 Author: Martin Erik Werner Date: Sat Oct 27 15:40:52 2012 +0200 autogen in cross-compile scripts scripts/cross-compile | 1 + 1 file changed, 1 insertion(+) commit 4703795449b7af9cd86cede04b8c4d5aa34cc50b Author: Martin Erik Werner Date: Sat Oct 27 14:40:21 2012 +0200 lib->windows in cross-compile script scripts/cross-compile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73272575434b8de3c5f6f78f3a9019664e1ac898 Author: Martin Erik Werner Date: Sat Oct 27 13:30:17 2012 +0200 work around spaces in gvl files Makefile.am | 13 +++++++++++-- src/gvl | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) commit 1a2cba3b5bbeaea29a585a9da32a949d62a1e7c9 Author: Martin Erik Werner Date: Sat Oct 27 02:32:15 2012 +0200 add windows vcproj files to source tarball Makefile.am | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 61d6b2abc6a4ce554ab776ca43ef7460edf156f2 Author: Martin Erik Werner Date: Sat Oct 27 01:53:59 2012 +0200 move windows build files to windows submodule scripts/assemble-release.bat | 26 -- src/_build/liero.vcproj | 841 ------------------------------------------ src/_build/liero.vcxproj | 271 -------------- src/_build/lierolibre.sln | 109 ------ windows | 2 +- 5 files changed, 1 insertion(+), 1248 deletions(-) commit 7deb488b6a3dc49ad5fdca7d23cf364d1d88fd93 Author: Martin Erik Werner Date: Sat Oct 27 01:39:51 2012 +0200 rename lib submodule to windows .gitmodules | 4 ++-- lib | 1 - windows | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) commit 6a4b4a10425cb987fa53854e90c19903e0e55805 Author: Martin Erik Werner Date: Sat Oct 27 01:07:14 2012 +0200 data submodule: add windows lierocfg file data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e4e2c02b78bf124a7dc16871dbb939f29410830 Author: Martin Erik Werner Date: Sat Oct 27 00:54:49 2012 +0200 documentation and script fixes * Remove windows ChangeLog (since windows branch is merged) * Include more windows files in source tarball * Move scripts to scripts/ ChangeLog.txt | 6760 ------------------------------------------ Makefile.am | 15 +- assemble-release.bat | 25 - cross-compile | 44 - scripts/assemble-release.bat | 26 + scripts/cross-compile | 44 + 6 files changed, 81 insertions(+), 6833 deletions(-) commit abc4d73e29a07b4042d902e0f9d8d71ace678244 (windows) Merge: c4c4b43 18d529b Author: Martin Erik Werner Date: Fri Oct 26 22:25:07 2012 +0200 Merge branch 'master' into windows commit c4c4b433854da07d8918e0150f584561b4688ca5 Author: Martin Erik Werner Date: Fri Oct 26 22:23:55 2012 +0200 lib submodule: update, cross-compile fixes lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18d529bc6c57e7e0d1dd4db2583df95f9117fc53 Author: Martin Erik Werner Date: Fri Oct 26 21:37:17 2012 +0200 update and change cross-compile readme into a script README_cross-compile | 26 -------------------------- cross-compile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 26 deletions(-) commit 9738b94536262fedaae6f3c2e5208542fb99d994 Author: Martin Erik Werner Date: Thu Oct 25 19:51:45 2012 +0200 data submodule: use windows branch data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cf259c123cf0ba63a9367043f8784f7ee17d992 Merge: 280fa2f f1f9649 Author: Martin Erik Werner Date: Thu Oct 25 19:47:44 2012 +0200 Merge branch 'master' into windows commit f1f964984bb61479e93461099f1a0ea957699b76 Author: Martin Erik Werner Date: Thu Oct 25 19:36:03 2012 +0200 update NEWS NEWS | 2 ++ 1 file changed, 2 insertions(+) commit 154fab94394c1893ee3d76414bc0625deb7a2c6b Author: Martin Erik Werner Date: Thu Oct 25 12:07:33 2012 +0200 Set controls after archive load if null Do a check if liero_archive loaded empty data into controlsEx[] and use values from controls[] and/or a default set if that is the case. src/settings.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ac2a00222066ffa1d0ecd0c333906181b8afbd90 Author: Martin Erik Werner Date: Sat Oct 13 17:36:07 2012 +0200 set new default RALT in defControls src/settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5915af42e3df4d5e8b351c9c0603dd8b4cee6b5c Author: Martin Erik Werner Date: Sat Oct 13 16:05:47 2012 +0200 data submodule: fix Right Alt data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 924fcec8012168621fa5a156aede0bed77a26596 Author: Martin Erik Werner Date: Sat Oct 13 16:04:50 2012 +0200 update NEWS NEWS | 2 ++ 1 file changed, 2 insertions(+) commit f5eea2738ad815e8b1029346a0059c9a13955525 Author: Martin Erik Werner Date: Sat Oct 13 14:45:04 2012 +0200 remove fullscreen resolution option This option currently does nothing anyways, probably nice to implement as an alternative to the F# keys though, later on. src/gfx.cpp | 6 +----- src/menu/hiddenMenu.cpp | 4 ---- src/menu/hiddenMenu.hpp | 2 -- src/settings.cpp | 2 -- src/settings.hpp | 9 +-------- 5 files changed, 2 insertions(+), 21 deletions(-) commit 68e2cfb9cbe4fdf16218fdc56d9b5331909ea33d Author: Martin Erik Werner Date: Thu Oct 11 23:52:32 2012 +0200 manpage: dir->write correction man/lierolibre.6.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9defa5e45c219dec361436731a458f7cc5d9c9a4 Author: Martin Erik Werner Date: Tue Oct 9 14:34:33 2012 +0200 More cross-compile readme, figured dynamic linking README_cross-compile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 280fa2f6fbecce126f630320a517d90c35b1a4e5 Merge: 652dc5f 2f204a0 Author: Martin Erik Werner Date: Tue Oct 9 12:18:20 2012 +0200 Merge branch 'master' into windows commit 2f204a01baac7b92b6b9fda8cd55a80eb54bd46a Author: Martin Erik Werner Date: Tue Oct 9 12:13:40 2012 +0200 more comments for cross-compile README_cross-compile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 652dc5ffeac90cff3cee5042dc0b945014407009 Merge: 978a124 01a7cf0 Author: Martin Erik Werner Date: Sun Oct 7 23:54:47 2012 +0200 Merge branch 'master' into windows commit 01a7cf0ea7d4d73a22dd367c7019035826a68da1 Author: Martin Erik Werner Date: Sun Oct 7 23:46:01 2012 +0200 Make "Randomize" colour proper beige-ish c.f. http://code.google.com/p/liero/issues/detail?id=2 src/weapsel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6675d913dff2a8d311d87cf008604425bfe1d3a9 Author: Martin Erik Werner Date: Sat Sep 29 18:51:58 2012 +0200 Add cross-compile bits and bobs README_cross-compile | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 978a1244d0365262dd09d9169a031e4bf08320d8 Merge: d2c2d4c 06afb45 Author: Martin Erik Werner Date: Sat Sep 29 11:35:33 2012 +0200 Merge branch 'master' into windows commit 06afb45602b7bd1180ec39cc22b9944129cc4e7f Author: Martin Erik Werner Date: Sat Sep 29 10:56:04 2012 +0200 Update NEWS NEWS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 272c3f471b992815c9e6805193b979a2238928d8 Author: Martin Erik Werner Date: Sat Sep 29 10:49:27 2012 +0200 -set colorspace to fix XPM, submodule back to XPM data | 2 +- scripts/lierolibre-packgfx | 6 +++--- scripts/lierolibre-packlev | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 177c60f96076133e18ae993cd2688d4d8f57e112 Author: Martin Erik Werner Date: Sat Sep 29 10:43:55 2012 +0200 Revert back to XPM icons Revert "Better PNM format" This reverts commit 9ccdefd690b93bab6cd496126419f8607d8d151f. Revert "Change to using PNM files instead of XPM" This reverts commit d4d25e164f8bb90c15e1499233e410ca932f9582. Makefile.am | 8 ++++---- data | 2 +- man/lierolibre-extractgfx.6.am | 4 ++-- man/lierolibre-extractlev.6.am | 6 +++--- man/lierolibre-packgfx.6.am | 12 ++++++------ man/lierolibre-packlev.6.am | 6 +++--- scripts/lierolibre-extractgfx | 38 ++++++++++---------------------------- scripts/lierolibre-extractlev | 17 +++++------------ scripts/lierolibre-packgfx | 4 ++-- scripts/lierolibre-packlev | 4 ++-- 10 files changed, 38 insertions(+), 63 deletions(-) commit c651cade423a3fdabc16a554e61f867978c90811 (tag: lierolibre-0.4.1) Author: Martin Erik Werner Date: Fri Sep 28 03:17:53 2012 +0200 Update changelog, now --decorate:d ChangeLog | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 111 insertions(+), 5 deletions(-) commit 90deea427df9772453ebd5260a7a105aaf4844ce Author: Martin Erik Werner Date: Fri Sep 28 03:17:31 2012 +0200 automake: change libogg path Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96ba2e736e38d8a8fe96e1713dfc2d1fb3247e5c Author: Martin Erik Werner Date: Fri Sep 28 02:32:27 2012 +0200 automake: more efficient download of libsrc Makefile.am | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1107d90b237945a37ff21bddc276b679779ef60e Author: Martin Erik Werner Date: Fri Sep 28 01:29:43 2012 +0200 Bump to version 0.4.1 in configure.ac configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ccdefd690b93bab6cd496126419f8607d8d151f Author: Martin Erik Werner Date: Fri Sep 28 00:51:23 2012 +0200 Better PNM format data | 2 +- scripts/lierolibre-extractgfx | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) commit 8ccba2974286ca29daae7beb64085564cadc78fc Author: Martin Erik Werner Date: Fri Sep 28 00:24:26 2012 +0200 fix erroneous xpm->pnm replace for icon Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21532da8786c3e01d72ce415989a3ce6e8f99f44 Author: Martin Erik Werner Date: Thu Sep 27 15:04:55 2012 +0200 Update NEWS for 0.4.1 NEWS | 5 +++++ 1 file changed, 5 insertions(+) commit d4d25e164f8bb90c15e1499233e410ca932f9582 Author: Martin Erik Werner Date: Thu Sep 27 04:16:22 2012 +0200 Change to using PNM files instead of XPM It appears PNM files, due to their raw values, are easier to convert reliably. Makefile.am | 10 +++++----- data | 2 +- man/lierolibre-extractgfx.6.am | 4 ++-- man/lierolibre-extractlev.6.am | 6 +++--- man/lierolibre-packgfx.6.am | 12 ++++++------ man/lierolibre-packlev.6.am | 6 +++--- scripts/lierolibre-extractgfx | 41 ++++++++++++++++++++++++++++++---------- scripts/lierolibre-extractlev | 17 ++++++++++++----- scripts/lierolibre-packgfx | 4 ++-- scripts/lierolibre-packlev | 4 ++-- 10 files changed, 67 insertions(+), 39 deletions(-) commit 3f3862d765a1450319de6f641dec7194ee46db9c Author: Martin Erik Werner Date: Thu Sep 27 03:16:10 2012 +0200 Set LANG=C in packsounds script to make sure we can grep "bytes" scripts/lierolibre-packsounds | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7e9180a936d497e5bd2f8b5d11bebd90f33f793d Author: Martin Erik Werner Date: Sat Jun 23 14:15:41 2012 +0200 Fix configure creating files from messages Add [] quoting to all messages in order to avoid "," being interpreted as a separator and causing creation of files configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7a6fb27cf3a75830ed540a8b22f62b8f1e9aee76 Author: Martin Erik Werner Date: Tue Jun 12 14:01:10 2012 +0200 Add some files to COPYING COPYING | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d2c2d4cb0bc6cf128e70b80643e6fb0061c84306 (tag: lierolibre-0.4_win32) Author: Martin Erik Werner Date: Tue Jun 12 12:05:50 2012 +0200 Update win ChangeLog ChangeLog.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 8a7d5f6ebbe6a6d6cf88c6e5ff2efedc443ac390 Merge: 8e3404d 3768ded Author: Martin Erik Werner Date: Tue Jun 12 12:05:36 2012 +0200 Merge branch 'master' into windows commit 8e3404d2d9cdabbf7d2de37f42fdbedb518e3334 Author: Martin Erik Werner Date: Tue Jun 12 12:04:30 2012 +0200 Update win ChangeLog ChangeLog.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3768ded7a88a7d273a5be2f6fe36b77edcb9f246 (tag: lierolibre-0.4) Author: Martin Erik Werner Date: Tue Jun 12 12:04:12 2012 +0200 Update ChangeLog ChangeLog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 280931213e3f2142cb32db3418cd98db03c5d4ae Author: Martin Erik Werner Date: Tue Jun 12 12:03:54 2012 +0200 Set June as release for 0.4 NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b50f206c338c366cbce16c891a0113669db2a91b Author: Martin Erik Werner Date: Tue Jun 12 11:58:14 2012 +0200 Update win ChangeLog ChangeLog.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 56803e212d690496018f3030d2862df3df7398a0 Merge: c2714e8 3d31aaa Author: Martin Erik Werner Date: Tue Jun 12 11:57:58 2012 +0200 Merge branch 'master' into windows commit 3d31aaaaac132e9a2d031c81679e34109e3b8fa4 Author: Martin Erik Werner Date: Tue Jun 12 11:57:49 2012 +0200 Update ChangeLog ChangeLog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6f48a9776d3151c163a0bbef3eb8c52b0e75bd18 Author: Martin Erik Werner Date: Tue Jun 12 11:56:49 2012 +0200 data submodule, CFG version 1 data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2714e8dbd1ddab51cdad53dad982e73442eb633 Author: Martin Erik Werner Date: Tue Jun 12 11:44:05 2012 +0200 Update win ChangeLog ChangeLog.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit f7921d48bc27099eea883e4ba3e96a31904b9de7 Author: Martin Erik Werner Date: Tue Jun 12 11:43:31 2012 +0200 Crrect name for lierocfg.txt assemble-release.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddcef02dd358d0c7964526031254ab1db4efa541 Author: Martin Erik Werner Date: Tue Jun 12 00:59:22 2012 +0200 Update win ChangeLog ChangeLog.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 303654042e5f683074a7489ed6769fa9b2d20c61 Merge: accd144 104b3fe Author: Martin Erik Werner Date: Tue Jun 12 00:58:56 2012 +0200 Merge branch 'master' into windows commit 104b3fe7c1b93e122489e1d8b046329bdbc28bef Author: Martin Erik Werner Date: Tue Jun 12 00:58:47 2012 +0200 Update ChangeLog ChangeLog | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 6ce2817750ab081f420dd7e47a831367f249d52c Author: Martin Erik Werner Date: Tue Jun 12 00:41:08 2012 +0200 Update nixbin readme regarding source and copyright README_linuxbin | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 10d0a17e2a75529b3ca12b2681b8a35336faadca Author: Martin Erik Werner Date: Tue Jun 12 00:54:45 2012 +0200 Revert "move README_linuxbin to nixbin branch" This reverts commit 47894a5a9d207db95b94db5a1def58555f668ec8. README_linuxbin | 10 ++++++++++ 1 file changed, 10 insertions(+) commit accd14473857192250f336380b1019cafbbad7e5 Author: Martin Erik Werner Date: Tue Jun 12 00:48:59 2012 +0200 Update win ChangeLog ChangeLog.txt | 729 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 729 insertions(+) commit 0d134f1fda2f107b4f1f280d57181106b1a4573a Merge: c726392 17ca2ff Author: Martin Erik Werner Date: Tue Jun 12 00:48:36 2012 +0200 Merge branch 'master' into windows commit 17ca2ff50810ff24ff1de24b626d547e2f505211 Author: Martin Erik Werner Date: Tue Jun 12 00:48:22 2012 +0200 Update ChangeLog ChangeLog | 421 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 421 insertions(+) commit f44117205edf44533d6ef11d0ee136348663d15e Author: Martin Erik Werner Date: Tue Jun 12 00:38:29 2012 +0200 Bump to version 0.4 NEWS | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f7d707747e2991c00b5b61941809bc0f01755b1e Author: Martin Erik Werner Date: Tue Jun 12 00:36:21 2012 +0200 Better help string for --enable-relpath configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6354e241879cb15cb4fe0cba892cf4743cfbc8c Author: Martin Erik Werner Date: Tue Jun 12 00:05:50 2012 +0200 Add configCompat.cpp to Jamfile src/Jamfile | 1 + 1 file changed, 1 insertion(+) commit c726392511f8b7a1711628a420890e0812c9fe80 Merge: 6a3cd15 f6a7e0c Author: Martin Erik Werner Date: Mon Jun 11 23:40:47 2012 +0200 Merge branch 'master' into windows commit f6a7e0c4e8f53a3e7e28eac01a07a4b03bbacfbe Author: Martin Erik Werner Date: Mon Jun 11 22:28:37 2012 +0200 create missing-files, take current deb sources Makefile.am | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 314faf9877e04504dd44beba158cd36594d6db05 Author: Martin Erik Werner Date: Mon Jun 11 21:13:13 2012 +0200 Assign source & no-source libs Makefile.am | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 6ef6bf2e5236033f5a5d33172ef319be8951a586 Author: Martin Erik Werner Date: Mon Jun 11 16:04:00 2012 +0200 Revamp nixbin targets * Move libjson to usr/lib/$arch * Use Variables for deb package names * Add copyright downloading via cupt * Use whole debian packaging for source Makefile.am | 82 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 43 insertions(+), 39 deletions(-) commit 6a3cd15bd6b659723b620c3a4fd051637e37c65f Author: Martin Erik Werner Date: Mon Jun 11 15:26:06 2012 +0200 Note libsrc in win COPYING COPYING.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5680c14ac19c30751b0b4bb890cec97e3408e2b7 Author: Martin Erik Werner Date: Mon Jun 11 13:48:58 2012 +0200 Rename liero.cfg->lierocfg.txt in release script assemble-release.bat | 1 + 1 file changed, 1 insertion(+) commit a8e47c0d32cb5eee336d1570f2d5641e07344e85 Merge: 522b737 578fdf8 Author: Martin Erik Werner Date: Mon Jun 11 13:47:41 2012 +0200 Merge branch 'master' into windows Don't use win-specific data submodule commit 578fdf84102efe35eae3344260a98d9e6c5fc188 Author: Martin Erik Werner Date: Mon Jun 11 13:45:29 2012 +0200 data submodule store precompiled data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 522b73766ad2c17ada26071f289fad17064042ca Merge: 005035c 4138c50 Author: Martin Erik Werner Date: Mon Jun 11 13:36:18 2012 +0200 Merge branch 'master' into windows commit 005035cdd7b3d48a9cc2f369bb9637a908c7e380 Author: Martin Erik Werner Date: Mon Jun 11 13:29:22 2012 +0200 Don't mention man pages in windows release README.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4138c502cfeb9cbed6fbae2e060780419cad9590 Author: Martin Erik Werner Date: Mon Jun 11 13:28:22 2012 +0200 Update NEWS with nixbin and win libsrc NEWS | 5 +++++ 1 file changed, 5 insertions(+) commit 7e3663c0ed4151eb6fc1f9f002daf2c53621f697 Author: Martin Erik Werner Date: Sun Jun 10 23:44:23 2012 +0200 rename to txt, add SDL_mixer.dll assemble-release.bat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 41af8e3372d99cccdcd018a0fa9df58b926d4bae Author: Martin Erik Werner Date: Sun Jun 10 23:28:08 2012 +0200 Workaround lack of sane cli assemble-release.bat | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 252924d29a32b33dfc9fece36989744d3e370e2e Author: Martin Erik Werner Date: Sun Jun 10 23:27:54 2012 +0200 submodule hardcode D and set SDL for nomasm zlib lib | 2 +- src/_build/lierolibre.sln | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit a9e6cf0525593689190f031f48d449a43938807c Author: Martin Erik Werner Date: Sun Jun 10 23:14:22 2012 +0200 winadapt data submodule data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35202747aec2ddef8bfd555b95bd0dbd5d7829c9 Author: Martin Erik Werner Date: Sun Jun 10 21:27:36 2012 +0200 winrelease script for SDL source assemble-release.bat | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6d7afffa1b5aae04eb26f6140ec49b444a0a94fa Author: Martin Erik Werner Date: Sun Jun 10 21:24:42 2012 +0200 Update projs with SDL source lib | 2 +- src/_build/liero.vcxproj | 7 ++++--- src/_build/lierolibre.sln | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) commit 9d7bf2d8c7e1ac657a29227608530df8cf2dca56 Author: Martin Erik Werner Date: Sun Jun 10 18:37:24 2012 +0200 submodule lib SDL include dir lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c51063a6dd7fbf069ca85cae07f208a3611bdd96 Author: Martin Erik Werner Date: Sun Jun 10 18:21:55 2012 +0200 lib submodule SDL dir fixes lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be4abce226d915cc07449ae39c0769d317b4bcdc Author: Martin Erik Werner Date: Sun Jun 10 17:13:13 2012 +0200 lib submodule SDL dir move lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03bfb7913c69b075f3ea8adab64f944396063d36 Author: Martin Erik Werner Date: Sun Jun 10 14:31:16 2012 +0200 Extend windows release script assemble-release.bat | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 52d411e0bedffb10572f2007ef8b5b951579f842 Author: Martin Erik Werner Date: Sun Jun 10 14:30:51 2012 +0200 Missing period COPYING.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df5dc6ab306228a7453dd9fc71aaba5f6bb12264 Author: Martin Erik Werner Date: Sun Jun 10 14:23:06 2012 +0200 lib submodule SDL source lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7cd653651114abeeea0ebb875b3c013129e9cb5 Merge: 3bfe159 58f5b2e Author: Martin Erik Werner Date: Sun Jun 10 12:25:22 2012 +0200 Merge branch 'windows' of gitorious.org:lierolibre/lierolibre into windows commit 3bfe159768a635dc283205759892e21ac7778ccd Merge: b2a0625 547d93f Author: Martin Erik Werner Date: Sun Jun 10 12:22:48 2012 +0200 Merge branch 'master' into windows commit 547d93f0903a7e002d3960073625788e7ef1a663 Author: Martin Erik Werner Date: Sun Jun 10 12:20:47 2012 +0200 Fix formulation error in COPYING COPYING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d860b117fde04e18aae23afe43c53558dbffb5c7 Author: Martin Erik Werner Date: Sun Jun 10 12:17:23 2012 +0200 Add plaintext LGPL COPYING | 2 + lgpl-2.1.txt | 502 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 504 insertions(+) commit b2a06253045c4f99837b28c42e55e13e2883a179 Author: Martin Erik Werner Date: Sun Jun 10 12:10:29 2012 +0200 Add lgpl plaintext COPYING.txt | 2 + assemble-release.bat | 2 +- lgpl-2.1.txt | 502 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 505 insertions(+), 1 deletion(-) commit 6a797a21ab3fd5882bbf43faab5295051cc04fd0 Author: Martin Erik Werner Date: Sun Jun 10 00:27:48 2012 +0200 start writing realease-assembly script for win assemble-release.bat | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 58f5b2e3b4d1cf886e0b9fbd6f9c64d913ec196b Merge: 658c1cd cd4c08f Author: Martin Erik Werner Date: Sat Jun 9 22:45:28 2012 +0200 Merge branch 'windows' of gitorious.org:lierolibre/lierolibre into windows commit 658c1cdf38abc723a143d06ded1f82f2e328f472 Author: Martin Erik Werner Date: Sat Jun 9 22:43:47 2012 +0200 Added msvc dlls to lib lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47894a5a9d207db95b94db5a1def58555f668ec8 Author: Martin Erik Werner Date: Sat Jun 9 21:38:19 2012 +0200 move README_linuxbin to nixbin branch README_linuxbin | 10 ---------- 1 file changed, 10 deletions(-) commit cd4c08fb8f82a915f65a6f0199eced97ce266083 Merge: 1ec6876 a657855 Author: Martin Erik Werner Date: Wed Jun 6 23:25:01 2012 +0200 Merge branch 'master' into windows commit a657855ded908074c17c0cc37e5e919f93576cef Author: Martin Erik Werner Date: Wed Jun 6 20:01:41 2012 +0200 libsrc make rules cleanup Makefile.am | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit d33d371e3bad8dac53a3178942b8d57d75a3744e Author: Martin Erik Werner Date: Wed Jun 6 19:52:36 2012 +0200 README for binary linux package README_linuxbin | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 71592ee7426e6b6de36756199618513c2d8fc602 Author: Martin Erik Werner Date: Wed Jun 6 19:51:54 2012 +0200 Make target for pulling in lib source tarballs Makefile.am | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) commit 52a90814e23f4b9fd438368883e2051c8168a978 Author: Martin Erik Werner Date: Wed Jun 6 19:17:44 2012 +0200 Fix libtinfo5 path Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d46dca7676b6b8982e0b30ece4d68f185c07298 Author: Martin Erik Werner Date: Wed Jun 6 18:14:12 2012 +0200 Add libxcb.so.1 & libX11-xcb.so.1 Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ba6da1ad9ce3b616202822ed6fda9df6ba1d34a9 Author: Martin Erik Werner Date: Wed Jun 6 17:53:00 2012 +0200 Add libtinfo.so.5 Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2636fe2c2df7af6c4744a39bc427624e380be21c Author: Martin Erik Werner Date: Wed Jun 6 12:01:29 2012 +0200 Prettier nixbin tarname Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e53b900650a33aeefabc14f2db2c1d5e405962e8 Author: Martin Erik Werner Date: Wed Jun 6 11:03:39 2012 +0200 Rename nix->nixbin, fix pulse libs, add MANS_TXT var Makefile.am | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 1dd7f0e522377a382e4a7115252722d516b86766 Author: Martin Erik Werner Date: Tue Jun 5 15:00:29 2012 +0200 Remove libXext lib, variabelise a bit more LibXext appears to be closely tied to X, which I've heard is not good to include-port. Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a77f81812e79032050c222bc5a260106256dfc5f Author: Martin Erik Werner Date: Tue Jun 5 14:50:07 2012 +0200 Add txt mans and lib dir to clean-local Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d6d780c15cccf8eed1663d4cbd72ff3122a96747 Author: Martin Erik Werner Date: Tue Jun 5 14:45:28 2012 +0200 Decapitalise mid-sentance break in manpage history man/lierolibre.6.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 19736fc016f1d8a015dc185c40eeb1ba2d2cb484 Author: Martin Erik Werner Date: Tue Jun 5 14:43:19 2012 +0200 Refactor dist-nixbin and add MANS_TXT Makefile.am | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit d0177e6db4ab656b9f06a0553c9c8759ef16a0ea Author: Martin Erik Werner Date: Tue Jun 5 12:06:54 2012 +0200 Clunky make rules for nix binary package This should allow making a fairly portable nix package which includes a cruftton of libs, unfortunately the rules are extremely unportable in themselves. Makefile.am | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- configure.ac | 11 +++++++ 2 files changed, 109 insertions(+), 5 deletions(-) commit 1ec687600688287207a7d63b7adfb93533b9ec7e Merge: e85b0d5 4e27e1f Author: Martin Erik Werner Date: Mon Jun 4 23:03:48 2012 +0200 Merge branch 'windows' of gitorious.org:lierolibre/lierolibre into windows commit 4e27e1f9b6d8ce2e40cbc72f493b806a12c35471 Merge: 9327c2a d050c99 Author: Martin Erik Werner Date: Mon Jun 4 23:03:52 2012 +0200 Merge branch 'master' into windows commit d050c99278c3c45bb12c94ca66cce9622debafa9 Author: Martin Erik Werner Date: Mon Jun 4 23:02:48 2012 +0200 Add nullbyte to strlen for w32 mktemp_s() src/filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e85b0d55086529ffbdf24e1123650762551413a6 Author: Martin Erik Werner Date: Mon Jun 4 22:42:13 2012 +0200 include configCompat.cpp in vcproj src/_build/liero.vcxproj | 1 + 1 file changed, 1 insertion(+) commit 9327c2a446ad385ae487120b2f8495c65b8a4f1a Merge: a22bd39 3c51509 Author: Martin Erik Werner Date: Mon Jun 4 22:41:08 2012 +0200 Merge branch 'master' into windows commit 3c51509cce2f73418743a7520a96b430dde85198 Author: Martin Erik Werner Date: Mon Jun 4 22:40:53 2012 +0200 Note loadConstantsFromCFGVer0() in configCompat.cpp src/common.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a22bd3974b598fa3446de6fafca9dd370b9e9555 Merge: 12f00a1 d2b59b5 Author: Martin Erik Werner Date: Mon Jun 4 22:19:37 2012 +0200 Merge branch 'master' into windows commit d2b59b515e89a56622d9af24f2c3076b8a6548bd Author: Martin Erik Werner Date: Mon Jun 4 22:18:07 2012 +0200 Avoid double-loading CFG in first constructor as well src/configInit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0e1dcb575fe9b656957c7e22708f56d45da43f4f Author: Martin Erik Werner Date: Mon Jun 4 22:07:37 2012 +0200 Make backupFile() w32-friendly src/filesystem.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 12f00a16f461671839afe35e352a96dff84fed71 Merge: 9546fe7 525b851 Author: Martin Erik Werner Date: Mon Jun 4 20:09:14 2012 +0200 Merge branch 'master' into windows commit 525b851f614eb9fd51434355391738cc4cbdaaca Author: Martin Erik Werner Date: Mon Jun 4 20:08:22 2012 +0200 Add libboost-program-options-dev depend in README README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9546fe767c896c2ba5bf70e0fa534e05d29fc361 Merge: e645f31 5ca6a5c Author: Martin Erik Werner Date: Mon Jun 4 19:34:17 2012 +0200 Merge branch 'master' into windows commit 5ca6a5cf30153d32e6b776a05a57a1369b70cc6e Author: Martin Erik Werner Date: Fri May 18 13:27:51 2012 +0200 Added auto-upgrade note to NEWS NEWS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e645f3139dd8af49dc8c5319b88e61c7acda4bff Merge: d577bfc f54a15e Author: Martin Erik Werner Date: Fri May 18 13:13:48 2012 +0200 Merge branch 'master' into windows commit f54a15ed6f79d11028b9b9de19aec24bc6efcdcc Author: Martin Erik Werner Date: Fri May 18 13:12:09 2012 +0200 Use upgradeCFG() when the $HOME / settings CFG file is used src/configInit.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 3feeecc1e0954a800d8d85d957e42aa02057cbc4 Author: Martin Erik Werner Date: Fri May 18 13:04:54 2012 +0200 Implement upgradeCFG() Function which takes a given CFG and a compating version, if it is outdated: * Loads the variables from it (using the existing compatible load) * Makes a backup copy of the file * Recreates the file in the new format from the loaded vars src/configInit.cpp | 30 ++++++++++++++++++++++++++---- src/configInit.hpp | 1 + 2 files changed, 27 insertions(+), 4 deletions(-) commit b50a629a8f1276e1b33b4b6d4823371b0c8d7410 Author: Martin Erik Werner Date: Fri May 18 13:02:59 2012 +0200 Implement rmFile() and backupFile() in filesystem src/filesystem.cpp | 28 ++++++++++++++++++++++++++++ src/filesystem.hpp | 4 ++++ 2 files changed, 32 insertions(+) commit f53f12128b9f4f0cf9fb09eeeac502dd912ae16d Author: Martin Erik Werner Date: Thu May 17 12:41:28 2012 +0200 src/filesystem.cpp:fix whitespace src/filesystem.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 9a315fdfd16af439b54963089ac042ca3fecea15 Author: Martin Erik Werner Date: Thu May 17 11:56:05 2012 +0200 Bump to 0.3.1, update NEWS NEWS | 7 +++++++ configure.ac | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) commit d577bfc48e3f14b28cb386efdccc6ddcd37c5d4a Merge: a819614 36a08d6 Author: Martin Erik Werner Date: Thu May 17 11:50:37 2012 +0200 Merge branch 'master' into windows commit 36a08d6ac07fd80ddd4d0adb3788c1df11c3341f Author: Martin Erik Werner Date: Mon May 14 20:49:47 2012 +0200 Make sure to write the version to file src/common.cpp | 3 +++ 1 file changed, 3 insertions(+) commit 2126369ffd8ed49ed6003ae296cbc58a058ffb25 Author: Martin Erik Werner Date: Mon May 14 20:32:00 2012 +0200 Fix constants names, needs CFG file v.1) src/constants.cpp | 72 ++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 39 deletions(-) commit f615fb356e792782c72ee9c4b758833a504ed27b Author: Martin Erik Werner Date: Mon May 14 20:29:34 2012 +0200 Do CFG version check in init, and load accordingly src/configInit.cpp | 12 +++++++++++- src/configInit.hpp | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) commit e64953abcb63687d87d25f11ba5ccc568790304c Author: Martin Erik Werner Date: Mon May 14 20:26:52 2012 +0200 Add functions for reading/writing CFG file version src/common.cpp | 21 +++++++++++++++++++++ src/common.hpp | 3 +++ src/configHelper.cpp | 5 +++++ src/configHelper.hpp | 2 ++ 4 files changed, 31 insertions(+) commit dad3aa78b43608d5610ef8abee533820e8df28c1 Author: Martin Erik Werner Date: Mon May 14 20:24:49 2012 +0200 Add compatible loading of constants from ver0 CFG Makefile.am | 1 + src/common.hpp | 1 + src/configCompat.cpp | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+) commit ede3a2df920450d09d0b0e2c3e1a472b7e6e6627 Author: Martin Erik Werner Date: Sun May 13 17:56:51 2012 +0200 Fix loading EXE file by path Previously used an empty path :( src/configInit.cpp | 3 +-- src/reader.cpp | 5 +++++ src/reader.hpp | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) commit 8c80937128137f857fccb6396241ccffc17e137f Author: Martin Erik Werner Date: Wed May 9 01:28:30 2012 +0200 Note where lev files go in README README | 2 ++ 1 file changed, 2 insertions(+) commit a819614fa6e3a19a9d93e74dcf097125390c13ca Author: Martin Erik Werner Date: Wed May 9 01:26:16 2012 +0200 Note where to place lev files in README README.txt | 2 ++ 1 file changed, 2 insertions(+) commit cf1728bb2e7efb36dad629d87c428f2b86b8d174 (tag: lierolibre-0.3_win32) Author: Martin Erik Werner Date: Thu May 3 12:22:39 2012 +0200 Update windows changelog ChangeLog.txt | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) commit c56e0f370704e60455c69e78de666ca4c3ffa6a3 Merge: 3039d30 16df031 Author: Martin Erik Werner Date: Thu May 3 12:21:26 2012 +0200 Merge branch 'master' into windows commit 16df031dfe180dad3318b78abaa99347284651ee (tag: lierolibre-0.3) Author: Martin Erik Werner Date: Thu May 3 12:21:14 2012 +0200 Update changelog ChangeLog | 395 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 395 insertions(+) commit c04b38225dfb4e77de3f58c0856d498aa82c1e08 Author: Martin Erik Werner Date: Thu May 3 04:36:58 2012 +0200 Account for dir + dir in inputfile behaviour dir + dir also makes it prioritize $HOME, however if given foo.unknown and dir it won't, hence the unweildy if-or-if-then to make sure it is by-letter correct. man/lierolibre.6.am | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit d666620b4e964b963589ebda3b88bb0e90180094 Author: Martin Erik Werner Date: Thu May 3 03:13:38 2012 +0200 Reword and update manpage * dir + dir can be given * CFG file only copied if inputfile is a dir * inputdir does not default, rather then game uses inpufile man/lierolibre.6.am | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 90b46db9587cce7fc252ec802c08bed61e1bba3b Author: Martin Erik Werner Date: Thu May 3 02:38:08 2012 +0200 Reword wrapper script, for loop & don't shift This seems to work infinitely much better than the previous monster, and it should be future-proof as well! scripts/lierolibre.am | 61 ++++++++----------------------------------------- 1 file changed, 9 insertions(+), 52 deletions(-) commit 2d02dd391f93d28bc4c4b68b60cca1913d48f200 Author: Martin Erik Werner Date: Wed May 2 22:00:45 2012 +0200 Remove unused zlib license text from *nix version COPYING | 20 -------------------- 1 file changed, 20 deletions(-) commit 90bb6b035bfe13790cd89d26bc6e92b7906431ac Author: Martin Erik Werner Date: Wed May 2 21:28:17 2012 +0200 add a dot in COPYING COPYING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6593a22856f1cc9de484317f2ccfb2ce04870755 Author: Martin Erik Werner Date: Wed May 2 21:24:12 2012 +0200 Use return value from fread for error check instead of ferror src/gfx.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9325e3c29fcc57e0f18171f5779280460494ab09 Author: Martin Erik Werner Date: Wed May 2 21:03:24 2012 +0200 Fix a wrap and formulation error in COPYING COPYING | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3039d30c9c3e28f9dc7238fb2e1be7a19648678b Merge: 2d13bc3 9046aab Author: Martin Erik Werner Date: Wed May 2 17:31:08 2012 +0200 Merge branch 'master' into windows commit 9046aab7731f6fb9fd5043b2396b65bbcd82c399 Author: Martin Erik Werner Date: Wed May 2 17:17:08 2012 +0200 Fixes for the no-masm building (boost path & arch) Conflicts: lib src/_build/liero.vcxproj | 4 ++-- src/_build/lierolibre.sln | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 2d13bc3a050f13a2464f4846da2347fd315ca825 Author: Martin Erik Werner Date: Wed May 2 17:17:08 2012 +0200 Fixes for the no-masm building (boost path & arch) lib | 2 +- src/_build/liero.vcxproj | 4 ++-- src/_build/lierolibre.sln | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) commit 087eb6b8b4eef89573a0638f082b9899786a22dc Author: Martin Erik Werner Date: Wed May 2 16:52:14 2012 +0200 Update windows changelog ChangeLog.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit e1bf459bb4d9bdde7413e58c48c2c16a911050a1 Author: Martin Erik Werner Date: Wed May 2 16:38:22 2012 +0200 update lib module with zlib no-masm /MD lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a564e1e9c466e9ea2c256abed861df8ae6eee22d Author: Martin Erik Werner Date: Wed May 2 16:17:04 2012 +0200 fix lierocfg.txt path and name in windows README README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c63640b224b910be2d7ccd78f29b3793cb9f8c5 Author: Martin Erik Werner Date: Wed May 2 16:02:08 2012 +0200 Update windows changelog ChangeLog.txt | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit 42cfcb06652aa2a63acc827caa2885aea9cadd1f Merge: 50eee55 6e78a5f Author: Martin Erik Werner Date: Wed May 2 15:38:50 2012 +0200 Merge branch 'master' into windows commit 50eee556c5f07de7421336bd747bc315d63ae705 Author: Martin Erik Werner Date: Wed May 2 14:42:51 2012 +0200 Update COPYING with static zlib and licenses for NEWS COPYING.txt | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 6e78a5fab6d6a96fe290a20a1cc898177e70f86d Author: Martin Erik Werner Date: Wed May 2 15:28:50 2012 +0200 Large update of copyright info, autotools & NEWS pedantry COPYING | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 90 insertions(+), 16 deletions(-) commit 0e4dd8cec4fcee432c2d24fc675d4101e576c0fc Author: Martin Erik Werner Date: Wed May 2 05:11:03 2012 +0200 undefining ZLIB_WINAPI and tweaking zlib in lib submodule lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2dd0a46c8577c58369bae1523591fc22187df1fe Merge: 80a9a0e 66618db Author: Martin Erik Werner Date: Wed May 2 05:10:02 2012 +0200 Merge branch 'master' into windows commit 66618db7fe11c66e4eb3ad349c559c6c89f9a461 Author: Martin Erik Werner Date: Wed May 2 05:06:19 2012 +0200 msvcpp: changes for static zlib, use non-VCS boost debug src/_build/liero.vcxproj | 8 +++----- src/_build/lierolibre.sln | 39 +++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 25 deletions(-) commit 2fe70f3d591b8375d480bebcd37f10205ab05608 Author: Martin Erik Werner Date: Wed May 2 04:57:55 2012 +0200 static zlib linking in gvl vcxproj src/gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80a9a0eb76ff8e7fb9293fdf5ea504db90379e4c Author: Martin Erik Werner Date: Wed May 2 04:57:55 2012 +0200 static zlib linking in gvl src/gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7d78f58b2ac1b749a8ccf3cc9ac361a35428991 Author: Martin Erik Werner Date: Wed May 2 00:23:13 2012 +0200 Update windows changelog ChangeLog.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit b47b99a71b87ac49525ef9dd840b72ea2744d8f0 Author: Martin Erik Werner Date: Wed May 2 00:19:13 2012 +0200 Remove leftover check-marker COPYING.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d29f2436db04e8c53e48fdbf55583a2be2a9c818 Author: Martin Erik Werner Date: Wed May 2 00:06:58 2012 +0200 Update windows changelog ChangeLog.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit df1708ee4a4755cfc5603d0ec5aab48a73ef6dba Merge: 0b717aa e99af1e Author: Martin Erik Werner Date: Wed May 2 00:05:50 2012 +0200 Merge branch 'master' into windows commit e99af1ea5c41a1c1107b3764ceb423de3585abf6 Author: Martin Erik Werner Date: Wed May 2 00:05:35 2012 +0200 add include for GVL_WINDOWS src/reader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0b717aa4e2209b9a2b516535c95f1e1746ae64c9 Author: Martin Erik Werner Date: Tue May 1 23:47:18 2012 +0200 Separate ChangeLog for the windows branch, though ChangeLog.txt | 5612 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 5612 insertions(+) commit 37b2e921522275d2dfb690c785e6a0a28f18fd92 Author: Martin Erik Werner Date: Tue May 1 23:46:18 2012 +0200 On second though since they won't diverge lets not clone AUTHORS.txt | 11 -- NEWS.txt | 376 ----------------------------------------------------------- 2 files changed, 387 deletions(-) commit 75c3bd3eb538cc17fb93e03f061c8cf07090b41b Merge: 591c2d0 b6508be Author: Martin Erik Werner Date: Tue May 1 23:44:14 2012 +0200 Merge branch 'master' into windows commit b6508be52524223ea2944a458ad67183d60860e6 Author: Martin Erik Werner Date: Tue May 1 23:43:18 2012 +0200 Bump version to 0.3 NEWS | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 591c2d08f2052c1d87c816a91115b157db46e8b2 Author: Martin Erik Werner Date: Tue May 1 23:38:51 2012 +0200 Added windowsy NEWS and AUTHORS (.txt) AUTHORS.txt | 11 ++ NEWS.txt | 376 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 387 insertions(+) commit 865b1b18e458d9852968ac04dae9efd6eb6d4188 Merge: c0df4a3 4c31e6d Author: Martin Erik Werner Date: Tue May 1 23:30:08 2012 +0200 Merge branch 'master' into windows commit 4c31e6d621d2958fe5ec803e9b6be5b85288cc09 Author: Martin Erik Werner Date: Tue May 1 23:29:21 2012 +0200 Renamed liero.txt->lierocfg.txt to avoid conflict with LIERO.TXT NEWS | 2 +- src/boostTesting.cpp | 4 ++-- src/dataPath.cpp | 2 +- src/reader.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit c0df4a347c59c8f40e982601fe412fd866413b39 Merge: e7ec3ad 60481dd Author: Martin Erik Werner Date: Tue May 1 23:01:07 2012 +0200 Merge branch 'master' into windows commit e7ec3ad41bc935561b5353c22cff52e22dae16ea Author: Martin Erik Werner Date: Tue May 1 22:13:22 2012 +0200 batch script for cmd in workdir scripts/lierolibre-cmd.bat | 5 +++++ 1 file changed, 5 insertions(+) commit 858b4dca27ab1d445df9db3a50acb9e110e5aee6 Author: Martin Erik Werner Date: Tue May 1 22:00:35 2012 +0200 windows-specific README README.txt | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 60481dd99ffa30ff36ede2b58bf933ebe03d3193 Author: Martin Erik Werner Date: Tue May 1 15:44:27 2012 +0200 Updated NEWS with new CFG file fixes NEWS | 5 +++++ 1 file changed, 5 insertions(+) commit 19ffdae3883a46d1d9d246853410729a222967c7 Author: Martin Erik Werner Date: Tue May 1 15:31:48 2012 +0200 Add liero.txt as equally valid for dataPath Implementation of setLieroCFG() does not auto-load the CFG from the alternative platform though, e.g. *nix will not load liero.txt if given a directory as inputfile, or from the home dir. src/dataPath.cpp | 1 + 1 file changed, 1 insertion(+) commit efe09296f81b565e9c3fadf3ab05ba84adec6323 Author: Martin Erik Werner Date: Tue May 1 15:30:01 2012 +0200 Implement the setLieroCFG() function. Used to set the CFG file separately, does not leave a DataPath object, chooses cfg/txt depending on platform. src/reader.cpp | 12 +++++++++++- src/reader.hpp | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) commit dff191998885ee3b3f9f462c707f3c9a4feef91b Author: Martin Erik Werner Date: Tue May 1 15:25:18 2012 +0200 Use specific function to copy/set home CFG, handle two dirs * Use a dedicated function to set the CFG file, thus allowing setLieroPath() wihout requiring CFG files to be present. * Handle the case of two directories, as is the case if the user only gives a -d option, since we default to inputfile being a dir src/configInit.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e7efaa89a9ce6879f9c08135e40f468448ea633e Author: Martin Erik Werner Date: Tue May 1 15:21:34 2012 +0200 inputfile defaults to data/ dir instead of cfg file on start Easier since we use cfg on *nix, txt on woe src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 062cc6896f53317084bef318c92bacb3f519c072 Author: Martin Erik Werner Date: Tue May 1 15:19:05 2012 +0200 Updated dataPath test with liero.txt src/boostTesting.cpp | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) commit 5fda8aeddd92b175c7b9698db09f0030d781a386 Author: Martin Erik Werner Date: Tue May 1 14:00:30 2012 +0200 Remove all CFG() functions hardcoding 'liero.cfg' src/common.cpp | 69 --------------------------------------------------- src/common.hpp | 16 ------------ src/constants.cpp | 10 -------- src/gfx.cpp | 10 -------- src/gfx.hpp | 2 -- src/gfx/font.cpp | 10 -------- src/gfx/font.hpp | 2 -- src/gfx/palette.cpp | 10 -------- src/gfx/palette.hpp | 2 -- src/math.cpp | 8 ------ src/math.hpp | 2 -- 11 files changed, 141 deletions(-) commit bc6d5de62f36400ba41db4b9a86aff8a419d53dc Author: Martin Erik Werner Date: Tue May 1 13:02:38 2012 +0200 copyright info for windows binary distribution COPYING.txt | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) commit 137aaa180ce23869718bec306e055a10218e4176 Author: Martin Erik Werner Date: Tue May 1 04:01:07 2012 +0200 Large update of NEWS NEWS | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 21a057ba6466d0e7c6dbcae4fd64b7cd2aadeb35 Author: Martin Erik Werner Date: Tue May 1 03:01:19 2012 +0200 Added w32 lib depends as submodule .gitmodules | 3 +++ lib | 1 + 2 files changed, 4 insertions(+) commit d5421dee7c8497b68751ef67ab1215a11261d35c Author: Martin Erik Werner Date: Tue May 1 02:58:51 2012 +0200 gvl: some msvcpp changes src/gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f96ca2d68834e2dad3bc7f5497719971212dedf1 Author: Martin Erik Werner Date: Tue May 1 02:40:01 2012 +0200 Manually pick all VSC++ pjoject changes from windows branch src/_build/liero.sln | 47 -------- src/_build/liero.vcxproj | 271 +++++++++++++++++++++++++++++++++++++++++++++ src/_build/lierolibre.sln | 90 +++++++++++++++ 3 files changed, 361 insertions(+), 47 deletions(-) commit fec92cf12d51eafda1dad6bd92cabc9c576e6a5f Author: Martin Erik Werner Date: Mon Apr 30 17:50:19 2012 +0200 Enable all sizes for scale2X, black intersections currently src/gfx.cpp | 127 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 66 insertions(+), 61 deletions(-) commit 87bc3c70847647b445fda72eaf8d329fdc0f0196 Author: Martin Erik Werner Date: Mon Apr 30 17:17:44 2012 +0200 Use stored host desktop resolution for fullscreen src/gfx.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 9aa7d2f052088edb25e01f0617a429476d53ef89 Author: Martin Erik Werner Date: Mon Apr 30 17:16:56 2012 +0200 Use setMaxVideoMode() at game start src/main.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7a2e59409ee7bbfc14f957084ac1f6415f86139c Author: Martin Erik Werner Date: Mon Apr 30 17:10:28 2012 +0200 Add setMaxVideoMode() setMaxVideoMode() uses the gfx.desktop{W,H} as upper limits and sets the highest possible window size (320x200 multiple), if-fullscreen behaviour is same as setVideoMode, might be useful if game is set to start fullscreen? (Horrible prospect...) src/gfx.cpp | 36 ++++++++++++++++++++++++++++++++++++ src/gfx.hpp | 1 + 2 files changed, 37 insertions(+) commit 0e85718bd0d385f4d3d9cb781e0702169debf752 Author: Martin Erik Werner Date: Mon Apr 30 16:22:44 2012 +0200 Store resolution on init, and store/restore with fullscreen * Desktop size from host stored in gfx.desktop{W,H} * Window size stored in storedWindow{W,H} before entering fullscreen, resored on leaving fullscreen src/gfx.cpp | 15 ++++++++++++--- src/gfx.hpp | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) commit 387b46856b5530f08e750b4c2a6f47a39bb6a543 Author: Martin Erik Werner Date: Mon Apr 30 00:02:17 2012 +0200 change defaultpath to dir instead of file Fixes lierolibre not loading the $HOME liero.cfg file scripts/lierolibre.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd71781f118cd430bdf29ed012e00fbbfe349c29 Author: Martin Erik Werner Date: Sun Apr 29 04:04:54 2012 +0200 stdint.h woe fix src/gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f08615d8c28b1d1344c996f01654390ae2fc21a Author: Martin Erik Werner Date: Sun Apr 29 03:08:34 2012 +0200 mkdir() -> _mkdir() for woe src/dataPath.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d0a5b914c421e772381fd280d7e8a790c8773076 Author: Martin Erik Werner Date: Sun Apr 29 02:49:37 2012 +0200 Include gvl/support/platform.hpp for GVL_WINDOWS def src/dataPath.cpp | 1 + 1 file changed, 1 insertion(+) commit e07092c926b3ce190202ab818c4021d81abe55ef Author: Martin Erik Werner Date: Sat Apr 28 23:16:52 2012 +0200 preprocess choice between $HOME and CurDir, and mkdir src/dataPath.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) commit dcc91b48b01a62fe9004151a875d891a9dd00376 Author: Martin Erik Werner Date: Sat Apr 28 02:25:02 2012 +0200 Bump version to 0.2.1, note Alt-F4 fullscreen quit in NEWS NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 9a752f005f421ad3eeeaca8d825d14257992751a Author: Martin Erik Werner Date: Sat Apr 28 02:22:28 2012 +0200 Made is possible to exit from fullscreen via alt+f4 src/gfx.cpp | 3 +++ 1 file changed, 3 insertions(+) commit bd6d35fe46b3c719798d49e26908c045ec0361d3 (tag: lierolibre-0.2) Author: Martin Erik Werner Date: Fri Apr 27 18:36:35 2012 +0200 Update ChangeLog ChangeLog | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit c4b0e2d09e1347e5baede192139180f5bb5b36f6 Author: Martin Erik Werner Date: Fri Apr 27 18:29:36 2012 +0200 note ./liero.cfg -> data/liero.cfg default change in NEWS NEWS | 1 + 1 file changed, 1 insertion(+) commit 522200c4b5b5ee2a0149f44106e7329cb924ab3c Author: Martin Erik Werner Date: Fri Apr 27 18:27:33 2012 +0200 Default to using the data/liero.cfg instead of ./liero.cfg src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58af8f5d9647a8284c3e41920737d2404764cba7 Author: Martin Erik Werner Date: Fri Apr 27 18:21:20 2012 +0200 Refresh ChangeLog ChangeLog | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e7b9d977494556be9278dfb2dcf8540dac926610 Author: Martin Erik Werner Date: Fri Apr 27 18:18:27 2012 +0200 Add a lot of info to the README * Window size keys * Config file info * Compile and install instructions * Bug reporting link * More info link to LP README | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) commit 91d3580b9938a09ec16159563e5cc628d6103510 Author: Martin Erik Werner Date: Fri Apr 27 16:47:47 2012 +0200 Update ChangeLog with git-log --stat > ChangeLog | 1145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1145 insertions(+) commit b0d707833ddff662fe426d827d4fcd9758325c8a Author: Martin Erik Werner Date: Fri Apr 27 16:44:50 2012 +0200 Bump date in all manpages man/lierolibre-extractgfx.6.am | 2 +- man/lierolibre-extractlev.6.am | 2 +- man/lierolibre-extractsounds.6.am | 2 +- man/lierolibre-packgfx.6.am | 2 +- man/lierolibre-packlev.6.am | 2 +- man/lierolibre-packsounds.6.am | 2 +- man/lierolibre.6.am | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit bf707c541c9149df11a35400110c94ac4517604d Author: Martin Erik Werner Date: Fri Apr 27 14:38:09 2012 +0200 Use seddable #PACKAGE_VERSION# in manpages and add build command Makefile.am | 1 + man/lierolibre-extractgfx.6.am | 2 +- man/lierolibre-extractlev.6.am | 2 +- man/lierolibre-extractsounds.6.am | 2 +- man/lierolibre-packgfx.6.am | 2 +- man/lierolibre-packlev.6.am | 2 +- man/lierolibre-packsounds.6.am | 2 +- man/lierolibre.6.am | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) commit 0a64f22bae5a3252ce8666755c221c318f233655 Author: Martin Erik Werner Date: Fri Apr 27 14:28:58 2012 +0200 Change inputfile to refer to the directory of itself instead of inputdir I think this is slightly less confusing. man/lierolibre.6.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 37ffe7627b89e17cbf04f9fcd6bfac3eb27a59a3 Author: Martin Erik Werner Date: Fri Apr 27 13:12:01 2012 +0200 Refactor: Add gfx.{load,save}OPT() instead of doing it all in main src/gfx.cpp | 37 +++++++++++++++++++++++++++++++++++++ src/gfx.hpp | 3 +++ src/main.cpp | 19 ++----------------- 3 files changed, 42 insertions(+), 17 deletions(-) commit 996127347661893a805a140da8797b1c4a0c6d51 Author: Martin Erik Werner Date: Fri Apr 27 13:10:12 2012 +0200 do closeAllCachedFiles() in main exception cleanup src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 3d080a9e15f70d47b0a727a5e4d16e1c32169589 Author: Martin Erik Werner Date: Fri Apr 27 03:01:11 2012 +0200 check return value on fread, and throw src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 017058b54073baecc6a9ecf6c4e1302ba630cc6b Author: Martin Erik Werner Date: Fri Apr 27 01:05:04 2012 +0200 Add libconfig version check for write as well src/configInit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1dc3d7bedf159e0314e07ea3c020d3bee27c1f15 Author: Martin Erik Werner Date: Fri Apr 27 00:51:47 2012 +0200 noted required version of libconfig++ for verbose errors in NEWS NEWS | 2 ++ 1 file changed, 2 insertions(+) commit 3f304931965517b26cb3f3f77a79064fb2776a48 Author: Martin Erik Werner Date: Fri Apr 27 00:37:16 2012 +0200 Use pp logic to check libconfig version & disable the exception info Get-info methods on the exceptions don't work in libconfig <= 1.4, this is unfortunately the prevalent version in Ubuntu, for example. src/configInit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) commit eb363f16cc5ba949d5eb0208fbb6eb2b6aa21f18 Author: Martin Erik Werner Date: Fri Apr 27 00:36:58 2012 +0200 cleanup leftover path assignments src/dataPath.cpp | 2 -- 1 file changed, 2 deletions(-) commit 942330d8ee77f335ba18b6961f6c5b2c05e5d918 Author: Martin Erik Werner Date: Thu Apr 26 23:09:31 2012 +0200 Note no-longer-need ending "/" in NEWS, reword Better -> Reworked NEWS | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5999b4e77383ccfabb614a3537a49041db619c24 Author: Martin Erik Werner Date: Thu Apr 26 23:06:12 2012 +0200 Remove ending "/" hints in manpage now that it's not needed man/lierolibre.6.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ff47311920201d42bb71efaf1cfdb62f1e590aae Author: Martin Erik Werner Date: Thu Apr 26 22:59:38 2012 +0200 Avoid setting root path to parent of directory if given without ending "/" Previously if DataPath was was constructed with a directory path which did not end with "/" it instead set its path to the parent directory. Now it uses isDir() to check for this and set it correctly. src/dataPath.cpp | 7 +++++++ 1 file changed, 7 insertions(+) commit 2a1a386a1d3164fb090ef28e670e6a36478ae768 Author: Martin Erik Werner Date: Thu Apr 26 22:58:51 2012 +0200 Implement isDir() to check if path is a directory src/filesystem.cpp | 11 +++++++++++ src/filesystem.hpp | 2 ++ 2 files changed, 13 insertions(+) commit 257bfcfd0ccacb661be1895a3e98b7a04b202e96 Author: Martin Erik Werner Date: Thu Apr 26 22:30:11 2012 +0200 Use disable getRoot() in setLieroPath and delete setLiero{EXE,CFG}() src/reader.cpp | 30 ++---------------------------- src/reader.hpp | 2 -- 2 files changed, 2 insertions(+), 30 deletions(-) commit 19d54cb2b30ce654a0b951c7f90c49498ecb7cb4 Author: Martin Erik Werner Date: Thu Apr 26 22:17:37 2012 +0200 Update news file with verbose cfg error messages NEWS | 2 ++ 1 file changed, 2 insertions(+) commit 2b825851d61e27689d5517f79a9aa92251b40037 Author: Martin Erik Werner Date: Thu Apr 26 22:06:27 2012 +0200 catch exceptions by libconfig, output info, rethrow Wrap loadFromCFG() and writeToCFG() in try blocks, catch ParseException and SettingException and print all provided info before rethrowing. This should possibly be done via a custom exception class, with a single assembled string message, but that seems like a lot of pain for little gain. src/configInit.cpp | 94 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 39 deletions(-) commit 00903c61ee52a1d6b9b2a165f9d98faeac3a1c5f Author: Martin Erik Werner Date: Thu Apr 26 18:58:33 2012 +0200 Rework manpage to fit new cli parameters and options man/lierolibre.6.am | 91 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 67 insertions(+), 24 deletions(-) commit 790e611d2335c220cfed3dbe53c3f128b68383ef Author: Martin Erik Werner Date: Thu Apr 26 18:57:49 2012 +0200 reword help message, spelling, ordering.. src/argParse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e0e9defc861e5d2b2f416cd7743b556005fb1c42 Author: Martin Erik Werner Date: Thu Apr 26 14:14:13 2012 +0200 Update wrapper script with new binary scripts/lierolibre.am | 64 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 20 deletions(-) commit 7056597388fe2d032c4d873b4a6d7d8f22279100 Author: Martin Erik Werner Date: Thu Apr 26 14:13:06 2012 +0200 Specify source files for script, gfx and sounds in Makefile Makefile.am | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) commit ed0935e0c179c1ee8d4ee52cb37b92de6e68d012 Author: Martin Erik Werner Date: Thu Apr 26 03:26:59 2012 +0200 add changelog to distributed and installed Makefile.am | 1 + 1 file changed, 1 insertion(+) commit 7d39ebdbf54f1f0ffbda27198053bb152a358620 Author: Martin Erik Werner Date: Thu Apr 26 03:21:09 2012 +0200 Fix syntax error with extra "," configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45da140e91f12c4c435c48917e98550c89d78816 Author: Martin Erik Werner Date: Thu Apr 26 03:06:52 2012 +0200 Follow change in configure.ac GVL_DEPS -> ZLIB Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 69dbe6db61aa602d3a60b63586f30440dfabd669 Author: Martin Erik Werner Date: Thu Apr 26 01:12:33 2012 +0200 Added some more git ignores .gitignore | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 846f12990203eaf659d9a75baa9333572f3cf8b7 Author: Martin Erik Werner Date: Thu Apr 26 01:06:36 2012 +0200 no-need-pkg-config for SDL_mixer in NEWS NEWS | 1 + 1 file changed, 1 insertion(+) commit 54ee9320584a19eaa73171384051502ef16a6d75 Author: Martin Erik Werner Date: Thu Apr 26 01:03:51 2012 +0200 set Jamfile path and add dummy_config.h to dist Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 20d8f6dd217d6a1ed9fd01b4c86b5c221bea5e35 Author: Martin Erik Werner Date: Thu Apr 26 01:02:28 2012 +0200 Update makefile with splitting of SDL_mixer and libconfig++ Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f504cdf4cb50124dd68cdac771d4e8ba73d22afa Author: Martin Erik Werner Date: Thu Apr 26 01:01:53 2012 +0200 work around missing pkg-config for SDL_mixer configure.ac | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit ee5008051064f0fcc116ecfebe00b78a89645abf Author: Martin Erik Werner Date: Wed Apr 25 23:37:09 2012 +0200 Delete top Jamfile, can't get it to work properly 0 files changed commit 120e88629e2573011af3d23090686f8e29110905 Author: Martin Erik Werner Date: Wed Apr 25 23:31:31 2012 +0200 Work around Jam not having config.h We include config.h in autotools, but the #include won't work with jam, hence create a dummy file which is renamed by Jam (to avoid having a file in VCS that is modified by build), and included, empty. Also ifdef the use of PACKAGE_CAPTION since that's what we get from config.h normally... I'm guessing it might be time to drop Jam one of these days.... src/Jamfile | 3 +++ src/dummy_config.h | 1 + src/gfx.cpp | 4 ++++ 3 files changed, 8 insertions(+) commit 60727e001bd77913ea662510db0843d51f97fc67 Author: Martin Erik Werner Date: Wed Apr 25 23:02:57 2012 +0200 Fix no return value in inputString when we SDL_QUIT src/gfx.cpp | 1 + 1 file changed, 1 insertion(+) commit 4bc3b963da333d82fbb7f4b4be7714ea59415e8f Author: Martin Erik Werner Date: Wed Apr 25 22:47:19 2012 +0200 Add dummy config.h for Jam 0 files changed commit e37667b66306840dd4c969eef9e0c9595c99ade5 Author: Martin Erik Werner Date: Wed Apr 25 22:22:01 2012 +0200 Update copyright file paths with src migrations COPYING | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 5ffe122ab57ffc8f5bc8b34965eedd6cc5429ada Author: Martin Erik Werner Date: Wed Apr 25 22:08:29 2012 +0200 Move gvl submodule to src/gvl That took way more effort that it should see my (arand's) comment on http://stackoverflow.com/questions/4604486 .gitmodules | 2 +- gvl | 1 - src/gvl | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) commit 1cc09f6a8e1b9cbb8f9cb70fade75518a296d1e4 Author: Martin Erik Werner Date: Wed Apr 25 20:13:19 2012 +0200 Modify build scripts for src move Makefile.am | 793 +++++++++++++++++++++++++++++----------------------------- autogen.sh | 4 +- configure.ac | 16 +- 3 files changed, 402 insertions(+), 411 deletions(-) commit a6ad9f6ad736a44715ccaf3f121a38f0277b1603 Author: Martin Erik Werner Date: Wed Apr 25 20:10:35 2012 +0200 First step in movinf to src/subdir Jamfile | 47 - _build/liero.sln | 47 - _build/liero.vcproj | 841 ------------- argParse.cpp | 52 - argParse.hpp | 40 - binReader.cpp | 133 -- binReader.hpp | 51 - bobject.cpp | 90 -- bobject.hpp | 48 - bonus.cpp | 63 - bonus.hpp | 53 - boostTesting.cpp | 428 ------- common.cpp | 1154 ------------------ common.hpp | 232 ---- configHelper.cpp | 135 --- configHelper.hpp | 52 - configInit.cpp | 151 --- configInit.hpp | 52 - console.cpp | 248 ---- console.hpp | 63 - constants.cpp | 586 --------- constants.hpp | 183 --- controller/commonController.cpp | 72 -- controller/commonController.hpp | 42 - controller/controller.hpp | 64 - controller/localController.cpp | 309 ----- controller/localController.hpp | 81 -- controller/replayController.cpp | 196 --- controller/replayController.hpp | 79 -- dataPath.cpp | 132 -- dataPath.hpp | 69 -- exactObjectList.hpp | 205 ---- fastObjectList.hpp | 151 --- filesystem.cpp | 384 ------ filesystem.hpp | 104 -- game.cpp | 550 --------- game.hpp | 115 -- gfx.cpp | 2262 ----------------------------------- gfx.hpp | 271 ----- gfx/blit.cpp | 515 -------- gfx/blit.hpp | 64 - gfx/color.hpp | 32 - gfx/font.cpp | 212 ---- gfx/font.hpp | 71 -- gfx/macros.hpp | 201 ---- gfx/palette.cpp | 187 --- gfx/palette.hpp | 86 -- gfx/sprite.cpp | 78 -- gfx/sprite.hpp | 52 - keys.cpp | 152 --- keys.hpp | 58 - level.cpp | 311 ----- level.hpp | 103 -- lfs.hpp | 103 -- main.cpp | 228 ---- math.cpp | 102 -- math.hpp | 60 - menu/arrayEnumBehavior.hpp | 56 - menu/booleanSwitchBehavior.cpp | 60 - menu/booleanSwitchBehavior.hpp | 50 - menu/enumBehavior.cpp | 75 -- menu/enumBehavior.hpp | 58 - menu/hiddenMenu.cpp | 112 -- menu/hiddenMenu.hpp | 57 - menu/integerBehavior.cpp | 83 -- menu/integerBehavior.hpp | 58 - menu/itemBehavior.cpp | 29 - menu/itemBehavior.hpp | 49 - menu/menu.cpp | 318 ----- menu/menu.hpp | 182 --- menu/menuItem.cpp | 65 - menu/menuItem.hpp | 61 - menu/timeBehavior.cpp | 40 - menu/timeBehavior.hpp | 46 - ninjarope.cpp | 149 --- nobject.cpp | 399 ------ nobject.hpp | 86 -- objectList.hpp | 193 --- rand.cpp | 25 - rand.hpp | 35 - reader.cpp | 157 --- reader.hpp | 59 - rect.hpp | 233 ---- replay.cpp | 692 ----------- replay.hpp | 137 --- sdlmain.cpp | 52 - settings.cpp | 219 ---- settings.hpp | 340 ------ sfx.cpp | 220 ---- sfx.hpp | 121 -- sobject.cpp | 298 ----- sobject.hpp | 66 - src/Jamfile | 47 + src/_build/liero.sln | 47 + src/_build/liero.vcproj | 841 +++++++++++++ src/argParse.cpp | 52 + src/argParse.hpp | 40 + src/binReader.cpp | 133 ++ src/binReader.hpp | 51 + src/bobject.cpp | 90 ++ src/bobject.hpp | 48 + src/bonus.cpp | 63 + src/bonus.hpp | 53 + src/boostTesting.cpp | 428 +++++++ src/common.cpp | 1154 ++++++++++++++++++ src/common.hpp | 232 ++++ src/configHelper.cpp | 135 +++ src/configHelper.hpp | 52 + src/configInit.cpp | 151 +++ src/configInit.hpp | 52 + src/console.cpp | 248 ++++ src/console.hpp | 63 + src/constants.cpp | 586 +++++++++ src/constants.hpp | 183 +++ src/controller/commonController.cpp | 72 ++ src/controller/commonController.hpp | 42 + src/controller/controller.hpp | 64 + src/controller/localController.cpp | 309 +++++ src/controller/localController.hpp | 81 ++ src/controller/replayController.cpp | 196 +++ src/controller/replayController.hpp | 79 ++ src/dataPath.cpp | 132 ++ src/dataPath.hpp | 69 ++ src/exactObjectList.hpp | 205 ++++ src/fastObjectList.hpp | 151 +++ src/filesystem.cpp | 384 ++++++ src/filesystem.hpp | 104 ++ src/game.cpp | 550 +++++++++ src/game.hpp | 115 ++ src/gfx.cpp | 2262 +++++++++++++++++++++++++++++++++++ src/gfx.hpp | 271 +++++ src/gfx/blit.cpp | 515 ++++++++ src/gfx/blit.hpp | 64 + src/gfx/color.hpp | 32 + src/gfx/font.cpp | 212 ++++ src/gfx/font.hpp | 71 ++ src/gfx/macros.hpp | 201 ++++ src/gfx/palette.cpp | 187 +++ src/gfx/palette.hpp | 86 ++ src/gfx/sprite.cpp | 78 ++ src/gfx/sprite.hpp | 52 + src/keys.cpp | 152 +++ src/keys.hpp | 58 + src/level.cpp | 311 +++++ src/level.hpp | 103 ++ src/lfs.hpp | 103 ++ src/main.cpp | 228 ++++ src/math.cpp | 102 ++ src/math.hpp | 60 + src/menu/arrayEnumBehavior.hpp | 56 + src/menu/booleanSwitchBehavior.cpp | 60 + src/menu/booleanSwitchBehavior.hpp | 50 + src/menu/enumBehavior.cpp | 75 ++ src/menu/enumBehavior.hpp | 58 + src/menu/hiddenMenu.cpp | 112 ++ src/menu/hiddenMenu.hpp | 57 + src/menu/integerBehavior.cpp | 83 ++ src/menu/integerBehavior.hpp | 58 + src/menu/itemBehavior.cpp | 29 + src/menu/itemBehavior.hpp | 49 + src/menu/menu.cpp | 318 +++++ src/menu/menu.hpp | 182 +++ src/menu/menuItem.cpp | 65 + src/menu/menuItem.hpp | 61 + src/menu/timeBehavior.cpp | 40 + src/menu/timeBehavior.hpp | 46 + src/ninjarope.cpp | 149 +++ src/nobject.cpp | 399 ++++++ src/nobject.hpp | 86 ++ src/objectList.hpp | 193 +++ src/rand.cpp | 25 + src/rand.hpp | 35 + src/reader.cpp | 157 +++ src/reader.hpp | 59 + src/rect.hpp | 233 ++++ src/replay.cpp | 692 +++++++++++ src/replay.hpp | 137 +++ src/sdlmain.cpp | 52 + src/settings.cpp | 219 ++++ src/settings.hpp | 340 ++++++ src/sfx.cpp | 220 ++++ src/sfx.hpp | 121 ++ src/sobject.cpp | 298 +++++ src/sobject.hpp | 66 + src/sys.cpp | 44 + src/sys.hpp | 40 + src/text.cpp | 115 ++ src/text.hpp | 62 + src/to_string.cpp | 39 + src/to_string.hpp | 45 + src/version.hpp | 32 + src/viewport.cpp | 675 +++++++++++ src/viewport.hpp | 108 ++ src/weapon.cpp | 468 ++++++++ src/weapon.hpp | 122 ++ src/weapsel.cpp | 574 +++++++++ src/weapsel.hpp | 57 + src/worm.cpp | 1593 ++++++++++++++++++++++++ src/worm.hpp | 452 +++++++ sys.cpp | 44 - sys.hpp | 40 - text.cpp | 115 -- text.hpp | 62 - to_string.cpp | 39 - to_string.hpp | 45 - version.hpp | 32 - viewport.cpp | 675 ----------- viewport.hpp | 108 -- weapon.cpp | 468 -------- weapon.hpp | 122 -- weapsel.cpp | 574 --------- weapsel.hpp | 57 - worm.cpp | 1593 ------------------------ worm.hpp | 452 ------- 214 files changed, 21756 insertions(+), 21756 deletions(-) commit 8feb9da498aa6bd5fec5f31404a0dd412ac8c53b Author: Martin Erik Werner Date: Wed Apr 25 18:57:18 2012 +0200 Add the quitting news to NEWS NEWS | 1 + 1 file changed, 1 insertion(+) commit e840a00c4ac4de8dacff458e9e454f23d7ce3462 Author: Martin Erik Werner Date: Wed Apr 25 18:28:24 2012 +0200 Fix game exit when catching SDL_QUIT, without ugly throw Bascially a metter of adding checks for !running which is set when SDL_QUIT is processed, had to add some return and process() to catch and unwind all subcases, hopefully there shouldn't be any left now. gfx.cpp | 24 +++++++++++++++--------- main.cpp | 5 +---- 2 files changed, 16 insertions(+), 13 deletions(-) commit 1ec8a5a5051f44b89720567b2dce0c64a09feabf Author: Martin Erik Werner Date: Wed Apr 25 17:02:05 2012 +0200 Add dummy file to not end up with empty dir 0 files changed commit 7509d7cda9571678581a913a54740980159fcc5a Author: Martin Erik Werner Date: Wed Apr 25 16:58:37 2012 +0200 Change Erik Lindroos' (c) years 2010 -> 2007-2010 Some of those are too early, but it's better to claim copyright on nonexistent stuff and catch the important than to miss out, I guess. binReader.cpp | 2 +- binReader.hpp | 2 +- bobject.cpp | 2 +- bobject.hpp | 2 +- bonus.cpp | 2 +- bonus.hpp | 2 +- common.cpp | 2 +- common.hpp | 2 +- console.cpp | 2 +- console.hpp | 2 +- constants.cpp | 2 +- constants.hpp | 2 +- controller/commonController.cpp | 2 +- controller/commonController.hpp | 2 +- controller/controller.hpp | 2 +- controller/localController.cpp | 2 +- controller/localController.hpp | 2 +- controller/replayController.cpp | 2 +- controller/replayController.hpp | 2 +- exactObjectList.hpp | 2 +- fastObjectList.hpp | 2 +- filesystem.cpp | 2 +- filesystem.hpp | 2 +- game.cpp | 2 +- game.hpp | 2 +- gfx.cpp | 2 +- gfx.hpp | 2 +- gfx/blit.cpp | 2 +- gfx/blit.hpp | 2 +- gfx/color.hpp | 2 +- gfx/font.cpp | 2 +- gfx/font.hpp | 2 +- gfx/macros.hpp | 2 +- gfx/palette.cpp | 2 +- gfx/sprite.cpp | 2 +- gfx/sprite.hpp | 2 +- keys.cpp | 2 +- keys.hpp | 2 +- level.cpp | 2 +- level.hpp | 2 +- lfs.hpp | 2 +- main.cpp | 2 +- math.cpp | 2 +- math.hpp | 2 +- menu/arrayEnumBehavior.hpp | 2 +- menu/booleanSwitchBehavior.cpp | 2 +- menu/booleanSwitchBehavior.hpp | 2 +- menu/enumBehavior.cpp | 2 +- menu/enumBehavior.hpp | 2 +- menu/hiddenMenu.cpp | 2 +- menu/hiddenMenu.hpp | 2 +- menu/integerBehavior.cpp | 2 +- menu/integerBehavior.hpp | 2 +- menu/itemBehavior.cpp | 2 +- menu/itemBehavior.hpp | 2 +- menu/menu.cpp | 2 +- menu/menu.hpp | 2 +- menu/menuItem.cpp | 2 +- menu/menuItem.hpp | 2 +- menu/timeBehavior.cpp | 2 +- menu/timeBehavior.hpp | 2 +- ninjarope.cpp | 2 +- nobject.cpp | 2 +- nobject.hpp | 2 +- objectList.hpp | 2 +- rand.cpp | 2 +- rand.hpp | 2 +- reader.cpp | 2 +- reader.hpp | 2 +- rect.hpp | 2 +- replay.cpp | 2 +- replay.hpp | 2 +- sdlmain.cpp | 2 +- settings.cpp | 4 ++-- settings.hpp | 2 +- sfx.cpp | 2 +- sfx.hpp | 2 +- sobject.cpp | 2 +- sobject.hpp | 2 +- sys.cpp | 2 +- sys.hpp | 2 +- text.cpp | 2 +- text.hpp | 2 +- version.hpp | 2 +- viewport.cpp | 2 +- viewport.hpp | 2 +- weapon.cpp | 2 +- weapon.hpp | 2 +- weapsel.cpp | 2 +- weapsel.hpp | 2 +- worm.cpp | 2 +- worm.hpp | 2 +- 92 files changed, 93 insertions(+), 93 deletions(-) commit 35adfaa7c766c1f6498b1125946ebea49545c25b Author: Martin Erik Werner Date: Wed Apr 25 16:58:18 2012 +0200 gvl copyright tweak gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbbb4587c97eab4e9c78a9b90354b3242fe37f73 Author: Martin Erik Werner Date: Wed Apr 25 16:53:45 2012 +0200 GLobal add of copyright to remaining Gliptic+basro bobject.cpp | 26 ++++++++++++++++++++++++++ bobject.hpp | 26 ++++++++++++++++++++++++++ bonus.cpp | 26 ++++++++++++++++++++++++++ bonus.hpp | 26 ++++++++++++++++++++++++++ controller/commonController.cpp | 26 ++++++++++++++++++++++++++ controller/commonController.hpp | 26 ++++++++++++++++++++++++++ controller/controller.hpp | 26 ++++++++++++++++++++++++++ controller/localController.hpp | 26 ++++++++++++++++++++++++++ controller/replayController.cpp | 26 ++++++++++++++++++++++++++ controller/replayController.hpp | 26 ++++++++++++++++++++++++++ filesystem.cpp | 26 ++++++++++++++++++++++++++ filesystem.hpp | 26 ++++++++++++++++++++++++++ game.cpp | 26 ++++++++++++++++++++++++++ gfx/blit.cpp | 26 ++++++++++++++++++++++++++ gfx/blit.hpp | 26 ++++++++++++++++++++++++++ gfx/color.hpp | 26 ++++++++++++++++++++++++++ gfx/macros.hpp | 26 ++++++++++++++++++++++++++ gfx/palette.cpp | 26 ++++++++++++++++++++++++++ gfx/sprite.cpp | 26 ++++++++++++++++++++++++++ gfx/sprite.hpp | 26 ++++++++++++++++++++++++++ keys.cpp | 26 ++++++++++++++++++++++++++ keys.hpp | 26 ++++++++++++++++++++++++++ level.hpp | 26 ++++++++++++++++++++++++++ menu/arrayEnumBehavior.hpp | 26 ++++++++++++++++++++++++++ menu/booleanSwitchBehavior.cpp | 26 ++++++++++++++++++++++++++ menu/booleanSwitchBehavior.hpp | 26 ++++++++++++++++++++++++++ menu/enumBehavior.cpp | 26 ++++++++++++++++++++++++++ menu/enumBehavior.hpp | 26 ++++++++++++++++++++++++++ menu/hiddenMenu.cpp | 26 ++++++++++++++++++++++++++ menu/hiddenMenu.hpp | 26 ++++++++++++++++++++++++++ menu/integerBehavior.cpp | 26 ++++++++++++++++++++++++++ menu/integerBehavior.hpp | 26 ++++++++++++++++++++++++++ menu/itemBehavior.cpp | 26 ++++++++++++++++++++++++++ menu/itemBehavior.hpp | 26 ++++++++++++++++++++++++++ menu/menuItem.cpp | 26 ++++++++++++++++++++++++++ menu/menuItem.hpp | 26 ++++++++++++++++++++++++++ menu/timeBehavior.cpp | 26 ++++++++++++++++++++++++++ menu/timeBehavior.hpp | 26 ++++++++++++++++++++++++++ ninjarope.cpp | 26 ++++++++++++++++++++++++++ nobject.cpp | 26 ++++++++++++++++++++++++++ nobject.hpp | 26 ++++++++++++++++++++++++++ objectList.hpp | 26 ++++++++++++++++++++++++++ replay.cpp | 26 ++++++++++++++++++++++++++ replay.hpp | 26 ++++++++++++++++++++++++++ version.hpp | 26 ++++++++++++++++++++++++++ viewport.cpp | 26 ++++++++++++++++++++++++++ viewport.hpp | 26 ++++++++++++++++++++++++++ weapon.cpp | 26 ++++++++++++++++++++++++++ weapon.hpp | 26 ++++++++++++++++++++++++++ weapsel.cpp | 26 ++++++++++++++++++++++++++ weapsel.hpp | 26 ++++++++++++++++++++++++++ 51 files changed, 1326 insertions(+) commit df2066fe2992aa51441aef52ca2f0c61ae9ba916 Author: Martin Erik Werner Date: Wed Apr 25 16:47:38 2012 +0200 add missing copyright header math.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit ecd5808c85909b3072a1b3de935224abe7e3b345 Author: Martin Erik Werner Date: Wed Apr 25 16:41:59 2012 +0200 globally add copyright for Gliptic+basro+martin common.cpp | 27 +++++++++++++++++++++++++++ controller/localController.cpp | 27 +++++++++++++++++++++++++++ gfx.cpp | 27 +++++++++++++++++++++++++++ gfx/font.cpp | 27 +++++++++++++++++++++++++++ level.cpp | 27 +++++++++++++++++++++++++++ menu/menu.cpp | 27 +++++++++++++++++++++++++++ settings.cpp | 27 +++++++++++++++++++++++++++ worm.cpp | 27 +++++++++++++++++++++++++++ 8 files changed, 216 insertions(+) commit 22dfe997aae0ab541d577c1ee15139e804486fe4 Author: Martin Erik Werner Date: Wed Apr 25 16:39:09 2012 +0200 Add copyright headers for martin-only argParse.cpp | 25 +++++++++++++++++++++++++ argParse.hpp | 25 +++++++++++++++++++++++++ boostTesting.cpp | 25 +++++++++++++++++++++++++ configHelper.cpp | 25 +++++++++++++++++++++++++ configInit.cpp | 25 +++++++++++++++++++++++++ dataPath.cpp | 25 +++++++++++++++++++++++++ to_string.cpp | 25 +++++++++++++++++++++++++ 7 files changed, 175 insertions(+) commit b01c38846b54a4eacb0ef9ed782b7a97eceddf96 Author: Martin Erik Werner Date: Wed Apr 25 16:36:56 2012 +0200 Add copyright headers for martin + gliptic binReader.cpp | 26 ++++++++++++++++++++++++++ constants.cpp | 26 ++++++++++++++++++++++++++ main.cpp | 26 ++++++++++++++++++++++++++ math.cpp | 26 ++++++++++++++++++++++++++ reader.cpp | 26 ++++++++++++++++++++++++++ 5 files changed, 130 insertions(+) commit bb387b9eca789f348b302e7e53afe4a2bd37ad22 Author: Martin Erik Werner Date: Wed Apr 25 16:32:32 2012 +0200 Add copyright headers globally for Gliptic 2010 console.cpp | 25 +++++++++++++++++++++++++ console.hpp | 25 +++++++++++++++++++++++++ exactObjectList.hpp | 25 +++++++++++++++++++++++++ fastObjectList.hpp | 25 +++++++++++++++++++++++++ lfs.hpp | 25 +++++++++++++++++++++++++ rand.cpp | 25 +++++++++++++++++++++++++ rand.hpp | 25 +++++++++++++++++++++++++ rect.hpp | 25 +++++++++++++++++++++++++ sdlmain.cpp | 25 +++++++++++++++++++++++++ sfx.cpp | 25 +++++++++++++++++++++++++ sfx.hpp | 25 +++++++++++++++++++++++++ sobject.cpp | 25 +++++++++++++++++++++++++ sobject.hpp | 25 +++++++++++++++++++++++++ sys.cpp | 25 +++++++++++++++++++++++++ sys.hpp | 25 +++++++++++++++++++++++++ text.cpp | 25 +++++++++++++++++++++++++ text.hpp | 25 +++++++++++++++++++++++++ 17 files changed, 425 insertions(+) commit 05c1cd8766895dfdf3e2a5ed7ab4fb7af30306a0 Author: Martin Erik Werner Date: Wed Apr 25 16:31:38 2012 +0200 gvl: copyright headers gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d76a6256417dd08b513613835cdac11b10dbb9c Author: Martin Erik Werner Date: Wed Apr 25 15:08:40 2012 +0200 purge crlf and whitespace lierolibre-globally .hgignore | 8 +- bobject.cpp | 128 +- bobject.hpp | 44 +- bonus.cpp | 74 +- bonus.hpp | 54 +- console.cpp | 446 +++--- console.hpp | 76 +- controller/commonController.cpp | 92 +- controller/commonController.hpp | 32 +- controller/controller.hpp | 76 +- controller/localController.cpp | 564 +++---- controller/localController.hpp | 110 +- controller/replayController.cpp | 340 ++--- controller/replayController.hpp | 106 +- exactObjectList.hpp | 360 ++--- fastObjectList.hpp | 252 ++-- filesystem.cpp | 716 ++++----- filesystem.hpp | 156 +- gfx/blit.cpp | 978 ++++++------ gfx/blit.hpp | 76 +- gfx/color.hpp | 12 +- gfx/macros.hpp | 350 ++--- gfx/sprite.cpp | 104 +- gfx/sprite.hpp | 52 +- keys.cpp | 252 ++-- keys.hpp | 64 +- level.cpp | 568 +++---- level.hpp | 154 +- lfs.hpp | 156 +- menu/arrayEnumBehavior.hpp | 60 +- menu/booleanSwitchBehavior.cpp | 68 +- menu/booleanSwitchBehavior.hpp | 48 +- menu/enumBehavior.cpp | 98 +- menu/enumBehavior.hpp | 64 +- menu/hiddenMenu.cpp | 172 +-- menu/hiddenMenu.hpp | 62 +- menu/integerBehavior.cpp | 114 +- menu/integerBehavior.hpp | 64 +- menu/itemBehavior.cpp | 6 +- menu/itemBehavior.hpp | 46 +- menu/menuItem.cpp | 78 +- menu/menuItem.hpp | 68 +- menu/timeBehavior.cpp | 28 +- menu/timeBehavior.hpp | 40 +- ninjarope.cpp | 246 +-- nobject.cpp | 746 +++++----- nobject.hpp | 120 +- objectList.hpp | 334 ++--- rand.hpp | 20 +- rect.hpp | 42 +- replay.cpp | 1330 ++++++++--------- replay.hpp | 222 +-- sdlmain.cpp | 2 +- sfx.cpp | 304 ++-- sfx.hpp | 176 +-- sobject.cpp | 546 +++---- sobject.hpp | 82 +- sys.cpp | 38 +- sys.hpp | 30 +- text.cpp | 164 +- text.hpp | 70 +- version.hpp | 12 +- viewport.hpp | 164 +- weapon.cpp | 884 +++++------ weapon.hpp | 192 +-- weapsel.cpp | 1096 +++++++------- weapsel.hpp | 62 +- worm.cpp | 3132 +++++++++++++++++++-------------------- 68 files changed, 8715 insertions(+), 8715 deletions(-) commit d63cb4750fca7c9475254227de61423013e6dd53 Author: Martin Erik Werner Date: Wed Apr 25 15:07:36 2012 +0200 gvl: update module with whitespace purge gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97ad2ee5556845de8b34d296033861366788d583 Author: Martin Erik Werner Date: Wed Apr 25 14:53:55 2012 +0200 omit a probably redundant null check viewport.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit ea92788ab94ed74cdb7bc2797c031d5d871523f1 Author: Martin Erik Werner Date: Wed Apr 25 14:23:27 2012 +0200 viewport.cpp whitespace viewport.cpp | 184 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 92 insertions(+), 92 deletions(-) commit f52b8dc2802b1e5e58d96109e24ec5fef2ed98f3 Author: Martin Erik Werner Date: Wed Apr 25 13:41:18 2012 +0200 Check for tut headers and just do a notice if the don't exist Embedded libtut was removed from gvl, however it is only required for gvltest configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) commit 8a0c3320caee21b5751b2154da823d06e755e700 Author: Martin Erik Werner Date: Wed Apr 25 13:41:02 2012 +0200 update gvl with removal of zlib & libpcl gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e10d484e8a9d233df349849ed6179c720fdb020 Author: Martin Erik Werner Date: Wed Apr 25 13:40:12 2012 +0200 Update copyright infor with removal of zlib & libpcl COPYING | 15 --------------- 1 file changed, 15 deletions(-) commit a409cc9a8d0acd715498f1f3eb0645ba4e1aaf94 Author: Martin Erik Werner Date: Wed Apr 25 13:19:12 2012 +0200 Copy in sdl.m4 during autoreconf step instead of keeping it in VCS autogen.sh | 4 ++ m4/sdl.m4 | 208 ------------------------------------------------------------ 2 files changed, 4 insertions(+), 208 deletions(-) commit 16a0afd65d9ba251617e126ea6a9f4ab135d0ab9 Author: Martin Erik Werner Date: Wed Apr 25 12:10:11 2012 +0200 Info about new resolution features in NEWS NEWS | 5 +++++ 1 file changed, 5 insertions(+) commit e8255a00b0765847eb702cd8d15ea7252a3093ae Author: Martin Erik Werner Date: Wed Apr 25 12:01:25 2012 +0200 Add F7 for x3, F8 for x4 scaling gfx.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit f1defa0f3dea0fc6b6e33f7793b00193190db5c3 Author: Martin Erik Werner Date: Wed Apr 25 12:00:14 2012 +0200 change default screen height 480 -> 400, (200*n) gfx.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d3f134e730d20673a4956e34bfd595f639dfc058 Author: Martin Erik Werner Date: Wed Apr 25 11:55:57 2012 +0200 Reset resolution if not fullscreen, instead of if gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f40401a1d3af3ba8d6fde27be26e94fd3028a2af Author: Martin Erik Werner Date: Wed Apr 25 11:51:36 2012 +0200 Try max resolution given by SDL for fullscreen first gfx.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 06c3757214e4f08614a6413ad3e14472a5918a7f Author: Martin Erik Werner Date: Wed Apr 25 11:46:44 2012 +0200 main: lower default screen resolution to 640x400 Since the Nearest scaling filter in the game only supports exact multiples of 320x200 (everything else just becomes a black border) 640x400 seems to be the safest and nicest default resolution. main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 18d4e2c2fa76f7616ac98a267010cf054a881fe9 Author: Martin Erik Werner Date: Wed Apr 25 10:51:08 2012 +0200 settings: crlf, whitespace, license headers settings.cpp | 353 ++++++++++++++++--------------- settings.hpp | 651 ++++++++++++++++++++++++++++++---------------------------- 2 files changed, 529 insertions(+), 475 deletions(-) commit 3788a8b80ac17e80fe0da60c8d5daae33248c949 Author: Martin Erik Werner Date: Wed Apr 25 02:33:49 2012 +0200 Ugly try-catch to make SDL_QUIT do something gfx.cpp | 1 + main.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 27edf4c37e1a05cdf2262cc4b153d7848411e001 Author: Martin Erik Werner Date: Wed Apr 25 00:21:39 2012 +0200 Ugly hack in main to initialize game at 800x500 main.cpp | 2 ++ 1 file changed, 2 insertions(+) commit f2ce5fc4522f0c98798e9ea10a73a66e09e19f75 Author: Martin Erik Werner Date: Tue Apr 24 23:27:00 2012 +0200 Added history from Liero OpenLiero and LIERO to NEWS NEWS | 300 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 300 insertions(+) commit e0c08681fb9f26aa551f8e111fa96965ab76f0d6 Author: Martin Erik Werner Date: Tue Apr 24 22:58:36 2012 +0200 Add a configure var for window caption and use in gfx.cpp configure.ac | 4 ++++ gfx.cpp | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 78d478795d2622895393991107d2cda491c65495 Author: Martin Erik Werner Date: Tue Apr 24 22:27:28 2012 +0200 Dump "git log --stat" to changelog ChangeLog | 4069 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 4068 insertions(+), 1 deletion(-) commit cc01f9d8c11f8d13a3023550db250dd5f4581ced Author: Martin Erik Werner Date: Tue Apr 24 22:13:15 2012 +0200 NEWS: Update and simplify NEWS | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit b7567dd16d0bdc7a636df4341598fa531020ef52 Author: Martin Erik Werner Date: Tue Apr 24 21:13:37 2012 +0200 main: fixup configInit initialisation main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 50baa1ff635a583a594a11e120ee9c5531217c3f Author: Martin Erik Werner Date: Tue Apr 24 21:11:16 2012 +0200 main: typo wm->vm main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a017f91baeb38c952bbcaeffc132f097fe4805c6 Author: Martin Erik Werner Date: Tue Apr 24 20:54:43 2012 +0200 main: unneded type spec main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54615743af60dcc33026d2ff2c22f69ad7c09fdd Author: Martin Erik Werner Date: Tue Apr 24 20:46:12 2012 +0200 configInit: use setLieroPath() only setLieroPath gives us a cfg, but we can ignore it when appropriate, hence there is no need to call anything else. (EXE is never gathered by dataPath since it must be specified manually). Turns out we don't need to modify reader after all configInit.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 31104bdabca5e12fd5ebd612a3ec8d70e15d9b46 Author: Martin Erik Werner Date: Tue Apr 24 20:34:14 2012 +0200 configInit: Add possible separation of path and inputfile ConfigInit can now be constructed with dirPath argument, allowing separation of where to find game data and game vars. Needs work in reader for support. configInit.cpp | 20 ++++++++++++++++++-- configInit.hpp | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) commit 567d29ee4f400444fd0e43290c73158fb54f5b96 Author: Martin Erik Werner Date: Tue Apr 24 19:44:40 2012 +0200 main: call ConfigInit with inputDir as well main.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 215500cac6084f3e34f7528b2491c57258124adc Author: Martin Erik Werner Date: Tue Apr 24 19:27:11 2012 +0200 NEWS: reword and update NEWS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 86019e13240b757cb08b121f4108417fe977658d Author: Martin Erik Werner Date: Tue Apr 24 19:24:54 2012 +0200 main: don't set default outfile, and drop cfgWriteSet flag main.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 6a7db1cd5161e4b4b947eeb3cd0eddaa7f988be5 Author: Martin Erik Werner Date: Tue Apr 24 19:17:07 2012 +0200 main: Add and assign inputdir var main.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 08244478c5b554841636e06fbc20e13ffe104a35 Author: Martin Erik Werner Date: Tue Apr 24 19:13:25 2012 +0200 argParse.cpp: add --dir option * Add command line --dir option for specific loading of sound/graphics/names * Change so that positional parameters assign 1:inputfile 2:inputdir 3:outputfile argParse.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7d97fa02f7d8a413044b5b54b42e26425dda6988 Author: Martin Erik Werner Date: Tue Apr 24 18:56:18 2012 +0200 Update gvl submodule with removal of dtoa gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7fdaec72baac525280e1ad86c87c3e244c3b0a2 Author: Martin Erik Werner Date: Tue Apr 24 18:54:42 2012 +0200 Makefile.am: deinclude dtoa.* and gvl/zlib Makefile.am | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) commit df3119003a9303fb7a43b77e5e7a4995194979d9 Author: Martin Erik Werner Date: Tue Apr 24 18:54:34 2012 +0200 Makefile.am: add argParse to sources Makefile.am | 2 ++ 1 file changed, 2 insertions(+) commit 3c5bddba7d13bc5525059de39c8160e214d4b177 Author: Martin Erik Werner Date: Tue Apr 24 18:53:58 2012 +0200 Makefile.am:link with boost_program_options Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e14ae30a2064f6dc3f6feb50cdb879bdaedb91c Author: Martin Erik Werner Date: Tue Apr 24 18:52:04 2012 +0200 configure.ac: add simple header check for boost_program_options configure.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 8b836086d3be42bdbcb6a1342ffb1d050979004f Author: Martin Erik Werner Date: Tue Apr 24 18:51:04 2012 +0200 argParse: no need to define dynamic boost linking, drop config.h argParse.hpp | 1 + 1 file changed, 1 insertion(+) commit 0030c9f6a8c98bcb7fcc2b92c24098184e51efbb Author: Martin Erik Werner Date: Tue Apr 24 17:26:00 2012 +0200 NEWS: 0.2 with argument parsing NEWS | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7dc0cc1b674124b08421f67a3ddcd131cc6c3999 Author: Martin Erik Werner Date: Tue Apr 24 16:23:46 2012 +0200 set version 0.2 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 738fbd2774728ca91b7c367f85a7b6a5b840b99c Author: Martin Erik Werner Date: Tue Apr 24 16:17:15 2012 +0200 main.cpp: add help option; coding style fixes main.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit ba287347a6ec2f33a5bea0a8ec31a2adabf9809d Author: Martin Erik Werner Date: Tue Apr 24 16:15:57 2012 +0200 configInit: 3 cases, EXE, CFG or path configInit.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 9ac58a67caccf0a96794792308b5c8affc2cbcd2 Author: Martin Erik Werner Date: Tue Apr 24 16:14:38 2012 +0200 reader: Add setLieroCFG() method, forcing to read from given CFG reader.cpp | 14 ++++++++++++++ reader.hpp | 1 + 2 files changed, 15 insertions(+) commit b9ad08fbcc191b4052c11cc9026060c486995205 Author: Martin Erik Werner Date: Tue Apr 24 16:13:57 2012 +0200 argParse: use wm store compatibel with positional parameters argParse.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d5038cbae1b609f2bde216d60a5a1581f7cf4ebe Author: Martin Erik Werner Date: Tue Apr 24 16:13:26 2012 +0200 argParse: make desc outside-accessible argParse.cpp | 1 - argParse.hpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 741718c6625f8104c45ac152dea5e023aeda6aa0 Author: Martin Erik Werner Date: Tue Apr 24 16:12:57 2012 +0200 argParse: add help argParse.cpp | 1 + 1 file changed, 1 insertion(+) commit a1762ec0872a104026f9932a3ddcc3a2661e859b Author: Martin Erik Werner Date: Tue Apr 24 14:12:29 2012 +0200 Inplements argParse via boost Jamfile | 3 ++- argParse.cpp | 24 ++++++++++++++++++++++++ argParse.hpp | 13 +++++++++++++ main.cpp | 54 +++++++++++++++++------------------------------------- 4 files changed, 56 insertions(+), 38 deletions(-) commit 917fe385ac41af2f08080706a3b54206a6afb573 (tag: lierolibre-0.1) Author: Martin Erik Werner Date: Mon Apr 23 16:44:51 2012 +0200 update data submodule, tweak desktop file data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1679e60c223b10f3b87f965e19581fa35e337fa0 Author: Martin Erik Werner Date: Mon Apr 23 16:42:37 2012 +0200 configure.ac: Add more checks based on autoscan and restructure configure.ac | 68 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 17 deletions(-) commit 83041784d506c39a319772f4521ec79944478cf5 Author: Martin Erik Werner Date: Mon Apr 23 15:31:52 2012 +0200 Set April as release month NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0163227ff830422daa1a58951f382f89c582e0a Author: Martin Erik Werner Date: Mon Apr 23 15:08:12 2012 +0200 dataPath: change ~/.liero -> ~/.lierolibre boostTesting.cpp | 2 +- dataPath.cpp | 2 +- dataPath.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 55f744fe45e5374a9c2e2e778f1e644ab716dc45 Author: Martin Erik Werner Date: Mon Apr 23 14:45:03 2012 +0200 safeguard icon and desktop dir from datadir change Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d0e07b6c87321f3331f43e3c36a02e5540ea1dc Author: Martin Erik Werner Date: Mon Apr 23 14:07:49 2012 +0200 some libreliero misses README | 2 +- man/lierolibre.6.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 706f07ee2194f80e14d6e0fea936c53dea406135 Author: Martin Erik Werner Date: Mon Apr 23 13:54:27 2012 +0200 Makefile.am: extra \ Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2da5c879128a0912c003fee1734886e6a7665f5a Author: Martin Erik Werner Date: Mon Apr 23 13:52:53 2012 +0200 update data module, removal of exe files data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e618a347559189ec8d7d0ba51d67f2ed445ca898 Author: Martin Erik Werner Date: Mon Apr 23 13:45:31 2012 +0200 Makefile.am: include original text files Makefile.am | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9d8d47c7265788c6b7bef75187db4a619d883f18 Author: Martin Erik Werner Date: Mon Apr 23 13:44:26 2012 +0200 COPYING: note that freeware license doesn't apply COPYING | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 73f9cffbe9c5fcf1fbbec507790f37f61f071793 Author: Martin Erik Werner Date: Mon Apr 23 13:15:22 2012 +0200 README: slight rewording README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c1d70f8d5f4b45ed1250eaab0b299715fe746c8c Author: Martin Erik Werner Date: Mon Apr 23 12:16:03 2012 +0200 COPYING: add text for LGPL COPYING | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) commit edd13f2a86e3e23a080f145fd61a0dad58746f9d Author: Martin Erik Werner Date: Mon Apr 23 01:37:13 2012 +0200 configure.ac: Add checks for SoX & ImageMagick configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 91d607a3c83fce2e5ce4bcbd0813a3d7d6127586 Author: Martin Erik Werner Date: Mon Apr 23 01:36:38 2012 +0200 autogen.sh add action autogen.sh | 3 +++ 1 file changed, 3 insertions(+) commit 1e2175d1259b26847bdd3ed07ba41417b9f7ac3f Author: Martin Erik Werner Date: Mon Apr 23 00:47:07 2012 +0200 INSTALL: remove since generated INSTALL | 370 --------------------------------------------------------------- 1 file changed, 370 deletions(-) commit a1d8d571125735fac5583e39849fea6131f1255c Author: Martin Erik Werner Date: Mon Apr 23 00:45:22 2012 +0200 Makefile.am: fix missing \ in list Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d906113f2d35d65233c9dc02af4b38dc9159a15 Author: Martin Erik Werner Date: Mon Apr 23 00:44:58 2012 +0200 Makefile.am: fix gvl/libgvl.la unsubstitution Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7bfe1568878aee50c6144d1d06669c365f31516d Author: Martin Erik Werner Date: Mon Apr 23 00:40:52 2012 +0200 Update data submodule with icons & desktop entry data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7763925e1598fae1d2bbac22d9b7f7babe9567c1 Author: Martin Erik Werner Date: Mon Apr 23 00:38:40 2012 +0200 Makefile.am: reorganise, add icons Makefile.am | 79 ++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 34 deletions(-) commit 25e6d04ba96edfcdf1550cb863fd908def977b4f Author: Martin Erik Werner Date: Sun Apr 22 23:04:16 2012 +0200 Makefile.am: cleanups, use variables for targets Makefile.am | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 9252a4433211234ec5545af923d0b138a6836943 Author: Martin Erik Werner Date: Sun Apr 22 22:33:42 2012 +0200 man/lierolibre-packsounds.6.am: tweak file list formatting man/lierolibre-packsounds.6.am | 1 + 1 file changed, 1 insertion(+) commit 816bb0a23ec311b064db26efd4cef3e38403232e Author: Martin Erik Werner Date: Sun Apr 22 22:30:58 2012 +0200 Makefile.am: make target and install macros for manpages Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5f94f5502d6dd89c749577683036025184ee5cdc Author: Martin Erik Werner Date: Sun Apr 22 22:23:01 2012 +0200 cripts/lierolibre-extractsounds: tweak description scripts/lierolibre-extractsounds | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 858098a344e34bd6c2b1d4f0dee27e472c4adadd Author: Martin Erik Werner Date: Sun Apr 22 22:20:40 2012 +0200 Makefile.am & lierolibre.am: unify sedding Makefile.am | 9 +++++---- scripts/lierolibre.am | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) commit 64c6cb7a20f20b5998cfd039b895514729f92ca6 Author: Martin Erik Werner Date: Sun Apr 22 22:19:35 2012 +0200 Add manpages for all scripts, tweak ll page to conform man/lierolibre-extractgfx.6.am | 57 ++++++++++++++++++++++++++++++++++++ man/lierolibre-extractlev.6.am | 52 +++++++++++++++++++++++++++++++++ man/lierolibre-extractsounds.6.am | 58 +++++++++++++++++++++++++++++++++++++ man/lierolibre-packgfx.6.am | 54 ++++++++++++++++++++++++++++++++++ man/lierolibre-packlev.6.am | 52 +++++++++++++++++++++++++++++++++ man/lierolibre-packsounds.6.am | 53 +++++++++++++++++++++++++++++++++ man/lierolibre.6.am | 4 +-- 7 files changed, 328 insertions(+), 2 deletions(-) commit 1f48db430c6b50317dd480121ff2b472d5420136 Author: Martin Erik Werner Date: Sun Apr 22 21:01:31 2012 +0200 rename doc/ -> man/ Makefile.am | 40 +++++++++-------- doc/lierolibre.6.am | 120 --------------------------------------------------- man/lierolibre.6.am | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+), 139 deletions(-) commit d64d4cdcea2a478079e940016814c56091b7406e Author: Martin Erik Werner Date: Sun Apr 22 19:03:31 2012 +0200 README: Add some content README | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 511f23ca5d2a35c10f272b11b45bc06fb4f54dc9 Author: Martin Erik Werner Date: Sun Apr 22 19:02:23 2012 +0200 Makefile.am: add manpages, including prospective Makefile.am | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) commit ee07cadcf49e1caf2fa842279ffcb954dad674ee Author: Martin Erik Werner Date: Sun Apr 22 19:01:50 2012 +0200 doc/lierolibre.6.am: add template manpage doc/lierolibre.6.am | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) commit a5b365711817179e00a69f166c924aa05c41e749 Author: Martin Erik Werner Date: Sun Apr 22 17:14:25 2012 +0200 Makefile.am: fix subdir rules to not make twice Makefile.am | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 2c1e264fc8e69e4aec8ec25fc202d3218735ac4d Author: Martin Erik Werner Date: Sun Apr 22 16:22:24 2012 +0200 Makefile.am: include NAMES.DAT & install docs Makefile.am | 7 +++++++ 1 file changed, 7 insertions(+) commit e9eb10be0a55c92e5cbbac51f33e3701e0b28114 Author: Martin Erik Werner Date: Sun Apr 22 16:19:54 2012 +0200 COPYING: clarify GPL or BSD for autotools COPYING | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8a7e59fcd6670020935541e8d35504fa1b2d5c1a Author: Martin Erik Werner Date: Sun Apr 22 16:00:18 2012 +0200 AUTHORS: undummyfy AUTHORS | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 65977c2873c79316c35165f3e463a638087410a1 Author: Martin Erik Werner Date: Sun Apr 22 15:46:09 2012 +0200 COPYING: Add basro's real name and Joosa's alias COPYING | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2b3270e02d6f28358420d57665f573a6f341f503 Author: Martin Erik Werner Date: Sun Apr 22 15:38:04 2012 +0200 COPYING: fix cfg and scripts path, set (C) years for FSF COPYING | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 927e102bbdd337f46d2019e6a7d7f904ed95ec52 Author: Martin Erik Werner Date: Sun Apr 22 15:21:11 2012 +0200 Update with autotools copyrights COPYING | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 06e44cd3486345f352c4b093ca41eac82c124d88 Author: Martin Erik Werner Date: Sun Apr 22 12:00:50 2012 +0200 scripts/lierolibre.am: Finalize scripts/lierolibre.am | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit d3c83de4c494b8fc24d7389d91ecc81deee115f2 Author: Martin Erik Werner Date: Sun Apr 22 12:00:08 2012 +0200 m4/sdl.m4: Update copyright notice somewhat m4/sdl.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aba41676516e3a65523be644c765931e84367b45 Author: Martin Erik Werner Date: Sun Apr 22 03:32:14 2012 +0200 Makefile.am: fixup subdirs in data & libexec Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1cc23a186dc371814b9dee38eb40a980cd372268 (autotools) Author: Martin Erik Werner Date: Sun Apr 22 03:18:28 2012 +0200 Update data module: script update and move data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28d24cb3c3b69a636053bfc0b03e3a20bd641549 Author: Martin Erik Werner Date: Sun Apr 22 03:14:08 2012 +0200 Makefile.am: Add data and scripts Makefile.am | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 5 deletions(-) commit 4e60875058e42f3ab318dd8c7cfc7c21d07e2975 Author: Martin Erik Werner Date: Sun Apr 22 03:11:46 2012 +0200 configure.ac: drop no-define in automake init configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 862766df52b0f0158333a0780e50759b14e7732d Author: Martin Erik Werner Date: Sun Apr 22 03:10:38 2012 +0200 scripts/lierolibre.am: Don't use @, collides with automake scripts/lierolibre.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e149b82ceaad1fce64677c410d83718c9685d7de Author: Martin Erik Werner Date: Sun Apr 22 03:07:58 2012 +0200 Dummy AUTHORS & ChangeLog, set version in NEWS AUTHORS | 1 + ChangeLog | 1 + NEWS | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) commit 9f5dbd00a19cf37ab004078383e9fcc577e74dfe Author: Martin Erik Werner Date: Sun Apr 22 02:16:31 2012 +0200 New wrappers script template, hopefully working scripts/lierolibre.am | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 385bc03609548828a5446906f8c6b4dc0fe403a2 Author: Martin Erik Werner Date: Sun Apr 22 01:31:25 2012 +0200 move scripts to this repo from data scripts/lierolibre-extractgfx | 89 ++++++++++++++++++++ scripts/lierolibre-extractlev | 62 ++++++++++++++ scripts/lierolibre-extractsounds | 102 +++++++++++++++++++++++ scripts/lierolibre-packgfx | 149 +++++++++++++++++++++++++++++++++ scripts/lierolibre-packlev | 59 +++++++++++++ scripts/lierolibre-packsounds | 169 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 630 insertions(+) commit e230efbfbba36f54c2ff797347f9cfd481b330b4 Author: Martin Erik Werner Date: Sat Apr 21 21:34:13 2012 +0200 autotools: more file inclusions, likely excessive Makefile.am | 262 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 236 insertions(+), 26 deletions(-) commit bf9b6520470b6fc6ef7fa8707cb439347cab2eb1 Author: Martin Erik Werner Date: Sat Apr 21 20:54:41 2012 +0200 Further autotools tweaking, add libtool again Should only be file listings and install spec left now Makefile.am | 417 ++++++++++++++++++++++++++++++++++++---------------------- configure.ac | 8 +- 2 files changed, 264 insertions(+), 161 deletions(-) commit 2c9c8fb7a105b7f5455493ac45a73e2563d7284c Author: Martin Erik Werner Date: Sat Apr 21 13:27:54 2012 +0200 autotools: remove boost and libtool configure.ac | 7 - m4/boost.m4 | 1186 ---------------------------------------------------------- 2 files changed, 1193 deletions(-) commit a26db6a1a6bf359997e3f3aa5b3f9e02f56bc44e Author: Martin Erik Werner Date: Mon Apr 16 20:19:42 2012 +0200 gvl in a subdir for autotools Makefile.am | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- configure.ac | 19 +++++--- 2 files changed, 151 insertions(+), 16 deletions(-) commit b38cf128082f06e0d82bfdf65c9424a849500071 Author: Martin Erik Werner Date: Mon Apr 16 19:40:55 2012 +0200 Add some more auto-hell INSTALL | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 9 +- configure.ac | 11 +- 3 files changed, 382 insertions(+), 8 deletions(-) commit 477949048f0e5468a9462309d90b968b617795a4 Author: Martin Erik Werner Date: Mon Apr 16 16:58:17 2012 +0200 Add autoconf/automake stuff Makefile.am | 46 +++ configure.ac | 35 ++ m4/boost.m4 | 1186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ m4/sdl.m4 | 208 ++++++++++ 4 files changed, 1475 insertions(+) commit 2af4b8ff6642ddc9775550dc322c435774af4041 Author: Martin Erik Werner Date: Sat Apr 21 10:58:05 2012 +0200 Update data submodule: icon, move cfg file to data data | 2 +- liero.cfg | 6040 ------------------------------------------------------------- 2 files changed, 1 insertion(+), 6041 deletions(-) commit 1ef4a917817870d7132239fcdd5dcd32e67d870a Author: Martin Erik Werner Date: Fri Apr 20 20:06:34 2012 +0200 more updates and lowercasing to lierolibre COPYING | 4 ++-- NEWS | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit b44566325127ee6d2824bd84c558469bb269c280 Author: Martin Erik Werner Date: Fri Apr 20 20:00:44 2012 +0200 Updated gitmodules with lierolibre urls .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 92636a844ebbc1f7709332950fd843b330de0d29 Author: Martin Erik Werner Date: Fri Apr 20 18:28:46 2012 +0200 Rename to LieroLibre COPYING | 2 +- Jamfile | 8 ++++---- NEWS | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) commit 9c4bd49636d340c0282f8c19980855f9702349b2 Author: Martin Erik Werner Date: Fri Apr 20 18:27:27 2012 +0200 delete before creating data_path as a sanity precaution reader.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 3e10b2b920531a1c636f054bdc1bbc7a20d1a357 Author: Martin Erik Werner Date: Fri Apr 20 16:05:16 2012 +0200 move cfg to $HOME similar to DAT configInit.cpp | 4 ++-- reader.cpp | 2 ++ reader.hpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) commit f4e0ddcb5d011f0d9272a76454eee7d2b2e0022e Author: Martin Erik Werner Date: Fri Apr 20 15:22:18 2012 +0200 Update the boost test case to handle both DAT and liero.cfg boostTesting.cpp | 223 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 116 insertions(+), 107 deletions(-) commit 12074163883189b5783c8bebc84ce3c4bd7fb95e Author: Martin Erik Werner Date: Fri Apr 20 15:22:00 2012 +0200 dataPath: change config.ini to liero.cfg in acces map dataPath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a0b1f42284bf139ad3a1c82d6eb0756525e8ddb Author: Martin Erik Werner Date: Thu Apr 19 19:39:42 2012 +0200 make submodule adresses public git:// .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit afd87c1fd6a8022d96f7d01123c2b0fd128635f5 Author: Martin Erik Werner Date: Thu Apr 19 19:04:00 2012 +0200 enable starting without even empty EXE file configInit.cpp | 8 ++++++-- reader.cpp | 9 +++++++-- reader.hpp | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) commit 3b24e74bff263147df4e8e47aa55279e9775bbaa Author: Martin Erik Werner Date: Thu Apr 19 19:02:40 2012 +0200 Improve file finding from arguments * arg1 is input file * output set via "-w file" * input defaults to "./liero.cfg" * output defaults to "new_liero.cfg" * exe/cfg determined from input file * readonly dir is set based on input file main.cpp | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit 9ff6eab5966f1a34e14df187c54ee8c9ac2e3379 Author: Martin Erik Werner Date: Thu Apr 19 19:11:11 2012 +0200 Revert "Improve file finding from arguments" This reverts commit e3d7cc84908f335496b0d8a7a07cdc2655d10200. Re-do commits in a cleaner way configInit.cpp | 8 ++------ main.cpp | 31 +++++++++++++++++++------------ 2 files changed, 21 insertions(+), 18 deletions(-) commit e3d7cc84908f335496b0d8a7a07cdc2655d10200 Author: Martin Erik Werner Date: Thu Apr 19 15:13:41 2012 +0200 Improve file finding from arguments * arg1 is input file, arg2 is output * input defaults to "./liero.cfg" * output defaults to "new_liero.cfg" * exe/cfg determined from input file * readonly dir is set based on input file configInit.cpp | 8 ++++++-- main.cpp | 31 ++++++++++++------------------- 2 files changed, 18 insertions(+), 21 deletions(-) commit a7298f0e6409eb2f1e36b97628d359a3ae4f71cc Author: Martin Erik Werner Date: Thu Apr 19 15:13:33 2012 +0200 main.cpp: ifdef some more "press any key" main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 420e1e790fd73da2cf8d9d6f46c71eaa87d6c87c Author: Martin Erik Werner Date: Thu Apr 19 14:29:54 2012 +0200 game.hpp: add copyright header game.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit e6a30d851b45fb75744de3406cbf9bc9ce6e1187 Author: Martin Erik Werner Date: Thu Apr 19 14:26:47 2012 +0200 game: purge crlf & witespace game.cpp | 126 +++++++++++++++++++++++------------------------ game.hpp | 166 +++++++++++++++++++++++++++++++------------------------------- 2 files changed, 146 insertions(+), 146 deletions(-) commit 28c67b9cba969c4875a7f2e2c25779a3f1d90d6b Author: Martin Erik Werner Date: Thu Apr 19 14:25:12 2012 +0200 game.cpp: remove some superfluous includes game.cpp | 9 --------- 1 file changed, 9 deletions(-) commit 478e47f61533c8a8a73103f8b8cd476f97f52c99 Author: Martin Erik Werner Date: Thu Apr 19 13:58:38 2012 +0200 remove boost filesystem lib and use existing liero version Jamfile | 4 ++-- configInit.cpp | 17 ++++++----------- configInit.hpp | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) commit aa87ec9717df94d667d1f095b4c11117bc022ca5 Author: Martin Erik Werner Date: Wed Apr 18 22:44:59 2012 +0200 Prettify copyright headers binReader.hpp | 48 ++++++++++++++-------------- boostTesting.cpp | 51 +++++++++++++++--------------- common.hpp | 50 +++++++++++++++--------------- configHelper.hpp | 44 +++++++++++++------------- configInit.hpp | 46 +++++++++++++-------------- constants.hpp | 48 ++++++++++++++-------------- dataPath.hpp | 91 ++++++++++++++++++++++++++---------------------------- gfx.hpp | 50 +++++++++++++++--------------- gfx/font.hpp | 50 +++++++++++++++--------------- gfx/palette.hpp | 50 +++++++++++++++--------------- menu/menu.hpp | 50 +++++++++++++++--------------- reader.hpp | 48 ++++++++++++++-------------- worm.hpp | 50 +++++++++++++++--------------- 13 files changed, 337 insertions(+), 339 deletions(-) commit 960cee54b48398f88f7759f496b0a465b0e2e1d0 Author: Martin Erik Werner Date: Wed Apr 18 22:24:28 2012 +0200 to_string: add exception throwing to_string.cpp | 10 ++++++---- to_string.hpp | 12 +++++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) commit 7ad5438020dadd2772ee4614d5e395d342f8c205 Author: Martin Erik Werner Date: Wed Apr 18 18:34:07 2012 +0200 to_string.hpp: add copyright header and comment to_string.hpp | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit 687654a9c3fa8922db0e8c74c40d8ef7c91ee42c Author: Martin Erik Werner Date: Wed Apr 18 18:08:18 2012 +0200 worm.hpp: add copyright header worm.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 83f630ff27b80b41be836a318479d725f911801e Author: Martin Erik Werner Date: Wed Apr 18 18:06:32 2012 +0200 worm.hpp: purge crlf & witespace worm.hpp | 844 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 422 insertions(+), 422 deletions(-) commit 2868b590c6590d46e7cfe8551c4802fcf5fb58de Author: Martin Erik Werner Date: Wed Apr 18 02:47:57 2012 +0200 Fixed compiler warning by casting a 1 to unsigned gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0555e6c8bd4e35865ba37c9cd5e588b305703f35 Author: Martin Erik Werner Date: Wed Apr 18 00:42:36 2012 +0200 Added NEWS file NEWS | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 1045cb5558902353984ee92573ab6b46daf8d01e Author: Martin Erik Werner Date: Tue Apr 17 22:43:34 2012 +0200 COPYING: added _build dir COPYING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e5d4985967d8b3ddd3515c684332842c015701e Author: Martin Erik Werner Date: Tue Apr 17 22:35:16 2012 +0200 Update gvl submodule: dump fdlibm gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa5d6f80470c05fba32f7225968136feac4ba955 Author: Martin Erik Werner Date: Tue Apr 17 22:33:54 2012 +0200 COPYING: Add more details for gvl submodule COPYING | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 4 deletions(-) commit 068a8fd01d9f57bc54a06872f8eebe8a63830bff Author: Martin Erik Werner Date: Tue Apr 17 22:12:22 2012 +0200 Add COPYING file with exhaustive copyright information COPYING | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) commit cb7c6924ce21af628836b63c55bc6dc5d3dc4e74 Author: Martin Erik Werner Date: Tue Apr 17 17:07:23 2012 +0200 Update gvl submodule, no-change gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a09c193629504cb9e99539522bc180ee02f2444 Author: Martin Erik Werner Date: Tue Apr 17 17:00:19 2012 +0200 Revert autotools completely Let's stuff this in a branch for now, might not use it at all Revert "gvl in a subdir for autotools" This reverts commit 93e97f449361d26e09a64c8d01da4e5950d6c48b. Revert "Add some more auto-hell" This reverts commit f11fe1657a14469fd3d59b55c9033088233215fb. Revert "Add autoconf/automake stuff" This reverts commit d35ced0df270debf099f6f4971b761b613d70fce. INSTALL | 370 ------------------ Makefile.am | 177 --------- configure.ac | 43 --- m4/boost.m4 | 1186 ---------------------------------------------------------- m4/sdl.m4 | 208 ---------- 5 files changed, 1984 deletions(-) commit 93e97f449361d26e09a64c8d01da4e5950d6c48b Author: Martin Erik Werner Date: Mon Apr 16 20:19:42 2012 +0200 gvl in a subdir for autotools Makefile.am | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- configure.ac | 19 +++++--- 2 files changed, 151 insertions(+), 16 deletions(-) commit f11fe1657a14469fd3d59b55c9033088233215fb Author: Martin Erik Werner Date: Mon Apr 16 19:40:55 2012 +0200 Add some more auto-hell INSTALL | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 9 +- configure.ac | 11 +- 3 files changed, 382 insertions(+), 8 deletions(-) commit d35ced0df270debf099f6f4971b761b613d70fce Author: Martin Erik Werner Date: Mon Apr 16 16:58:17 2012 +0200 Add autoconf/automake stuff Makefile.am | 46 +++ configure.ac | 35 ++ m4/boost.m4 | 1186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ m4/sdl.m4 | 208 ++++++++++ 4 files changed, 1475 insertions(+) commit 182c687851fd97e65ccaa16a36c99460174414e9 Author: Martin Erik Werner Date: Mon Apr 16 12:41:55 2012 +0200 rm plainreader, old poking module for boost ptree config plainreader.cpp | 106 ------------------------------------------------------- plainreader.hpp | 30 ---------------- 2 files changed, 136 deletions(-) commit 174096f61e26471b56a1ba33222757fe53ceb93c Author: Martin Erik Werner Date: Mon Apr 16 12:39:59 2012 +0200 rm config, boost ptree helper no longer needed config.cpp | 86 ------------------------------------------------------------ config.hpp | 61 ------------------------------------------ 2 files changed, 147 deletions(-) commit 8ef95bf1d7e90a61ad178773bcb2f22764f12392 Author: Martin Erik Werner Date: Mon Apr 16 12:36:45 2012 +0200 configInit.hpp: cosmetic changes configInit.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b24a726e547a67a0e8912ab3ae34a89a7e03d4ba Author: Martin Erik Werner Date: Sun Apr 15 19:52:34 2012 +0200 main.cpp: rename triggerCFG->cfgSet, writeTriggerCFG->cfgWriteSet main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3b1685eecaaf5eea7b37eaa3248dff6c818a1205 Author: Martin Erik Werner Date: Sun Apr 15 19:16:55 2012 +0200 configInit.cpp: cleanup the includes 'a bit' configInit.cpp | 43 ++++++++----------------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) commit 136ee5ee611d8d872315d5ed0b654c5e631cbbd4 Author: Martin Erik Werner Date: Sun Apr 15 19:03:19 2012 +0200 main.cpp: make the non-relevant path more obvious main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6cf716be6a853fc610691d5d8b49126f18f4edcb Author: Martin Erik Werner Date: Sun Apr 15 19:00:17 2012 +0200 main.cpp: use GVL_WINDOWS instead of GVL_WIN32 main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c03db9db2d538d0bde3a6ad6deabcc0fa7e92d9f Author: Martin Erik Werner Date: Sun Apr 15 18:54:13 2012 +0200 new ConfigInit module, add boostFS * All loading and writing to exe/cfg factored out of main into ConfigInit module * Add boost filesystem library for exists() and extension() Jamfile | 3 +- configInit.cpp | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configInit.hpp | 51 +++++++++++++++++++++ main.cpp | 66 ++++----------------------- 4 files changed, 198 insertions(+), 59 deletions(-) commit 473aaf0b6605fdd9c960d30bdb09f4536fdacf16 Author: Martin Erik Werner Date: Sun Apr 15 15:20:26 2012 +0200 common: add text loading from specified path common.cpp | 9 +++++++-- common.hpp | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) commit 1f93ca19e074a7152b9fda8a7009b45c306c77cd Author: Martin Erik Werner Date: Sun Apr 15 11:27:42 2012 +0200 binReader.hpp:add copyright header binReader.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit a2e1d4912f7b369f3d99bc16426cf16524367edc Author: Martin Erik Werner Date: Sun Apr 15 11:23:09 2012 +0200 main.cpp: add writeTriggerCFG main.cpp | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 8663ede12976e3863a5a44148b67d66e3d821c43 Author: Martin Erik Werner Date: Sun Apr 15 04:41:14 2012 +0200 liero.cfg: add Others liero.cfg | 6 ++++++ 1 file changed, 6 insertions(+) commit 7501863bbbefc3f9825c41d7eba31bcb5a251a94 Author: Martin Erik Werner Date: Sun Apr 15 04:40:21 2012 +0200 main.cpp: add trigger for Others main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 87933f68a4ac6e868ef20da47b6fd217097ccb81 Author: Martin Erik Werner Date: Sun Apr 15 04:39:41 2012 +0200 common: implement load/write cfg Others common.cpp | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common.hpp | 4 ++++ 2 files changed, 72 insertions(+) commit 84f4ab85385a8c23f22240eca01efd595987a32c Author: Martin Erik Werner Date: Sun Apr 15 04:39:06 2012 +0200 configHelper: implement getList() configHelper.cpp | 9 +++++++++ configHelper.hpp | 1 + 2 files changed, 10 insertions(+) commit 7a9ef14822597225d98c96ddd140c2794998ed00 Author: Martin Erik Werner Date: Sat Apr 14 23:39:39 2012 +0200 remove todo flags from textures main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e15ad24529f6f816dbb2972ce16e2ea757a1bd5b Author: Martin Erik Werner Date: Sat Apr 14 23:14:34 2012 +0200 liero.cfg: add Textures liero.cfg | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit b9e3b8e4e72a539f590f154fde8d8aefe313ea5a Author: Martin Erik Werner Date: Sat Apr 14 23:13:26 2012 +0200 main.cpp: add triggerCFG for textures main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5a97eb23b29996a1b41dde0f9c34a40dbdc54c2d Author: Martin Erik Werner Date: Sat Apr 14 23:11:54 2012 +0200 common.cpp: corrections to texture r/w common.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 521df2d02407c74dd028346ee79a5fadeee3462c Author: Martin Erik Werner Date: Sat Apr 14 23:07:03 2012 +0200 texture cfg load/write common.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ common.hpp | 11 +++++++++++ 2 files changed, 55 insertions(+) commit d0ed424fb2478290e14f8605f6b91e20197ce7a7 Author: Martin Erik Werner Date: Sat Apr 14 02:38:21 2012 +0200 common.cpp: unify usage of type casting common.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a4c86b7f2da7fcf5f06d02db2e29918c17fbba1 Author: Martin Erik Werner Date: Sat Apr 14 02:17:54 2012 +0200 liero.cfg: add Weapons liero.cfg | 3256 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 3089 insertions(+), 167 deletions(-) commit b98468ec17093cdce29e234dbbb552ce91721077 Author: Martin Erik Werner Date: Sat Apr 14 02:16:31 2012 +0200 main.cpp: add Weapons to cfg trigger main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5b74a56f390e5634e2408b8d0fc45276ada4cd55 Author: Martin Erik Werner Date: Sat Apr 14 02:14:40 2012 +0200 common.cpp: cfgReadMembers() removed since obsolete common.cpp | 10 ---------- 1 file changed, 10 deletions(-) commit 4cf0e8e7657645ddac188c80feb048b309c82515 Author: Martin Erik Werner Date: Sat Apr 14 02:13:17 2012 +0200 common.cpp: cleaner loading of cfg values common.cpp | 193 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 95 insertions(+), 98 deletions(-) commit fccf2611d73f6ebd8552e35011af2ef817411e9a Author: Martin Erik Werner Date: Sat Apr 14 02:12:22 2012 +0200 common: read/write Weaons to cfg common.cpp | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- common.hpp | 2 + 2 files changed, 137 insertions(+), 2 deletions(-) commit c4f2936a8372201298e58c7c6728e703e2209741 Author: Martin Erik Werner Date: Fri Apr 13 23:45:43 2012 +0200 common.cpp: Weapon cfg loading presumably complete common.cpp | 211 ++++++++++++++++++++++++++++-------------------------------- 1 file changed, 98 insertions(+), 113 deletions(-) commit 19ccd559ea9518a1bdc10912beb16548ed144d1b Author: Martin Erik Werner Date: Fri Apr 13 22:48:31 2012 +0200 de-inline common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce410643d2f9a4b9bc3168e571dd1f60e02927ab Author: Martin Erik Werner Date: Fri Apr 13 22:14:58 2012 +0200 Fist test of detectDistance setting load, looks good common.cpp | 24 ++++++++- common.hpp | 1 + liero.cfg | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ main.cpp | 5 +- 4 files changed, 194 insertions(+), 3 deletions(-) commit feab5655f2811e065da28e14553ff46b1b22a853 Author: Martin Erik Werner Date: Fri Apr 13 21:03:22 2012 +0200 cp-pasta common.cpp | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common.hpp | 1 + 2 files changed, 137 insertions(+) commit 79c6e9b4fa7c44ce504df8e2e8cdc86fe307e233 Author: Martin Erik Werner Date: Fri Apr 13 20:59:23 2012 +0200 Switch Uint8 getValues to new version gfx.cpp | 25 ++++++++----------------- gfx/font.cpp | 4 +--- gfx/palette.cpp | 6 +++--- 3 files changed, 12 insertions(+), 23 deletions(-) commit 04f2bbd232c7eda920016b85f446b22322b655cd Author: Martin Erik Werner Date: Fri Apr 13 20:57:36 2012 +0200 configHelper: make getValue an "=" operation configHelper.cpp | 46 +++++++++++++++------------------------------- configHelper.hpp | 9 ++------- 2 files changed, 17 insertions(+), 38 deletions(-) commit 4c7a63c6845266504ee27e4dc9c3936865293604 Author: Martin Erik Werner Date: Fri Apr 13 00:58:50 2012 +0200 Switch all lookupValue() to "=" assignment Use operator "=" assignment and type cast instead of lookupValue() for reading variables from config, this enables automatic error handling via exceptions. common.cpp | 76 ++++++++++++++++++++++++++++----------------------------- constants.cpp | 6 ++--- 2 files changed, 41 insertions(+), 41 deletions(-) commit dbcb163e47c9789dcf5ada6e5a3b9f834d9b70a7 Author: Martin Erik Werner Date: Fri Apr 13 00:26:14 2012 +0200 liero.cfg: add Materials liero.cfg | 259 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 259 insertions(+) commit dcef87f4f313b67a3057fcb58b5294b8f6b59f1d Author: Martin Erik Werner Date: Fri Apr 13 00:25:17 2012 +0200 main.cpp: include toggling matials from cfg main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 40cd2b7d2c2746e7583b7ab237a00c01ed52ccff Author: Martin Erik Werner Date: Fri Apr 13 00:24:53 2012 +0200 common: implement load/write Materials common.cpp | 38 ++++++++++++++++++++++++++++++++++++++ common.hpp | 4 ++++ 2 files changed, 42 insertions(+) commit 21b923a6906a5c1a91735a9d4ed63dc2da808876 Author: Martin Erik Werner Date: Thu Apr 12 23:59:00 2012 +0200 configHelper: templates for get and put, put template disabled * get template is pretty useful * put template exposes too many arguments, questionable value configHelper.cpp | 62 ++++++++++++++++++++++++++++-------------------------- configHelper.hpp | 17 +++++++++------ 2 files changed, 42 insertions(+), 37 deletions(-) commit 8f9e3268def15395b508bf7c35bf2c501d6fae64 Author: Martin Erik Werner Date: Thu Apr 12 23:17:06 2012 +0200 reorder liero.cfg based on loading order in main.cpp liero.cfg | 1726 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 863 insertions(+), 863 deletions(-) commit 91dc064db5cd3030b9b8b71e036f49377d220c07 Author: Martin Erik Werner Date: Thu Apr 12 23:16:09 2012 +0200 main.cpp: Add some ugly logic for triggering CFG main.cpp | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) commit 46c77081e2b803ca54a35235b98ae23ecc3a7651 Author: Martin Erik Werner Date: Thu Apr 12 23:09:46 2012 +0200 common.cpp, liero.cfg: get rid of garbage in copyright1 string common.cpp | 3 +++ liero.cfg | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 63d45b0844fb4723988aac0201e5a8adef6105fc Author: Martin Erik Werner Date: Thu Apr 12 19:16:09 2012 +0200 Update gvl submodule: zlib linking for test gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16c163a18c697282ea7e395646bd2c705d65157c Author: Martin Erik Werner Date: Thu Apr 12 15:12:26 2012 +0200 Update gvl submodule: zlib de-embed gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ac1f84810495269e34b0953b0a3275247211d43 Author: Martin Erik Werner Date: Thu Apr 12 11:35:53 2012 +0200 main: switch to loading Gfx from cfg, keep triggerCFG template main.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 38cba1d24da3ae8c8b7d09269c4b2b85f4d6c0f6 Author: Martin Erik Werner Date: Thu Apr 12 11:34:25 2012 +0200 liero.cfg: add Gfx liero.cfg | 4 ++++ 1 file changed, 4 insertions(+) commit 66e686a7d31e6d5f671baa745a878f0a673062b1 Author: Martin Erik Werner Date: Thu Apr 12 11:33:14 2012 +0200 common: implement load/write cfg Gfx common.cpp | 38 ++++++++++++++++++++++++++++++++++++++ common.hpp | 4 ++++ 2 files changed, 42 insertions(+) commit 93ae508098782b83cb8352384001403358be8474 Author: Martin Erik Werner Date: Thu Apr 12 10:43:17 2012 +0200 gfx.cpp: comments regarding non-exe values saved to cfg gfx.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit 17838d12944fb5972a408e51ba1315cbd4c9a177 Author: Martin Erik Werner Date: Thu Apr 12 10:35:12 2012 +0200 common: make loadGfxExtras() a separate function as well common.cpp | 12 ++++++++---- common.hpp | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) commit bde50d9b002010307e1c334191fd1188effb25d3 Author: Martin Erik Werner Date: Thu Apr 12 10:23:55 2012 +0200 common: loadGfx(): factor out EXE and CHR functions loadGfx() previously did the reading of EXE, CHR, and further initialization all in one step, now it calls loadGfxFrom{EXE, CHR}. common.cpp | 11 ++++++++++- common.hpp | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 40e23c34532f48f4a625c8eb2cdca360f444a4a0 Author: Martin Erik Werner Date: Thu Apr 12 01:50:49 2012 +0200 Jamfile: build with debug symbols per default Jamfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f129f2eda7657b0f3be17e06a939bfe3e989ca03 Author: Martin Erik Werner Date: Thu Apr 12 01:53:54 2012 +0200 main: add triggerCFG for convenient debug switching main.cpp | 5 +++++ 1 file changed, 5 insertions(+) commit c31d724b4623eafcb2e755a7c10b8cfa1ad3bd11 Author: Martin Erik Werner Date: Thu Apr 12 01:53:44 2012 +0200 main: switch to loading Menus from cfg main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c81e89ecb6de1b07a86e41488bab3d0b0dd8e9e Author: Martin Erik Werner Date: Thu Apr 12 01:46:25 2012 +0200 liero.cfg: add Menus liero.cfg | 222 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) commit 3747d1e4a07c70e009f07b232d216268e1db3fe5 Author: Martin Erik Werner Date: Thu Apr 12 01:40:31 2012 +0200 gfx: implement cfg read/write Menus gfx.cpp | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ gfx.hpp | 4 ++ 2 files changed, 147 insertions(+) commit b8f34cee5cec8ff756fadf344bb924880b587dba Author: Martin Erik Werner Date: Wed Apr 11 15:00:28 2012 +0200 menu/menu.cpp: purge crlf and whitespace menu/menu.cpp | 582 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 291 insertions(+), 291 deletions(-) commit 65e19ce62380126940766593c9c069a43e2b90c7 Author: Martin Erik Werner Date: Wed Apr 11 14:54:55 2012 +0200 menu/menu.hpp: add copyright header menu/menu.hpp | 337 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 182 insertions(+), 155 deletions(-) commit d30e828f7086e46f6e7f8b402e1e282162194d86 Author: Martin Erik Werner Date: Wed Apr 11 14:41:54 2012 +0200 gfx.cpp: purge crlf and whitespace gfx.cpp | 4054 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 2027 insertions(+), 2027 deletions(-) commit b270362b4b1f8215ddf9b5549610fc6f7aeb3d7d Author: Martin Erik Werner Date: Wed Apr 11 14:39:51 2012 +0200 gfx.hpp: purge crlf and whitespace gfx.hpp | 534 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 267 insertions(+), 267 deletions(-) commit bfa28dc7fe4259397fcb2b139c9c8f20aeca88b5 Author: Martin Erik Werner Date: Wed Apr 11 14:39:29 2012 +0200 gfx.hpp: add copyright header gfx.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit af916ce84627b057e8ff1d6590cf0327090cf183 Author: Martin Erik Werner Date: Wed Apr 11 05:39:35 2012 +0200 main: load font data from CFG main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c2e173cd4b67e46a80c1a252a04ac4fbeb5934a Author: Martin Erik Werner Date: Wed Apr 11 05:39:02 2012 +0200 liero.cfg: add Font data liero.cfg | 1253 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1253 insertions(+) commit 2481168e5ecc6f1caf57bad5249d3ea2f43834fc Author: Martin Erik Werner Date: Wed Apr 11 05:34:43 2012 +0200 configHelper: add capability to use indexes in getVariable() Make it possible to pass an int instead of a string as the second parameter, thus making it possible to get settings by index, particularly useful for arrays. configHelper.cpp | 22 ++++++++++++++++++++++ configHelper.hpp | 2 ++ 2 files changed, 24 insertions(+) commit deb34739cbe6aa8083e326b602f791c934d598d2 Author: Martin Erik Werner Date: Wed Apr 11 05:33:10 2012 +0200 gfx/font: implement load/write cfg gfx/font.cpp | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ gfx/font.hpp | 4 ++++ 2 files changed, 66 insertions(+) commit 23c9eb40d9034d71468d0aaad03060ecc5ad96ec Author: Martin Erik Werner Date: Wed Apr 11 03:34:20 2012 +0200 configHelper: rename lookupValue()->getValue() and use exceptions * Rework ConfigHelper method to use exception-throwing libconfig methods * Rename lookupValue()->getValue() since the similarity to libconfig's lookupValue() is misleading, we return nothing and throw exceptions configHelper.cpp | 10 ++++------ configHelper.hpp | 4 ++-- gfx/palette.cpp | 6 +++--- 3 files changed, 9 insertions(+), 11 deletions(-) commit c03271265f858978d96c7bc4fae82d1a28dda3fa Author: Martin Erik Werner Date: Wed Apr 11 02:52:58 2012 +0200 math.cpp, configHelper: rename getArray()->mkArray() Since the method always deletes the old array and creates a new one "get" is somewhat of a misnomer, mkArray is better. configHelper.cpp | 2 +- configHelper.hpp | 2 +- math.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 8e537e40915c65f5ed0258284d8d5264dc22cdd4 Author: Martin Erik Werner Date: Wed Apr 11 01:58:59 2012 +0200 gfx/font.cpp: purge crlf and whitespace gfx/font.cpp | 240 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 120 insertions(+), 120 deletions(-) commit 0180b5ea55b62c56a625f9d1a674bb7cc9e0e90e Author: Martin Erik Werner Date: Wed Apr 11 01:57:46 2012 +0200 reader.hpp: add copyright header reader.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 01da17fdcb9612efb3f97eeb602cbf67aeea9067 Author: Martin Erik Werner Date: Wed Apr 11 01:53:05 2012 +0200 gfx/font.hpp: purge crlf and whitespace gfx/font.hpp | 78 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit bd606f34e7907bd8b469c587bc7796960c196159 Author: Martin Erik Werner Date: Wed Apr 11 01:51:44 2012 +0200 gfx/font.hpp: add copyright header gfx/font.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 69da58fd17c3f0893c977d009e872da6de83e4b8 Author: Martin Erik Werner Date: Tue Apr 10 23:29:28 2012 +0200 Update gvl submodule gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01465e281825f8b9e92f8935aa6898f36a24af49 Author: Martin Erik Werner Date: Tue Apr 10 21:38:02 2012 +0200 constants.hpp: Add me (Martin) to copyright header constants.hpp | 1 + 1 file changed, 1 insertion(+) commit 070714a8940923355362ef046b593d5dce888046 Author: Martin Erik Werner Date: Tue Apr 10 21:28:50 2012 +0200 main.cpp: switch to loading tables from CFG main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68abe689ef10da4a89aa7ec81e923ba8eaa81858 Author: Martin Erik Werner Date: Tue Apr 10 21:28:25 2012 +0200 liero.cfg: Add tables liero.cfg | 5 +++++ 1 file changed, 5 insertions(+) commit 56e85f5d5478cde5e62cb3c1becd89357eec4ce0 Author: Martin Erik Werner Date: Tue Apr 10 21:12:35 2012 +0200 math.cpp: cleanups for CFGfile math.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 336744519307373f4a84aa5058c74a6a24de6a6c Author: Martin Erik Werner Date: Tue Apr 10 20:56:34 2012 +0200 math.cpp: purge crlf math.cpp | 144 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 72 insertions(+), 72 deletions(-) commit 22d4e767ee0eb434b7155133d1e4feadd0842ecc Author: Martin Erik Werner Date: Tue Apr 10 20:55:45 2012 +0200 math.cpp: read/write tables definitions math.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 7b467ee1eb389e3598b5c6242390300019d8f59e Author: Martin Erik Werner Date: Tue Apr 10 20:49:52 2012 +0200 configHelper: implement getArray configHelper.cpp | 9 +++++++++ configHelper.hpp | 1 + 2 files changed, 10 insertions(+) commit 78af08a01c951d940f85a06df1bd063d17990886 Author: Martin Erik Werner Date: Tue Apr 10 19:21:59 2012 +0200 constants.hpp: add copright header constants.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 2e4f2bea53565c5a812a6ce54fe47761ae1f463e Author: Martin Erik Werner Date: Tue Apr 10 19:18:41 2012 +0200 constants.hpp: purge crlf and whitespace constants.hpp | 314 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 157 insertions(+), 157 deletions(-) commit 48dcd7f72d86187c863331e90a684763f8ccb989 Author: Martin Erik Werner Date: Tue Apr 10 18:53:53 2012 +0200 math.hpp: add file-argument load tables func math.hpp | 1 + 1 file changed, 1 insertion(+) commit 3c2af09dc2df3c7e095f51538c674974be48a95a Author: Martin Erik Werner Date: Tue Apr 10 18:51:40 2012 +0200 math.hpp: purge crlf math.hpp | 66 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 73cf09fafc55374515a1b366ae0bdb549eda8e05 Author: Martin Erik Werner Date: Tue Apr 10 18:50:30 2012 +0200 math.hpp: add load/write cfg declarations math.hpp | 5 +++++ 1 file changed, 5 insertions(+) commit 167ab392e8a434704510a077319e03ad6e802a36 Author: Martin Erik Werner Date: Tue Apr 10 16:08:13 2012 +0200 main.cpp: mark TODOs main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit bba6333800bb434179784242c0b9ffa99f99e76e Author: Martin Erik Werner Date: Tue Apr 10 16:07:32 2012 +0200 reader.cpp: Purge crlf and whitespace reader.cpp | 216 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 108 insertions(+), 108 deletions(-) commit edae1e6bd4f5e91f66910a52e44c12df818cae4b Author: Martin Erik Werner Date: Tue Apr 10 15:30:28 2012 +0200 main: Switch to loading constants from CFG by default main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa9bcfee82901028deb1650de1ebb6714dbfc631 Author: Martin Erik Werner Date: Tue Apr 10 15:28:51 2012 +0200 liero.cfg: Add all constants to CFG liero.cfg | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) commit 94efc862f4d850f35f48d2bcc052169b09214688 Author: Martin Erik Werner Date: Tue Apr 10 15:27:29 2012 +0200 common.hpp: declare load/write cfg constants funcs common.hpp | 4 ++++ 1 file changed, 4 insertions(+) commit 9da625abd08300edf47a3ce6ea329adf4ebceda0 Author: Martin Erik Werner Date: Tue Apr 10 15:23:55 2012 +0200 constants.cpp: implement load/write cfg constants Implement loading and writing integer constants, string constants, and hack constants from/to CFG file. Added string arrays to access variable names. constants.cpp | 210 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) commit 3853fd2737121f064695335eee13b435e115ffca Author: Martin Erik Werner Date: Tue Apr 10 15:22:21 2012 +0200 configHelper: implement put() for boolean configHelper.cpp | 11 +++++++++++ configHelper.hpp | 1 + 2 files changed, 12 insertions(+) commit 1da93d9230c262b649f742f29e83bb43ee2058a7 Author: Martin Erik Werner Date: Tue Apr 10 12:55:59 2012 +0200 constants.cpp: crlf and whitespace purge constants.cpp | 700 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 350 insertions(+), 350 deletions(-) commit 9f7a181d0b0c33ba6d8da630e8ac8e9497cc9f35 Author: Martin Erik Werner Date: Mon Apr 9 17:16:40 2012 +0200 Update gvl submodule, again... gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6e5250d2a7e4120aca54ca02c53b3792a5ecde7 Author: Martin Erik Werner Date: Mon Apr 9 17:10:03 2012 +0200 main: Only display "Press Any Key..." on Windows Liero outputs "Press Any Key..." on exit, which is quite unnecessary on GNU/Linux (since no key press is required), plus it breaks the terminal prompt. main.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 4a7b64bc0017227acbd89fef6f3f8d0d4be05cbd Author: Martin Erik Werner Date: Mon Nov 21 23:50:40 2011 +0100 main.cpp: fix custom settings load/write handling * Make Liero write settings to the currently active settings file on exit, rather that always writing to LIERO.DAT (Closes: http://code.google.com/p/liero/issues/detail?id=3) * Re-enable using LIERO.OPT to get the name of the settings file that should be loaded on start main.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 537e12e19d69189eb07f3c412e3cabb1960e333c Author: Martin Erik Werner Date: Mon Apr 9 15:31:50 2012 +0200 Update gvl submodule gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 250be59200e5d8d22b21aa0c6a9db806f42f99a5 Author: Martin Erik Werner Date: Mon Apr 9 01:49:47 2012 +0200 Update data submodule data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7fc38a44123f22a3eaa83d32ff035944e7a0c08 Author: Martin Erik Werner Date: Sun Apr 8 22:05:20 2012 +0200 Update data submodule data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15ecb1555a2c5ee3e7388ed5277094aa2e0c70da Author: Martin Erik Werner Date: Sun Apr 8 16:45:28 2012 +0200 Use gvl HEAD now that it is fixed gvl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 410256248dc4c06b7083b29b597249e8da375174 Author: Martin Erik Werner Date: Sun Apr 8 04:25:04 2012 +0200 main: Switch to loading from CFG main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59b24760f1fe80daf06e42c6513c0f2a9129f787 Author: Martin Erik Werner Date: Sun Apr 8 04:23:40 2012 +0200 common: Implement read/write palette from/to CFG common.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- common.hpp | 6 +++++- 2 files changed, 52 insertions(+), 3 deletions(-) commit 4f20fce41b8f01a62f30a0f62ce925747aff1dcd Author: Martin Erik Werner Date: Sun Apr 8 04:22:30 2012 +0200 gfx/palette: Implement read/write CFG gfx/palette.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ gfx/palette.hpp | 4 ++++ 2 files changed, 50 insertions(+) commit 350e63b9a5bda9c841e3235ce679d5c67c29ef16 Author: Martin Erik Werner Date: Sun Apr 8 04:09:29 2012 +0200 configHelper: Add put and lookupValue for Uint8 configHelper.cpp | 38 ++++++++++++++++++++++++++++++++++++++ configHelper.hpp | 8 ++++++++ 2 files changed, 46 insertions(+) commit eba9849f7a36f6f091fa44e8e1aa3ad2bfab86af Author: Martin Erik Werner Date: Sun Apr 8 04:08:33 2012 +0200 liero.cfg: Palette settings extracted liero.cfg | 787 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 786 insertions(+), 1 deletion(-) commit 8c9ced49b3317cf999c3e95b1366e477860e91de Author: Martin Erik Werner Date: Sat Apr 7 23:58:30 2012 +0200 palette: Add copyright header, fix whitespace & crlf gfx/palette.cpp | 230 +++++++++++++++++++++++++++---------------------------- gfx/palette.hpp | 136 +++++++++++++++++++------------- 2 files changed, 197 insertions(+), 169 deletions(-) commit f86acf5df2b92da55e694e92bb461c19b2ab2f8e Author: Martin Erik Werner Date: Sat Apr 7 22:19:05 2012 +0200 New ConfigHelper module from code in common * Rename setVariable -> put Jamfile | 1 + common.cpp | 120 ++++++++++++++++++++---------------------------------- common.hpp | 4 -- configHelper.cpp | 37 +++++++++++++++++ configHelper.hpp | 41 +++++++++++++++++++ 5 files changed, 123 insertions(+), 80 deletions(-) commit 3b00bb4bd54f63d8e05c7db9a3dc48c9b2ea83ca Author: Martin Erik Werner Date: Sat Apr 7 21:48:20 2012 +0200 common: Add copyright header common.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 139603fc90388ede5a226859e63e0ae9c8c277fb Author: Martin Erik Werner Date: Sat Apr 7 21:28:06 2012 +0200 common: Make read-only Setting instances const common.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3e603e43ac8a6726c0d66abd390452589343cbd7 Author: Martin Erik Werner Date: Sat Apr 7 17:45:04 2012 +0200 jamfile: remove plainreader rules Jamfile | 7 ------- 1 file changed, 7 deletions(-) commit 189028fc94bfa21350be8761a5667e41e15d90da Author: Martin Erik Werner Date: Sat Apr 7 17:43:02 2012 +0200 main: switch to loading Texts from config file main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b16f8f9229c9d61e8645905eca15cfe50d32fab Author: Martin Erik Werner Date: Sat Apr 7 17:42:10 2012 +0200 config file with all members of Texts struct liero.cfg | 236 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) commit 9564c5bbc39815e4f0efa9d2b1d398b42dfb2402 Author: Martin Erik Werner Date: Sat Apr 7 17:34:29 2012 +0200 common: Implement Texts::loadFromCFG() and writeToCFG() * Add functions for loading and writing all members of the Texts struct to and from a libconfig-style file * Also add some helper functions for libconfig++ - setVariable(string/int): sets a child variable to given setting node - getSubgroup: creates if need be, and returns a subgroup setting node common.cpp | 197 ++++++++++++++++++++++++++++++++++++++++++++++++------------ common.hpp | 11 +++- 2 files changed, 168 insertions(+), 40 deletions(-) commit 74c9876e1f5b5a02678519128fcdb021ce78bb7a Author: Martin Erik Werner Date: Sat Apr 7 17:32:41 2012 +0200 Add .gitignore file, matching existing .hgignore .gitignore | 4 ++++ 1 file changed, 4 insertions(+) commit 61f5a6c4a816dbc4b0467085eec619d92c7b0970 Author: Martin Erik Werner Date: Sat Apr 7 17:27:20 2012 +0200 jamfile: config module no longer used Jamfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1ff6fe517bc3ab0b7cd76802721248ca5e6dc561 Author: Martin Erik Werner Date: Fri Apr 6 03:51:02 2012 +0200 main: clean crlf and whitespace main.cpp | 414 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 207 insertions(+), 207 deletions(-) commit 042351fdb9539cbeaa6edf7d85049de763ec8a56 Author: Martin Erik Werner Date: Fri Apr 6 03:47:52 2012 +0200 config: write(void) using write(string) config.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit c9834232ee621d2b5b0321bb0772a6c2c8034bc7 Author: Martin Erik Werner Date: Fri Apr 6 03:33:52 2012 +0200 config: Explicit read(), file creation, exceptions config.cpp | 41 +++++++++++++++++++++++------------------ config.hpp | 6 ++++-- plainreader.cpp | 3 ++- 3 files changed, 29 insertions(+), 21 deletions(-) commit 729fe9260f7a5ebaabd667008a45ad4f3251a3b4 Author: Martin Erik Werner Date: Fri Apr 6 00:21:08 2012 +0200 common: Implement loadFromINI for Texts Jamfile | 2 ++ common.cpp | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common.hpp | 1 + 3 files changed, 68 insertions(+) commit e442273269783741872d0d93958250ae78ee9c7b Author: Martin Erik Werner Date: Wed Apr 4 19:31:40 2012 +0200 config: make fstreams localised Make fstreams local and only carry configfile path global, since [read,write]_ini closes the streams, egoistical turds. config.cpp | 27 ++++++++++++++++++--------- config.hpp | 6 +++--- 2 files changed, 21 insertions(+), 12 deletions(-) commit 28231d17b0f78750c98b5adac216a30eb2d2e033 Author: Martin Erik Werner Date: Wed Apr 4 16:01:50 2012 +0200 plainreader: Test using config module for configfile abstraction plainreader.cpp | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) commit 302b0f87e8413142c2b4df5c113b14cf98ccee9e Author: Martin Erik Werner Date: Wed Apr 4 15:58:14 2012 +0200 config: Use camelCase and implement writeOut config.cpp | 43 +++++++++++++++++++++++++++++-------------- config.hpp | 17 +++++++++++------ 2 files changed, 40 insertions(+), 20 deletions(-) commit e886a946cf4ce9df5e3534f2ec76c5f92c0fac57 Author: Martin Erik Werner Date: Wed Apr 4 15:39:05 2012 +0200 Update jamfile Jamfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ed477e92e315dd3018fabe2342c092fc5d202e54 Author: Martin Erik Werner Date: Wed Apr 4 15:13:13 2012 +0200 Missed rename include binreader->binReader binReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0947e52efd22fde44bd3c1f570878b28b6cf2f42 Author: Martin Erik Werner Date: Wed Apr 4 15:09:34 2012 +0200 Accept default values for config.put config.cpp | 10 ++++++++++ config.hpp | 4 ++++ 2 files changed, 14 insertions(+) commit 52f51c3b0b55505fef60619616b2a885aa35ddc9 Author: Martin Erik Werner Date: Wed Apr 4 04:03:55 2012 +0200 config: configfile & ptree abstraction config.cpp | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ config.hpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) commit 54f6028e4f51e832568d5dccd9da198410640b88 Author: Martin Erik Werner Date: Wed Apr 4 03:39:06 2012 +0200 Rename binreader -> binReader, use .o for libs Jamfile | 4 +-- binReader.cpp | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ binReader.hpp | 25 +++++++++++++ binreader.cpp | 107 ------------------------------------------------------- binreader.hpp | 25 ------------- dataPath.cpp | 1 + plainreader.cpp | 4 +-- reader.hpp | 2 +- to_string.cpp | 2 +- 9 files changed, 139 insertions(+), 138 deletions(-) commit 442dbb3976c71ed05bb8bc58a8ff0b49c707349f Author: Martin Erik Werner Date: Wed Apr 4 03:35:20 2012 +0200 Update copyright dates for dataPath boostTesting.cpp | 2 +- dataPath.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a3259c30d5722b8c3fd42efbaecb107037adbd4b Author: Martin Erik Werner Date: Tue Apr 3 16:04:59 2012 +0200 add plainreader as a Jamfile target Jamfile | 5 +++++ 1 file changed, 5 insertions(+) commit 56f9b507e375d6f2587bb1b9aff4f3ddfe2f3403 Author: Martin Erik Werner Date: Tue Apr 3 15:51:37 2012 +0200 Implement to_string module plainreader.cpp | 22 ++++++---------------- to_string.cpp | 2 ++ 2 files changed, 8 insertions(+), 16 deletions(-) commit fe69e6b72ff246605e2bd3a57845b5af5073f665 Author: Martin Erik Werner Date: Tue Apr 3 15:43:56 2012 +0200 to_string module to_string.cpp | 10 ++++++++++ to_string.hpp | 8 ++++++++ 2 files changed, 18 insertions(+) commit 00f92156efe1c0abeac3beed60c182eb5b2f3b3b Author: Martin Erik Werner Date: Tue Apr 3 15:02:46 2012 +0200 common.?pp: whitespace and crlf purging common.cpp | 916 ++++++++++++++++++++++++++++++------------------------------ common.hpp | 324 ++++++++++----------- 2 files changed, 620 insertions(+), 620 deletions(-) commit 2aad999ace3b753929ecba9f40110a3333a4e3c3 Author: Martin Erik Werner Date: Tue Apr 3 14:28:12 2012 +0200 Rename varreader to binreader Jamfile | 15 ++++---- binreader.cpp | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ binreader.hpp | 25 +++++++++++++ plainreader.cpp | 4 +-- reader.hpp | 48 ++++++++++++------------- varreader.cpp | 107 ------------------------------------------------------- varreader.hpp | 25 ------------- 7 files changed, 167 insertions(+), 164 deletions(-) commit 48e17d089a16d71abb194717e20a83bc65b1ee34 Author: Martin Erik Werner Date: Mon Apr 2 21:46:28 2012 +0200 Read and print materials from ini plainreader.cpp | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 518a22cbde895acc4235f2302332264fea69de70 Author: Martin Erik Werner Date: Mon Apr 2 21:21:21 2012 +0200 Fixup stringstream conversion plainreader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 54ad028090efd4afdd14e309e5d16e23e59570a8 Author: Martin Erik Werner Date: Mon Apr 2 19:55:56 2012 +0200 Try get-write-read-print from cfg plainreader.cpp | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit 7c26cdb4e9931b004912d6a40480f49ed5efb6e7 Author: Martin Erik Werner Date: Mon Apr 2 16:27:52 2012 +0200 Use boost ptree, move relevant stuff to header * Move Material definitions to header * Remove some superfluous includes * Use namespaces explicitly * Use Boost for config file handling, INI style plainreader.cpp | 79 +++++++++++++++++++++++++++++++------------------------ plainreader.hpp | 24 +++++++++++++++++ 2 files changed, 69 insertions(+), 34 deletions(-) commit 790a501645f6f63dff17a2dec760fff2f5e8f265 Author: Martin Erik Werner Date: Mon Apr 2 16:12:51 2012 +0200 Fixup lining & compilation for boostTesting boostTesting.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a97c14d34b58d470096c796598afa05ecccfaf6b Author: Martin Erik Werner Date: Sun Apr 1 22:10:04 2012 +0200 Set liero dir as top of project in Jamfile Jamfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1d1835db58cc2bfccacab53acfe3551d3739c7dc Author: Martin Erik Werner Date: Sun Apr 1 21:46:02 2012 +0200 Add gvl as a submodule .gitmodules | 3 +++ gvl | 1 + 2 files changed, 4 insertions(+) commit 744890aab61d4f50c8bfd30a1adee70fc95f5f49 (bridge/master) Author: Martin Erik Werner Date: Sun Apr 1 21:12:09 2012 +0200 Add liero-data as a submodule .gitmodules | 3 +++ data | 1 + 2 files changed, 4 insertions(+) commit 3c53101448d5e55986a03566ac00de36a5a99022 Merge: 669f68b 204de18 Author: Martin Erik Werner Date: Sun Apr 1 21:09:18 2012 +0200 Merge branch 'plainreader' of ../liero-debian Merge of dataPath and varreader factorisation, lots of conflicts due to no common ancestors. Conflicts: Jamfile controller/localController.cpp gfx.cpp level.cpp main.cpp reader.cpp reader.hpp settings.cpp worm.cpp commit 204de18d276c761bc954d49243cee1c50bf2a8a4 Author: Martin Erik Werner Date: Sat Mar 31 18:22:54 2012 +0200 No global std namespace in varreader varreader.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d8603cdaab7bed800c63d1b997be92449169494f Author: Martin Erik Werner Date: Sat Mar 31 18:16:38 2012 +0200 Split varreader out into module Jamfile | 2 +- plainreader.cpp | 99 ++------------------------------------------------ reader.hpp | 96 ------------------------------------------------- varreader.cpp | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ varreader.hpp | 27 ++++++++++++++ 5 files changed, 137 insertions(+), 194 deletions(-) commit dc856b0a1b78efb0ad29e33474c2f22b14bc0a81 Author: Martin Erik Werner Date: Sat Mar 31 17:34:47 2012 +0200 crlf->lf in reader.hpp reader.hpp | 227 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 115 insertions(+), 112 deletions(-) commit 9dec1eaf65dd6a2ba5dc288265d304a982b78f32 Author: Martin Erik Werner Date: Sat Mar 31 17:32:44 2012 +0200 comment why include SDL plainreader.cpp | 5 +++++ 1 file changed, 5 insertions(+) commit 65d8c59983fb7f72af5f8e8306efe0203e930e92 Author: Martin Erik Werner Date: Fri Mar 30 22:42:46 2012 +0200 use equals sign instead of colon plainreader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 114176e68aa9116c712e8c463bb3204da6c06d91 Author: Martin Erik Werner Date: Tue Mar 27 00:15:48 2012 +0200 add section header for materials plainreader.cpp | 1 + 1 file changed, 1 insertion(+) commit b628c7d0a38f10d5c5c41ada2c733bfaa1eb2f3b Author: Martin Erik Werner Date: Sat Jan 28 01:32:38 2012 +0100 Bloat plainreader plainreader.cpp | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 144 insertions(+), 5 deletions(-) commit b22b882875ddb0f7e8a355812dfd3ab5cbb8c71e Author: Martin Erik Werner Date: Fri Jan 27 00:15:09 2012 +0100 sticks & ducttape plainreader plainreader.cpp | 38 ++++++++++++++++++++++++++++++++++++++ plainreader.hpp | 6 ++++++ 2 files changed, 44 insertions(+) commit 2a116a10427fe1feef426b06ab594e4a2a1dcbeb Author: Martin Erik Werner Date: Tue Dec 20 19:24:42 2011 +0100 Imported Upstream version 1.35~b2+20100124.1 Jamfile | 40 + _build/liero.sln | 47 + _build/liero.vcproj | 841 ++++++++++++++++ bobject.cpp | 64 ++ bobject.hpp | 22 + bonus.cpp | 37 + bonus.hpp | 27 + common.cpp | 458 +++++++++ common.hpp | 162 +++ console.cpp | 223 +++++ console.hpp | 38 + constants.cpp | 350 +++++++ constants.hpp | 157 +++ controller/commonController.cpp | 46 + controller/commonController.hpp | 16 + controller/controller.hpp | 38 + controller/localController.cpp | 282 ++++++ controller/localController.hpp | 55 ++ controller/replayController.cpp | 170 ++++ controller/replayController.hpp | 53 + exactObjectList.hpp | 180 ++++ fastObjectList.hpp | 126 +++ filesystem.cpp | 358 +++++++ filesystem.hpp | 78 ++ game.cpp | 533 ++++++++++ game.hpp | 88 ++ gfx.cpp | 2053 +++++++++++++++++++++++++++++++++++++++ gfx.hpp | 240 +++++ gfx/blit.cpp | 489 ++++++++++ gfx/blit.hpp | 38 + gfx/color.hpp | 6 + gfx/font.cpp | 125 +++ gfx/font.hpp | 40 + gfx/macros.hpp | 175 ++++ gfx/palette.cpp | 115 +++ gfx/palette.hpp | 54 + gfx/sprite.cpp | 52 + gfx/sprite.hpp | 26 + keys.cpp | 126 +++ keys.hpp | 32 + level.cpp | 284 ++++++ level.hpp | 77 ++ lfs.hpp | 78 ++ main.cpp | 214 ++++ math.cpp | 29 + math.hpp | 28 + menu/arrayEnumBehavior.hpp | 30 + menu/booleanSwitchBehavior.cpp | 34 + menu/booleanSwitchBehavior.hpp | 24 + menu/enumBehavior.cpp | 49 + menu/enumBehavior.hpp | 32 + menu/hiddenMenu.cpp | 86 ++ menu/hiddenMenu.hpp | 31 + menu/integerBehavior.cpp | 57 ++ menu/integerBehavior.hpp | 32 + menu/itemBehavior.cpp | 3 + menu/itemBehavior.hpp | 23 + menu/menu.cpp | 291 ++++++ menu/menu.hpp | 155 +++ menu/menuItem.cpp | 39 + menu/menuItem.hpp | 35 + menu/timeBehavior.cpp | 14 + menu/timeBehavior.hpp | 20 + ninjarope.cpp | 123 +++ nobject.cpp | 373 +++++++ nobject.hpp | 60 ++ objectList.hpp | 167 ++++ rand.hpp | 10 + reader.cpp | 104 ++ reader.hpp | 121 +++ rect.hpp | 208 ++++ replay.cpp | 666 +++++++++++++ replay.hpp | 111 +++ sdlmain.cpp | 27 + settings.cpp | 165 ++++ settings.hpp | 313 ++++++ sfx.cpp | 195 ++++ sfx.hpp | 96 ++ sobject.cpp | 273 ++++++ sobject.hpp | 41 + sys.cpp | 19 + sys.hpp | 15 + text.cpp | 90 ++ text.hpp | 37 + version.hpp | 6 + viewport.cpp | 651 +++++++++++++ viewport.hpp | 82 ++ weapon.cpp | 442 +++++++++ weapon.hpp | 96 ++ weapsel.cpp | 548 +++++++++++ weapsel.hpp | 31 + worm.cpp | 1566 +++++++++++++++++++++++++++++ worm.hpp | 425 ++++++++ 93 files changed, 16786 insertions(+) commit 669f68b3db53ba3232565b881c7b223802f126e3 Author: Martin Erik Werner Date: Tue Nov 22 03:46:02 2011 +0100 gfx.cpp: handle different .DAT files gfx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab0bec4cb0826c78d710fa6df18a67e86741cc54 Author: Martin Erik Werner Date: Tue Nov 22 03:46:02 2011 +0100 dataPath: return writable path for any .DAT dataPath.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit eed86ba524887de1d03061586b56f6ef42c50272 Author: Martin Erik Werner Date: Tue Nov 22 03:46:02 2011 +0100 boostTesting: Add testcase for arbitrary .DAT boostTesting.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b54f8d05b130c27276cd50ae10093ef09a531ce5 Author: Martin Erik Werner Date: Tue Nov 22 03:46:02 2011 +0100 boostTesting: missed copy one line boostTesting.cpp | 1 + 1 file changed, 1 insertion(+) commit 8c55e9a5200b5e1ae3fca3cfed5fd606af59406e Author: Martin Erik Werner Date: Tue Nov 22 03:46:02 2011 +0100 dataPath: add NAMES.DAT as a possible file dataPath.cpp | 1 + 1 file changed, 1 insertion(+) commit 791f7d4b8600b54258f40875210a1afd3f0507cd Author: Martin Erik Werner Date: Tue Nov 22 03:46:01 2011 +0100 boostTesting: add NAMES.DAT as a possible file boostTesting.cpp | 1 + 1 file changed, 1 insertion(+) commit 5f3cba992c3d063ecdbda828a6f4b1e0a78fe17c Author: Martin Erik Werner Date: Tue Nov 22 03:46:01 2011 +0100 remove 01_datapath_object_outline 01_datapath_object_outline | 28 ---------------------------- 1 file changed, 28 deletions(-) commit 601cb1f6a691183750121bfc918c1119ee554573 Author: Martin Erik Werner Date: Tue Nov 22 03:46:01 2011 +0100 dataPath.hpp: describe exception throwing dataPath.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e5b667ef25e18c1c1999d8736f52f327bdc1e008 Author: Martin Erik Werner Date: Tue Nov 22 03:46:01 2011 +0100 dataPath: throw exeptions, rm unneeded includes dataPath.cpp | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit d6b5abc76f2a2152ce6d2f734d1636a33051dcb4 Author: Martin Erik Werner Date: Tue Nov 22 03:46:01 2011 +0100 boostTesting: tests for exception messages boostTesting.cpp | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 94e376596c1757af2eeff9cfeb446183ef5762fb Author: Martin Erik Werner Date: Tue Nov 22 03:46:01 2011 +0100 openliero: make data_path extern, and define in cpp reader.cpp | 1 + reader.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit c2914211d4f896389c58f55cd10816aae6a2b2b5 Author: Martin Erik Werner Date: Tue Nov 22 03:46:01 2011 +0100 dataPath.hpp: remove usage of namespace std * Add namespace usage to dataPath.cpp and boostTesting instead boostTesting.cpp | 1 + dataPath.cpp | 1 + dataPath.hpp | 14 ++++++-------- 3 files changed, 8 insertions(+), 8 deletions(-) commit 9e948a270d9da3fbe140d75210eca55dfe028d09 Author: Martin Erik Werner Date: Tue Nov 22 03:46:01 2011 +0100 Use data_path as a pointer * Since we need to expose data_path, but initialise it in a function we define it as a pointer which is updated in the function controller/localController.cpp | 2 +- gfx.cpp | 14 +++++++------- level.cpp | 2 +- main.cpp | 2 +- reader.cpp | 10 +++++----- reader.hpp | 2 ++ settings.cpp | 2 +- worm.cpp | 4 ++-- 8 files changed, 20 insertions(+), 18 deletions(-) commit 61af6f2616d7f07c24331a3afa62a563325896c4 Author: Martin Erik Werner Date: Tue Nov 22 03:46:00 2011 +0100 Include dataPath in reader.hpp instead reader.cpp | 1 - reader.hpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit cd4f6c7010fd23d62ab145bb66ea9d9b3e7411e7 Author: Martin Erik Werner Date: Tue Nov 22 03:46:00 2011 +0100 dadd dataPath.cpp to Jamfile Jamfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69ebcaa4c4e1ac904cddc5648fb0b0d2235a66a2 Author: Martin Erik Werner Date: Tue Nov 22 03:46:00 2011 +0100 openliero: integrate DataPath controller/localController.cpp | 2 +- gfx.cpp | 16 ++++++++-------- level.cpp | 2 +- main.cpp | 4 ++-- reader.cpp | 22 +++++++++++++--------- settings.cpp | 2 +- worm.cpp | 4 ++-- 7 files changed, 28 insertions(+), 24 deletions(-) commit 64e55c2d52b240fdc64edb9c0cc6feaac9872e2f Author: Martin Erik Werner Date: Tue Nov 22 03:46:00 2011 +0100 Add /*FIXME*/ tags to openliero for rewriting with dataPath controller/localController.cpp | 2 +- gfx.cpp | 16 ++++++++-------- level.cpp | 2 +- main.cpp | 4 ++-- reader.cpp | 2 +- settings.cpp | 2 +- worm.cpp | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) commit 401dfa1639928830bdb3cfb0ec598cf7bc4e879d Author: Martin Erik Werner Date: Tue Nov 22 03:46:00 2011 +0100 dataPath: yet more 80-char layout fixes dataPath.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4808b90ef6d9640c7c6e22787392aa3e3e21a2b2 Author: Martin Erik Werner Date: Tue Nov 22 03:46:00 2011 +0100 boostTesting: 80-char layout fixes boostTesting.cpp | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 48ad183231946c8b4603094aef2f18b666fe5c05 Author: Martin Erik Werner Date: Tue Nov 22 03:46:00 2011 +0100 dataPath & boostTesting: add copyright and description boostTesting.cpp | 27 +++++++++++++++++++++++++++ dataPath.hpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) commit 2c82e8aff693fc188c5dc8ecb1fa974579bf190e Author: Martin Erik Werner Date: Tue Nov 22 03:46:00 2011 +0100 dataPath: 80-char layout fixes dataPath.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 19ae2239506342803fef1b0828c072adc135b998 Author: Martin Erik Werner Date: Tue Nov 22 03:45:59 2011 +0100 boostTesting: test for incomplete filename in file() boostTesting.cpp | 5 +++++ 1 file changed, 5 insertions(+) commit a4a230332cd5bf71eaef9c4f921a61b882ab00de Author: Martin Erik Werner Date: Tue Nov 22 03:45:59 2011 +0100 dataPath: rm DataPath::; change comments * Don't define create_configdir() in .hpp and thus disable usage of "DataPath::" in calls to it * Remove the unused mkdir error handling * Add some comments with create_configdir() in file() dataPath.cpp | 19 +++++-------------- dataPath.hpp | 2 -- 2 files changed, 5 insertions(+), 16 deletions(-) commit 40be47f14065b86c18721c28c5dcb3280a242e4a Author: Martin Erik Werner Date: Tue Nov 22 03:45:59 2011 +0100 dataPath: factor out create_configdir() function dataPath.cpp | 22 ++++++++++++++++++++-- dataPath.hpp | 2 ++ 2 files changed, 22 insertions(+), 2 deletions(-) commit 4ddb725ac1dcfef8e5e99b1fcbf2b7a464b4ad63 Author: Martin Erik Werner Date: Tue Nov 22 03:45:59 2011 +0100 boostTesting: test when configdir doesn't exist boostTesting.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 08c3d1abc12813e6b6a09d3de3b04a4da93ba503 Author: Martin Erik Werner Date: Tue Nov 22 03:45:59 2011 +0100 dataPath: error handling that doesn't crash dataPath.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 85fe7cf6bd646ff56850f89cd6177a066e4f4dac Author: Martin Erik Werner Date: Tue Nov 22 03:45:59 2011 +0100 boostTesting: intermediate ConfigdirSetup fixture boostTesting.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 41997eae4cbe3b4f5b31cacc9008b2134daf591c Author: Martin Erik Werner Date: Tue Nov 22 03:45:59 2011 +0100 dataPath: error handling for configdir()w dataPath.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 51d14368218f0fe5b02680fbdf440ee5fd10b140 Author: Martin Erik Werner Date: Tue Nov 22 03:45:59 2011 +0100 dataPath: open files as ios::binary dataPath.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 43af5a78baffb7681436a4d162fadb5d9c39db43 Author: Martin Erik Werner Date: Tue Nov 22 03:45:58 2011 +0100 boostTesting: more indentation for broken strings boostTesting.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit aa1f519fbf5920e0fb0d7b9c490cebdc0bc36297 Author: Martin Erik Werner Date: Tue Nov 22 03:45:58 2011 +0100 space after keywords, for, if... boostTesting.cpp | 25 ++++++++++++------------- dataPath.cpp | 10 +++++----- 2 files changed, 17 insertions(+), 18 deletions(-) commit b6a3b69cfa31d3e264ca9c7100402f32a3662e68 Author: Martin Erik Werner Date: Tue Nov 22 03:45:58 2011 +0100 boostTesting: comment; rename cases; content check * Add some logic comments * rename testcases -> condition__Test1_Test2 * Add content checking for files, for overwrites, copying, etc. boostTesting.cpp | 125 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 112 insertions(+), 13 deletions(-) commit 89b0ecacad25189512065d73e414dc3a147060a2 Author: Martin Erik Werner Date: Tue Nov 22 03:45:58 2011 +0100 dataPath: ENOFILE->ENOTOPEN; rewording of comments dataPath.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9e02a3ce14e80d35156853f9e3809b2c95f34052 Author: Martin Erik Werner Date: Tue Nov 22 03:45:58 2011 +0100 rm temp fixture testing code boostTestingFixtures.cpp | 139 ---------------------------------------------- macrosboost.cpp | 67 ---------------------- 2 files changed, 206 deletions(-) commit d9982cb09dafb65dd272bb55cf831fbdbbabc294 Author: Martin Erik Werner Date: Tue Nov 22 03:45:58 2011 +0100 dataPath.hpp: no need for iostream unless we cout dataPath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62951ec1ad8bc83849d5bf5a383eda85e8dd2ba4 Author: Martin Erik Werner Date: Tue Nov 22 03:45:58 2011 +0100 boostTesting: code layout * make variables from r/w setup global, avoid duplicate declaration * save $HOME for recovery * Remove unused, outcommented map loop boostTesting.cpp | 41 +++++++---------------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) commit e7151522af9e507a4510a77149ffc293896ad61c Author: Martin Erik Werner Date: Tue Nov 22 03:45:58 2011 +0100 All cases with fixtures * All test cases now use fixtures * Saved away looping map code * Separate tests for no/ro/rw files setup boostTesting.cpp | 99 ++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 51 deletions(-) commit 89a8617ae80c3df92e1ec1c857d0eed8aff2662e Author: Martin Erik Werner Date: Tue Nov 22 03:45:57 2011 +0100 temporarily return ENOFILE dataPath.cpp | 3 +++ 1 file changed, 3 insertions(+) commit 0f6aff92f9b0146282b37571ccef1e4689f45e84 Author: Martin Erik Werner Date: Tue Nov 22 03:45:57 2011 +0100 lieroexe_path with fixtures; use close() boostTesting.cpp | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit b2b7c756a8a8464a5ff8d25b0113cd4bbb2207dd Author: Martin Erik Werner Date: Tue Nov 22 03:45:57 2011 +0100 dataPath: drop delimitor, add some erroring shell * Use '/' instead of delimitor var * Some more error handling outlining shell dataPath.cpp | 17 +++++++++++------ dataPath.hpp | 1 - 2 files changed, 11 insertions(+), 7 deletions(-) commit af3ba59491c8c37cd880fb551375660f1f6efe59 Author: Martin Erik Werner Date: Tue Nov 22 03:45:57 2011 +0100 boostTesting: dirs;r;w;all fixtures Create fixtures which initiates * directories + HOME env * ro files * rw files * all files Rework configdir testcases to use fixtures mute most enter/exit output boostTesting.cpp | 179 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 140 insertions(+), 39 deletions(-) commit a59d106f09f17f05cda9a5994c772b8c5e3ae285 Author: Martin Erik Werner Date: Tue Nov 22 03:45:57 2011 +0100 rm superflous a_ in .hpp, temporary working testcode boostTesting.cpp | 11 ++++++----- dataPath.hpp | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) commit d076a193a2ce21c9026ed9908f51c16bc0153fac Author: Martin Erik Werner Date: Tue Nov 22 03:45:57 2011 +0100 Init map as fn boostTesting.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit f4ae2a80eea1f725491da0ecb10d0407f6e0218a Author: Martin Erik Werner Date: Tue Nov 22 03:45:57 2011 +0100 acrosboost.cpp testing fixture marcos macrosboost.cpp | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 0045887e6bfde42591613f2566f6605d7780aedb Author: Martin Erik Werner Date: Tue Nov 22 03:45:57 2011 +0100 Start rewrite boosttesting with fixtures boostTestingFixtures.cpp | 139 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) commit e584caa13bc9b061a2e38a9b03e02cc1b3de1ea4 Author: Martin Erik Werner Date: Tue Nov 22 03:45:56 2011 +0100 start writing map access testcase boostTesting.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ dataPath.cpp | 3 --- dataPath.hpp | 2 +- 3 files changed, 45 insertions(+), 4 deletions(-) commit db853846ca2b2b341cff9bbcdfba06b52b0bb745 Author: Martin Erik Werner Date: Tue Nov 22 03:45:56 2011 +0100 Bulk of file() completed * Some reduction of provate members * Don't use cstdio * Needs testcases!! dataPath.cpp | 81 ++++++++++++++++++++++++++++++++++++++-------------------- dataPath.hpp | 3 ++- 2 files changed, 55 insertions(+), 29 deletions(-) commit 7774313cf2e267eb7add83f433f529ca0fc799bc Author: Martin Erik Werner Date: Tue Nov 22 03:45:56 2011 +0100 Add a filename->r/w map dataPath.cpp | 17 ++++++++++++++--- dataPath.hpp | 3 +++ 2 files changed, 17 insertions(+), 3 deletions(-) commit 5d4c04ea11c951943ab0da390c608bed18e4fcc2 Author: Arand Nash Date: Tue Nov 22 03:45:56 2011 +0100 Use FILENAME_MAX for char pointers boostTesting.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 4e79aaf36cbb554e39386a72a55faa2734b73f70 Author: Arand Nash Date: Tue Nov 22 03:45:56 2011 +0100 file(*) for readonly files * Simple implementation of file(*), returning filename path. * Make use of delimitor char in building full path. * input to DataPath is directory of lieroexe, rather than file. dataPath.cpp | 25 +++++++++++++++++++------ dataPath.hpp | 8 +++++--- 2 files changed, 24 insertions(+), 9 deletions(-) commit 99d3d69f59aa02b6a24c99d006740d02d5c51b89 Author: Arand Nash Date: Tue Nov 22 03:45:56 2011 +0100 Implement testing for lieroexe boostTesting.cpp | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) commit 27f1b676d0e721c6a27e2e125f16912de13b50ed Author: Arand Nash Date: Tue Nov 22 03:45:56 2011 +0100 Implement configdir with a simple mkdir dataPath.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 186669c32ef3a2132adf0f831b97af5bf843d5df Author: Arand Nash Date: Tue Nov 22 03:45:56 2011 +0100 use *home, correct strcmp check, make tmpdir local boostTesting.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 56df0bf138560eb285d044f07eea064c584869dd Author: Arand Nash Date: Tue Nov 22 03:45:56 2011 +0100 boostTest: fix allocation, strcpy, type mismatch boostTesting.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 2d571e1b090ca224a9288b6a9cc7eff9ff86bcf7 Author: Arand Nash Date: Tue Nov 22 03:45:55 2011 +0100 Update datapath object with constructors dataPath.cpp | 13 +++++++------ dataPath.hpp | 9 +++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) commit 4db49f8ca38d887c19bea6db26a24337f8c8a2a6 Author: Arand Nash Date: Tue Nov 22 03:45:55 2011 +0100 configdir tests should be complete (const char mess) boostTesting.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit e033c62d90991a9d09d424b66d0c8edcc21554e5 Author: Arand Nash Date: Tue Nov 22 03:45:55 2011 +0100 return /tmp to test the test dawg dataPath.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7f5a0f95224cabece8263245df2a37ab0bc5a366 Author: Arand Nash Date: Tue Nov 22 03:45:55 2011 +0100 Two configdir test cases boostTesting.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) commit 60ece521ea56023c74d1d48d3f2818473bdbfa0b Author: Arand Nash Date: Tue Nov 22 03:45:55 2011 +0100 Add boost unit testing template boostTesting.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 416f216181daa78914a7328382fe697af4d00ad3 Author: Arand Nash Date: Tue Nov 22 03:45:55 2011 +0100 fixup string and namespace usage dataPath.cpp | 6 +++--- dataPath.hpp | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit f9f6d3c280f2b5c9681e11ef8bbf3171603003d4 Author: Arand Nash Date: Tue Nov 22 03:45:55 2011 +0100 add muck syntax dataPath.cpp | 8 ++++---- dataPath.hpp | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) commit 3ff7142b0e17b480abb703108bd9d40b7fb1fa43 Author: Arand Nash Date: Tue Nov 22 03:45:55 2011 +0100 basic skeleton hpp and cpp files for datapath dataPath.cpp | 12 ++++++++++++ dataPath.hpp | 12 ++++++++++++ 2 files changed, 24 insertions(+) commit 701f499084646a41528ab298a6b365dc91c99ad1 Author: Arand Nash Date: Tue Nov 22 03:45:54 2011 +0100 file outlining datapath object 01_datapath_object_outline | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit ca69f8cab5e764c4738e4fee026761a4d086ceef Author: Erik Lindroos Date: Sun Jan 24 01:52:05 2010 +0100 Fixed Jamfile Jamfile | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit 338d9a6644f6a4e97c3b8ae5742aeb84bdfacfa3 Author: Erik Lindroos Date: Sun Jan 24 01:09:03 2010 +0100 Fixes for mingw, style fixes, fix for control issues from dig button hack _build/liero.sln | 10 +- _build/liero.vcproj | 440 +++++++++++++++++++++++++++++++++++---- console.cpp | 10 +- controller/controller.hpp | 11 +- controller/localController.cpp | 23 +- controller/localController.hpp | 9 + controller/replayController.cpp | 2 + controller/replayController.hpp | 11 + filesystem.cpp | 8 +- game.cpp | 7 +- gfx.cpp | 157 +++++++------- gfx.hpp | 2 +- gfx/blit.hpp | 6 +- gfx/color.hpp | 6 +- gfx/font.hpp | 6 +- keys.cpp | 229 +++----------------- keys.hpp | 6 +- main.cpp | 16 +- menu/arrayEnumBehavior.hpp | 6 +- menu/booleanSwitchBehavior.hpp | 6 +- menu/enumBehavior.hpp | 8 +- menu/hiddenMenu.hpp | 6 +- menu/integerBehavior.hpp | 6 +- menu/itemBehavior.hpp | 6 +- menu/menu.hpp | 6 +- menu/menuItem.hpp | 6 +- menu/timeBehavior.hpp | 6 +- platform.hpp | 10 - rand.hpp | 50 +---- replay.cpp | 4 +- replay.hpp | 5 +- sdlmain.cpp | 4 +- settings.cpp | 152 +------------- sfx.cpp | 49 ++++- sfx.hpp | 5 +- sys.cpp | 2 +- sys.hpp | 10 +- worm.cpp | 4 +- worm.hpp | 44 ++-- 39 files changed, 702 insertions(+), 652 deletions(-) commit d4c386b5153d4a236442a4f944f89f4d80df1b44 Author: basro <> Date: Sat Jan 23 14:06:29 2010 -0300 Added a dig key, since its impossible to dig if you control the worm using a joystick hat or axis. controller/localController.cpp | 8 +++- game.cpp | 6 ++- gfx.cpp | 89 +++++++++------------------------------- settings.hpp | 2 +- worm.hpp | 20 +++++---- 5 files changed, 42 insertions(+), 83 deletions(-) commit 10a84a041894e1ba40f3a882ecef0543fa6778e7 Author: basro <> Date: Tue Jan 19 19:03:33 2010 -0300 Preliminar gamepad support. --HG-- rename : gfx/colour.hpp => gfx/color.hpp rename : menu/booleanSwitchBehaviour.cpp => menu/booleanSwitchBehavior.cpp rename : menu/booleanSwitchBehaviour.hpp => menu/booleanSwitchBehavior.hpp rename : menu/enumBehaviour.cpp => menu/enumBehavior.cpp rename : menu/enumBehaviour.hpp => menu/enumBehavior.hpp rename : menu/integerBehaviour.cpp => menu/integerBehavior.cpp rename : menu/integerBehaviour.hpp => menu/integerBehavior.hpp rename : menu/itemBehaviour.cpp => menu/itemBehavior.cpp rename : menu/itemBehaviour.hpp => menu/itemBehavior.hpp rename : menu/timeBehaviour.cpp => menu/timeBehavior.cpp rename : menu/timeBehaviour.hpp => menu/timeBehavior.hpp bobject.cpp | 4 +- bobject.hpp | 2 +- common.cpp | 10 +- common.hpp | 2 +- game.cpp | 5 +- gfx.cpp | 224 +++++++++++++++++++++++++-------------- gfx.hpp | 17 ++- gfx/blit.cpp | 36 ++++--- gfx/blit.hpp | 10 +- gfx/color.hpp | 6 ++ gfx/colour.hpp | 6 -- gfx/font.cpp | 10 +- gfx/font.hpp | 8 +- gfx/palette.cpp | 2 +- gfx/sprite.cpp | 52 +++++++++ gfx/sprite.hpp | 2 +- keys.hpp | 15 +++ level.cpp | 4 +- main.cpp | 2 +- menu/arrayEnumBehavior.hpp | 30 ++++++ menu/booleanSwitchBehavior.cpp | 34 ++++++ menu/booleanSwitchBehavior.hpp | 24 +++++ menu/booleanSwitchBehaviour.cpp | 34 ------ menu/booleanSwitchBehaviour.hpp | 24 ----- menu/enumBehavior.cpp | 49 +++++++++ menu/enumBehavior.hpp | 32 ++++++ menu/enumBehaviour.cpp | 49 --------- menu/enumBehaviour.hpp | 32 ------ menu/hiddenMenu.cpp | 86 +++++++++++++++ menu/hiddenMenu.hpp | 31 ++++++ menu/integerBehavior.cpp | 57 ++++++++++ menu/integerBehavior.hpp | 32 ++++++ menu/integerBehaviour.cpp | 57 ---------- menu/integerBehaviour.hpp | 32 ------ menu/itemBehavior.cpp | 3 + menu/itemBehavior.hpp | 23 ++++ menu/itemBehaviour.cpp | 3 - menu/itemBehaviour.hpp | 23 ---- menu/menu.cpp | 12 +-- menu/menu.hpp | 16 +-- menu/menuItem.cpp | 2 +- menu/menuItem.hpp | 8 +- menu/timeBehavior.cpp | 14 +++ menu/timeBehavior.hpp | 20 ++++ menu/timeBehaviour.cpp | 14 --- menu/timeBehaviour.hpp | 20 ---- ninjarope.cpp | 2 +- nobject.cpp | 16 +-- nobject.hpp | 6 +- replay.cpp | 4 +- settings.cpp | 4 +- settings.hpp | 16 ++- version.hpp | 2 +- viewport.cpp | 12 +-- weapon.cpp | 2 +- weapon.hpp | 2 +- weapsel.cpp | 2 +- worm.cpp | 4 +- worm.hpp | 41 ++++--- 59 files changed, 799 insertions(+), 492 deletions(-) commit af6e209e601fa1733c09dfcff27da0de865311a9 Author: basro <> Date: Sun Jan 17 14:54:29 2010 -0300 Added blit.hpp header. Moved blitting functions into it. gfx.hpp | 39 ++++++++------------------------------- gfx/blit.hpp | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 31 deletions(-) commit e273e752102e84066a636168ac1cc3c12b46de62 Author: basro <> Date: Sun Jan 17 14:44:58 2010 -0300 GFX and Controller code refactor. Moved gfx related stuff into gfx/ Split controller.hpp into multiple files and placed them in controller/. --HG-- rename : controller.hpp => controller/controller.hpp rename : blit.cpp => gfx/blit.cpp rename : colour.hpp => gfx/colour.hpp rename : font.cpp => gfx/font.cpp rename : font.hpp => gfx/font.hpp rename : palette.cpp => gfx/palette.cpp rename : palette.hpp => gfx/palette.hpp rename : sprite.hpp => gfx/sprite.hpp blit.cpp | 481 ---------------------------------- bobject.cpp | 2 +- colour.hpp | 6 - common.hpp | 6 +- controller.hpp | 550 --------------------------------------- controller/commonController.cpp | 46 ++++ controller/commonController.hpp | 16 ++ controller/controller.hpp | 47 ++++ controller/localController.cpp | 261 +++++++++++++++++++ controller/localController.hpp | 46 ++++ controller/replayController.cpp | 168 ++++++++++++ controller/replayController.hpp | 42 +++ font.cpp | 125 --------- font.hpp | 40 --- gfx.cpp | 109 +------- gfx.hpp | 29 +-- gfx/blit.cpp | 479 ++++++++++++++++++++++++++++++++++ gfx/colour.hpp | 6 + gfx/font.cpp | 125 +++++++++ gfx/font.hpp | 40 +++ gfx/palette.cpp | 115 ++++++++ gfx/palette.hpp | 54 ++++ gfx/sprite.hpp | 26 ++ level.cpp | 2 +- level.hpp | 2 +- menu/menu.hpp | 2 +- menu/menuItem.hpp | 2 +- ninjarope.cpp | 2 +- palette.cpp | 115 -------- palette.hpp | 54 ---- sprite.hpp | 26 -- 31 files changed, 1489 insertions(+), 1535 deletions(-) commit 55f222f86b28c8bfb08f36c4fb40c2a076b4eafb Author: basro <> Date: Sun Jan 17 14:41:58 2010 -0300 Changed exception to runtime_error. filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 438474df2d3a1b4f24dbede39cfade5ee4a5ef14 Author: basro <> Date: Sat Jan 16 22:31:56 2010 -0300 Great start, forgot to add the files in the previous commit :) menu/booleanSwitchBehaviour.cpp | 34 +++++++++++++++++++++++ menu/booleanSwitchBehaviour.hpp | 24 +++++++++++++++++ menu/enumBehaviour.cpp | 49 +++++++++++++++++++++++++++++++++ menu/enumBehaviour.hpp | 32 ++++++++++++++++++++++ menu/integerBehaviour.cpp | 57 +++++++++++++++++++++++++++++++++++++++ menu/integerBehaviour.hpp | 32 ++++++++++++++++++++++ menu/itemBehaviour.cpp | 3 +++ menu/itemBehaviour.hpp | 23 ++++++++++++++++ menu/menuItem.cpp | 39 +++++++++++++++++++++++++++ menu/menuItem.hpp | 35 ++++++++++++++++++++++++ menu/timeBehaviour.cpp | 14 ++++++++++ menu/timeBehaviour.hpp | 20 ++++++++++++++ 12 files changed, 362 insertions(+) commit 0c7a9ba3833b82de21a54cdcae710b09c9672428 Author: basro <> Date: Sat Jan 16 22:18:35 2010 -0300 Code refactor and changes to make the code compile with MinGW. Changed game.settings->selectableWeapons into Settings::selectableWeapons in several files. Split menu.hpp/.cpp into multiple files and placed them in a new subfolder named menu. --HG-- rename : menu.cpp => menu/menu.cpp rename : menu.hpp => menu/menu.hpp gfx.hpp | 2 +- menu.cpp | 448 --------------------------------------------------------- menu.hpp | 265 ---------------------------------- menu/menu.cpp | 291 +++++++++++++++++++++++++++++++++++++ menu/menu.hpp | 155 ++++++++++++++++++++ weapsel.cpp | 12 +- weapsel.hpp | 2 +- worm.cpp | 8 +- 8 files changed, 458 insertions(+), 725 deletions(-) commit bee3493f70ce70c922fd7da34828b9a4c27f0f06 Author: Erik Lindroos Date: Thu Aug 20 19:14:41 2009 +0200 Enlarged replay and profile menus, added added case-insensitive sorting to the replay, profile and level menus font.cpp | 6 +++++ font.hpp | 4 +++- gfx.cpp | 76 ++++++++++++++++++++++++++++++++++++++++---------------------- text.cpp | 17 ++++++++++++++ text.hpp | 3 ++- 5 files changed, 77 insertions(+), 29 deletions(-) commit 34b63963bf85ef434cfaa9ce71d1f26ddebfc7a8 Author: Erik Lindroos Date: Thu Aug 20 18:39:09 2009 +0200 Fixed exception with slightly too large levels with powerlevel loading enabled level.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4f824546465d6ae172a0c42dc5df7d4b190abde Author: Erik Lindroos Date: Thu Aug 20 18:14:23 2009 +0200 Forgot to remove test code sfx.cpp | 2 -- 1 file changed, 2 deletions(-) commit 04aae51280ef07acd08cf5534c2eb011a2f91ddc Author: Erik Lindroos Date: Thu Aug 20 18:11:24 2009 +0200 Fixed unavailable sound, added NDEBUG to Jamfile Jamfile | 4 ++-- sfx.cpp | 36 ++++++++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 12 deletions(-) commit 59a161796a2b817b00ab67462131cb1b65af837e Author: Erik Lindroos Date: Thu Aug 20 17:37:11 2009 +0200 Updated Jamfile Jamfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d2856ba2d44e8e156b03f78f325f1ff199b01d5d Author: Erik Lindroos Date: Tue Aug 18 21:59:20 2009 +0200 Fixed viewport status messages blit.cpp | 20 ++------------ font.cpp | 80 +++++++++++++++++++++++++++----------------------------- gfx/macros.hpp | 19 ++++++++++++++ 3 files changed, 59 insertions(+), 60 deletions(-) commit f5a433a05897ad59aefe285303f0c27f2bfd8208 Author: Erik Lindroos Date: Tue Aug 18 21:36:58 2009 +0200 Fixed gcc warnings, fixed some graphics bugs when changing mode .hgignore | 4 +++- Jamfile | 9 ++++++--- common.cpp | 4 ++-- font.cpp | 2 +- game.cpp | 2 +- game.hpp | 19 ++++++++----------- gfx.cpp | 29 ++++++++--------------------- gfx.hpp | 5 +++-- level.cpp | 6 +++--- main.cpp | 22 ++++++++++++---------- menu.cpp | 2 +- palette.cpp | 2 +- reader.hpp | 31 +++++++++++++++++++------------ replay.cpp | 8 ++++---- settings.cpp | 2 +- settings.hpp | 2 +- sfx.cpp | 28 +++++++++++++++++++++++----- sfx.hpp | 12 +++++++++--- weapsel.cpp | 2 -- worm.cpp | 1 - 20 files changed, 106 insertions(+), 86 deletions(-) commit 6c0dcb3cca43d9c8d8a84c7c0df6a4a84ac0c1fb Author: Erik Lindroos Date: Tue Aug 18 18:33:21 2009 +0200 Added .hgignore .hgignore | 5 +++++ 1 file changed, 5 insertions(+) commit 819cff0554f02e4fc2611e2b930ccf8dc4343358 Author: glip@glip-vm Date: Tue Aug 18 07:54:46 2009 +0200 Fixes for gcc/linux Jamfile | 17 ++++++++++------- console.cpp | 4 ++-- gfx.cpp | 19 ++++++++++--------- menu.hpp | 2 +- reader.hpp | 4 ++-- settings.cpp | 4 ++-- settings.hpp | 3 ++- sfx.hpp | 3 ++- text.hpp | 3 ++- worm.hpp | 7 +++++-- 10 files changed, 38 insertions(+), 28 deletions(-) commit 4299c0ded83f6a47d5e0ae732144116feeca3236 Author: Erik Lindroos Date: Mon Aug 17 20:02:44 2009 +0200 Minor fix of replay ending controller.hpp | 8 ++++---- gfx.cpp | 2 +- weapsel.cpp | 28 +++++++++++----------------- 3 files changed, 16 insertions(+), 22 deletions(-) commit 14abe747e930c38204543878bc3eb8307162f1ac Merge: c7694ee d2ffc26 Author: glip@eee Date: Sat Aug 15 22:10:39 2009 +0200 Merged in cleanup branch commit d2ffc26ed8f838f240d3cf60ab554d4988bb9582 Author: glip@eee Date: Sat Aug 15 22:00:00 2009 +0200 Tweaks with replays mostly --HG-- branch : cleanup _build/liero.vcproj | 4 + controller.hpp | 104 +++++++++---- fastObjectList.hpp | 31 ++-- font.cpp | 4 +- game.cpp | 23 ++- game.hpp | 6 +- gfx.cpp | 424 ++++++++++++++++++++++++++++++++++----------------- gfx.hpp | 5 +- gfx/macros.hpp | 6 +- main.cpp | 2 + palette.cpp | 1 + replay.cpp | 19 ++- replay.hpp | 10 +- settings.cpp | 2 + settings.hpp | 41 ++++- text.cpp | 17 +++ text.hpp | 1 + version.hpp | 6 + viewport.cpp | 8 +- viewport.hpp | 2 +- weapsel.cpp | 13 ++ weapsel.hpp | 4 + worm.cpp | 52 ++++--- worm.hpp | 34 ++++- 24 files changed, 597 insertions(+), 222 deletions(-) commit 37c2a9ed0362b0ab930061b3aacbdea22aa21937 Author: glip@desktop Date: Wed Aug 12 02:26:43 2009 +0200 Generalized FILTER_X macro --HG-- branch : cleanup gfx.cpp | 4 +- gfx/macros.hpp | 139 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 72 insertions(+), 71 deletions(-) commit 76b12f24e5fdd8d03d925f168409c9471b747812 Author: glip@desktop Date: Tue Aug 11 23:03:17 2009 +0200 Minor fixes --HG-- branch : cleanup controller.hpp | 2 +- gfx.cpp | 113 +++++++++++++++++++++++++++++++++++++++++++------------- main.cpp | 32 ++-------------- menu.hpp | 5 +++ 4 files changed, 98 insertions(+), 54 deletions(-) commit 9140d1e91fb31af1e191f6bbbe4225c3e2acce95 Author: glip@desktop Date: Tue Aug 11 20:06:26 2009 +0200 Forgot to add fastObjectList.hpp --HG-- branch : cleanup fastObjectList.hpp | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) commit 9992608823d819c602fe80563519d63379465d5e Author: glip@desktop Date: Tue Aug 11 20:01:48 2009 +0200 Lots of changes, fixes.. --HG-- branch : cleanup _build/liero.vcproj | 12 + bobject.cpp | 12 +- bobject.hpp | 7 +- common.hpp | 2 - constants.cpp | 35 + constants.hpp | 9 + controller.hpp | 319 +++++++-- filesystem.cpp | 88 ++- filesystem.hpp | 6 + font.cpp | 16 +- font.hpp | 6 +- game.cpp | 90 +-- game.hpp | 10 +- gfx.cpp | 1876 ++++++++++++++++++++++++++++++--------------------- gfx.hpp | 85 ++- gfx/macros.hpp | 155 +++++ level.cpp | 2 +- main.cpp | 41 +- menu.cpp | 406 ++++++++++- menu.hpp | 220 +++++- nobject.cpp | 11 +- palette.cpp | 35 +- palette.hpp | 4 +- rand.hpp | 8 +- replay.cpp | 788 ++++++++++------------ replay.hpp | 68 +- settings.cpp | 64 +- settings.hpp | 233 ++++++- sfx.cpp | 8 +- sfx.hpp | 34 +- sobject.cpp | 9 +- viewport.cpp | 40 +- weapon.cpp | 9 +- weapsel.cpp | 85 ++- weapsel.hpp | 5 +- worm.cpp | 310 ++++++--- worm.hpp | 127 +++- 37 files changed, 3534 insertions(+), 1701 deletions(-) commit 2b4db15ad94ef1eb13fc864ef189617ac0753f03 Author: glip@eee.lan Date: Mon Aug 3 17:39:01 2009 +0200 Working replays, adaptive graphics size, exact liero object list behavior --HG-- branch : cleanup _build/liero.sln | 20 +- _build/liero.vcproj | 14 +- bobject.hpp | 3 +- bonus.hpp | 3 +- controller.hpp | 11 +- exactObjectList.hpp | 180 +++++++++++++++++ game.cpp | 57 ++---- game.hpp | 10 +- gfx.cpp | 234 ++++++++++++++-------- gfx.hpp | 3 +- math.cpp | 6 +- menu.cpp | 2 +- menu.hpp | 6 +- nobject.cpp | 28 ++- nobject.hpp | 3 +- objectList.hpp | 36 ++-- replay.cpp | 545 ++++++++++++++++++++++++++++++++++++++++----------- replay.hpp | 35 ++-- sobject.cpp | 15 +- sobject.hpp | 4 +- viewport.cpp | 10 +- viewport.hpp | 12 +- weapon.cpp | 37 +++- weapon.hpp | 9 +- weapsel.cpp | 6 +- worm.cpp | 96 ++++----- worm.hpp | 13 +- 27 files changed, 1026 insertions(+), 372 deletions(-) commit 6655738dfb4ffae065e196b34ba922acc53ef865 Author: glip@eee Date: Sun Feb 15 18:11:35 2009 +0200 Some broken changes. --HG-- branch : cleanup replay.cpp | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- worm.hpp | 18 +++---- 2 files changed, 169 insertions(+), 12 deletions(-) commit 42424c5dc278fbebd50a2764a98ce05c674cd351 Author: glip@desktop Date: Thu Feb 12 23:20:24 2009 +0100 Initial hardcoded replay support. Does not work reliably. --HG-- branch : cleanup _build/liero.vcproj | 13 ++- controller.hpp | 164 +++++++++++++++++++++++++++++++- game.cpp | 50 +++++----- game.hpp | 1 + gfx.cpp | 6 ++ level.cpp | 11 ++- level.hpp | 2 + replay.cpp | 261 +++++++++++++++++++++++++++++++++++++++++++++++++++ replay.hpp | 59 ++++++++++++ weapsel.cpp | 17 +--- worm.cpp | 16 ++++ worm.hpp | 54 ++++++++++- 12 files changed, 602 insertions(+), 52 deletions(-) commit 863ec948dd08ab62dd2953d8483d3d8adad6f5b8 Author: glip@desktop Date: Mon Feb 9 21:48:43 2009 +0100 Moved project files into _build. --HG-- branch : cleanup rename : liero.sln => _build/liero.sln rename : liero.vcproj => _build/liero.vcproj _build/liero.sln | 47 ++++++ _build/liero.vcproj | 440 ++++++++++++++++++++++++++++++++++++++++++++++++++ liero.sln | 47 ------ liero.vcproj | 444 --------------------------------------------------- 4 files changed, 487 insertions(+), 491 deletions(-) commit bf94169db2aa07a9cee9bba7342c1b69c71ac9ea Author: glip@desktop Date: Mon Feb 9 20:17:01 2009 +0100 Made Game a truly isolated class. Added Controller class that controls a game. --HG-- branch : cleanup blit.cpp | 92 +++---- bobject.cpp | 14 +- bobject.hpp | 6 +- bonus.cpp | 14 +- bonus.hpp | 4 +- common.cpp | 458 ++++++++++++++++++++++++++++++++ common.hpp | 164 ++++++++++++ constants.cpp | 7 +- constants.hpp | 8 +- controller.hpp | 174 +++++++++++++ game.cpp | 792 +++++++++++++++++--------------------------------------- game.hpp | 143 ++-------- gfx.cpp | 652 +++++++++++++++++++++------------------------- gfx.hpp | 123 +++------ keys.hpp | 2 + level.cpp | 148 ++++++----- level.hpp | 35 ++- liero.sln | 28 ++ liero.vcproj | 30 ++- main.cpp | 88 ++++--- math.cpp | 1 + menu.cpp | 16 +- menu.hpp | 6 +- ninjarope.cpp | 22 +- nobject.cpp | 42 +-- nobject.hpp | 7 +- palette.cpp | 109 ++++++++ palette.hpp | 52 ++++ settings.cpp | 71 +++-- settings.hpp | 5 +- sfx.hpp | 51 ++++ sobject.cpp | 40 +-- sobject.hpp | 5 +- sprite.hpp | 26 ++ viewport.cpp | 156 +++++------ viewport.hpp | 8 +- weapon.cpp | 56 ++-- weapon.hpp | 7 +- weapsel.cpp | 453 +++++++++++++------------------- weapsel.hpp | 24 +- worm.cpp | 271 ++++++++++--------- worm.hpp | 49 +--- 42 files changed, 2523 insertions(+), 1936 deletions(-) commit e4b21bb7e803c624144962726fdd46246457e366 Author: glip@desktop Date: Fri Jan 30 20:23:39 2009 +0100 Decoupled worm controls from input source. --HG-- branch : cleanup game.cpp | 238 +++++++++++++++++++++++++++++++++------------------------- game.hpp | 9 ++- gfx.cpp | 6 ++ liero.vcproj | 2 +- main.cpp | 1 + viewport.cpp | 4 +- weapon.cpp | 6 +- weapsel.cpp | 14 ++-- worm.cpp | 110 +++++++++++++-------------- worm.hpp | 62 +++++++++++++-- 10 files changed, 276 insertions(+), 176 deletions(-) commit c7694eecacf1ada41f6a21109e80dc8031d9f4cc Author: glip@desktop Date: Fri Jan 30 18:52:35 2009 +0100 Liero 1.34 Jamfile | 16 + blit.cpp | 497 ++++++++++++++++++ bobject.cpp | 60 +++ bobject.hpp | 18 + bonus.cpp | 35 ++ bonus.hpp | 24 + colour.hpp | 6 + console.cpp | 227 +++++++++ console.hpp | 38 ++ constants.cpp | 318 ++++++++++++ constants.hpp | 148 ++++++ filesystem.cpp | 312 ++++++++++++ filesystem.hpp | 72 +++ font.cpp | 111 ++++ font.hpp | 38 ++ game.cpp | 845 +++++++++++++++++++++++++++++++ game.hpp | 182 +++++++ gfx.cpp | 1539 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ gfx.hpp | 268 ++++++++++ keys.cpp | 305 +++++++++++ keys.hpp | 15 + level.cpp | 251 +++++++++ level.hpp | 50 ++ lfs.hpp | 78 +++ liero.sln | 19 + liero.vcproj | 418 +++++++++++++++ main.cpp | 192 +++++++ math.cpp | 24 + math.hpp | 28 ++ menu.cpp | 88 ++++ menu.hpp | 48 ++ ninjarope.cpp | 119 +++++ nobject.cpp | 356 +++++++++++++ nobject.hpp | 58 +++ objectList.hpp | 163 ++++++ platform.hpp | 10 + rand.hpp | 48 ++ reader.cpp | 104 ++++ reader.hpp | 114 +++++ rect.hpp | 208 ++++++++ sdlmain.cpp | 27 + settings.cpp | 284 +++++++++++ settings.hpp | 49 ++ sfx.cpp | 120 +++++ sfx.hpp | 35 ++ sobject.cpp | 263 ++++++++++ sobject.hpp | 40 ++ sys.cpp | 19 + sys.hpp | 15 + text.cpp | 56 +++ text.hpp | 34 ++ viewport.cpp | 651 ++++++++++++++++++++++++ viewport.hpp | 70 +++ weapon.cpp | 418 +++++++++++++++ weapon.hpp | 90 ++++ weapsel.cpp | 612 ++++++++++++++++++++++ weapsel.hpp | 6 + worm.cpp | 1396 ++++++++++++++++++++++++++++++++++++++++++++++++++ worm.hpp | 260 ++++++++++ 59 files changed, 11895 insertions(+) lierolibre-0.5/INSTALL000066400000000000000000000366001205125547100145460ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. lierolibre-0.5/Makefile.am000066400000000000000000000541411205125547100155510ustar00rootroot00000000000000ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I src/m4 appicondir = $(datarootdir)/icons/hicolor/scalable/apps desktopdir = $(datarootdir)/applications # For sedding in wrapper script later on CFGFILE = liero.cfg # For nixbin-dist PACKAGE_DIRNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) NIXBIN_DIRNAME = $(PACKAGE_DIRNAME)_linux-$(build_cpu) pkglibexec_PROGRAMS = lierolibre # It seems it only includes src/../ by default lierolibre_CPPFLAGS = $(LIBCONFIGXX_CPPFLAGS) $(GVL_CPPFLAGS) $(SDL_CPPFLAGS) -I$(srcdir)/src $(WINDOWS_CPPFLAGS) lierolibre_CFLAGS = $(LIBCONFIGXX_CFLAGS) $(SDL_MIXER_CFLAGS) $(SDL_CFLAGS) $(RELPATH_CFLAGS) lierolibre_CXXFLAGS = $(SDL_CXXFLAGS) $(RELPATH_CFLAGS) lierolibre_LDADD = src/gvl/libgvl.la $(LIBCONFIGXX_LIBS) $(SDL_MIXER_LIBS) $(SDL_LIBS) $(BOOST_PO_LIBS) lierolibre_LDFLAGS = $(RELPATH_LDFLAGS) $(WINDOWS_LDFLAGS) noinst_LTLIBRARIES = src/gvl/libgvl.la src_gvl_libgvl_la_CFLAGS = $(ZLIB_CFLAGS) $(RELPATH_CFLAGS) src_gvl_libgvl_la_LIBADD = $(ZLIB_LIBS) src_gvl_libgvl_la_LDFLAGS = $(RELPATH_LDFLAGS) EXTRA_PROGRAMS = src/gvl/gvltest src_gvl_gvltest_CFLAGS = $(ZLIB_CFLAGS) $(RELPATH_CFLAGS) src_gvl_gvltest_LDFLAGS = $(ZLIB_LIBS) $(LIBRT) $(RELPATH_LDFLAGS) src_gvl_gvltest_LDADD = src/gvl/libgvl.la nodist_bin_SCRIPTS = \ scripts/lierolibre dist_bin_SCRIPTS = \ scripts/lierolibre-extractgfx \ scripts/lierolibre-packgfx \ scripts/lierolibre-extractsounds \ scripts/lierolibre-packsounds \ scripts/lierolibre-extractlev \ scripts/lierolibre-packlev dist_noinst_SCRIPTS = \ autogen.sh \ scripts/cross-compile \ scripts/lierolibre.am \ src/Jamfile \ src/dummy_config.h \ src/gvl/Jamfile nodist_man6_MANS = \ man/lierolibre.6 \ man/lierolibre-extractgfx.6 \ man/lierolibre-packgfx.6 \ man/lierolibre-extractsounds.6 \ man/lierolibre-packsounds.6 \ man/lierolibre-extractlev.6 \ man/lierolibre-packlev.6 # For nixbin MANS_TXT = $(nodist_man6_MANS:.6=.txt) dist_doc_DATA = \ AUTHORS \ ChangeLog \ NEWS \ README dist_desktop_DATA = \ data/lierolibre.desktop dist_appicon_DATA = \ data/lierolibre.svg dist_pkgdata_DATA = \ data/LIERO.CHR \ data/LIERO.DAT \ data/LIERO.OPT \ data/LIERO.SND \ data/NAMES.DAT \ data/liero.cfg MANPAGES_SOURCES = \ man/lierolibre.6.am \ man/lierolibre-extractgfx.6.am \ man/lierolibre-packgfx.6.am \ man/lierolibre-extractsounds.6.am \ man/lierolibre-packsounds.6.am \ man/lierolibre-extractlev.6.am \ man/lierolibre-packlev.6.am GRAPHICS_SOURCES = \ data/graphics/gfx1.xpm \ data/graphics/gfx2.xpm \ data/graphics/gfx3.xpm SOUND_SOURCES = \ data/sounds/ALIVE.wav \ data/sounds/BAZOOKA.wav \ data/sounds/BEGIN.wav \ data/sounds/BLASTER.wav \ data/sounds/BOING.wav \ data/sounds/BUMP.wav \ data/sounds/BURNER.wav \ data/sounds/DEATH1.wav \ data/sounds/DEATH2.wav \ data/sounds/DEATH3.wav \ data/sounds/DIRT.wav \ data/sounds/DROPSHEL.wav \ data/sounds/EXP2.wav \ data/sounds/EXP3.wav \ data/sounds/EXP3A.wav \ data/sounds/EXP3B.wav \ data/sounds/EXP4.wav \ data/sounds/EXP5.wav \ data/sounds/HURT1.wav \ data/sounds/HURT2.wav \ data/sounds/HURT3.wav \ data/sounds/LARPA.wav \ data/sounds/MOVEDOWN.wav \ data/sounds/MOVEUP.wav \ data/sounds/RELOADED.wav \ data/sounds/RIFLE.wav \ data/sounds/SELECT.wav \ data/sounds/SHOT.wav \ data/sounds/SHOTGUN.wav \ data/sounds/THROW.wav WINDOWS_SOURCES = \ scripts/lierolibre-cmd.bat \ src/gvl/_build/Gvl_C++0x.props \ src/gvl/_build/Gvl_IEEE_SEE2.props \ src/gvl/_build/Gvl_Standard_Config.props \ src/gvl/_build/gvl.vcproj \ src/gvl/_build/gvl.vcxproj \ src/gvl/_build/gvl.vcxproj.filters \ windows/visualC/liero.vcproj \ windows/visualC/liero.vcxproj \ windows/visualC/lierolibre.sln dist_noinst_DATA = \ $(GRAPHICS_SOURCES) \ $(MANPAGES_SOURCES) \ $(SOUND_SOURCES) \ $(WINDOWS_SOURCES) \ COPYING \ COPYING_winbin \ README.txt \ README_linuxbin \ data/FILE_ID.DIZ \ data/LICENSE.TXT \ data/LIERO.TXT \ data/LIEROENG.TXT \ data/lierolibre.xpm \ data/sounds/sounds.txt \ lgpl-2.1.txt lierolibre_SOURCES = \ src/binReader.cpp \ src/bobject.cpp \ src/bonus.cpp \ src/common.cpp \ src/console.cpp \ src/constants.cpp \ src/filesystem.cpp \ src/game.cpp \ src/gfx.cpp \ src/keys.cpp \ src/level.cpp \ src/main.cpp \ src/math.cpp \ src/ninjarope.cpp \ src/nobject.cpp \ src/rand.cpp \ src/reader.cpp \ src/replay.cpp \ src/sdlmain.cpp \ src/settings.cpp \ src/sfx.cpp \ src/sobject.cpp \ src/sys.cpp \ src/text.cpp \ src/viewport.cpp \ src/weapon.cpp \ src/weapsel.cpp \ src/worm.cpp \ \ src/binReader.hpp \ src/bobject.hpp \ src/bonus.hpp \ src/common.hpp \ src/console.hpp \ src/constants.hpp \ src/exactObjectList.hpp \ src/fastObjectList.hpp \ src/filesystem.hpp \ src/game.hpp \ src/gfx.hpp \ src/keys.hpp \ src/level.hpp \ src/lfs.hpp \ src/math.hpp \ src/nobject.hpp \ src/objectList.hpp \ src/rand.hpp \ src/reader.hpp \ src/rect.hpp\ src/replay.hpp \ src/settings.hpp \ src/sfx.hpp \ src/sobject.hpp \ src/sys.hpp \ src/text.hpp \ src/version.hpp \ src/viewport.hpp \ src/weapon.hpp \ src/weapsel.hpp \ src/worm.hpp \ \ \ src/argParse.cpp \ src/configCompat.cpp \ src/configHelper.cpp \ src/configInit.cpp \ src/dataPath.cpp \ src/to_string.cpp \ \ src/argParse.hpp \ src/configHelper.hpp \ src/configInit.hpp \ src/dataPath.hpp \ src/to_string.hpp \ \ \ src/controller/commonController.cpp \ src/controller/localController.cpp \ src/controller/replayController.cpp \ \ src/controller/commonController.hpp \ src/controller/controller.hpp \ src/controller/localController.hpp \ src/controller/replayController.hpp \ \ \ src/gfx/blit.cpp \ src/gfx/font.cpp \ src/gfx/palette.cpp \ src/gfx/sprite.cpp \ \ src/gfx/blit.hpp \ src/gfx/color.hpp \ src/gfx/font.hpp \ src/gfx/macros.hpp \ src/gfx/palette.hpp \ src/gfx/sprite.hpp \ \ \ src/menu/booleanSwitchBehavior.cpp \ src/menu/enumBehavior.cpp \ src/menu/hiddenMenu.cpp \ src/menu/integerBehavior.cpp \ src/menu/itemBehavior.cpp \ src/menu/menu.cpp \ src/menu/menuItem.cpp \ src/menu/timeBehavior.cpp \ \ src/menu/arrayEnumBehavior.hpp \ src/menu/booleanSwitchBehavior.hpp \ src/menu/enumBehavior.hpp \ src/menu/hiddenMenu.hpp \ src/menu/integerBehavior.hpp \ src/menu/itemBehavior.hpp \ src/menu/menu.hpp \ src/menu/menuItem.hpp \ src/menu/timeBehavior.hpp src_gvl_libgvl_la_SOURCES = \ src/gvl/containers/list.cpp \ \ src/gvl/containers/list.hpp \ src/gvl/containers/bucket.hpp \ src/gvl/containers/string.hpp \ src/gvl/containers/list.h \ \ \ src/gvl/crypt/curve25519.cpp \ src/gvl/crypt/curve25519.hpp \ \ \ src/gvl/io/stream.cpp \ src/gvl/io/encoding.cpp \ src/gvl/io/convert.cpp \ \ src/gvl/io/stream.hpp \ src/gvl/io/fstream.hpp \ src/gvl/io/iostream.hpp \ src/gvl/io/encoding.hpp \ src/gvl/io/convert.hpp \ \ \ src/gvl/math/ieee.cpp \ src/gvl/math/tt800.cpp \ \ src/gvl/math/ieee.hpp \ src/gvl/math/tt800.hpp \ src/gvl/math/cmwc.hpp \ src/gvl/math/random.hpp \ \ \ src/gvl/meta/as_unsigned.hpp \ \ \ src/gvl/resman/shared.cpp \ \ src/gvl/resman/shared_ptr.hpp \ src/gvl/resman/shared.hpp \ src/gvl/resman/shared_count.hpp \ \ \ src/gvl/sockets/fd_set.cpp \ src/gvl/sockets/sockets.cpp \ src/gvl/sockets/socketstream.cpp \ \ src/gvl/sockets/fd_set.hpp \ src/gvl/sockets/sockets.hpp \ src/gvl/sockets/sockets_sys_impl.hpp \ src/gvl/sockets/socketstream.hpp \ \ \ src/gvl/support/bits.c \ src/gvl/support/debug.cpp \ src/gvl/support/hash.cpp \ src/gvl/support/log.cpp \ src/gvl/support/profile.cpp \ \ src/gvl/support/functional.hpp \ src/gvl/support/profile.hpp \ src/gvl/support/hash.hpp \ src/gvl/support/debug.hpp \ src/gvl/support/log.hpp \ src/gvl/support/macros.hpp \ src/gvl/support/platform.hpp \ src/gvl/support/cstdint.hpp \ src/gvl/support/type_info.hpp \ src/gvl/support/platform.h \ src/gvl/support/opt.hpp \ src/gvl/support/bits.hpp \ src/gvl/support/flags.hpp \ src/gvl/support/algorithm.hpp \ \ \ src/gvl/system/system.c \ \ src/gvl/system/system.hpp \ \ \ src/gvl/tut/quickcheck/context.cpp \ \ src/gvl/tut/quickcheck/context.hpp \ src/gvl/tut/quickcheck/generator.hpp src_gvl_gvltest_SOURCES = \ src/gvl/gvl_test/containers/list.cpp \ src/gvl/gvl_test/containers/pairing_heap.cpp \ src/gvl/gvl_test/containers/treap.cpp \ src/gvl/gvl_test/io/bitstream.cpp \ src/gvl/gvl_test/io/stream.cpp \ src/gvl/gvl_test/support/bits.cpp \ src/gvl/gvl_test/math/deterministic_float.cpp \ src/gvl/gvl_test/test.cpp \ \ \ src/gvl/containers/list.hpp \ src/gvl/containers/list.h \ \ \ src/gvl/io/iostream.hpp \ \ src/gvl/list.hpp \ \ \ src/gvl/math/cmwc.hpp \ src/gvl/math/random.hpp \ src/gvl/math/ieee.hpp \ \ \ src/gvl/resman/shared_ptr.hpp \ src/gvl/resman/shared.hpp \ src/gvl/resman/shared_count.hpp \ \ \ src/gvl/support/algorithm.hpp \ src/gvl/support/macros.hpp \ src/gvl/support/functional.hpp \ src/gvl/support/debug.hpp \ src/gvl/support/platform.hpp \ src/gvl/support/platform.h \ src/gvl/support/cstdint.hpp \ src/gvl/support/type_info.hpp \ \ \ src/gvl/tut/quickcheck/context.hpp \ src/gvl/tut/quickcheck/generator.hpp \ src/gvl/tut/quickcheck/property.hpp # Just everything in a bunch, some bits are unused currently # but I'm ignorant so I'm bloating the archive. EXTRA_DIST = \ src/gvl/containers/buffer.cpp \ src/gvl/containers/critbit.cpp \ src/gvl/containers/list.cpp \ src/gvl/containers/tests/deque.cpp \ src/gvl/containers/tests/hash_set.cpp \ src/gvl/containers/tests/list.cpp \ src/gvl/containers/tests/pairing_heap.cpp \ src/gvl/containers/tests/treap.cpp \ src/gvl/crypt/curve25519.cpp \ src/gvl/gvl_test/_build/deque.cpp \ src/gvl/gvl_test/containers/accurate_rectangle_packing.cpp \ src/gvl/gvl_test/containers/bounded_rectangle_packing.cpp \ src/gvl/gvl_test/containers/compact_interval_set.cpp \ src/gvl/gvl_test/containers/dense_int_set.cpp \ src/gvl/gvl_test/containers/hash_set.cpp \ src/gvl/gvl_test/containers/list.cpp \ src/gvl/gvl_test/containers/pairing_heap.cpp \ src/gvl/gvl_test/containers/string.cpp \ src/gvl/gvl_test/containers/treap.cpp \ src/gvl/gvl_test/io/bitstream.cpp \ src/gvl/gvl_test/io/formatter.cpp \ src/gvl/gvl_test/io/stream.cpp \ src/gvl/gvl_test/math/deterministic_float.cpp \ src/gvl/gvl_test/math/random.cpp \ src/gvl/gvl_test/support/bits.cpp \ src/gvl/gvl_test/support/opt.cpp \ src/gvl/gvl_test/test.cpp \ src/gvl/io/convert.cpp \ src/gvl/io/device_buf.cpp \ src/gvl/io/encoding.cpp \ src/gvl/io/stream.cpp \ src/gvl/io/tests/bitstream.cpp \ src/gvl/io/tests/stream.cpp \ src/gvl/math/ieee.cpp \ src/gvl/math/tests/reproducible_floats.cpp \ src/gvl/math/tt800.cpp \ src/gvl/resman/shared.cpp \ src/gvl/sockets/fd_set.cpp \ src/gvl/sockets/socket_listener.cpp \ src/gvl/sockets/sockets.cpp \ src/gvl/sockets/socketstream.cpp \ src/gvl/support/bits.c \ src/gvl/support/debug.cpp \ src/gvl/support/hash.cpp \ src/gvl/support/log.cpp \ src/gvl/support/platform.cpp \ src/gvl/support/profile.cpp \ src/gvl/support/string_pool.cpp \ src/gvl/support/tests/bits.cpp \ src/gvl/system/mutex.c \ src/gvl/system/system.c \ src/gvl/test/gvl_tests.cpp \ src/gvl/text/util.cpp \ src/gvl/tut/quickcheck/context.cpp \ \ src/gvl/containers/accurate_rectangle_packing.hpp \ src/gvl/containers/avl_tree.hpp \ src/gvl/containers/bounded_rectangle_packing.hpp \ src/gvl/containers/bucket.hpp \ src/gvl/containers/buffer.hpp \ src/gvl/containers/compact_interval_set.hpp \ src/gvl/containers/critbit.hpp \ src/gvl/containers/deque.hpp \ src/gvl/containers/generic_hash_set.hpp \ src/gvl/containers/hash_map.hpp \ src/gvl/containers/hash_set.hpp \ src/gvl/containers/int_set.hpp \ src/gvl/containers/iterator.hpp \ src/gvl/containers/linked_vector.hpp \ src/gvl/containers/list.h \ src/gvl/containers/list.hpp \ src/gvl/containers/list3.hpp \ src/gvl/containers/node_base.hpp \ src/gvl/containers/pairing_heap.hpp \ src/gvl/containers/pod_vector.hpp \ src/gvl/containers/range.hpp \ src/gvl/containers/string.hpp \ src/gvl/containers/treap.hpp \ src/gvl/containers/treap2.hpp \ src/gvl/containers/xlist.hpp \ src/gvl/crypt/curve25519.hpp \ src/gvl/crypt/gash.hpp \ src/gvl/crypt/gciph.hpp \ src/gvl/cstdint.hpp \ src/gvl/debug.hpp \ src/gvl/dense_int_set.hpp \ src/gvl/gvl_test/template.hpp \ src/gvl/hash_set/generic_hash_set.hpp \ src/gvl/hash_set/hash_set.hpp \ src/gvl/io/bitstream.hpp \ src/gvl/io/bitstream_old.hpp \ src/gvl/io/bitstream_templ.hpp \ src/gvl/io/bitstream_templ_old.hpp \ src/gvl/io/brigade2.h \ src/gvl/io/brigade2.hpp \ src/gvl/io/common_bitstream.hpp \ src/gvl/io/convert.hpp \ src/gvl/io/deflate_filter.hpp \ src/gvl/io/device_buf.hpp \ src/gvl/io/devnull.hpp \ src/gvl/io/encoding.hpp \ src/gvl/io/encoding_compat.hpp \ src/gvl/io/fstream.hpp \ src/gvl/io/iostream.hpp \ src/gvl/io/range_coder.hpp \ src/gvl/io/stream.hpp \ src/gvl/io/unicode.hpp \ src/gvl/linked_hash_set.hpp \ src/gvl/list.hpp \ src/gvl/math/cmwc.hpp \ src/gvl/math/float.hpp \ src/gvl/math/ieee.hpp \ src/gvl/math/math.hpp \ src/gvl/math/matrix.hpp \ src/gvl/math/normal_distribution.hpp \ src/gvl/math/random.hpp \ src/gvl/math/rect.hpp \ src/gvl/math/tt800.hpp \ src/gvl/math/vec.hpp \ src/gvl/meta/as_unsigned.hpp \ src/gvl/meta/is_ptr_convertible.hpp \ src/gvl/meta/meta.hpp \ src/gvl/meta/static_log2.hpp \ src/gvl/resman/allocator.hpp \ src/gvl/resman/linked_object.hpp \ src/gvl/resman/scoped_array.hpp \ src/gvl/resman/shared.h \ src/gvl/resman/shared.hpp \ src/gvl/resman/shared_count.hpp \ src/gvl/resman/shared_list.hpp \ src/gvl/resman/shared_ptr.hpp \ src/gvl/serialization/archive.hpp \ src/gvl/serialization/context.hpp \ src/gvl/serialization/except.hpp \ src/gvl/sockets/fd_set.hpp \ src/gvl/sockets/socket_listener.hpp \ src/gvl/sockets/sockets.hpp \ src/gvl/sockets/sockets_sys_impl.hpp \ src/gvl/sockets/socketstream.hpp \ src/gvl/support.hpp \ src/gvl/support/algorithm.hpp \ src/gvl/support/align.hpp \ src/gvl/support/bits.hpp \ src/gvl/support/borrow.hpp \ src/gvl/support/cheap_flags.hpp \ src/gvl/support/config.h \ src/gvl/support/cstdint.hpp \ src/gvl/support/debug.hpp \ src/gvl/support/disjoint_set.hpp \ src/gvl/support/flags.hpp \ src/gvl/support/foreach.hpp \ src/gvl/support/functional.hpp \ src/gvl/support/hash.hpp \ src/gvl/support/log.hpp \ src/gvl/support/macros.hpp \ src/gvl/support/move.hpp \ src/gvl/support/object_model.h \ src/gvl/support/opt.hpp \ src/gvl/support/platform.h \ src/gvl/support/platform.hpp \ src/gvl/support/profile.hpp \ src/gvl/support/string_pool.hpp \ src/gvl/support/type_info.hpp \ src/gvl/system/memory.hpp \ src/gvl/system/mutex.hpp \ src/gvl/system/system.hpp \ src/gvl/system/windows.hpp \ src/gvl/test/gvl_tests.hpp \ src/gvl/test/test.hpp \ src/gvl/text/utf8.hpp \ src/gvl/text/util.hpp \ src/gvl/trees/node_base.hpp \ src/gvl/tut/quickcheck/context.hpp \ src/gvl/tut/quickcheck/generator.hpp \ src/gvl/tut/quickcheck/property.hpp \ src/gvl/tut/quickcheck/quickcheck.hpp \ \ src/boostTesting.cpp LIB_ARCH_NIXBIN_LIBFILES = \ lib/libcap.so.2 \ lib/libdbus-1.so.3 \ lib/libtinfo.so.5 \ lib/libwrap.so.0 \ lib/libz.so.1 USR_LIB_ARCH_NIXBIN_LIBFILES = \ lib/libconfig++.so \ lib/libSDL_mixer-1.2.so.0 \ lib/libSDL-1.2.so.0 \ lib/libmikmod.so.2 \ lib/libvorbisfile.so.3 \ lib/libvorbis.so.0 \ lib/libFLAC.so.8 \ lib/libpulse-simple.so.0 \ lib/libpulse.so.0 \ lib/libdirectfb-1.2.so.9 \ lib/libfusion-1.2.so.9 \ lib/libdirect-1.2.so.9 \ lib/libcaca.so.0 \ lib/libsndfile.so.1 \ lib/libasyncns.so.0 \ lib/libogg.so.0 \ lib/libvorbisenc.so.2 \ lib/libxcb.so.1 \ lib/libX11-xcb.so.1 \ lib/libjson.so.0 USR_LIB_NIXBIN_LIBFILES = \ lib/libboost_program_options.so \ lib/libmad.so.0 USR_LIB_ARCH_PA_NIXBIN_LIBFILES = \ lib/libpulsecommon-2.0.so NIXBIN_LIBFILES = \ $(LIB_ARCH_NIXBIN_LIBFILES) \ $(USR_LIB_ARCH_NIXBIN_LIBFILES) \ $(USR_LIB_NIXBIN_LIBFILES) \ $(LIB_NIXBIN_LIBFILES) \ $(USR_LIB_ARCH_PA_NIXBIN_LIBFILES) NIXBIN_LIB_DEBS = \ libasyncns0 \ libcaca0 \ libconfig++9 \ libdbus-1-3 \ libdirectfb-1.2-9 \ libflac8 \ libmad0 \ libmikmod2 \ libpulse0 \ libsdl-mixer1.2 \ libsdl1.2debian \ libsndfile1 NIXBIN_LIB_DEBS_NOSRC = \ libboost-program-options1.49.0 \ libcap2 \ libjson0 \ libncursesw5 \ libogg0 \ libtinfo5 \ libvorbis0a \ libvorbisenc2 libvorbisfile3 \ libwrap0 \ libx11-xcb1 \ libxcb1 \ zlib1g WINDOWS_LIBS_A = \ windows/libconfig-1.4.8/lib/.libs/libconfig++.a WINDOWS_LIBS_DLL = \ windows/SDL-1.2.15/build/.libs/SDL.dll \ windows/SDL_mixer-1.2.12/lib/x86/SDL_mixer.dll \ windows/boost-program_options-1.51.0/stage/lib/libboost_program_options.dll \ windows/zlib-1.2.7/zlib1.dll WINDOWS_LIBS = $(WINDOWS_LIBS_A) $(WINDOWS_LIBS_DLL) WINDOWS_TXT = AUTHORS COPYING ChangeLog NEWS if HAS_WINDOWS_LDFLAGS EXTRA_lierolibre_DEPENDENCIES = $(WINDOWS_LIBS) endif windows/boost-program_options-1.51.0/stage/lib/libboost_program_options.dll: cd windows/boost-program_options-1.51.0/ ;\ ./bootstrap.sh ;\ rm -rf stage ;\ rm -rf bin.v2 ;\ ./b2 --user-config=tools/build/v2/user-config_i686-w64-mingw32-gcc.jam toolset=gcc-mingw32 target-os=windows variant=release link=shared -sNO_BZIP2=1 -sNO_ZLIB=1 linkflags='-static-libgcc -static-libstdc++' stage/lib/libboost_program_options.dll stage/lib/libboost_program_options.dll.a windows/zlib-1.2.7/zlib1.dll: cd windows/zlib-1.2.7/ && \ make -f win32/Makefile.gcc PREFIX=i686-w64-mingw32- windows/SDL-1.2.15/build/.libs/SDL.dll: cd windows/SDL-1.2.15/ && \ ./configure --host=i686-w64-mingw32 && \ make LDFLAGS='-static-libgcc -static-libstdc++' windows/libconfig-1.4.8/lib/.libs/libconfig++.a: cd windows/libconfig-1.4.8/ && \ ./configure --host=i686-w64-mingw32 && \ make LDFLAGS='-static-libgcc -static-libstdc++' if HAS_WINDOWS_LDFLAGS dist-hook: lierolibre.exe $(WINDOWS_LIBS) for i in $(WINDOWS_LIBS_DLL) .libs/lierolibre.exe; do \ $(STRIP) $$i -o $(distdir)/$$(basename $$i); \ chmod +x $(distdir)/$$(basename $$i); done cp scripts/lierolibre-cmd.bat $(distdir) cp $(distdir)/data/liero.cfg $(distdir)/data/lierocfg.txt for i in $(WINDOWS_TXT); do \ cp $(distdir)/$$i $(distdir)/$$i.txt; \ sed 's/$$/ /' -i $(distdir)/$$i.txt; done mkdir $(distdir)/user mkdir $(distdir)/libsrc cp -r windows/SDL-1.2.15/ $(distdir)/libsrc/ cp -r windows/libconfig-1.4.8/ $(distdir)/libsrc/ -make -C $(distdir)/libsrc/SDL-1.2.15/ distclean -make -C $(distdir)/libsrc/libconfig-1.4.8/ distclean sed '/no longer applies./r COPYING_winbin' -i $(distdir)/COPYING.txt sed \ -e '/START_MACHINE_READABLE/,/END_MACHINE_READABLE/d' \ -e '/.*_HUMAN_READABLE/d' \ -i $(distdir)/COPYING.txt sed '/ separate licenses, and not covered under the BSD-2-Clause license/r COPYING_winbin' -i $(distdir)/COPYING.txt sed \ -e '/START_HUMAN_READABLE/,/END_HUMAN_READABLE/d' \ -e '/.*_MACHINE_READABLE/d' \ -i $(distdir)/COPYING.txt else dist-hook: endif cp $(distdir)/src/gvl/_build/Gvl_C++0x.props \ "$(distdir)/src/gvl/_build/Gvl C++0x.props" cp $(distdir)/src/gvl/_build/Gvl_IEEE_SEE2.props \ "$(distdir)/src/gvl/_build/Gvl IEEE SEE2.props" cp $(distdir)/src/gvl/_build/Gvl_Standard_Config.props \ "$(distdir)/src/gvl/_build/Gvl Standard Config.props" $(nodist_bin_SCRIPTS): scripts/lierolibre.am install -d scripts/ sed \ -e 's,#PKGDATADIR#,$(pkgdatadir),g' \ -e 's,#CFGFILE#,$(CFGFILE),g' \ -e 's,#LIBEXECDIR#,$(libexecdir),g' \ -e 's,#PACKAGE#,$(PACKAGE),g' \ $(srcdir)/$@.am \ > $@ $(nodist_man6_MANS): $(MANPAGES_SOURCES) install -d man/ sed \ -e 's,#PKGDATADIR#,$(pkgdatadir),g' \ -e 's,#CFGFILE#,$(CFGFILE),g' \ -e 's,#LIBEXECDIR#,$(libexecdir),g' \ -e 's,#PACKAGE#,$(PACKAGE),g' \ -e 's,#UPPERCASE_PACKAGE#,\U$(PACKAGE),g' \ -e 's,#PACKAGE_VERSION#,$(PACKAGE_VERSION),g' \ $(srcdir)/$@.am \ > $@ data/LIERO.CHR: $(GRAPHICS_SOURCES) install -d data/ $(srcdir)/scripts/lierolibre-packgfx \ $(srcdir)/data/graphics/gfx{1..3}.xpm \ $@ data/LIERO.SND: $(SOUND_SOURCES) install -d data/ $(srcdir)/scripts/lierolibre-packsounds \ $(srcdir)/data/sounds/ \ $@ .PHONY: clean-local dist-nixbin-dir dist-nixbin-libcopyright dist-nixbin-libsrc dist-nixbin dist-nixbin-xz clean-local: rm -f \ $(nodist_bin_SCRIPTS) \ $(nodist_man6_MANS) \ $(MANS_TXT) rm -rf lib/ libsrc/ $(LIB_ARCH_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a \ /lib/$(build_cpu)-$(build_os)/$${NIXBIN_LIBFILE#lib/}* \ lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(USR_LIB_ARCH_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a \ /usr/lib/$(build_cpu)-$(build_os)/$${NIXBIN_LIBFILE#lib/}* \ lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(USR_LIB_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a /usr/lib/$${NIXBIN_LIBFILE#lib/}* lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(LIB_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a /lib/$${NIXBIN_LIBFILE#lib/}* lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(USR_LIB_ARCH_PA_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a \ /usr/lib/$(build_cpu)-$(build_os)/pulseaudio/$${NIXBIN_LIBFILE#lib/}* \ lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(MANS_TXT): $(nodist_man6_MANS) man --no-justification --no-hyphenation $(@:.txt=.6) | col -b > $@ echo >> $@ echo "This text file was automatically generated from $(@:.txt=.6)" \ >> $@ dist-nixbin-libcopyright: install -d lib/ cd lib/ && \ for i in $(NIXBIN_LIB_DEBS) $(NIXBIN_LIB_DEBS_NOSRC); do \ cupt copyright $$i > $$i.copyright || \ touch 00MISSING_$$i.copyright; done dist-nixbin-libsrc: install -d libsrc/ cd libsrc/ && \ LANG=C apt-get source --download-only \ $$(for i in $(NIXBIN_LIB_DEBS); do \ echo $$i=$$(dpkg -s $$i | \ sed -n 's/^Version:\ \(.*\)/\1/p'); done) 2>&1 >/dev/null | \ sed -n 's/E: Unable to find a source package for \(.*\)/\1/p' | \ xargs -I '{}' touch 00MISSING_'{}'.debsource dist-nixbin-dir: distdir $(pkglibexec_PROGRAMS) $(NIXBIN_LIBFILES) \ $(MANS_TXT) dist-nixbin-libcopyright dist-nixbin-libsrc cp -aT $(PACKAGE_DIRNAME) $(NIXBIN_DIRNAME) cp -a lib/ $(NIXBIN_DIRNAME) cp -a libsrc/ $(NIXBIN_DIRNAME) cp -a $(pkglibexec_PROGRAMS) $(NIXBIN_DIRNAME) cp -a $(nodist_man6_MANS) $(NIXBIN_DIRNAME)/man/ cp -a $(MANS_TXT) $(NIXBIN_DIRNAME)/man/ dist-nixbin: dist-nixbin-dir tar caf $(NIXBIN_DIRNAME).tar.gz $(NIXBIN_DIRNAME) dist-nixbin-xz: dist-nixbin-dir tar caf $(NIXBIN_DIRNAME).tar.xz $(NIXBIN_DIRNAME) lierolibre-0.5/Makefile.in000066400000000000000000005700461205125547100155710ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ pkglibexec_PROGRAMS = lierolibre$(EXEEXT) EXTRA_PROGRAMS = src/gvl/gvltest$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_appicon_DATA) \ $(dist_bin_SCRIPTS) $(dist_desktop_DATA) $(dist_doc_DATA) \ $(dist_noinst_DATA) $(dist_noinst_SCRIPTS) \ $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure \ $(top_srcdir)/src/config.h.in AUTHORS COPYING ChangeLog \ INSTALL NEWS src/build-aux/compile src/build-aux/config.guess \ src/build-aux/config.sub src/build-aux/depcomp \ src/build-aux/install-sh src/build-aux/ltmain.sh \ src/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/src/m4/libtool.m4 \ $(top_srcdir)/src/m4/ltoptions.m4 \ $(top_srcdir)/src/m4/ltsugar.m4 \ $(top_srcdir)/src/m4/ltversion.m4 \ $(top_srcdir)/src/m4/lt~obsolete.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)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = src_gvl_libgvl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__dirstamp = $(am__leading_dot)dirstamp am_src_gvl_libgvl_la_OBJECTS = src/gvl/containers/list.lo \ src/gvl/crypt/curve25519.lo src/gvl/io/stream.lo \ src/gvl/io/encoding.lo src/gvl/io/convert.lo \ src/gvl/math/ieee.lo src/gvl/math/tt800.lo \ src/gvl/resman/shared.lo src/gvl/sockets/fd_set.lo \ src/gvl/sockets/sockets.lo src/gvl/sockets/socketstream.lo \ src/gvl/support/src_gvl_libgvl_la-bits.lo \ src/gvl/support/debug.lo src/gvl/support/hash.lo \ src/gvl/support/log.lo src/gvl/support/profile.lo \ src/gvl/system/src_gvl_libgvl_la-system.lo \ src/gvl/tut/quickcheck/context.lo src_gvl_libgvl_la_OBJECTS = $(am_src_gvl_libgvl_la_OBJECTS) src_gvl_libgvl_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(src_gvl_libgvl_la_LDFLAGS) $(LDFLAGS) -o $@ am__installdirs = "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man6dir)" \ "$(DESTDIR)$(appicondir)" "$(DESTDIR)$(desktopdir)" \ "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgdatadir)" PROGRAMS = $(pkglibexec_PROGRAMS) am_lierolibre_OBJECTS = src/lierolibre-binReader.$(OBJEXT) \ src/lierolibre-bobject.$(OBJEXT) \ src/lierolibre-bonus.$(OBJEXT) src/lierolibre-common.$(OBJEXT) \ src/lierolibre-console.$(OBJEXT) \ src/lierolibre-constants.$(OBJEXT) \ src/lierolibre-filesystem.$(OBJEXT) \ src/lierolibre-game.$(OBJEXT) src/lierolibre-gfx.$(OBJEXT) \ src/lierolibre-keys.$(OBJEXT) src/lierolibre-level.$(OBJEXT) \ src/lierolibre-main.$(OBJEXT) src/lierolibre-math.$(OBJEXT) \ src/lierolibre-ninjarope.$(OBJEXT) \ src/lierolibre-nobject.$(OBJEXT) src/lierolibre-rand.$(OBJEXT) \ src/lierolibre-reader.$(OBJEXT) \ src/lierolibre-replay.$(OBJEXT) \ src/lierolibre-sdlmain.$(OBJEXT) \ src/lierolibre-settings.$(OBJEXT) src/lierolibre-sfx.$(OBJEXT) \ src/lierolibre-sobject.$(OBJEXT) src/lierolibre-sys.$(OBJEXT) \ src/lierolibre-text.$(OBJEXT) \ src/lierolibre-viewport.$(OBJEXT) \ src/lierolibre-weapon.$(OBJEXT) \ src/lierolibre-weapsel.$(OBJEXT) src/lierolibre-worm.$(OBJEXT) \ src/lierolibre-argParse.$(OBJEXT) \ src/lierolibre-configCompat.$(OBJEXT) \ src/lierolibre-configHelper.$(OBJEXT) \ src/lierolibre-configInit.$(OBJEXT) \ src/lierolibre-dataPath.$(OBJEXT) \ src/lierolibre-to_string.$(OBJEXT) \ src/controller/lierolibre-commonController.$(OBJEXT) \ src/controller/lierolibre-localController.$(OBJEXT) \ src/controller/lierolibre-replayController.$(OBJEXT) \ src/gfx/lierolibre-blit.$(OBJEXT) \ src/gfx/lierolibre-font.$(OBJEXT) \ src/gfx/lierolibre-palette.$(OBJEXT) \ src/gfx/lierolibre-sprite.$(OBJEXT) \ src/menu/lierolibre-booleanSwitchBehavior.$(OBJEXT) \ src/menu/lierolibre-enumBehavior.$(OBJEXT) \ src/menu/lierolibre-hiddenMenu.$(OBJEXT) \ src/menu/lierolibre-integerBehavior.$(OBJEXT) \ src/menu/lierolibre-itemBehavior.$(OBJEXT) \ src/menu/lierolibre-menu.$(OBJEXT) \ src/menu/lierolibre-menuItem.$(OBJEXT) \ src/menu/lierolibre-timeBehavior.$(OBJEXT) lierolibre_OBJECTS = $(am_lierolibre_OBJECTS) lierolibre_DEPENDENCIES = src/gvl/libgvl.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) lierolibre_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(lierolibre_CXXFLAGS) \ $(CXXFLAGS) $(lierolibre_LDFLAGS) $(LDFLAGS) -o $@ am_src_gvl_gvltest_OBJECTS = \ src/gvl/gvl_test/containers/list.$(OBJEXT) \ src/gvl/gvl_test/containers/pairing_heap.$(OBJEXT) \ src/gvl/gvl_test/containers/treap.$(OBJEXT) \ src/gvl/gvl_test/io/bitstream.$(OBJEXT) \ src/gvl/gvl_test/io/stream.$(OBJEXT) \ src/gvl/gvl_test/support/bits.$(OBJEXT) \ src/gvl/gvl_test/math/deterministic_float.$(OBJEXT) \ src/gvl/gvl_test/test.$(OBJEXT) src_gvl_gvltest_OBJECTS = $(am_src_gvl_gvltest_OBJECTS) src_gvl_gvltest_DEPENDENCIES = src/gvl/libgvl.la src_gvl_gvltest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(src_gvl_gvltest_LDFLAGS) $(LDFLAGS) -o $@ 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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(dist_bin_SCRIPTS) $(dist_noinst_SCRIPTS) \ $(nodist_bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/src/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f 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 = $(src_gvl_libgvl_la_SOURCES) $(lierolibre_SOURCES) \ $(src_gvl_gvltest_SOURCES) DIST_SOURCES = $(src_gvl_libgvl_la_SOURCES) $(lierolibre_SOURCES) \ $(src_gvl_gvltest_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac man6dir = $(mandir)/man6 NROFF = nroff MANS = $(nodist_man6_MANS) DATA = $(dist_appicon_DATA) $(dist_desktop_DATA) $(dist_doc_DATA) \ $(dist_noinst_DATA) $(dist_pkgdata_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_PO_LIBS = @BOOST_PO_LIBS@ 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@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GVL_CFLAGS = @GVL_CFLAGS@ GVL_LIBS = @GVL_LIBS@ HAS_IM = @HAS_IM@ HAS_SOX = @HAS_SOX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCONFIGXX_CFLAGS = @LIBCONFIGXX_CFLAGS@ LIBCONFIGXX_CPPFLAGS = @LIBCONFIGXX_CPPFLAGS@ LIBCONFIGXX_LIBS = @LIBCONFIGXX_LIBS@ LIBOBJS = @LIBOBJS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ RELPATH_CFLAGS = @RELPATH_CFLAGS@ RELPATH_LDFLAGS = @RELPATH_LDFLAGS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SDL_MIXER_CFLAGS = @SDL_MIXER_CFLAGS@ SDL_MIXER_LIBS = @SDL_MIXER_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWS_CPPFLAGS = @WINDOWS_CPPFLAGS@ WINDOWS_LDFLAGS = @WINDOWS_LDFLAGS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I src/m4 appicondir = $(datarootdir)/icons/hicolor/scalable/apps desktopdir = $(datarootdir)/applications # For sedding in wrapper script later on CFGFILE = liero.cfg # For nixbin-dist PACKAGE_DIRNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) NIXBIN_DIRNAME = $(PACKAGE_DIRNAME)_linux-$(build_cpu) # It seems it only includes src/../ by default lierolibre_CPPFLAGS = $(LIBCONFIGXX_CPPFLAGS) $(GVL_CPPFLAGS) $(SDL_CPPFLAGS) -I$(srcdir)/src $(WINDOWS_CPPFLAGS) lierolibre_CFLAGS = $(LIBCONFIGXX_CFLAGS) $(SDL_MIXER_CFLAGS) $(SDL_CFLAGS) $(RELPATH_CFLAGS) lierolibre_CXXFLAGS = $(SDL_CXXFLAGS) $(RELPATH_CFLAGS) lierolibre_LDADD = src/gvl/libgvl.la $(LIBCONFIGXX_LIBS) $(SDL_MIXER_LIBS) $(SDL_LIBS) $(BOOST_PO_LIBS) lierolibre_LDFLAGS = $(RELPATH_LDFLAGS) $(WINDOWS_LDFLAGS) noinst_LTLIBRARIES = src/gvl/libgvl.la src_gvl_libgvl_la_CFLAGS = $(ZLIB_CFLAGS) $(RELPATH_CFLAGS) src_gvl_libgvl_la_LIBADD = $(ZLIB_LIBS) src_gvl_libgvl_la_LDFLAGS = $(RELPATH_LDFLAGS) src_gvl_gvltest_CFLAGS = $(ZLIB_CFLAGS) $(RELPATH_CFLAGS) src_gvl_gvltest_LDFLAGS = $(ZLIB_LIBS) $(LIBRT) $(RELPATH_LDFLAGS) src_gvl_gvltest_LDADD = src/gvl/libgvl.la nodist_bin_SCRIPTS = \ scripts/lierolibre dist_bin_SCRIPTS = \ scripts/lierolibre-extractgfx \ scripts/lierolibre-packgfx \ scripts/lierolibre-extractsounds \ scripts/lierolibre-packsounds \ scripts/lierolibre-extractlev \ scripts/lierolibre-packlev dist_noinst_SCRIPTS = \ autogen.sh \ scripts/cross-compile \ scripts/lierolibre.am \ src/Jamfile \ src/dummy_config.h \ src/gvl/Jamfile nodist_man6_MANS = \ man/lierolibre.6 \ man/lierolibre-extractgfx.6 \ man/lierolibre-packgfx.6 \ man/lierolibre-extractsounds.6 \ man/lierolibre-packsounds.6 \ man/lierolibre-extractlev.6 \ man/lierolibre-packlev.6 # For nixbin MANS_TXT = $(nodist_man6_MANS:.6=.txt) dist_doc_DATA = \ AUTHORS \ ChangeLog \ NEWS \ README dist_desktop_DATA = \ data/lierolibre.desktop dist_appicon_DATA = \ data/lierolibre.svg dist_pkgdata_DATA = \ data/LIERO.CHR \ data/LIERO.DAT \ data/LIERO.OPT \ data/LIERO.SND \ data/NAMES.DAT \ data/liero.cfg MANPAGES_SOURCES = \ man/lierolibre.6.am \ man/lierolibre-extractgfx.6.am \ man/lierolibre-packgfx.6.am \ man/lierolibre-extractsounds.6.am \ man/lierolibre-packsounds.6.am \ man/lierolibre-extractlev.6.am \ man/lierolibre-packlev.6.am GRAPHICS_SOURCES = \ data/graphics/gfx1.xpm \ data/graphics/gfx2.xpm \ data/graphics/gfx3.xpm SOUND_SOURCES = \ data/sounds/ALIVE.wav \ data/sounds/BAZOOKA.wav \ data/sounds/BEGIN.wav \ data/sounds/BLASTER.wav \ data/sounds/BOING.wav \ data/sounds/BUMP.wav \ data/sounds/BURNER.wav \ data/sounds/DEATH1.wav \ data/sounds/DEATH2.wav \ data/sounds/DEATH3.wav \ data/sounds/DIRT.wav \ data/sounds/DROPSHEL.wav \ data/sounds/EXP2.wav \ data/sounds/EXP3.wav \ data/sounds/EXP3A.wav \ data/sounds/EXP3B.wav \ data/sounds/EXP4.wav \ data/sounds/EXP5.wav \ data/sounds/HURT1.wav \ data/sounds/HURT2.wav \ data/sounds/HURT3.wav \ data/sounds/LARPA.wav \ data/sounds/MOVEDOWN.wav \ data/sounds/MOVEUP.wav \ data/sounds/RELOADED.wav \ data/sounds/RIFLE.wav \ data/sounds/SELECT.wav \ data/sounds/SHOT.wav \ data/sounds/SHOTGUN.wav \ data/sounds/THROW.wav WINDOWS_SOURCES = \ scripts/lierolibre-cmd.bat \ src/gvl/_build/Gvl_C++0x.props \ src/gvl/_build/Gvl_IEEE_SEE2.props \ src/gvl/_build/Gvl_Standard_Config.props \ src/gvl/_build/gvl.vcproj \ src/gvl/_build/gvl.vcxproj \ src/gvl/_build/gvl.vcxproj.filters \ windows/visualC/liero.vcproj \ windows/visualC/liero.vcxproj \ windows/visualC/lierolibre.sln dist_noinst_DATA = \ $(GRAPHICS_SOURCES) \ $(MANPAGES_SOURCES) \ $(SOUND_SOURCES) \ $(WINDOWS_SOURCES) \ COPYING \ COPYING_winbin \ README.txt \ README_linuxbin \ data/FILE_ID.DIZ \ data/LICENSE.TXT \ data/LIERO.TXT \ data/LIEROENG.TXT \ data/lierolibre.xpm \ data/sounds/sounds.txt \ lgpl-2.1.txt lierolibre_SOURCES = \ src/binReader.cpp \ src/bobject.cpp \ src/bonus.cpp \ src/common.cpp \ src/console.cpp \ src/constants.cpp \ src/filesystem.cpp \ src/game.cpp \ src/gfx.cpp \ src/keys.cpp \ src/level.cpp \ src/main.cpp \ src/math.cpp \ src/ninjarope.cpp \ src/nobject.cpp \ src/rand.cpp \ src/reader.cpp \ src/replay.cpp \ src/sdlmain.cpp \ src/settings.cpp \ src/sfx.cpp \ src/sobject.cpp \ src/sys.cpp \ src/text.cpp \ src/viewport.cpp \ src/weapon.cpp \ src/weapsel.cpp \ src/worm.cpp \ \ src/binReader.hpp \ src/bobject.hpp \ src/bonus.hpp \ src/common.hpp \ src/console.hpp \ src/constants.hpp \ src/exactObjectList.hpp \ src/fastObjectList.hpp \ src/filesystem.hpp \ src/game.hpp \ src/gfx.hpp \ src/keys.hpp \ src/level.hpp \ src/lfs.hpp \ src/math.hpp \ src/nobject.hpp \ src/objectList.hpp \ src/rand.hpp \ src/reader.hpp \ src/rect.hpp\ src/replay.hpp \ src/settings.hpp \ src/sfx.hpp \ src/sobject.hpp \ src/sys.hpp \ src/text.hpp \ src/version.hpp \ src/viewport.hpp \ src/weapon.hpp \ src/weapsel.hpp \ src/worm.hpp \ \ \ src/argParse.cpp \ src/configCompat.cpp \ src/configHelper.cpp \ src/configInit.cpp \ src/dataPath.cpp \ src/to_string.cpp \ \ src/argParse.hpp \ src/configHelper.hpp \ src/configInit.hpp \ src/dataPath.hpp \ src/to_string.hpp \ \ \ src/controller/commonController.cpp \ src/controller/localController.cpp \ src/controller/replayController.cpp \ \ src/controller/commonController.hpp \ src/controller/controller.hpp \ src/controller/localController.hpp \ src/controller/replayController.hpp \ \ \ src/gfx/blit.cpp \ src/gfx/font.cpp \ src/gfx/palette.cpp \ src/gfx/sprite.cpp \ \ src/gfx/blit.hpp \ src/gfx/color.hpp \ src/gfx/font.hpp \ src/gfx/macros.hpp \ src/gfx/palette.hpp \ src/gfx/sprite.hpp \ \ \ src/menu/booleanSwitchBehavior.cpp \ src/menu/enumBehavior.cpp \ src/menu/hiddenMenu.cpp \ src/menu/integerBehavior.cpp \ src/menu/itemBehavior.cpp \ src/menu/menu.cpp \ src/menu/menuItem.cpp \ src/menu/timeBehavior.cpp \ \ src/menu/arrayEnumBehavior.hpp \ src/menu/booleanSwitchBehavior.hpp \ src/menu/enumBehavior.hpp \ src/menu/hiddenMenu.hpp \ src/menu/integerBehavior.hpp \ src/menu/itemBehavior.hpp \ src/menu/menu.hpp \ src/menu/menuItem.hpp \ src/menu/timeBehavior.hpp src_gvl_libgvl_la_SOURCES = \ src/gvl/containers/list.cpp \ \ src/gvl/containers/list.hpp \ src/gvl/containers/bucket.hpp \ src/gvl/containers/string.hpp \ src/gvl/containers/list.h \ \ \ src/gvl/crypt/curve25519.cpp \ src/gvl/crypt/curve25519.hpp \ \ \ src/gvl/io/stream.cpp \ src/gvl/io/encoding.cpp \ src/gvl/io/convert.cpp \ \ src/gvl/io/stream.hpp \ src/gvl/io/fstream.hpp \ src/gvl/io/iostream.hpp \ src/gvl/io/encoding.hpp \ src/gvl/io/convert.hpp \ \ \ src/gvl/math/ieee.cpp \ src/gvl/math/tt800.cpp \ \ src/gvl/math/ieee.hpp \ src/gvl/math/tt800.hpp \ src/gvl/math/cmwc.hpp \ src/gvl/math/random.hpp \ \ \ src/gvl/meta/as_unsigned.hpp \ \ \ src/gvl/resman/shared.cpp \ \ src/gvl/resman/shared_ptr.hpp \ src/gvl/resman/shared.hpp \ src/gvl/resman/shared_count.hpp \ \ \ src/gvl/sockets/fd_set.cpp \ src/gvl/sockets/sockets.cpp \ src/gvl/sockets/socketstream.cpp \ \ src/gvl/sockets/fd_set.hpp \ src/gvl/sockets/sockets.hpp \ src/gvl/sockets/sockets_sys_impl.hpp \ src/gvl/sockets/socketstream.hpp \ \ \ src/gvl/support/bits.c \ src/gvl/support/debug.cpp \ src/gvl/support/hash.cpp \ src/gvl/support/log.cpp \ src/gvl/support/profile.cpp \ \ src/gvl/support/functional.hpp \ src/gvl/support/profile.hpp \ src/gvl/support/hash.hpp \ src/gvl/support/debug.hpp \ src/gvl/support/log.hpp \ src/gvl/support/macros.hpp \ src/gvl/support/platform.hpp \ src/gvl/support/cstdint.hpp \ src/gvl/support/type_info.hpp \ src/gvl/support/platform.h \ src/gvl/support/opt.hpp \ src/gvl/support/bits.hpp \ src/gvl/support/flags.hpp \ src/gvl/support/algorithm.hpp \ \ \ src/gvl/system/system.c \ \ src/gvl/system/system.hpp \ \ \ src/gvl/tut/quickcheck/context.cpp \ \ src/gvl/tut/quickcheck/context.hpp \ src/gvl/tut/quickcheck/generator.hpp src_gvl_gvltest_SOURCES = \ src/gvl/gvl_test/containers/list.cpp \ src/gvl/gvl_test/containers/pairing_heap.cpp \ src/gvl/gvl_test/containers/treap.cpp \ src/gvl/gvl_test/io/bitstream.cpp \ src/gvl/gvl_test/io/stream.cpp \ src/gvl/gvl_test/support/bits.cpp \ src/gvl/gvl_test/math/deterministic_float.cpp \ src/gvl/gvl_test/test.cpp \ \ \ src/gvl/containers/list.hpp \ src/gvl/containers/list.h \ \ \ src/gvl/io/iostream.hpp # Just everything in a bunch, some bits are unused currently # but I'm ignorant so I'm bloating the archive. EXTRA_DIST = \ src/gvl/containers/buffer.cpp \ src/gvl/containers/critbit.cpp \ src/gvl/containers/list.cpp \ src/gvl/containers/tests/deque.cpp \ src/gvl/containers/tests/hash_set.cpp \ src/gvl/containers/tests/list.cpp \ src/gvl/containers/tests/pairing_heap.cpp \ src/gvl/containers/tests/treap.cpp \ src/gvl/crypt/curve25519.cpp \ src/gvl/gvl_test/_build/deque.cpp \ src/gvl/gvl_test/containers/accurate_rectangle_packing.cpp \ src/gvl/gvl_test/containers/bounded_rectangle_packing.cpp \ src/gvl/gvl_test/containers/compact_interval_set.cpp \ src/gvl/gvl_test/containers/dense_int_set.cpp \ src/gvl/gvl_test/containers/hash_set.cpp \ src/gvl/gvl_test/containers/list.cpp \ src/gvl/gvl_test/containers/pairing_heap.cpp \ src/gvl/gvl_test/containers/string.cpp \ src/gvl/gvl_test/containers/treap.cpp \ src/gvl/gvl_test/io/bitstream.cpp \ src/gvl/gvl_test/io/formatter.cpp \ src/gvl/gvl_test/io/stream.cpp \ src/gvl/gvl_test/math/deterministic_float.cpp \ src/gvl/gvl_test/math/random.cpp \ src/gvl/gvl_test/support/bits.cpp \ src/gvl/gvl_test/support/opt.cpp \ src/gvl/gvl_test/test.cpp \ src/gvl/io/convert.cpp \ src/gvl/io/device_buf.cpp \ src/gvl/io/encoding.cpp \ src/gvl/io/stream.cpp \ src/gvl/io/tests/bitstream.cpp \ src/gvl/io/tests/stream.cpp \ src/gvl/math/ieee.cpp \ src/gvl/math/tests/reproducible_floats.cpp \ src/gvl/math/tt800.cpp \ src/gvl/resman/shared.cpp \ src/gvl/sockets/fd_set.cpp \ src/gvl/sockets/socket_listener.cpp \ src/gvl/sockets/sockets.cpp \ src/gvl/sockets/socketstream.cpp \ src/gvl/support/bits.c \ src/gvl/support/debug.cpp \ src/gvl/support/hash.cpp \ src/gvl/support/log.cpp \ src/gvl/support/platform.cpp \ src/gvl/support/profile.cpp \ src/gvl/support/string_pool.cpp \ src/gvl/support/tests/bits.cpp \ src/gvl/system/mutex.c \ src/gvl/system/system.c \ src/gvl/test/gvl_tests.cpp \ src/gvl/text/util.cpp \ src/gvl/tut/quickcheck/context.cpp \ \ src/gvl/containers/accurate_rectangle_packing.hpp \ src/gvl/containers/avl_tree.hpp \ src/gvl/containers/bounded_rectangle_packing.hpp \ src/gvl/containers/bucket.hpp \ src/gvl/containers/buffer.hpp \ src/gvl/containers/compact_interval_set.hpp \ src/gvl/containers/critbit.hpp \ src/gvl/containers/deque.hpp \ src/gvl/containers/generic_hash_set.hpp \ src/gvl/containers/hash_map.hpp \ src/gvl/containers/hash_set.hpp \ src/gvl/containers/int_set.hpp \ src/gvl/containers/iterator.hpp \ src/gvl/containers/linked_vector.hpp \ src/gvl/containers/list.h \ src/gvl/containers/list.hpp \ src/gvl/containers/list3.hpp \ src/gvl/containers/node_base.hpp \ src/gvl/containers/pairing_heap.hpp \ src/gvl/containers/pod_vector.hpp \ src/gvl/containers/range.hpp \ src/gvl/containers/string.hpp \ src/gvl/containers/treap.hpp \ src/gvl/containers/treap2.hpp \ src/gvl/containers/xlist.hpp \ src/gvl/crypt/curve25519.hpp \ src/gvl/crypt/gash.hpp \ src/gvl/crypt/gciph.hpp \ src/gvl/cstdint.hpp \ src/gvl/debug.hpp \ src/gvl/dense_int_set.hpp \ src/gvl/gvl_test/template.hpp \ src/gvl/hash_set/generic_hash_set.hpp \ src/gvl/hash_set/hash_set.hpp \ src/gvl/io/bitstream.hpp \ src/gvl/io/bitstream_old.hpp \ src/gvl/io/bitstream_templ.hpp \ src/gvl/io/bitstream_templ_old.hpp \ src/gvl/io/brigade2.h \ src/gvl/io/brigade2.hpp \ src/gvl/io/common_bitstream.hpp \ src/gvl/io/convert.hpp \ src/gvl/io/deflate_filter.hpp \ src/gvl/io/device_buf.hpp \ src/gvl/io/devnull.hpp \ src/gvl/io/encoding.hpp \ src/gvl/io/encoding_compat.hpp \ src/gvl/io/fstream.hpp \ src/gvl/io/iostream.hpp \ src/gvl/io/range_coder.hpp \ src/gvl/io/stream.hpp \ src/gvl/io/unicode.hpp \ src/gvl/linked_hash_set.hpp \ src/gvl/list.hpp \ src/gvl/math/cmwc.hpp \ src/gvl/math/float.hpp \ src/gvl/math/ieee.hpp \ src/gvl/math/math.hpp \ src/gvl/math/matrix.hpp \ src/gvl/math/normal_distribution.hpp \ src/gvl/math/random.hpp \ src/gvl/math/rect.hpp \ src/gvl/math/tt800.hpp \ src/gvl/math/vec.hpp \ src/gvl/meta/as_unsigned.hpp \ src/gvl/meta/is_ptr_convertible.hpp \ src/gvl/meta/meta.hpp \ src/gvl/meta/static_log2.hpp \ src/gvl/resman/allocator.hpp \ src/gvl/resman/linked_object.hpp \ src/gvl/resman/scoped_array.hpp \ src/gvl/resman/shared.h \ src/gvl/resman/shared.hpp \ src/gvl/resman/shared_count.hpp \ src/gvl/resman/shared_list.hpp \ src/gvl/resman/shared_ptr.hpp \ src/gvl/serialization/archive.hpp \ src/gvl/serialization/context.hpp \ src/gvl/serialization/except.hpp \ src/gvl/sockets/fd_set.hpp \ src/gvl/sockets/socket_listener.hpp \ src/gvl/sockets/sockets.hpp \ src/gvl/sockets/sockets_sys_impl.hpp \ src/gvl/sockets/socketstream.hpp \ src/gvl/support.hpp \ src/gvl/support/algorithm.hpp \ src/gvl/support/align.hpp \ src/gvl/support/bits.hpp \ src/gvl/support/borrow.hpp \ src/gvl/support/cheap_flags.hpp \ src/gvl/support/config.h \ src/gvl/support/cstdint.hpp \ src/gvl/support/debug.hpp \ src/gvl/support/disjoint_set.hpp \ src/gvl/support/flags.hpp \ src/gvl/support/foreach.hpp \ src/gvl/support/functional.hpp \ src/gvl/support/hash.hpp \ src/gvl/support/log.hpp \ src/gvl/support/macros.hpp \ src/gvl/support/move.hpp \ src/gvl/support/object_model.h \ src/gvl/support/opt.hpp \ src/gvl/support/platform.h \ src/gvl/support/platform.hpp \ src/gvl/support/profile.hpp \ src/gvl/support/string_pool.hpp \ src/gvl/support/type_info.hpp \ src/gvl/system/memory.hpp \ src/gvl/system/mutex.hpp \ src/gvl/system/system.hpp \ src/gvl/system/windows.hpp \ src/gvl/test/gvl_tests.hpp \ src/gvl/test/test.hpp \ src/gvl/text/utf8.hpp \ src/gvl/text/util.hpp \ src/gvl/trees/node_base.hpp \ src/gvl/tut/quickcheck/context.hpp \ src/gvl/tut/quickcheck/generator.hpp \ src/gvl/tut/quickcheck/property.hpp \ src/gvl/tut/quickcheck/quickcheck.hpp \ \ src/boostTesting.cpp LIB_ARCH_NIXBIN_LIBFILES = \ lib/libcap.so.2 \ lib/libdbus-1.so.3 \ lib/libtinfo.so.5 \ lib/libwrap.so.0 \ lib/libz.so.1 USR_LIB_ARCH_NIXBIN_LIBFILES = \ lib/libconfig++.so \ lib/libSDL_mixer-1.2.so.0 \ lib/libSDL-1.2.so.0 \ lib/libmikmod.so.2 \ lib/libvorbisfile.so.3 \ lib/libvorbis.so.0 \ lib/libFLAC.so.8 \ lib/libpulse-simple.so.0 \ lib/libpulse.so.0 \ lib/libdirectfb-1.2.so.9 \ lib/libfusion-1.2.so.9 \ lib/libdirect-1.2.so.9 \ lib/libcaca.so.0 \ lib/libsndfile.so.1 \ lib/libasyncns.so.0 \ lib/libogg.so.0 \ lib/libvorbisenc.so.2 \ lib/libxcb.so.1 \ lib/libX11-xcb.so.1 \ lib/libjson.so.0 USR_LIB_NIXBIN_LIBFILES = \ lib/libboost_program_options.so \ lib/libmad.so.0 USR_LIB_ARCH_PA_NIXBIN_LIBFILES = \ lib/libpulsecommon-2.0.so NIXBIN_LIBFILES = \ $(LIB_ARCH_NIXBIN_LIBFILES) \ $(USR_LIB_ARCH_NIXBIN_LIBFILES) \ $(USR_LIB_NIXBIN_LIBFILES) \ $(LIB_NIXBIN_LIBFILES) \ $(USR_LIB_ARCH_PA_NIXBIN_LIBFILES) NIXBIN_LIB_DEBS = \ libasyncns0 \ libcaca0 \ libconfig++9 \ libdbus-1-3 \ libdirectfb-1.2-9 \ libflac8 \ libmad0 \ libmikmod2 \ libpulse0 \ libsdl-mixer1.2 \ libsdl1.2debian \ libsndfile1 NIXBIN_LIB_DEBS_NOSRC = \ libboost-program-options1.49.0 \ libcap2 \ libjson0 \ libncursesw5 \ libogg0 \ libtinfo5 \ libvorbis0a \ libvorbisenc2 WINDOWS_LIBS_A = \ windows/libconfig-1.4.8/lib/.libs/libconfig++.a WINDOWS_LIBS_DLL = \ windows/SDL-1.2.15/build/.libs/SDL.dll \ windows/SDL_mixer-1.2.12/lib/x86/SDL_mixer.dll \ windows/boost-program_options-1.51.0/stage/lib/libboost_program_options.dll \ windows/zlib-1.2.7/zlib1.dll WINDOWS_LIBS = $(WINDOWS_LIBS_A) $(WINDOWS_LIBS_DLL) WINDOWS_TXT = AUTHORS COPYING ChangeLog NEWS @HAS_WINDOWS_LDFLAGS_TRUE@EXTRA_lierolibre_DEPENDENCIES = $(WINDOWS_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): src/config.h: src/stamp-h1 @if test ! -f $@; then rm -f src/stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) src/stamp-h1; else :; fi src/stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status @rm -f src/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(top_srcdir)/src/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f src/stamp-h1 touch $@ distclean-hdr: -rm -f src/config.h src/stamp-h1 clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_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 src/gvl/containers/$(am__dirstamp): @$(MKDIR_P) src/gvl/containers @: > src/gvl/containers/$(am__dirstamp) src/gvl/containers/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/containers/$(DEPDIR) @: > src/gvl/containers/$(DEPDIR)/$(am__dirstamp) src/gvl/containers/list.lo: src/gvl/containers/$(am__dirstamp) \ src/gvl/containers/$(DEPDIR)/$(am__dirstamp) src/gvl/crypt/$(am__dirstamp): @$(MKDIR_P) src/gvl/crypt @: > src/gvl/crypt/$(am__dirstamp) src/gvl/crypt/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/crypt/$(DEPDIR) @: > src/gvl/crypt/$(DEPDIR)/$(am__dirstamp) src/gvl/crypt/curve25519.lo: src/gvl/crypt/$(am__dirstamp) \ src/gvl/crypt/$(DEPDIR)/$(am__dirstamp) src/gvl/io/$(am__dirstamp): @$(MKDIR_P) src/gvl/io @: > src/gvl/io/$(am__dirstamp) src/gvl/io/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/io/$(DEPDIR) @: > src/gvl/io/$(DEPDIR)/$(am__dirstamp) src/gvl/io/stream.lo: src/gvl/io/$(am__dirstamp) \ src/gvl/io/$(DEPDIR)/$(am__dirstamp) src/gvl/io/encoding.lo: src/gvl/io/$(am__dirstamp) \ src/gvl/io/$(DEPDIR)/$(am__dirstamp) src/gvl/io/convert.lo: src/gvl/io/$(am__dirstamp) \ src/gvl/io/$(DEPDIR)/$(am__dirstamp) src/gvl/math/$(am__dirstamp): @$(MKDIR_P) src/gvl/math @: > src/gvl/math/$(am__dirstamp) src/gvl/math/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/math/$(DEPDIR) @: > src/gvl/math/$(DEPDIR)/$(am__dirstamp) src/gvl/math/ieee.lo: src/gvl/math/$(am__dirstamp) \ src/gvl/math/$(DEPDIR)/$(am__dirstamp) src/gvl/math/tt800.lo: src/gvl/math/$(am__dirstamp) \ src/gvl/math/$(DEPDIR)/$(am__dirstamp) src/gvl/resman/$(am__dirstamp): @$(MKDIR_P) src/gvl/resman @: > src/gvl/resman/$(am__dirstamp) src/gvl/resman/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/resman/$(DEPDIR) @: > src/gvl/resman/$(DEPDIR)/$(am__dirstamp) src/gvl/resman/shared.lo: src/gvl/resman/$(am__dirstamp) \ src/gvl/resman/$(DEPDIR)/$(am__dirstamp) src/gvl/sockets/$(am__dirstamp): @$(MKDIR_P) src/gvl/sockets @: > src/gvl/sockets/$(am__dirstamp) src/gvl/sockets/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/sockets/$(DEPDIR) @: > src/gvl/sockets/$(DEPDIR)/$(am__dirstamp) src/gvl/sockets/fd_set.lo: src/gvl/sockets/$(am__dirstamp) \ src/gvl/sockets/$(DEPDIR)/$(am__dirstamp) src/gvl/sockets/sockets.lo: src/gvl/sockets/$(am__dirstamp) \ src/gvl/sockets/$(DEPDIR)/$(am__dirstamp) src/gvl/sockets/socketstream.lo: src/gvl/sockets/$(am__dirstamp) \ src/gvl/sockets/$(DEPDIR)/$(am__dirstamp) src/gvl/support/$(am__dirstamp): @$(MKDIR_P) src/gvl/support @: > src/gvl/support/$(am__dirstamp) src/gvl/support/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/support/$(DEPDIR) @: > src/gvl/support/$(DEPDIR)/$(am__dirstamp) src/gvl/support/src_gvl_libgvl_la-bits.lo: \ src/gvl/support/$(am__dirstamp) \ src/gvl/support/$(DEPDIR)/$(am__dirstamp) src/gvl/support/debug.lo: src/gvl/support/$(am__dirstamp) \ src/gvl/support/$(DEPDIR)/$(am__dirstamp) src/gvl/support/hash.lo: src/gvl/support/$(am__dirstamp) \ src/gvl/support/$(DEPDIR)/$(am__dirstamp) src/gvl/support/log.lo: src/gvl/support/$(am__dirstamp) \ src/gvl/support/$(DEPDIR)/$(am__dirstamp) src/gvl/support/profile.lo: src/gvl/support/$(am__dirstamp) \ src/gvl/support/$(DEPDIR)/$(am__dirstamp) src/gvl/system/$(am__dirstamp): @$(MKDIR_P) src/gvl/system @: > src/gvl/system/$(am__dirstamp) src/gvl/system/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/system/$(DEPDIR) @: > src/gvl/system/$(DEPDIR)/$(am__dirstamp) src/gvl/system/src_gvl_libgvl_la-system.lo: \ src/gvl/system/$(am__dirstamp) \ src/gvl/system/$(DEPDIR)/$(am__dirstamp) src/gvl/tut/quickcheck/$(am__dirstamp): @$(MKDIR_P) src/gvl/tut/quickcheck @: > src/gvl/tut/quickcheck/$(am__dirstamp) src/gvl/tut/quickcheck/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/tut/quickcheck/$(DEPDIR) @: > src/gvl/tut/quickcheck/$(DEPDIR)/$(am__dirstamp) src/gvl/tut/quickcheck/context.lo: \ src/gvl/tut/quickcheck/$(am__dirstamp) \ src/gvl/tut/quickcheck/$(DEPDIR)/$(am__dirstamp) src/gvl/$(am__dirstamp): @$(MKDIR_P) src/gvl @: > src/gvl/$(am__dirstamp) src/gvl/libgvl.la: $(src_gvl_libgvl_la_OBJECTS) $(src_gvl_libgvl_la_DEPENDENCIES) $(EXTRA_src_gvl_libgvl_la_DEPENDENCIES) src/gvl/$(am__dirstamp) $(src_gvl_libgvl_la_LINK) $(src_gvl_libgvl_la_OBJECTS) $(src_gvl_libgvl_la_LIBADD) $(LIBS) install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS) @$(NORMAL_INSTALL) @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-pkglibexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkglibexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkglibexecdir)" && rm -f $$files clean-pkglibexecPROGRAMS: @list='$(pkglibexec_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: > src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-binReader.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-bobject.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-bonus.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-common.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-console.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-constants.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-filesystem.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-game.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-gfx.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-keys.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-level.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-main.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-math.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-ninjarope.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-nobject.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-rand.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-reader.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-replay.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-sdlmain.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-settings.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-sfx.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-sobject.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-sys.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-text.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-viewport.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-weapon.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-weapsel.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-worm.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-argParse.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-configCompat.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-configHelper.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-configInit.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-dataPath.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/lierolibre-to_string.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/controller/$(am__dirstamp): @$(MKDIR_P) src/controller @: > src/controller/$(am__dirstamp) src/controller/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/controller/$(DEPDIR) @: > src/controller/$(DEPDIR)/$(am__dirstamp) src/controller/lierolibre-commonController.$(OBJEXT): \ src/controller/$(am__dirstamp) \ src/controller/$(DEPDIR)/$(am__dirstamp) src/controller/lierolibre-localController.$(OBJEXT): \ src/controller/$(am__dirstamp) \ src/controller/$(DEPDIR)/$(am__dirstamp) src/controller/lierolibre-replayController.$(OBJEXT): \ src/controller/$(am__dirstamp) \ src/controller/$(DEPDIR)/$(am__dirstamp) src/gfx/$(am__dirstamp): @$(MKDIR_P) src/gfx @: > src/gfx/$(am__dirstamp) src/gfx/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gfx/$(DEPDIR) @: > src/gfx/$(DEPDIR)/$(am__dirstamp) src/gfx/lierolibre-blit.$(OBJEXT): src/gfx/$(am__dirstamp) \ src/gfx/$(DEPDIR)/$(am__dirstamp) src/gfx/lierolibre-font.$(OBJEXT): src/gfx/$(am__dirstamp) \ src/gfx/$(DEPDIR)/$(am__dirstamp) src/gfx/lierolibre-palette.$(OBJEXT): src/gfx/$(am__dirstamp) \ src/gfx/$(DEPDIR)/$(am__dirstamp) src/gfx/lierolibre-sprite.$(OBJEXT): src/gfx/$(am__dirstamp) \ src/gfx/$(DEPDIR)/$(am__dirstamp) src/menu/$(am__dirstamp): @$(MKDIR_P) src/menu @: > src/menu/$(am__dirstamp) src/menu/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/menu/$(DEPDIR) @: > src/menu/$(DEPDIR)/$(am__dirstamp) src/menu/lierolibre-booleanSwitchBehavior.$(OBJEXT): \ src/menu/$(am__dirstamp) src/menu/$(DEPDIR)/$(am__dirstamp) src/menu/lierolibre-enumBehavior.$(OBJEXT): src/menu/$(am__dirstamp) \ src/menu/$(DEPDIR)/$(am__dirstamp) src/menu/lierolibre-hiddenMenu.$(OBJEXT): src/menu/$(am__dirstamp) \ src/menu/$(DEPDIR)/$(am__dirstamp) src/menu/lierolibre-integerBehavior.$(OBJEXT): \ src/menu/$(am__dirstamp) src/menu/$(DEPDIR)/$(am__dirstamp) src/menu/lierolibre-itemBehavior.$(OBJEXT): src/menu/$(am__dirstamp) \ src/menu/$(DEPDIR)/$(am__dirstamp) src/menu/lierolibre-menu.$(OBJEXT): src/menu/$(am__dirstamp) \ src/menu/$(DEPDIR)/$(am__dirstamp) src/menu/lierolibre-menuItem.$(OBJEXT): src/menu/$(am__dirstamp) \ src/menu/$(DEPDIR)/$(am__dirstamp) src/menu/lierolibre-timeBehavior.$(OBJEXT): src/menu/$(am__dirstamp) \ src/menu/$(DEPDIR)/$(am__dirstamp) lierolibre$(EXEEXT): $(lierolibre_OBJECTS) $(lierolibre_DEPENDENCIES) $(EXTRA_lierolibre_DEPENDENCIES) @rm -f lierolibre$(EXEEXT) $(lierolibre_LINK) $(lierolibre_OBJECTS) $(lierolibre_LDADD) $(LIBS) src/gvl/gvl_test/containers/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test/containers @: > src/gvl/gvl_test/containers/$(am__dirstamp) src/gvl/gvl_test/containers/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test/containers/$(DEPDIR) @: > src/gvl/gvl_test/containers/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/containers/list.$(OBJEXT): \ src/gvl/gvl_test/containers/$(am__dirstamp) \ src/gvl/gvl_test/containers/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/containers/pairing_heap.$(OBJEXT): \ src/gvl/gvl_test/containers/$(am__dirstamp) \ src/gvl/gvl_test/containers/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/containers/treap.$(OBJEXT): \ src/gvl/gvl_test/containers/$(am__dirstamp) \ src/gvl/gvl_test/containers/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/io/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test/io @: > src/gvl/gvl_test/io/$(am__dirstamp) src/gvl/gvl_test/io/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test/io/$(DEPDIR) @: > src/gvl/gvl_test/io/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/io/bitstream.$(OBJEXT): \ src/gvl/gvl_test/io/$(am__dirstamp) \ src/gvl/gvl_test/io/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/io/stream.$(OBJEXT): \ src/gvl/gvl_test/io/$(am__dirstamp) \ src/gvl/gvl_test/io/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/support/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test/support @: > src/gvl/gvl_test/support/$(am__dirstamp) src/gvl/gvl_test/support/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test/support/$(DEPDIR) @: > src/gvl/gvl_test/support/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/support/bits.$(OBJEXT): \ src/gvl/gvl_test/support/$(am__dirstamp) \ src/gvl/gvl_test/support/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/math/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test/math @: > src/gvl/gvl_test/math/$(am__dirstamp) src/gvl/gvl_test/math/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test/math/$(DEPDIR) @: > src/gvl/gvl_test/math/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/math/deterministic_float.$(OBJEXT): \ src/gvl/gvl_test/math/$(am__dirstamp) \ src/gvl/gvl_test/math/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test @: > src/gvl/gvl_test/$(am__dirstamp) src/gvl/gvl_test/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/gvl/gvl_test/$(DEPDIR) @: > src/gvl/gvl_test/$(DEPDIR)/$(am__dirstamp) src/gvl/gvl_test/test.$(OBJEXT): src/gvl/gvl_test/$(am__dirstamp) \ src/gvl/gvl_test/$(DEPDIR)/$(am__dirstamp) src/gvl/gvltest$(EXEEXT): $(src_gvl_gvltest_OBJECTS) $(src_gvl_gvltest_DEPENDENCIES) $(EXTRA_src_gvl_gvltest_DEPENDENCIES) src/gvl/$(am__dirstamp) @rm -f src/gvl/gvltest$(EXEEXT) $(src_gvl_gvltest_LINK) $(src_gvl_gvltest_OBJECTS) $(src_gvl_gvltest_LDADD) $(LIBS) install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-dist_binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) install-nodist_binSCRIPTS: $(nodist_bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-nodist_binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f src/controller/lierolibre-commonController.$(OBJEXT) -rm -f src/controller/lierolibre-localController.$(OBJEXT) -rm -f src/controller/lierolibre-replayController.$(OBJEXT) -rm -f src/gfx/lierolibre-blit.$(OBJEXT) -rm -f src/gfx/lierolibre-font.$(OBJEXT) -rm -f src/gfx/lierolibre-palette.$(OBJEXT) -rm -f src/gfx/lierolibre-sprite.$(OBJEXT) -rm -f src/gvl/containers/list.$(OBJEXT) -rm -f src/gvl/containers/list.lo -rm -f src/gvl/crypt/curve25519.$(OBJEXT) -rm -f src/gvl/crypt/curve25519.lo -rm -f src/gvl/gvl_test/containers/list.$(OBJEXT) -rm -f src/gvl/gvl_test/containers/pairing_heap.$(OBJEXT) -rm -f src/gvl/gvl_test/containers/treap.$(OBJEXT) -rm -f src/gvl/gvl_test/io/bitstream.$(OBJEXT) -rm -f src/gvl/gvl_test/io/stream.$(OBJEXT) -rm -f src/gvl/gvl_test/math/deterministic_float.$(OBJEXT) -rm -f src/gvl/gvl_test/support/bits.$(OBJEXT) -rm -f src/gvl/gvl_test/test.$(OBJEXT) -rm -f src/gvl/io/convert.$(OBJEXT) -rm -f src/gvl/io/convert.lo -rm -f src/gvl/io/encoding.$(OBJEXT) -rm -f src/gvl/io/encoding.lo -rm -f src/gvl/io/stream.$(OBJEXT) -rm -f src/gvl/io/stream.lo -rm -f src/gvl/math/ieee.$(OBJEXT) -rm -f src/gvl/math/ieee.lo -rm -f src/gvl/math/tt800.$(OBJEXT) -rm -f src/gvl/math/tt800.lo -rm -f src/gvl/resman/shared.$(OBJEXT) -rm -f src/gvl/resman/shared.lo -rm -f src/gvl/sockets/fd_set.$(OBJEXT) -rm -f src/gvl/sockets/fd_set.lo -rm -f src/gvl/sockets/sockets.$(OBJEXT) -rm -f src/gvl/sockets/sockets.lo -rm -f src/gvl/sockets/socketstream.$(OBJEXT) -rm -f src/gvl/sockets/socketstream.lo -rm -f src/gvl/support/debug.$(OBJEXT) -rm -f src/gvl/support/debug.lo -rm -f src/gvl/support/hash.$(OBJEXT) -rm -f src/gvl/support/hash.lo -rm -f src/gvl/support/log.$(OBJEXT) -rm -f src/gvl/support/log.lo -rm -f src/gvl/support/profile.$(OBJEXT) -rm -f src/gvl/support/profile.lo -rm -f src/gvl/support/src_gvl_libgvl_la-bits.$(OBJEXT) -rm -f src/gvl/support/src_gvl_libgvl_la-bits.lo -rm -f src/gvl/system/src_gvl_libgvl_la-system.$(OBJEXT) -rm -f src/gvl/system/src_gvl_libgvl_la-system.lo -rm -f src/gvl/tut/quickcheck/context.$(OBJEXT) -rm -f src/gvl/tut/quickcheck/context.lo -rm -f src/lierolibre-argParse.$(OBJEXT) -rm -f src/lierolibre-binReader.$(OBJEXT) -rm -f src/lierolibre-bobject.$(OBJEXT) -rm -f src/lierolibre-bonus.$(OBJEXT) -rm -f src/lierolibre-common.$(OBJEXT) -rm -f src/lierolibre-configCompat.$(OBJEXT) -rm -f src/lierolibre-configHelper.$(OBJEXT) -rm -f src/lierolibre-configInit.$(OBJEXT) -rm -f src/lierolibre-console.$(OBJEXT) -rm -f src/lierolibre-constants.$(OBJEXT) -rm -f src/lierolibre-dataPath.$(OBJEXT) -rm -f src/lierolibre-filesystem.$(OBJEXT) -rm -f src/lierolibre-game.$(OBJEXT) -rm -f src/lierolibre-gfx.$(OBJEXT) -rm -f src/lierolibre-keys.$(OBJEXT) -rm -f src/lierolibre-level.$(OBJEXT) -rm -f src/lierolibre-main.$(OBJEXT) -rm -f src/lierolibre-math.$(OBJEXT) -rm -f src/lierolibre-ninjarope.$(OBJEXT) -rm -f src/lierolibre-nobject.$(OBJEXT) -rm -f src/lierolibre-rand.$(OBJEXT) -rm -f src/lierolibre-reader.$(OBJEXT) -rm -f src/lierolibre-replay.$(OBJEXT) -rm -f src/lierolibre-sdlmain.$(OBJEXT) -rm -f src/lierolibre-settings.$(OBJEXT) -rm -f src/lierolibre-sfx.$(OBJEXT) -rm -f src/lierolibre-sobject.$(OBJEXT) -rm -f src/lierolibre-sys.$(OBJEXT) -rm -f src/lierolibre-text.$(OBJEXT) -rm -f src/lierolibre-to_string.$(OBJEXT) -rm -f src/lierolibre-viewport.$(OBJEXT) -rm -f src/lierolibre-weapon.$(OBJEXT) -rm -f src/lierolibre-weapsel.$(OBJEXT) -rm -f src/lierolibre-worm.$(OBJEXT) -rm -f src/menu/lierolibre-booleanSwitchBehavior.$(OBJEXT) -rm -f src/menu/lierolibre-enumBehavior.$(OBJEXT) -rm -f src/menu/lierolibre-hiddenMenu.$(OBJEXT) -rm -f src/menu/lierolibre-integerBehavior.$(OBJEXT) -rm -f src/menu/lierolibre-itemBehavior.$(OBJEXT) -rm -f src/menu/lierolibre-menu.$(OBJEXT) -rm -f src/menu/lierolibre-menuItem.$(OBJEXT) -rm -f src/menu/lierolibre-timeBehavior.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-argParse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-binReader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-bobject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-bonus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-configCompat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-configHelper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-configInit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-console.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-constants.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-dataPath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-filesystem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-game.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-gfx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-keys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-level.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-math.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-ninjarope.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-nobject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-rand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-reader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-replay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-sdlmain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-sfx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-sobject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-sys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-text.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-to_string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-viewport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-weapon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-weapsel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lierolibre-worm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/controller/$(DEPDIR)/lierolibre-commonController.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/controller/$(DEPDIR)/lierolibre-localController.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/controller/$(DEPDIR)/lierolibre-replayController.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gfx/$(DEPDIR)/lierolibre-blit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gfx/$(DEPDIR)/lierolibre-font.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gfx/$(DEPDIR)/lierolibre-palette.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gfx/$(DEPDIR)/lierolibre-sprite.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/containers/$(DEPDIR)/list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/crypt/$(DEPDIR)/curve25519.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/gvl_test/$(DEPDIR)/test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/gvl_test/containers/$(DEPDIR)/list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/gvl_test/containers/$(DEPDIR)/pairing_heap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/gvl_test/containers/$(DEPDIR)/treap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/gvl_test/io/$(DEPDIR)/bitstream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/gvl_test/io/$(DEPDIR)/stream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/gvl_test/math/$(DEPDIR)/deterministic_float.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/gvl_test/support/$(DEPDIR)/bits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/io/$(DEPDIR)/convert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/io/$(DEPDIR)/encoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/io/$(DEPDIR)/stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/math/$(DEPDIR)/ieee.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/math/$(DEPDIR)/tt800.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/resman/$(DEPDIR)/shared.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/sockets/$(DEPDIR)/fd_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/sockets/$(DEPDIR)/sockets.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/sockets/$(DEPDIR)/socketstream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/support/$(DEPDIR)/debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/support/$(DEPDIR)/hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/support/$(DEPDIR)/log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/support/$(DEPDIR)/profile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/support/$(DEPDIR)/src_gvl_libgvl_la-bits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/system/$(DEPDIR)/src_gvl_libgvl_la-system.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/gvl/tut/quickcheck/$(DEPDIR)/context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/menu/$(DEPDIR)/lierolibre-booleanSwitchBehavior.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/menu/$(DEPDIR)/lierolibre-enumBehavior.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/menu/$(DEPDIR)/lierolibre-hiddenMenu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/menu/$(DEPDIR)/lierolibre-integerBehavior.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/menu/$(DEPDIR)/lierolibre-itemBehavior.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/menu/$(DEPDIR)/lierolibre-menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/menu/$(DEPDIR)/lierolibre-menuItem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/menu/$(DEPDIR)/lierolibre-timeBehavior.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.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 -o $@ $< .c.obj: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.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 -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.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 $@ $< src/gvl/support/src_gvl_libgvl_la-bits.lo: src/gvl/support/bits.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_gvl_libgvl_la_CFLAGS) $(CFLAGS) -MT src/gvl/support/src_gvl_libgvl_la-bits.lo -MD -MP -MF src/gvl/support/$(DEPDIR)/src_gvl_libgvl_la-bits.Tpo -c -o src/gvl/support/src_gvl_libgvl_la-bits.lo `test -f 'src/gvl/support/bits.c' || echo '$(srcdir)/'`src/gvl/support/bits.c @am__fastdepCC_TRUE@ $(am__mv) src/gvl/support/$(DEPDIR)/src_gvl_libgvl_la-bits.Tpo src/gvl/support/$(DEPDIR)/src_gvl_libgvl_la-bits.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/gvl/support/bits.c' object='src/gvl/support/src_gvl_libgvl_la-bits.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) $(src_gvl_libgvl_la_CFLAGS) $(CFLAGS) -c -o src/gvl/support/src_gvl_libgvl_la-bits.lo `test -f 'src/gvl/support/bits.c' || echo '$(srcdir)/'`src/gvl/support/bits.c src/gvl/system/src_gvl_libgvl_la-system.lo: src/gvl/system/system.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_gvl_libgvl_la_CFLAGS) $(CFLAGS) -MT src/gvl/system/src_gvl_libgvl_la-system.lo -MD -MP -MF src/gvl/system/$(DEPDIR)/src_gvl_libgvl_la-system.Tpo -c -o src/gvl/system/src_gvl_libgvl_la-system.lo `test -f 'src/gvl/system/system.c' || echo '$(srcdir)/'`src/gvl/system/system.c @am__fastdepCC_TRUE@ $(am__mv) src/gvl/system/$(DEPDIR)/src_gvl_libgvl_la-system.Tpo src/gvl/system/$(DEPDIR)/src_gvl_libgvl_la-system.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/gvl/system/system.c' object='src/gvl/system/src_gvl_libgvl_la-system.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) $(src_gvl_libgvl_la_CFLAGS) $(CFLAGS) -c -o src/gvl/system/src_gvl_libgvl_la-system.lo `test -f 'src/gvl/system/system.c' || echo '$(srcdir)/'`src/gvl/system/system.c .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.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 $@ $< src/lierolibre-binReader.o: src/binReader.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-binReader.o -MD -MP -MF src/$(DEPDIR)/lierolibre-binReader.Tpo -c -o src/lierolibre-binReader.o `test -f 'src/binReader.cpp' || echo '$(srcdir)/'`src/binReader.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-binReader.Tpo src/$(DEPDIR)/lierolibre-binReader.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/binReader.cpp' object='src/lierolibre-binReader.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-binReader.o `test -f 'src/binReader.cpp' || echo '$(srcdir)/'`src/binReader.cpp src/lierolibre-binReader.obj: src/binReader.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-binReader.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-binReader.Tpo -c -o src/lierolibre-binReader.obj `if test -f 'src/binReader.cpp'; then $(CYGPATH_W) 'src/binReader.cpp'; else $(CYGPATH_W) '$(srcdir)/src/binReader.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-binReader.Tpo src/$(DEPDIR)/lierolibre-binReader.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/binReader.cpp' object='src/lierolibre-binReader.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-binReader.obj `if test -f 'src/binReader.cpp'; then $(CYGPATH_W) 'src/binReader.cpp'; else $(CYGPATH_W) '$(srcdir)/src/binReader.cpp'; fi` src/lierolibre-bobject.o: src/bobject.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-bobject.o -MD -MP -MF src/$(DEPDIR)/lierolibre-bobject.Tpo -c -o src/lierolibre-bobject.o `test -f 'src/bobject.cpp' || echo '$(srcdir)/'`src/bobject.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-bobject.Tpo src/$(DEPDIR)/lierolibre-bobject.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/bobject.cpp' object='src/lierolibre-bobject.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-bobject.o `test -f 'src/bobject.cpp' || echo '$(srcdir)/'`src/bobject.cpp src/lierolibre-bobject.obj: src/bobject.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-bobject.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-bobject.Tpo -c -o src/lierolibre-bobject.obj `if test -f 'src/bobject.cpp'; then $(CYGPATH_W) 'src/bobject.cpp'; else $(CYGPATH_W) '$(srcdir)/src/bobject.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-bobject.Tpo src/$(DEPDIR)/lierolibre-bobject.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/bobject.cpp' object='src/lierolibre-bobject.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-bobject.obj `if test -f 'src/bobject.cpp'; then $(CYGPATH_W) 'src/bobject.cpp'; else $(CYGPATH_W) '$(srcdir)/src/bobject.cpp'; fi` src/lierolibre-bonus.o: src/bonus.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-bonus.o -MD -MP -MF src/$(DEPDIR)/lierolibre-bonus.Tpo -c -o src/lierolibre-bonus.o `test -f 'src/bonus.cpp' || echo '$(srcdir)/'`src/bonus.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-bonus.Tpo src/$(DEPDIR)/lierolibre-bonus.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/bonus.cpp' object='src/lierolibre-bonus.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-bonus.o `test -f 'src/bonus.cpp' || echo '$(srcdir)/'`src/bonus.cpp src/lierolibre-bonus.obj: src/bonus.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-bonus.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-bonus.Tpo -c -o src/lierolibre-bonus.obj `if test -f 'src/bonus.cpp'; then $(CYGPATH_W) 'src/bonus.cpp'; else $(CYGPATH_W) '$(srcdir)/src/bonus.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-bonus.Tpo src/$(DEPDIR)/lierolibre-bonus.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/bonus.cpp' object='src/lierolibre-bonus.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-bonus.obj `if test -f 'src/bonus.cpp'; then $(CYGPATH_W) 'src/bonus.cpp'; else $(CYGPATH_W) '$(srcdir)/src/bonus.cpp'; fi` src/lierolibre-common.o: src/common.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-common.o -MD -MP -MF src/$(DEPDIR)/lierolibre-common.Tpo -c -o src/lierolibre-common.o `test -f 'src/common.cpp' || echo '$(srcdir)/'`src/common.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-common.Tpo src/$(DEPDIR)/lierolibre-common.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common.cpp' object='src/lierolibre-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-common.o `test -f 'src/common.cpp' || echo '$(srcdir)/'`src/common.cpp src/lierolibre-common.obj: src/common.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-common.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-common.Tpo -c -o src/lierolibre-common.obj `if test -f 'src/common.cpp'; then $(CYGPATH_W) 'src/common.cpp'; else $(CYGPATH_W) '$(srcdir)/src/common.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-common.Tpo src/$(DEPDIR)/lierolibre-common.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common.cpp' object='src/lierolibre-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-common.obj `if test -f 'src/common.cpp'; then $(CYGPATH_W) 'src/common.cpp'; else $(CYGPATH_W) '$(srcdir)/src/common.cpp'; fi` src/lierolibre-console.o: src/console.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-console.o -MD -MP -MF src/$(DEPDIR)/lierolibre-console.Tpo -c -o src/lierolibre-console.o `test -f 'src/console.cpp' || echo '$(srcdir)/'`src/console.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-console.Tpo src/$(DEPDIR)/lierolibre-console.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/console.cpp' object='src/lierolibre-console.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-console.o `test -f 'src/console.cpp' || echo '$(srcdir)/'`src/console.cpp src/lierolibre-console.obj: src/console.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-console.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-console.Tpo -c -o src/lierolibre-console.obj `if test -f 'src/console.cpp'; then $(CYGPATH_W) 'src/console.cpp'; else $(CYGPATH_W) '$(srcdir)/src/console.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-console.Tpo src/$(DEPDIR)/lierolibre-console.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/console.cpp' object='src/lierolibre-console.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-console.obj `if test -f 'src/console.cpp'; then $(CYGPATH_W) 'src/console.cpp'; else $(CYGPATH_W) '$(srcdir)/src/console.cpp'; fi` src/lierolibre-constants.o: src/constants.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-constants.o -MD -MP -MF src/$(DEPDIR)/lierolibre-constants.Tpo -c -o src/lierolibre-constants.o `test -f 'src/constants.cpp' || echo '$(srcdir)/'`src/constants.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-constants.Tpo src/$(DEPDIR)/lierolibre-constants.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/constants.cpp' object='src/lierolibre-constants.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-constants.o `test -f 'src/constants.cpp' || echo '$(srcdir)/'`src/constants.cpp src/lierolibre-constants.obj: src/constants.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-constants.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-constants.Tpo -c -o src/lierolibre-constants.obj `if test -f 'src/constants.cpp'; then $(CYGPATH_W) 'src/constants.cpp'; else $(CYGPATH_W) '$(srcdir)/src/constants.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-constants.Tpo src/$(DEPDIR)/lierolibre-constants.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/constants.cpp' object='src/lierolibre-constants.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-constants.obj `if test -f 'src/constants.cpp'; then $(CYGPATH_W) 'src/constants.cpp'; else $(CYGPATH_W) '$(srcdir)/src/constants.cpp'; fi` src/lierolibre-filesystem.o: src/filesystem.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-filesystem.o -MD -MP -MF src/$(DEPDIR)/lierolibre-filesystem.Tpo -c -o src/lierolibre-filesystem.o `test -f 'src/filesystem.cpp' || echo '$(srcdir)/'`src/filesystem.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-filesystem.Tpo src/$(DEPDIR)/lierolibre-filesystem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/filesystem.cpp' object='src/lierolibre-filesystem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-filesystem.o `test -f 'src/filesystem.cpp' || echo '$(srcdir)/'`src/filesystem.cpp src/lierolibre-filesystem.obj: src/filesystem.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-filesystem.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-filesystem.Tpo -c -o src/lierolibre-filesystem.obj `if test -f 'src/filesystem.cpp'; then $(CYGPATH_W) 'src/filesystem.cpp'; else $(CYGPATH_W) '$(srcdir)/src/filesystem.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-filesystem.Tpo src/$(DEPDIR)/lierolibre-filesystem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/filesystem.cpp' object='src/lierolibre-filesystem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-filesystem.obj `if test -f 'src/filesystem.cpp'; then $(CYGPATH_W) 'src/filesystem.cpp'; else $(CYGPATH_W) '$(srcdir)/src/filesystem.cpp'; fi` src/lierolibre-game.o: src/game.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-game.o -MD -MP -MF src/$(DEPDIR)/lierolibre-game.Tpo -c -o src/lierolibre-game.o `test -f 'src/game.cpp' || echo '$(srcdir)/'`src/game.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-game.Tpo src/$(DEPDIR)/lierolibre-game.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/game.cpp' object='src/lierolibre-game.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-game.o `test -f 'src/game.cpp' || echo '$(srcdir)/'`src/game.cpp src/lierolibre-game.obj: src/game.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-game.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-game.Tpo -c -o src/lierolibre-game.obj `if test -f 'src/game.cpp'; then $(CYGPATH_W) 'src/game.cpp'; else $(CYGPATH_W) '$(srcdir)/src/game.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-game.Tpo src/$(DEPDIR)/lierolibre-game.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/game.cpp' object='src/lierolibre-game.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-game.obj `if test -f 'src/game.cpp'; then $(CYGPATH_W) 'src/game.cpp'; else $(CYGPATH_W) '$(srcdir)/src/game.cpp'; fi` src/lierolibre-gfx.o: src/gfx.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-gfx.o -MD -MP -MF src/$(DEPDIR)/lierolibre-gfx.Tpo -c -o src/lierolibre-gfx.o `test -f 'src/gfx.cpp' || echo '$(srcdir)/'`src/gfx.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-gfx.Tpo src/$(DEPDIR)/lierolibre-gfx.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx.cpp' object='src/lierolibre-gfx.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-gfx.o `test -f 'src/gfx.cpp' || echo '$(srcdir)/'`src/gfx.cpp src/lierolibre-gfx.obj: src/gfx.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-gfx.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-gfx.Tpo -c -o src/lierolibre-gfx.obj `if test -f 'src/gfx.cpp'; then $(CYGPATH_W) 'src/gfx.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-gfx.Tpo src/$(DEPDIR)/lierolibre-gfx.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx.cpp' object='src/lierolibre-gfx.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-gfx.obj `if test -f 'src/gfx.cpp'; then $(CYGPATH_W) 'src/gfx.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx.cpp'; fi` src/lierolibre-keys.o: src/keys.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-keys.o -MD -MP -MF src/$(DEPDIR)/lierolibre-keys.Tpo -c -o src/lierolibre-keys.o `test -f 'src/keys.cpp' || echo '$(srcdir)/'`src/keys.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-keys.Tpo src/$(DEPDIR)/lierolibre-keys.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/keys.cpp' object='src/lierolibre-keys.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-keys.o `test -f 'src/keys.cpp' || echo '$(srcdir)/'`src/keys.cpp src/lierolibre-keys.obj: src/keys.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-keys.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-keys.Tpo -c -o src/lierolibre-keys.obj `if test -f 'src/keys.cpp'; then $(CYGPATH_W) 'src/keys.cpp'; else $(CYGPATH_W) '$(srcdir)/src/keys.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-keys.Tpo src/$(DEPDIR)/lierolibre-keys.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/keys.cpp' object='src/lierolibre-keys.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-keys.obj `if test -f 'src/keys.cpp'; then $(CYGPATH_W) 'src/keys.cpp'; else $(CYGPATH_W) '$(srcdir)/src/keys.cpp'; fi` src/lierolibre-level.o: src/level.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-level.o -MD -MP -MF src/$(DEPDIR)/lierolibre-level.Tpo -c -o src/lierolibre-level.o `test -f 'src/level.cpp' || echo '$(srcdir)/'`src/level.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-level.Tpo src/$(DEPDIR)/lierolibre-level.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/level.cpp' object='src/lierolibre-level.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-level.o `test -f 'src/level.cpp' || echo '$(srcdir)/'`src/level.cpp src/lierolibre-level.obj: src/level.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-level.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-level.Tpo -c -o src/lierolibre-level.obj `if test -f 'src/level.cpp'; then $(CYGPATH_W) 'src/level.cpp'; else $(CYGPATH_W) '$(srcdir)/src/level.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-level.Tpo src/$(DEPDIR)/lierolibre-level.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/level.cpp' object='src/lierolibre-level.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-level.obj `if test -f 'src/level.cpp'; then $(CYGPATH_W) 'src/level.cpp'; else $(CYGPATH_W) '$(srcdir)/src/level.cpp'; fi` src/lierolibre-main.o: src/main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-main.o -MD -MP -MF src/$(DEPDIR)/lierolibre-main.Tpo -c -o src/lierolibre-main.o `test -f 'src/main.cpp' || echo '$(srcdir)/'`src/main.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-main.Tpo src/$(DEPDIR)/lierolibre-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/main.cpp' object='src/lierolibre-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-main.o `test -f 'src/main.cpp' || echo '$(srcdir)/'`src/main.cpp src/lierolibre-main.obj: src/main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-main.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-main.Tpo -c -o src/lierolibre-main.obj `if test -f 'src/main.cpp'; then $(CYGPATH_W) 'src/main.cpp'; else $(CYGPATH_W) '$(srcdir)/src/main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-main.Tpo src/$(DEPDIR)/lierolibre-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/main.cpp' object='src/lierolibre-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-main.obj `if test -f 'src/main.cpp'; then $(CYGPATH_W) 'src/main.cpp'; else $(CYGPATH_W) '$(srcdir)/src/main.cpp'; fi` src/lierolibre-math.o: src/math.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-math.o -MD -MP -MF src/$(DEPDIR)/lierolibre-math.Tpo -c -o src/lierolibre-math.o `test -f 'src/math.cpp' || echo '$(srcdir)/'`src/math.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-math.Tpo src/$(DEPDIR)/lierolibre-math.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/math.cpp' object='src/lierolibre-math.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-math.o `test -f 'src/math.cpp' || echo '$(srcdir)/'`src/math.cpp src/lierolibre-math.obj: src/math.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-math.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-math.Tpo -c -o src/lierolibre-math.obj `if test -f 'src/math.cpp'; then $(CYGPATH_W) 'src/math.cpp'; else $(CYGPATH_W) '$(srcdir)/src/math.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-math.Tpo src/$(DEPDIR)/lierolibre-math.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/math.cpp' object='src/lierolibre-math.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-math.obj `if test -f 'src/math.cpp'; then $(CYGPATH_W) 'src/math.cpp'; else $(CYGPATH_W) '$(srcdir)/src/math.cpp'; fi` src/lierolibre-ninjarope.o: src/ninjarope.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-ninjarope.o -MD -MP -MF src/$(DEPDIR)/lierolibre-ninjarope.Tpo -c -o src/lierolibre-ninjarope.o `test -f 'src/ninjarope.cpp' || echo '$(srcdir)/'`src/ninjarope.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-ninjarope.Tpo src/$(DEPDIR)/lierolibre-ninjarope.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/ninjarope.cpp' object='src/lierolibre-ninjarope.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-ninjarope.o `test -f 'src/ninjarope.cpp' || echo '$(srcdir)/'`src/ninjarope.cpp src/lierolibre-ninjarope.obj: src/ninjarope.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-ninjarope.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-ninjarope.Tpo -c -o src/lierolibre-ninjarope.obj `if test -f 'src/ninjarope.cpp'; then $(CYGPATH_W) 'src/ninjarope.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ninjarope.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-ninjarope.Tpo src/$(DEPDIR)/lierolibre-ninjarope.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/ninjarope.cpp' object='src/lierolibre-ninjarope.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-ninjarope.obj `if test -f 'src/ninjarope.cpp'; then $(CYGPATH_W) 'src/ninjarope.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ninjarope.cpp'; fi` src/lierolibre-nobject.o: src/nobject.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-nobject.o -MD -MP -MF src/$(DEPDIR)/lierolibre-nobject.Tpo -c -o src/lierolibre-nobject.o `test -f 'src/nobject.cpp' || echo '$(srcdir)/'`src/nobject.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-nobject.Tpo src/$(DEPDIR)/lierolibre-nobject.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/nobject.cpp' object='src/lierolibre-nobject.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-nobject.o `test -f 'src/nobject.cpp' || echo '$(srcdir)/'`src/nobject.cpp src/lierolibre-nobject.obj: src/nobject.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-nobject.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-nobject.Tpo -c -o src/lierolibre-nobject.obj `if test -f 'src/nobject.cpp'; then $(CYGPATH_W) 'src/nobject.cpp'; else $(CYGPATH_W) '$(srcdir)/src/nobject.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-nobject.Tpo src/$(DEPDIR)/lierolibre-nobject.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/nobject.cpp' object='src/lierolibre-nobject.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-nobject.obj `if test -f 'src/nobject.cpp'; then $(CYGPATH_W) 'src/nobject.cpp'; else $(CYGPATH_W) '$(srcdir)/src/nobject.cpp'; fi` src/lierolibre-rand.o: src/rand.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-rand.o -MD -MP -MF src/$(DEPDIR)/lierolibre-rand.Tpo -c -o src/lierolibre-rand.o `test -f 'src/rand.cpp' || echo '$(srcdir)/'`src/rand.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-rand.Tpo src/$(DEPDIR)/lierolibre-rand.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/rand.cpp' object='src/lierolibre-rand.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-rand.o `test -f 'src/rand.cpp' || echo '$(srcdir)/'`src/rand.cpp src/lierolibre-rand.obj: src/rand.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-rand.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-rand.Tpo -c -o src/lierolibre-rand.obj `if test -f 'src/rand.cpp'; then $(CYGPATH_W) 'src/rand.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rand.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-rand.Tpo src/$(DEPDIR)/lierolibre-rand.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/rand.cpp' object='src/lierolibre-rand.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-rand.obj `if test -f 'src/rand.cpp'; then $(CYGPATH_W) 'src/rand.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rand.cpp'; fi` src/lierolibre-reader.o: src/reader.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-reader.o -MD -MP -MF src/$(DEPDIR)/lierolibre-reader.Tpo -c -o src/lierolibre-reader.o `test -f 'src/reader.cpp' || echo '$(srcdir)/'`src/reader.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-reader.Tpo src/$(DEPDIR)/lierolibre-reader.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/reader.cpp' object='src/lierolibre-reader.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-reader.o `test -f 'src/reader.cpp' || echo '$(srcdir)/'`src/reader.cpp src/lierolibre-reader.obj: src/reader.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-reader.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-reader.Tpo -c -o src/lierolibre-reader.obj `if test -f 'src/reader.cpp'; then $(CYGPATH_W) 'src/reader.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reader.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-reader.Tpo src/$(DEPDIR)/lierolibre-reader.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/reader.cpp' object='src/lierolibre-reader.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-reader.obj `if test -f 'src/reader.cpp'; then $(CYGPATH_W) 'src/reader.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reader.cpp'; fi` src/lierolibre-replay.o: src/replay.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-replay.o -MD -MP -MF src/$(DEPDIR)/lierolibre-replay.Tpo -c -o src/lierolibre-replay.o `test -f 'src/replay.cpp' || echo '$(srcdir)/'`src/replay.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-replay.Tpo src/$(DEPDIR)/lierolibre-replay.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/replay.cpp' object='src/lierolibre-replay.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-replay.o `test -f 'src/replay.cpp' || echo '$(srcdir)/'`src/replay.cpp src/lierolibre-replay.obj: src/replay.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-replay.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-replay.Tpo -c -o src/lierolibre-replay.obj `if test -f 'src/replay.cpp'; then $(CYGPATH_W) 'src/replay.cpp'; else $(CYGPATH_W) '$(srcdir)/src/replay.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-replay.Tpo src/$(DEPDIR)/lierolibre-replay.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/replay.cpp' object='src/lierolibre-replay.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-replay.obj `if test -f 'src/replay.cpp'; then $(CYGPATH_W) 'src/replay.cpp'; else $(CYGPATH_W) '$(srcdir)/src/replay.cpp'; fi` src/lierolibre-sdlmain.o: src/sdlmain.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-sdlmain.o -MD -MP -MF src/$(DEPDIR)/lierolibre-sdlmain.Tpo -c -o src/lierolibre-sdlmain.o `test -f 'src/sdlmain.cpp' || echo '$(srcdir)/'`src/sdlmain.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-sdlmain.Tpo src/$(DEPDIR)/lierolibre-sdlmain.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/sdlmain.cpp' object='src/lierolibre-sdlmain.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-sdlmain.o `test -f 'src/sdlmain.cpp' || echo '$(srcdir)/'`src/sdlmain.cpp src/lierolibre-sdlmain.obj: src/sdlmain.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-sdlmain.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-sdlmain.Tpo -c -o src/lierolibre-sdlmain.obj `if test -f 'src/sdlmain.cpp'; then $(CYGPATH_W) 'src/sdlmain.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sdlmain.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-sdlmain.Tpo src/$(DEPDIR)/lierolibre-sdlmain.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/sdlmain.cpp' object='src/lierolibre-sdlmain.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-sdlmain.obj `if test -f 'src/sdlmain.cpp'; then $(CYGPATH_W) 'src/sdlmain.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sdlmain.cpp'; fi` src/lierolibre-settings.o: src/settings.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-settings.o -MD -MP -MF src/$(DEPDIR)/lierolibre-settings.Tpo -c -o src/lierolibre-settings.o `test -f 'src/settings.cpp' || echo '$(srcdir)/'`src/settings.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-settings.Tpo src/$(DEPDIR)/lierolibre-settings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/settings.cpp' object='src/lierolibre-settings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-settings.o `test -f 'src/settings.cpp' || echo '$(srcdir)/'`src/settings.cpp src/lierolibre-settings.obj: src/settings.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-settings.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-settings.Tpo -c -o src/lierolibre-settings.obj `if test -f 'src/settings.cpp'; then $(CYGPATH_W) 'src/settings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/settings.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-settings.Tpo src/$(DEPDIR)/lierolibre-settings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/settings.cpp' object='src/lierolibre-settings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-settings.obj `if test -f 'src/settings.cpp'; then $(CYGPATH_W) 'src/settings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/settings.cpp'; fi` src/lierolibre-sfx.o: src/sfx.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-sfx.o -MD -MP -MF src/$(DEPDIR)/lierolibre-sfx.Tpo -c -o src/lierolibre-sfx.o `test -f 'src/sfx.cpp' || echo '$(srcdir)/'`src/sfx.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-sfx.Tpo src/$(DEPDIR)/lierolibre-sfx.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/sfx.cpp' object='src/lierolibre-sfx.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-sfx.o `test -f 'src/sfx.cpp' || echo '$(srcdir)/'`src/sfx.cpp src/lierolibre-sfx.obj: src/sfx.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-sfx.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-sfx.Tpo -c -o src/lierolibre-sfx.obj `if test -f 'src/sfx.cpp'; then $(CYGPATH_W) 'src/sfx.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sfx.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-sfx.Tpo src/$(DEPDIR)/lierolibre-sfx.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/sfx.cpp' object='src/lierolibre-sfx.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-sfx.obj `if test -f 'src/sfx.cpp'; then $(CYGPATH_W) 'src/sfx.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sfx.cpp'; fi` src/lierolibre-sobject.o: src/sobject.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-sobject.o -MD -MP -MF src/$(DEPDIR)/lierolibre-sobject.Tpo -c -o src/lierolibre-sobject.o `test -f 'src/sobject.cpp' || echo '$(srcdir)/'`src/sobject.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-sobject.Tpo src/$(DEPDIR)/lierolibre-sobject.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/sobject.cpp' object='src/lierolibre-sobject.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-sobject.o `test -f 'src/sobject.cpp' || echo '$(srcdir)/'`src/sobject.cpp src/lierolibre-sobject.obj: src/sobject.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-sobject.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-sobject.Tpo -c -o src/lierolibre-sobject.obj `if test -f 'src/sobject.cpp'; then $(CYGPATH_W) 'src/sobject.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sobject.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-sobject.Tpo src/$(DEPDIR)/lierolibre-sobject.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/sobject.cpp' object='src/lierolibre-sobject.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-sobject.obj `if test -f 'src/sobject.cpp'; then $(CYGPATH_W) 'src/sobject.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sobject.cpp'; fi` src/lierolibre-sys.o: src/sys.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-sys.o -MD -MP -MF src/$(DEPDIR)/lierolibre-sys.Tpo -c -o src/lierolibre-sys.o `test -f 'src/sys.cpp' || echo '$(srcdir)/'`src/sys.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-sys.Tpo src/$(DEPDIR)/lierolibre-sys.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/sys.cpp' object='src/lierolibre-sys.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-sys.o `test -f 'src/sys.cpp' || echo '$(srcdir)/'`src/sys.cpp src/lierolibre-sys.obj: src/sys.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-sys.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-sys.Tpo -c -o src/lierolibre-sys.obj `if test -f 'src/sys.cpp'; then $(CYGPATH_W) 'src/sys.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sys.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-sys.Tpo src/$(DEPDIR)/lierolibre-sys.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/sys.cpp' object='src/lierolibre-sys.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-sys.obj `if test -f 'src/sys.cpp'; then $(CYGPATH_W) 'src/sys.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sys.cpp'; fi` src/lierolibre-text.o: src/text.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-text.o -MD -MP -MF src/$(DEPDIR)/lierolibre-text.Tpo -c -o src/lierolibre-text.o `test -f 'src/text.cpp' || echo '$(srcdir)/'`src/text.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-text.Tpo src/$(DEPDIR)/lierolibre-text.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/text.cpp' object='src/lierolibre-text.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-text.o `test -f 'src/text.cpp' || echo '$(srcdir)/'`src/text.cpp src/lierolibre-text.obj: src/text.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-text.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-text.Tpo -c -o src/lierolibre-text.obj `if test -f 'src/text.cpp'; then $(CYGPATH_W) 'src/text.cpp'; else $(CYGPATH_W) '$(srcdir)/src/text.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-text.Tpo src/$(DEPDIR)/lierolibre-text.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/text.cpp' object='src/lierolibre-text.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-text.obj `if test -f 'src/text.cpp'; then $(CYGPATH_W) 'src/text.cpp'; else $(CYGPATH_W) '$(srcdir)/src/text.cpp'; fi` src/lierolibre-viewport.o: src/viewport.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-viewport.o -MD -MP -MF src/$(DEPDIR)/lierolibre-viewport.Tpo -c -o src/lierolibre-viewport.o `test -f 'src/viewport.cpp' || echo '$(srcdir)/'`src/viewport.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-viewport.Tpo src/$(DEPDIR)/lierolibre-viewport.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/viewport.cpp' object='src/lierolibre-viewport.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-viewport.o `test -f 'src/viewport.cpp' || echo '$(srcdir)/'`src/viewport.cpp src/lierolibre-viewport.obj: src/viewport.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-viewport.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-viewport.Tpo -c -o src/lierolibre-viewport.obj `if test -f 'src/viewport.cpp'; then $(CYGPATH_W) 'src/viewport.cpp'; else $(CYGPATH_W) '$(srcdir)/src/viewport.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-viewport.Tpo src/$(DEPDIR)/lierolibre-viewport.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/viewport.cpp' object='src/lierolibre-viewport.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-viewport.obj `if test -f 'src/viewport.cpp'; then $(CYGPATH_W) 'src/viewport.cpp'; else $(CYGPATH_W) '$(srcdir)/src/viewport.cpp'; fi` src/lierolibre-weapon.o: src/weapon.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-weapon.o -MD -MP -MF src/$(DEPDIR)/lierolibre-weapon.Tpo -c -o src/lierolibre-weapon.o `test -f 'src/weapon.cpp' || echo '$(srcdir)/'`src/weapon.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-weapon.Tpo src/$(DEPDIR)/lierolibre-weapon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/weapon.cpp' object='src/lierolibre-weapon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-weapon.o `test -f 'src/weapon.cpp' || echo '$(srcdir)/'`src/weapon.cpp src/lierolibre-weapon.obj: src/weapon.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-weapon.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-weapon.Tpo -c -o src/lierolibre-weapon.obj `if test -f 'src/weapon.cpp'; then $(CYGPATH_W) 'src/weapon.cpp'; else $(CYGPATH_W) '$(srcdir)/src/weapon.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-weapon.Tpo src/$(DEPDIR)/lierolibre-weapon.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/weapon.cpp' object='src/lierolibre-weapon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-weapon.obj `if test -f 'src/weapon.cpp'; then $(CYGPATH_W) 'src/weapon.cpp'; else $(CYGPATH_W) '$(srcdir)/src/weapon.cpp'; fi` src/lierolibre-weapsel.o: src/weapsel.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-weapsel.o -MD -MP -MF src/$(DEPDIR)/lierolibre-weapsel.Tpo -c -o src/lierolibre-weapsel.o `test -f 'src/weapsel.cpp' || echo '$(srcdir)/'`src/weapsel.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-weapsel.Tpo src/$(DEPDIR)/lierolibre-weapsel.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/weapsel.cpp' object='src/lierolibre-weapsel.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-weapsel.o `test -f 'src/weapsel.cpp' || echo '$(srcdir)/'`src/weapsel.cpp src/lierolibre-weapsel.obj: src/weapsel.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-weapsel.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-weapsel.Tpo -c -o src/lierolibre-weapsel.obj `if test -f 'src/weapsel.cpp'; then $(CYGPATH_W) 'src/weapsel.cpp'; else $(CYGPATH_W) '$(srcdir)/src/weapsel.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-weapsel.Tpo src/$(DEPDIR)/lierolibre-weapsel.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/weapsel.cpp' object='src/lierolibre-weapsel.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-weapsel.obj `if test -f 'src/weapsel.cpp'; then $(CYGPATH_W) 'src/weapsel.cpp'; else $(CYGPATH_W) '$(srcdir)/src/weapsel.cpp'; fi` src/lierolibre-worm.o: src/worm.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-worm.o -MD -MP -MF src/$(DEPDIR)/lierolibre-worm.Tpo -c -o src/lierolibre-worm.o `test -f 'src/worm.cpp' || echo '$(srcdir)/'`src/worm.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-worm.Tpo src/$(DEPDIR)/lierolibre-worm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/worm.cpp' object='src/lierolibre-worm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-worm.o `test -f 'src/worm.cpp' || echo '$(srcdir)/'`src/worm.cpp src/lierolibre-worm.obj: src/worm.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-worm.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-worm.Tpo -c -o src/lierolibre-worm.obj `if test -f 'src/worm.cpp'; then $(CYGPATH_W) 'src/worm.cpp'; else $(CYGPATH_W) '$(srcdir)/src/worm.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-worm.Tpo src/$(DEPDIR)/lierolibre-worm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/worm.cpp' object='src/lierolibre-worm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-worm.obj `if test -f 'src/worm.cpp'; then $(CYGPATH_W) 'src/worm.cpp'; else $(CYGPATH_W) '$(srcdir)/src/worm.cpp'; fi` src/lierolibre-argParse.o: src/argParse.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-argParse.o -MD -MP -MF src/$(DEPDIR)/lierolibre-argParse.Tpo -c -o src/lierolibre-argParse.o `test -f 'src/argParse.cpp' || echo '$(srcdir)/'`src/argParse.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-argParse.Tpo src/$(DEPDIR)/lierolibre-argParse.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/argParse.cpp' object='src/lierolibre-argParse.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-argParse.o `test -f 'src/argParse.cpp' || echo '$(srcdir)/'`src/argParse.cpp src/lierolibre-argParse.obj: src/argParse.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-argParse.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-argParse.Tpo -c -o src/lierolibre-argParse.obj `if test -f 'src/argParse.cpp'; then $(CYGPATH_W) 'src/argParse.cpp'; else $(CYGPATH_W) '$(srcdir)/src/argParse.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-argParse.Tpo src/$(DEPDIR)/lierolibre-argParse.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/argParse.cpp' object='src/lierolibre-argParse.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-argParse.obj `if test -f 'src/argParse.cpp'; then $(CYGPATH_W) 'src/argParse.cpp'; else $(CYGPATH_W) '$(srcdir)/src/argParse.cpp'; fi` src/lierolibre-configCompat.o: src/configCompat.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-configCompat.o -MD -MP -MF src/$(DEPDIR)/lierolibre-configCompat.Tpo -c -o src/lierolibre-configCompat.o `test -f 'src/configCompat.cpp' || echo '$(srcdir)/'`src/configCompat.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-configCompat.Tpo src/$(DEPDIR)/lierolibre-configCompat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/configCompat.cpp' object='src/lierolibre-configCompat.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-configCompat.o `test -f 'src/configCompat.cpp' || echo '$(srcdir)/'`src/configCompat.cpp src/lierolibre-configCompat.obj: src/configCompat.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-configCompat.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-configCompat.Tpo -c -o src/lierolibre-configCompat.obj `if test -f 'src/configCompat.cpp'; then $(CYGPATH_W) 'src/configCompat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/configCompat.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-configCompat.Tpo src/$(DEPDIR)/lierolibre-configCompat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/configCompat.cpp' object='src/lierolibre-configCompat.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-configCompat.obj `if test -f 'src/configCompat.cpp'; then $(CYGPATH_W) 'src/configCompat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/configCompat.cpp'; fi` src/lierolibre-configHelper.o: src/configHelper.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-configHelper.o -MD -MP -MF src/$(DEPDIR)/lierolibre-configHelper.Tpo -c -o src/lierolibre-configHelper.o `test -f 'src/configHelper.cpp' || echo '$(srcdir)/'`src/configHelper.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-configHelper.Tpo src/$(DEPDIR)/lierolibre-configHelper.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/configHelper.cpp' object='src/lierolibre-configHelper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-configHelper.o `test -f 'src/configHelper.cpp' || echo '$(srcdir)/'`src/configHelper.cpp src/lierolibre-configHelper.obj: src/configHelper.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-configHelper.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-configHelper.Tpo -c -o src/lierolibre-configHelper.obj `if test -f 'src/configHelper.cpp'; then $(CYGPATH_W) 'src/configHelper.cpp'; else $(CYGPATH_W) '$(srcdir)/src/configHelper.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-configHelper.Tpo src/$(DEPDIR)/lierolibre-configHelper.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/configHelper.cpp' object='src/lierolibre-configHelper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-configHelper.obj `if test -f 'src/configHelper.cpp'; then $(CYGPATH_W) 'src/configHelper.cpp'; else $(CYGPATH_W) '$(srcdir)/src/configHelper.cpp'; fi` src/lierolibre-configInit.o: src/configInit.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-configInit.o -MD -MP -MF src/$(DEPDIR)/lierolibre-configInit.Tpo -c -o src/lierolibre-configInit.o `test -f 'src/configInit.cpp' || echo '$(srcdir)/'`src/configInit.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-configInit.Tpo src/$(DEPDIR)/lierolibre-configInit.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/configInit.cpp' object='src/lierolibre-configInit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-configInit.o `test -f 'src/configInit.cpp' || echo '$(srcdir)/'`src/configInit.cpp src/lierolibre-configInit.obj: src/configInit.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-configInit.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-configInit.Tpo -c -o src/lierolibre-configInit.obj `if test -f 'src/configInit.cpp'; then $(CYGPATH_W) 'src/configInit.cpp'; else $(CYGPATH_W) '$(srcdir)/src/configInit.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-configInit.Tpo src/$(DEPDIR)/lierolibre-configInit.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/configInit.cpp' object='src/lierolibre-configInit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-configInit.obj `if test -f 'src/configInit.cpp'; then $(CYGPATH_W) 'src/configInit.cpp'; else $(CYGPATH_W) '$(srcdir)/src/configInit.cpp'; fi` src/lierolibre-dataPath.o: src/dataPath.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-dataPath.o -MD -MP -MF src/$(DEPDIR)/lierolibre-dataPath.Tpo -c -o src/lierolibre-dataPath.o `test -f 'src/dataPath.cpp' || echo '$(srcdir)/'`src/dataPath.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-dataPath.Tpo src/$(DEPDIR)/lierolibre-dataPath.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/dataPath.cpp' object='src/lierolibre-dataPath.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-dataPath.o `test -f 'src/dataPath.cpp' || echo '$(srcdir)/'`src/dataPath.cpp src/lierolibre-dataPath.obj: src/dataPath.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-dataPath.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-dataPath.Tpo -c -o src/lierolibre-dataPath.obj `if test -f 'src/dataPath.cpp'; then $(CYGPATH_W) 'src/dataPath.cpp'; else $(CYGPATH_W) '$(srcdir)/src/dataPath.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-dataPath.Tpo src/$(DEPDIR)/lierolibre-dataPath.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/dataPath.cpp' object='src/lierolibre-dataPath.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-dataPath.obj `if test -f 'src/dataPath.cpp'; then $(CYGPATH_W) 'src/dataPath.cpp'; else $(CYGPATH_W) '$(srcdir)/src/dataPath.cpp'; fi` src/lierolibre-to_string.o: src/to_string.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-to_string.o -MD -MP -MF src/$(DEPDIR)/lierolibre-to_string.Tpo -c -o src/lierolibre-to_string.o `test -f 'src/to_string.cpp' || echo '$(srcdir)/'`src/to_string.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-to_string.Tpo src/$(DEPDIR)/lierolibre-to_string.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/to_string.cpp' object='src/lierolibre-to_string.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-to_string.o `test -f 'src/to_string.cpp' || echo '$(srcdir)/'`src/to_string.cpp src/lierolibre-to_string.obj: src/to_string.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/lierolibre-to_string.obj -MD -MP -MF src/$(DEPDIR)/lierolibre-to_string.Tpo -c -o src/lierolibre-to_string.obj `if test -f 'src/to_string.cpp'; then $(CYGPATH_W) 'src/to_string.cpp'; else $(CYGPATH_W) '$(srcdir)/src/to_string.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/$(DEPDIR)/lierolibre-to_string.Tpo src/$(DEPDIR)/lierolibre-to_string.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/to_string.cpp' object='src/lierolibre-to_string.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/lierolibre-to_string.obj `if test -f 'src/to_string.cpp'; then $(CYGPATH_W) 'src/to_string.cpp'; else $(CYGPATH_W) '$(srcdir)/src/to_string.cpp'; fi` src/controller/lierolibre-commonController.o: src/controller/commonController.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/controller/lierolibre-commonController.o -MD -MP -MF src/controller/$(DEPDIR)/lierolibre-commonController.Tpo -c -o src/controller/lierolibre-commonController.o `test -f 'src/controller/commonController.cpp' || echo '$(srcdir)/'`src/controller/commonController.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/controller/$(DEPDIR)/lierolibre-commonController.Tpo src/controller/$(DEPDIR)/lierolibre-commonController.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/controller/commonController.cpp' object='src/controller/lierolibre-commonController.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/controller/lierolibre-commonController.o `test -f 'src/controller/commonController.cpp' || echo '$(srcdir)/'`src/controller/commonController.cpp src/controller/lierolibre-commonController.obj: src/controller/commonController.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/controller/lierolibre-commonController.obj -MD -MP -MF src/controller/$(DEPDIR)/lierolibre-commonController.Tpo -c -o src/controller/lierolibre-commonController.obj `if test -f 'src/controller/commonController.cpp'; then $(CYGPATH_W) 'src/controller/commonController.cpp'; else $(CYGPATH_W) '$(srcdir)/src/controller/commonController.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/controller/$(DEPDIR)/lierolibre-commonController.Tpo src/controller/$(DEPDIR)/lierolibre-commonController.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/controller/commonController.cpp' object='src/controller/lierolibre-commonController.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/controller/lierolibre-commonController.obj `if test -f 'src/controller/commonController.cpp'; then $(CYGPATH_W) 'src/controller/commonController.cpp'; else $(CYGPATH_W) '$(srcdir)/src/controller/commonController.cpp'; fi` src/controller/lierolibre-localController.o: src/controller/localController.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/controller/lierolibre-localController.o -MD -MP -MF src/controller/$(DEPDIR)/lierolibre-localController.Tpo -c -o src/controller/lierolibre-localController.o `test -f 'src/controller/localController.cpp' || echo '$(srcdir)/'`src/controller/localController.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/controller/$(DEPDIR)/lierolibre-localController.Tpo src/controller/$(DEPDIR)/lierolibre-localController.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/controller/localController.cpp' object='src/controller/lierolibre-localController.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/controller/lierolibre-localController.o `test -f 'src/controller/localController.cpp' || echo '$(srcdir)/'`src/controller/localController.cpp src/controller/lierolibre-localController.obj: src/controller/localController.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/controller/lierolibre-localController.obj -MD -MP -MF src/controller/$(DEPDIR)/lierolibre-localController.Tpo -c -o src/controller/lierolibre-localController.obj `if test -f 'src/controller/localController.cpp'; then $(CYGPATH_W) 'src/controller/localController.cpp'; else $(CYGPATH_W) '$(srcdir)/src/controller/localController.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/controller/$(DEPDIR)/lierolibre-localController.Tpo src/controller/$(DEPDIR)/lierolibre-localController.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/controller/localController.cpp' object='src/controller/lierolibre-localController.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/controller/lierolibre-localController.obj `if test -f 'src/controller/localController.cpp'; then $(CYGPATH_W) 'src/controller/localController.cpp'; else $(CYGPATH_W) '$(srcdir)/src/controller/localController.cpp'; fi` src/controller/lierolibre-replayController.o: src/controller/replayController.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/controller/lierolibre-replayController.o -MD -MP -MF src/controller/$(DEPDIR)/lierolibre-replayController.Tpo -c -o src/controller/lierolibre-replayController.o `test -f 'src/controller/replayController.cpp' || echo '$(srcdir)/'`src/controller/replayController.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/controller/$(DEPDIR)/lierolibre-replayController.Tpo src/controller/$(DEPDIR)/lierolibre-replayController.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/controller/replayController.cpp' object='src/controller/lierolibre-replayController.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/controller/lierolibre-replayController.o `test -f 'src/controller/replayController.cpp' || echo '$(srcdir)/'`src/controller/replayController.cpp src/controller/lierolibre-replayController.obj: src/controller/replayController.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/controller/lierolibre-replayController.obj -MD -MP -MF src/controller/$(DEPDIR)/lierolibre-replayController.Tpo -c -o src/controller/lierolibre-replayController.obj `if test -f 'src/controller/replayController.cpp'; then $(CYGPATH_W) 'src/controller/replayController.cpp'; else $(CYGPATH_W) '$(srcdir)/src/controller/replayController.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/controller/$(DEPDIR)/lierolibre-replayController.Tpo src/controller/$(DEPDIR)/lierolibre-replayController.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/controller/replayController.cpp' object='src/controller/lierolibre-replayController.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/controller/lierolibre-replayController.obj `if test -f 'src/controller/replayController.cpp'; then $(CYGPATH_W) 'src/controller/replayController.cpp'; else $(CYGPATH_W) '$(srcdir)/src/controller/replayController.cpp'; fi` src/gfx/lierolibre-blit.o: src/gfx/blit.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/gfx/lierolibre-blit.o -MD -MP -MF src/gfx/$(DEPDIR)/lierolibre-blit.Tpo -c -o src/gfx/lierolibre-blit.o `test -f 'src/gfx/blit.cpp' || echo '$(srcdir)/'`src/gfx/blit.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/gfx/$(DEPDIR)/lierolibre-blit.Tpo src/gfx/$(DEPDIR)/lierolibre-blit.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx/blit.cpp' object='src/gfx/lierolibre-blit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/gfx/lierolibre-blit.o `test -f 'src/gfx/blit.cpp' || echo '$(srcdir)/'`src/gfx/blit.cpp src/gfx/lierolibre-blit.obj: src/gfx/blit.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/gfx/lierolibre-blit.obj -MD -MP -MF src/gfx/$(DEPDIR)/lierolibre-blit.Tpo -c -o src/gfx/lierolibre-blit.obj `if test -f 'src/gfx/blit.cpp'; then $(CYGPATH_W) 'src/gfx/blit.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx/blit.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/gfx/$(DEPDIR)/lierolibre-blit.Tpo src/gfx/$(DEPDIR)/lierolibre-blit.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx/blit.cpp' object='src/gfx/lierolibre-blit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/gfx/lierolibre-blit.obj `if test -f 'src/gfx/blit.cpp'; then $(CYGPATH_W) 'src/gfx/blit.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx/blit.cpp'; fi` src/gfx/lierolibre-font.o: src/gfx/font.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/gfx/lierolibre-font.o -MD -MP -MF src/gfx/$(DEPDIR)/lierolibre-font.Tpo -c -o src/gfx/lierolibre-font.o `test -f 'src/gfx/font.cpp' || echo '$(srcdir)/'`src/gfx/font.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/gfx/$(DEPDIR)/lierolibre-font.Tpo src/gfx/$(DEPDIR)/lierolibre-font.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx/font.cpp' object='src/gfx/lierolibre-font.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/gfx/lierolibre-font.o `test -f 'src/gfx/font.cpp' || echo '$(srcdir)/'`src/gfx/font.cpp src/gfx/lierolibre-font.obj: src/gfx/font.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/gfx/lierolibre-font.obj -MD -MP -MF src/gfx/$(DEPDIR)/lierolibre-font.Tpo -c -o src/gfx/lierolibre-font.obj `if test -f 'src/gfx/font.cpp'; then $(CYGPATH_W) 'src/gfx/font.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx/font.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/gfx/$(DEPDIR)/lierolibre-font.Tpo src/gfx/$(DEPDIR)/lierolibre-font.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx/font.cpp' object='src/gfx/lierolibre-font.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/gfx/lierolibre-font.obj `if test -f 'src/gfx/font.cpp'; then $(CYGPATH_W) 'src/gfx/font.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx/font.cpp'; fi` src/gfx/lierolibre-palette.o: src/gfx/palette.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/gfx/lierolibre-palette.o -MD -MP -MF src/gfx/$(DEPDIR)/lierolibre-palette.Tpo -c -o src/gfx/lierolibre-palette.o `test -f 'src/gfx/palette.cpp' || echo '$(srcdir)/'`src/gfx/palette.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/gfx/$(DEPDIR)/lierolibre-palette.Tpo src/gfx/$(DEPDIR)/lierolibre-palette.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx/palette.cpp' object='src/gfx/lierolibre-palette.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/gfx/lierolibre-palette.o `test -f 'src/gfx/palette.cpp' || echo '$(srcdir)/'`src/gfx/palette.cpp src/gfx/lierolibre-palette.obj: src/gfx/palette.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/gfx/lierolibre-palette.obj -MD -MP -MF src/gfx/$(DEPDIR)/lierolibre-palette.Tpo -c -o src/gfx/lierolibre-palette.obj `if test -f 'src/gfx/palette.cpp'; then $(CYGPATH_W) 'src/gfx/palette.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx/palette.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/gfx/$(DEPDIR)/lierolibre-palette.Tpo src/gfx/$(DEPDIR)/lierolibre-palette.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx/palette.cpp' object='src/gfx/lierolibre-palette.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/gfx/lierolibre-palette.obj `if test -f 'src/gfx/palette.cpp'; then $(CYGPATH_W) 'src/gfx/palette.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx/palette.cpp'; fi` src/gfx/lierolibre-sprite.o: src/gfx/sprite.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/gfx/lierolibre-sprite.o -MD -MP -MF src/gfx/$(DEPDIR)/lierolibre-sprite.Tpo -c -o src/gfx/lierolibre-sprite.o `test -f 'src/gfx/sprite.cpp' || echo '$(srcdir)/'`src/gfx/sprite.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/gfx/$(DEPDIR)/lierolibre-sprite.Tpo src/gfx/$(DEPDIR)/lierolibre-sprite.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx/sprite.cpp' object='src/gfx/lierolibre-sprite.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/gfx/lierolibre-sprite.o `test -f 'src/gfx/sprite.cpp' || echo '$(srcdir)/'`src/gfx/sprite.cpp src/gfx/lierolibre-sprite.obj: src/gfx/sprite.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/gfx/lierolibre-sprite.obj -MD -MP -MF src/gfx/$(DEPDIR)/lierolibre-sprite.Tpo -c -o src/gfx/lierolibre-sprite.obj `if test -f 'src/gfx/sprite.cpp'; then $(CYGPATH_W) 'src/gfx/sprite.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx/sprite.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/gfx/$(DEPDIR)/lierolibre-sprite.Tpo src/gfx/$(DEPDIR)/lierolibre-sprite.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/gfx/sprite.cpp' object='src/gfx/lierolibre-sprite.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/gfx/lierolibre-sprite.obj `if test -f 'src/gfx/sprite.cpp'; then $(CYGPATH_W) 'src/gfx/sprite.cpp'; else $(CYGPATH_W) '$(srcdir)/src/gfx/sprite.cpp'; fi` src/menu/lierolibre-booleanSwitchBehavior.o: src/menu/booleanSwitchBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-booleanSwitchBehavior.o -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-booleanSwitchBehavior.Tpo -c -o src/menu/lierolibre-booleanSwitchBehavior.o `test -f 'src/menu/booleanSwitchBehavior.cpp' || echo '$(srcdir)/'`src/menu/booleanSwitchBehavior.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-booleanSwitchBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-booleanSwitchBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/booleanSwitchBehavior.cpp' object='src/menu/lierolibre-booleanSwitchBehavior.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-booleanSwitchBehavior.o `test -f 'src/menu/booleanSwitchBehavior.cpp' || echo '$(srcdir)/'`src/menu/booleanSwitchBehavior.cpp src/menu/lierolibre-booleanSwitchBehavior.obj: src/menu/booleanSwitchBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-booleanSwitchBehavior.obj -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-booleanSwitchBehavior.Tpo -c -o src/menu/lierolibre-booleanSwitchBehavior.obj `if test -f 'src/menu/booleanSwitchBehavior.cpp'; then $(CYGPATH_W) 'src/menu/booleanSwitchBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/booleanSwitchBehavior.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-booleanSwitchBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-booleanSwitchBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/booleanSwitchBehavior.cpp' object='src/menu/lierolibre-booleanSwitchBehavior.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-booleanSwitchBehavior.obj `if test -f 'src/menu/booleanSwitchBehavior.cpp'; then $(CYGPATH_W) 'src/menu/booleanSwitchBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/booleanSwitchBehavior.cpp'; fi` src/menu/lierolibre-enumBehavior.o: src/menu/enumBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-enumBehavior.o -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-enumBehavior.Tpo -c -o src/menu/lierolibre-enumBehavior.o `test -f 'src/menu/enumBehavior.cpp' || echo '$(srcdir)/'`src/menu/enumBehavior.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-enumBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-enumBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/enumBehavior.cpp' object='src/menu/lierolibre-enumBehavior.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-enumBehavior.o `test -f 'src/menu/enumBehavior.cpp' || echo '$(srcdir)/'`src/menu/enumBehavior.cpp src/menu/lierolibre-enumBehavior.obj: src/menu/enumBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-enumBehavior.obj -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-enumBehavior.Tpo -c -o src/menu/lierolibre-enumBehavior.obj `if test -f 'src/menu/enumBehavior.cpp'; then $(CYGPATH_W) 'src/menu/enumBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/enumBehavior.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-enumBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-enumBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/enumBehavior.cpp' object='src/menu/lierolibre-enumBehavior.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-enumBehavior.obj `if test -f 'src/menu/enumBehavior.cpp'; then $(CYGPATH_W) 'src/menu/enumBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/enumBehavior.cpp'; fi` src/menu/lierolibre-hiddenMenu.o: src/menu/hiddenMenu.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-hiddenMenu.o -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-hiddenMenu.Tpo -c -o src/menu/lierolibre-hiddenMenu.o `test -f 'src/menu/hiddenMenu.cpp' || echo '$(srcdir)/'`src/menu/hiddenMenu.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-hiddenMenu.Tpo src/menu/$(DEPDIR)/lierolibre-hiddenMenu.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/hiddenMenu.cpp' object='src/menu/lierolibre-hiddenMenu.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-hiddenMenu.o `test -f 'src/menu/hiddenMenu.cpp' || echo '$(srcdir)/'`src/menu/hiddenMenu.cpp src/menu/lierolibre-hiddenMenu.obj: src/menu/hiddenMenu.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-hiddenMenu.obj -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-hiddenMenu.Tpo -c -o src/menu/lierolibre-hiddenMenu.obj `if test -f 'src/menu/hiddenMenu.cpp'; then $(CYGPATH_W) 'src/menu/hiddenMenu.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/hiddenMenu.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-hiddenMenu.Tpo src/menu/$(DEPDIR)/lierolibre-hiddenMenu.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/hiddenMenu.cpp' object='src/menu/lierolibre-hiddenMenu.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-hiddenMenu.obj `if test -f 'src/menu/hiddenMenu.cpp'; then $(CYGPATH_W) 'src/menu/hiddenMenu.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/hiddenMenu.cpp'; fi` src/menu/lierolibre-integerBehavior.o: src/menu/integerBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-integerBehavior.o -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-integerBehavior.Tpo -c -o src/menu/lierolibre-integerBehavior.o `test -f 'src/menu/integerBehavior.cpp' || echo '$(srcdir)/'`src/menu/integerBehavior.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-integerBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-integerBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/integerBehavior.cpp' object='src/menu/lierolibre-integerBehavior.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-integerBehavior.o `test -f 'src/menu/integerBehavior.cpp' || echo '$(srcdir)/'`src/menu/integerBehavior.cpp src/menu/lierolibre-integerBehavior.obj: src/menu/integerBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-integerBehavior.obj -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-integerBehavior.Tpo -c -o src/menu/lierolibre-integerBehavior.obj `if test -f 'src/menu/integerBehavior.cpp'; then $(CYGPATH_W) 'src/menu/integerBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/integerBehavior.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-integerBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-integerBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/integerBehavior.cpp' object='src/menu/lierolibre-integerBehavior.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-integerBehavior.obj `if test -f 'src/menu/integerBehavior.cpp'; then $(CYGPATH_W) 'src/menu/integerBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/integerBehavior.cpp'; fi` src/menu/lierolibre-itemBehavior.o: src/menu/itemBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-itemBehavior.o -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-itemBehavior.Tpo -c -o src/menu/lierolibre-itemBehavior.o `test -f 'src/menu/itemBehavior.cpp' || echo '$(srcdir)/'`src/menu/itemBehavior.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-itemBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-itemBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/itemBehavior.cpp' object='src/menu/lierolibre-itemBehavior.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-itemBehavior.o `test -f 'src/menu/itemBehavior.cpp' || echo '$(srcdir)/'`src/menu/itemBehavior.cpp src/menu/lierolibre-itemBehavior.obj: src/menu/itemBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-itemBehavior.obj -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-itemBehavior.Tpo -c -o src/menu/lierolibre-itemBehavior.obj `if test -f 'src/menu/itemBehavior.cpp'; then $(CYGPATH_W) 'src/menu/itemBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/itemBehavior.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-itemBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-itemBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/itemBehavior.cpp' object='src/menu/lierolibre-itemBehavior.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-itemBehavior.obj `if test -f 'src/menu/itemBehavior.cpp'; then $(CYGPATH_W) 'src/menu/itemBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/itemBehavior.cpp'; fi` src/menu/lierolibre-menu.o: src/menu/menu.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-menu.o -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-menu.Tpo -c -o src/menu/lierolibre-menu.o `test -f 'src/menu/menu.cpp' || echo '$(srcdir)/'`src/menu/menu.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-menu.Tpo src/menu/$(DEPDIR)/lierolibre-menu.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/menu.cpp' object='src/menu/lierolibre-menu.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-menu.o `test -f 'src/menu/menu.cpp' || echo '$(srcdir)/'`src/menu/menu.cpp src/menu/lierolibre-menu.obj: src/menu/menu.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-menu.obj -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-menu.Tpo -c -o src/menu/lierolibre-menu.obj `if test -f 'src/menu/menu.cpp'; then $(CYGPATH_W) 'src/menu/menu.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/menu.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-menu.Tpo src/menu/$(DEPDIR)/lierolibre-menu.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/menu.cpp' object='src/menu/lierolibre-menu.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-menu.obj `if test -f 'src/menu/menu.cpp'; then $(CYGPATH_W) 'src/menu/menu.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/menu.cpp'; fi` src/menu/lierolibre-menuItem.o: src/menu/menuItem.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-menuItem.o -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-menuItem.Tpo -c -o src/menu/lierolibre-menuItem.o `test -f 'src/menu/menuItem.cpp' || echo '$(srcdir)/'`src/menu/menuItem.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-menuItem.Tpo src/menu/$(DEPDIR)/lierolibre-menuItem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/menuItem.cpp' object='src/menu/lierolibre-menuItem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-menuItem.o `test -f 'src/menu/menuItem.cpp' || echo '$(srcdir)/'`src/menu/menuItem.cpp src/menu/lierolibre-menuItem.obj: src/menu/menuItem.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-menuItem.obj -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-menuItem.Tpo -c -o src/menu/lierolibre-menuItem.obj `if test -f 'src/menu/menuItem.cpp'; then $(CYGPATH_W) 'src/menu/menuItem.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/menuItem.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-menuItem.Tpo src/menu/$(DEPDIR)/lierolibre-menuItem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/menuItem.cpp' object='src/menu/lierolibre-menuItem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-menuItem.obj `if test -f 'src/menu/menuItem.cpp'; then $(CYGPATH_W) 'src/menu/menuItem.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/menuItem.cpp'; fi` src/menu/lierolibre-timeBehavior.o: src/menu/timeBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-timeBehavior.o -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-timeBehavior.Tpo -c -o src/menu/lierolibre-timeBehavior.o `test -f 'src/menu/timeBehavior.cpp' || echo '$(srcdir)/'`src/menu/timeBehavior.cpp @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-timeBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-timeBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/timeBehavior.cpp' object='src/menu/lierolibre-timeBehavior.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-timeBehavior.o `test -f 'src/menu/timeBehavior.cpp' || echo '$(srcdir)/'`src/menu/timeBehavior.cpp src/menu/lierolibre-timeBehavior.obj: src/menu/timeBehavior.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -MT src/menu/lierolibre-timeBehavior.obj -MD -MP -MF src/menu/$(DEPDIR)/lierolibre-timeBehavior.Tpo -c -o src/menu/lierolibre-timeBehavior.obj `if test -f 'src/menu/timeBehavior.cpp'; then $(CYGPATH_W) 'src/menu/timeBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/timeBehavior.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) src/menu/$(DEPDIR)/lierolibre-timeBehavior.Tpo src/menu/$(DEPDIR)/lierolibre-timeBehavior.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/menu/timeBehavior.cpp' object='src/menu/lierolibre-timeBehavior.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lierolibre_CPPFLAGS) $(CPPFLAGS) $(lierolibre_CXXFLAGS) $(CXXFLAGS) -c -o src/menu/lierolibre-timeBehavior.obj `if test -f 'src/menu/timeBehavior.cpp'; then $(CYGPATH_W) 'src/menu/timeBehavior.cpp'; else $(CYGPATH_W) '$(srcdir)/src/menu/timeBehavior.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf src/gvl/.libs src/gvl/_libs -rm -rf src/gvl/containers/.libs src/gvl/containers/_libs -rm -rf src/gvl/crypt/.libs src/gvl/crypt/_libs -rm -rf src/gvl/io/.libs src/gvl/io/_libs -rm -rf src/gvl/math/.libs src/gvl/math/_libs -rm -rf src/gvl/resman/.libs src/gvl/resman/_libs -rm -rf src/gvl/sockets/.libs src/gvl/sockets/_libs -rm -rf src/gvl/support/.libs src/gvl/support/_libs -rm -rf src/gvl/system/.libs src/gvl/system/_libs -rm -rf src/gvl/tut/quickcheck/.libs src/gvl/tut/quickcheck/_libs distclean-libtool: -rm -f libtool config.lt install-man6: $(nodist_man6_MANS) @$(NORMAL_INSTALL) @list1='$(nodist_man6_MANS)'; \ list2=''; \ test -n "$(man6dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man6dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man6dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.6[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^6][0-9a-z]*$$,6,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man6dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man6dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man6dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man6dir)" || exit $$?; }; \ done; } uninstall-man6: @$(NORMAL_UNINSTALL) @list='$(nodist_man6_MANS)'; test -n "$(man6dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^6][0-9a-z]*$$,6,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man6dir)'; $(am__uninstall_files_from_dir) install-dist_appiconDATA: $(dist_appicon_DATA) @$(NORMAL_INSTALL) @list='$(dist_appicon_DATA)'; test -n "$(appicondir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appicondir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appicondir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appicondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appicondir)" || exit $$?; \ done uninstall-dist_appiconDATA: @$(NORMAL_UNINSTALL) @list='$(dist_appicon_DATA)'; test -n "$(appicondir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appicondir)'; $(am__uninstall_files_from_dir) install-dist_desktopDATA: $(dist_desktop_DATA) @$(NORMAL_INSTALL) @list='$(dist_desktop_DATA)'; test -n "$(desktopdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(desktopdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(desktopdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ done uninstall-dist_desktopDATA: @$(NORMAL_UNINSTALL) @list='$(dist_desktop_DATA)'; test -n "$(desktopdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(desktopdir)'; $(am__uninstall_files_from_dir) install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-dist_docDATA: @$(NORMAL_UNINSTALL) @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) install-dist_pkgdataDATA: $(dist_pkgdata_DATA) @$(NORMAL_INSTALL) @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-dist_pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(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 \ && cd "$$am__cwd" \ || exit 1 $(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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man6dir)" "$(DESTDIR)$(appicondir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgdatadir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f src/$(DEPDIR)/$(am__dirstamp) -rm -f src/$(am__dirstamp) -rm -f src/controller/$(DEPDIR)/$(am__dirstamp) -rm -f src/controller/$(am__dirstamp) -rm -f src/gfx/$(DEPDIR)/$(am__dirstamp) -rm -f src/gfx/$(am__dirstamp) -rm -f src/gvl/$(am__dirstamp) -rm -f src/gvl/containers/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/containers/$(am__dirstamp) -rm -f src/gvl/crypt/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/crypt/$(am__dirstamp) -rm -f src/gvl/gvl_test/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/gvl_test/$(am__dirstamp) -rm -f src/gvl/gvl_test/containers/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/gvl_test/containers/$(am__dirstamp) -rm -f src/gvl/gvl_test/io/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/gvl_test/io/$(am__dirstamp) -rm -f src/gvl/gvl_test/math/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/gvl_test/math/$(am__dirstamp) -rm -f src/gvl/gvl_test/support/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/gvl_test/support/$(am__dirstamp) -rm -f src/gvl/io/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/io/$(am__dirstamp) -rm -f src/gvl/math/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/math/$(am__dirstamp) -rm -f src/gvl/resman/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/resman/$(am__dirstamp) -rm -f src/gvl/sockets/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/sockets/$(am__dirstamp) -rm -f src/gvl/support/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/support/$(am__dirstamp) -rm -f src/gvl/system/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/system/$(am__dirstamp) -rm -f src/gvl/tut/quickcheck/$(DEPDIR)/$(am__dirstamp) -rm -f src/gvl/tut/quickcheck/$(am__dirstamp) -rm -f src/menu/$(DEPDIR)/$(am__dirstamp) -rm -f src/menu/$(am__dirstamp) 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-local \ clean-noinstLTLIBRARIES clean-pkglibexecPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf src/$(DEPDIR) src/controller/$(DEPDIR) src/gfx/$(DEPDIR) src/gvl/containers/$(DEPDIR) src/gvl/crypt/$(DEPDIR) src/gvl/gvl_test/$(DEPDIR) src/gvl/gvl_test/containers/$(DEPDIR) src/gvl/gvl_test/io/$(DEPDIR) src/gvl/gvl_test/math/$(DEPDIR) src/gvl/gvl_test/support/$(DEPDIR) src/gvl/io/$(DEPDIR) src/gvl/math/$(DEPDIR) src/gvl/resman/$(DEPDIR) src/gvl/sockets/$(DEPDIR) src/gvl/support/$(DEPDIR) src/gvl/system/$(DEPDIR) src/gvl/tut/quickcheck/$(DEPDIR) src/menu/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_appiconDATA install-dist_desktopDATA \ install-dist_docDATA install-dist_pkgdataDATA install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-dist_binSCRIPTS install-nodist_binSCRIPTS \ install-pkglibexecPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man6 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf src/$(DEPDIR) src/controller/$(DEPDIR) src/gfx/$(DEPDIR) src/gvl/containers/$(DEPDIR) src/gvl/crypt/$(DEPDIR) src/gvl/gvl_test/$(DEPDIR) src/gvl/gvl_test/containers/$(DEPDIR) src/gvl/gvl_test/io/$(DEPDIR) src/gvl/gvl_test/math/$(DEPDIR) src/gvl/gvl_test/support/$(DEPDIR) src/gvl/io/$(DEPDIR) src/gvl/math/$(DEPDIR) src/gvl/resman/$(DEPDIR) src/gvl/sockets/$(DEPDIR) src/gvl/support/$(DEPDIR) src/gvl/system/$(DEPDIR) src/gvl/tut/quickcheck/$(DEPDIR) src/menu/$(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-dist_appiconDATA uninstall-dist_binSCRIPTS \ uninstall-dist_desktopDATA uninstall-dist_docDATA \ uninstall-dist_pkgdataDATA uninstall-man \ uninstall-nodist_binSCRIPTS uninstall-pkglibexecPROGRAMS uninstall-man: uninstall-man6 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-pkglibexecPROGRAMS ctags dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-lzma \ dist-shar dist-tarZ dist-xz 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-dist_appiconDATA install-dist_binSCRIPTS \ install-dist_desktopDATA install-dist_docDATA \ install-dist_pkgdataDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man6 \ install-nodist_binSCRIPTS install-pdf install-pdf-am \ install-pkglibexecPROGRAMS 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-dist_appiconDATA uninstall-dist_binSCRIPTS \ uninstall-dist_desktopDATA uninstall-dist_docDATA \ uninstall-dist_pkgdataDATA uninstall-man uninstall-man6 \ uninstall-nodist_binSCRIPTS uninstall-pkglibexecPROGRAMS \ \ src/gvl/list.hpp \ \ \ src/gvl/math/cmwc.hpp \ src/gvl/math/random.hpp \ src/gvl/math/ieee.hpp \ \ \ src/gvl/resman/shared_ptr.hpp \ src/gvl/resman/shared.hpp \ src/gvl/resman/shared_count.hpp \ \ \ src/gvl/support/algorithm.hpp \ src/gvl/support/macros.hpp \ src/gvl/support/functional.hpp \ src/gvl/support/debug.hpp \ src/gvl/support/platform.hpp \ src/gvl/support/platform.h \ src/gvl/support/cstdint.hpp \ src/gvl/support/type_info.hpp \ \ \ src/gvl/tut/quickcheck/context.hpp \ src/gvl/tut/quickcheck/generator.hpp \ src/gvl/tut/quickcheck/property.hpp libvorbisfile3 \ libwrap0 \ libx11-xcb1 \ libxcb1 \ zlib1g windows/boost-program_options-1.51.0/stage/lib/libboost_program_options.dll: cd windows/boost-program_options-1.51.0/ ;\ ./bootstrap.sh ;\ rm -rf stage ;\ rm -rf bin.v2 ;\ ./b2 --user-config=tools/build/v2/user-config_i686-w64-mingw32-gcc.jam toolset=gcc-mingw32 target-os=windows variant=release link=shared -sNO_BZIP2=1 -sNO_ZLIB=1 linkflags='-static-libgcc -static-libstdc++' stage/lib/libboost_program_options.dll stage/lib/libboost_program_options.dll.a windows/zlib-1.2.7/zlib1.dll: cd windows/zlib-1.2.7/ && \ make -f win32/Makefile.gcc PREFIX=i686-w64-mingw32- windows/SDL-1.2.15/build/.libs/SDL.dll: cd windows/SDL-1.2.15/ && \ ./configure --host=i686-w64-mingw32 && \ make LDFLAGS='-static-libgcc -static-libstdc++' windows/libconfig-1.4.8/lib/.libs/libconfig++.a: cd windows/libconfig-1.4.8/ && \ ./configure --host=i686-w64-mingw32 && \ make LDFLAGS='-static-libgcc -static-libstdc++' @HAS_WINDOWS_LDFLAGS_TRUE@dist-hook: lierolibre.exe $(WINDOWS_LIBS) @HAS_WINDOWS_LDFLAGS_TRUE@ for i in $(WINDOWS_LIBS_DLL) .libs/lierolibre.exe; do \ @HAS_WINDOWS_LDFLAGS_TRUE@ $(STRIP) $$i -o $(distdir)/$$(basename $$i); \ @HAS_WINDOWS_LDFLAGS_TRUE@ chmod +x $(distdir)/$$(basename $$i); done @HAS_WINDOWS_LDFLAGS_TRUE@ cp scripts/lierolibre-cmd.bat $(distdir) @HAS_WINDOWS_LDFLAGS_TRUE@ cp $(distdir)/data/liero.cfg $(distdir)/data/lierocfg.txt @HAS_WINDOWS_LDFLAGS_TRUE@ for i in $(WINDOWS_TXT); do \ @HAS_WINDOWS_LDFLAGS_TRUE@ cp $(distdir)/$$i $(distdir)/$$i.txt; \ @HAS_WINDOWS_LDFLAGS_TRUE@ sed 's/$$/ /' -i $(distdir)/$$i.txt; done @HAS_WINDOWS_LDFLAGS_TRUE@ mkdir $(distdir)/user @HAS_WINDOWS_LDFLAGS_TRUE@ mkdir $(distdir)/libsrc @HAS_WINDOWS_LDFLAGS_TRUE@ cp -r windows/SDL-1.2.15/ $(distdir)/libsrc/ @HAS_WINDOWS_LDFLAGS_TRUE@ cp -r windows/libconfig-1.4.8/ $(distdir)/libsrc/ @HAS_WINDOWS_LDFLAGS_TRUE@ -make -C $(distdir)/libsrc/SDL-1.2.15/ distclean @HAS_WINDOWS_LDFLAGS_TRUE@ -make -C $(distdir)/libsrc/libconfig-1.4.8/ distclean @HAS_WINDOWS_LDFLAGS_TRUE@ sed '/no longer applies./r COPYING_winbin' -i $(distdir)/COPYING.txt @HAS_WINDOWS_LDFLAGS_TRUE@ sed \ @HAS_WINDOWS_LDFLAGS_TRUE@ -e '/START_MACHINE_READABLE/,/END_MACHINE_READABLE/d' \ @HAS_WINDOWS_LDFLAGS_TRUE@ -e '/.*_HUMAN_READABLE/d' \ @HAS_WINDOWS_LDFLAGS_TRUE@ -i $(distdir)/COPYING.txt @HAS_WINDOWS_LDFLAGS_TRUE@ sed '/ separate licenses, and not covered under the BSD-2-Clause license/r COPYING_winbin' -i $(distdir)/COPYING.txt @HAS_WINDOWS_LDFLAGS_TRUE@ sed \ @HAS_WINDOWS_LDFLAGS_TRUE@ -e '/START_HUMAN_READABLE/,/END_HUMAN_READABLE/d' \ @HAS_WINDOWS_LDFLAGS_TRUE@ -e '/.*_MACHINE_READABLE/d' \ @HAS_WINDOWS_LDFLAGS_TRUE@ -i $(distdir)/COPYING.txt @HAS_WINDOWS_LDFLAGS_FALSE@dist-hook: cp $(distdir)/src/gvl/_build/Gvl_C++0x.props \ "$(distdir)/src/gvl/_build/Gvl C++0x.props" cp $(distdir)/src/gvl/_build/Gvl_IEEE_SEE2.props \ "$(distdir)/src/gvl/_build/Gvl IEEE SEE2.props" cp $(distdir)/src/gvl/_build/Gvl_Standard_Config.props \ "$(distdir)/src/gvl/_build/Gvl Standard Config.props" $(nodist_bin_SCRIPTS): scripts/lierolibre.am install -d scripts/ sed \ -e 's,#PKGDATADIR#,$(pkgdatadir),g' \ -e 's,#CFGFILE#,$(CFGFILE),g' \ -e 's,#LIBEXECDIR#,$(libexecdir),g' \ -e 's,#PACKAGE#,$(PACKAGE),g' \ $(srcdir)/$@.am \ > $@ $(nodist_man6_MANS): $(MANPAGES_SOURCES) install -d man/ sed \ -e 's,#PKGDATADIR#,$(pkgdatadir),g' \ -e 's,#CFGFILE#,$(CFGFILE),g' \ -e 's,#LIBEXECDIR#,$(libexecdir),g' \ -e 's,#PACKAGE#,$(PACKAGE),g' \ -e 's,#UPPERCASE_PACKAGE#,\U$(PACKAGE),g' \ -e 's,#PACKAGE_VERSION#,$(PACKAGE_VERSION),g' \ $(srcdir)/$@.am \ > $@ data/LIERO.CHR: $(GRAPHICS_SOURCES) install -d data/ $(srcdir)/scripts/lierolibre-packgfx \ $(srcdir)/data/graphics/gfx{1..3}.xpm \ $@ data/LIERO.SND: $(SOUND_SOURCES) install -d data/ $(srcdir)/scripts/lierolibre-packsounds \ $(srcdir)/data/sounds/ \ $@ .PHONY: clean-local dist-nixbin-dir dist-nixbin-libcopyright dist-nixbin-libsrc dist-nixbin dist-nixbin-xz clean-local: rm -f \ $(nodist_bin_SCRIPTS) \ $(nodist_man6_MANS) \ $(MANS_TXT) rm -rf lib/ libsrc/ $(LIB_ARCH_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a \ /lib/$(build_cpu)-$(build_os)/$${NIXBIN_LIBFILE#lib/}* \ lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(USR_LIB_ARCH_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a \ /usr/lib/$(build_cpu)-$(build_os)/$${NIXBIN_LIBFILE#lib/}* \ lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(USR_LIB_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a /usr/lib/$${NIXBIN_LIBFILE#lib/}* lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(LIB_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a /lib/$${NIXBIN_LIBFILE#lib/}* lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(USR_LIB_ARCH_PA_NIXBIN_LIBFILES): install -d lib/ NIXBIN_LIBFILE=$@ ;\ cp -a \ /usr/lib/$(build_cpu)-$(build_os)/pulseaudio/$${NIXBIN_LIBFILE#lib/}* \ lib/ || \ touch lib/00MISSING_$${NIXBIN_LIBFILE#lib/} $(MANS_TXT): $(nodist_man6_MANS) man --no-justification --no-hyphenation $(@:.txt=.6) | col -b > $@ echo >> $@ echo "This text file was automatically generated from $(@:.txt=.6)" \ >> $@ dist-nixbin-libcopyright: install -d lib/ cd lib/ && \ for i in $(NIXBIN_LIB_DEBS) $(NIXBIN_LIB_DEBS_NOSRC); do \ cupt copyright $$i > $$i.copyright || \ touch 00MISSING_$$i.copyright; done dist-nixbin-libsrc: install -d libsrc/ cd libsrc/ && \ LANG=C apt-get source --download-only \ $$(for i in $(NIXBIN_LIB_DEBS); do \ echo $$i=$$(dpkg -s $$i | \ sed -n 's/^Version:\ \(.*\)/\1/p'); done) 2>&1 >/dev/null | \ sed -n 's/E: Unable to find a source package for \(.*\)/\1/p' | \ xargs -I '{}' touch 00MISSING_'{}'.debsource dist-nixbin-dir: distdir $(pkglibexec_PROGRAMS) $(NIXBIN_LIBFILES) \ $(MANS_TXT) dist-nixbin-libcopyright dist-nixbin-libsrc cp -aT $(PACKAGE_DIRNAME) $(NIXBIN_DIRNAME) cp -a lib/ $(NIXBIN_DIRNAME) cp -a libsrc/ $(NIXBIN_DIRNAME) cp -a $(pkglibexec_PROGRAMS) $(NIXBIN_DIRNAME) cp -a $(nodist_man6_MANS) $(NIXBIN_DIRNAME)/man/ cp -a $(MANS_TXT) $(NIXBIN_DIRNAME)/man/ dist-nixbin: dist-nixbin-dir tar caf $(NIXBIN_DIRNAME).tar.gz $(NIXBIN_DIRNAME) dist-nixbin-xz: dist-nixbin-dir tar caf $(NIXBIN_DIRNAME).tar.xz $(NIXBIN_DIRNAME) # 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: lierolibre-0.5/NEWS000066400000000000000000000362461205125547100142220ustar00rootroot00000000000000lierolibre NEWS - History of user-visible changes. Version 0.5 - November 2012, by Martin Erik Werner * Fixed packgfx and packlev scripts to work with newer ImageMagick * Fixed the packsounds script so that it won't fail with non-english shell * Removed unused fullscreen resolution extension menu options * Fixed default keybind Right Alt not working on Linux * Fixed extended controls being empty if loaded from non-extended LIERO.DAT + Closes: http://code.google.com/p/liero/issues/detail?id=3 * Changed windows homedir name from "settings" to "user" * Pre-packed LIERO.CHR and LIERO.SND are now included in the source release * Enabled cross-compilation from Linux for Windows Version 0.4 - June 2012, by Martin Erik Werner * Fixed a bug where the EXE file path would not be set * Updated CFG file with variable name corrections + New CFG files (v1) will be written with correct names + Old CFG files (v0) with incorrect names can still be loaded * Added automatic upgrading of CFG file from v0 to v1 + Only upgrades if loading from $HOME / settings dir + Creates a backup named *_backup_XXXXX * First binary linux release - Uses hard-coded run-time search path and an included set of libs - Also includes source code for libs under LGPL * Include library sources in windows package - As required by LGPL (previously in a separate package) Version 0.3 - March 2012, by Martin Erik Werner * Made it possible to exit from fullscreen via Alt+F4 * Fixed a bug in the launch script that made the liero.cfg file in the home directory not be prioritized. * First windows release + Fixed Visual Studio C++ project and added a "windows" git branch + Uses lierocfg.txt instead of liero.cfg for the CFG file + Uses a settings/ subdirectory instead of $HOME * Improved window/fullscreen resolution behaviour + Game grabs maximum possible window size on launch + Fullscreen uses host desktop resolution - Should fix issues with fullscreen not using the best available resolution + Fullscreen now remembers and restores previous window size + Drag-resizing the window now works - Jumps up by integer multiples when window is large enough * Incomplete support for scale2X on sizes above 640x400 + Currently just creates black space between pixels * Binary now defaults to writing the CFG file to the $HOME/settings directory (not just the launcher script) Version 0.2 - April 2012, by Martin Erik Werner * New dependency on boost_program_options * Reworked command-line handling completely + Generalised options - -f --file : input file - -d --dir : input dir - -w --write : output file - -h --help - -v --sdlvideo - arg1 is auto-assigned to input file - arg2 is auto-assigned to input dir - arg3 is auto-assigned to output file * Fixed a bug where giving a directory path without the ending "/" would set the path to the parent directory instead. * Defaults to reading data/liero.cfg instead of ./liero.cfg * Removal of non-free dtoa piece in gvl * Better resolution handling (only for 'Nearest' filter) + Game window now defaults to double the size (640x400) + Fullscreen now defaults to highest supported screen resolution - Game area will grab max multiple of 320x200, rest becomes border + Added F7 and F8 keys for x3 and x4 scaling respecively * Added ability to quit game via desktop events (window close, alt+F4, etc.) * Made configure checks for SDL_mixer not depend on pkg-config * Error messages from handling config files are now much more verbose + If possible gives error type, file, line number, setting path, etc. + This is only enabled with libconfig++ version 1.4 and above - (libconfig++9 in Debian/Ubuntu) Version 0.1 - April 2012, by Martin Erik Werner * The gvl library is now included in the source release of lierolibre * Several non-free items were removed from the gvl library * Extracted variables from LIERO.EXE + It is now possible to run lierolibre independently of LIERO.EXE using a text config file + Variables may be edited directly in the text file + Variables may be extracted from a modded LIERO.EXE into a new text file * Updated gvl library to build and work with Liero and lierolibre * Replaced original sounds with completely free content * Added scripts for extracting and repacking sounds, graphics, and levels + sounds and graphics are kept in unpacked format and must be packed prior to running the game * DataPath module for integration into a nix-like system + Ability to handle separation between a writable home directory and a read-only data directory CHANGES for Liero (OpenLiero) Liero 1.35b2 (2009-08-16) * 32-bit rendering mode (faster and much more compatible). Extensions: * Speed up and slow down of replays (0-9 keys, Ctrl+0 etc. for slow down). * Better automatic naming of replays. * Timer in replays. * Fixed a bug with profiles. * Lots of tweaks. Liero 1.35b1 (2009-08-11) * Added air jumping and continuous jumping hacks. * Fixed some minor differences from Liero 1.33. * Made blood setting obey custom TC settings. * Adaptive scaling of the game to the window. Extensions (enabled via F1): * Added replay recording and playback. * Added player profiles. * Full filenames in level selection. * Page up/Page down in menus. * Scale2X interpolation for double resolution. * Custom fullscreen resolution (should help some people run fullscreen). Liero 1.34 (2008-08-08) * Renamed from openliero to liero1.34 on joosa's request. * Added remote exploding hack. * Increased filename caps tolerance on case-sensitive filesystems. * Fixed some include-files to make it compile on later gcc. LIERO for DOS HISTORY This history does not contain versions older than 1.0. Legend: * change + addition - fixed bug ! other stuff Version 1.33 * Ninja rope is traditional again! Version 1.32 + A documentation in English!! * Some progress with the CPU-player!! It acts very routinely, but is still much better than random :) * Duds have been removed (too buggy) * Ninja rope: * Swinging is easier * Limited lenght Version 1.31 * Ninja rope is now more realistic!! * Gauss gun has been modified a bit * Dart has been modified * Moving backwards has been removed * The CPU-player is now _a bit_ more intelligent... it's not very smart, but better than the random-CPU. It doesn't care about the game type. - The names weren't saved; fixed - A couple of other bugs have been killed Version 1.30 + Gauss Gun + Duds: grenades etc. that don't explode * A new kind of ninja rope: it's thrown in the old fashioned way, but the lenght can be adjusted * LIEROLOW.EXE has been removed... LIERO.EXE no longer required too much memory - The SHADOWS ON/OFF-bugs have been fixed - Laser has been modified Version 1.29 * More realistic physics: the velocity of the worm is added to the velocity of the projectile. * The worm backs up if you move backwards while shooting * Dart is now faster to reload + Booby trap has the name of the weapon it "contains" on it... this is what you've been waiting for + A new weapon: RB Rampage (Rubber Bullet) * LevEdit no longer has restrictions. The levels created with earlier versions of LevEdit (<0.21) have to be "compiled" by re-opening and saving. The new file format uses loads more drive space, but makes it easier to expand in the future. Version 1.28 ! The memory requirements had increased even though this file told the game needs 550kB... the real amount was 580kB and rarely anyone has that much conventional memory free. Now a smaller LIEROLOW.EXE without SFX is packed with the game, it requires 550kB. Version 1.27 - Bugfixes, bugfixes (when, oh when are 'em all eliminated..?) Version 1.26 - The worm no longer generates outside the level limits... finally!! - Small bugfixes Version 1.25 * Mini rockets is now more accurate * The worm no longer has to step on Booby trap, Mine etc., they explode from a small distance - Bugfixes, e.g. Dart Version 1.24 + A new weapon: Dart + A scrollbar has been added to the LEVEL and WEAPONS menus * There can't be two weapons of the same kind chosen in the WEAPONS menu except if there are less than five weapons to choose from * Blaster has been fixed: no longer explodes when hitting a worm * Grasshopper lasts longer * Medikits now heal by 10-50% * A modification to the CtF modes: now you have to take the flag to your home base * Changed the names of the game modes * Randomizing the names has been changed a bit... * The force used to throw objects (such as Grenade) is now "adjustable". Read the HINTS section!! - The former settings did not load for the next game session - While loading the settings the colors of the worms weren't changed right * When quitting the game the settings are always automatically saved with the name LIERO, NOT replacing the settings in use Version 1.23 + A possibility to save the game settings to a file you want!! That means you can create new game types by adjusting the loading times, the availability of weapons, health etc. Packed with the Game comes an example configuration: TAGFLAG. Try it!! Version 1.22 - The health meter crashed if health was 10000% Version 1.21 - No longer crashes in heavy use!! It has been tested: 2 random-CPU-worms, both with heavy weapons, loading times 0%, 99 bonuses, map on, amount of blood 500%, shadows on, health 10000%, 999 lives. And the game ran easily 5 hours with these settings... Unstability was caused by a very simple bug. Version 1.20 * Missile turns slower (easier to control) * The bullets of Rifle and Winchester are faster * The laser sighting has been removed from Winchester * More animation + LOAD+CHANGE-option. When this setting is ON, you can change weapons while loading. + The WEAPONS menu: + You no longer have to choose the same weapons over and over again + Randomize, which randomizes the weapons A hint: if you don't want to see the weapons you get, just press "FIRE" and then "Up"!! + PLAYER OPTIONS, where you can choose your name, amount of health, the color of your worm and the keys too: KEYSETUP is history + A new game type: Flag + Tag + Game of Tag: the losing time can now be chosen + Capture the Flag: the flags needed to win can now be chosen + The mines are now the same color as the terrain (harder to notice) - The worm sometimes appeared outside the level (_rarely_) - A huge pile of bugfixes Version 1.19 + Capture the Flag!! + Frameskip, makes the game run faster * When you're killed, you can no longer appear next to the other worm or to the place you were killed at * Fixed the Missile controls - Bugfixes... Version 1.18 * The Missile controls have been fixed -> easier to direct * You can now use other weapons while reloading!! You still have to have the weapon chosen for reloading it. * Larpa explodes when hitting a worm * Radioactives have been removed (too efficient) * The worm may also regenerate in the sand, creating a fitting hole + A new weapon: Grasshopper + You may now choose the availability of the weapons (Menu, Bonuses Banned)!! * Game of Tag: * The timer of "it" no longer runs while the other worm is dead * A suicide makes you "it" - The timer no longer crashes at 10 minutes - Bazooka, Doomsday and Mini Rockets acted in a weird way when they were blocked by Fan (didn't actually bother) - The worm can no longer get stuck on stones!! Version 1.17 ! Loads of tuning/changes/additions (thanks for the feedback): + New weapons: Booby trap = a fake crate or first aid kit Radioactives = a bomb that spreads radioactive stuff Mini rockets = not as efficient as Doomsday by faster to reload * The weapons are now in alphabetical order + You can choose the color of your worm by yourself + More random names * Heavier Flamer * Throwable bombs (Grenade, Cluster and Chiquita) fly further away * The fragments of Cluster bomb no longer generate smaller fragments * The bullets of Rifle, Winchester and Handgun are faster * CPU no longer spends time in the weapons menu * You can no longer have two weapons of the same kind chosen in the weapons menu * Stronger gravity (the worms fall faster etc.) * Ninja rope is (a bit) more efficient * Code has been optimized - For some reason the lasers disappeared in the previous version ! LUEMINUT.EXE has been removed... Version 1.16 - Bugfixes for the bugfixes in the previous version (!!) Version 1.15 - Bugfixes (actually this version was unnecessary) Version 1.14 + LUEMINUT.EXE - If you chose a random level, a new level wasn't generated if REGENERATE LEVEL was OFF Version 1.13 + Chiquita bomb!! - The missile bugs have been fixed - Loads of other bugfixes Version 1.12 * A huge code optimization: the game runs almost twice as fast as before!! That means playable speed on 386- and 486-processors (with SCREEN SYNC OFF) * Missile is a bit slower (easier to control) + The random-CPU-worms are back (while waiting for decent CPU-players)!! - Fixed some stuff in LIERO.TXT - "xx made a suicide" and such messages disappeared in the previous version (?!) - KEYSETUP didn't save the keys is LIERO.DAT had been deleted - Fixed a pile of other bugs Version 1.11 * The worms no longer slide while moving and firing at the same time * Auto Pistol -> Handgun, faster and a bit more efficient * Replaced Missiles (too efficient) with Guided (!!) Missile. * Better Dirtball * MK Mode replaced with adjustable Amount of Blood (0-500%) + Realistic Laser!! - /1 and /2 parameters fixed - Keysetup didn't work on PII-machines Version 1.10 ! Increased testing + A new weapon: Uzi * Changed the looks of the menus (more clear?) * A new kind of more user-friendly weapons menu * Bonuses sometimes appeared on top of each other * Ninja rope didn't grap the other worm very tightly - The worms always had the same names Version 1.04 - Pentium II -bug fixed!! No more runtime error 200... Lozzi replaced the buggy CRT unit of TP with one by himself and the game started working. Version 1.03 - A huge pile of bugfixes Version 1.02 - Fixed the other player's crosshair and other small bugfixes Version 1.01 - Fixed a few annoying bugs * Checked and fixed the spelling of LIERO.TXT (there are still some typos, though) Version 1.0 + The worms have been redrawn * Smoother explosion animation + 5 new weapons: Cannon, Bouncy larpa, Missiles, Spikeballs and Napalm + LIERO.TXT completely rewritten + A level editor (very restricted) + A sound card is no longer required * MK Mode is really Mortal Kombat!! ! Compact filesize - Fixed the LOADING TIME (0%) bug - Fixed the save bug of KEYSETUP lierolibre-0.5/README000066400000000000000000000032611205125547100143720ustar00rootroot00000000000000lierolibre is an old-school earthworm action game. It is a direct fork of Liero (OpenLiero). Features: * 2 worms, 40 weapons, great playability, two game modes: Kill'em All and Game of Tag, plus AI-players without true intelligence! * Dat nostalgia * Extensions via a hidden F1 menu + Replays + Game controller support + Powerlevel palettes * Ability to write game variables to plain text files * Ability to load game variables from both EXE and plain text files * New freely licensed audio * Scripts to extract and repack graphics, sounds and levels To switch between different window sizes, use F6, F7 and F8, to switch to fullscreen, use F5 or Alt+Enter. The file 'data/liero.cfg' is a plain text file containing all the game variables, this file is intented to be modified, go wild! Some things are likely to not work (make the game refuse to start, or crash) though: ! Appending/Deleting elements ! Changing integers to strings, strings to integers, etc. ! Changing the sine and cosine tables To use custom levels, .lev files can be placed in $HOME/.lierolibre. Compiling, running and installing: Build-dependencies as named in Debian Wheezy: build-essential libtool pkg-config libsdl1.2-dev libsdl-mixer1.2-dev zlib1g-dev libconfig++-dev libboost-program-options-dev sox imagemagick To compile lierolibre use: ./configure make To run lierolibre from the source directory use: ./lierolibre To install lierolibre use: (sudo) make install Please report bugs at https://bugs.launchpad.net/lierolibre/+filebug For more information see the manual pages in the man/ direcory, and visit the Launchpad page: https://launchpad.net/lierolibre lierolibre-0.5/README.txt000066400000000000000000000046671205125547100152230ustar00rootroot00000000000000lierolibre is an old-school earthworm action game. It is a direct fork of Liero (OpenLiero). Features: * 2 worms, 40 weapons, great playability, two game modes: Kill'em All and Game of Tag, plus AI-players without true intelligence! * Dat nostalgia * Extensions via a hidden F1 menu + Replays + Game controller support + Powerlevel palettes * Ability to write game variables to plain text files * Ability to load game variables from both EXE and plain text files * New freely licensed audio To switch between different window sizes, use F6, F7 and F8, to switch to fullscreen, use F5 or Alt+Enter. The copied file 'user\lierocfg.txt' is a plain text file containing all the game variables, this file is intented to be modified, go wild! Some things are likely to not work (make the game refuse to start, or crash) though: ! Appending/Deleting elements ! Changing integers to strings, strings to integers, etc. ! Changing the sine and cosine tables To use custom levels place the .lev files in the 'user' directory. In order to make lierolibre load and write files differently you will need to use the command line, to start a command line prompt in the lierolibre directory run the lierolibre-cmd.bat script. The available command-line options for lierolibre are: -f [ --file ] arg read game variables from file or directory -d [ --dir ] arg load game data from separate directory -w [ --write ] arg write game variables to file -v [ --sdlvideo ] arg set the SDL_VIDEODRIVER environment variable -h [ --help ] print this help message In addition, positional arguments are automatically assigned to file, dir, and write, in that order, hence executing lierolibre.exe foo.txt foodir bar.txt is equivalent to lierolibre.exe -f foo.txt -d foodir -w bar.txt To extract the game variables from a modded LIERO.EXE file, use lierolibre.exe -f path\to\LIERO.EXE -d path\to\data -w mod.txt Note that the -d option can be omitted if the data files are in the same directory as the LIERO.EXE file (and named correctly). To load a custom game variables text file use lierolibre.exe -f path\to\mod.txt -d path\to\data Again, if the data files are in the same directory as mod.txt, the -d option can be omitted. Please report bugs at https://bugs.launchpad.net/lierolibre/+filebug For more information visit the Launchpad page: https://launchpad.net/lierolibre lierolibre-0.5/README_linuxbin000066400000000000000000000007331205125547100163030ustar00rootroot00000000000000The binary linux release includes a lib/ directory with most of the libs needed to run lierolibre, it is compiled with the relative path option to allow the game to find these libraries. With luck it will work in your case, if not, compiling from source is usually more likely to produce a working result. Source code for the libraries which require it are available in the libsrc/ directory. License texts for all included libraries are available in the lib/ directory. lierolibre-0.5/aclocal.m4000066400000000000000000001366121205125547100153610ustar00rootroot00000000000000# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 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_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Configure paths for SDL # Sam Lantinga 9/21/99 # stolen from Manish Singh # stolen back from Frank Belew # stolen from Manish Singh # Shamelessly stolen from Owen Taylor # serial 1 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS dnl AC_DEFUN([AM_PATH_SDL], [dnl dnl Get the cflags and libraries from the sdl-config script dnl AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], sdl_prefix="$withval", sdl_prefix="") AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], sdl_exec_prefix="$withval", sdl_exec_prefix="") AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], , enable_sdltest=yes) if test x$sdl_exec_prefix != x ; then sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config fi fi if test x$sdl_prefix != x ; then sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl-config fi fi as_save_PATH="$PATH" if test "x$prefix" != xNONE; then PATH="$prefix/bin:$prefix/usr/bin:$PATH" fi AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) PATH="$as_save_PATH" min_sdl_version=ifelse([$1], ,0.11.0,$1) AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes else SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" dnl dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl checks the results of sdl-config to some extent dnl rm -f conf.sdltest AC_TRY_RUN([ #include #include #include #include "SDL.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.sdltest"); */ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_sdl_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } if (($sdl_major_version > major) || (($sdl_major_version == major) && ($sdl_minor_version > minor)) || (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) { return 0; } else { printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); printf("*** to point to the correct copy of sdl-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_sdl" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the SDL_CONFIG environment variable to the" echo "*** full path to sdl-config." else if test -f conf.sdltest ; then : else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" AC_TRY_LINK([ #include #include "SDL.h" int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi SDL_CFLAGS="" SDL_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) rm -f conf.sdltest ]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 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 1 # 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.11' 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.11.6], [], [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 AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 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 1 # 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, 2008 # 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 # 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 m4_define([_AM_COND_VALUE_$1], [$2])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, 2009, # 2010, 2011 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 # 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'. rm -rf conftest.dir 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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj 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 $am__obj 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='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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 -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/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, 2008, 2009 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 16 # 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.62])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) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 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 ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 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 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi 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])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 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_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .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 # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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 6 # 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 if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # 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, 2011 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 1 # 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, 2008, 2010 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_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], [m4_foreach_w([_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, 2008 # 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # 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, 2011 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 1 # 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, 2008, 2010 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_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} 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([src/m4/libtool.m4]) m4_include([src/m4/ltoptions.m4]) m4_include([src/m4/ltsugar.m4]) m4_include([src/m4/ltversion.m4]) m4_include([src/m4/lt~obsolete.m4]) lierolibre-0.5/autogen.sh000077500000000000000000000001621205125547100155100ustar00rootroot00000000000000#!/bin/sh autoreconf --force --install if [ ! -f src/m4/sdl.m4 ]; then cp /usr/share/aclocal/sdl.m4 src/m4/ fi lierolibre-0.5/configure000077500000000000000000023062071205125547100154310ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for lierolibre C++ 0.5. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: martinerikwerner@gmail.com about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # 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'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='lierolibre C++' PACKAGE_TARNAME='lierolibre' PACKAGE_VERSION='0.5' PACKAGE_STRING='lierolibre C++ 0.5' PACKAGE_BUGREPORT='martinerikwerner@gmail.com' PACKAGE_URL='https://gitorious.org/lierolibre' ac_unique_file="src/worm.cpp" # 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_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS RELPATH_LDFLAGS RELPATH_CFLAGS LIBOBJS GVL_LIBS GVL_CFLAGS HAS_WINDOWS_LDFLAGS_FALSE HAS_WINDOWS_LDFLAGS_TRUE LIBCONFIGXX_CPPFLAGS WINDOWS_LDFLAGS WINDOWS_CPPFLAGS ZLIB_LIBS ZLIB_CFLAGS SDL_MIXER_LIBS SDL_MIXER_CFLAGS LIBCONFIGXX_LIBS LIBCONFIGXX_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG SDL_LIBS SDL_CFLAGS SDL_CONFIG LIBRT BOOST_PO_LIBS HAS_IM HAS_SOX am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE CXXCPP ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL AWK RANLIB STRIP ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_dependency_tracking with_sdl_prefix with_sdl_exec_prefix enable_sdltest enable_windows_includes enable_windows_libraries with_gvl_include_path with_gvl_lib_path enable_relpath ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR LIBCONFIGXX_CFLAGS LIBCONFIGXX_LIBS SDL_MIXER_CFLAGS SDL_MIXER_LIBS ZLIB_CFLAGS ZLIB_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures lierolibre C++ 0.5 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/lierolibre] --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 lierolibre C++ 0.5:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-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) --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-sdltest Do not try to compile and run a test SDL program --enable-windows-includes use includes from local folder ./windows/include/ --enable-windows-libraries compile and use libraries from local folder ./windows/include/, and force static linking for libconfig++ --enable-relpath add lib/ to the runtime library search path Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-sdl-prefix=PFX Prefix where SDL is installed (optional) --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional) --with-gvl-include-path location of the gvl headers, defaults to ./src/glv/ --with-gvl-lib-path location of the gvl libraries, defaults to ./src/gvl/ Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path LIBCONFIGXX_CFLAGS C compiler flags for LIBCONFIGXX, overriding pkg-config LIBCONFIGXX_LIBS linker flags for LIBCONFIGXX, overriding pkg-config SDL_MIXER_CFLAGS C compiler flags for SDL_MIXER, overriding pkg-config SDL_MIXER_LIBS linker flags for SDL_MIXER, overriding pkg-config ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config ZLIB_LIBS linker flags for ZLIB, overriding pkg-config 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 . lierolibre C++ home page: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF lierolibre C++ configure 0.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------------- ## ## Report this to martinerikwerner@gmail.com ## ## ----------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------------- ## ## Report this to martinerikwerner@gmail.com ## ## ----------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_find_intX_t LINENO BITS VAR # ----------------------------------- # Finds a signed integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 $as_echo_n "checking for int$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t 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 lierolibre C++ $as_me 0.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in src/build-aux "$srcdir"/src/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in src/build-aux \"$srcdir\"/src/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers src/config.h" case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. 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 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && 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 # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) 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])(-bit)?( [LM]SB)? 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --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 --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # 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='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, 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 install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' 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/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' 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 ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". 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") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_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 "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ 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 func_echo_all "${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. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_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 "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ 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' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper 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 `func_echo_all "$deplibs" | $SED '\''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' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # 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 $pic_flag -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 $pic_flag ${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 && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${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 hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${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' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" 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 "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${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 ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${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='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-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; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-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 archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # 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 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # 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; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; 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 dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. 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 # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # 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' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; 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[23].*) 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" 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=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 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' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=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 CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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 $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&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 as_fn_executable_p "$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 test -d ./--version && rmdir ./--version 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. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_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='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi 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 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 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='lierolibre' VERSION='0.5' 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&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'. rm -rf conftest.dir 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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj 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 $am__obj 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$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 cat >>confdefs.h <<_ACEOF #define PACKAGE_CAPTION "$PACKAGE_TARNAME $PACKAGE_VERSION" _ACEOF # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS 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++"} CFLAGS=$CXXFLAGS 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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -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 -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`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 "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX 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 func_echo_all "${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. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`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 "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX 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' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # 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_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' 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 ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # 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 ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${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" && func_echo_all "-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 $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${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=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | 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; func_echo_all "$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* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$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=`func_echo_all "$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; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-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' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $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* | sunCC*) # 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='func_echo_all' # 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 $pic_flag -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 $pic_flag -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 -v "^Configured with:" | $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 -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${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 fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} 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 prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$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 CFLAGS=$_lt_libdeps_save_CFLAGS # 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* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". 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") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; 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 dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. 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 # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # 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' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; 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[23].*) 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" 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=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 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' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=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 depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&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'. rm -rf conftest.dir 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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj 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 $am__obj 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$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 if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Extract the first word of "sox", so it can be a program name with args. set dummy sox; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_HAS_SOX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HAS_SOX"; then ac_cv_prog_HAS_SOX="$HAS_SOX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAS_SOX="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi HAS_SOX=$ac_cv_prog_HAS_SOX if test -n "$HAS_SOX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_SOX" >&5 $as_echo "$HAS_SOX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$HAS_SOX" != x"yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SoX not found, you will need this to build the sound data!" >&5 $as_echo "$as_me: WARNING: SoX not found, you will need this to build the sound data!" >&2;} fi # Extract the first word of "convert", so it can be a program name with args. set dummy convert; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_HAS_IM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HAS_IM"; then ac_cv_prog_HAS_IM="$HAS_IM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAS_IM="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi HAS_IM=$ac_cv_prog_HAS_IM if test -n "$HAS_IM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_IM" >&5 $as_echo "$HAS_IM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$HAS_IM" != x"yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ImageMagick not found, you will need this to build the graphics data!" >&5 $as_echo "$as_me: WARNING: ImageMagick not found, you will need this to build the graphics data!" >&2;} fi # Checks for libraries. BOOST_PO_LIBS="" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_fn_cxx_check_header_mongrel "$LINENO" "boost/program_options.hpp" "ac_cv_header_boost_program_options_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_program_options_hpp" = xyes; then : BOOST_PO_LIBS="-lboost_program_options" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: boost_program_options header not found, you will need this to compile lierolibre!" >&5 $as_echo "$as_me: WARNING: boost_program_options header not found, you will need this to compile lierolibre!" >&2;} 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 LIBRT="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : LIBRT="-lrt" fi SDL_VERSION=1.2.0 # Check whether --with-sdl-prefix was given. if test "${with_sdl_prefix+set}" = set; then : withval=$with_sdl_prefix; sdl_prefix="$withval" else sdl_prefix="" fi # Check whether --with-sdl-exec-prefix was given. if test "${with_sdl_exec_prefix+set}" = set; then : withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval" else sdl_exec_prefix="" fi # Check whether --enable-sdltest was given. if test "${enable_sdltest+set}" = set; then : enableval=$enable_sdltest; else enable_sdltest=yes fi if test x$sdl_exec_prefix != x ; then sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config fi fi if test x$sdl_prefix != x ; then sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl-config fi fi as_save_PATH="$PATH" if test "x$prefix" != xNONE; then PATH="$prefix/bin:$prefix/usr/bin:$PATH" fi # Extract the first word of "sdl-config", so it can be a program name with args. set dummy sdl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SDL_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SDL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_SDL_CONFIG="$SDL_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no" ;; esac fi SDL_CONFIG=$ac_cv_path_SDL_CONFIG if test -n "$SDL_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDL_CONFIG" >&5 $as_echo "$SDL_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi PATH="$as_save_PATH" min_sdl_version=$SDL_VERSION { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL - version >= $min_sdl_version" >&5 $as_echo_n "checking for SDL - version >= $min_sdl_version... " >&6; } no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes else SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" rm -f conf.sdltest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include "SDL.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.sdltest"); */ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_sdl_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } if (($sdl_major_version > major) || (($sdl_major_version == major) && ($sdl_minor_version > minor)) || (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) { return 0; } else { printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); printf("*** to point to the correct copy of sdl-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_sdl=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_sdl" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the SDL_CONFIG environment variable to the" echo "*** full path to sdl-config." else if test -f conf.sdltest ; then : else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "SDL.h" int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl-config script: $SDL_CONFIG" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi SDL_CFLAGS="" SDL_LIBS="" \ as_fn_error $? "*** SDL version $SDL_VERSION not found!" "$LINENO" 5 fi rm -f conf.sdltest if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCONFIGXX" >&5 $as_echo_n "checking for LIBCONFIGXX... " >&6; } if test -n "$LIBCONFIGXX_CFLAGS"; then pkg_cv_LIBCONFIGXX_CFLAGS="$LIBCONFIGXX_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libconfig++\""; } >&5 ($PKG_CONFIG --exists --print-errors "libconfig++") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCONFIGXX_CFLAGS=`$PKG_CONFIG --cflags "libconfig++" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBCONFIGXX_LIBS"; then pkg_cv_LIBCONFIGXX_LIBS="$LIBCONFIGXX_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libconfig++\""; } >&5 ($PKG_CONFIG --exists --print-errors "libconfig++") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCONFIGXX_LIBS=`$PKG_CONFIG --libs "libconfig++" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBCONFIGXX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libconfig++" 2>&1` else LIBCONFIGXX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libconfig++" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBCONFIGXX_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libconfig++) were not met: $LIBCONFIGXX_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBCONFIGXX_CFLAGS and LIBCONFIGXX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBCONFIGXX_CFLAGS and LIBCONFIGXX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBCONFIGXX_CFLAGS=$pkg_cv_LIBCONFIGXX_CFLAGS LIBCONFIGXX_LIBS=$pkg_cv_LIBCONFIGXX_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL_MIXER" >&5 $as_echo_n "checking for SDL_MIXER... " >&6; } if test -n "$SDL_MIXER_CFLAGS"; then pkg_cv_SDL_MIXER_CFLAGS="$SDL_MIXER_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"SDL_mixer\""; } >&5 ($PKG_CONFIG --exists --print-errors "SDL_mixer") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_MIXER_CFLAGS=`$PKG_CONFIG --cflags "SDL_mixer" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SDL_MIXER_LIBS"; then pkg_cv_SDL_MIXER_LIBS="$SDL_MIXER_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"SDL_mixer\""; } >&5 ($PKG_CONFIG --exists --print-errors "SDL_mixer") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_MIXER_LIBS=`$PKG_CONFIG --libs "SDL_mixer" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SDL_MIXER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "SDL_mixer" 2>&1` else SDL_MIXER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "SDL_mixer" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_MIXER_PKG_ERRORS" >&5 pkgcSDLM="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } pkgcSDLM="no" else SDL_MIXER_CFLAGS=$pkg_cv_SDL_MIXER_CFLAGS SDL_MIXER_LIBS=$pkg_cv_SDL_MIXER_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SDL_MIXER_CFLAGS=`pkg-config --cflags SDL_mixer` \ SDL_MIXER_LIBS=`pkg-config --libs SDL_mixer` fi # Fall back on a quite stupid header check if pkg-config doesn't work # (pkg-config for SDL_mixer is relatively new) if test x"$pkgcSDLM" = x"no"; then : for ac_header in SDL/SDL_mixer.h do : ac_fn_c_check_header_mongrel "$LINENO" "SDL/SDL_mixer.h" "ac_cv_header_SDL_SDL_mixer_h" "$ac_includes_default" if test "x$ac_cv_header_SDL_SDL_mixer_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SDL_SDL_MIXER_H 1 _ACEOF SDL_MIXER_CFLAGS="-D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SDL_mixer headers not found, you will need this to compile lierolibre!" >&5 $as_echo "$as_me: WARNING: SDL_mixer headers not found, you will need this to compile lierolibre!" >&2;} fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mix_OpenAudio in -lSDL_mixer" >&5 $as_echo_n "checking for Mix_OpenAudio in -lSDL_mixer... " >&6; } if ${ac_cv_lib_SDL_mixer_Mix_OpenAudio+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lSDL_mixer $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Mix_OpenAudio (); int main () { return Mix_OpenAudio (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_SDL_mixer_Mix_OpenAudio=yes else ac_cv_lib_SDL_mixer_Mix_OpenAudio=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SDL_mixer_Mix_OpenAudio" >&5 $as_echo "$ac_cv_lib_SDL_mixer_Mix_OpenAudio" >&6; } if test "x$ac_cv_lib_SDL_mixer_Mix_OpenAudio" = xyes; then : SDL_MIXER_LIBS="-lSDL_mixer -lSDL" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SDL_mixer library not found, you will need this to link lierolibre!" >&5 $as_echo "$as_me: WARNING: SDL_mixer library not found, you will need this to link lierolibre!" >&2;} fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5 $as_echo_n "checking for ZLIB... " >&6; } if test -n "$ZLIB_CFLAGS"; then pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$ZLIB_LIBS"; then pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib" 2>&1` else ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ZLIB_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (zlib) were not met: $ZLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables ZLIB_CFLAGS and ZLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables ZLIB_CFLAGS and ZLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS ZLIB_LIBS=$pkg_cv_ZLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # Check whether --enable-windows-includes was given. if test "${enable_windows_includes+set}" = set; then : enableval=$enable_windows_includes; WINDOWS_CPPFLAGS='-I./windows/include/' fi # Search paths for embedded windows libraries, force libconfig++ static # (I've been unable to link stdc++ and gcc_s statically in a shared # libconfig++-9.dll) # Check whether --enable-windows-libraries was given. if test "${enable_windows_libraries+set}" = set; then : enableval=$enable_windows_libraries; WINDOWS_LDFLAGS='-Lwindows/boost-program_options-1.51.0/stage/lib -Lwindows/zlib-1.2.7 -Lwindows/SDL-1.2.15/build/.libs -Lwindows/libconfig-1.4.8/lib/.libs/ -Lwindows/SDL_mixer-1.2.12/lib/x86/ -lboost_program_options -static-libgcc -static-libstdc++'; LIBCONFIGXX_CPPFLAGS="-DLIBCONFIGXX_STATIC"; LIBCONFIGXX_LIBS="windows/libconfig-1.4.8/lib/.libs/libconfig++.a" fi if test "$WINDOWS_LDFLAGS"; then HAS_WINDOWS_LDFLAGS_TRUE= HAS_WINDOWS_LDFLAGS_FALSE='#' else HAS_WINDOWS_LDFLAGS_TRUE='#' HAS_WINDOWS_LDFLAGS_FALSE= fi # Get libgvl library and include locations # Check whether --with-gvl-include-path was given. if test "${with_gvl_include_path+set}" = set; then : withval=$with_gvl_include_path; GVL_CPPFLAGS="-I$withval" else GVL_CPPFLAGS='-I./src/gvl/' fi # Check whether --with-gvl-lib-path was given. if test "${with_gvl_lib_path+set}" = set; then : withval=$with_gvl_lib_path; GVL_LIBS="-L$withval -lgvl" else GVL_LIBS='-L./src/gvl/ -lgvl' fi # Checks for header files. for ac_header in arpa/inet.h fcntl.h fenv.h float.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done 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 for ac_header in tut/tut.hpp tut/tut_reporter.hpp tut/tut_restartable.hpp do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: libtut headers not found, you will need these to compile gvltest" >&5 $as_echo "$as_me: libtut headers not found, you will need these to compile gvltest" >&6;} fi done 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 # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" case $ac_cv_c_int16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int16_t $ac_cv_c_int16_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" case $ac_cv_c_int32_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int32_t $ac_cv_c_int32_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" case $ac_cv_c_int64_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int64_t $ac_cv_c_int64_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" case $ac_cv_c_int8_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int8_t $ac_cv_c_int8_t _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" case $ac_cv_c_uint16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define uint16_t $ac_cv_c_uint16_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" case $ac_cv_c_uint64_t in #( no|yes) ;; #( *) $as_echo "#define _UINT64_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint64_t $ac_cv_c_uint64_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) $as_echo "#define _UINT8_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint8_t $ac_cv_c_uint8_t _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTRDIFF_T 1 _ACEOF fi # Checks for library functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } if ${ac_cv_lib_error_at_line+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { error_at_line (0, 0, "", 0, "an error occurred"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_error_at_line=yes else ac_cv_lib_error_at_line=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 $as_echo "$ac_cv_lib_error_at_line" >&6; } if test $ac_cv_lib_error_at_line = no; then case " $LIBOBJS " in *" error.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS error.$ac_objext" ;; esac fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "#define HAVE_REALLOC 1" >>confdefs.h else $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac $as_echo "#define realloc rpl_realloc" >>confdefs.h fi for ac_func in clock_gettime floor gethostbyname localeconv memmove memset mkdir munmap pow select setenv socket sqrt do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Relative path for portable packages with accompanying libs # Check whether --enable-relpath was given. if test "${enable_relpath+set}" = set; then : enableval=$enable_relpath; want_relative=yes else want_relative=no fi if test x"$want_relative" = xyes; then RELPATH_CFLAGS='-DUSE_RELATIVE_PATHS' RELPATH_LDFLAGS="-Wl,-rpath -Wl,\\\$\$ORIGIN/lib" fi 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_WINDOWS_LDFLAGS_TRUE}" && test -z "${HAS_WINDOWS_LDFLAGS_FALSE}"; then as_fn_error $? "conditional \"HAS_WINDOWS_LDFLAGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by lierolibre C++ $as_me 0.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to . lierolibre C++ home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ lierolibre C++ config.status 0.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 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' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | 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) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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 -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/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 || $as_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 || $as_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; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi lierolibre-0.5/configure.ac000066400000000000000000000116331205125547100160020ustar00rootroot00000000000000AC_PREREQ([2.59]) AC_INIT([lierolibre C++], [0.5], [martinerikwerner@gmail.com], [lierolibre], [https://gitorious.org/lierolibre]) AC_CONFIG_SRCDIR([src/worm.cpp]) AC_CONFIG_MACRO_DIR([src/m4]) AC_CONFIG_AUX_DIR([src/build-aux]) AC_CONFIG_HEADERS([src/config.h]) LT_INIT AM_INIT_AUTOMAKE([1.10 -Wall subdir-objects]) AC_DEFINE_UNQUOTED([PACKAGE_CAPTION], ["$PACKAGE_TARNAME $PACKAGE_VERSION"], [Caption for SDL window]) # Checks for programs. AC_PROG_CPP AC_PROG_CC AC_PROG_CXX AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_CHECK_PROG(HAS_SOX, sox, yes) if test x"$HAS_SOX" != x"yes" ; then AC_MSG_WARN([SoX not found, you will need this to build the sound data!]) fi AC_CHECK_PROG(HAS_IM, convert, yes) if test x"$HAS_IM" != x"yes" ; then AC_MSG_WARN([ImageMagick not found, you will need this to build the graphics data!]) fi # Checks for libraries. BOOST_PO_LIBS="" AC_LANG_PUSH([C++]) AC_CHECK_HEADER([boost/program_options.hpp], [BOOST_PO_LIBS="-lboost_program_options"], [AC_MSG_WARN([boost_program_options header not found, you will need this to compile lierolibre!])]) AC_LANG_POP([C++]) AC_SUBST(BOOST_PO_LIBS) LIBRT="" AC_CHECK_LIB(rt, clock_gettime, [LIBRT="-lrt"]) AC_SUBST(LIBRT) SDL_VERSION=1.2.0 AM_PATH_SDL($SDL_VERSION, :, \ AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])) PKG_CHECK_MODULES([LIBCONFIGXX], [libconfig++]) PKG_CHECK_MODULES([SDL_MIXER], [SDL_mixer], [SDL_MIXER_CFLAGS=`pkg-config --cflags SDL_mixer` \ SDL_MIXER_LIBS=`pkg-config --libs SDL_mixer`], [pkgcSDLM="no"]) # Fall back on a quite stupid header check if pkg-config doesn't work # (pkg-config for SDL_mixer is relatively new) AS_IF([test x"$pkgcSDLM" = x"no"], [ AC_CHECK_HEADERS([SDL/SDL_mixer.h], [SDL_MIXER_CFLAGS="-D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL"], [AC_MSG_WARN([SDL_mixer headers not found, you will need this to compile lierolibre!])]) AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, [SDL_MIXER_LIBS="-lSDL_mixer -lSDL"], [AC_MSG_WARN([SDL_mixer library not found, you will need this to link lierolibre!])]) ]) PKG_CHECK_MODULES([ZLIB], [zlib]) AC_ARG_ENABLE([windows-includes], [AS_HELP_STRING([--enable-windows-includes], [use includes from local folder ./windows/include/])], [WINDOWS_CPPFLAGS='-I./windows/include/']) AC_SUBST([WINDOWS_CPPFLAGS]) # Search paths for embedded windows libraries, force libconfig++ static # (I've been unable to link stdc++ and gcc_s statically in a shared # libconfig++-9.dll) AC_ARG_ENABLE([windows-libraries], [AS_HELP_STRING([--enable-windows-libraries], [compile and use libraries from local folder ./windows/include/, and force static linking for libconfig++])], [WINDOWS_LDFLAGS='-Lwindows/boost-program_options-1.51.0/stage/lib -Lwindows/zlib-1.2.7 -Lwindows/SDL-1.2.15/build/.libs -Lwindows/libconfig-1.4.8/lib/.libs/ -Lwindows/SDL_mixer-1.2.12/lib/x86/ -lboost_program_options -static-libgcc -static-libstdc++'; LIBCONFIGXX_CPPFLAGS="-DLIBCONFIGXX_STATIC"; LIBCONFIGXX_LIBS="windows/libconfig-1.4.8/lib/.libs/libconfig++.a"]) AC_SUBST([WINDOWS_LDFLAGS]) AC_SUBST([LIBCONFIGXX_CPPFLAGS]) AC_SUBST([LIBCONFIGXX_LIBS]) AM_CONDITIONAL([HAS_WINDOWS_LDFLAGS], [test "$WINDOWS_LDFLAGS"]) # Get libgvl library and include locations AC_ARG_WITH([gvl-include-path], [AS_HELP_STRING([--with-gvl-include-path], [location of the gvl headers, defaults to ./src/glv/])], [GVL_CPPFLAGS="-I$withval"], [GVL_CPPFLAGS='-I./src/gvl/']) AC_SUBST([GVL_CFLAGS]) AC_ARG_WITH([gvl-lib-path], [AS_HELP_STRING([--with-gvl-lib-path], [location of the gvl libraries, defaults to ./src/gvl/])], [GVL_LIBS="-L$withval -lgvl"], [GVL_LIBS='-L./src/gvl/ -lgvl']) AC_SUBST([GVL_LIBS]) # Checks for header files. AC_CHECK_HEADERS([arpa/inet.h fcntl.h fenv.h float.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h]) AC_LANG_PUSH([C++]) AC_CHECK_HEADERS([tut/tut.hpp tut/tut_reporter.hpp tut/tut_restartable.hpp], [], [AC_MSG_NOTICE([libtut headers not found, you will need these to compile gvltest])]) AC_LANG_POP([C++]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_INLINE AC_TYPE_INT16_T AC_TYPE_INT32_T AC_TYPE_INT64_T AC_TYPE_INT8_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT64_T AC_TYPE_UINT8_T AC_CHECK_TYPES([ptrdiff_t]) # Checks for library functions. AC_FUNC_ERROR_AT_LINE AC_FUNC_MALLOC AC_FUNC_MMAP AC_FUNC_REALLOC AC_CHECK_FUNCS([clock_gettime floor gethostbyname localeconv memmove memset mkdir munmap pow select setenv socket sqrt]) # Relative path for portable packages with accompanying libs AC_ARG_ENABLE([relpath], AC_HELP_STRING([--enable-relpath], [add lib/ to the runtime library search path]), [want_relative=yes], [want_relative=no]) if test x"$want_relative" = xyes; then RELPATH_CFLAGS='-DUSE_RELATIVE_PATHS' RELPATH_LDFLAGS="-Wl,-rpath -Wl,\\\$\$ORIGIN/lib" fi AC_SUBST([RELPATH_CFLAGS]) AC_SUBST([RELPATH_LDFLAGS]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT lierolibre-0.5/data/000077500000000000000000000000001205125547100144215ustar00rootroot00000000000000lierolibre-0.5/data/FILE_ID.DIZ000066400000000000000000000005741205125547100160720ustar00rootroot00000000000000LIERO v1.33 by MetsnElimet!Earthworm simulation game based on a real physical model. Features:2 worms, 40 weapons, great playability,four game modes: Kill'em All, Game of Tag, Capture the Flag and Simple CtF! NEW: AI-players without true intelligence! And all this is FREEWARE!Requires 386SX, 560KB conventional memory.SB supported, 760KB XMS required for sounds. lierolibre-0.5/data/LICENSE.TXT000066400000000000000000000012401205125547100161010ustar00rootroot00000000000000The original Liero data and binary files are copyright 1998 Joosa Riekkinen They are, unless otherwise stated, available under the WTFPL license: The LIERO.EXE binary contains the SMIX sound library: The author of SMIX has stated that it is available under a BSD-3-Clause license, with a request for donations for use in commercial products. LIERO.SND contains sounds from Molez: Molez is freeware and freely distributable. The license in LIEROENG.TXT is no longer valid but the file is kept for nostalgic purposes ;) lierolibre-0.5/data/LIERO.CHR000066400000000000000000001043241205125547100156350ustar00rootroot00000000000000Lieronooouuqouusoqsuqoqsoooooousoquuoosuqosqoqoouoouuuoosusoquqoqooooosuoouuqqusoqsoqooooquuoosuuoqusqosqooooqoosuuoosuusooqqqoooooqsuooquuuuoqsuooo ! !! ! ! &!!  ! &  CB ! !! ! ! &!!  ! &!  & CB ! !! ! ! &!!  ! &!  & CB ! !! ! !!&!!  &! & CB  ! !!! !  &!! &! C B  ! !!! !  &&!! C&!! B   !! ! !! ! BC&&&!!  !  ! ! !&!! ! & ! C B ! ! !&!! ! &! ! & CB ! ! !&!! ! &! ! & CB ! ! !&!! !!&!  & CB ! ! !!&!!  &! C B ! !! ! !&&!! C&!! B   ! !! !BC&&&!!  ! ! !  !!! ! ! &!!! & CB! !  !!! ! ! &!!! &! & CB! !  !!! ! ! &!!! &! & CB! !  !!! !  &!!! &! & CB ! !! !  !! ! &!!! &! C B ! !!!  !! ! &&!!! C&!! B   !!!  ! !  ! ! BC&&&!!!  !      lmmmmllmnoooonmllnopppppponllnopqssssqponlmopqtuuuutqpomlnpqtuvvvvutqpnlmopsuvvvvvvuspommopsuvvvvvvuspommopsuvvvvvvuspommopsuvvvvvvuspomlnpqtuvvvvutqpnlmopqtuuuutqpomlnopqssssqponllnopppppponllmnoooonmllmmmmllllllmnnnnmlmnoooooonmmnopqssqponmlnopsttttsponlmopstuvvutspomlnoqtuvvvvutqonllnostvvvvvvtsonllnostvvvvvvtsonllnoqtuvvvvutqonlmopstuvvutspomlnopsttttsponlmnopqssqponmmnoooooonmlmnnnnmlllllmnnnnmmnoooooonmmnopqssqponmnopsttttsponmopstuvvutspomnoqtuvvvvutqonnostvvvvvvtsonnostvvvvvvtsonnoqtuvvvvutqonmopstuvvutspomnopsttttsponmnopqssqponmmnoooooonmmnnnnmmmmmmnnnnnnmmnopppponmmnopqssqponmnopstuutsponmnpqtuvvutqpnmmnpsuvvvvuspnmmnpsuvvvvuspnmmnpqtuvvutqpnmnopstuutsponmnopqssqponmmnopppponmmnnnnnnmmmmmmmnnnnnnmnopppponmnoprssrponnopstuutsponnprtuvvutrpnmnpsuvvvvuspnmmnpsuvvvvuspnmnprtuvvutrpnnopstuutsponnoprssrponmnopppponmnnnnnnmmnnnnnopppponnoprssrponopstuutsponprtuvvutrpnnpsuvvvvuspnnpsuvvvvuspnnprtuvvutrpnopstuutsponoprssrponnopppponnnnnnnnoooonnopqqponnoqsttsqonopstuutsponoqtuuuutqonnoqtuuuutqonopstuutsponoqsttsqonnopqqponnoooonnnnnnnmnoqqonmnpqrrqpnnoqruurqonnqruuuurqnnqruuuurqnnoqruurqonnpqrrqpnmnoqqonmnnnnnnnnnoooonnoqssqonnoqsttsqonnostuutsonnostuutsonnoqsttsqonnoqssqonnoooonnnnnnnnoooonnoprrponoprssrponorsuusronnorsuusronoprssrponoprrponnoooonnnnnnnnoqqonnorssronnqsttsqnnqsttsqnnorssronnoqqonnnnnmmmnoonmnorronmorssrommorssromnorronmnoonmmmmnnmmnrrnmnrssrnnrssrnmnrrnmmnnmmmmppmmprrpmmprrpmmppmmmmmmppmmppmmmmmmmbbcdbbdebbdeeedeedbbdeedcbbdcbdbbcdcbceccdbbdedeebdbbceeedbdbbdbcbcdcbbdeccbcdbbceebcdbbdeebdcbcbcdedccbcdbcbdbcbcbccdbbdedcbbdeeeeedcbbcbcecbbcdeeededcbbcdeecbdebbcbcdcbcdeddbdbdbbcdeecddcbdeeedbbdbdeeedcdddecdbcdcbbeddbbdbdbdecdcbdcbbdeedbcddcbceedcbbccbddcbbcbcecbbeedcecbbedbcecbedbbcecdedbbcecbcbsol !  "!  "! !!!!!!!!  "!  "! !!! 8898887 "! "899::998"! !!!!"88888888 "! "89999998 "! !!! 8888887 "!  "! !!!!!!!! "!  !  ())*)(((((((((((()+*))))))))())))+*)********)(()+*))))))))))()+*)***)8898887)+*))))+899::998+*)****+88888888)+*))))+89999998)+*)***)8888887)+*))))))))))()+*)********))+*))))))))()*)((((((((()FGFEFwwwww0100122210022222220122222221022222222201222222222102222222220122222221022222220012221001001001222101222221022222220122222221022222220122222101222100100101222102222201222221022222012221010010022201222102220010H@JIA@KJBAKC<=;=;<<;;=;<==;<;<;<=;;<==;;<;<=;;;<==<;;<=;<;;=;=<;=;;<<;<;==<;;=<;<;;==<GFEEGFEGEGFEEGFGEEGFEEGFGEEGFEEEEGFGEEFGEGEFGEEFGEEGFGEEFG~~~~~~~~ 889:898:98:898:8pprppopoqqpoomnmopnmnppnnnmlmnmlnoonmmnoommnmllmjljllmljlmnnmllmnnllmjjjlkkllkklmmlkkmmkllkkRSTZXTYSXRZYXSSYXRZTSSXSYXSZSRTxTzySRxSyxSzSRxSzySSRxSzyxRSS         b_Bb_BACBIKKIK02102A@A@BBCAA@B@BA@A@ABCAB@BABAA@A@BCA@B@BAAB@A@BCA@B@ABCJICDKJICJIJIJKJCDJBCIIJIJKJCDCCIJJKJJDCCBIJCIJKDCIJCCBJDCJKJIJCCDCJKJIJIIBCCDJJKJJI@A@BCAAB@BCEBCIBAJKBIJAJIHKJIIKJ~~~~~~~~~~~~~~546465465546436543654355465354365465465364JIJIKJKJJIJIJIJIKJKJJIJICCBCEDBDCCEECFECdcdcededdcdcdcdcededdcdc&&&&&&&"""!!!! !  &&&&&&&+++****)*)())($%%$$#%$%%$$#%$%%$#$%$%%$%$#%%$%$#$%%$%$#$%%$<;=<;<<=<;=<GEEEEEGEEEEEEEFEEGGEGGEEGEEEEEEEEEEGEEGEEEEEFEEEEEEEEFEGEEGEEEEEEEEEEEEEEEEEEEEEEEGEEEEGEEEEEGEGEEEEEEEEEEEEGEFEEEEEEEEFFEEEEGEEGEEGEEGEEEEEEGEGGEEGEEGEEEEEEEEEGEGEGEEEEGEEEGEEEEEEEEEGEEEEGEEGEEEEGEEEEFEGEEEEEGEEEEGEEEGEEEEGEEEEEGEEGElierolibre-0.5/data/LIERO.DAT000066400000000000000000000002331205125547100156230ustar00rootroot00000000000000dXd>+&"#$"ddVaappolan piirij00tiuitalanLIERO! "*8u6lierolibre-0.5/data/LIERO.OPT000066400000000000000000000000071205125547100156540ustar00rootroot00000000000000LIERO lierolibre-0.5/data/LIERO.SND000066400000000000000000017312241205125547100156530ustar00rootroot00000000000000SHOTGUN.MSHOTORIFLES7LBAZOOKAxnBLASTERr\`THROWn LARPAu7EXP3ABC EXP3BC EXP2OEXP3`1`EXP4rOEXP5 фDIRTeBUMPZx DEATH1ZׄDEATH21 +lDEATH3\vHURT188HURT2qQ-HURT3QALIVEָNYBEGIN$rDROPSHELIRELOADEDQ2H$MOVEUPV MOVEDOWNAbSELECTj|BOING{|BURNER#q"󨥲¾̹!vi;,in^d^T`nk_UYgsp[^pjblqqrqgXRaprdU_nokglnc_dZRamicgkfWLSSRde``cge\6,./*鷣rlVP]f\RVcdcefglkVT]`\boomnnnnpoeYXeonmlhjppQ9OoreF #("򶟤: &&/$얀̵ƹؾ!       @;0?7BEK- ױDZ㯯    "01S,"¶#,7/28%8./6:.(-/,)(+-+()/)&-+*&)+,1#3)&Yuhdccbbcccddeefffgggfggffggfggffggfgggfffefeedddcbbaa`aa_`aacnq>ƽ( C@ !NR Ӿ $35 *3(>kqqprlanqnpoppqppqppqtm_nsptSţqvj?$7¬"о$`O#HKB&&=4.GξՖї²—ؚ͸ 9' 28 ؊¤˥ح4"K5Jask-BqLDCOe02qZ!4( >0EQ4̾_tXIeWʳ锨ȩґ!< EX*.l46hVgeFkulorrqrrqrrZGZdosqrqqrrqqrrqrrqqrrqqrqqpppoonnmmlkjjihhhffghgnpI3        ͩȜ !8F]c'19\oI C> *G ,  񧬽 6 ϶ 'ה˭?ntnmlkjkllmmnnmmnmmlmlkllklul:$' 9V9/3J7Ep_BKAXrroppl^FXZ:-7$ %۲12ҏ E#ͫεƯȦΰ 迪$؉›׷ 0^mn^9UvX..2" 0-޴" -$;0Mmphhfggfgghhhihhiiihiihhhhgghgfghggpg26lneeffeeihYJO\_ghefefeffefffeffgffgghhghhihiihhiihhggffddccb``aaclpNɡ˜ʪ    ޖīϣê VfN.1OP1);>$,IL76X65`bB !%+7VN .2 "@1;1& ;QWVjlfgfgfghghhgghggffeddddejq]@  3 *%52 %II0%>N;"%Ddqrqrqqrrqqrqqrrqqrrqqrqqqrqqrqponqo_RXkp/4dfZ]^\\\^]__^_^]^]^__SNZK666.-.İǵ .' /L]YUWWVXYXYYZZXYXXWWWTTSSRIX[C*̬ų $!;;0KWOMNCFSSQQOQQQRQTXP?;3$';1!1>8498C[ZVWVVWVZ\J8J`_\`kZGjb`dH3T_XXXVVUTSRTRPX[6 +INǣ04".:*#)KgZ?1+0GLFL]f[T`jihiigkh_fkijgad\V`klfR=>E6 %/3%Ʀ &<8>Wb`]\^^`_`aabbcbcdcbabcbaa``__`^_`eZA+!/LRFCOLHJC<6(+36.    &:OOJLLLNMOOPPRSSUUTVWVVWWVWVWVWVWWXW]^F-,78764AF!  !Kk\*7KTSH=7 ȿ !5Rgb^_]_^^__aa``aaaa``__^\\[YYXXVXYMDC6̨ ">UQKLMKMMNNOPQQRRSSUTTVUVUVUTTTSTSSTSTTUY\N3#8>* )2665/$%0476')2?JH8%#GQA,+;E@62;Q\\]P<0&"*+Խ̺9LmscH451&',( Ⱦɱø %$*6.# ǥŻ!)3-(.:LXVG?HRURRZ\TGN][GBQ\X\Z;AXWPF637=GNH91>PK2"&++0=LOLKJMNC7,  $/38JUROQQPQSSTVVWWXYYXXYYZYZYZ[Y[YYYVW[`aQ7+(-5+  "+" ǧŹ!$8=2.C\bXNMZdb_`a`_`b\YfjP9::5:?4"+8ESR=+'4=FONA**)  & 4ISQNPQPSJ8>QRNNNMNMIII?0(%Ѹ7;@@4?XZUXYYXZZ\]\^\]_]^^^^\afV?77+ !   Ⱥ#074"'1,,;2(6:CQXWUVWWXWYX[ZZ[Z[\[Z\Z[Z[[ZYZZZYYZYWYYYXXXWXXUXWVWUVVURUVTOMPTVUTRSRSRTTQQQRSQQPQQPPPONMMLLLKKJKNG6;9 ɼǽ ,'289;;9BS^YD0,.-,5GMLNV\^YJ2>qi_^_[\^\[]]]]fi( Jh_Z[^WM<4/*15%ڪ߷&160&#+%%6AIJC=@9ǵB2@[_WWZ[H6@W_]Z\[\[]\][\\ZZZY[ZXXXWWVVUUVTUUXWC70)6R_S6@AFF@83,(.3/*'"$($ %.&$+27?=3)&+,3?JN@794%$'-.%ýƳ "04:?B?.,APVZXWWWWVWUVWVWZ_U;% !-;HG7)$-I_`XTVW___^_`aaXNUaa^]]]`XGFJH>/!ϼķپܴ 0L_[R[]\[]___aabbacdacb``a`]^^^^_cW:"û /?LU[[YY[Z\[]\\][\\[YYYWWWVW[\I1Ǭ &)59;CRaa^^```bbccddcbccaba`^\\Z[Z\`f]-ɼ'C]XTTRTSUTVXXWVVVVUUUSTUVOJ<+*,& ½  ⿬̶ . '59D]]XYWYZZ\\\^^__aa``aaabcaccbcbbcbbdgcI;AHG9)&.19>6 +>HMPZdd`\bbcdeeeefefefefdecddcaaa__]^]\WLPPKLLHC3Šɺ  -KUNNLDEQYYXXYYZZ[\[Z]]Z\\\[Z[YZZYXXYYW^\<(.3+#,2'!   -XVKOQF-*-:QWN9141/253+*1HSONNIE@0 .8960*,41%$+GXSOQQPPQQRQSRTSVVTVUWVWYXWWYYXYYZYZ[YZZZZ[Z[[Y[YYYPPWZXSSQ< !ȵŸпƽȷ"(4CHA:737IZabc\QK@5018>HWR>22;>5"#23! ɼ  *..15.!  /JZXUSSTTVVUWXWXXYYZYZ[ZZZZ[ZZZ[ZYZZXYZYY\\A5AQ[XXZZN:%   &). *67;8% $/2/*#в͹% )6DOOIA9:?L`mmhiniV@7;CQVO?1+ ȸ̹Ǿǿ )5-#,4552-&#&.2*!  ź 8IPRV[YXYZYZZ[\\SLLSTNKNMD<7/  $!$',;JWYWWVUTWVUVXXZVMGC;0-/22-( #%$($+0-% &,+$ƶ (3;==:66>JTVWZ[SKKKRSPSQT[`b`YOE?<8/%#$()%%.0,' ÿ        ǿ %-569?DIQ\baa`aabbbcbbcbcce_VNIILVYWQ?,       %(17@M[]ZYXYXZ[\\[[\[[\[[ZZZYXYZXY[XMKG=72+"    "$! ƽ$,46459BDACHJKNPPNNNPRTSVWVX[]\^\UKGKUXSOF?>:97:@@>:5.+)09>>92(       ))+-,,+*+,157><75;CILKFB>83//29<7/))'!    #$%!    #))%# !  %,(&#'177/,02/+&%(+-0//324214102+% )1354106@EE@>:7788233141)%$#          !##       %&$ $).30-'&%$"$# %)-0-)#      !&,,,(*-+)(&%"! ÿ  !"!#&*'&%%#!""!"%%%"!"#                     "%"#(+&###    !$%),1,&'%$!"$$$        ǿ     !%(jVĿ-pB5R9..                   !               #!  !&&   &                 ܰ %&# 5 **!h: D5/1!83&/( '*':! , "&;á-44#Ц"&.%%)(  !                     )վ,Ѿ˾о¾PPPPPPPPPӾ.D8AFPP 8PPPPPPPPA8PPPPPJKPPPPPOPPPPPPKKPPPPPJ?ANPPPPF&PPPPPPPPP(P.CPP PP:PP &PPľKPM)ξAP'PPP⾾JPP7PPP̾PPP  徾пľþPPPPPPPPPPPPPPPPPPPPP$PPPPPPPFPPAPPPPPPPP$PPPPP达Ӿ23ݾ?ܾPPP˾PP/  PPPP-PPPP45PPPPоPPPPPPľAPPPPPPPPP PPPP־PP达PP'ϾP=PP׾PPPP־ M>HPPPPPPPPPPPPPP3%1JPPPPKFJPPPPOFFPPPPPA'3PPPPPPPPPʾP PPPPPPFFPP$JPPPPNPPѾPP׾P8APӾܿPPH"PP.55PP3PPPP#0APPPPPKEHPPPM@PD>MPPP@P',PPP$PPP;?P+PPP ;PP'.PPP:PPHPھ A׾-FP$!ɾ"P"׾.) "  "4               N,2öձӺ %$󼲰,CB&۳'.115<83/25103;A@BNMNLGGEENOC?:63,'(8NQI$ҧ##Ƶɪ#.3#&.$$" ,,.&SXWm_Q_hWRY3(    ͧޫƬ̵亨 űʽյşᬠ̵ź &,*-644459/-0//-144620;.3',+-3/1    ( )$2:&)1.)!%  # #    ż俶+* 2=+괫W[OZ_V&,-0ETPY\dXVKĽSZNU$))>VQJ=;ŵ9L6;SXR:9%&F."& .6&0-2XJJ-() (? " ݾ7H(;-=" 0HHEVYUZU[aeWMVeaX;@99D"+'Aضƴ+ ﭛ ¦ ڰʫ򲞬4UY]]]QRXZZ`bea[\YTZYW]_SY][B   U]e*2dK^SXW`ZYWY_TNNXXWVWO74)   Ը*09FFF2)0EZ[XNA0+*# .8KOW\XY]ec_Q,    "8GQPOT_]WWTV`da[WG003(ӴǼ¾#50%4B-  ں ϱ"Ǽ +PVSG,$$!,69?FHJH@;81*!سͺ ,.1?#߷ļὰҷȵ )#)/ бǹۼڹƮ̵ȿ¦̽%F]VSPPPWY\W; 2DHLSMF2#*%-=I?  @SQ=( %￧ưĺѿƳûؿľӺ AWNQSV>  ֿ ݬȮǫ C=+2PN?D0 żƷÛ¹¼¾ $2ANN:"ν ,*..(ԿĿÿȶ˿  (5438IUTSNKP__\c_XUWTKC<58FUWK@><90! (CUVVWYXYUB2-$%4872-&%8NSQSSPB% 0KJA2%'7BRWOVUG00M_]a]RB/).345BHLVWX\XH7# '464;;79>MVW[ZRNKFF6$;4!$'10'LSIG@4  FHI8!6:532?E<978/!)-0IUPEHTa_D,3A1$ӴDz̬ ;*)"!+.' !9FFRXXN@;* -DTO,!AKHPWZXUE;9719\ejbI<'#MehhijaWQRE$$2<>=63:BHH=-$9QUVSVT4 )8?FIHGOSTPRblqplaTNO[gjc]YUSPK:,/) -2***.4@U^bjkjeT7 )5118/+6PdcbV@)#))7J: &49-+;?@A71+/IE# .:N[\YRNF0$#     00+2. )/0*+:9HRX]\O:6AJS]ZVQIHQVWVPT^bZNKJR]c`YVVTH:+!  6LNNOIGPSIITYXO7#!5JQYYY]\[ZNA94?OXZVLE<612JTTU__^\]U6$  /?>EKE0++*+//5P]YZYVUWP? ǰź˹¾÷ĵŸ 0AOUTSSQF>2,-068ANLHGFHPPA7./=BR`c[PECLQSTTVTSQSY[VUXXVSPC6-'#%*8MY_aab`_`^YPKLPU^b_\TIDB=<911;HPNG@;CD:;BGG@7*" '14- ʿ˿û-4/,/8=CFFIKKKOQA! %,7BKMNQME4% ""%+'$$!0B:'  *CF2п¿ &?GJLGAGPTX[[UQC) #,10**,037=ADFGIDOZ[\XUTY^__^WL9.(ҽº,=Raa]YWJ1   *;I>,(0>NWO@99753(  Ʋ#!ƺѿ¶ȿÿĻ  $4=;0$'4>AC?.(*-1AQSVYUQPQTSSNF?2$$04568:<=<;:41:DD=635DRQPQPQMNUTUUTW\ZURSMB>?7$  #  øĺ  ȺŴ $+46>HE928BD<'  #4CLPUUUOID5  ºνź ɻ !     '('*," #19BJJD<:<@ACKKFGKKKJHHIJJLTZYUJ8-/9BIMG=3,#   ""$/4*¹Ϳ¿ýĵ "#!%)+.0.  (./-,#$$!-8?BC@;9>IQPF@===AE2,07AKSPH9%!)*).*  Ŀ #"%'%&'$"5FT[WH7.-'$.48>;69=GPSQNOONPRMA;=<731/)%$!&,/-('1@JJGKPQLD@>;:;>>;=?:0)%*35139:2(# "+28:83,-4BCDCDDDEFGFC@;61+$#(,/246:>=8.# #%&'(--)('"  $+-*('&      '6AIKNOG<72& $&%   &6HRQSTSUVTMA3+)#'-14327=??;0#   ##!")02,    ),*'' $/:ELOMIB:2//0-)" &($   $((&(-230,)(&      "%)-/1232/,+*&#!   '*'!  #          #),+(%#  $&%# !$',3:>@@@?>8-  %+/57669:96/'#    $&''&%#   $'*+-+'   "&+0552+" '+-,)'$#"    !  %)+)'*1463,#        ',.-,,,($   ! !(+.267862.)#  !!   !!"#"     ""!   #(-/.,*(%$%&&$ $&%#"    "%''#!      !%*.144331+"   !!""""#$#   !#&)**'!   #(,//,)$  "#$%$" $),.-,*'$    "%'()+,.00.*$   !      ""##"!!  !%())('&$$$"               !"        "#"         !#&(('%!   &*-.-+'#          !""!                                                                                                                                                                                                            % !#"%!*#2-"."'+"#(1%&&%"*%  %" "$#  &      %     ˭ͶƻĭƼӴ׵ƴݵ׾ $ &+)%( 7 "G6&)J5.@M!.C6=PK2&:TLII<>34V7(?HEHCF_2Pc<2VJ5EJ;@:AM,5IHF;(.222;-#,434 (?<+E< 6RB;0=$4SG%Mk"=D;AUI#.MAS@'N"FF?:O>:+$/B"'"G1(?8, * '    !  ( 7'%)   2' * $ !ռ )1&   +;!'#D& '30* 016')A7N7- 3(W.':=B=;,:1112V-=(E5?C=H.4+B#EY- "3 *G3%6:%$11#%7) +F 6 () 6! ˲׹Ȭѡȵ۸ද̻ۻȷųļ "*"0+&&()!$-0' +7)+<40C%%-4! "?:&+5 .5;A1,3 #$2'47%  7  "$ +.A!/ ,7;+'""0 &#34'6 &*0/+@1,'!*", &1+(!;& 0!"'+     ɻ̳ɳ¼ɱٰ  &" !,'+ *  449   !,& $  ) & "&% $$   +  " !  2$2!%  "   '$  )))$$( #  #31* 46.-+ -()+16 !.- 1$! (         ..2"  * $ "('"! **,&( ( *& '- ,/#!   &"$  :"1.  8'"0" % 02 7 <*# #6"  үŵ뻷  "&%'0! , 5!  *!("  #,  +/ / $ )$)1 B/4F-A-AE! +J5/%-/:P$#,H+-='0I-)'$7<<., L(K 2J%2  !Թ4  / %  " (   #& 0 ": %  * )*#! ;2+ !  ! )2% ,0(  :*/6(  ) #*! / %:Q"-!A/,/ ! *   -"+  ##( -+ + "    1  5( + +  "! % + 53-+ "%12 5  , + ('  E.B,0)% .+' %'B!0 /( * $ :)% 1-428=0 -0 25  4'>&-##. 0&0 6  ! "-H *159/ +   +"2*"    '0 #('$ܿ" ݵ $" '1."4 (+ %/( 7/ $$/ ,#& !( .  ../ 7#$ >.&3 !**"2&-1 %* ,ݹ*H &(%   $( '% ,  1  &(5 9  "7, '  ,0 )1!"+6 )35 "1 5 U$# /2)) /)) 2+%,, .7 %( 7"%1$63 "(% /*&3 .57 *& 1*5*  : &(  &Ѿ #&#   2'(6 ,/$(*.#, ' ' 1 ' ' !   2%"$  & -*  E  $ 4  %* !H A #)3 $ #  2B$ / #=   4   &  0" #(,#%#   #' &"$  ')  *#  / &( *  4%  !+ )  (   / # (" ! %/&'($ %, # "  +(   # #)  $ 8!   #,  "  ) " 3-2 " *  !"'   *    !# # ٿ    /+ "  ' $& *&$  #")   ,( *   *  ) !   "       !        #  )  % #    '&%  ) # ,+ / %# # $ #%. 1%6+   % &$                   , )$!#$%!5(2#99&$>/*!8-'875)! *#0560,.#);(!7771.) -,/7#8# (%/'2 %  $          /     **     %           !                                                             "                                         $ &        !                                                                                                                                            #                                                                                                                                                                                                                                                                "'(398,$7C@.(=ONA=5,4BC756==CJN4$0GVBACAVZL2':KO@:7:D\X7(.+AMJ4+-?C:-'2:A@NI -,$("$(54#$! % ٺԴͻ   (2! "BaS9'1AF;A]cibafhfdccbbbbccddeeeeeeeeedddddddddddddeeeeeeeedddddddddddddddddddeeddddddddddddddddddeeeeeeeddddddcccdddeefghYYZ`pkI6=@ZZZI FKJG ۢƘ "#.-77' '=IE)4@IEB6) @PRWM,)42Fa_K0/VcREI]XF6&?UL)-=1()9B36?:. #4+ #, .! %  ! ټƿ̼ȩ̼ͪĵʿžʿͿ̬ȹĵʻ      #)( ),'**># "F62-9+"7C? 'PSY;"7NQ8/,D>1*.DLP;?8BTULA#8F@B1EW\B!,;NO\L /4CQVQ7&"9SVE/ +-;;.55771!4A('744<0&'(?J0(.3=&* &71& !(7/#"), $1"  )   ȿؾĸð׺ʼį㼢ǽ˹ٿ˰ͩĪï )## %  0I ##)+!( &$$))%! 08-$ *7#(=%.*.'8.!- &;3*)+3"4B70,< 1B2 00-)/- +";6+!PHE,1;;$2V"0'#:T7?(S01T:;$(b8,3(,#OA*)a: 9#[1 D( )0O =827$!+'T)8$SC@:")$7+601!)! * ,   ) &  ׾мǻӡزʲΪ޾̸;$ #    $ A" +-, *  &)8U5($,++&7 A+A9 L)4#U 24! $;,;& -',(!+!) /&'16$# !տ  65* &&61%'6/.1%/!J*'5)M-1K<-=C-/,=,08:':<7*76/4,J0J,?#<+2?)6E(??0/&/F#26@@:*5.0#*/@.;3%2*!B+!4&$).&'*1%J(72.0= ? 7&,3 -%!#(=  (ɸҲҿ֭ӧ׼⶷Ƕȶö׻ʲϫͤؤӱϾݹк֪þ͸Ŀ߻ @$,)., %*,+&@:&)%A5@R7YG:?G776BQ<+F,DH#581U(4S&b7i>0N*?[7;1?GJ0ABCM60?A4[#N:<:-H#_2HM;6K;>A'EBD#0'ZCS,@5:A52Dd)084@&/()@:,7SV<*+'"7L.]+f#*c3 7R hY>J=;68VA;eAb(0b/SNZKW;W$SB3+GX6E4*hPB7<2WS\%\A=:.-B"_h&WR.bLU;e6X# (N:LHJS6+ZMCO8Bh122B,C(TD.FN1?WY/$GH>D%:V1%HLKAV=+/1$<><+J<7B#'8 0B"* ! #    ٵӸͽƲܹΨЯİäБқƘ–äŨîǶǢɲ !#)-AH(E-C DCX66V1`!j'=Sj1_8WPDe9ZLZ@[FdEX^FVS`SDjK^MdULiO`S]R`UU[bPdLnR_XZbQ`[]U]a_HpTYePpEeaZZZeKnKgX^aXX\`\cOiQe\`X\fQ^YoJd`WfPnRTj]YYbhMoSoJ]o;oLmU`dShWjJh[bQ]oK^eX[_[]UhMr:rJUsHeKlLdDv=ZTcDYXSK\LKb0r$n-U9GP-O<>D@!P#D0*3>'5) 4A40 ˲̳ҦͶèɸ̱ǺȪøդڒԤṴְ̄ΤʩĴѩܸ׽ϿϾӾغȵڱѿݨКӱκΰۘԴζ֢ձȺߢͶ㴲ʞҼڼͣȮܲ֫űĨ߸ʽҤ٧˽ۻ      "&$ (    "0 3C?*3 $*'7"$$*-!/1D& 50 #-@:,<>(#IK0L*-B'0746D2Q0E7=S3U!E,8^3\5]G@G5U,Ic>3<<[?CR8>,H 8K?AAY4Y#G/1>8;>=&h"?L6E27B6.=*B(9@L<,>*B;"N+$+70*333 "2 ߻ݾİıΎ¨ђò˨ľ̻ڽֽܵ    <*%<07#-40)>4B;4<3$PsO=iYN\WkFZ[)? > &5    ɶϮֽпϗڦčɛæЦęƪΪıȐНηãԚЩѪģ̾¼¼ ' &/&GH,?-4@'A>.<[8BXHn3jTGoPkIlQehgg^fVeeeeeeeedddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddeeeffRhiLkl^WpOY]8cPJI_TB`COC4H!/3A5=0C 2 ˰¢±͍­ˮí֪ТѽΧڴӼ     % &3,. $%#%"+)3!%#)' /#3!%*'%7"42=B-5D7D06R);@@CJQUV0hP8TOA_OL^NQOaFiaUgaXXjVZdegg^gf^faffSff]ffffeeeddccccccddefdgh^c^iYX]YWIZbUXg^HaFPN@VG@QJCJ2BD75S!FNG<"@2%6;&*.%.%     ܻűɶƾ΍þɻ $ /,/$#%(K(A@0@4*:,1083:E72=;@87X4RJB^+_9RJF`GYFQPMJiWeQtI_SnTVdR_MmJlXkXk[_WeiiidhTgMgSgZeeeggggfff[eVe]edffbffe_ebdddddddeeeeeeeeeReZeeeffeeeeeeeedddXddddeeeeeeeeecefYg]hVihXUk[TWlRIwCeHSJHWKTA<:?AAGT Q#$?$F&7A.6:02#6 %%$(!   㱳ξӳ̲ĴĨȰƶȝْü˷ɹǪǼܾ  *"  &@6&7*.C:&::HO.OK@@T;5E=HVSDZTA]LJMeRHt[[\mP\YRidhgefffTedddeddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddeeeeedddeVeeafggf`\a`W[^]]]XTNOfHSHLP=CMW?GM0S@98=68;F4>V3;3':#<,+8%4%):=A; ""    ڵڼ¾֯ŰƾȺīޭǰǢźþƺ­ƎɋƯʺĸİȺͮ˵ɵ̸Կ "&( 8"< $+$>-.>&E;*F<2;1KA3G?O5GA8AF4D9MD>KJ=>>K60H95@A05?H1@E8P8=9@;D4X:SC^F:]JW'b2Y;[NNHO[HOPYN>FW7S;_EcKOS[G`YBTTMGGTU>eE_UQMSHb=YJIKLFYIVU:]?QEZ2VAO5CFR3H:;?-P3F0@5;<:3+E6' + %"%*   ϺӾԿ    ! ,      تͽθڱ  (3 **)26=#91A8HEGDGR8PFJTLWcFZNHaHcSa`]XLa\[[heZgbNlZQkY`bQd^`gYbhm\gbZVIaTLmNam\a]Zc^^UY^H^\XSiU\\YhQ[nX`][]TVc^dd]_aP\kXe]a__e_aY_ccW[aW^\\]f\_^_Oa^Y[KQQHRXIQF?CDFFJKMO2F9657577,;6.'81.5,$)!*"/0*"#"$                #" ) //' "'&"&%1!'*!&*7,***5+$+#!."' ( $   ۿƼɾƻЦ̲ĿǵŶ   * !&'!#"+#"#&,-(-,%0-.3234&/.-923A:76>83A422B7::;<578>;79/1; /3"((& (!!'#   ſſǻ½ȷǾž  '%#0(,3+)60-4.:43<667849@=@JHEJGELEAMA@NEHRKMWTSTURUROVOSTS]^XWXYX[^_gh_bg^feZebbdddeeeeeeedddddddddddddddddeeeeddddddddddddddddeeeffbacd\_^[Z[_Z]_^YZZLXPGSHJNKIOFJHFH???;958211,-+,*#(""   źļſ   #!(##%#'**1-200971:69<8=;<=F=BGCHCJFEHKJKNRSRNTNKSJPTPRXX\ZUWTRQQKQQVZX`XWUQQOVVWRWSN[ORQGLJKNLONHQGEQKEPGCH?BC>HCDG=>9789:=B8A938.789785/6530./.1/*-01/.*-("'&%)'+&$ !#"                         ļÿ ! $+#*(',-0.10./,+,23;<7<9:65=:=>@?<?C<>BDHGE@DBDACACC?DFFFF@DD@@?ABBEBDE==>8?=:?=9<;;>:=97:66734956697302//2380//,0/-2,)-(&+,,'+.*(%%%*&&)%)''"""$$'+)++**%#%#%))))(((((,')))-)+)'))')''-++-'%)&)+)+-)'(((())))#'%!&&%%(,&+##$ "%&#                                        !!! " !#!# !!!" !!   ! !!!!!!!! !#'&&&%#""!!##%#%')&$$$%'))'&$$$&$&'''((&&$%%!#!$"#!#&$ "!#$" !             "!!!#!#%"   "#!$                      "! "!!# ""!###$$&##"&&%'%)((*''%)''&))&)))((((((&((((()''))*((&&&$"#%$(&)%&$$$%!! ! !                                                                                                     !!                             ! "                        %)$       #'$          (&         $&# !"                                                                       #! #!  %          " " !!'"$&'"*'"! %!                 $%$&'"$3!"-&$*%$-* !-!3'$&+ $* $   ǴijſŽɹнʸս %$)6;6 +($+3(!&) 2%!5'.6;D6+BB12$3>9L992)96792?B@5%$-27?F7&-+*+9*)&+%JD+'1:(11.3//-@C;-/B59-)1.H]- 5/<%')U6;;@<;)6;!L?*%52;5( !JKW\X]\@P/6TL9D1?.5;571. BD2$9D<"6FOGO@$X?"<:;CBJT? 3P5+FB[T77L$ .)D5@%+G? 5HB'++1 &$'6$*'&&+&    " "ܹ$î ɹǼؿ      .  '*$"   !( 7!'&&! 9&- 5       &  & %-6   "' $         %/                $              )     !      $    *    % %                 %                       &!+'  * )  %    % 3   &                                       $                                                             !                      $ !)"" %$$'& !"$" $                                                                             !   !                                                            ! $!                                                                                                                                                              !#'&'(+-16<<<=;<<<<<<;<<;<=;<<<<<<<=<<<=<<<<<<<=<;<<=;=<<;<;<;<<<<=<<<;<<;<<<<<<<;<<<<;<<<<=<<<<;<<<<<=<=<<<=<<<=<;<<<;<<<<<<<<<<<;=<=<<<<<<<=;4<9<<<<3462,+*%%!!#"%!    "%(+,0259:9540/1431100/1*000.*1434101.2416;94120./212000020114345;=<=97654997540,)&&',*+*-15523-1.00,.31.1)+('%$%&*%"#%"%)313200,53897756:<;:73012774/*%$&% "$""#(&($''-32:;=;<<==<<<<<<<;955575313300*&()(&+-/3555557662-**+.311.)%$%'.--+('%#$%(***(.0+*#"#$&*,,,)&&$$"! !##""!' ! &'&# $!*-+*(*$"!" "%(+)&!       "&')*-/023689<<<<<<<<;=;<;<<;<<<<<;<<<;:753/.,)&&$!                         "" (-,*-289998899:9:897789988788988888887788987888878888889777877787777787778778887887877887777677778789888888889888888898898898789:999999869859998250375,#%!'# $#          #)++*,,068864.*+01200-**%+-/,),.,.-01/00,054100.,+--....-.,-//134788954544651//-*(&$$)'''*/10.0,.,/.),0.+-&'&%$#""%!!" %--.0.,*215766347:98620//230,)$""!""#!%&,1/578899:::9998:876222430.-.++(&&'%#'),0231122341,*))+/--,&##!$)))'%$""#$&'&%%)+*'#!""%'))(&##""!""#" !&*''&&"!! !$&&#     "#%'*,-/13568888:9999:9:999988999997776520,,)'%#!                        "  # !%&!$,#$#       ¼ȰˤȱíþýϷʺƿĹº $,6$5>D=::;ISUMGW`irprprorpsnx\\xmtorprprqrqqqqrprrrpqqqqqpqqqqqrqqqqqqqqqqqqqqqqqqpprpqpmrqpqqqqqqqrqqqqppqqpqpqqqoqprqrpqpEMumtb,( &#ѾǬࠓŴ۾%',:B)&9TYTUhrprobB4TqprotfbsirqpqqqqqqpqogpqqqqrpqqlR`sprpqqprprqrpqprprqdmtlforqqrmfrqma`X[[A:7PisdhoqmHFijShKD@83'%)75CM@00*#OU\MUO8S4OZIAHmo`G?INUWTZYTIT`VNC,G[X>D:1^pe[_.,18TycnpkWPWQ?)!%=TXUKO_7 :;1%$  ֽ"ܸǜԮţҪؽŒⱰ #++; 4XnnohA3d[Yunsng`[Ycorpqpqpqqrqqqrqpqqrqqqqhorqqqrqqprqqqqpqqqqqqpqqqpqqqqqqqqrocmrpqpqgoqqpri_VRadXBSaI2$;AJ9+ݸDZɜɨӶ "=G8%1:=<-$?EFTUma]egWXcnorhRM@TSCBThklraRS`cWYE@fsprpsmb`hbgqrfesqqpqqqqqmmrprqqqrpqqsnnqpqqrqqn^`qeYb]acQU_LGJ>R\M;5?:95=DH:$+(-?C?>%$*=NRG# *Q.&8,&430/* Բ¾κ(9( #)%(5447OYeA(7G("jqprp\GAbRYrjvhfqrprpqprpsot`]qpqqqqqqqqqqqqqqqoppqrpqpqprpqprorpsj[mqrqroh``e]emrqrqdPYniWK_lXLXa[KQ_e]T=1)/8Ur\^`XFLTJ:*0BN;34@927;C- !/' (1+ɹԿп־ɽƾ潴ؾ¹ ##5D+&7F?.2N^dbbXKYUgtnilqprqqqqqrqqprpqpqqrpqrqqqqrqqqrqqqpqkpqqrqqqpqphoqqrqqqoorqqpqqrqqqrpmpqqqqqqqqqpqqqqqpqqpqpqqqqqqpqpromrqqscK]sospt`WnroskM?FeiZVhrpsl^WU?F^RNPRgror`LB56B6IeEFUTD>?B>@<15$*/& $(%Ƕʯ1Wpnh`PRSX^_lsprqrpqpqprqqqqqqqpqqqrppqqolrqrpprqrrropqqqpqqqpqqrpqqqqqqopqqqqqqqqqqqqqqqqqqprqqprqqqrhQQYc`[Q;./2+$+3! ϽȸľȨ˰Ƙٷ   7:3C7=FB5',6-D_dE%64WrppkG/5,GirororO@GOY]XMgcD[a@+1<=%F\mnN;*#%8=HUUB<(+49C73;5.))+" ̸ΰͼӴ ,-+)&)5@D@N0 0>6Icjnqqpm]NWfoqrpqprpsgcsprqnlrpqqqqpqprqpprppqqqqqrqqqqqpqprrppqqpqqqqqpqqqqqqqqqrqqqpqqqrqqqqqqqqqqqqrqqqqqrqqqpqqqqqqqqqrqqqpprqqqrqqqqqpqqqpqqqqqpqpqqqqrppqqrjg_]d`^]g^ORUGHPQYG'->8." úîîֹȲû̵Ī )   ĹƾƲúþܺƼ %&&   $'"  "&       %%%"%.'%32&*+$=4"%,*+9FTK<:529>GOQF@NXS@-.BYYV][E><9FLKAA@229<8>INXTD9+>MKUZL;0(5=79DUWB*':>:7402647=73:BDJOE9,! 3=91*9>.!073 κ ++ "*-(*5>;93&(;MSNKQ^fb\^jl`O>BZioqqrl_ZUW\_VXgoprgNLQQJIQW[]`aTA=CKPQRJDEPP:0.6DGIH@995% ɽ˾ſĺϿ'.2,"/@ECA@BFEED961&$+555-,-$(-, #" ſżþȸ½ʾ  "%*15:9881.6A>?MW\b_Z`ijiggghnqppqqpqqqqrqqpqqqqrhgqqqqproehqqrqrlbbjrqrleeehgjqqod_d_[krqprnfhgifehfikqqrppqha`anrpqmmmgilnomopkgg_UOMOS[da]]UJ@. !->IE5$$!# ûǸ  & !%-/''0<@2 $++  %# $1:75::76717FSWWQOMCBGNOOHGJKT_b`[_a[[`cffb`__]^\_higeeemrqqpqppqqoc\VVWWTOIFFMX`c]QGFA@@@@@=6//256764201*!# %*% %*%#  ŷ  '#"#+038<<90'#$&.62+*./0:BGLIC>>CHOOLFCHSakjf\UXYTOPPJ]rnscMORcqpf_c]XWZSQZd`]aa[OMWcef`Y[bg_U_je^elfXMP^i^GF^oqrqqlgheddaVWg`Zfnqprneeorpqphb]Y]ZY\abip_NOMLTJ4&*4@C5$",5<60.**+*#     ¶ȿȽú #/4  &&.8<5-*1CFEMLG=2-8HNLKJHCFLNWacbe]SMS^hoe`bbb_bddeeb\\cbbfef`_krqlimigddhgcWTYbnqrpjf`enqqqi`bhnpqjb`dgflpqqqlhkf_ZZZVY\^_ZRNLONC824>GC:6:?2)*358EOH;*&(-3.$$*+,0:B>+ $# ſǻĹýĿźϿ  !""!%),*$%/9636=C;556<>=;;AJPLLRRLJSZUIAAGLRTRPOI;1.4:@HLOH>84/1000/6AD?=975/))/-')-697;>??=999;;3-09520155653-'%)-+&'%" '..-'!!'& ǿĺø ".1.,))&%(*)(+09BEMPLD>9<@EGNVTJKTMA:?HMLKMKKHED<43/3@LOKHMVSJIGA@BFEFKSSJDGLKC=?CJTWRLKNNNKFD635>DE@:656=E@5/-(%% Ǿù           *%   ¿ʿ &%"#3;704:ALQTTRROOT^c_VNNQW\bbZVQU]a```[YZYYXVTRUZ^[^gg`RF@@CGLU_ZNMSTPJA?DDIMMMNNPSSXYSKHPV^`\VSUXZ\\\^d^VZb_ZZ\\^dimne]bii\NJMUUJ>9:9=KZTE>;420110.-+$+1* $(!!),'"   )/(   #)(      # "$%+/0-(#*13.+,/0/+$"*25.#&&$   ź   "" $%" '*+*&+361*"%)/59?;755337677>A@>9764:BPURI<9<@CA>BIJA>>AKQPMGEEEHOTTNIJT^``[TUZZZZX[dec`\WWZbeddbfhkkhhijippqqpieeiqrqqqqplmnmqrqkimgdcab_\[VPJ?46@MWYTMF=9;;75120.+$%*).9:0       %&!)( !  %(& &(&$ #""% !     "                 %" %("!$%%"#           ¾ $(+,1/..++**.5=>BB853:>?>@EIIFCDEDDDELQNHDDFJILMQUVUTQOOSXURLKKNRTUPMNOOLLOPSSNJJIHC=:>AEHKPTRQOKHIGCCIPRRKGJRZac_\]`^XVX^ekkihgefgfgddbbdda_ehgfefdb_^^^^_^`_````ba]][ZZWUWZ[\]^_YPNMKEFHKKLOONJFB?<983.,.-'!$! Ŀº   !"',-,.3556998568:=>@CDFCCDEJOSTRRLJJMMMQY\[XPLHDBDLU^a^WPJMSUUOQPQMC<<@GJJEEEDGLIGD>86<@AB<4,*,06;;73-+/55334550/0./+,2651-($#',-*$! !#$"             ſ (***+.14530-($*1:<;86657;@@?:>ACEDCB@><@EFEC@9565874458:985562/.135654/,+/443-**,-+&$""$'++,)  "'-.-(  "&'(%'+-,*,--+(%('$$*..,&$%'-.--+'%)*))%# ##',-.+'$! #)'"                                      !#"   #$# "#'(%" #$%'&#"$"       $ !   %&%#"  !"%'#! #'*)&$$$$##%%&%%"  !$# "$        !# %$#  $'$"!!$$%                          !!#$$%#""""!$$$ "$%&(**(&%%%$$%&&''(((&$%%$$$%(+-)'$$!#')'$$$%#                                                                ¿ %(-5:=@@A@AAGNX^hlnrqrptovlzFIbmqrrrrrqrsrsqrrrqsrsrqrsrsrsqsrrrrsrrrrrrqrrrrrrsrrrrrrrrrqsqrsrqrsrrrrrsqssrrrrrqrrquhgvrHFr\h_%/"  ̱֘æ  #+,48?CINUY_agkR[NHXqrrrrsrsWsrtkTmsptknncstfguqrrrtllsqsolppsosptpukqlfu[junjoti`pl^ffjZ`Y[VUQNGGqXs[ng7=\HCf5]MK;;01.,AF.00. UERF>4^=SUNXJPHQF@LNONKPPSPTRUVU.7DX?D2`XKMmB:6*F{[fW[PRLNLM@27<:574542553445536=$&(,.  ն ƨů˦ХŪʻ·½Ώұ')( "?jdWhC1@nVLz^odebcraatqsqrrrrrsrsqsrrroqrrsqrrrrsrrrqsqqrrqrrrrrrrrrqrrrqqrqrrrrppqrnpsispqsa[e\QWYQ8BB1*3B;G"*ͷѽ ()/!1:=; 2ADFIl[a[]QUS[SR]SYNOPFIVZ_^bZ\V[[[e\[cUUtrn_cjmkhqriarmfptnqroppsqrrrrrrrqrrsrsrsgbecd[qj[m_Va][WD>FBBEAB?>;<1@IJ>'+.7/58=."%1DC8C.*<13#+ &%)$&" 괺ƢǶԾ#  &(//65?;GB]9 ?]7 rtpulLNGvNIviycLhvoupuptptgtkdimsptqtqtptqsplpuogqulhpsqrqsrrrZltrkP`oumweVaek`feebb`__]\[ZVWUTRSQPLNJMILDE];7OI-6:<02?<7)'# ƻѵưʾ˪Q/Zd_[RDR\W]antpsqtqrrsqsrrrsqrrrsrsrrrrrrqrqrrrrrqrrrrrqsqrrrqsqrrrsrrqrrrrqqrsrrsrqrsrrqrqrrrrrqrrsrso[]RQNJFA;63,++( üġز¶ئ¿ְ $+*R85><;&%<4EIR8?4VgZ\eG8J:KccVhnrTEPRCC[RniC6QLZtopb\OANXWWV\GBADBHPOVVLP`PTSH9:2Lz]>7LA3QIVX_snkZYf`\bV^adZQZe`UT`gfiebeeGFLOEGULUWAHQX5/=4N`;.:59VNXX5Q.%0-/A>9>C13/%;C=;3,-%#$  &&  ̾հ $$)%# )8893K4.9(F^hd\_^e[QS`nqposqtpv_Zvmnrnjifdjnlotpmrrqrqsqqrrrsrsrrrqrrrqrrrrrrrrqqqrrrrrrrsrrrsrsrrrsrrsrsrrrsrrrsrsqrrrrrrsrrrsrrqrrrrrqrqrrrrrqqrqrrsrsrqqrrsqsrrrspqqkprsle][ZMBPmaMJL=;A8B?*!-)00%$ÿ½Ϲ¾ϼ˳ɸŻɴƶ̹ìɹ̺  ¿ݵȹ˾   + !       +$*0,6,  (%(/'#$$'05>@??8-3BLLI=:EPME<3>RTSZU<17>N^fXF.=S_mhaaZV[a[\VPaSJLPSWcZHDBNTF98MUK;=<977-7IOQO;74 JO>=IF=8*25.6?:;:?R[YTQQMLP[YYb_[`[Z][dgiqrqnbQNY`_jicmsrsnqrrkclrpfimhebcmmqrliqsrrqrpsrq^Sftqrrspefipsrrlqrsk`dimrrf^aegmtkZOG?>HT[UKLIBISSKC?DF:899??71),-)#'0./'"      ¾ľķĿ¼Žþij¾¼ ! $"'35210511?D==KT\^RR`ke\W^ifgknrrrssrrrrrsrrqrrspjprrrrqe^jrrsrqmimmlokjicbflprrnacjf]corqrpjgcjijlffjorohopcacaepqmjoodgkkebbbfed_WNKMWXUNPYWK@3$!+:?<3!+& " þ¶ʿ¼   &  #$#((%!,-270$ (($)+% '%&/432:98;807FMLKGLMB<@MUSD@>AO[_[RQWSU\[[Z[Z[\VSOTff^YX\jpnlgd`]hoh\RMKLKJHA==DNQPKA<>=997553.(')+**+)+&! & ɾ   !!*"!)(,169:981+*,.6<6-+426DHJSQF>=CKRPJIFMUbkfb[Y^aVSXXJ^shs`JTUgrrd]_[]`c]Z^ea^di`SQ`mie][^cie]dlmeij\SLZhn_JJgtnsqmbcnlgd_Y[j]Rcnsqsla\jqroke`WTWUZ]aVYiZHQMLVL5'5AG7&&+4=92+((*$""   ͺ¼ź¼¿ʼ  )0 &'3;9*"'2D@@HG@:3-0?MLGBDBDIGQ\b]^ZOGJXbmc\^bcYWY[cebYW[\aehg_]eljdbikib^cfbZW\amsqgdbZbipsoibbhlonfZUaeeiilpmeaea[Z\^XZURTQQQNML>746?F@7237-+2882;C>2'**-1(#*)'$095)  ºȻɽĿµĿý  $#!"'.0*)-4/05AF:224>A;99>IOIKQNDDOZUB=;984)%0,).1986:@@?:436:=3*/96122432.,+$ &)(,.+%#'))#%%  Ǻ /3/(&')()-/+*,8FILOLD=8>FIFGVYIJVOC;64ARXOGMZTJMMHC@HIFOWTJBISRI@AGMUWOJJNONLIC:AMI@:67?C@A9668>I@/04*(&  ż¹       $  Žƺ  !"!"5?806=AMRQPNOMNVfjeZOMRY]bd\YTU^bdegb^_]\ZZ[]__^Y]hpgZMIKNOR[c_POZ^YQHIMLPWVTVVX\Y^a\TQZbdeb][_abaeghkbY`khbdecemqrqf`grqgVQVa_OCDGABSe]H>@>>;:;:831*1:2*'#%02'$.2-'&%$$ ()!15(  '((#       &+" !-+()/572& *386-)-3331*"#"%,2;2%)*'! ¾  ! !&($  ! &**+)-793*"(/149?;756669:9:@DA?;::9:DRVUJ=:=@B?=ALQHFAANSPNGDIJNRTSNIN\dc`[WX_`_]Z_hkgc`[[`hjheikmpsomplorrrrqpolorrrsrrrrrrprqromrlfeeeca^YUQC6:FT^aXMD;8?B=64511.%),)-991  #    &(!-) "!$&# '('"#%!"!"&"        "!        !          !!#%!#*%  .3)$#'+( "$"!#$"$%"           ú  "!  ),+,3532021.08?CEG?2,-34B@<6/-4;B>5/*)096+(-.**0.%"$&),.*'%(&%&&#""!)--*+-)&&,435572102:@AA@:7559ADA:9?EFCDILMLLMNKJJJRZVNGIPTTRTZ\^^\YWW]a^YSRRV]^]WPV\YTSTUYYTRTROIAABJRNJIKH@>;1,)'"! &'"%%##" ûö  &05899;=??:89=>=:88B@<=@@@CFIKLLLLMSY\^[WSSRXYY[bfdb\WURLLXcgkfb[X[`c_ZZ^^XNGFKQVUONOOQUSPLGBACIJJF=4389=DFB;305=>9<99:87:94..5=;75-&%-22/($#$()&!               ¿ &/100249:;9750,09BEB@?@@@ELJGBCIKGCDKRRQMLJIIKLFCILNPOOLHEHNQQMHB>=ADBA=898;?@=:8337<;83.1450+()**-030-'!""$')))$ #(+054.%!%()*-/-+25110211.*.0+*.571,'(036541-+.0//*)&'))+044/*)*&"%+0-&!!     ¿ÿ                 !  !"" "&($!!                  '*&#&&##"%***(&(**-+(#"&))))-+)&&&# $$!     %)% !$%'%!!!!!! !$$"  #%%%%%%!"(,.+))'$#%&&*.0-)()+031-**,*++,----+())*%%)--($$(*'"!  #&&# !#" !$&%$""%#!""!       "&$"#!")*$&**)&"#"!$,2.!&))# !%*-,&!                                   !$&%#"$'&&)+-...-*+,+,.-.**,..024520011.032235452/11200./28950..+*().251-.12/)%%*("!"##"!! $&(&!"         ! !##!      !  !##%##"#!!$%&&%###$')(&$"!!               !!!!!!!!!!"""!!  "#""                !###""!"%'(('&%%&'((((()&'(****)&&&((''$##%&&%! " !"$&#! !                                                                               3EEEDC?@?>=>>>=>>@CDEEDAACDCBCDEHLF0' BSXW\O>SWOA%:O8.:)'1(=C'-A9/   οǻÿ+3GFVR& 9/ +'ٽƷ$46A>:4331&$+*'%%-**&'&'%%dz ܸKCFEKHGB?>@CB6("'7KP?<' 8[`\_cP+2X`S;'=;:96545665566667674/% *6$ ɱ )4" !?FPEBHC>ADFKMMJHJQTLMNRJ/%**û7 Ź  оĽ *FM>, *>.'7WYNA;>6/6/@<&"9Bհ뼲&7=-̵Tjfc^4 &E\JUkefcI2/8JE06errrrrrrrrrrrmMG2$;NrrrrrlNSX>9QTS[lS5M_k\B# -IQjrrgU5 7*%;C" # ɽðƨվǽǼ 5 '+4-BDG/7:*#0-./2-,. +é$/- 65>A&ҽ ''мֿ.*'  0314 %((092%'   ۺ  ¿շ2'   #'/AFQYcejXRNJTTorrrrrrrrrrrrrrrdI@BD@6=FA7;6)&(&    0L]ckqfTYghXVikofcO=K\grrrrhqro\KWi^K-2?BCKXI%/& ǷШҫ ׷ )1/1$ܷ 0/0000%*+14)""& % />AD$$ &66?;6QD?[VMG#?JC>H/(   ##";TTrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrefrdga>5 к»Ž $&% (ܼڼҨٷƴʿο  EMLNLC6/>MTOE?>546MbB?I?)%  ")6EKM>/&(*3/''+=0  ̽ھžĸƿDZ˿Ƽ&'ଛ Mrrr_@1LMNHBEKNNPQK??ADLV^b_jnrrrjUOT[[WHRSVPHV\YG>B7?qrrrrrrrrrrrrrrW83EerrrrgTMPrrd1)'#4]P !& CknmkrrrcRQ\kkhhgegek]@UrrmZccirmaeM#/Ia^ZnrrrrrrroBKrr];Irrrrr_MAUjclrdrrrrrrrriD@_][PFHZ]PJT\ZXE62)>X2Ļưǿƺʶ״³ 4!9cmrlgF$>O_\3- &AD;?>5-;=@NE>-(5Tk\`\Zc\X\TUaR?LS:7KPE=;PTU +" 84:%  2rrrnhirrrrrrrrpoqrnallTES]\ZPJE)  ȿǿǿʷ¸÷ջ*3'% !4BA@+5Olrrrrrrrprrrrrrrrrrr_\rrrrrrrrrrrrrrrrrrrrrrrrrrrrrpccrrrrrk^TNIQUVQM7:?6871/96?PMDC=>/#&236>67/. "'8A;6EVYXSYW\ccWTQJ=7<;0'28J^VWYXjg\\Z\_\]WdegpprrrrrrrrrrrrrrrmrrrrrrrrroVXimrbMHJ@5DVRE6+$  ҽ³  *688#',) 1+ȳª; %>53J@#(25/( '  Ǻ˷ )')$9TQTRWYX]_TO\dhk^TQORYbef[WQSXODEG;=T`\MGF24>>0%$/9+ -/752/)++6/"/) "%!'%  # !$&",)(68./EWaQSZbVMQN\jkeTVgiekrqgcSZaY[dqkccnr\[hkbM;,3;CTOMRFFSPE5.?ME-,,(793/2?BA;("/4HP>& && ';A/ ýõλŽƻ· !36310CG=?IG>HK9(;Ue[Tckrrrrrrr^OT]mrrrrpdbdcW[\frrrorZHFIKDHT[]RNB1670=E<%  ҿ®÷ȿƽ  %.'6AC@;==BLJSVEC??JJJLFEA76>EIINT\VPA,(4>DNMKMTMECEJE<ENMOTTS[bZ[MS`fe]^\\OD[ge_YY_ie`\`foe_Vel\\Y]dgmk`TUjkp\KPTMKM[cYcYR^hfXVY\PKNJDBKT[F:<:3,/1DD;6/2972   $  ȼ»ûĽ»ùͻ  #  .",BCQF=:HUZa[[^hmrrrkcbirrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrkkrrrm_^fi^RJOZ^_TEGKE6'".886+,46'ƾ   » " ! $*& +CPMEEKNQPJMVcgd^ZVT]prrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrqnf`eqrrmYJMGHQH?<8/'$""04/'$%   ÿ¹¾   $)( &,./,'%'*--(% +8GPJHEDHE>8>B=JVO[T>==Nbkd[ULGMTOOT\\^fj_QM[rrrqc`hk`ZhrrrrrrmjnrrrqrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrlmnrjTFMW_\M:++/46:302/-(&# ľλüµʹ  %*)(('""'*6BFHLE<8AP\c[VVXZZ_b`cijcaedgkornprrrrrrrrrrrrrmjmrrrrrrrrrrrrrrrrrrrrrjgkklqrrnmfce`WSTSMIHJMI@6///'#  º¸ÿƿþźĽ·  &&'(&$'/30,-9EC>>DJHEEFJMMMMRX\Y[_\VU\a[OIKT[ba^\ZSE<?A@=@GKGGDB@<6584/.179689:::7;;;<3+-2//,*-,//,&    Ǿ¿      嵎Ƽƺ %'#! !%(('(,4>AIMJE=:=@DEKRRJMUND@ELOMMMLLGEC=64/2>JJEAFMJ?>=6589769>=3(+13,%%&-7;2(&))*'!  οƿ     º  "!"(-6<>?=;::ALPME>=?EHMPJFCEKMMPMIGJKMKHEDGMQMQYZVK>77;@EMUPFEKMGC<:?>AFGIKJILMRTNFDLSXXSMLNQSSSRUZTKNUUQRRRSW]aaYSW^]SEADLLA61115@MI<62*'&%%$#$! $            $((% $),'%%')(' "(+% !  »    #$ $'''#&,,'! $'-374.*)(*./-.3665/,,*.7CHE>30368669@B:78:CFED@>>>AGKLGCDMTUUQKLOPOPNSYZXXTNNRW[ZYX[]__\]^^_efeec`]\_efdeefecccdgigc_b]ZXWXUTRNKF;11:FNPLGA:67631/0.+'!"&&(22)      ""#" "   !#!                         $  #'  !$#             &'(,+*('''&)/69<=6,$&(,289511256664/*'+064/)&%(--'#&%##''" $%%"!#!! "'%"%&#!#',,.//.**,256540///3783//38879>BA>>>>=>>>DHFA=>>AABEIMMMKHEFJNLHECCFJJLHEFGFDEFHKJEBBBA<646=BC??><64/*#!  ! !    ÿÿĿ  &,/00/131/./020/--/4877;>?CEJIGFB@B?==AGIJD@CIQWYTSTUSOMNTZ_^\]\Y[\[\YYVVYYUTY\[ZY[ZWTTTSTTTTTTTUUWVTSPPOMLMOPRSTTNGEEB>>?CCDEFFA>;8632/)')(#  ¿ľ   "'(').0/02410/3478:<=><;=>AEJJJHDBCEEFHPRQOFC@=;BB>>>>?CB?=73068;;6/'''*/442-('*//-.//.*)*))&&,//,($ #''&  !                   ÿ¿ %''&'(-/0.+($!%-465300/16:975699866:?@>;9:9:9977:=>><;:769>>>=950/021/0023430/0.+*,/000/*('*//.*&'(('$!  #'''%$()($ !#$"#'('''))'$"$#!!&**'"!!$()*('$"&''%!  #')*'#  &$                                          !  #%" "#"          !!#" "$  $'&" ! ! ! ""!!           !! !$! !!                          ! !    !  !!"%''%"!""!!"""$$%$%#!!!!! !#'(&$!  #&# !!#                                                                                               '%!#'))&%(--*$  !#""%$ !"&*04EHHFHKOQOH@82--0230*%"%)..+#$*(#%+,$      "ǿ ¾"&)11-'$! '08>CHKJHJLJB@JRLF??<::9;;7,# !"&&%%')*'# $(/4876:BFB:1'&$!#+013:AFJFB?ADGE>87@LSSV[bc[Y`bbjda^\XUWXWPS[cdb]Y\hhmmmgVO;61( !%($"!"(*583-* %*$ĸžøǾ     %!#&*52/30&#,-'&$-0.&+CF95!3@49EH<>PKIZ^^egngfljVG>6BJboqrqsj`g]]lpsqsqrqrrrrsrsrrqsrrrsrqrqqqrrqrnebbff_ZYVRPQSRJ>78;7.%!#&$!!#%&#&0- ",*'#)$(((   Ǿξ     "+6<PYaddgdmrrrqm`QXc`XUa^MBGTRD=;;=D@802:LZHIF5(.54'"*7<*&(4.),*2( &     "(*((/--59<<<;@GGA<:210-+( þ  "&2BG=05?IJC@4?@02.$(2J<4*'?@:1 !# &?B:=A. *2>*  #2+']orqrrsqrrsrrrrrrrsssrrsrrqrrrrrrqrrsrrqX<<9 1+ֽǴ            / "#©ȺʽãȾ!# !)/:KMFCC>;:GZ_`[XRRW[`^Z\YYTQQWbh`J<=CI?24CJQcheqqrrih]_bYeqrsgTQRZ]fngckqrsqrssqrrrrqrrrrrqrsrrrrrrrrrrqssrrrrrqrsrrrsrqrrrrrrrrrrmbgrrf_`denhC ,9;DF?6"QN8)2B[qrrrrrrrrsqsmhrrqhN1+2+ #,/76, 10! "İ*5"&39<, -5<>;800+(.MfogZjshZTWforrqrrrrrqrqrrqrrrrrrqrrrrsqrrsrsplrrqsrrsqrqrrsh[jrrrqrrqrrrrsrrqrrrsiTXorrrqsrrqrrrqria^^^TF=GMTL@9BH5!ÿϾʺÒ§ŮŹ+*))01+,3=HD>;.  ̱³ ( ( /13?=**RZTOQF,-9ON6  +;A& ̽ &7GN.">C?@@2*6P[[TP4.,޴ #+ISMSTD;HKLVZWV[d_I;:DK\olYNO;"/4-áèͶ#;8(OO5" %0>OK9/)(DA-40!#=LQ;*@@¾Ǹ¾(,02-*%3+\Y< #?-#4866&*9&2U]H4 -% Īdz"5&!6HQNDBFK>1@Zg``RJH8/(,9:?51>5(-XPJV`X[imsqsqtjhqsmkrrrrrrrrrrrrsrrrrsrsporqrrrsbNMMTX>$-@C%!/>BEfsrplklrb># '3;BQ\fQ 6=$ ƺ  ! $5, 6-9=$!#!4DNFZnrhR>=E?.( ۺ!+-1!! .>8   .@RRHASosrrqqqqrmkf_jsqrrrqrsrrqrrrspmlni^WSSH70-*)#+ALOC489:LWb_K?=?82159,.@9% ! $* 7GG<8ANZ\[WSOR[irp_@.@\aR>;Jesqp]9  " +ŭͿþ !/?NRH-6'"Utqrrsrrse935KprrqrsrqrrrrrrrrqrrrrrrrrrrrqsrrrsqsrsqsovX"$?gsrsrrsjS1Hqqrsjcqrrqrrrrrrrrrrrrrrrrrrrqrrrqsrsrqrrrrrqrrqrrrqrrrrrre^j`)ϻ&Kc\@#(3206EXYO>7Kai`O7*$+;JLB47?IQH98DQP:*75'+>D'"990%/FI6! ")5DUV<*0@5(4;0 &* 4@A:;D@)ƶȹȫϾرкŹ͵ο ,?AB9#%:HLV__L;@FOUL:03ARWisrrrk[TLMRerq`VbfRA:6.)*)/7<6Hdro`J1" ,/-" /H[^\_deosrsrrrrqrprrrrrrrrrrrrrqrrqrjYRF1"),+6FPLIHD2*00% %  +9ADA92/0511:' :Zklfe_NCALYb[F, %-+#$!  ,+  $$#:QG%28/+6GJB76F^he[Z`b]XPI8   񿘍ñ´Կȴ &$#0AE:11+*(*?^iT1"2Lbprrrropsqsrrrsrrsibfjidkrrrrrrrsrqsrsrrqrrrrrrrrqrrrrrrrqhff`SM`orrsob`krqrrsrobisrmdje]>-N[dgcTG@8" !% (& )&$!# !")" 9LSNJMU[W_lqrsrrrrrrqrrrrssqrsrsrrrqrrqtiWQPNC7-νɾìκͽſĴ  (>NSQPLEHNN?."#"% "*'+5;:59FS\ksrrrsrojjorqrrrsrrrrssrsrrrqqrrsrrrrrrrrrrsrsrqrrrrskckrrsrrqbVOGLdqrrqqrqrrrrrrrqrrk[]fb`dnsqrqd^cikqrrsrrrpoqrqscC/%" $/9>KB1,09HRPNRZ_WFAHRYZ[aksrqniosrrqrrsrrrrqqrrrrqrrrrpljh`URKIH;$     '  ') *6;54>HG@;869:92/+!$3860+12-#!! % ɴŸ˹Ǿ   ƿºĺ&5BABFJT^]XW[ab]XZ_lrqoi^PI@8:@@<83223.  "! #% #*)$      %-0&*;KMJFC@@BELOLH@8.! *:BCDGHKG<67,'(+-3:91+%&'-:CCA??CNWR@%   -CIDB;1.0.&#% " '3CLZ]QD;@HE5# '+--%  '34)#!)+!  ͺǻ &,+)''"   (/,)+17AORPIJT[ab[RKJLNOPLF;120-.6?9)  ! (2-&"$/8<==?DKNS^djeRFC=::=@<1'(($!!!.31)     !.=JMJMPRRXdkjjnprrrqrrpX?/.8AGE>4248BPajbSEB@BGD=977=<84-"*=FF?=@KW^]ZTH=>ACB=83121)!     ,58989>HLKC3%"+25/$"! %*178>HWgqphbdmrqrrrrsqqrnecegf`VMHB@JQRF9+# ##  "$"%*('*)+&!     '-)&!  ̿û    -861+(%!"&*0,"%-/)"%0;=5,-:CJJKE@=78@KWRC9992,% ÿþǿǾ,.*)-44-')032/049:>BIMKHFFB><>?;9750)$%" #)*-,-01/19:;>BC@<6006:;?CADFBA:4//7@FF=0& '&'.8BB=9:7304;DMOLIEGIIHIQV[YWY\ZRC93,%   '''*))-35453127:73/*&   οÿƼŻ  ƿ  #.22588:6203BHKFB@=@EMQSSVWZXPKIGIPRPKJKLLKIC@?;5-%  $+++''-4>CEIHB:67::5-(((%$,5=ADD@=83.'      ſĺ    ")143/+*+285) /654138BP^jneYQQTXZ[ZXXXURJDFJORQSZ\]]a^X[grrsqhcdhprpi`ZY]dmrrlaUNOW_d`[RID><@CFJILRZ^[VNHFJPUVXY]^ZRLLORSRQQMIDEJOPI;-ȼ øûɾ¶ƾ    !&(*0553/&  ½ $+11.,.5@<620032,"(.2220)      #" #"   %+--,($"#%,473* #'(% $& "()%((" &--('(+*)           "##$$$" "$(%"(3ALQQJD=?AEE?7,(*0344+!"+130&  '279;::75:>BBB=82210,'%"!()*# ¿ü   "    !""  "1:;92,,1331/-./039;988<973-$ "     &++(&&&'*.8>=;88??BB?:556772/.00./,,17>EKONKJF@>=@CB>:3-+./247;91"   !"!#$&(),--.,+)(#""$"   "!!$&%! !'..) !!#(**-/10232,%"%$"%*-../373*!%-49>@A>70)#"',-,)!"-9?DGFA<720+(,27878:;><:9;978=>;86875552/+*,0/.05:720010-**%   $"     "&*,'$,0*  +573*" #()(%!   "! "" &)))&))*020+'$" "(/25211220/211/+-//,(#! "',..*''''&(&$       ÿ    #"" "'**%       !&()+/0221/15752//-%+33/+-5:@BB?<::846752..39><6-! !$"!"! !&+046853102531,)(&)))& $%$$""#"     #"!"&(*,/5:60+'%%*/0,'$$$"   !%$"" "%,6=>:4/-+***+.130,(!    '.487531.+(&(*.1/.+&      "%(%!$(&$ !$%" #(+(&! """!!#%(***&&"!! !&(#  "&%$ !    #$   !$$$#!! !   !'$    ###&&&$$&(+2563/,(!  "#$$$(-169?CEC=6.)'#!  !$#$#"#%'&"!#$%&$!$+27:AEFB=83138=??<70+,4::5.% *5<=?:63321111-+'#          Ŀ     %*-02465202479:<@CHJGEDFIMRSRPMJGC@<:9:9852.+*((*)'$#!   $+-+)! !())*)('()))*)**)%$#"                !&(%&%%&%%%'))('$!     #%&#         $&'(('%$#$%&&$$""!!!"#%'))))(%%$%"            !&,/14789;<<:732157884111/+%!    #()&"!!"!"$%$#&+/0/-,-0486/(  !!!         """"  ##!  !   !#$#%'**'!      #&)&%%%&(('('%$&)*,,,+($!#%')'$ "$#$#                                                  !  !"#$$"! "$&%$!    $&)('" !"%(***'"     !!                                                                          %*& ".& #.*$'("!%   !#!       $*/63 @RH4!)54-"-<9)';JOB)$9NC( (=OB 38) 1/,94 05&&* *&-@* 5:(3 '/$ ! վ  &+%$=J?&.8<@B3!A`V##@V6):7! (( 1F-6Q-#900DD/ ""2;:% '61->6'+#*A=#%:4 '%  $   "!*2100.33)! &/71(-7752*(4=0%1;:*#EJ,/,    ! 1ƽ;" --  !-2$ ''54 (84 )7;4" )?F45A5!$<6"##!$.0#!*-,//$ !(& !+ҾĻȹ &EE ;O#(PZI/)8ScPDFNXbrpP/1BWcW;#%5@7& ,/# ſǻмټ -"$      !%+/6<::=E?1'!"%$ %;C/"(,)$$"# -, ¾ʸ   ,.$$&  $/1.,$ 6T]B *;NM9*3IK0+J_\C& 7KL8  !/0    $2,+( 30 !# ȬΫ ķ    ,+ .*                 '  (' &$             + #$  %             ƻĿĺľ  #+*(30#)374,!%,/.+''& !%'!#  ""   "  $&')!!! &("$-27/0573$'461)#36*'+'$+5/! '%"*%$($  ) % +$*, $" (1'&($+6. '+"# $&"2) $''$))" !!%*$! !'$&*!$1.#.1 $*"          $! && !$&'# !&)($"'%*:-%*#                   % ""+)!#)% #/,(62%'2+"))!                   !#%(*-0258;=@BEHJMPRUWY[]_`bcdfghijjkllmmnnooopppppqqqqqqqqqqppoonnmmmllkjihgfedba_][YVTQNKGC?;73.*%! ¾ !#&(+.147:<9742/,)&#             "+*)   $        !%!   */6<7 ִ2).E@! 7- -"!#&  (564 !( "  #%      " % _1. R%$/42?۵и9ڽ'. %$ 31 7 $ "" Ob &/&Lp>-2!,cQ,/;A8B> - = I^1=:F''Ե)ݾ[չG<?6  % 2. ˻$#'!Ӷ>Υ A* I%R(1+V3#!%  ټ   ,.   $ # ;  ^oH90  Զ@)Xj)) 뵼-+.nucD59jFA+IA5' # R2  '.;MfN HC'LU $!+ !=77 -> GU1CFfqrptlcW,LwWNC%kf!P1 %Ѳ dw_*>2 ӿݕK6;&PХ ۝̭ҵ Ч"͞!go^Ve%yrISb-3@ @< Ӑ#Noh4)[s( enB7G F|kxll/[\7C!_o?xN/5(:C=tlϺX(ϠQ-Ot."ľ8  0YBC!@" -4NK8('!8E;?(: !<:Y-/ؤc=00жEu* +϶0=ן鹗&̿ު+=Fְt/-3D3dE.̴:((- , #4-0,(2/%ĺ ݹ)/51<ҝ$fJ-!Ɨ)zl]'"ஔ̨-K'÷ % ݮ–ɟ(=Ykq) ^wnZ;埔 2LN"ÿ]rM"HE%7mrsoHM9\; 4  `=gyXil.8P'\pA+ %:',.+M_$ӻ@3+ ^rfr)7,ޱ57E1 Ʊ& Julq!ڲcqt+ӡ¶ϑǵJbI?*nθΝӛԴ¯"9c)˚')&ܱ(٬޸Ūؼ,8G>$=( %%N6! 쨉뢟 =O5KI:,ҩ 80-ppsrpK'"$ivS22IdnH ʩ8OME'@7*5 ȟԩܼ4=*@DHJJ5AX$GI1$*/ ʟЗ$$!8[c_Ui^-3LL1 Ǻŭ&=juptQ$4G<>SheF" Ǥ+9 ܾ #YLG8etr]?MGšHV<2?I.!5@@F'-ST^smQ &' ѰƵ)!@;Wec?ȷacD#18 ˙1J.%,NyfL칎 ƹмBi_M!%OWNɾŞ,37޾ &Ƴʣ̫ܽ;ZMO\)ཱིĹл  *˫ 곧Ħ**!9B9 S@ ú᪤)3-#6&0XiK@1%Ҷշ"<ϴ(/@=>K_O%ǵܿչ +`gH0/NZuiD<9%913BE0ӏݗ%'Hi]00 Adrsqsl[WA¹+2TN9,9Jdotrg^YG8?$ GKHA16"*%)E4&=I;"$  &'!$ξ= گ)2'2* ұͼ&+ #I=@,&Ž$% ,/&$&?J@7$".=pcZnSJ .6[eL>6-9C㵮ھ -EfnvR`PAF ,&$97IdHH^2<;Ժ!#1D>LX9>QPZ?8K0 71 -+ # )*YZlqGHWQYk[**3%8G>&#(JWSbvptpscJ 000%6(""(bS^jumSH:0"*(`^\qmg]H/ 竷7uotpTN\6  (RN"د&,!ݷͳ ⶴ᫓; .3ҺĬ˹ˠؼ ɻͰ 5 .EWXU6"Է!*1<' %';4 Ǧ %PnHKC/C3& +# 4 !"9?! *"/-"Ffk_O ޯ 25'/$ =7伵!"06 8+ ί =;j]PLI[V,Ô׷%TW6%  2J_O+-# $Ⱥ';JJLN7=\S>$  5.9-(6E/ɸ˧ 4 !Ͼŝ'4!??, 00:'ƻ209  2ҽ×&! Ĩ 'ɸ'7* &= ׾   2 (-"?) #0  DG?KC<  !0624'05     ´ů̹Ǿӻƺ̯ѥἲ¤ӵʷƽ17<ҵý' 70 /.  )0?O;;9-;8*$- 2.) ,77<+(!03 '1-,2RVG+#  !!TM0JDG(+(H]J,Q+ 21 +648$ƽתȻ' ,"* ƿʮư&6+%*Šɻ (* ²  ߾Ъ  µ޼ ̞ (ž)(ѻһ) 꺯½  ϼʳ ʹ ̻  0Fů,  *&'ֽ޼   !#'--6B  20?@(' '    '&. ?6 7-1" %D 1($# +'5E@6 (&"651 *76)(+    ) %9&1/6 )  . ! DZ     ,54 ("      2#0=  +!"*%)ݷɼ!=6 ($  &$!"!<11Z!-.+    ܧкӼϙ ے8#+&+)$'( ! !1 *&4&#;- '  :;5$(@;ũƷ$+'0**4")(>/ '@<% 0"6! !' & -6G02/6  EK+(.GZKfB579M %36-9( $5-(/?LRDJmVBL,EWPEMO"  1E&"!$*#9"- ;5 )&$ L@A- .*(-')%#$$*WI@88B! '%BH)$,$)!5  41>1"-0%   ""3IK:4:C3/#/B,F/)A8 %= 4#+87+) #% @$D8   #! 0)- )#&+ ##$N>+(  )$#!$ ) "*!-3B = 2!'6 #I*  7A#+7=@$5 ,5 ">; &:I=/6 E9SX@I(5/&9^lsrqrrdM>IN $IA1'4.+9OU/(?LL1CIOg:4"#/'#G&Bc & .$ %B6"  !! ɽѱúīɸٻͳ02 @ Ш.ѽ"-&%'&    ?H .  $֠   ' " 6*ھ*(17,)#-;3F849OZ%) % *8.O;  !)0]9 &//,./LWK:5@68,/VO23:7$6BJfo_@3 )KWIEJ2/7/K]@bRCNJEj\K%"/.PQ((>SS@07$/ &4-(& 4C,9'  &""   )$   & ("  . ֶԼ ԰ &8 < @$1D7T'$J )?)#$&=#'OI7ZWAG&/H)7*"(2.  A]EVk:EPEM>7 !1%1 /-9+& ;(ǡ̯  #+è Դͭɏ Щӽէ㿧̮ļԻ8ʷƷ̰ #ݵ+6+, (˿ż ֽʼ׽ʾ#Ϧ˿а׸׼ ˵ӱ ߫ը&ABкع߱穻þŪȻ'ں'.ݹϧ  I AJ1,=UR7J\  ''..111'PlM:416'Ia< (@:Co@WCOUI(+@F5E& "0!;1'¸ӿ"ܣ +أȱȫ̻濯ɿʲٟԻѳüӞβȪռԭͰ餘÷εϥȾϿۭ伹"ӺȽ # ΪҺ#% °,ͬ 9M+,6c`9$ '741.3 F+"D4`W( 8-F1 eu4=K5E8.PB\?&"#@HV$>9Ǿޫ! *D (<3;0@0 8ԩ$&6'31%:& EK4 ),    /6C!3K,MU + &,D4)=.  0E(!("R^A -(+ ( Q.QLDU, 6CL 70!K19D<J16#=*YD+"3,? 6( ? /%Mf; ( &7O6))$+ "<#  US+ '! %>   8#+ /Y23" !ҴڞŮܲڼ ػ ! / :&"#. 3#&/ Q@ƍ;6  % %$ג # Ƶ )* ߨ - ')CLD! Ի N7.5%G&DP6(20 !0Eޫ:  ͢ 1)۹̼ʒ.  뻽3 .3; ر CA &"4 WV 6  %4/\I %-o/$8C++(za>Ria9A" CmP!!`/9{@)NZDN'K>&!*#/8.Q9J"+# 6%N>&"b9EA7_< >T<9&' !#,t )'!K'" #%/7濬)la-3GY6*$ .8;! G7 6) -S  $#+1 3   !" "BU1& 0J. ٻ % - $&, + ':*?&&I! -N7 ־ ;,* "4  &, *"#?1 !"7O2&6 '&F* *H G*AO.Lu9 :>$02(@.9/"B&# %.%$ "  ݠ伹̾׻βϟհÿ̯ܰ®̮໮ϵ޼ǰ ʤ (       " + +RqG .#)8(D@'$(SYND9O /#,1=A42=B= +KOGMXtLG>6(549 %?'3AA:5/ 7TT0#, (  #,3&&A><)$3 45& #C%-0#H@G3!&21"*,3++&*. .)&%=8OS706/ "  0!0"+% '޽ȴ           "  " "8 "+ #5(    !   ̛'  !"%$$   '! >G#=&"* &,9+:A/)_ B+:)PA6!=6;8?6,$630O ;:%GC/? ;H-79^L*  (B B9.$ ,+6&&!  1         "!      # "    "* )"53,4*'!'  61)9" *!.0   .0.# '0          !  %$ &!/  9 ! ("+   ز   /  .)!    !     "%(H   #   ! "  7  "* "  0! '* $!/           !$ % ((!  *                        # $   * !  '$% "#("     #      )' "+  #  . 7& $ $"&$H'!  +#$) 0>+%?5 --&' #&     "          !:   * 6*&   !    %   0%    %   !     "%+%  %+%,    Ŀ;˹ (           %  )$0"#(="00,&*2$$! '*/ .&2-)!%$%"'2$+,& *&!        1*S8 ,    & ."             ո    22     !      +   (   % 30%# 7$  " #$$ $ ;! $$   (3!&#  $'"$ &  ("'+!   7                    $       f,                 $*#g9"  +T $0/-''1  !)#+'%%#!(-! (+ !%+#      3$     " *         "  3           && %          Y#'   %    $  /.  "  #      #   "fO * " ,H+V'*12#$() 0 & %&  , ( '$   "# " -  !   #-   #         13G-   1  $(      0             ܑD   ߱ I&"#      !54+                                         +                !                                                     6                                                                                                                                  @          4)2K                      0"4       $           $                                                                                                                                                        &<5.#       *    -'+8! "0F8AL 9: +43O/-$8& :-*!" # 7KO 3M & "   (   %  +&  ) #     i&=7 95v4>  $'9 /9ɦƾ̣ ߺܤ/꾿ֻ" IY<V)[=2E',:>/5 0)=!2UlrtSL^7I<4kOM+H*HO6$Ao  A!_Au\%G6Q:J< 2@ݼϹHʗCID3?&0$fNpG8c:*" / ز棌.(# &ȶ ?( ӹ՛ &FGNaC_X  B;[# àɭ70 C2RAP5&=lb7#%$ J<1#෦#Ѿ3<D0 pWNmuC cnawjTz:_nI}c}XQ@I:58-M4]HbWL*!E6q^۲P"e\ Evrqud*)>jB5170!,;YKJH98 Ȁ $.CqNilzb9[1L&:#ffewT᪙ȣ2Jz=1n%6BkN$.G.Êܳ 7%1GD(%?X)Oܶ \T)&ɩɞ&!<᳛,0SzT 7bsmr* 1#4fWdJօ°ֶ 53Itbsf!.<RZ?;[—;(֓FM%͟ ;E ǝ;B7זĐ ,ǟ%Pz`vdm){Y:2×2;R>ĉи˨S|89_^[nٔ"=&)鷆hqveP$-H\NB _@( aoj`9을جVIDHvON!Ge; 闍0ع6ٱТӍ5"IvmyU ͉$ ğնӝ$O>,r\GB4 'ʲ'覊ܒGrP(N3  Žܲ , 5)>*ٵM")*)ăGxeq931+/#B% ٦%ᠫ,;D(QY!@3 *1򪒎ߗ-$ #(! ճ  +ʻ HvprADhrrrb1ۜ E9"Ƭ>mr_prqb]uovZRvb4 $V?2+ 1J)˳Cy۸Igi=OxnxN?kotnd. ݳ26Ψ$C)/R$ηʚ66R 5 _vlehIx].ʓڿݜ"). *)8f[- /᳊ƦĤ ,3)!ߩ" ׷%9 G`غ޼ ᝐƚ-CcR0E]'#WTKm:(4:(.ܡ믦»prH+RF`IH3﹨ԴƠ׈Q%&5J3cd|M); Yq˞࿶幠ȱ;#Mwq\@B115ݟ8ȓA9þ*ƹ1<$1)6 (ֹԡ&lpdb]ap> Mbtn6 ޯ̾KQ -bpso`=(ѹ!%!ᛎ+A-7*O&ǿַ5BC0%9%׿JM_VB]Y. 1E*+ >5+- ĕ 3EK6Vn`cfotmdV2ɴٿ@UXD? ȡ )R_*6&.=_qkeZhs]asXٸƫ>ktoqpbgtou^U[Gɯ 14=:VSG) K^PMQZ[]@(&:]E,' LF7# , &/;:!B414:%RGfYJ./˰ .anB*JBHWNA!# ) %;RVJPF./ $! "  !:JPQV>DJK7   AIA#+.5 ү 3@LS?SN=;ȿ β ̽?4(9B=UK^ogK&!M[C/ ʰ%2=0:5$  0ѤѰ ->T1# "-3<˸8@_\54. 3@Tq]HG;6MW[bkD4 ׾% 'UhkXYjV[T9ۺúȘ<6  ԧ JE=E8300, .&̣(# $ /5D2"Ŷ @9>TG,"(RJ==NbSCEQ -49+20EhT )$.#/aUehcdtbXC<5$,102KUWG4)A E2*3FSSMP+<@uUlH5tWB6( V^kqd_T5,;@EPbmvnv[7$<*/$E6;L;-# +9H+G''RuprrquhRE9+<'3",5 )>+5!4$ھɶ  Ǘ.̬ 󻧮F4´գǼ/ IHܬ2)9%2б.?\N:&-**5$, ͭA&$+5TE70%(16& C>2% *!%廸%9= )Wvpsro`iJ)*')$. %9fX+,<:! ۷ .%)* .eV ?9. ';15. !2#ѻϮGr?D,8, *- Դ7&*" 'I==G ۳Ůͼ&8VI^UN4ӱȳ!73 !0ϧ!,5KHTL %.5-Ȳ %Ŀѿ$$<,8>,)׺ڿ" /,ư*#& #02>?+;QMKAB( )/&%&O 1/4>2  '?6454  "  & 901&((/-  '-02+IWER$(:1 -$#$"':"  "3=260/1F.* !ڿ $$$;48$ (,% !!+ '68'+89=;)  "  A. !$ "  !9F(#$& )1"+  ɿ   (!  !÷ ɩ̬Ϳ++  % (# ' & $" 5*   7/C]ilV^g@8AJWB+@0EG"2IIMFGIBB+'72F.%423:@C8()$C:42A:'1E9$SL/  )-#*̽ ȽܴŪɺкѨ)¿&̷ʿ. ļ 8 & ", /%+Χ ÿ#" ں -  + "0T#1#';? +C $6/#8).QIXX2@>B-2#&N_1V3J#M0C=lt`1L>EI:072>7!4%CdhU`tZAOvgY<#5EE?+ %JKPV2'-*3"8$/+a &:&޿     3  +*  ϱ  ⩯Ϯܾ㢼˜)$ /" /" &0_,8=%%9 A =*<52 >F?B`QC?)3D,.J/ +* 'QeYPV5DGIB,F6 ,''  (:6 #֫˯#$0 2Һʝͫ ΠͿگӲƱ οѳ$ݲ# % , "ݾԥǷ ʵԸ˼˴ŴԷ$=˿ηڲƨ'ݿܿͰ #3=1$7MD/?-8]KEJS" 7D1/A52=/. 0ErW?>6>RR?4;;EQmf\Y_SB94:I@)%#& */  63 쳟Դ "ںƮҺХرũհǢžǼ׵ɜ ߸ ̞͟ ѻϿ ڲ + ̢ ) ׸ϿϤ°#'* '$.9C:;`R% ;C6).<:P6066XVN64!;BIA8 01/'-;.,:-  7#I;&*-2D"ML0 (CVD/ =C,)@=RI:<\F"#652-3A-.DDC/&  1;Q\ZSS?14 ?4# 2=5 * /*!. (+9X44.  $=0  !*.+ /E>= 1L4A5B-)BA! + /P0  !7,"  <>* ,#*  .?:,( ,H A3# &R)  }^,<.$% ,/!3^C/' +;>& !"  !'0:UH4'% 4*)/.&  &' % +06\O1+=A%1/<4EJ'3>J3"L *  9'FF4(%*'- * 1!#5(  "[J)3 " .* *&$ Ѿ 16 Ը);G(ճʵ Ƿ  ( !ߵL   ! N3 ׈Č4 5& "ش   ӳ( ν"26> $8 1 D$PD!ܼ0'6ֱ) ʹҵ ԫ÷ڪ ѿؾ ɶ#!$?ϳAM -# 2  WO+$A 3O9^> $!_!#H@50ro\,WhITU5$H^[+4'<:]-)_$ )0Y=)6K778=!))  &7!(Q3H0/& )"\2.  )!;.)E]GZ0!*J(,$(#') 4)'). ?"%!+&-=3 ڷ+8(  *+5?>   )5  "   &2$EK*Q)0 *&  .2ܸ )   .  5 1D *  & !  &# 24)8   7*SE, & 17 ,))NF =II;nE /& 41,%'9((4-Q=9. ##!#  ٧ݱè𻾰սܾȳκѾƳجоŸɷɰ ("      +2 $ )-%$-XgD*6+<8ENE7 #/!Nc[HCI5#7_Z7P$Mc0GG6RhmjPNNS-#>%<8-B"+OGB0(#. +FAE77)C. @#(E1/L2);&'(& (%8. #!5'#2++7P;8'"734>.&(!2*/6.138>E#-EPB"mIY! +1 -O=, ' !  ߹ ֬            """ *' =     ǰ  R"  $ +#$2#   '-!! 2W7 ,#'@5- -!82C,%;2*+_F9GBA7;8?<2F0:@4$ ..>A2*0<=FNLCFaQFQRH9%"0+0LF1B@:2!.;/2>1!9"%4e+* !꪿ĪŹƯǸԺĻĿ찜ًȢ̺Ⱥǹ۹įĥĽ綹Ľ咸  %'!/#     ")-     '& "$  "+# :C& !( 3A**,+'(  -HE %, (""  1*%)  +0%(/+(#(37 )   +!-      ) (  05 !"!&0#0'.39%/@P=@G(,,%41 ++74397X[N^B"&6& "&-!*3")-194# $ " #     "       ,.!   2   !$5"(   $2-071$ ""+/&   > '# 1 # !'" )""0 &  %!   (* %258K<*%# &5?J@1>EB7$ ! "+A,        !޽   &3$$* ) )  1  # W&2          &'6.   ʿ  ! $ " .>;  +(      $, "<=(1"     (        $    ) ")&  & Ի  շ   !5*     -6'  '     #   ̽              /- '"%7:,+&&(($(*%13317&/2*&00# &#+4!"",/4BA81!*'09*0.' $(-/2+1( (     '       (     "(%'!  $$+" ,&#. "/+ ""           "$          $!            ""    !!  !    )#   "                 !    &&$                     &'()    &!#     #     ' "  #)$$ $"'($A*$7:*!! %11*''(1>3+/*&"                                   !&    !%(!!" """  ǽ              "()("$$'! "%(("$!%/*#'* ! # ) !!!).(*,'-$''*%)&&!! "!#$#                                     " !      +,# $-(!   "$!      )"                                          ")#!!$'!$&!                                                                                                                                                                            "68;4#           $& !480.' й%2!#  01- ! #       $  ! &&,$  %.) %;F;(0*8#(Sn.63@ 28ZX+RF$7  3$"5Tf L-.s68bM@GBU+6P0ܽ 8(0D( $!'(!(, 3Bigb={ntp`(ְ^wYcvptra!NcU+֧ެPDԦ:iIIq[smxC,`d@Kun2+ 'S'±̐!֟Վʚϑ I ֫"Rvk)@C>A9+iz/bqtl_Uh񢆴֪E5Q[!GE`!Mr3h`%#V]_JM{DO(.8SZ 7eVWeT_g&&~R5.1|R ]8̭0md$.pkquYA7ݲ9CV JC.𬾶 ɲז쫥9Sp* ̝Pvpk,ďíŝ2V#Ai6U6Ш0/蜻ŘճŨըB9&7gZŦ ǾEoB ȕ í_:"Gfw=ة (2pZ#R`RP+GUe&ۏѺ%'䘋mpvkeG(HBT  *!FgeT'/𚋘*е+NU޲" 53[B<$-@iI@@CC>2@CMc7٣Բ EF·#"$;8.DF@*@*-EVCͷ)$1@kZF' '!Π3^9C_VH_SүŬȯܶ'V_pL4P:57es\5 @psqsptpu]A+򴤚 軯29?Ok[boqta";LC %;1),F/DzƵ$쾫 /LB.=G=܌$C4ӬŴ ܢ(HM°̮ÞZkvom:*& 0:   Ԧ !ொ*JbFK\ppudJ@ ֽҙڸ !0Xts_-IGFA-;ɿѰԾƾ<]K<?.FC./2-ƻ,H:?SZPHBesnA̷ƾAH!YtqrY=/¶ңٴ  կ %&6:+'/;=⽱ȯJXI:KK0. (4/$ ,+. '78Basa^ntpsoL ǭ 'C5.&õ G9 *6RWBDVX[biJ гѽù!N_\o_SoqsdG@;: ˴ 2:IE* û/LTB>VM//"!:@- D0   !-6;:3) !%!&4$88EWS8:/и6#bfc^kW^aOJ- #$ & IH>8""")*.5-'$ .DB#  (/>;PY]lq_K>77( /=@A>82). 84'CJ8E?$>Zb\NGG9:=3.HJ. ,B]rrrteTQDKbjprrrrrV:)( -)(4NRL8- $%9#9C $/( ()+51^tqrqsqtmkI! \ts_  &C-DVQwi#$hsZ㷑̻! ݭ&5>@XK.պٶȮ!&#Ϣڽ6(#ǽ·ʭļ.) #DJǥC[L) $ ͣ :iiRG57/,* "$پ+I*$$6* % ."=KnJZ:޸+jhO "'7Nnmun[E (3((ZS$"AHo[,#77%* 381*)("! & %(5TpiN$((+$2%*WVJ/Ŀܹĥ $-U<=c\TYPSA+8/,%%տ-1(*!% 8NT>(;8#)9; ȴ 0<#&$ '..%1IM1ǽ͸ 3[]Z[0 # ѵ ,=6#-65"2C@72װ9LBDIFį$:>.Ǵ! .<)ˮδ!"ڼ5H/Ĺ*@@BSlc@%'8JVYT6 dz *R\ZZV<*(MhhcG"  ", (4+1275?TWB&ﯩ'_eNMLS?6;'ָ7G7 нѱ$1ܵ ɹ ƽ ̿ű &+.OOIW@"#ٱ ɮ $ "*<.1/;:+0,3GRgjhtd<'<< !)..NX\X_nqrd_TND' ,+&*18M8 /EG! ,:EDF#һ 4JWPX_HFFB2#  *( һ í&3;D9#+(*" 1 ܲѹй ֮ͨ*(5+" ##%&$ҹȼ  # źŝ)B^`\P:6,޶ þ " ɹ6R`]^_\s>  ¹'%  #% %6>HK9( ȭŻ,FD    ɯž!*$ ѧA?:)  ʻ /@I; ƿ"52 й´"+*% ֶ "*8[b`?1*!-8HO:>SVilTIOE=AJTgtpoUJ9ҿȸ2AKS_orqsqhZ_ibV? )9?J\O˫*( #*,,899>=EL+ !#58]s_U> $60  ##5/ -#) ǿ=W\YrhfrprqqXA=$ҳFeY[b\LB- µ ľ!'.JTRXbdgWG9ɪ72ȵƹþ̽"5Ö)C[TCE\PB7׼*" )'&B>53;:1!04- ':mqrrbmssa?24B-!Ǹ-=:7'''>C'6O<&,( )0.#%'(;IamlrjD  4ZZI+ӿ&UmqslD%+CLCE@YjT>=H5!)'3M]^XRXVRSHbrsrsaOKHI7)&6$ :m]>51/2$"$  $,9< %- ,/(# 3  " ' 5D?31%*'&,6 8EAWrkpr`2Ͷ)"" =QdjjndN%(0%³&6LXI:CDYi]JMN_k\Z]WJP*)1R\=BK (FVg[R* 9B207"$!Ļ ?UM@JC5( 9J6,5MY^jcH)˾ K\C69itmkeJ^H'!󽜏*(%IZ[rbXPE>31(&5^vb=/% FFGP5/."%"7MOroppW41)'/4) 8Xntp^WW?&,))02ELXM^sqtnTB:+'4$%,EF&!8G5;A:=.$%&>(!9) #'#иɹ $+#׷ ் Χݶ"5;3Lo[.Ż032>. ЧĻ5)0Q30-׬?, Ϳ ۵ (&¾ǻ׻'0.?%Իط /MWYA ¹ .6CXgU1 ׿  3#2:1";4"  6!/KKg\TpptpsopO1*BA( /IEKdY@(@1!-VmtlF.>ZSCJLkqV%%+-,* 5,'=IO/ױ#4#,.<(N; Ⱦླྀ (BE2>H*21!" #1,>H78ϼ!4J;R3&ƻ Ͽä/D/$̼֡覛EvnvFI:"̲ʾ%)CqqsnaSQ'$& !4#9YQJM:PtjgnR5'4;׸:C*5^G:=B ۵(+0<>Sb_`gP.," #DXdTe^־!".BJ\ ֱ±ջ.I8ӏ̺֢' & %! !'4QeF13/%ޖ'.)+;2AD4@PBǷ! A; ӻñ׬㻣 ½ а3*E^[(Ѿ (/%ȸऋ۩ 4)=M ƾſе :&-QbD2OP>i\5&1 FOFGkm^E-ToZa[KFJdMF"4*JVQ7)$":=^k\D4-4:." 0":bPVY0JsmК%63 媎˺ :,֫Ұ*!5.ػݿ& ؤ ڳŴ߾ܿǽ,. 1K4 Ϲ鿱ؑͿϷݥ1*. *A'ͷɵ5>첢鹴,FH$̿ƽ ;DH% $]g;BriMcqvW^votppRE)5?JI]uoqQ@61 )76()-2FJlpSVfprsjegG4HWU7JrohUPRVJPflR$%*@O6[ts[7&^7 +7C? ?RD',CP* $*"#$BesZ9-*#  ') .C9E7˯*A")4  $ %P: >.п ;7# 4Q/Ұ 24( ֿղ Kd-!!wR@  "0     <%6=3!'౮7IJFDF$ 4O3.B 4:)!  (OX.(Q)(0&0(FV%22)5B;BrD)ѩ &owG& "#- 4H1  # ("2ߡŀ %#)%' &,޵ 輵- ݪ' Ƴ·< G3$Ý 64#R0)8$$!߮ ڷ - C)䍾¸嶸$  ʽٷě鳍ĩѺ¹  յ!  7͒-1(*;K?/9 & 1fvB.. +>KRh:K %+8: "+rqn:\gK TX-FXX#*!!BFfP"-U% HH1'kI<%2#A 9@08  1 հJd-6 -ƼE ܭ ADL;( R2 *4.1 E*5# #&  7F)A0Ķ 寮86"    @`G!1  "#+ 00; !1% DZ 6:*  E8'.!5574  ( ;G%)#(( %+4- %/!*;1*WI7Q0#*'.'2*%.7E?""  '% ⻺թſ̱ٴȱᣫǾҷɸʸȥȣ⻼ɱ !(  Ұ#) !   +*% +-&.WhP; B6,5@KU@ $ 6I_POX6/;-4FL_N7EF>))MUSQihMVKMC.,@9)B*I<-F(+/;C?4!01"$-<-2-1IL\= .* ('24('?1)>;5<4BD4 '  &+4.  ¸ !ǻȵ Ƴ         '3"  %/+& %)    վ   6 & ++, "!&07!$( .9-1$ 'FV1"   ))E!).8.ANBWP9C4DHE710:D>+  !$EC3@H63@^P-L_fdFOG.&&<1+-.A72JB*(9084(6@"  ̿˺֦н·׿Ųᄃ˴̩˹̼ ! +$    ! '#+( ;"   )"-)  (&,   ';' %$($5++" "!   $9K71/+   )  $#$ ! *(53*&&.8 $&   #-(!&  *     #'#   7 ( ,$! &$&"--0,@IFAH(%7)-86;.(:;1X\TPB3 ! ('"8GJ4! "  $  " ؿ#  !׸ ,# &+   %#  6&<7 ##)/#$,85% &!  ,1% 4    !  "0'#3! , *$$4. % (,%$   '973@7E3 &3DF8<5>1!2$* !&+ <3  $ (,   ## $ , )  +)  )  $ Ź 6   m&-+ ܵ+ 5 '        # ##?K% #2     ׺(ܷ  9%5J#  +! ,   ' #*  ,+B/(?*#  &0  &    "  (# !&& 6 & +(25)J'6'$ #& Ƞ̤ſճ.斨 0ۺȯϙӾ#ھ  %/=&@p_ @P   $,  %4C6Z] - EB   î7 Ӡ$ ٿ(  #' ,  "   9# )  %$#"( /#-F0:1) +:/***-:9  /1$#(61'!%7,8@<8,73 !(-()21,?30))* ",7d'?/.    . ->   +- $  .$" %) &# ,++, 'S"#07 / 0 ,"')) ,$ / 61'((  *  %   Ÿ$#٩B%  $ $ ! -#  2  " C +ռ , ۲       ' & ! ' %     #     * &!  ")  ( &1 #'+   %%%'  "4(   5( ( " # !P1"    - !"%&  #4)   '   '      Ю'-丧p     (    & P> LAE&, 7B4aJ #lTͲF$>QC*:' 2(9B .# #          !'"$($  (-' ',#3'"%",2,$#(# - '+' !)/2+$)# #)(         $ / +   "'   5. )("%%(" '& $ 94   "  ,&+$) !   $*.($ +'#&"   οѷý˽ľȽ  .,         ! ! /'$&&+$  '.-'2),%#(&&10"+,(0+(29$"!%/-28! *'!(" ',&#+              ( !  !         &!              #%"$#"& % '" *    .+#" ""&#"" 5:0))  "&  % $ &(       !                   2ѵ ) C0    ,           6 NL ,  .! $                #  "(. &,$ &""1#* ."'$  ) ! 3   +              $  #  ')        /2 (      )$*#   %      #)$ $"&   61KXSS $$ "  %%$     (((     "#"/  $#&&$ -".('# :&$>A ( ++  )4     ֿ<5                           %  "  &                  &   "    %%        '  "  $                  !      1 *           "    ((                    * "  "         '    %! %  !        #                      *     *                                '       ) yoC-      -  !  2miҀ[ 7D%2 (,                            $3                                                               %           % ! #  4%    8&#  .   /"   !  !     #  ,1%              !5                                                                                                                                     (                                                                                        #   &%1%0                                        ' #          '           !&                                                                  %])                      Q(   A          :                .                                             *   9 !           1<:  .:(                                   /)     !       'F:          $           ׹P0    2"3     $ ; )%   8                                                                                                  3                                                                                                                    &)          ) 0"۽>     +               //       !                                                                                                                              !#!  &*'                '+)$  ",1.$                   "&'&# !$)+*" !&$      &(#        (/0-& (,'ÿ #                                          ##"                               $&$$#"       "$#        "&%                     !   "#     (-3541+"  %-254/&  $$         "%$   "$'('"                                 $%#          "##$%&'&"    !#"  !##$"         "(.132/*%         #&&&$#            !        !#$%%%$"      (/4640-)$                ")-02310,("                                      #'''#                                                                                                                                         #&'$$&&$!  !     &)$ )23/%%3<@;-  *22-#  #*-*$  &*)$!       $!              ! +0* '& !                $'&!  !%&$" %**)#                                                                       !#!       !%&%!       "#$#$$#"     %**&              !                                         #(&                                !.1+    #!   #*)   *21)   +34/(!     "          &.0*        ##                  !!                                        !                !                  !#"            ##     #$! !!                            !!                                                                                                                                                                                           % $         #!&%    !$# $(( #$                        !            "'!      %("      %#              " $%                             *3+ 6@3,8/  $( -0# #(  ) $ --+&/   #     "(               )&                     #%!      #                                                                                                                                                                                                                   !"$#!&('&"%')+)'*..,+-,(*,0/12-)+.../-)$(//'$&)*)'$&##%$# "%%##!!                                     !%%$& '&#$%)*#$+," '0/*%!(0+'&#$+* )& (,% !"    ý̼  !%%(!"*-.&$)-/-'&,10.,2/(/1/---*,*(,.++)$$*!&')'%" #                        !'%#$!! &(!!%)# %-+$# (&&/0.'!''*+16)%'46/-.*#+65---0341+)0531,,,.)-0,*%&(+*&+%#$#$))!           $"  "'!  & "#            &                %!!("&%" '+"!,". #*1%$)#      !  1.$)(( ,;3).+#''%)46,&!(12(%,+(/+%)*'%*''*.)$-($##%'         (%&! !" #*%)%%"!($$ ) #       "$# &  "       !!!" !&"-4& 1&-2$30&,-.''!02'! #-'+##   ˽ſķû              ' #$%-!'%-'!1'%-%&)01% =,"0,/(!3))-&0!!'*6*"#&(#-(+$        ,+)(%%,"#")"%-%&2' 0%%.#)&*%&! % !             '"(%!*1)*1+232.',?81:HC<84<@EHC0>93MC8A:+&$%.1,.-#($ !                % $$$#  "4 "#   ݿ̾Ϳʹп˿     #  !#!$$    " ˾Ծ  $# )#%6#/)2(.0-,+4356041,=4,2-53479>;0)4).% $$+). #/,%  Ѿ         !     " " (!  %   " $                            ' ## ).#+  ȶ̼ű¹øƻŹ "*,"()933+090=?624>=E>6@D?3@FAFELGGCBKHKC?MD?E@GCDC:=FJB>82;:7@9(6<.,31'* '&!                        '4" &"#092+-;625@K96EBF=DLD?CHIKGGGK;GOIKJGIJC=>;CJ<7HH,==282054/,,&*,++* ))                                     #"!'$&)*+3-!&,+023($.6/'3)#(+/04*"))%'!""#%  ĵĽ¶Ƚ¾  $$&%%&+4491038?61CJ=3+/BG=41822;,+.,1/''%#(!          !#                           #$!  %!123200-+&-0+0..00-//-05139(-:;1%*())$#") ¹ýǰõĵɽ # !!#/,!,-1477A<.;AALB>LMHQ[JKV\\VWPTTX[\\dcYWYfb^VVcYXgh\]ia\`X]UPW^e[L9GVLMLMHG??OMC9AJB>EC87??:0-2/7424.-14&&-.&).)  !%         #($     #$4#'/+13:7E?*--&  ÿƽ»ŲžĿȽļ          !!%#!$'++-/.4452475877<:9=?C;:9;EEA=>>>>?@?@>@@?>??>=><=<<;;;::99876665433210/.--,+)('%$#"!    !##%%%&'()))**,,.-/.0///0111020112211111211/00///..-,+,*)()''&$#$"!   !#%'(*,-.134678:;=??ABCCEGGIIJKLMMNNNOOPQQQQQRQRSSSRQPQPPPPPNNNNMLKJIIGFEECB@?><<99754310.-+)(%%#!    ! !! !!"!!     !!"$$$$&''())()*++++,,,,,,,,+,,,,++++)*)*(((''&&%$#$!""     rrribVMD=;9:9899;>BAFDECA=:8542221.+-*,,*,)'$! ȿ̽̾ȹֲ⫽گѷ§ʚͪ٦ڷ̰ ׵;8(" *9'% F\ X9Y*`3G82Q6_2g Gol^" 7>)g:T44` lV-I.L1 *Jkc)q:jr*%Y Z1Qr rr1rbqr rqr9 rqlO5o RcEa;]?1EXrrrr2^@qroiTFr&6^Aq"X4n0 =a]-8Q6( ZX'qj r/rV qkNrZF['5 9Qq7o\Up4Y 9ql qqj@:-9 bX K>:q[ndj^rA9 !r˶=rqҎrߢMrO?+? Sd\ 2qbbB"Bȿ0,;VˏJ 6͵Ӓ َ܏ݏ5׏ʎюߑũ$Wێ Ŕ罵 52ÎAYϨ>Ɏ&LѬH31鿳OI. "=C&SFѽVRNqPb!YR^&A@2L Rŏ0:Pa1lCJ)qq q*dEbqrr m2e ;IORY!9_UFa r:"EN0qn ! 1 [$/9ZrqJ DXE"H RG9=$`=&< ?W  /'.7:ӿ1<0 0: »   ڳ;ڻ9ߞ׼ˣ' 8 걲Z9ɼ! -5àS $) %,r7 0R0; bH:5F@.) #UC$ /& N &.W /(jE"њ" (7=٫&8 *aeٖHK!*^"%" ,)Ǝ"Ѵ*& $ܢ ێTɧ/ǿRΚ0A;r9J'ڮ4 ۏ2Ѭ%(+[r%η3 @:%e "Bݾo7'K'/p0E Z!G, !!*qUhqrQ5 EJ8 b:EWbr?9"37. $rr lrW9r<%M&QF(%gEh^Vq$m \qoT m9ZaFqKmr9N=ZkrBUB@TBE$[ qޢr_9"P B`r /T)RJ­4޲J <JL*GJ&܏!b ڙ1gڲ!ȶ* WrڎBM/? ("I ^VB#6rc,- ! ^j5SCmJ=J=5) Ujq:g&TQl*q\kqqSBD3qGUP2$M= YArn^qH r#rQrMXr/<5rq q@ArQi\q'rqrq*rj$6q)qrr q$)!Tg9q'rq(r@;"^*Q_jPZ r,:$a3`DqrOE,;Y0M")J:6EY./SM CST,:Q)>ё@!2g܏c˱* @r"ɏpKَ3 kq"7J0.-Ў :֢!Ǩ]ߣ +R5! \7 Y7 / > (mY! 1qb %AqB 2A"*,C#33I#"1GUi'Y6LR;D.6+.27+/ԏ^r6 #,J780DE F + / 2/Z;8!  Y$B!) &8` * Z R( ! ȢE:():"ǝV(Z" !=S2- E (A6J; A0 3b*6.#S_: # 47$=:&j0!" [r0 T/  7%=:3 ,)IH- !Q!X %%D “k'Z $82.+m=3 ]-)q-7* RB % (+C V"MK1B:,9ܪOB,++D! !F5#!* -!!˳q Qf=V +!>rO"HC7Q</2%45R 2*& -BTP1 R&Z-*Z%Al@B3%I5CJFS 3?Գ,='Z r-S ۰8]"B%4'$ՎHSْ B+ !ڜC/=5)D4-1oNÎ>(m*& @̯j Jȹ3gBC *V6Af7%iG 9$'=f7"4Q0 &*J U"6\ ;C X9L @.) 5Y> BF?>;!  L 0*% 3UK91 $., "#J.hfI\P\q I4`$"d 'III 9F!A0\r!)>"5!+ ' %=,4 ; 3, R%A7 E#'5+%)!- HO i &/E֬&ܫԼ)" "'@Ÿ' 58r·5M 'g )!% 1Ť>2ĸA ޏ7  ޲ƹ.²ޞ>% ǽ,˻ ׿ͯ ;ҏ",25ȲGھͩ  q . A  ?. ^",:6#  GF W+"!) ;8=>I&6ABU--'I  2 1ZCF) E-<-B[ /#.%1Z /0 !T!V 8$#629!":\)"1W"\!1 FW3&"H=10(P mVNT**E-!<'B^9_.V4@ :re*SGr#Ni*e,*`SCa5Ig ]3*bCV'qlR13)": /%)Q59R* PeQQH+C 94#R-Qγ"5Q:q+023'͎٨ ώʹة4˾۱ǻӬ멏$?檎>׳ ʯ Pk)7D  ("Iϵ#Y׺ /);1ܴ??U/_.Mp;r>P45ۨ3jeZq޲rRrG[J;:meqlr20S3$BH5mW0@r*p1+1/b Lq r>0*ri 291T@ r3P)!i" qG= %4=Q: Iq)2>q&BQ\G%"/Lq\B] ;+B9!9.r٥qBcSr1r^i1JB:2& ,gAW@&> <^6Jqr BX  Dr*9 -IK$F #Q#^Gcǎ#<1 Fkh9F9)Σۼo2:-.ܪ긏 ؼѠ Îԟ呏Ѫٯ™ĸ%׎ꎏݔʢ/d#21Ԡ'!/ͩ$$ L X;2 ">- XYRl_&=BS 9lB2#[R% 2 8 2)OJr׽Fk:r(I<.I T`"Xe:8*-[ r+E4jnq34jN!(Kr2rYAAr@r(qnrg$Urq9r!,n6B)NLGm=R."/dJ^f7; G+9`!rJ$JUR6P [br> ao q]:!g<=!j'J)rJ3RN JCo7V3-"38)˼ L^ #q<  0Oѫ?޺H.S!Ǽέ8̎ ӕ˱ʸˬ R ,)1< 뎦:格 =!Ýݷ22ʵ鶢3ӿ%" ˹$1+ Z  #: P$&B0"%H.#  T&֨I,$$J@*  :$4 & XB+!'+"$/%<#2,F%$ߏ< !ϰA #'- \V "E  #$26.EM?($;[#"r /B4N<112E= 0I::B+B=-SM-r:! )!< RB *) +,B-,+G rq'Tq+B I >]+*AI#!@9) )6'p%"%, ڹܶ M´2 Џ!@ò!K <"G7 =U%#0FH,&R()" '"/  +9$ ' ݵ ;ʹĭͱʷˏΎ֎Ӫѽߎ͒혚ɏҎ򹙰йDZ ¨"Ȥ뱲,߹R1#1*  7O:"0,,4JB 0TZ_/E&4& $+A;:kqA  8'8(8;32:P5*L&4^E+lAVa%;KC)"J6Xa+arJGrH;Jr>)qgJD]/@fi/!nc eA'-*c- *ErE0. ܟ&·.ʬ٧غ    '"   )$8($+!O 4# %>' &*! &!"L,֣ @  %!*ޭ0. 3'rTο? L4$,)9'#K B6-B#0* $$<#8.!H 0մ)2 "$95FFE>91RP1"LHP AC%P ;+D E*O=؏I% :e::5!i0 Z[=T02' ISJ4$^7A,!H99#C?:i= % ,#-?*5 #"0"$ +EA A' Q> J;? 40&/* +!$4! I_ -" $ K&G"6:9P3 0;""@ <,4$/ A - $J">G= 2 ,";+1%'  %  ! : "޿ 躒 隺٫ϴ׿'Ϳ   ث$ (   55'*., ?0   J#  ˶δܽྺͰɮе̮ȳݎƾл͏ȪƹڛةкѪӨ쭏ӱ̾⭺ɳɜ춭í骭ړʺߺ ռ  '#  H ) 3 3 !"= 5*.B/ *"O  '*)/!,1<3 " @(# #) !01;)J(O?<&!5 90_  XF 1 4"P4.26*" 1W<)5Q/  ."1 &$+ )< &1"5;,0+)'6S&/! #  %OM#(&R* *,3!'! #'#27-.>"%,1,@A-?/)BJ=JAI+D1#6"A+JR,&;P.)Z7 RY@,\?:R@H*9JGI^#5qW#.>>lr?*=<]T:1YM+>p\7!%Wr=??:BBIDC;,$QW6 3G71IT :E.G2J#DDr5 22*+0=#(VOA9*,089"1Y.=E-4O3!=A9K3-8:! @# 9>M %97*),/), 8S :&:0 %>   1!     "B -%  &   "  #!*-) !#%20 2#$+$ = 63C6>/"  1U% /B%2)**):,V"($ ݽҤ첰ױê۷׹Ǫ̻Ի ̙  ӧĿ϶ӷ ԴٵзԞ㨶갯̳νѴ۾ʜƼ٣ϽҹŴ " *   ,!  2" 6!)'4E  (   8. I%")/ ,&: $3# %;,9J$#/&M LE!7,!?4 )M0) -=9Jr *$6"(*7 522D5%+ :=#(-R)]4&C %# 7;)?';842 1/ @'!<$%%$  < .,! 7 "  & ##% /&7%(3( 'J0 1.- &%#)3!!#0($k! +" ,  . "*>) ! )     )6 !!  '    ѫ    ޿ ##סи! '4     !#2  ҷӿǞӹ Թٹ٩(¸:' .8(   %&00 "  " ɢ2     # 9+:.&-+" /12$. 9*+!(! 5"01 &"2;# &"  %  ! &⳪$ 2. ) # ()** $ ! ' ' #7C!     5     ' -3 &  &* ! %/ #3'',''G $ ") '*:$" ,E! 2&"! !(#B* "'8:3)*%5 (@  +)!<+)&2)!) &3 (! "0 ! !)% $*-  #          ۴ɪ ǭ      %   * " $'$*$20.";'!""! 0 %' 2-"&) )*#&* 1>+N +@) ?- ) .% " A@:  ) ! " " ) **'! @'$!*:!,8  $'.% ' $0- &'0 5&*" 4 * ,A!"$-      *    )   '    *"  "6 #!'8* )3  "  !'$1* "  " +! /$  $(14" 01 =/6 !Q/ "$*(*!#(6)I6':?.)*1 89(2*2 2@'[' +)!/*%""$"/&)4 2% .! 1)2 ) 2  ٺռɿ˺渹˪ỳ˽ٷ꙱ϵٹֶβҷҼ   ""          & - ! ,   "!$"  3 1"+7" (% ("# # !7' ,  /)  $ * %! ' ""3 !#  ! '$( )  :3.4 #)+?5+I32( =9 *( $3,+&&6 *)*!!"/)<#)A? 3)BE !??"6; 6*&7*"9N-8B6+/(205@:'+-007&@^-4)HUB"2XO&(+'=T$ 1J6B<'(@0*=:*(  0OJ,!#$"*04/.* 02) ""  $=.+"2   ' )  *!  2    # !                    )  #  /6  , !! ,&" !2 ,1"3%,4 -;<"* A< !! %2!>9!,1' )*%.6&YJ /A738"$<9%0'6J/ ,-=R97J6*CJ8 ./),):S:$)%(&91 3?!A<9, *10 !0 !'"187! 0"&**#$ $ , !01&3 ' "#  "&  %  $ '2/    "  !  "          % "3   (#    !    %!! > :6 +! "    ,  $*;+! ! 2. '$-7'% #   *   9- *+ -/1&*0' $3" "- .+! 7A+>3CR -" 28!);/"2'1,/ ,%01 74-)))) *8! 421 ..'*46%42$G3  +5 2:"2?"!# )-*( ":'&71**$ *?1-73< %'3!(2' "&&")& $*  (  0)  !            &          !          "   %$ &#!)"%1*"%/*$0# -B'")*) '-)-'25( +) ,)"%!)*& /$  !!/ #  !!%&  %  ')       $!  & (  (               $  "#)"## -/ "(3+"&# ")9*%-42 ++," !$ ""           ڼ             ')%  *,+! !!$   '               #        !   "$   $ ! )*9 ! # " 1?# *2 #"**!&("#!#-,!#,)! &( 5$ -3 #  "       #   $  *                                !"                                                             &   8                           %                  !        * "  !               !           -   #  "                                                                $                                   !&   &(  / %*!"!""(( !'+#'$$.-*"""(-"6."%) ! !# # ("    "     $ *(   #    " ! %, '" #*" !"-# (+-$  %+" #(( ) #  !"&  "    $ %$  %  ( ! -&       $"                                                               !    )$                                                               "                                                                                                                                                                                                               !          #  " #          #    "                       #"  " #                                                                                                                                                                                                                                                                                                                                                                                    &. =75<bc(PKѶm_4Aȭ2=                                             (                '+ 099)- !/->@Q1O3       %                    !  "'=  #                                 &8B 7@-^) +^H&95>-                                $4                                                          %                                              `0z2ٱ3Eӻ0               ! 1 %$$% !    1*5-+!            &     5@¬ )C*90 '+ ;ܩ X?9>2)L?T1(=4!+ ! ("* &,+̾93' &HRت.H #   ee$ -2!@$ 8-9? 1' + %( 0 "! %  D:(  ! '+.  ,7 5A  *5+ײ<_ͪ;3DH)a4 $L4vpV´ .7L'*ƽ8[@)$#0 ((!,  (    '%LK#"+ ,   #   1 $'        $&                                                                       3X5.$    9KԜIE0 53"' $ F#2,0. /-*")"$#!  " "                                        ?  " +:$ 08 v<%V!6R@.    * "    " ! A)  ' /%#/ !+    J  :1=& A  .: **Խ1% &' )_DƸ*(,9 @'# (. **> % %B)"*.(+D& =ط6;1)O9>I3# )@; !    $                                        !)18?EKPUZ]`bdeeedb_\XSNIC<5.&ƿ %,4;AGLQVZ]_abcbb`^[WSNIC=6/( ý !(06=CHMRVY\^_``_^\ZVSNID>81*" %,29?DJNRVX[\]]]\ZXURNID>82+$ſ !(/5;AFJNRUWYZ[[ZYWTQMID?93-& þ$+17=BGKNRTVWXXXWUSPLHD?:4.'! ½ !'-39>CGKNQSTUVUUSQOLHD?:5/)" $*05:?CGKMPQRSSRQPMJGC?:50*$   &,17;@DGJLNPPQPONLIFC?:50+% ÿ #(.38<@DGIKMNNNMLJHEB>:51+&  ÿ %*/49=@CFHJKKKKJHFDA>:51,'! ¿ "',159=@BEFHIIIHGEC@=951,'" ¿$)-269@BCCDCBA?=;841,(# "'+/269;=?@AAA@?><9740,($  #(,/258:<=>>>>=<:863/,($    $(,/2579:;<<<;:8742/+($   !%),/14678999987531.+'$   "&),.134567766531/-*'$   #&)+.01234443310.,)&#    #&(*,./112110/.,*(%#   #%')+-..///.-,+)'$"   "$'(*+,,,,,+*)'%#!  "$%'())**))('&$"   !"$%&'''''&%$"!   !"#$$%%$$#"!   !""""!!                   !,5?GOU[_cdeec`\WPIA7.#Ļ%/8AIPV[^abcb_\WRKC;2( (2;CJQVZ]_``^[WSMF>5,"ǿ",5=DKQVY\]]]ZWSNH@80' Ž&/7?FLQUXZ[[YWSNIB;3*!ü  )19@GLQTWXXWVSOJD=6.% »#+3;AGLPSUVUTROJE?81)  &.5BFIJKKJHFB>82,% Ŀ '.49>BEGHIHGEB>94.'  Ŀ ")/49=ACEFFEDA>:5/)# $*059=@BCDCB@=:51+%  %+059<>@AA@?<961,'!   &,048;=>>>=;962-(#  "',0479;<<;:852.)$  #(,03689998741.*%  #(,/246676531.*&!  $(+.12444320-*&"  $'*-/11210.,*&#  $'),-.//.-+)&#   #&(*+,,,+*(%"  "%'()**)('$"  !#%&'''&%#!   "#$%%$#"    !"""!                   !,5?GOU[_cdeec`\WPIA7.#Ļ%/8AIPV[^abcb_\WRKC;2( (2;CJQVZ]_``^[WSMF>5,"ǿ",5=DKQVY\]]]ZWSNG@80' Ž&/7?FLQUXZ[[YWSNIB;3*!ü  )19@GLQTWXXXVSOJD=6.% »#+3;AGLPSUVUTROJE?81)  &.5BFIJKKJHFB>82,% Ŀ '.49>BEGHIHGEB>94.'  Ŀ ")/49=ACEFFEDA>:5/)# $*059=@BCDCB@=:51+%  %+059<>@AA@?<961,'!   &,048;=>>>=;962-(#  "',0479;<<;:852.)$  #(,03689998741.*%  #(,/246776531.*&!  $(+.12444320-*&"  $'*-/11210.,*&#  $'),-.//.-+)&#   #&(*+,,,+*(%"  "%'()**)('$"  !#%&'''&%#!   "#$%%$#"    !"""!                  &0:CKRX]adeedb^YSME<3)ȿ  *4=ELSX]`bcba^ZUNG?6-#Ž$-6?GMSX\^``_]ZUPIB:1'û '09AHNSX[]]]\YUPKD<4+" !*3;BINSWY[[ZXUQLF?7/& ǿ$-5=CINRUWXXWTQLGA:2*!ž '/7>DJNRTUVUSPMHB<5-$ Ľ!*19?EIMPRSSRPLHC=70(ý $,3:@EILOPQPNLHD?92+# ½'.5;@EHKMNNMKHD?:4-&  !)/6;@DGJKKKIGD@;5/(!  #*16;@CFHIIHFC@<71+$ %,27;?BDFFFEB@<72,& ¿  '-27;>ACCDCA?<83.(" "(.27:=?AAA@>;84/*$  #).269<=>>><:74/+%   $*.258:;<<;9730+'!  %*.14789997630,'#  !&*.135677642/,($ "&*-02344431.,($   "&),.01211/-+($!  "%(+-.///.,*'$!  !$')+,,,,+)'$!  !$&()**))'&#!   "$&''''&$"   !#$$%$$#!  !""""!                              ̸پɻ      @(7WF,@kU )'&2,   #/"!=>19C<.)# !5C=ʺƬ %%  Ͷķ+2>PT@5CXX<)018CPfx{iQA0 *-1AMC%%=LTW`]M>2(Թ $%# ʹ    "  5AJJ;8BLSVVSXgomiq}ufbhmrfTMPY_\WE01AEJW^\VG3&!#)4?=:644/%"#   $! !"!  "%&   (+++,./-(&!       "&*)')-/110.+*+*$       !#$$$       "$&(**'%#   ! !                   2/(!!R5T!(!%--/\7i( (r(F7Ғr !D:%(2iM R(^K!F /Df+>ܻcpȞ>W^!!\ A:/+ײ!r:r++!Z㐞W#H> ( F-%2K:rF>A$rƐr Fkr$:F>ꐐ:K%<\: >$HrKR%Էc :(^R< a7$A5Ɣ5MF^rP# KԗÐKD2%Z! F-r7Rm:5ٷH ƻ\TA -Z- ^Tr-pTAkRr WPrDPM7/\ KK%(DD5r7 %(cͥr %F:rپ(Hrr(rrWR!7!K%PT+D!H%Z +iR$:%r!ߐ5T7\K! +T%2#-rc/K-r A!-(7 +T!Mi% !P>k!r$+<K %(rr/rfK^rZ!DD M>Բ!R7rZRPFR<׭A%AZr7!r%+Բ<:R(P+P/K7F$a!iȴ:m7+$Z7D < k %7H2/%rr(!H-r\5TA+ 谛P!rfZ!W(^(r5rАM DrèR5\rF͐$ F $RZ$$<a+^r k/jrcDAMWrޥr ^r#(a%ƥ$$ Hr!ސr5 r2 - T2 ii($KZ2p! Tߺa K$R5÷D%5㗗rD 2aʐWmj:r!5W! ٺ7KT7 7(- rFÐW^ȐE<rr\rfM$ܐ-<:ңԐ+!M-:!>%a -%-/> $2//Һrr(!M /+rK#rDאD2(\^P7 mET (+ 5+Zr/r2RÒrH$ (+ !(>r% 2\mH%7:+K/<::R2W:f7(r-ܙ+FT +$WHZK޴ir-K7<%^$r(D+!P-m-r-5m++7з %T :/ m2+-!5AK$rHr/ rF -r!F/::R<+r׾2K+r-Ki+$R%^ ^rr+ҰZ2r7aj!-TD2#+2PF mZH:-iW f!( M !͗+i<Ҕ(WȺ-c$5< m7Z5TP++Wr H %ʗ !$%+KK(<2r<M2>!+DW/ސMK$fr( T/$K$7!P+-/(5л F(2 :r!5Pr2\MMr^:׭AR^ܥ<% P!K5r2mc>MKTriMZR7H%!:>F:%K 77!<-͐%cץ r2::<-A җM5ra#Wrr^rƥ+-/-riКrW:rHrRP K% HrM 2ia!p+> !2>r퐞D H#%+D!D-\ AҾr>rf \%r (   /i7!(^:K!(7+rA 52!$%>r/ rD$:$ 7F^+KRr$< /rDF+5ܐ:r%r!2(/ޞ2(Ⱥc fr$+ +HD!rr/rƴ^+E$$:A%m/ِ+-%/r%ސ!:M% />r# F/((# %! /r>2 K rFrr%%r١!(c7-2aH!Ðrrrr  rr2r:\<Wrrސ!Z<>$Da-(rr r:mH<5ͷmAA mM(rrp-c:7 /! 227\áK2ff(rr%ߣPArKr(ץr\:iƐ2:5 <F$2P(M-ܺ-%DA-D> 5 <>+ck-RD:<ʪ(k5P>!ƲT-K-:%-^ $AHif7A:A$7(ܐr W(r+jr:-%࡙ZK -$ (rK$Frr-%(rT7#ٷ-r> M$ꪥ%Kʺ+T $2%5M<r5 >AȲ R+KMZA :ޣH$pK:/PԪ(5DH/D:ZW  rmTR7Dk!rPrrܡ+2-5ʲH/+r HiDD% rr:DmِcP<7$cW/>+FrȐT+5F5M!>Ȳr%ܐ2R(% Z !5FRfp>ͷH#%M+H##ArR#A+!^>K: %7$-7R-jܣ^DP-%krWTP͡ar>R(KM +T-#fFiATA<Df%(^ Dл7\(/ a % r5F5 <p>\蛔Hfcr \r-!rr7 2/rcrِ- !k(+!r (!2W>ʥ7a5K$K2Ar(Ʒ%mW/TPאrR\\rr:r+ P %2rR5+m\+ HW! R<5òrK ArAk$+ҺD7У>:A!PR%HHr(! r-Faܡٛ DH75rқrH+5PTސ /K(!<R7Tc#DFP/cWr($(/<+/c5/(jm!iD5 >7iP/+<ȺF -5(:iԐK2͐/rZ%c% Kmk:$ WMr +Pr!cr%א5蛣E!<5 K+rr 2(-/rD$Z$5r5 Tc(\!DiޒW27D\Mԡ%:+fA(((5M#/( cʲ^T+(H7jK rߨ(rmHrri>D(P-R Trޣ!(frא5 r$ a5(HrrԞ7:rA:RfRê!5A5  RmrARȐ >A+%P >a R< +5Z2r2 %TٙWk <MrrHr/%#cpRDrr($Hʐ$rrԛ- :%PKaZ+ƐMaR2kKW/<^ c>(^5:%!raPPr2Z ::rMD<+\Wr-AA25㐐ik5AF 5%m(rar:%r+ :c>< %+rԐ<:r-! r/(^+5MT-Arꗨ/!5(PaDA$7DkF%/ rrҭ<Ҵf^-c<7KH2-5r:rri!%:#FTW/T <+mcWmԷ+%5A p(2A!fHHF㐨2r Pr%WZ$r/ARkR5Dԡ57HٻûA:H r-K^mapW:2Fr/%ȥH:rc:R^$7Wc& %5:!7:M rp桛^ 7/r<ٙ(!ިTH+EMސ^%/ <(-rrf%rFPPc^227 \D2M>%+:A!ZR//<\5/ P!!D+%r!$TʐTM 5a(rԗ r\ rcא+ %r r;!->+c> <$A^c--25rrEP<^R$-/AA--Ɛ7-cA͐$r5\2Z/r-r7ઞ\R+-$r:P57Zк-HH#f<7+ !rͺͲW5r:MPrr!\!R#$H>rr޴>>2rKʐ >R\RFr%-(+ % f!$R2i5H D5T%:F75r%/ /rM iar-\ (!!rlierolibre-0.5/data/LIERO.TXT000066400000000000000000000640271205125547100157050ustar00rootroot00000000000000 LIERO Freeware v1.33 Copyright (C) MetsnElimet 1998,1999 Aitoon fysiikan mallinnukseen perustuva lierosimulaatiopeli. English documentation is available now!! ----------------------------------------------------------------------------- YLEIST Liero on freeware, mik tarkoittaa ett sen kytst ei tarvitse maksaa mitn eik kytt ole rajoitettu mitenkn. Lieroa saa kopioida kelle tahansa ja miten tahansa SISLT MITENKN MUUTTAMATTA. Todettakoon tss ett Lieron lhdekoodi ei ole vapaassa (sen enenp kuin kaupallisessakaan) jakelussa. Joten jos ajattelit ett... niin jt ajatukset sikseen. Liero on kahden pelattava aseellinen matosimulaatiopeli. Pelin pmrn on epilemtt se mit luuletkin. Liero sopii erinomaisen hyvin aggressioiden purkuun ja kaverin rokittmiseen kyttmtt lainkaan fyysist vkivaltaa tai muuten vaan hauskanpitoon. ----------------------------------------------------------------------------- LAITTEISTOVAATIMUKSET Minimi: 386SX VGA-nytnohjain + nytt 560kt vapaata perusmuistia Suositeltava: 486 tai parempi VGA-nytnohjain + nytt 560kt vapaata perusmuistia Sound Blaster-yhteensopiva nikortti 760kt vapaata XMS-muistia nille ----------------------------------------------------------------------------- LIERON KYTTNOTTO Asentaaksesi Lieron, pura paketti LIERO???.ZIP omaan hakemistoon. Sehn on tietysti jo tehty kun luet tt... Jos purat vanhemman version plle, kannattaa poistaa vanha LIERO.DAT, johon asetukset on tallennettu. Se ei vlttmtt ole yhteensopiva uuden version kanssa. Tss lista tiedostoista joiden pitisi lyty asennuksen jlkeen: LIERO.EXE Itse peli LEVEDIT.EXE Kentnteko-ohjelma LIERO.CHR Grafiikat LIERO.SND net NAMES.DAT Nimilista LIERO.TXT Tm tiedosto LIEROENG.TXT Sama englanniksi FILE_ID.DIZ Kuvaus purkkeja varten Lisksi luodaan seuraavanlaisia tiedostoja, kun peli on pelattu: LIERO.DAT Pelin asetukset *.DAT Mys asetukset, itse tallennetut LIERO.OPT Kynnistettess ladattavat asetukset Tiedostoon LIERO.OPT tallennetaan aina pelist poistuttaessa kytetyn .DAT tiedoston nimi ilman .DAT-ptett, joka siis ladataan mys seuraavalla kerralla. Jos LIERO.OPT puuttuu tai se on tyhj, ladataan asetukset tiedostosta LIERO.DAT. Jos sekin puuttuu, kytetn oletusasetuksia. Kynnistksesi pelin, siirry hakemistoon joka sislt Lieron tiedostot. Kirjoita LIERO. Pern voit kirjoittaa lisksi: + Nopeuttaa peli (suositellaan hitaille koneille) /Sn Frameskip, miss n on numero vlilt 1..5. Mit suurempi luku, sit nopeampi peli on /1Matti Asettaa pelaaja 1:n nimeksi Matti /2Maija Asettaa pelaaja 2:n nimeksi Maija /M Kartta pois /Bxx Veren mr xx prosenttia normaalista /Lnimi Kytettvn kentn nimi ilman .LEV ptett /Txx Latausajat xx prosenttia alkuperisest /N net pois. /R1 Pelaaja 1 on CPU-liero /R2 Pelaaja 2 " " " /Onimi Lataa asetukset tiedostosta nimi.dat Esimerkiksi nin: liero /s2 /n /lliero /oihanoma Esimerkki asettaa frameskip-arvoksi 2, ottaa net pois plt, kytt kentt LIERO.LEV ja asetuksia IHANOMA.DAT. Tiedosto NAMES.DAT sislt joukon nimi, joista valitaan aina joku satunnaisesti jollei madolle ole erikseen annettu nime, tai nimeksi on annettu tyhj. ----------------------------------------------------------------------------- LIERON POISTAMINEN Jos joskus haluat poistaa Lieron tietokoneeltasi, sinun vain tytyy poistaa hakemisto joka sislt Lieron tiedostot. Varmista, ett hakemistossa ei ole mitn trkeit tiedostoja jotka eivt liity Lieron toimintaan. ----------------------------------------------------------------------------- KUINKA PELATA Muista lukea mys VINKKEJ ja PELITYYPIT. Aseet Ennen peli lierot tytyy varustaa haluamillaan aseilla. Aseita on kaikkiaan 40 kappaletta ja niist voi ottaa viisi mukaan. Kun olet valinnut aseesi, valitse ampumisnapilla "DONE!". Jos haluat tysin satunnaiset aseet, npyt fire Randomizen kohdalla. Aseiden saatavuuden voi st mieleisekseen alkuvalikon OPTIONS/WEAPON OPTIONS kohdasta. Valittavana on kolme vaihtoehtoa: - Menu: aseen voi valita suoraan pelin alussa - Bonuses: lytyy vain bonuksista - Banned: ei kytss ollenkaan Nppimet Toiminto Pelaaja 1 Pelaaja 2 Ohjattavat aseet Vasemmalle D Vasen nuoli Knn vastapivn Oikealle G Oikea nuoli Knn mytpivn Thtin yls R nuoli Yls Nopeuttaa vauhtia Thtin alas F nuoli Alas - Ampuminen vasen Ctrl oikea Ctrl - Aseen vaihto vasen Shift oikea Alt - Hyppy vasen Alt oikea Shift - Nm ovat oletusarvot, omat nppimet voi valita Player Optionsista. Kun pidt aseenvaihtonapin pohjassa voit vaihtaa asetta vasen- ja oikea-nppimill. Ninjakysi heitetn painamalla vaihto+hyppy. Kun pidt vaihto- nppimen pohjassa voit st kyden pituutta yls- ja alas- nppimill. Mato pst kydest irti kun painat hyppy. Kaivaminen tapahtuu pitmll esim. vasen pohjassa ja painelemalla oikeaa. Tllin liero kaivaa vasemmalle thtimen suuntaan. Jos haluat kaivaa oikealle, pid tietenkin oikea pohjassa ja painele vasenta. Nppin F12 tallentaa kuvakaappauksen 320x200-kokoiseksi 256-vriseksi PCX-tiedostoksi nimell "SCREENx.PCX", jossa x:n tilalla on numero(ita). Pakkausalgoritmia ei ole optimoitu hiukkaakaan, joten se on yllttvn hidas jopa 486-koneilla. Muuta Kentlle ilmestyy pelin aikana kahdenlaista tavaraa: - puulaatikoita, joista saa aseen kytss olevan tilalle - lkepakkauksia, jotka lisvt energiaa 10-50% maksimista Laatikot voivat rjht mys silmille, jos on huono tuuri. ----------------------------------------------------------------------------- PELITYYPIT Kill'em All Tmn pelityypin tarkoitus on varmaankin kaikille selv: tapa tai tule tapetuksi... Game of Tag Aluksi kumpikaan ei ole hippa, vaan se joka kuolee ensiksi j hipaksi. Kummallakin pelaajalla nkyy tappojen ja elmien lisksi hippana oltu aika. Se pelaaja jonka aika rullaa, on hippana. Aina kun kuolee, joutuu hipaksi, joten tytyy yritt pysy elvn... Kun aika on vihre, olet voitolla (ollut vhemmn hippana); kun se on punainen, olet hvill. Peli loppuu kun toisen laskuri saavuttaa TIME TO LOSE-rajan. Capture the Flag Peli kulkee seuraavanlaisesti: Se joka tappaa ensimmisen toisen, saa aloittaa lipunkerjn. Hn yritt kaapata toisen madon lippuja ja vied ne omalle "kotipeslleen", joka lojuu jossain pin kentt. Se on sellainen oman madon vrinen mkki. Jos toinen onnistuu tappamaan kerjn, saa tappaja oikeuden kaapata lippuja. Jos mato raahaa lippua silloin kun sattuu kuolemaan, lippu tipahtaa siihen. Peli jatkuu kunnes toinen on saanut kertyksi lippuja FLAGS TO WIN-mrn. Simple CtF Yksinkertainen peli-idea: Yrit kaapata toisen lippuja ja est toista viemst omiasi! Liput pit vied omaan mkkiin. Toisin kuin edellisess, tss moodissa kumpikin saa kert lippuja yht aikaa. Peli jatkuu kunnes toinen on saanut kertyksi lippuja FLAGS TO WIN-mrn. ----------------------------------------------------------------------------- VINKKEJ Kannattaa opetella kaivamaan ja kyttmn kytt hyvin, niist on paljon hyty! Esim. jos jt jumiin, pset kki pois kaivamalla. Kydell on erittin ktev lhte karkuun ja muutenkin siirty paikasta toiseen. Huomaa, ett kysi tarraa mys matoon kiinni! (Hinaa toinen kydell lhemms ja ota vaikkapa minigun, se ei psekn karkuun...) Aseista: Kun kytt pomppivia aseita (Zimm, Bouncy mine, Bouncy larpa) kannattaa liikkua ampumisen jlkeen. Ne kun tahtoo palata sinne mist lhtivtkin. Jos haluat aivan satunnaiset aseet edes nkemtt mit saat, paina ampumisnappi pohjaan Randomizen kohdalla ja pid se pohjassa. Sitten vain painat yls. Pelin tempoa voi muuttaa latausaikoja stmll, esim. 20% tekee pelist jo aika hullua riehumista. Voit tietysti laittaa LOAD+CHANGE-kohdan ON-asentoon OPTIONS-valikosta, jolloin asetta voi vaihtaa latauksenkin aikana. Jos haluat hienost thtyst, esimerkiksi saada Missilen tai Riflen ammuksen menevn tsmlleen jotain tunnelia pitkin, thtinhn liikkuu liian nopeasti. Paina yls- ja alas-nppimet yhtaikaa pohjaan siten, ett siihen suuntaan johon halutaan st, painetaan _hiukan_ ennemmin kuin toinen. Kokeile niin huomaat jujun. Kannattaa tallentaa hyvksi havaittuja asetuksia eri tiedostoihin, ne saa sitten takaisin kun vain haluaa. ----------------------------------------------------------------------------- VASTAUKSIA KYSYMYKSIIN Kun yritn kynnist pelin, tulee ruutuun teksti "Runtime error 203 at 0000:xxxx". Miss vika? Tmn virheilmoituksen ei en pitisi esiinty. Mutta syyn on ett perusmuistia ei ole tarpeeksi vapaana. Yrit vapauttaa sit lataamalla ajureita ylmuistiin tai jttmll tarpeettomia ajureita pois. Kysy lis jos on ongelmia. Miksi Liero on niin HIDAS? Sinulla on hidas kone. Kokeile seuraavia: - Kynnist peli "liero /s2". Suurempi luku nopeuttaa enemmn - Aseta Screen Sync OFF-asentoon - MAP OFF eli kartta pois plt - SHADOWS OFF eli varjot pois - AMOUNT OF BLOOD (veren mr) pienemmlle - net pois kynnistmll peli komennolla "liero /n" - Osta nopeampi kone Lis troubleshootingia tulossa... ----------------------------------------------------------------------------- KENTTEDITORIN KYTT HUOM! Levedit 0.2:lla tehdyt kentt eivt ole yhteensopivia Liero 1.30+ versioiden kanssa! Ne pit "knt" uudelleen Levedit 0.22:lla, eli lataa kentt ja tallenna se uudelleen samalla tai uudella nimell. Vastaavasti 0.22 kentt eivt toimi vanhemmissa Lieroissa kuin 1.30. Levedit 0.22 on yh hyvin rajoittunut, sill voi asetella pelkstn kivi ja tyhj tilaa, mutta kyll sill vaihtelua saa satunnaisesti generoituihin peruskenttiin. Editori kaipaa siis viel parantelua, mutta ehkp tm riitt paremman puutteessa. Kentteditori kynnistyy kun komennat LEVEDIT siin hakemistossa joka sislt Lieron tiedostot. Kun olen kynnistnyt editorin, ruudun vasemmasta ylkumasta voit valita tykalun (tyhj/kivi). Kentn piirtminen tapahtuu panamalla hiiren vasenta nppint. Oikea nppin vaihtaa kivityyppi. Editorin nppinkomennot: ALT-L Lataa kentt ALT-S Tallenna kentt ALT-C Tyhjenn kentt ESC Poistu editorista Jos jaksatte niin kertokaa millainen olisi hyv kentnmuokkain! ----------------------------------------------------------------------------- UUSIN VERSIO Jos ilmestyy uudempi versio, se lytyy aina MBnetist sek MBwebist: www.mikrobitti.fi Kirjoita MBnetiss ptasolla "sis 7" ja paina Enter. Sitten kun olet painellut Enteri jos sit kysytn, voit kirjoittaa "ets liero a" (ja Enteri) ja sinulle nytetn kaikki sanaan "liero" liittyvt tiedostot. Nin sen pitisi lyty. Lieron virallinen kotisivu ei ole viel valmis. Ei viel pitkn aikaan... mutta tarjolla on jo ehk muutama epvirallinen sivusto. ----------------------------------------------------------------------------- HISTORIA Thn ei sislly 1.0:aa vanhemmat versiot. Merkkien selitykset: * muutettu asia + uusi asia - korjattu bugi ! muuta Versio 1.33 * Perinteinen ninja rope palautettu! Pituuden st on viel mahdollista Versio 1.32 + Englanninkielinen doku!! * Edistyst tietokonepelaajassa! Toimii erittin kaavamaisesti, mutta aina parempi kuin random :) * Suutarit poistettu... bugittivat liikaa * Ninja rope: * Keinuminen onnistuu paremmin * Pituus rajoitettu Versio 1.31 * Realistisempi ninja rope! * Gauss gunia muutettu hiukan * Darttia muutettu * Peruutus poistettu turhana * CPU-pelaajalla _hiukan_ yrityst... ei viel tosiaankaan mikn "lyks", mutta parempi kuin random. Pelityypist se ei vlit. - Nimet eivt tallentuneet, nyt korjattu - Muutama muukin tkk tapettu - "Yhteydenotto tekij(i)hin" korjattu... Versio 1.30 + Gauss Gun + Suutareita: rjhtmttmi kranaatteja ym. * Uudenlainen ninja rope: heitetn samalla tavalla kuin ennenkin, mutta pituutta voi st * LIEROLOW.EXE poistettu... LIERO.EXEkn ei tarvitse en liikaa muistia - Shadows ON/OFF-bugit korjattu - Laseria fixattu Versio 1.29 * Realistisempi fysiikan mallinnus: Kaikkien aseiden nopeuteen listn madon nopeus. Suhteutettuna tietysti lhtnopeuteen... * Mato peruuttaa jos lhdet taaksepin ampuessasi * Dartissa nopeampi lataus + Booby trapissa aseen nimi jos pll... tt on kaivattu. + Uusi ase: RB Rampage (Rubber Bullet) * LevEditiss ei en rajoituksia. Aiemmilla LevEditin versioilla (<0.21) tehdyt kentt tytyy "knt" uudelleen avaamalla ja tallentamalla ne uudelleen. Uusi tiedostomuoto vie moninkertaisesti enemmn tilaa, mutta mahdollistaa helpomman laajennettavuuden tulevaisuudessa. Versio 1.28 ! Viime versiossa oli vahingossa muistivaatimukset paisuneet vaikka tss tiedostossa sanottiinkin 550kt... se oli noin 580kt, ja harvalla on niin paljoa vapaana. Nytp on mukana karsittu LIEROLOW.EXE, jossa ei ole ni. Vaatii 550kt. Versio 1.27 - Bugeja tapettu (milloin saa ne kaikki poiiiis...) Versio 1.26 - Vihdoinkin mato ei en synny reunan ulkopuolelle!! - Pikku bugeja korjattu Versio 1.25 * Mini rockets on tarkempi * Madon ei tarvitse menn pikselilleen Booby trapin, Minen ym. kohdalle, vaan ne rjhtvt jo kauempaakin - Bugeja fiksattu, mm. Dart korjattu Versio 1.24 + Uusi ase: Dart + Level- ja Weapon options-valikoihin listty 'scrollbar' * Asevalikossa ei voi tulla kahta samaa PAITSI jos valittavissa on vhemmn kuin viisi asetta * Blasteria korjattu: ei rjhd osuessaan matoon * Grasshopper kest kauemmin * Medikittej muutettu: parantaa 10-50% * Lipunrystmoodeja muutettu: liput pit kiikuttaa omaan kotipesn * Pelimoodien nimikin vhn vaihdettu * Matojen nimen randomointia muutettu hiukan... * Heittoaseiden (mm. grenade) heiton kovuuden voi "mrt" Lue VINKKEJ! - Edelliset asetukset eivt latautuneet seuraavalla kerralla - Asetuksia ladatessa matojen vrej ei muutettu oikein * Asetukset tallentuvat automaattisesti pelist poistuttaessa aina LIERO-nimell. EI siis kytss olevien asetusten plle. Versio 1.23 + Mahdollisuus tallentaa asetukset haluttuun tiedostoon! Voit siis tehd erilaisia pelityyppej stmll latausaikoja, aseiden saatavuutta, matojen energiaa ym. Mukana yksi esimerkkikonfiguraatio TAGFLAG. Kokeile! Versio 1.22 - Energiamittari bugitteli jos health oli 10000% Versio 1.21 - EI EN KAADU KOVASSAKAAN KYTSS! Testattu juttu: kaksi randomlieroa, kummallakin joukkotuhoaseet, latausajat 0%, 99 bonusta, kartta pll, verta 500%, varjot pll, health 10000%, elmi 999. Ja nill asetuksilla pyri helposti viisikin tuntia... Syyksi osoittautui erittin yksinkertainen bugi. Versio 1.20 * Missile kntyy hitaammin (helpompi ohjailla) * Riflen ja winchesterin panokset lhtee kovemmin * Winchesterist poistettu laserthtin * Animoitu suuliekki + LOAD+CHANGE-optio. ON-tilassa asetta voi vaihtaa latauksen aikana + Asevalikko: + Samoja aseita ei tarvitse joka kerta valita uudelleen + Randomize-kohta, jolla saa halutessaan satunnaiset aseet Vinkki: jos et halua nhd mitk aseet saat, paina vain fire pohjaan ja sitten yls! + Player options, josta voi valita nimen, energian, vrin ja mys nppimet: KEYSETUP on historiaa + Uusi pelityyppi: Flag + Tag. + Hippa: hvimisajan voi st + Flag: voittoon tarvittavien lippujen mrn voi st + Miinat ovat maan vrisi! Piiloutuvat paremmin - Mato syntyi joskus kentn reunan ulkopuolelle (_harvoin_) - Mahtava mr bugeja fixattu Versio 1.19 + Lipunryst! + Frameskip-toiminto. Nopeuttaa peli * Kuoleman jlkeen ei en voi synty toisen madon viereen, eik myskn samaan paikkaan miss kuoli * Missilen ohjausta fixailtu - bugeja pois... Versio 1.18 * Missilen kontrolleja muutettu: helpompi ohjata * Kesken latauksen voi kytt muita aseita! Lataus tytyy kuitenkin suorittaa pitmll ladattava ase kytss. * Larpa rjht osuessaan lieroon * Radioactives poistettu (liian tehokas) * Liero voi synty mys hiekan sisn, tehden sopivan kolon + Uusi ase: Grasshopper + Aseiden saatavuuden voi mritell (Menu, Bonuses, Banned)! * Hippamoodi: * hippana olevan aika ei en rullaa toisen ollessa kuolleena * itsemurhasta joutuu hipaksi - laskuri ei mene 10 minuutin kohdalla en sekaisin - Bazooka, doomsday ja mini rockets kyttytyivt omituisesti kun ne joutuivat tuulettimen kohteeksi (ei vlttmtt haitannut). - Mato ei en voi jd kiviin jumiin!! - Bonusten pllekkistarkistus bugitti vielkin! Versio 1.17 ! Paljon paranteluja/muutoksia/lisyksi (kiitos palautteista): + Uusia aseita: Booby trap = valelaatikko tai -ensiapupakkaus Radioactives = Pommi joka levitt radioaktiivista saastetta Mini rockets = ei niin tehokas kuin doomsday, lataa nopeammin * Aseet ovat aakkosjrjestyksess + Lierojen vrin saa mritt itse + Lis random-nimi * Flamer on runsaampi * Heittopommit (grenade, cluster ja chiquita) lentvt pidemmlle * Cluster bombin sirpaleista ei en lenn lis pikkusirpaleita * Riflen, winchesterin ja handgunin panokset kulkee nopeammin * Random-CPU-liero ei viivy asevalikossa * Asevalikossa ei voi en olla kahta samaa asetta valmiina * Painovoima on suurempi (madot tippuu nopeammin ym.) * Ninja rope (hiukan) tehokkaampi * Koodia optimoitu - Laserit hvisivt jostain kumman syyst viime versiossa - Bonusten pllekkistarkistus ei toiminut kunnolla ! LUEMINUT.EXE poistettu... Versio 1.16 - Korjauksia edellisen version korjauksiin (!) Versio 1.15 - Bugikorjauksia (oikeastaan melko turha versio) Versio 1.14 + LUEMINUT.EXE - Kun kentn vaihtoi Randomiksi, ei uutta kentt generoitu jos REGENERATE LEVEL oli OFF-asennossa. Versio 1.13 + Chiquita Bomb! - Missilen bugit korjattu - Paljon muita bugeja mys korjattu! Versio 1.12 * Totaalinen koodin optimointi: toimii melkein tuplasti nopeammin eli pelattavasti 386- ja 486-prosessoreilla!! * Missile vhn hitaampi (helpompi ohjata) + Random-pelaajat tulivat takaisin (tekolylieroja odotellessa)! - LIERO.TXT:n virheit korjailtu - "xx made a suicide" ym. tekstit hvisivt viime versiossa (?!) - Keysetup ei tallentanut nppimi jos LIERO.DAT oli poistettu - Kasa muita bugeja listitty Versio 1.11 * Lierot eivt en liu'u kun liikkuu ja ampuu samaan aikaan. * Auto Pistol -> Handgun, nopeampi ja hiukan tehokkaampi * Missiles poistettu (liian tehokas), tilalle ohjattava Missile. * Dirtballia paranneltu * MK Moden tilalle veren mrn st (0-500%) + Realistinen laser! - /1- ja /2-parametrien toiminta korjattu - Keysetup ei toiminut P2-laitteilla Versio 1.10 ! Paremmin testattu versio + Uusi ase: Uzi * Valikoiden ulkonk vhn muutettu (selkempi?) * Uudenlainen kyttjystvllisempi aseenvalinta * Bonukset tulivat joskus pllekkin * Ninja rope ei pysynyt toisessa lierossa kovin tiukasti kiinni - Nimet oli aina samat Versio 1.04 - Pentium II-bugi korjattu!!! Ei en runtime error 200... Korvasin TP:n bugisen CRT-unitin omalla, niin johan toimi. Versio 1.03 - Iso nippu bugikorjauksia Versio 1.02 - Toisen pelaajan thtin korjattu ja muita pikkukorjauksia Versio 1.01 - Muutama rsyttv bugi korjattu * LIERO.TXT:n oikeinkirjoitusta tarkistettu ja korjattu (viel joitain typoja lytyy) Versio 1.0 + Lierot piirretty uusiksi * Rjhdyksiss pehmempi animaatio + Cannon, Bouncy larpa, Missiles, Spikeballs ja Napalm + LIERO.TXT kirjoitettu kokonaan uusiksi + Kentteditori (erittin rajoittunut) + nikorttia ei en vlttmtt tarvitse * MK Mode on todella Mortal Kombat! ! Pienempi koko - Latausaikabugi (0%) korjattu - Keysetup-ohjelman tallennusbugi pois ----------------------------------------------------------------------------- TULEVAISUUS Merkkien selitykset: * toteutuu varmasti - ei toteudu vlttmtt * Englanninkielinen doku * Bugikorjauksia, eli kertokaa bugeista niin ne yritetn korjata! * Kyttjprofiili: vri, nppimet, ym. * Tilastot - 3-4 pelaajaa, jos ei ihmispelaajia niin tietokoneita vastaan - Tuki joystickille ja/tai gamepadille - Verkkopelituki? (esim. 4 pelaajaa 2:ll PC:ll) - Tuki useammalle nikortille (GUS, WSS, PAS, jne.) - Parempi "tekoly" AI-pelaajille - Uutta grafiikkaa: erityyppisi kentti, enemmn rekvisiittaa (tm toteutuu KAUKANA tulevaisuudessa) * Lis aseita (mit?) ja muita vlineit? Ehdotuksia! * Uusia bonuksia * Parempi kentteditori *- Ideoita saa lhett... ----------------------------------------------------------------------------- YHTEYDENOTTO TEKIJIHIN Lozzi ----- Anna parenteluehdotuksia, kerro bugeista, lpise muuten vaan... Jos ideasi/muut toteutuvat etk halua nimesi/aliasta alla olevalle listalle, muista mainita siit. HUOM! Shkpostiosoite on muuttunut: joosa@mbnet.fi MBnetiss edelleen tavoitettavissa nimell Joosa Riekkinen. Onyx ---- Jos taas haluat ilmoittaa typoista/vrst infosta/ kielioppivirheist englanninkielisess dokumentoinnissa tai vain lhett MetsnElimille (fani)postia, ota yhteytt Onyxiin MBnet : Antti O Hmlinen Shkposti: darkonyx@hotmail.com IRCnet : eternity- tai eternity (darkonyx@*) Kaikki palaute kelpaa. ----------------------------------------------------------------------------- KIITOKSET Kiitos kaikille jotka ovat vaivautuneet lhettmn palautetta! Seuraavassa listassa on muutamia henkilit, joita MetsnElimet haluaa (erityisesti) kiitt ideoista, bugiraporteista, ym. Nimet ovat sukunimien mukaan aakkosjrjestyksess. Kim Blomqvist Stig-Arne Grnroos Valtteri Haverinen Markku Helve Niko Huovilainen Lauri "Hatu" Hosio Eino Keskitalo Panu Koponen Tapio Laurinolli Daniel Liljeqvist Teemu T. Malkki Antti Paajoki Mikael Pajunen Jari Palmu Christian Prusskij Tommi Pivinen Marko Pivniemi Juse Rytknen Henrik Sandberg Pekka Seppnen Tuomo Vesanmaa Harri Ylinen Neural Patkiss HUOM! Ilmoita jos tunnet kuuluvasi listalle ja mink vuoksi! Jos OLET jo listalla mutta ET haluaisi olla, sekin voidaan jrjest. ----------------------------------------------------------------------------- END OF FILE lierolibre-0.5/data/LIEROENG.TXT000066400000000000000000000614421205125547100162350ustar00rootroot00000000000000 LIERO Freeware v1.33 Copyright (C) MetsnElimet 1998, 1999 An earthworm simulation game based on a real physical model. English documentation is now available!! ----------------------------------------------------------------------------- GENERAL STUFF Liero is freeware. What that means is that you don't have to pay for it and using it has not been restricted in any way. You may distribute it to anyone and anyhow WITHOUT ANY CHANGES MADE TO IT'S CONTAINMENTS. The source code of this game is not distributed freely (neither commercially). So if you thought that maybe you could... forget it. Liero is a wormgame with weapons for 2 players. The object of the game is definately what you think it is. Liero is excellent for taking out aggression and kicking buddies' butts without any real physical violence or just for having fun. ----------------------------------------------------------------------------- HARDWARE REQUIREMENTS Minimum: 386SX VGA video card + monitor 560kB free conventional memory Recommended: 486 or better VGA video card + monitor 560kB free conventional memory Sound Blaster or 100% compatible sound card 760kB free XMS memory for sound effects ----------------------------------------------------------------------------- INTRODUCTION To install Liero, extract LIERO???.ZIP into a directory of its own. When you're reading this, it has probably already been done... If you replace the files with newer ones, you should remove the old LIERO.DAT, because it's not necessarily compatible with the newer version. This is the list of the files that should be found after installation: LIERO.EXE The Game itself KEYSETUP.EXE The key set-up program LEVEDIT.EXE The level editor LIERO.CHR The graphics LIERO.SND The sound effects NAMES.DAT The list of names for the worms LIERO.TXT The documentation file in Finnish LIEROENG.TXT This file FILE_ID.DIZ A description for Bulletin Board Systems As you start playing the game, the following files are created: LIERO.DAT Game settings *.DAT Settings file(s) saved by you LIERO.OPT The settings that are loaded while starting the game Whenever you quit the game, the name of the .DAT file in use is saved to the file LIERO.OPT without the .DAT-definition. Liero uses the settings in this file the next time you run it. If LIERO.OPT is missing or blank, the game uses LIERO.DAT for settings. If it's missing too, the default settings are used. To start the game move to the directory containing the files of Liero and type LIERO. You can also tune up the game with the following switches (type these after "LIERO"): + Makes the game run faster (recommended on slower machines) /Sn Frameskip, where n is a number 1..5 /1Jack Sets player 1's name to Jack /2Jill Sets player 2's name to Jill /M MAP OFF /Bxx AMOUNT OF BLOOD, xx% of the default amount /Lname LEVELNAME, without the .LEV definition /Txx LOADING TIMES, xx% of the default times /N No sound /R1 Player 1 is a CPU-worm /R2 " " " " " /Oname Uses the file NAME.DAT for settings An example: liero /s2 /n /lliero /oyourown The example sets frameskip to 2, sets the SFX off, uses the level LIERO.LEV and the settings in YOUROWN.DAT. NAMES.DAT contains a pile of names, from which the names of the worms are randomly chosen if the worm hasn't been individually named or the name field has been left blank. ----------------------------------------------------------------------------- UNINSTALLING LIERO If you want to uninstall Liero, just delete the directory containing the files of Liero. Make sure there aren't any important files not having anything to do with the game in the directory. ----------------------------------------------------------------------------- HOW TO PLAY Also remember to read the HINTS and GAME TYPES sections. Weapons Before you start playing the worms have to be equipped with the weapons you want. There are 40 weapons in total and you can take 5 of them with you on the battlefield. When you've chosen your weapons choose "DONE!" with the "FIRE" button. If you want fully random equipment, choose on "Randomize" with "FIRE". You can choose the availability of the weapons from OPTIONS/WEAPON OPTIONS in the main menu. There are three options to choose from: - Menu: the weapon can be chosen in the beginning of the game - Bonuses: the weapon can only be found in bonus-crates - Banned: the weapon is not in available Keys Action Player 1 Player 2 Controllable weapons Move left D Left arrow Turn anticlockwise Move right G Right arrow Turn clockwise Aim up R Up arrow Increase speed Aim down F Down arrow - FIRE left Ctrl right Ctrl - Change weapon left Shift right Alt - Jump left Alt right Shift - These are the default keys. You can set your own keys up in the PLAYER OPTIONS. While holding the "Change weapon" button down, you can change weapons with the "Move left" and "Move right" keys. The ninja rope is thrown by pressing "Change weapon" + "Jump". If you hold "Change weapon" button down, you can adjust the length of the rope by "Aim up" and "Aim down" keys. The worm releases the rope when you press "Jump". You can dig by holding e.g. the "Move left" key down and rapidly pressing the "Move right" key. In this case the worm digs left to the direction of the crosshair. F12 saves a screen capture into a 320x200 and 256 color PCX file with the name "SCREENx.PCX", where x is a number. The compression algorithm hasn't been optimized a bit, so that it is suprisingly slow even on 486 machines. Other stuff There are two kinds of objects appearing on the battlefield during battles: - wooden crates which contain a weapon replacing the current weapon in use - first aid kits which increase health by 10-50% of the maximum level If you have a bad luck, the crates may also explode causing damage. ----------------------------------------------------------------------------- GAME TYPES Kill'em All Kill or get killed..!! Game of Tag The one who gets killed first becomes "it". Both players have in addition to the kills and lives meters a timer which shows the time spent as "it". The player whose time is running is "it". Everytime you die, you become "it", so try to stay alive... When the numbers are green you're winning (you've been less time as "it"); when they're red you're losing. Capture the Flag The game goes like this: The one who kills the other player first may begin collecting flags. As "the collector" you have to take as many flags as you can to your "home base", a little cabin painted with the colour of your worm located somewhere on the level. When the collector gets killed the other worm becomes the new collector. If you're carrying a flag when you die, the flag drops off. Simple CtF A simple game idea: Steal the other worms' flags and and try to avoid being robbed!! Apart from "Capture the Flag", in this mode both worms may collect flags at the same time. ----------------------------------------------------------------------------- HINTS You should learn to dig and use the rope well, these skills are very useful. E.g. if you get stuck, you can dig yourself out. The easiest way to dig is to hold the other "Move" button (the one which points to the way you want to dig to) down and rapidly press the the other one. The rope is very handy when you want to escape quickly or just move from a place to another. Also note that the rope also sticks on the worms (pull your friends to you and shoot them with a minigun perhaps, hehheh, they're dead meat...). About the weapons: When you use weapons that use bouncy ammo (Zimm, Bouncy mine, Bouncy larpa) it's worthwhile moving after you've fired. The shots of these weapons tend to return to the place they were fired from. If you want random weapons without even seeing what you get, hold the "FIRE" key down on "Randomize". Then just press the "Up" button. The tempo of the game can be changed by adjusting the LOADING TIMES, e.g. 20% turns the game into pure raging. You can also set LOAD+CHANGE ON from the OPTIONS MENU if you want to change weapons while reloading. If you want to fine tune you aiming, e.g. get a missile or a bullet go through a small tunnel, the crosshair moves way too fast. Hold "Up" and "Down" keys down at the same time, pressing the direction you want to move the crosshair to _a little_ bit more than the other key. Try it and you'll get it. It's worthwhile saving different kinds of settings you use to different files, they can be easily restored this way. ----------------------------------------------------------------------------- ANSWERS TO FREQUENTLY ASKED QUESTIONS When I try to run the game, the text "Runtime error 203 at 0000:xxxx" appears on the screen. What's the problem? You don't have enough free conventional memory. Try to free some memory by loading drivers to the upper memory block or removing unnecessary drivers. You can ask for details if you have problems. Why is Liero so SLOW? You've got a slow machine. Try the following: - Run the game with "liero /s2". The higher the number, the faster the game runs. - Set SCREEN SYNC OFF - Set MAP OFF - Set SHADOWS OFF - Decrease the AMOUNT OF BLOOD - Set the sounds OFF by running the game with "liero /n" - Get yourself a faster machine More troubleshooting coming soon... ----------------------------------------------------------------------------- USING THE LEVEL EDITOR ATTENTION!! The levels created with Levedit 0.2 are not compatible with the versions 1.30+ of Liero, and need to be "compiled" with Levedit 0.22. Open the level file and re-save it. Similarly the levels created with Levedit 0.22 don't work in versions older than 1.30. Levedit 0.22 is still a very restricted. You can only use it for placing rocks and empty space, but it can make variety to the randomly generated basic levels. So the editor still needs some more work, but maybe this one is good enough for starters. The level editor starts by typing LEVEDIT in the directory that contains the files of Liero. When you've started the editor, you can choose a tool (empty space/stone) from the upper-left corner of the screen. Drawing the level can be done by clicking the left mouse button. The right mouse button changes the type of stone. The key commands of the editor: ALT-L Load a level ALT-S Save the level ALT-C Clear the level ESC Exit the editor Please describe us a good level editor!! ----------------------------------------------------------------------------- THE MOST RECENT VERSION If a new version is released, it's always found in the MBnet-BBS and MBweb (www.mikrobitti.fi). On the main level of MBnet type "sis 7" and press Enter. Press Enter again and type "ets liero a" (Enter) and all the files having something to do with the word "liero" are shown. Liero should be found on the list. The official Liero homepage still under construction and isn't going to be finished in a loooong time... Maybe there are some unofficial Liero-sites already, though. ----------------------------------------------------------------------------- HISTORY This history does not contain versions older than 1.0. Legend: * change + addition - fixed bug ! other stuff Version 1.33 * Ninja rope is traditional again! Version 1.32 + A documentation in English!! * Some progress with the CPU-player!! It acts very routinely, but is still much better than random :) * Duds have been removed (too buggy) * Ninja rope: * Swinging is easier * Limited lenght Version 1.31 * Ninja rope is now more realistic!! * Gauss gun has been modified a bit * Dart has been modified * Moving backwards has been removed * The CPU-player is now _a bit_ more intelligent... it's not very smart, but better than the random-CPU. It doesn't care about the game type. - The names weren't saved; fixed - A couple of other bugs have been killed Version 1.30 + Gauss Gun + Duds: grenades etc. that don't explode * A new kind of ninja rope: it's thrown in the old fashioned way, but the lenght can be adjusted * LIEROLOW.EXE has been removed... LIERO.EXE no longer required too much memory - The SHADOWS ON/OFF-bugs have been fixed - Laser has been modified Version 1.29 * More realistic physics: the velocity of the worm is added to the velocity of the projectile. * The worm backs up if you move backwards while shooting * Dart is now faster to reload + Booby trap has the name of the weapon it "contains" on it... this is what you've been waiting for + A new weapon: RB Rampage (Rubber Bullet) * LevEdit no longer has restrictions. The levels created with earlier versions of LevEdit (<0.21) have to be "compiled" by re-opening and saving. The new file format uses loads more drive space, but makes it easier to expand in the future. Version 1.28 ! The memory requirements had increased even though this file told the game needs 550kB... the real amount was 580kB and rarely anyone has that much conventional memory free. Now a smaller LIEROLOW.EXE without SFX is packed with the game, it requires 550kB. Version 1.27 - Bugfixes, bugfixes (when, oh when are 'em all eliminated..?) Version 1.26 - The worm no longer generates outside the level limits... finally!! - Small bugfixes Version 1.25 * Mini rockets is now more accurate * The worm no longer has to step on Booby trap, Mine etc., they explode from a small distance - Bugfixes, e.g. Dart Version 1.24 + A new weapon: Dart + A scrollbar has been added to the LEVEL and WEAPONS menus * There can't be two weapons of the same kind chosen in the WEAPONS menu except if there are less than five weapons to choose from * Blaster has been fixed: no longer explodes when hitting a worm * Grasshopper lasts longer * Medikits now heal by 10-50% * A modification to the CtF modes: now you have to take the flag to your home base * Changed the names of the game modes * Randomizing the names has been changed a bit... * The force used to throw objects (such as Grenade) is now "adjustable". Read the HINTS section!! - The former settings did not load for the next game session - While loading the settings the colors of the worms weren't changed right * When quitting the game the settings are always automatically saved with the name LIERO, NOT replacing the settings in use Version 1.23 + A possibility to save the game settings to a file you want!! That means you can create new game types by adjusting the loading times, the availability of weapons, health etc. Packed with the Game comes an example configuration: TAGFLAG. Try it!! Version 1.22 - The health meter crashed if health was 10000% Version 1.21 - No longer crashes in heavy use!! It has been tested: 2 random-CPU-worms, both with heavy weapons, loading times 0%, 99 bonuses, map on, amount of blood 500%, shadows on, health 10000%, 999 lives. And the game ran easily 5 hours with these settings... Unstability was caused by a very simple bug. Version 1.20 * Missile turns slower (easier to control) * The bullets of Rifle and Winchester are faster * The laser sighting has been removed from Winchester * More animation + LOAD+CHANGE-option. When this setting is ON, you can change weapons while loading. + The WEAPONS menu: + You no longer have to choose the same weapons over and over again + Randomize, which randomizes the weapons A hint: if you don't want to see the weapons you get, just press "FIRE" and then "Up"!! + PLAYER OPTIONS, where you can choose your name, amount of health, the color of your worm and the keys too: KEYSETUP is history + A new game type: Flag + Tag + Game of Tag: the losing time can now be chosen + Capture the Flag: the flags needed to win can now be chosen + The mines are now the same color as the terrain (harder to notice) - The worm sometimes appeared outside the level (_rarely_) - A huge pile of bugfixes Version 1.19 + Capture the Flag!! + Frameskip, makes the game run faster * When you're killed, you can no longer appear next to the other worm or to the place you were killed at * Fixed the Missile controls - Bugfixes... Version 1.18 * The Missile controls have been fixed -> easier to direct * You can now use other weapons while reloading!! You still have to have the weapon chosen for reloading it. * Larpa explodes when hitting a worm * Radioactives have been removed (too efficient) * The worm may also regenerate in the sand, creating a fitting hole + A new weapon: Grasshopper + You may now choose the availability of the weapons (Menu, Bonuses Banned)!! * Game of Tag: * The timer of "it" no longer runs while the other worm is dead * A suicide makes you "it" - The timer no longer crashes at 10 minutes - Bazooka, Doomsday and Mini Rockets acted in a weird way when they were blocked by Fan (didn't actually bother) - The worm can no longer get stuck on stones!! Version 1.17 ! Loads of tuning/changes/additions (thanks for the feedback): + New weapons: Booby trap = a fake crate or first aid kit Radioactives = a bomb that spreads radioactive stuff Mini rockets = not as efficient as Doomsday by faster to reload * The weapons are now in alphabetical order + You can choose the color of your worm by yourself + More random names * Heavier Flamer * Throwable bombs (Grenade, Cluster and Chiquita) fly further away * The fragments of Cluster bomb no longer generate smaller fragments * The bullets of Rifle, Winchester and Handgun are faster * CPU no longer spends time in the weapons menu * You can no longer have two weapons of the same kind chosen in the weapons menu * Stronger gravity (the worms fall faster etc.) * Ninja rope is (a bit) more efficient * Code has been optimized - For some reason the lasers disappeared in the previous version ! LUEMINUT.EXE has been removed... Version 1.16 - Bugfixes for the bugfixes in the previous version (!!) Version 1.15 - Bugfixes (actually this version was unnecessary) Version 1.14 + LUEMINUT.EXE - If you chose a random level, a new level wasn't generated if REGENERATE LEVEL was OFF Version 1.13 + Chiquita bomb!! - The missile bugs have been fixed - Loads of other bugfixes Version 1.12 * A huge code optimization: the game runs almost twice as fast as before!! That means playable speed on 386- and 486-processors (with SCREEN SYNC OFF) * Missile is a bit slower (easier to control) + The random-CPU-worms are back (while waiting for decent CPU-players)!! - Fixed some stuff in LIERO.TXT - "xx made a suicide" and such messages disappeared in the previous version (?!) - KEYSETUP didn't save the keys is LIERO.DAT had been deleted - Fixed a pile of other bugs Version 1.11 * The worms no longer slide while moving and firing at the same time * Auto Pistol -> Handgun, faster and a bit more efficient * Replaced Missiles (too efficient) with Guided (!!) Missile. * Better Dirtball * MK Mode replaced with adjustable Amount of Blood (0-500%) + Realistic Laser!! - /1 and /2 parameters fixed - Keysetup didn't work on PII-machines Version 1.10 ! Increased testing + A new weapon: Uzi * Changed the looks of the menus (more clear?) * A new kind of more user-friendly weapons menu * Bonuses sometimes appeared on top of each other * Ninja rope didn't grap the other worm very tightly - The worms always had the same names Version 1.04 - Pentium II -bug fixed!! No more runtime error 200... Lozzi replaced the buggy CRT unit of TP with one by himself and the game started working. Version 1.03 - A huge pile of bugfixes Version 1.02 - Fixed the other player's crosshair and other small bugfixes Version 1.01 - Fixed a few annoying bugs * Checked and fixed the spelling of LIERO.TXT (there are still some typos, though) Version 1.0 + The worms have been redrawn * Smoother explosion animation + 5 new weapons: Cannon, Bouncy larpa, Missiles, Spikeballs and Napalm + LIERO.TXT completely rewritten + A level editor (very restricted) + A sound card is no longer required * MK Mode is really Mortal Kombat!! ! Compact filesize - Fixed the LOADING TIME (0%) bug - Fixed the save bug of KEYSETUP ----------------------------------------------------------------------------- FUTURE Legend: * coming true someday - not necessarily coming true * Bugfixes, report us if you find any and we'll try to fix 'em!! * A user profile: color, keys, etc. * Statistics - 3-4 players, if not human players then CPU - Support for joystick or gamepad - Network game support? (e.g. 4 players on 2 PCs) - Support for several more sound cards (e.g. GUS, WSS, PAS) - Background music? - A better AI for the CPU-players - New graphics: different kinds of levels, more background stuff etc. (this is going to come true after A LONG period of time) * More weapons and new pieces of equipment? Suggestions please!! * New bonuses * A better level editor *- Send some (rational) ideas ----------------------------------------------------------------------------- CONTACTING THE AUTHORS Lozzi ----- Make suggestions for Liero, report the bugs or just chat for fun... If your suggestions come true and you don't want your name/alias to be on the list below, remember to inform about it. E-mail: joosa@mbnet.fi Onyx ---- And if you want to report typos/grammar mistakes/false information in this document in English or just send sum (fan)mail to MetsnElimet contact Onyx / ME MBnet : Antti O Hmlinen E-mail : darkonyx@hotmail.com IRCnet : eternity- or eternity (darkonyx@*) Anykind of feedback is welcome. ----------------------------------------------------------------------------- THANKS Thanks to everyone who has bothered to send feedback!! The following list contains people that MetsnElimet would (especially) like to thank for ideas, bug reports et cetera. The names are in alphabetical order by surname. Kim Blomqvist Stig-Arne Grnroos Valtteri Haverinen Markku Helve Niko Huovilainen Lauri "Hatu" Hosio Eino Keskitalo Panu Koponen Tapio Laurinolli Daniel Liljeqvist Teemu T. Malkki Antti Paajoki Mikael Pajunen Jari Palmu Christian Prusskij Tommi Pivinen Marko Pivniemi Juse Rytknen Henrik Sandberg Pekka Seppnen Tuomo Vesanmaa Harri Ylinen Neural Patkiss Attention!! Let us know if you feel like you should be thanked, also tell the reason. If you're already on the list but you wouldn't like to, removing your name can be arranged too. ----------------------------------------------------------------------------- END OF FILE lierolibre-0.5/data/NAMES.DAT000066400000000000000000000007451205125547100156240ustar00rootroot00000000000000Liero Gaurgul Lozzi Onyx Aargl Jgeli Lurska Seppo Wormi Himmel Eino Maan Matonen Jimi Matala Surpelo Luuseri Killer Sucker Pelle! kApp0 SAapAS Korppu Lerppu j00ti Zgbrl Vermutti Jurtti Pontus Raakile Matolouski Punkero Smid Laatikkoukko Teurastaja Turu Mlli Mrk Saarnio Heinhanko Perunap Piippolan vaari Vaappolan piiri Kasvain Erba Lrv Plli Zilberi Mr X Hmm Rambo Apina LLlLl Tappaja Murhaaja Mato Kastemato lierolibre-0.5/data/graphics/000077500000000000000000000000001205125547100162215ustar00rootroot00000000000000lierolibre-0.5/data/graphics/gfx1.xpm000066400000000000000000001067311205125547100176240ustar00rootroot00000000000000/* XPM */ static char *gfx1[] = { /* columns rows colors chars-per-pixel */ "16 1760 69 1 ", " c black", ". c #010101", "X c #020202", "o c #060606", "O c gray4", "+ c #0E0E0E", "@ c #131313", "# c gray8", "$ c #151515", "% c #161616", "& c gray9", "* c #181818", "= c #191919", "- c gray10", "; c #1B1B1B", ": c gray11", "> c #1D1D1D", ", c #1E1E1E", "< c gray12", "1 c #202020", "2 c gray13", "3 c #222222", "4 c gray15", "5 c #282828", "6 c gray16", "7 c #2A2A2A", "8 c gray17", "9 c gray19", "0 c #313131", "q c #323232", "w c #373737", "e c gray22", "r c #393939", "t c #3A3A3A", "y c gray26", "u c #434343", "i c gray27", "p c #464646", "a c gray28", "s c #626262", "d c gray39", "f c #646464", "g c #656565", "h c #6C6C6C", "j c #6D6D6D", "k c gray43", "l c #6F6F6F", "z c gray44", "x c #717171", "c c #727272", "v c gray45", "b c #747474", "n c gray46", "m c #767676", "M c #777777", "N c #898989", "B c gray54", "V c #8B8B8B", "C c gray55", "Z c #8D8D8D", "A c #909090", "S c gray57", "D c #929292", "F c #939393", "G c gray69", "H c #B1B1B1", "J c #B2B2B2", "K c gray70", "L c #B4B4B4", /* pixels */ " .ooo. ", " .oooooooo. ", " .oooooooooo. ", " .oooooooooooo ", ".ooooooooooooo. ", "ooooooooooooooo ", "ooooooooooooooo ", "ooooooooooooooo ", "ooooooooooooooo ", ".oooooooooooooo ", " ooooooooooooo. ", " .oooooooooooo ", " .oooooooooo. ", " .oooooooo. ", " .oooo. ", " ", " ", " ", " .oo. ", " .ooooooo. ", " ooooooooo. ", " .oooooooooo ", " ooooooooooo ", " ooooooooooo ", " ooooooooooo ", " .ooooooooo. ", " .oooooooo ", " .oooooo. ", " .oo. ", " ", " ", " ", " ", " ", " ", " ", " .ooo. ", " .ooooo. ", " ooooooo ", " ooooooo ", " ooooooo ", " .ooooo. ", " .ooo. ", " ", " ", " ", " ", " ", " ", " ", " ", " %*&# ", " *=-*%# ", " *;:;-&$ ", " -:>:=%# ", " -:>>;&$# ", " :>>:*$# ", " ;>:;&$ ", " =;:* ", " ", " ", " ", " ", " ", " ", " ### ", " $$$$## ", " %%%$$$## ", " &***&&%%$## ", " *-;::;-*&%$$ ", " *-;:>>:;-=*&$ ", "*-;:>>:;-=**% ", ";-:>>:;--==&$ ", ";:>>>::;-=&$# ", "::>>>>>:-*$### ", ";:>>>>>:-&%$## ", "=;:>>>:;-*&$$# ", " =;::::::-&%$# ", " *=-:::;;-&% ", " *=-;-=&$ ", " ", " *&$# ", " *==*%$#@ ", " --;;--*%$#@ ", " =-:>>:;=%%$$@ ", " *;:>>>>;=&%$$#@", " -:>>>>;--*&%$$#", " *::>>:;;:-*%%$$", " -;:::::>;*&&%$", " *-:::>>:=*&%#", " -:>>>;-=*%#", " ;:>>;--*% ", " *-::---*$ ", " *-;-=*% ", " &*-& ", " ", " ", " ", " ", " ", " ## ", " $$$# ", " $%%%&%# ", " &*&*=*&$ ", " =;;;:=&$ ", " &:>>:=*# ", " ->>:=& ", " *=-& ", " ", " ", " ", " ", " ", " ", " $ ", " &=%$ ", " &=;=&% ", " *-:::=%$ ", " *=-:;::-%% ", " -:;;::>>;*% ", " ;>:;:::>>*%# ", " ;>>:::>>:*%$ ", " =;>>;:;;=&$# ", " -:>:;=&&$$ ", " :>:=& ", " :; ", " ", " ", " ", " ", " ", " %%$ ", " =**&$ ", " --;*&%$# ", " &;::-*&&%# ", " =:>>;===&$ ", " &;>>:-;-&$# ", " =:>:::-*%# ", " &-:>>::*%$# ", " *-:>>:;*%# ", " =:::;=% ", " *;=*& ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ll ", " lnnx ", " lnnvl ", " xvnx ", " lxvl ", " ll ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ll ", " lnvl ", " xnnl ", " lvnx ", " lvx ", " lx ", " l ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " lnl ", " lnnnl ", " lvnvl ", " xnx ", " lxl ", " l ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ll ", " lvnl ", " lnnx ", " xnvl ", " xvl ", " xl ", " l ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ll ", " xnnl ", " lvnnl ", " xnvx ", " lvxl ", " ll ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " lxl ", " lvnnl ", " lvnnvl ", "lxxxll ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ll ", " lxvnl ", "lxnnnn ", " lxvnl ", " ll ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ,< ", " <11 ", " 12 ", " 1221<21 ", " 1214221< ", " 121 41< ", " 1< u, ", " y ", " ", " ", " ", " ", " ", " ", " ", " ", " ,< ", " <11 ", " 12 ", " 1221<21 ", " 1214221< ", " 121421< ", " 1< 41 ", " u< ", " y ", " ", " ", " ", " ", " ", " ", " ", " ,< ", " <11 ", " 12 ", " 1221<21 ", " 1214221< ", " 121421< ", " 1<41 ", " u< ", " y ", " ", " ", " ", " ", " ", " ", " ", " ,< ", " <11 ", " 12 ", " 1221<21 ", " 1224221< ", " <11421< ", " <411 ", " u< ", " y ", " ", " ", " ", " ", " ", " ", " ", " ,< ", " <11 ", " 11< 12 ", " 12221<21 ", " <114221< ", " <4211< ", " u1, ", " y ", " ", " ", " ", " ", " ", " ", " ", " ", " ,< ", " <11 ", " 11< 12 ", " 12221<21 ", " <144221< ", " u42211< ", "y 1< ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ,< ", " 11 <11 ", " 1221 12 ", " <1221<21 ", "yu444221< ", " <1211< ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " < ", " <1 ", " 11 ", " <21 ", " 1112< ", " 124221 ", " 121141 ", " 121 u, ", " 1< y ", " ", " ", " ", " ", " ", " ", " ", " < ", " <1 ", " 11 ", " <21 ", " 1112< ", " 124221 ", " 121421 ", " 121 41 ", " 1< u< ", " y ", " ", " ", " ", " ", " ", " ", " < ", " <1 ", " 11 ", " <21 ", " 1112< ", " 124221 ", " 121421 ", " 12141 ", " 1>>>::", " %*-:>>>>::", " &;;>>>>::", " %=;>>>:::", " &=;:>>::;", " &=;;::;;-", " &*-;;;--=", " %*----==&", " $&&*==*&&", " $%*&&&%%", " &&%$", " ", " ", " ", " ", " ", " ", " ", " ", "@ ", "@@ ", "#@ ", "#@@ ", "###@ ", "####@@ ", "#####@@@ ", "$#$##@@@@ ", "%$$$$#@@@@ ", "&%%%$###@@ ", "=*&&%$$#@@@ ", "-=*=&$$##@@ ", ";--=*%$##@@@ ", ";-;-*&%##@@@ ", ";;;;-*%%#@@@@ ", "::;;-=&%$#@@@ ", ":::;-=*&%##@@ ", ":;::;-*&&%##@ ", "::::;;=*&&$$@ ", ";:;;;;-*&&$# ", "=--;;-=*&&$# ", "*==---=*&%$ ", "%&=--=*&%% ", "$&***&&%% ", " ", " ", " ", " ", " ", " ", " ", " %%%&&$# ", " %%%&*=*&$#", " %&**=*=-*&$", " %**====*==&%", " *=*--;-*--*&", " *=-;;;;*=-*&", " %*=;;::;-=;-*", " %=--;:;;-*--*", " &=-;::;-==-;=", " &-;::>:-===-=", " &-;::>>;===--", " &-;;:>>;=--;-", " *-;:>:>-=;=;=", " *=;:>::=-;--*", " ", " ", " ", " ", " ", " ", " ", " % ", " %=$ ", " % ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " @ ", " $-% ", " #-%-@ ", " *-& ", " % ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " @&@ ", " %*-=% ", " @*$ $&@ ", " &- =$ ", " @*# #%@ ", " %;;=# ", " #&@ ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " @%&&@ ", " *$ #&@ ", " $$ $# ", " & % ", " $% @# ", " &@ &$ ", " #%&%@ ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " @ # @ ", " $ % ", " $ @ ", " ", " @ # ", " @ % ", " %# @@ ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " HG ", " HJHG ", " HKKJHG ", " JLLKJH ", " HKLLKH ", " JKLJ ", " HJ ", " ", " ", " ", " ", " ", " ", " GG ", " JHHG ", " HKJHG ", " GKLKJHG ", " HLLKKHG ", " JLLLKHG ", " JKLLJHG ", " HJLKHG ", " HKJH ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " HG ", " JHGG ", " JKJHG ", " KLKJG ", " KLLJH ", " JLKK ", " JH ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " GG ", " GHHHGG ", " JKKJHGG ", " HKLLKJHG ", " KLLLLKJ ", " HKLLKJG ", " HJJH ", " ", " ", " ", " ", " ", " @@@@@ ", " @ ", " @ ", " @ ", " @@@@@ ", " ", " @@ ", " @ @ ", " @@@@ ", " ", " @@ ", " @ @ ", " @@@@ ", " ", " ", " ", " @@@@@ ", " @ ", " @ ", " @ ", " @@@@@ ", " ", " @@ ", " @ @ ", " @@@@ ", " ", " @@ ", " @ @ ", " @@@@ ", " ", " &=-;::>:;:;==", " &=;;:>>:;:;-=", " %=;::>>>:;;;-", " %=;;>>>>:;::-", " %-;::>>>:-::;", " &-;::>>>:-:;-", " $-;:::>>>;:;-", " $=;;:>>>>;:;=", " *--:>:>:-:-*", " &=-;::>:-;=*", " &--;::;==*&", " %=---:==&%@", " %==-;*&$# ", " %*-*&% ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " v ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " l ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " h ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " <1 ", " 121<<<<<<<<", "<<<<13211111111<", "1111321222222221", "<<1321111111111<", " 13212221eereeew", "13211113errttrre", "32122223eeeeeeee", "13211113errrrrre", " 13212221eeeeeew", " 1321111111111<", " 1321222222221", " 13211111111<", " 121<<<<<<<<", " <1 ", " ", " 56 ", " 67655555555", "5555687666666665", "6666876777777776", "5568766666666665", " 68767776eereeew", "68766668errttrre", "87677778eeeeeeee", "68766668errrrrre", " 68767776eeeeeew", " 68766666666665", " 6876777777776", " 687666666665", " 67655555555", " 56 ", " ", " +++++ ", " + ", " + ", " + ", " +++++ ", " ", " ++ ", " + ", " +++ ", " + ", " +++++ ", " + ", " ++ ", " + + ", " ++++ ", " ", " +++++ ", " + ", " + ", " + ", " +++++ ", " ", " ++ ", " + ", " +++ ", " + ", " +++++ ", " + ", " ++ ", " + + ", " ++++ ", " ", "p a ", " p ", "i p ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "#@ ", "##@ ", "$$$#@ ", "%$$##@ ", "%$$##@ ", "%$$$##@ ", "%$%$##@ ", "&$%$##@@ ", "*%$$###@ ", "*%%$###@ ", "*%%$##$@@ ", "*%&%#$$@@ ", "%&$%$$$#@ ", "%%$#$$#@@ ", "&%%$#$#@ ", "*%&$#$#@ ", "*%&$#$@ ", "&%&$#$@ ", "&&&##$ ", "*%&#$@ ", "*%%##@ ", "&%%#@ ", "%&$@ ", "#%@ ", "## ", " ", " ", " ", " ", " ", " ", " @@@@ ", " @ ", " @@@@ @@@@@ ", " @ ", " @ @@ @ @ ", " ", " @@@@ @@ ", " @@ @ @ @ ", " @ @ ", " @@@@@@ @@ ", " @ @ @ ", " @ @ ", " ", " ", " ", " ", " @@@@ ", " @ ", " @@@@ @@@@@ ", " @ ", " @ @@ @ @ ", " ", " @@@@ @@ ", " @@ @ @ @ ", " @ @ ", " @@@@@@ @@ ", " @ @ @ ", " @ @ ", " ", " ", " ", " ", " ", " ", " ##", " #$$%", " #$%%&&", " $$%%&&*", " %%&**==", " &*=---;", " %*=-;;;;", " #&&-;;;::", " %&*--;:::", " &&*-;;::;", " $&&*=;:>:;", " &***=->::;", " &&*===:>:;", " &&*=--;>>;", " %*=-;;:>>;", " %=-;;;:>:;", " *=-;;:::;", " **-;;::;;", " &*=-:::;;", " **=-;::;;", " ===;;::;:", " =-:>:::::", " =-;:>::::", " =-:>>>>>>", " =::>>>>>", " -;;>>>>", " *-;:::>", " &-;:;", " ", " ", " ", " S S ", " SDS ", " S ", " S ", " ", " ", " S ", " SDS ", " S ", " S ", " ", " ", " ", " ", " ", " S S ", " ADA SDS ", " SDMDS S ", " ADA S ", " S SDS ", " S ", " S ", " ADA ", " SDMDS ", " S ADA ", " SDS S ", " S ", " ", " ", " ", " S ", " AFA ", " S SFMFS ", " SFS S AFA ", " S AFA S ", " SFMFS ", " AFA ", " S ", " S ", " S SFS ", " AFA S ", " SFMFS ", " AFA ", " S ", " ", " ", " ", " S ", " SFS ", " S S ", " S ", " SFS ", " S ", " ", " ", " S ", " S ", " SFS ", " S ", " ", " ", " ", " ", " ", " S ", " ", " ", " S ", " ", " ", " ", " ", " ", " S ", " ", " ", " ", "=*-;--&&%$##@@@@", "-=-;-=*%%$$###@@", "-=-;--*&%%%$$#@ ", ";--;;==*&%%$$$@ ", ";;-;;-=**%%%$$ ", ";;;-;;-=***%%$ ", "-;:-=;;;==*&& ", ";::-*=;;==&&% ", ":>>;*=;;=*&%$ ", ":>:-*==&&&%$# ", ">:;=*=*&%%$$ ", ":;;=-*%%%$ ", ":;---*%$ ", ";--=*% ", ";; ", " ", " ", " ", " ###@ ", " #######@ ", "$$$$$$$####@ ", "$$$$$$$$####@ ", "%%$$$%$$$$##@ ", "&%%$%%$$$$##@@ ", "=*&&&&%$$$$##@ ", ";-*&&&%%$$$##@ ", ";;-=&&&%%$$##@ ", "::;-=*&*&&$$##@ ", ":;::-==**%$$##@ ", ";:;;-=*&&$$##@@ ", ";;;;-=&&%%$$##@@", "-;;;--*&&%$##@@@", " ", " ###@ ", " %%%$$#", " $%&&%%$$", " $%&*&%&%$", " #%%***&&&%", " %%&****&&%", " $&***=**&%", " %*=*==**&%", " #&==-===**%", " $&=-;==-=*%", " $&=-;;---=*", " %&=-:::;;--", " &*-;:::::;-", " &*=;::>::;;", " &*=::>>>:;;", " ", " ", " ", " ... ", " .ooooo. ", " ooooooo ", " .ooooooo. ", " .ooooooo. ", " .ooooooo. ", " ooooooo ", " .ooooo. ", " ... ", " ", " ", " ", " ", " ", " ", " ", " 909 ", " 90qqq09 ", " 9qqqqqqq9 ", " 0qqqqqqq0 ", " 9qqqqqqqqq9 ", " 0qqqqqqqqq0 ", " 9qqqqqqqqq9 ", " 0qqqqqqq0 ", " 9qqqqqqq9 ", " 90qqq09 ", " 909 ", " ", " ", " ", " ", " ", " ", " 909 ", " 90qqq09 ", " 0qqqqq0 ", " 9qqqqqqq9 ", " 0qqqqqqq0 ", " 9qqqqqqq9 ", " 0qqqqq0 ", " 90qqq09 ", " 909 ", " ", " ", " ", " ", " ", " ", " ", " ", " 909 ", " 0qqq0 ", " 9qqqqq9 ", " 0qqqqq0 ", " 9qqqqq9 ", " 0qqq0 ", " 909 ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " 909 ", " 9qqq9 ", " 0qqq0 ", " 9qqq9 ", " 909 ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " VBV ", " NNB ", " VNV ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " CVC ", " CBCVC ", " VC CV ", " CBCVC ", " CVC ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " CCZ ", " Z C ", " C Z ", " Z V ", " CZC ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " " }; lierolibre-0.5/data/graphics/gfx2.xpm000066400000000000000000000430251205125547100176210ustar00rootroot00000000000000/* XPM */ static char *gfx2[] = { /* columns rows colors chars-per-pixel */ "7 910 94 2 ", " c black", ". c gray4", "X c #0C0C0C", "o c gray6", "O c gray7", "+ c gray8", "@ c #151515", "# c #161616", "$ c gray9", "% c #181818", "& c #191919", "* c gray10", "= c #1B1B1B", "- c gray11", "; c #1D1D1D", ": c gray12", "> c #202020", ", c gray13", "< c #222222", "1 c #232323", "2 c gray14", "3 c #252525", "4 c gray15", "5 c #282828", "6 c gray16", "7 c #2A2A2A", "8 c gray17", "9 c gray19", "0 c #313131", "q c #323232", "w c gray20", "e c #343434", "r c #353535", "t c gray21", "y c gray22", "u c #393939", "i c #3A3A3A", "p c gray23", "a c #3C3C3C", "s c gray24", "d c gray25", "f c #414141", "g c gray26", "h c #434343", "j c #444444", "k c gray27", "l c #464646", "z c gray28", "x c #484848", "c c #494949", "v c gray29", "b c #4B4B4B", "n c gray32", "m c #535353", "M c gray33", "N c #585858", "B c gray35", "V c #5A5A5A", "C c #5F5F5F", "Z c #626262", "A c gray39", "S c #646464", "D c #656565", "F c #6A6A6A", "G c gray42", "H c #6C6C6C", "J c #6D6D6D", "K c gray43", "L c #6F6F6F", "P c gray44", "I c #717171", "U c #727272", "Y c gray47", "T c #797979", "R c gray48", "E c #7E7E7E", "W c gray50", "Q c #808080", "! c gray58", "~ c gray59", "^ c #979797", "/ c #989898", "( c #9A9A9A", ") c gray61", "_ c gray62", "` c gray69", "' c #B1B1B1", "] c #B2B2B2", "[ c gray70", "{ c #B4B4B4", "} c gray72", "| c #B9B9B9", " . c gray73", ".. c #BBBBBB", /* pixels */ " ", " ", " & @ % % @ ", " - - - - - @ ", " & @ % % @ ", " ", " ", " ", " $ ", " @ $ = = $ ", " ; * ; * # ", " = & # ", " ", " ", " ", " % * ", " * ; % ", " $ ; * ", " * ; $ ", " * ", " ", " $ ", " # = $ ", " * = ", " # ; $ ", " & * @ ", " = ; ", " ", " @ ", " @ - @ ", " % - % ", " % - % ", " @ - @ ", " & - & ", " ", " $ ", " $ = # ", " = * ", " $ ; # ", " @ * & ", " ; = ", " ", " ", " * % ", " % ; * ", " * ; $ ", " $ ; * ", " * ", " ", " ", " $ ", "$ = = $ @ ", " # * ; * ; ", " # & = ", " ", " ", " ", " ", " @ % % @ & ", "@ - - - - - ", " @ % % @ & ", " ", " ", " ", " ", " # & = ", " # * ; * ; ", "$ = = $ @ ", " $ ", " ", " ", " * ", " $ ; * ", " * ; $ ", " % ; * ", " * % ", " ", " ", " ; = ", " @ * & ", " $ ; # ", " = * ", " $ = # ", " $ ", " ", " & - & ", " @ - @ ", " % - % ", " % - % ", " @ - @ ", " @ ", " ", " = ; ", " & * @ ", " # ; $ ", " * = ", " # = $ ", " $ ", " ", " * ", " * ; $ ", " $ ; * ", " * ; % ", " % * ", " ", " ", " ", " = & # ", " ; * ; * # ", " @ $ = = $ ", " $ ", " ", " ", " x d ", " v c f d ", " b v g f ", " b h ", " ", " ", " ", " a ", " s ", " p s ", " p ", " ", " ", " ", " a ", " a p ", " p s ", " p ", " ", " ", " ", " a ", " s ", " s ", " p a p ", " ", " ", " ", " a ", " p a ", " s p ", " p ", " ", " ", " ", " a ", " s ", " s p ", " p ", " ", " ", " ", " ", " a p ", " a s p ", " p ", " ", " ", " ", " ", " p ", " a s s a ", " p ", " ", " ", " ", " ", " p ", " a s p ", " a p ", " ", " ", " ", " ", " p ", " s p ", " s ", " a ", " ", " ", " ", " p ", " s p ", " p a ", " a ", " ", " ", " ", " p a p ", " s ", " s ", " a ", " ", " ", " ", " p ", " p s ", " a p ", " a ", " ", " ", " ", " p ", " p s ", " s ", " a ", " ", " z ", " l ", " k ", " k ", " ", " ", " ", " z ", " l ", " k z ", " k ", " ", " ", " ", " z ", " l ", " k ", " k ", " ", " ", " ", " z ", " l ", " z k ", " k ", " ", " ", " ", "z ", " l ", " k ", " k ", " ", " ", " ", " ", " ", "z l z ", " k k ", " ", " ", " ", " ", " ", " ", "z l k k ", " ", " ", " ", " ", " ", " ", " k k ", "z l z ", " ", " ", " ", " ", " ", " k ", " k ", " l ", "z ", " ", " ", " ", " k ", " z k ", " l ", " z ", " ", " ", " ", " k ", " k ", " l ", " z ", " ", " ", " ", " k ", " k z ", " l ", " z ", " ", " ", " ", " k ", " k ", " l ", " z ", "E E E ", "E E ", "E E E ", " ", " ", " ", " ", ". . . ", ". . ", ". . . ", " ", " ", " ", " ", " ", " ", " y ", " y u ", " i ", " ", " ", " ", " ", " y ", " u y ", " i ", " ", " ", " ", " ", " ", " u y ", " i y ", " ", " ", " ", " ", " ", " u y ", " i y ", " ", " ", " ", " ", " P ", " P U P ", " P ", " ", " ", " ", " ", " L P ", " L I I P ", " L L ", " ", " ", " ", " ", " J K ", " J L P K ", " J K P P K ", " K K ", " ", " ", " J ", " H J K J ", " H K L L K J ", " J K L L J ", " J K J ", " H H J ", " ", " F H ", " F H H J H ", "F H J K K J H ", " H J K K H ", " H J F ", " F F H ", " ", " G ", " G H H G ", " G H J J H G ", " G J J G ", " H H G ", " G ", " ", " ", " n m ", " M V N ", " M B ", " ", " ", " ", " ", " m N ", " n V B N ", " m m ", " ", " ", " ", " ", " B N ", " n V M ", " m m ", " ", " ", " ", " ", " N ", " m B N ", " m V m ", " n ", " ", " ", " ", " M Y ", " M R T ", " m n ", " ", " ", " ", " ", " Y ", " m T Y ", " m R m ", " n ", " ", " ", " ", " Y m ", " R T m ", " m n ", " ", " ", " ", " ", " Y m ", " R T Y n ", " m m ", " ", " ", " ", " ", " o X ", " O o ", " O X ", " ", " ", " ", " ", " o X ", " O o X ", " O X ", " ", " ", " ", " ", " ", " X o X ", " O O o ", " ", " ", " ", " ", " o X ", " O O X ", " O X ", " ", " ", " ", " ", " Z ", " C g Z ", " C ", " ", " ", " ", " / _ ", " g f ", " h g ", " ( ) ", " ", " ", " ", " ", " c ", " b b c ", " b ", " ", " ", " ", " ", " 9 ", " q 0 9 ", " q ", " ", " ", " ", " f ", " d f d ", " g g h f f ", " d g d ", " g ", " ", " ", " f ", " d f d f ", " g h f ", " g d g f ", " g ", " ", " ", " f f ", " d f d ", " g h f ", " d g d ", " g f ", " ", " ", " f ", " g d f d ", " g h f ", " d g d f ", " g ", " ", " ", " ", " h v c ", " h j b v c ", " h v c ", " ", " ", " ", " v c ", " v b v ", " h j v ", " g h ", " ", " ", " ", " c ", " c v c ", " v b v ", " h j h ", " h ", " ", " ", " c v ", " v b v ", " v j h ", " h g ", " ", " ", " ", " ", " c v h ", " c v b j h ", " c v h ", " ", " ", " ", " ", " h g ", " v j h ", " v b v ", " c v ", " ", " ", " h ", " h j h ", " v b v ", " c v c ", " c ", " ", " ", " ", " g h ", " h j v ", " v b v ", " v c ", " ", " ", " ", " d f d ", " g h f ", " f g d ", " ", " ", " ", " ", " g ", " h k g ", " h ", " ", " ", " ", " ", " c g f ", " v b g ", " c v f ", " ", " ", " ", " ", " v c x ", " b v c ", " c b v ", " ", " ", " ", " ' ` ", " [ ] ' ` ", " { [ ] ' ", " { [ ", " ", " ", " ", " ", " E E E E ", " Q Q Q W ", " ", " ", " ", " ", " ", " Q W ", " Q W E ", " Q W E ", " E ", " ", " ", " ", " W E ", " Q E ", " Q E ", " Q E ", " ", " ", " ", " E ", " Q W E ", " Q W E ", " Q W ", " ", " ", " ", " r e ", " t ", " ", " ", " ", " ", " ", " ", " e ", " t r ", " ", " ", " ", " ", " ", " e ", " t r ", " ", " ", " ", " ", " r e ", " t ", " ", " ", " ", " ", " ", " e w ", " t r e w ", " t r ", " ", " ", " ", " ", " e w ", " r r e ", " t r ", " ", " ", " ", " ", " w ", " r e w ", " t r e ", " t ", " ", " ", " ", " r e ", " t r w ", " t e ", " ", " ", "v c v c ", "b v b v ", "v c v c ", "v c v c ", "b v b v ", "v c v c ", " ", " ", " h h g ", "h k W j g ", "j W W W h ", "h k W k h ", " l k h ", " ", "S A S A ", "D S D S ", "S A S A ", "S A S A ", "D S D S ", "S A S A ", " ", "4 4 4 4 4 4 4 ", "< < < , ", ", , , > ", " , > : ", " > > ", " : ", " ", "4 4 4 4 4 4 4 ", "8 8 8 7 ", "7 7 7 6 ", " 7 6 5 ", " 6 6 ", " 5 ", " ", " ", " ", " | } ", " .. .| } ", " .. . ", " ", " ", " ", " ", " | } ", " . .| ", " .. . ", " ", " ", " ", " ", " } ", " .| } ", " .. .| ", " .. ", " ", " ", " ", " .| ", " .. .} ", " ..| ", " ", " ", " ", " ", " ... ", " | .. ", " . ", " ", " ", " ", " ", " .. . ", " ..| ", " . ", " ", " ", " ", " ", " . ", " ..| ", " .. . ", " ", " ", " ", " ", " . ", " | .. ", " ... ", " ", " ", " ", " 2 ", " 3 ", " 3 ", " ", " ", " ", " ", " 2 ", " 2 1 ", " 3 ", " ", " ", " ", " ", " 2 ", " 3 ", " 3 ", " ", " ", " ", " ", " 2 ", " 2 1 ", " 3 ", " ", " ", " ", " ", " 2 ", " 3 ", " 3 ", " ", " ", " ", " ", " ", " 2 1 ", " 2 3 ", " ", " ", " ", " ", " ", " ", " 2 3 3 ", " ", " ", " ", " ", " ", " ", " 2 3 ", " 2 1 ", " ", " ", " ", " ", " ", " 3 ", " 3 ", " 2 ", " ", " ", " ", " ", " 3 ", " 2 1 ", " 2 ", " ", " ", " ", " ", " 3 ", " 3 ", " 2 ", " ", " ", " ", " ", " 3 ", " 2 1 ", " 2 ", " ", " ", " ", " ", " 3 ", " 3 ", " 2 ", " ", " ", " a p ", " % + ", " - % ", " s a ", " ", " ", " ", " p ", " a % + ", " - % a ", " s ", " ", " ", " ", " a ", " % + p ", " s - % ", " a ", " ", " ", " ", " ", " ! ", " ^ ~ ! ", " ^ ", " ", " " }; lierolibre-0.5/data/graphics/gfx3.xpm000066400000000000000000000021411205125547100176140ustar00rootroot00000000000000/* XPM */ static char *gfx3[] = { /* columns rows colors chars-per-pixel */ "4 120 4 1 ", " c black", ". c gray27", "X c #464646", "o c gray28", /* pixels */ "o...", ". . ", "o...", " ", "....", "X. .", "oo.o", " ", "o..o", ". .", ". .", " ", "....", ". .", "o..o", " ", "....", ". X.", ". .", " ", "....", ". X ", ". ", " ", "o..o", ". .", ". ..", " ", "....", " . ", "....", " ", ". .", "....", ". .", " ", " .o", " .", "...o", " ", "....", " .o ", ".o..", " ", "....", " .", " .", " ", "....", "o.X ", "....", " ", "....", " XX ", "....", " ", "o..o", ". .", "o..o", " ", "....", ". . ", "o.o ", " ", "o..o", ". .", "o...", " ", "....", ". . ", "o.o.", " ", "o. .", "..o.", ". .o", " ", ". ", "....", ". ", " ", "...o", " .", "...o", " ", "..o ", " ..", "..o ", " ", "....", " X.o", "....", " ", ".o..", " . ", ".o..", " ", ".o ", " ...", ".o ", " ", ". ..", "..o.", ".o .", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " " }; lierolibre-0.5/data/liero.cfg000066400000000000000000004700661205125547100162310ustar00rootroot00000000000000Version = 1; Texts : { random = "[RANDOM]"; random2 = "Random"; regenLevel = "REGENERATE LEVEL"; reloadLevel = "RELOAD LEVEL"; copyright1 = " LIERO v1.33 Copyright MetsnElimet 1998,1999"; copyright2 = "Liero v1.33 (c) MetsnElimet 1998,1999"; saveoptions = "S - Save Options"; loadoptions = "L - Load Options"; curOptNoFile = "Current Options: No filename"; curOpt = "Current Options: "; gameModes : { gameModes0 = "Kill'em All"; gameModes1 = "Game of Tag"; gameModes2 = "Capture the Flag"; gameModes3 = "Simple CtF"; }; gameModeSpec : { gameModeSpec0 = "LIVES"; gameModeSpec1 = "TIME TO LOSE"; gameModeSpec2 = "FLAGS TO WIN"; }; onoff : { onoff0 = "OFF"; onoff1 = "ON"; }; controllers : { controllers0 = "Human"; controllers1 = "CPU"; }; weapStates : { weapStates0 = "Menu"; weapStates1 = "Bonus"; weapStates2 = "Banned"; }; keyNames : { keyNames1 = "Esc"; keyNames2 = "1"; keyNames3 = "2"; keyNames4 = "3"; keyNames5 = "4"; keyNames6 = "5"; keyNames7 = "6"; keyNames8 = "7"; keyNames9 = "8"; keyNames10 = "9"; keyNames11 = "0"; keyNames12 = "+"; keyNames13 = "`"; keyNames14 = "Backspace"; keyNames15 = "Tab"; keyNames16 = "Q"; keyNames17 = "W"; keyNames18 = "E"; keyNames19 = "R"; keyNames20 = "T"; keyNames21 = "Y"; keyNames22 = "U"; keyNames23 = "I"; keyNames24 = "O"; keyNames25 = "P"; keyNames26 = ""; keyNames27 = "^"; keyNames28 = "Enter"; keyNames29 = "Left Crtl"; keyNames30 = "A"; keyNames31 = "S"; keyNames32 = "D"; keyNames33 = "F"; keyNames34 = "G"; keyNames35 = "H"; keyNames36 = "J"; keyNames37 = "K"; keyNames38 = "L"; keyNames39 = ""; keyNames40 = ""; keyNames41 = ""; keyNames42 = "Left Shift"; keyNames43 = "'"; keyNames44 = "Z"; keyNames45 = "X"; keyNames46 = "C"; keyNames47 = "V"; keyNames48 = "B"; keyNames49 = "N"; keyNames50 = "M"; keyNames51 = ","; keyNames52 = "."; keyNames53 = "-"; keyNames54 = "Right Shift"; keyNames55 = "* (Pad)"; keyNames56 = "Left Alt"; keyNames57 = ""; keyNames58 = "Caps Lock"; keyNames59 = "F1"; keyNames60 = "F2"; keyNames61 = "F3"; keyNames62 = "F4"; keyNames63 = "F5"; keyNames64 = "F6"; keyNames65 = "F7"; keyNames66 = "F8"; keyNames67 = "F9"; keyNames68 = "F10"; keyNames69 = "Num Lock"; keyNames70 = "Scroll Lock"; keyNames71 = "7 (Pad)"; keyNames72 = "8 (Pad)"; keyNames73 = "9 (Pad)"; keyNames74 = "- (Pad)"; keyNames75 = "4 (Pad)"; keyNames76 = "5 (Pad)"; keyNames77 = "6 (Pad)"; keyNames78 = "+ (Pad)"; keyNames79 = "1 (Pad)"; keyNames80 = "2 (Pad)"; keyNames81 = "3 (Pad)"; keyNames82 = "0 (Pad)"; keyNames83 = ", (Pad)"; keyNames84 = ""; keyNames85 = ""; keyNames86 = "<"; keyNames87 = "F11"; keyNames88 = "F12"; keyNames89 = ""; keyNames90 = ""; keyNames91 = ""; keyNames92 = ""; keyNames93 = ""; keyNames94 = ""; keyNames95 = ""; keyNames96 = ""; keyNames97 = ""; keyNames98 = ""; keyNames99 = ""; keyNames100 = ""; keyNames101 = ""; keyNames102 = ""; keyNames103 = ""; keyNames104 = ""; keyNames105 = ""; keyNames106 = ""; keyNames107 = ""; keyNames108 = ""; keyNames109 = ""; keyNames110 = ""; keyNames111 = ""; keyNames112 = ""; keyNames113 = ""; keyNames114 = ""; keyNames115 = ""; keyNames116 = "Enter (Pad)"; keyNames117 = "Right Ctrl"; keyNames118 = ""; keyNames119 = ""; keyNames120 = ""; keyNames121 = ""; keyNames122 = ""; keyNames123 = ""; keyNames124 = ""; keyNames125 = ""; keyNames126 = ""; keyNames127 = ""; keyNames128 = ""; keyNames129 = ""; keyNames130 = "Print Screen"; keyNames131 = ""; keyNames132 = ""; keyNames133 = ""; keyNames134 = ""; keyNames135 = ""; keyNames136 = ""; keyNames137 = ""; keyNames138 = ""; keyNames139 = ""; keyNames140 = ""; keyNames141 = "/ (Pad)"; keyNames142 = ""; keyNames143 = "Print Screen"; keyNames144 = "Right Alt"; keyNames145 = ""; keyNames146 = ""; keyNames147 = ""; keyNames148 = ""; keyNames149 = ""; keyNames150 = ""; keyNames151 = ""; keyNames152 = ""; keyNames153 = ""; keyNames154 = ""; keyNames155 = ""; keyNames156 = ""; keyNames157 = ""; keyNames158 = ""; keyNames159 = "Home"; keyNames160 = "Up"; keyNames161 = "Page Up"; keyNames162 = ""; keyNames163 = "Left"; keyNames164 = ""; keyNames165 = "Right"; keyNames166 = ""; keyNames167 = "End"; keyNames168 = "Down"; keyNames169 = "Page Down"; keyNames170 = "Insert"; keyNames171 = "Delete"; keyNames172 = ""; keyNames173 = ""; keyNames174 = ""; keyNames175 = ""; keyNames176 = ""; }; selWeap = "Select your weapons:"; levelRandom = "Level: Random"; levelIs1 = "Level: \""; levelIs2 = "\""; randomize = "Randomize"; done = "DONE!"; reloading = "Reloading..."; pressFire = "Press fire to go..."; kills = "Kills: "; lives = "Lives: "; selLevel = "Select level:"; weapon = "Weapon"; availability = "Availability"; noWeaps = "At least one weapon must"; copyrightBarFormat = 64; }; Constants : { Values : { NRInitialLength = 4000; NRAttachLength = 450; MinBounceUp = -53248; MinBounceDown = 53248; MinBounceLeft = -53248; MinBounceRight = 53248; WormGravity = 1500; WalkVelLeft = 3000; MaxVelLeft = -29184; WalkVelRight = 3000; MaxVelRight = 29184; JumpForce = 56064; MaxAimVelLeft = 70000; AimAccLeft = 4000; MaxAimVelRight = -70000; AimAccRight = 4000; NinjaropeGravity = 1000; NRMinLength = 170; NRMaxLength = 4000; BonusGravity = 1500; WormFricMult = 89; WormFricDiv = 100; WormMinSpawnDistLast = 160; WormMinSpawnDistEnemy = 160; WormSpawnRectX = 5; WormSpawnRectY = 5; WormSpawnRectW = 494; WormSpawnRectH = 340; AimFricMult = 83; AimFricDiv = 100; NRThrowVelX = 2; NRThrowVelY = 2; NRForceShlX = 2; NRForceDivX = 3; NRForceShlY = 2; NRForceDivY = 3; NRForceLenShl = 4; BonusBounceMul = 40; BonusBounceDiv = 100; BonusFlickerTime = 220; AimMaxRight = 116; AimMinRight = 64; AimMaxLeft = 12; AimMinLeft = 64; NRPullVel = 24; NRReleaseVel = 24; NRColourBegin = 62; NRColourEnd = 64; BonusExplodeRisk = 10; BonusHealthVar = 51; BonusMinHealth = 10; LaserWeapon = 29; FirstBloodColour = 80; NumBloodColours = 2; BObjGravity = 1000; BonusDropChance = 1700; SplinterLarpaVelDiv = 3; SplinterCracklerVelDiv = 3; BloodStepUp = 25; BloodStepDown = 25; BloodLimit = 500; FallDamageRight = 0; FallDamageLeft = 0; FallDamageDown = 0; FallDamageUp = 0; WormFloatLevel = 163; WormFloatPower = -8386178; BonusSpawnRectX = -1410; BonusSpawnRectY = -1410; BonusSpawnRectW = 504; BonusSpawnRectH = 350; RemExpObject = 35; }; Strings : { InitSound = "Initializing sound system..."; LoadingSounds = "Loading sounds..."; LoadingAndThinking = "Loading & thinking..."; OK = "OK"; OK2 = "OK"; PressAnyKey = "Press any key..."; CommittedSuicideMsg = " committed suicide"; KilledMsg = "Killed "; YoureIt = "You're 'IT' now!"; Init_BaseIO = "BaseIO="; Init_IRQ = "h IRQ"; Init_DMA8 = " DMA8="; Init_DMA16 = " DMA16="; Init_DSPVersion = "DSP version "; Init_Colon = ": "; Init_16bit = "16-bit, "; Init_Autoinit = "Auto-initialized"; Init_XMSSucc = "Extended memory succesfully initialized"; Init_FreeXMS = "Free XMS memory: "; Init_k = "k "; }; Hacks : { HFallDamage = false; HBonusReloadOnly = false; HBonusSpawnRect = false; HWormFloat = false; HBonusOnlyHealth = false; HBonusOnlyWeapon = false; HBonusDisable = false; HRemExp = false; HSignedRecoil = false; HAirJump = false; HMultiJump = false; }; }; Tables : { sinTable = [ 65536, 65457, 65220, 64827, 64277, 63572, 62714, 61705, 60547, 59244, 57798, 56212, 54491, 52639, 50660, 48559, 46341, 44011, 41576, 39040, 36410, 33692, 30893, 28020, 25080, 22078, 19024, 15924, 12785, 9616, 6424, 3216, 0, -3216, -6424, -9616, -12785, -15924, -19024, -22078, -25080, -28020, -30893, -33692, -36410, -39040, -41576, -44011, -46341, -48559, -50660, -52639, -54491, -56212, -57798, -59244, -60547, -61705, -62714, -63572, -64277, -64827, -65220, -65457, -65536, -65457, -65220, -64827, -64277, -63572, -62714, -61705, -60547, -59244, -57798, -56212, -54491, -52639, -50660, -48559, -46341, -44011, -41576, -39040, -36410, -33692, -30893, -28020, -25080, -22078, -19024, -15924, -12785, -9616, -6424, -3216, 0, 3216, 6424, 9616, 12785, 15924, 19024, 22078, 25080, 28020, 30893, 33692, 36410, 39040, 41576, 44011, 46341, 48559, 50660, 52639, 54491, 56212, 57798, 59244, 60547, 61705, 62714, 63572, 64277, 64827, 65220, 65457 ]; cosTable = [ 0, -3216, -6424, -9616, -12785, -15924, -19024, -22078, -25080, -28020, -30893, -33692, -36410, -39040, -41576, -44011, -46341, -48559, -50660, -52639, -54491, -56212, -57798, -59244, -60547, -61705, -62714, -63572, -64277, -64827, -65220, -65457, -65536, -65457, -65220, -64827, -64277, -63572, -62714, -61705, -60547, -59244, -57798, -56212, -54491, -52639, -50660, -48559, -46341, -44011, -41576, -39040, -36410, -33692, -30893, -28020, -25080, -22078, -19024, -15924, -12785, -9616, -6424, -3216, 0, 3216, 6424, 9616, 12785, 15924, 19024, 22078, 25080, 28020, 30893, 33692, 36410, 39040, 41576, 44011, 46341, 48559, 50660, 52639, 54491, 56212, 57798, 59244, 60547, 61705, 62714, 63572, 64277, 64827, 65220, 65457, 65536, 65457, 65220, 64827, 64277, 63572, 62714, 61705, 60547, 59244, 57798, 56212, 54491, 52639, 50660, 48559, 46341, 44011, 41576, 39040, 36410, 33692, 30893, 28020, 25080, 22078, 19024, 15924, 12785, 9616, 6424, 3216 ]; }; Font : { char0 : { data = [ 0, 8, 8, 8, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 8, 8, 8, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 8, 0, 8, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char1 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char2 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char3 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char4 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char5 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char6 : { data = [ 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 0, 8, 8, 8, 0, 8, 0, 0, 0, 8, 8, 0, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char7 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char8 : { data = [ 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 0, 8, 8, 8, 0, 8, 0, 8, 0, 8, 8, 0, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char9 : { data = [ 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 8, 8, 8, 0, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char10 : { data = [ 8, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char11 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char12 : { data = [ 0, 8, 8, 8, 8, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 8, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char13 : { data = [ 8, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char14 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char15 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char16 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char17 : { data = [ 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char18 : { data = [ 8, 8, 8, 8, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char19 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char20 : { data = [ 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char21 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char22 : { data = [ 0, 0, 7, 0, 0, 0, 0, 0, 7, 7, 7, 0, 0, 0, 7, 0, 7, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char23 : { data = [ 0, 0, 7, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 0, 7, 0, 7, 0, 0, 0, 7, 7, 7, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char24 : { data = [ 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char25 : { data = [ 0, 0, 7, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char26 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char27 : { data = [ 0, 0, 7, 0, 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 7, 7, 7, 7, 7, 7, 7, 0, 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 8; }; char28 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char29 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char30 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char31 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 2; }; char32 : { data = [ 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char33 : { data = [ 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char34 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char35 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char36 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char37 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char38 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char39 : { data = [ 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char40 : { data = [ 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char41 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char42 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char43 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char44 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 2; }; char45 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char46 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 8, 8, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char47 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char48 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char49 : { data = [ 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char50 : { data = [ 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char51 : { data = [ 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char52 : { data = [ 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char53 : { data = [ 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char54 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char55 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char56 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 2; }; char57 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char58 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char59 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char60 : { data = [ 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char61 : { data = [ 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char62 : { data = [ 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 8, 8, 8, 0, 0, 8, 0, 8, 8, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char63 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char64 : { data = [ 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char65 : { data = [ 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char66 : { data = [ 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char67 : { data = [ 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char68 : { data = [ 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char69 : { data = [ 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char70 : { data = [ 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char71 : { data = [ 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char72 : { data = [ 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char73 : { data = [ 8, 0, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char74 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char75 : { data = [ 8, 0, 0, 0, 8, 0, 0, 8, 8, 0, 8, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char76 : { data = [ 8, 0, 0, 8, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 8, 0, 8, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char77 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char78 : { data = [ 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char79 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char80 : { data = [ 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char81 : { data = [ 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char82 : { data = [ 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char83 : { data = [ 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char84 : { data = [ 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char85 : { data = [ 8, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char86 : { data = [ 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char87 : { data = [ 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char88 : { data = [ 8, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char89 : { data = [ 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char90 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char91 : { data = [ 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char92 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char93 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char94 : { data = [ 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char95 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char96 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char97 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char98 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char99 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char100 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char101 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char102 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char103 : { data = [ 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 2; }; char104 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char105 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char106 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 2; }; char107 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char108 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char109 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char110 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char111 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char112 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char113 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char114 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char115 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char116 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char117 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char118 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char119 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char120 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char121 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char122 : { data = [ 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 2; }; char123 : { data = [ 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char124 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char125 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char126 : { data = [ 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char127 : { data = [ 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char128 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char129 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char130 : { data = [ 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char131 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char132 : { data = [ 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char133 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char134 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char135 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char136 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char137 : { data = [ 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char138 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char139 : { data = [ 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char140 : { data = [ 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char141 : { data = [ 0, 8, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char142 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char143 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 8, 0, 0, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 0, 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char144 : { data = [ 0, 8, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char145 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char146 : { data = [ 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char147 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char148 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char149 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char150 : { data = [ 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char151 : { data = [ 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char152 : { data = [ 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char153 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char154 : { data = [ 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char155 : { data = [ 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char156 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 7; }; char157 : { data = [ 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char158 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char159 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 3; }; char160 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char161 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char162 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char163 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 0; }; char164 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char165 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char166 : { data = [ 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char167 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char168 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char169 : { data = [ 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char170 : { data = [ 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char171 : { data = [ 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 2; }; char172 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char173 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char174 : { data = [ 8, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char175 : { data = [ 8, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char176 : { data = [ 0, 8, 0, 8, 0, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 0, 8, 0, 8, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 8, 0, 8, 0, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char177 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char178 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char179 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char180 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char181 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char182 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char183 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char184 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char185 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char186 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char187 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char188 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char189 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char190 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char191 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char192 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char193 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char194 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char195 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char196 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char197 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char198 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 8, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char199 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char200 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char201 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char202 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 8, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char203 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char204 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char205 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char206 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char207 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char208 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char209 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char210 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char211 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char212 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char213 : { data = [ 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char214 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char215 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char216 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char217 : { data = [ 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char218 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char219 : { data = [ 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char220 : { data = [ 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char221 : { data = [ 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char222 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char223 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char224 : { data = [ 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char225 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char226 : { data = [ 8, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char227 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char228 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char229 : { data = [ 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char230 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char231 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char232 : { data = [ 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char233 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char234 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char235 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char236 : { data = [ 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char237 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char238 : { data = [ 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char239 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char240 : { data = [ 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char241 : { data = [ 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char242 : { data = [ 0, 0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char243 : { data = [ 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; char244 : { data = [ 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char245 : { data = [ 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 5; }; char246 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char247 : { data = [ 0, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 4; }; char248 : { data = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 2; }; char249 : { data = [ 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; width = 6; }; }; Palette : { entries : { entries0r = 0; entries0g = 0; entries0b = 0; entries1r = 27; entries1g = 14; entries1b = 0; entries2r = 27; entries2g = 20; entries2b = 0; entries3r = 41; entries3g = 37; entries3b = 32; entries4r = 0; entries4g = 36; entries4b = 0; entries5r = 15; entries5g = 43; entries5b = 15; entries6r = 63; entries6g = 21; entries6b = 21; entries7r = 42; entries7g = 42; entries7b = 42; entries8r = 21; entries8g = 21; entries8b = 21; entries9r = 21; entries9g = 21; entries9b = 63; entries10r = 21; entries10g = 54; entries10b = 21; entries11r = 21; entries11g = 63; entries11b = 63; entries12r = 30; entries12g = 16; entries12b = 2; entries13r = 32; entries13g = 17; entries13b = 2; entries14r = 34; entries14g = 18; entries14b = 3; entries15r = 36; entries15g = 20; entries15b = 4; entries16r = 38; entries16g = 21; entries16b = 5; entries17r = 40; entries17g = 22; entries17b = 6; entries18r = 43; entries18g = 24; entries18b = 7; entries19r = 19; entries19g = 19; entries19b = 19; entries20r = 21; entries20g = 21; entries20b = 21; entries21r = 23; entries21g = 23; entries21b = 23; entries22r = 25; entries22g = 25; entries22b = 25; entries23r = 27; entries23g = 27; entries23b = 27; entries24r = 29; entries24g = 29; entries24b = 29; entries25r = 31; entries25g = 31; entries25b = 31; entries26r = 33; entries26g = 33; entries26b = 33; entries27r = 35; entries27g = 35; entries27b = 35; entries28r = 37; entries28g = 37; entries28b = 37; entries29r = 39; entries29g = 39; entries29b = 39; entries30r = 14; entries30g = 14; entries30b = 34; entries31r = 20; entries31g = 20; entries31b = 48; entries32r = 26; entries32g = 26; entries32b = 62; entries33r = 36; entries33g = 36; entries33b = 61; entries34r = 46; entries34g = 46; entries34b = 61; entries35r = 27; entries35g = 27; entries35b = 27; entries36r = 36; entries36g = 36; entries36b = 36; entries37r = 45; entries37g = 45; entries37b = 45; entries38r = 54; entries38g = 54; entries38b = 54; entries39r = 8; entries39g = 24; entries39b = 8; entries40r = 11; entries40g = 33; entries40b = 11; entries41r = 15; entries41g = 43; entries41b = 15; entries42r = 28; entries42g = 47; entries42b = 28; entries43r = 41; entries43g = 53; entries43b = 41; entries44r = 27; entries44g = 27; entries44b = 27; entries45r = 36; entries45g = 36; entries45b = 36; entries46r = 45; entries46g = 45; entries46b = 45; entries47r = 54; entries47g = 54; entries47b = 54; entries48r = 42; entries48g = 42; entries48b = 62; entries49r = 52; entries49g = 52; entries49b = 61; entries50r = 63; entries50g = 63; entries50b = 61; entries51r = 15; entries51g = 20; entries51b = 0; entries52r = 22; entries52g = 28; entries52b = 0; entries53r = 29; entries53g = 36; entries53b = 0; entries54r = 37; entries54g = 44; entries54b = 0; entries55r = 30; entries55g = 18; entries55b = 13; entries56r = 39; entries56g = 30; entries56b = 22; entries57r = 49; entries57g = 42; entries57b = 31; entries58r = 59; entries58g = 54; entries58b = 40; entries59r = 39; entries59g = 30; entries59b = 22; entries60r = 49; entries60g = 42; entries60b = 31; entries61r = 59; entries61g = 54; entries61b = 40; entries62r = 50; entries62g = 25; entries62b = 0; entries63r = 40; entries63g = 20; entries63b = 0; entries64r = 18; entries64g = 18; entries64b = 18; entries65r = 27; entries65g = 27; entries65b = 27; entries66r = 36; entries66g = 36; entries66b = 36; entries67r = 45; entries67g = 45; entries67b = 45; entries68r = 54; entries68g = 54; entries68b = 54; entries69r = 63; entries69g = 63; entries69b = 63; entries70r = 49; entries70g = 49; entries70b = 49; entries71r = 36; entries71g = 36; entries71b = 36; entries72r = 38; entries72g = 15; entries72b = 0; entries73r = 45; entries73g = 25; entries73b = 0; entries74r = 52; entries74g = 35; entries74b = 0; entries75r = 59; entries75g = 45; entries75b = 0; entries76r = 42; entries76g = 21; entries76b = 0; entries77r = 54; entries77g = 0; entries77b = 0; entries78r = 47; entries78g = 0; entries78b = 0; entries79r = 41; entries79g = 0; entries79b = 0; entries80r = 50; entries80g = 0; entries80b = 0; entries81r = 43; entries81g = 0; entries81b = 0; entries82r = 54; entries82g = 0; entries82b = 0; entries83r = 47; entries83g = 0; entries83b = 0; entries84r = 41; entries84g = 0; entries84b = 0; entries85r = 54; entries85g = 0; entries85b = 0; entries86r = 47; entries86g = 0; entries86b = 0; entries87r = 41; entries87g = 0; entries87b = 0; entries88r = 20; entries88g = 20; entries88b = 48; entries89r = 26; entries89g = 26; entries89b = 62; entries90r = 36; entries90g = 36; entries90b = 61; entries91r = 20; entries91g = 20; entries91b = 48; entries92r = 26; entries92g = 26; entries92b = 62; entries93r = 36; entries93g = 36; entries93b = 61; entries94r = 37; entries94g = 34; entries94b = 0; entries95r = 34; entries95g = 31; entries95b = 0; entries96r = 31; entries96g = 28; entries96b = 0; entries97r = 29; entries97g = 25; entries97b = 0; entries98r = 33; entries98g = 23; entries98b = 10; entries99r = 40; entries99g = 33; entries99b = 18; entries100r = 47; entries100g = 44; entries100b = 26; entries101r = 54; entries101g = 55; entries101b = 34; entries102r = 62; entries102g = 62; entries102b = 47; entries103r = 61; entries103g = 61; entries103b = 63; entries104r = 63; entries104g = 0; entries104b = 0; entries105r = 62; entries105g = 6; entries105b = 1; entries106r = 62; entries106g = 13; entries106b = 2; entries107r = 62; entries107g = 20; entries107b = 4; entries108r = 62; entries108g = 27; entries108b = 5; entries109r = 62; entries109g = 34; entries109b = 6; entries110r = 62; entries110g = 41; entries110b = 8; entries111r = 62; entries111g = 48; entries111b = 9; entries112r = 62; entries112g = 55; entries112b = 10; entries113r = 61; entries113g = 58; entries113b = 15; entries114r = 61; entries114g = 61; entries114b = 20; entries115r = 61; entries115g = 61; entries115b = 28; entries116r = 61; entries116g = 61; entries116b = 37; entries117r = 60; entries117g = 60; entries117b = 45; entries118r = 60; entries118g = 60; entries118b = 53; entries119r = 60; entries119g = 60; entries119b = 62; entries120r = 11; entries120g = 33; entries120b = 11; entries121r = 15; entries121g = 43; entries121b = 15; entries122r = 28; entries122g = 47; entries122b = 28; entries123r = 11; entries123g = 33; entries123b = 11; entries124r = 15; entries124g = 43; entries124b = 15; entries125r = 28; entries125g = 47; entries125b = 28; entries126r = 62; entries126g = 15; entries126b = 15; entries127r = 61; entries127g = 31; entries127b = 31; entries128r = 61; entries128g = 47; entries128b = 47; entries129r = 26; entries129g = 26; entries129b = 62; entries130r = 36; entries130g = 36; entries130b = 61; entries131r = 46; entries131g = 46; entries131b = 61; entries132r = 36; entries132g = 36; entries132b = 61; entries133r = 15; entries133g = 43; entries133b = 15; entries134r = 28; entries134g = 47; entries134b = 28; entries135r = 41; entries135g = 53; entries135b = 41; entries136r = 28; entries136g = 47; entries136b = 28; entries137r = 37; entries137g = 34; entries137b = 0; entries138r = 34; entries138g = 29; entries138b = 0; entries139r = 31; entries139g = 24; entries139b = 0; entries140r = 28; entries140g = 19; entries140b = 0; entries141r = 25; entries141g = 14; entries141b = 0; entries142r = 22; entries142g = 10; entries142b = 0; entries143r = 26; entries143g = 26; entries143b = 34; entries144r = 36; entries144g = 36; entries144b = 48; entries145r = 47; entries145g = 47; entries145b = 62; entries146r = 50; entries146g = 50; entries146b = 61; entries147r = 55; entries147g = 55; entries147b = 61; entries148r = 10; entries148g = 28; entries148b = 10; entries149r = 11; entries149g = 33; entries149b = 11; entries150r = 13; entries150g = 38; entries150b = 13; entries151r = 15; entries151g = 43; entries151b = 15; entries152r = 63; entries152g = 50; entries152b = 50; entries153r = 61; entries153g = 41; entries153b = 41; entries154r = 62; entries154g = 23; entries154b = 23; entries155r = 61; entries155g = 19; entries155b = 19; entries156r = 61; entries156g = 15; entries156b = 15; entries157r = 61; entries157g = 19; entries157b = 19; entries158r = 61; entries158g = 23; entries158b = 23; entries159r = 61; entries159g = 41; entries159b = 41; entries160r = 21; entries160g = 10; entries160b = 0; entries161r = 22; entries161g = 10; entries161b = 0; entries162r = 23; entries162g = 11; entries162b = 0; entries163r = 24; entries163g = 12; entries163b = 0; entries164r = 15; entries164g = 7; entries164b = 0; entries165r = 16; entries165g = 7; entries165b = 0; entries166r = 17; entries166g = 8; entries166b = 0; entries167r = 18; entries167g = 9; entries167b = 0; entries168r = 63; entries168g = 63; entries168b = 63; entries169r = 55; entries169g = 55; entries169b = 55; entries170r = 47; entries170g = 47; entries170b = 47; entries171r = 39; entries171g = 39; entries171b = 39; entries172r = 31; entries172g = 31; entries172b = 31; entries173r = 39; entries173g = 39; entries173b = 39; entries174r = 47; entries174g = 47; entries174b = 47; entries175r = 55; entries175g = 55; entries175b = 55; entries176r = 27; entries176g = 19; entries176b = 11; entries177r = 31; entries177g = 21; entries177b = 12; entries178r = 35; entries178g = 24; entries178b = 14; entries179r = 39; entries179g = 27; entries179b = 16; entries180r = 43; entries180g = 30; entries180b = 18; entries181r = 0; entries181g = 0; entries181b = 0; entries182r = 10; entries182g = 9; entries182b = 2; entries183r = 20; entries183g = 19; entries183b = 5; entries184r = 30; entries184g = 29; entries184b = 7; entries185r = 40; entries185g = 38; entries185b = 10; entries186r = 50; entries186g = 48; entries186b = 12; entries187r = 61; entries187g = 58; entries187b = 15; entries188r = 0; entries188g = 0; entries188b = 0; entries189r = 0; entries189g = 0; entries189b = 0; entries190r = 0; entries190g = 0; entries190b = 0; entries191r = 0; entries191g = 0; entries191b = 0; entries192r = 0; entries192g = 0; entries192b = 0; entries193r = 0; entries193g = 0; entries193b = 0; entries194r = 0; entries194g = 0; entries194b = 0; entries195r = 0; entries195g = 0; entries195b = 0; entries196r = 0; entries196g = 0; entries196b = 0; entries197r = 0; entries197g = 0; entries197b = 0; entries198r = 0; entries198g = 0; entries198b = 0; entries199r = 0; entries199g = 0; entries199b = 0; entries200r = 0; entries200g = 0; entries200b = 0; entries201r = 0; entries201g = 0; entries201b = 0; entries202r = 0; entries202g = 0; entries202b = 0; entries203r = 0; entries203g = 0; entries203b = 0; entries204r = 0; entries204g = 0; entries204b = 0; entries205r = 0; entries205g = 0; entries205b = 0; entries206r = 0; entries206g = 0; entries206b = 0; entries207r = 0; entries207g = 0; entries207b = 0; entries208r = 0; entries208g = 0; entries208b = 0; entries209r = 0; entries209g = 0; entries209b = 0; entries210r = 0; entries210g = 0; entries210b = 0; entries211r = 0; entries211g = 0; entries211b = 0; entries212r = 0; entries212g = 0; entries212b = 0; entries213r = 0; entries213g = 0; entries213b = 0; entries214r = 0; entries214g = 0; entries214b = 0; entries215r = 0; entries215g = 0; entries215b = 0; entries216r = 0; entries216g = 0; entries216b = 0; entries217r = 0; entries217g = 0; entries217b = 0; entries218r = 0; entries218g = 0; entries218b = 0; entries219r = 0; entries219g = 0; entries219b = 0; entries220r = 0; entries220g = 0; entries220b = 0; entries221r = 0; entries221g = 0; entries221b = 0; entries222r = 0; entries222g = 0; entries222b = 0; entries223r = 0; entries223g = 0; entries223b = 0; entries224r = 0; entries224g = 0; entries224b = 0; entries225r = 0; entries225g = 0; entries225b = 0; entries226r = 0; entries226g = 0; entries226b = 0; entries227r = 0; entries227g = 0; entries227b = 0; entries228r = 0; entries228g = 0; entries228b = 0; entries229r = 0; entries229g = 0; entries229b = 0; entries230r = 0; entries230g = 0; entries230b = 0; entries231r = 0; entries231g = 0; entries231b = 0; entries232r = 0; entries232g = 0; entries232b = 0; entries233r = 0; entries233g = 0; entries233b = 0; entries234r = 63; entries234g = 0; entries234b = 0; entries235r = 63; entries235g = 9; entries235b = 0; entries236r = 63; entries236g = 18; entries236b = 0; entries237r = 63; entries237g = 27; entries237b = 0; entries238r = 63; entries238g = 36; entries238b = 0; entries239r = 63; entries239g = 45; entries239b = 0; entries240r = 63; entries240g = 54; entries240b = 0; entries241r = 63; entries241g = 63; entries241b = 0; entries242r = 42; entries242g = 60; entries242b = 0; entries243r = 21; entries243g = 58; entries243b = 0; entries244r = 0; entries244g = 56; entries244b = 0; entries245r = 63; entries245g = 0; entries245b = 0; entries246r = 58; entries246g = 1; entries246b = 5; entries247r = 54; entries247g = 3; entries247b = 11; entries248r = 49; entries248g = 5; entries248b = 17; entries249r = 45; entries249g = 6; entries249b = 22; entries250r = 40; entries250g = 8; entries250b = 28; entries251r = 36; entries251g = 10; entries251b = 34; entries252r = 31; entries252g = 11; entries252b = 39; entries253r = 27; entries253g = 13; entries253b = 45; entries254r = 22; entries254g = 15; entries254b = 51; entries255r = 18; entries255g = 17; entries255b = 57; }; colorAnim : { colorAnim0from = 129; colorAnim0to = 131; colorAnim1from = 133; colorAnim1to = 136; colorAnim2from = 152; colorAnim2to = 159; colorAnim3from = 168; colorAnim3to = 171; }; }; Menus : { MainMenu : { items0 : { color = 10; disColour = 10; string = "RESUME GAME"; }; items1 : { color = 10; disColour = 10; string = "NEW GAME"; }; items2 : { color = 48; disColour = 48; string = "OPTIONS"; }; items3 : { color = 6; disColour = 6; string = "QUIT TO OS"; }; }; SettingsMenu : { items0 : { color = 48; disColour = 7; string = "GAME MODE"; }; items1 : { color = 48; disColour = 7; string = "LIVES"; }; items2 : { color = 48; disColour = 7; string = "TIME TO LOSE"; }; items3 : { color = 48; disColour = 7; string = "FLAGS TO WIN"; }; items4 : { color = 48; disColour = 7; string = "LOADING TIMES"; }; items5 : { color = 48; disColour = 7; string = "MAX BONUSES"; }; items6 : { color = 48; disColour = 7; string = "NAMES ON BONUSES"; }; items7 : { color = 48; disColour = 7; string = "MAP"; }; items8 : { color = 48; disColour = 7; string = "AMOUNT OF BLOOD"; }; items9 : { color = 48; disColour = 7; string = "LEVEL"; }; items10 : { color = 48; disColour = 7; string = "REGENERATE LEVEL"; }; items11 : { color = 48; disColour = 7; string = "SHADOWS"; }; items12 : { color = 48; disColour = 7; string = "SCREEN SYNC."; }; items13 : { color = 48; disColour = 7; string = "LOAD+CHANGE"; }; items14 : { color = 48; disColour = 7; string = "PLAYER 1 OPTIONS"; }; items15 : { color = 48; disColour = 7; string = "PLAYER 2 OPTIONS"; }; items16 : { color = 48; disColour = 7; string = "WEAPON OPTIONS"; }; }; PlayerMenu : { items0 : { color = 48; disColour = 7; string = "NAME"; }; items1 : { color = 48; disColour = 7; string = "HEALTH"; }; items2 : { color = 48; disColour = 7; string = "Red"; }; items3 : { color = 48; disColour = 7; string = "Green"; }; items4 : { color = 48; disColour = 7; string = "Blue"; }; items5 : { color = 48; disColour = 7; string = "AIM UP"; }; items6 : { color = 48; disColour = 7; string = "AIM DOWN"; }; items7 : { color = 48; disColour = 7; string = "MOVE LEFT"; }; items8 : { color = 48; disColour = 7; string = "MOVE RIGHT"; }; items9 : { color = 48; disColour = 7; string = "FIRE"; }; items10 : { color = 48; disColour = 7; string = "CHANGE"; }; items11 : { color = 48; disColour = 7; string = "JUMP"; }; items12 : { color = 48; disColour = 7; string = "DIG"; }; items13 : { color = 48; disColour = 7; string = "CONTROLLER"; }; }; }; Gfx : { bonusFrames = [ 100, 101 ]; }; Materials : { flags0 = 0; flags1 = 9; flags2 = 10; flags3 = 0; flags4 = 0; flags5 = 0; flags6 = 0; flags7 = 0; flags8 = 0; flags9 = 0; flags10 = 0; flags11 = 0; flags12 = 1; flags13 = 1; flags14 = 1; flags15 = 1; flags16 = 1; flags17 = 1; flags18 = 1; flags19 = 4; flags20 = 4; flags21 = 4; flags22 = 4; flags23 = 4; flags24 = 4; flags25 = 4; flags26 = 4; flags27 = 4; flags28 = 4; flags29 = 4; flags30 = 32; flags31 = 32; flags32 = 32; flags33 = 32; flags34 = 32; flags35 = 32; flags36 = 32; flags37 = 32; flags38 = 32; flags39 = 0; flags40 = 0; flags41 = 0; flags42 = 0; flags43 = 0; flags44 = 0; flags45 = 0; flags46 = 0; flags47 = 0; flags48 = 0; flags49 = 0; flags50 = 0; flags51 = 0; flags52 = 0; flags53 = 0; flags54 = 0; flags55 = 1; flags56 = 1; flags57 = 1; flags58 = 1; flags59 = 4; flags60 = 4; flags61 = 4; flags62 = 0; flags63 = 0; flags64 = 0; flags65 = 0; flags66 = 0; flags67 = 0; flags68 = 0; flags69 = 0; flags70 = 0; flags71 = 0; flags72 = 0; flags73 = 0; flags74 = 0; flags75 = 0; flags76 = 0; flags77 = 9; flags78 = 9; flags79 = 9; flags80 = 0; flags81 = 0; flags82 = 1; flags83 = 1; flags84 = 1; flags85 = 4; flags86 = 4; flags87 = 4; flags88 = 1; flags89 = 1; flags90 = 1; flags91 = 4; flags92 = 4; flags93 = 4; flags94 = 2; flags95 = 2; flags96 = 2; flags97 = 2; flags98 = 1; flags99 = 1; flags100 = 1; flags101 = 1; flags102 = 1; flags103 = 1; flags104 = 0; flags105 = 0; flags106 = 0; flags107 = 0; flags108 = 0; flags109 = 0; flags110 = 0; flags111 = 0; flags112 = 0; flags113 = 0; flags114 = 0; flags115 = 0; flags116 = 0; flags117 = 0; flags118 = 0; flags119 = 0; flags120 = 1; flags121 = 1; flags122 = 1; flags123 = 4; flags124 = 4; flags125 = 4; flags126 = 0; flags127 = 0; flags128 = 0; flags129 = 0; flags130 = 8; flags131 = 0; flags132 = 0; flags133 = 0; flags134 = 0; flags135 = 0; flags136 = 0; flags137 = 0; flags138 = 0; flags139 = 0; flags140 = 0; flags141 = 0; flags142 = 0; flags143 = 0; flags144 = 0; flags145 = 0; flags146 = 0; flags147 = 0; flags148 = 0; flags149 = 0; flags150 = 0; flags151 = 0; flags152 = 0; flags153 = 0; flags154 = 0; flags155 = 0; flags156 = 0; flags157 = 0; flags158 = 0; flags159 = 0; flags160 = 24; flags161 = 24; flags162 = 24; flags163 = 24; flags164 = 8; flags165 = 8; flags166 = 8; flags167 = 8; flags168 = 0; flags169 = 0; flags170 = 0; flags171 = 0; flags172 = 0; flags173 = 0; flags174 = 0; flags175 = 0; flags176 = 1; flags177 = 1; flags178 = 1; flags179 = 1; flags180 = 1; flags181 = 0; flags182 = 0; flags183 = 0; flags184 = 0; flags185 = 0; flags186 = 0; flags187 = 0; flags188 = 0; flags189 = 0; flags190 = 0; flags191 = 0; flags192 = 0; flags193 = 0; flags194 = 0; flags195 = 0; flags196 = 0; flags197 = 0; flags198 = 0; flags199 = 0; flags200 = 0; flags201 = 0; flags202 = 0; flags203 = 0; flags204 = 0; flags205 = 0; flags206 = 0; flags207 = 0; flags208 = 0; flags209 = 0; flags210 = 0; flags211 = 0; flags212 = 0; flags213 = 0; flags214 = 0; flags215 = 0; flags216 = 0; flags217 = 0; flags218 = 0; flags219 = 0; flags220 = 0; flags221 = 0; flags222 = 0; flags223 = 0; flags224 = 0; flags225 = 0; flags226 = 0; flags227 = 0; flags228 = 0; flags229 = 0; flags230 = 0; flags231 = 0; flags232 = 0; flags233 = 0; flags234 = 0; flags235 = 0; flags236 = 0; flags237 = 0; flags238 = 0; flags239 = 0; flags240 = 0; flags241 = 0; flags242 = 0; flags243 = 0; flags244 = 0; flags245 = 0; flags246 = 0; flags247 = 0; flags248 = 0; flags249 = 0; flags250 = 0; flags251 = 0; flags252 = 0; flags253 = 0; flags254 = 0; flags255 = 0; }; Weapons : { weapOrder : { weapOrder1 = 3; weapOrder2 = 19; weapOrder3 = 12; weapOrder4 = 34; weapOrder5 = 27; weapOrder6 = 13; weapOrder7 = 26; weapOrder8 = 1; weapOrder9 = 33; weapOrder10 = 15; weapOrder11 = 20; weapOrder12 = 37; weapOrder13 = 4; weapOrder14 = 8; weapOrder15 = 5; weapOrder16 = 24; weapOrder17 = 9; weapOrder18 = 23; weapOrder19 = 39; weapOrder20 = 35; weapOrder21 = 18; weapOrder22 = 10; weapOrder23 = 17; weapOrder24 = 25; weapOrder25 = 11; weapOrder26 = 28; weapOrder27 = 6; weapOrder28 = 14; weapOrder29 = 22; weapOrder30 = 36; weapOrder31 = 32; weapOrder32 = 30; weapOrder33 = 38; weapOrder34 = 2; weapOrder35 = 0; weapOrder36 = 29; weapOrder37 = 16; weapOrder38 = 31; weapOrder39 = 7; weapOrder40 = 21; }; weapons : { weapons0 : { name = "SHOTGUN"; detectDistance = 0; affectByWorm = true; blowAway = 4; gravity = 700; shadow = true; laserSight = false; launchSound = 0; loopSound = 0; exploSound = -1; speed = 250; addSpeed = 0; distribution = 12000; parts = 15; recoil = 55; multSpeed = 100; delay = 57; loadingTime = 235; ammo = 5; createOnExp = 2; dirtEffect = -1; leaveShells = 1; leaveShellDelay = 28; playReloadSound = true; wormExplode = false; explGround = true; wormCollide = true; fireCone = 9; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 1; bloodOnHit = 3; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 75; splinterAmount = 0; splinterColour = 0; splinterType = 2; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons1 : { name = "CHAINGUN"; detectDistance = 0; affectByWorm = true; blowAway = 5; gravity = 700; shadow = true; laserSight = false; launchSound = 1; loopSound = 0; exploSound = -1; speed = 250; addSpeed = 0; distribution = 3000; parts = 1; recoil = 6; multSpeed = 100; delay = 3; loadingTime = 315; ammo = 50; createOnExp = 2; dirtEffect = -1; leaveShells = 2; leaveShellDelay = 1; playReloadSound = true; wormExplode = false; explGround = true; wormCollide = true; fireCone = 6; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 3; bloodOnHit = 4; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 68; splinterAmount = 0; splinterColour = 0; splinterType = 2; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons2 : { name = "RIFLE"; detectDistance = 0; affectByWorm = true; blowAway = 70; gravity = 20; shadow = true; laserSight = true; launchSound = 2; loopSound = 0; exploSound = -1; speed = 250; addSpeed = 0; distribution = 0; parts = 1; recoil = 70; multSpeed = 100; delay = 0; loadingTime = 275; ammo = 1; createOnExp = 2; dirtEffect = -1; leaveShells = 1; leaveShellDelay = 1; playReloadSound = true; wormExplode = false; explGround = true; wormCollide = true; fireCone = 8; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 34; bloodOnHit = 20; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 4; colorBullets = 68; splinterAmount = 4; splinterColour = 67; splinterType = 3; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons3 : { name = "BAZOOKA"; detectDistance = 1; affectByWorm = true; blowAway = 0; gravity = 0; shadow = true; laserSight = false; launchSound = 3; loopSound = 0; exploSound = -1; speed = 200; addSpeed = 3; distribution = 0; parts = 1; recoil = 15; multSpeed = 100; delay = 75; loadingTime = 410; ammo = 3; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 9; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 12; bloodOnHit = 30; startFrame = 2; numFrames = 0; loopAnim = false; shotType = 3; colorBullets = 0; splinterAmount = 12; splinterColour = 66; splinterType = 3; splinterScatter = 0; objTrailType = 3; objTrailDelay = 4; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons4 : { name = "DIRTBALL"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1000; shadow = true; laserSight = false; launchSound = 4; loopSound = 0; exploSound = 13; speed = 200; addSpeed = 0; distribution = 12000; parts = 1; recoil = 0; multSpeed = 100; delay = 20; loadingTime = 225; ammo = 5; createOnExp = -1; dirtEffect = 4; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = false; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 30; timeToExplo = 80; timeToExploV = 20; hitDamage = 0; bloodOnHit = 0; startFrame = 87; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 5; splinterColour = 0; splinterType = 13; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons5 : { name = "EXPLOSIVES"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1000; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 150; addSpeed = 0; distribution = 16000; parts = 3; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 113; ammo = 1; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = true; explGround = false; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 30; timeToExplo = 55; timeToExploV = 10; hitDamage = 0; bloodOnHit = 0; startFrame = 88; numFrames = 3; loopAnim = true; shotType = 0; colorBullets = 0; splinterAmount = 0; splinterColour = 0; splinterType = 2; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons6 : { name = "MINE"; detectDistance = 2; affectByWorm = true; blowAway = 60; gravity = 1000; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 95; addSpeed = 0; distribution = 8000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 220; ammo = 1; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = true; explGround = false; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 40; timeToExplo = 15000; timeToExploV = 600; hitDamage = 12; bloodOnHit = 20; startFrame = 63; numFrames = 3; loopAnim = true; shotType = 0; colorBullets = 0; splinterAmount = 5; splinterColour = 66; splinterType = 3; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons7 : { name = "WINCHESTER"; detectDistance = 0; affectByWorm = true; blowAway = 70; gravity = 20; shadow = true; laserSight = false; launchSound = 2; loopSound = 0; exploSound = -1; speed = 250; addSpeed = 0; distribution = 100; parts = 1; recoil = 35; multSpeed = 100; delay = 35; loadingTime = 410; ammo = 9; createOnExp = 2; dirtEffect = -1; leaveShells = 1; leaveShellDelay = 1; playReloadSound = true; wormExplode = false; explGround = true; wormCollide = true; fireCone = 8; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 12; bloodOnHit = 15; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 4; colorBullets = 68; splinterAmount = 3; splinterColour = 67; splinterType = 3; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons8 : { name = "DOOMSDAY"; detectDistance = 1; affectByWorm = true; blowAway = 15; gravity = 0; shadow = true; laserSight = false; launchSound = 6; loopSound = 0; exploSound = -1; speed = 170; addSpeed = 3; distribution = 2000; parts = 2; recoil = 15; multSpeed = 100; delay = 11; loadingTime = 500; ammo = 8; createOnExp = 1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 8; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 0; bloodOnHit = 10; startFrame = 17; numFrames = 0; loopAnim = false; shotType = 3; colorBullets = 0; splinterAmount = 0; splinterColour = 0; splinterType = 2; splinterScatter = 0; objTrailType = 6; objTrailDelay = 2; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons9 : { name = "FLAMER"; detectDistance = 1; affectByWorm = true; blowAway = 0; gravity = -300; shadow = false; laserSight = false; launchSound = -1; loopSound = 1; exploSound = -1; speed = 140; addSpeed = 0; distribution = 10000; parts = 2; recoil = 0; multSpeed = 100; delay = 2; loadingTime = 320; ammo = 100; createOnExp = -1; dirtEffect = 5; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = false; explGround = true; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 40; timeToExploV = 5; hitDamage = 1; bloodOnHit = 0; startFrame = 49; numFrames = 5; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons10 : { name = "GRENADE"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1300; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 170; addSpeed = 0; distribution = 7000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 260; ammo = 1; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = false; explGround = false; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 40; timeToExplo = 115; timeToExploV = 10; hitDamage = 0; bloodOnHit = 0; startFrame = 96; numFrames = 3; loopAnim = true; shotType = 0; colorBullets = 0; splinterAmount = 50; splinterColour = 54; splinterType = 5; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons11 : { name = "LARPA"; detectDistance = 1; affectByWorm = true; blowAway = 40; gravity = 200; shadow = true; laserSight = false; launchSound = 6; loopSound = 0; exploSound = -1; speed = 220; addSpeed = 0; distribution = 0; parts = 1; recoil = 20; multSpeed = 100; delay = 20; loadingTime = 360; ammo = 5; createOnExp = 1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 7; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 0; bloodOnHit = 6; startFrame = 30; numFrames = 0; loopAnim = false; shotType = 1; colorBullets = 0; splinterAmount = 5; splinterColour = 67; splinterType = 3; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 1; partTrailObj = 5; partTrailDelay = 4; }; weapons12 : { name = "BLASTER"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1000; shadow = true; laserSight = false; launchSound = 4; loopSound = 0; exploSound = -1; speed = 150; addSpeed = 0; distribution = 0; parts = 1; recoil = 30; multSpeed = 100; delay = 80; loadingTime = 320; ammo = 3; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = false; fireCone = 8; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 0; bloodOnHit = 0; startFrame = 86; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 45; splinterColour = 75; splinterType = 3; splinterScatter = 0; objTrailType = 3; objTrailDelay = 8; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons13 : { name = "BOUNCY MINE"; detectDistance = 2; affectByWorm = true; blowAway = 22; gravity = 1000; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 100; addSpeed = 0; distribution = 8000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 250; ammo = 1; createOnExp = 1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = true; explGround = false; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 100; timeToExplo = 12000; timeToExploV = 800; hitDamage = 18; bloodOnHit = 18; startFrame = 126; numFrames = 2; loopAnim = true; shotType = 0; colorBullets = 0; splinterAmount = 7; splinterColour = 66; splinterType = 3; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons14 : { name = "MINIGUN"; detectDistance = 0; affectByWorm = true; blowAway = 5; gravity = 700; shadow = true; laserSight = false; launchSound = 1; loopSound = 0; exploSound = -1; speed = 260; addSpeed = 0; distribution = 6000; parts = 1; recoil = 6; multSpeed = 100; delay = 0; loadingTime = 500; ammo = 70; createOnExp = 2; dirtEffect = -1; leaveShells = 4; leaveShellDelay = 1; playReloadSound = true; wormExplode = false; explGround = true; wormCollide = true; fireCone = 6; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 2; bloodOnHit = 2; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 68; splinterAmount = 0; splinterColour = 0; splinterType = 2; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons15 : { name = "CLUSTER BOMB"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1300; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 170; addSpeed = 0; distribution = 7000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 400; ammo = 1; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = false; explGround = false; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 50; timeToExplo = 135; timeToExploV = 15; hitDamage = 0; bloodOnHit = 0; startFrame = 96; numFrames = 3; loopAnim = true; shotType = 0; colorBullets = 0; splinterAmount = 20; splinterColour = 0; splinterType = 8; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons16 : { name = "SUPER SHOTGUN"; detectDistance = 0; affectByWorm = true; blowAway = 3; gravity = 700; shadow = true; laserSight = false; launchSound = 0; loopSound = 0; exploSound = -1; speed = 260; addSpeed = 0; distribution = 20000; parts = 40; recoil = 200; multSpeed = 100; delay = 80; loadingTime = 420; ammo = 2; createOnExp = 2; dirtEffect = -1; leaveShells = 1; leaveShellDelay = 28; playReloadSound = true; wormExplode = false; explGround = true; wormCollide = true; fireCone = 10; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 1; bloodOnHit = 2; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 75; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons17 : { name = "HANDGUN"; detectDistance = 0; affectByWorm = true; blowAway = 20; gravity = 700; shadow = true; laserSight = true; launchSound = 1; loopSound = 0; exploSound = -1; speed = 360; addSpeed = 0; distribution = 2000; parts = 1; recoil = 20; multSpeed = 100; delay = 20; loadingTime = 220; ammo = 15; createOnExp = 2; dirtEffect = -1; leaveShells = 1; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 6; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 6; bloodOnHit = 4; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 68; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons18 : { name = "GREENBALL"; detectDistance = 3; affectByWorm = true; blowAway = 0; gravity = 700; shadow = true; laserSight = false; launchSound = -1; loopSound = 0; exploSound = 13; speed = 200; addSpeed = 0; distribution = 8000; parts = 1; recoil = 10; multSpeed = 100; delay = 4; loadingTime = 220; ammo = 40; createOnExp = -1; dirtEffect = 6; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 0; bloodOnHit = 0; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 54; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons19 : { name = "BIG NUKE"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1000; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = 4; speed = 170; addSpeed = 0; distribution = 20000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 700; ammo = 1; createOnExp = -1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = false; explGround = false; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 65; timeToExplo = 170; timeToExploV = 20; hitDamage = 0; bloodOnHit = 0; startFrame = 16; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 50; splinterColour = 0; splinterType = 9; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons20 : { name = "CRACKLER"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1000; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 170; addSpeed = 0; distribution = 32000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 550; ammo = 1; createOnExp = 1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = false; explGround = false; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 90; timeToExplo = 400; timeToExploV = 50; hitDamage = 0; bloodOnHit = 0; startFrame = 69; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 8; splinterColour = 75; splinterType = 4; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = 4; partTrailDelay = 2; }; weapons21 : { name = "ZIMM"; detectDistance = 1; affectByWorm = true; blowAway = 0; gravity = 0; shadow = false; laserSight = false; launchSound = 6; loopSound = 0; exploSound = -1; speed = 300; addSpeed = 0; distribution = 0; parts = 1; recoil = 30; multSpeed = 100; delay = 70; loadingTime = 540; ammo = 2; createOnExp = 4; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = false; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = false; bounce = 100; timeToExplo = 1000; timeToExploV = 300; hitDamage = 49; bloodOnHit = 15; startFrame = 70; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons22 : { name = "MINI NUKE"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1000; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = 4; speed = 180; addSpeed = 0; distribution = 8000; parts = 1; recoil = 20; multSpeed = 100; delay = 30; loadingTime = 450; ammo = 2; createOnExp = -1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = false; explGround = false; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 75; timeToExplo = 70; timeToExploV = 4; hitDamage = 0; bloodOnHit = 0; startFrame = 85; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 6; splinterColour = 0; splinterType = 11; splinterScatter = 1; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons23 : { name = "FLOAT MINE"; detectDistance = 2; affectByWorm = true; blowAway = 22; gravity = 5; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 40; addSpeed = 0; distribution = 14000; parts = 1; recoil = 0; multSpeed = 98; delay = 20; loadingTime = 280; ammo = 2; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = false; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 100; timeToExplo = 13000; timeToExploV = 600; hitDamage = 0; bloodOnHit = 18; startFrame = 68; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 8; splinterColour = 67; splinterType = 4; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons24 : { name = "FAN"; detectDistance = 1; affectByWorm = true; blowAway = 30; gravity = 0; shadow = false; laserSight = false; launchSound = -1; loopSound = 1; exploSound = -1; speed = 180; addSpeed = 0; distribution = 12000; parts = 1; recoil = 2; multSpeed = 100; delay = 0; loadingTime = 220; ammo = 150; createOnExp = -1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = false; explGround = true; wormCollide = true; fireCone = 0; collideWithObjects = true; affectByExplosions = false; bounce = 0; timeToExplo = 45; timeToExploV = 10; hitDamage = 0; bloodOnHit = 0; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 25; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons25 : { name = "HELLRAIDER"; detectDistance = 0; affectByWorm = true; blowAway = 60; gravity = 1000; shadow = true; laserSight = false; launchSound = 3; loopSound = 0; exploSound = -1; speed = 150; addSpeed = 0; distribution = 800; parts = 1; recoil = 50; multSpeed = 100; delay = 0; loadingTime = 640; ammo = 1; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = false; wormCollide = false; fireCone = 8; collideWithObjects = false; affectByExplosions = false; bounce = 80; timeToExplo = 150; timeToExploV = 20; hitDamage = 5; bloodOnHit = 15; startFrame = 69; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 10; splinterColour = 0; splinterType = 10; splinterScatter = 0; objTrailType = 1; objTrailDelay = 8; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons26 : { name = "CANNON"; detectDistance = 1; affectByWorm = true; blowAway = 20; gravity = 700; shadow = true; laserSight = false; launchSound = 11; loopSound = 0; exploSound = -1; speed = 200; addSpeed = 0; distribution = 300; parts = 1; recoil = 40; multSpeed = 100; delay = 10; loadingTime = 450; ammo = 6; createOnExp = 1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 8; collideWithObjects = false; affectByExplosions = true; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 0; bloodOnHit = 15; startFrame = 83; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 5; splinterColour = 66; splinterType = 3; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons27 : { name = "BOUNCY LARPA"; detectDistance = 1; affectByWorm = true; blowAway = 40; gravity = 200; shadow = true; laserSight = false; launchSound = 6; loopSound = 0; exploSound = -1; speed = 220; addSpeed = 0; distribution = 0; parts = 1; recoil = 20; multSpeed = 100; delay = 30; loadingTime = 390; ammo = 4; createOnExp = 1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 7; collideWithObjects = false; affectByExplosions = false; bounce = 100; timeToExplo = 380; timeToExploV = 50; hitDamage = 0; bloodOnHit = 6; startFrame = 84; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 5; splinterColour = 67; splinterType = 3; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 1; partTrailObj = 3; partTrailDelay = 4; }; weapons28 : { name = "LASER"; detectDistance = 0; affectByWorm = false; blowAway = 0; gravity = 0; shadow = false; laserSight = false; launchSound = -1; loopSound = 0; exploSound = -1; speed = 100; addSpeed = 0; distribution = 10; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 400; ammo = 80; createOnExp = 9; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = false; explGround = true; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 1; bloodOnHit = 0; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 4; colorBullets = 104; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons29 : { name = "SPIKEBALLS"; detectDistance = 2; affectByWorm = true; blowAway = 20; gravity = 1000; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 110; addSpeed = 0; distribution = 24000; parts = 8; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 400; ammo = 1; createOnExp = 2; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = false; explGround = false; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 60; timeToExplo = 700; timeToExploV = 100; hitDamage = 9; bloodOnHit = 20; startFrame = 71; numFrames = 3; loopAnim = true; shotType = 0; colorBullets = 0; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons30 : { name = "NAPALM"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1000; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = 4; speed = 130; addSpeed = 0; distribution = 2000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 260; ammo = 1; createOnExp = -1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = true; explGround = true; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 0; timeToExplo = 120; timeToExploV = 10; hitDamage = 0; bloodOnHit = 0; startFrame = 75; numFrames = 7; loopAnim = true; shotType = 0; colorBullets = 0; splinterAmount = 17; splinterColour = 114; splinterType = 12; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons31 : { name = "UZI"; detectDistance = 0; affectByWorm = true; blowAway = 5; gravity = 700; shadow = true; laserSight = false; launchSound = 1; loopSound = 0; exploSound = -1; speed = 220; addSpeed = 0; distribution = 1000; parts = 1; recoil = 2; multSpeed = 100; delay = 1; loadingTime = 140; ammo = 15; createOnExp = 2; dirtEffect = -1; leaveShells = 2; leaveShellDelay = 1; playReloadSound = true; wormExplode = false; explGround = true; wormCollide = true; fireCone = 6; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 2; bloodOnHit = 3; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 75; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons32 : { name = "MISSILE"; detectDistance = 1; affectByWorm = true; blowAway = 0; gravity = 0; shadow = true; laserSight = false; launchSound = 3; loopSound = 0; exploSound = -1; speed = 230; addSpeed = 150; distribution = 0; parts = 1; recoil = 15; multSpeed = 100; delay = 0; loadingTime = 480; ammo = 1; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 9; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 12; bloodOnHit = 30; startFrame = 0; numFrames = 0; loopAnim = false; shotType = 2; colorBullets = 0; splinterAmount = 12; splinterColour = 66; splinterType = 3; splinterScatter = 0; objTrailType = 3; objTrailDelay = 4; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons33 : { name = "CHIQUITA BOMB"; detectDistance = 0; affectByWorm = true; blowAway = 0; gravity = 1300; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 170; addSpeed = 0; distribution = 7000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 600; ammo = 1; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = false; explGround = false; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 40; timeToExplo = 150; timeToExploV = 15; hitDamage = 0; bloodOnHit = 0; startFrame = 105; numFrames = 3; loopAnim = true; shotType = 0; colorBullets = 0; splinterAmount = 22; splinterColour = 0; splinterType = 14; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons34 : { name = "BOOBY TRAP"; detectDistance = 3; affectByWorm = true; blowAway = 0; gravity = 1500; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 100; addSpeed = 0; distribution = 20000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 300; ammo = 1; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = true; explGround = false; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 30; timeToExplo = 4000; timeToExploV = 600; hitDamage = 5; bloodOnHit = 20; startFrame = 100; numFrames = 0; loopAnim = true; shotType = 0; colorBullets = 0; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons35 : { name = "GRASSHOPPER"; detectDistance = 1; affectByWorm = true; blowAway = 0; gravity = 1100; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 190; addSpeed = 0; distribution = 7000; parts = 1; recoil = 0; multSpeed = 100; delay = 0; loadingTime = 300; ammo = 1; createOnExp = 0; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = true; explGround = true; wormCollide = true; fireCone = 0; collideWithObjects = false; affectByExplosions = true; bounce = 0; timeToExplo = 130; timeToExploV = 50; hitDamage = 0; bloodOnHit = 0; startFrame = 129; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 0; splinterAmount = 1; splinterColour = 0; splinterType = 15; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons36 : { name = "MINI ROCKETS"; detectDistance = 1; affectByWorm = true; blowAway = 10; gravity = 0; shadow = true; laserSight = false; launchSound = 6; loopSound = 0; exploSound = -1; speed = 170; addSpeed = 3; distribution = 600; parts = 1; recoil = 5; multSpeed = 100; delay = 7; loadingTime = 380; ammo = 10; createOnExp = 10; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 7; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 2; bloodOnHit = 8; startFrame = 113; numFrames = 0; loopAnim = false; shotType = 3; colorBullets = 0; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = 6; objTrailDelay = 2; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons37 : { name = "DART"; detectDistance = 0; affectByWorm = true; blowAway = 28; gravity = 200; shadow = true; laserSight = false; launchSound = 5; loopSound = 0; exploSound = -1; speed = 220; addSpeed = 0; distribution = 0; parts = 1; recoil = 0; multSpeed = 100; delay = 30; loadingTime = 200; ammo = 5; createOnExp = 2; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = false; wormExplode = false; explGround = true; wormCollide = false; fireCone = 0; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 5; bloodOnHit = 10; startFrame = 113; numFrames = 0; loopAnim = false; shotType = 1; colorBullets = 0; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons38 : { name = "RB RAMPAGE"; detectDistance = 0; affectByWorm = true; blowAway = 4; gravity = 700; shadow = true; laserSight = false; launchSound = 1; loopSound = 0; exploSound = -1; speed = 190; addSpeed = 0; distribution = 1000; parts = 1; recoil = 4; multSpeed = 100; delay = 2; loadingTime = 260; ammo = 10; createOnExp = 2; dirtEffect = -1; leaveShells = 1; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = false; wormCollide = true; fireCone = 6; collideWithObjects = false; affectByExplosions = false; bounce = 99; timeToExplo = 580; timeToExploV = 70; hitDamage = 0; bloodOnHit = 4; startFrame = -1; numFrames = 0; loopAnim = false; shotType = 0; colorBullets = 101; splinterAmount = 0; splinterColour = 0; splinterType = -1; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; weapons39 : { name = "GAUSS GUN"; detectDistance = 1; affectByWorm = true; blowAway = 20; gravity = 50; shadow = true; laserSight = false; launchSound = 10; loopSound = 0; exploSound = -1; speed = 200; addSpeed = 0; distribution = 0; parts = 5; recoil = 90; multSpeed = 100; delay = 5; loadingTime = 400; ammo = 1; createOnExp = 1; dirtEffect = -1; leaveShells = 0; leaveShellDelay = 1; playReloadSound = true; wormExplode = true; explGround = true; wormCollide = true; fireCone = 10; collideWithObjects = false; affectByExplosions = false; bounce = 0; timeToExplo = 0; timeToExploV = 0; hitDamage = 0; bloodOnHit = 7; startFrame = 86; numFrames = 0; loopAnim = false; shotType = 4; colorBullets = 0; splinterAmount = 1; splinterColour = 75; splinterType = 3; splinterScatter = 0; objTrailType = -1; objTrailDelay = 0; partTrailType = 0; partTrailObj = -1; partTrailDelay = 0; }; }; sobjectTypes : { sobjectTypes0 : { startSound = 9; numSounds = 4; animDelay = 2; startFrame = 40; numFrames = 15; detectRange = 20; damage = 15; blowAway = 3000; shadow = true; shake = 4; flash = 8; dirtEffect = 0; }; sobjectTypes1 : { startSound = 9; numSounds = 4; animDelay = 2; startFrame = 45; numFrames = 10; detectRange = 14; damage = 10; blowAway = 3000; shadow = true; shake = 2; flash = 4; dirtEffect = 1; }; sobjectTypes2 : { startSound = 7; numSounds = 2; animDelay = 2; startFrame = 50; numFrames = 5; detectRange = 8; damage = 5; blowAway = 3000; shadow = true; shake = 1; flash = 0; dirtEffect = 2; }; sobjectTypes3 : { startSound = -1; numSounds = 0; animDelay = 4; startFrame = 64; numFrames = 4; detectRange = 0; damage = 0; blowAway = 0; shadow = false; shake = 0; flash = 0; dirtEffect = -1; }; sobjectTypes4 : { startSound = -1; numSounds = 0; animDelay = 4; startFrame = 100; numFrames = 3; detectRange = 0; damage = 0; blowAway = 0; shadow = true; shake = 0; flash = 0; dirtEffect = 5; }; sobjectTypes5 : { startSound = -1; numSounds = 0; animDelay = 2; startFrame = 104; numFrames = 3; detectRange = 0; damage = 0; blowAway = 0; shadow = false; shake = 0; flash = 0; dirtEffect = -1; }; sobjectTypes6 : { startSound = -1; numSounds = 0; animDelay = 2; startFrame = 76; numFrames = 2; detectRange = 0; damage = 0; blowAway = 0; shadow = true; shake = 0; flash = 0; dirtEffect = -1; }; sobjectTypes7 : { startSound = -1; numSounds = 0; animDelay = 2; startFrame = 91; numFrames = 4; detectRange = 0; damage = 0; blowAway = 0; shadow = true; shake = 0; flash = 0; dirtEffect = -1; }; sobjectTypes8 : { startSound = -1; numSounds = 0; animDelay = 2; startFrame = 49; numFrames = 6; detectRange = 8; damage = 7; blowAway = 0; shadow = true; shake = 0; flash = 0; dirtEffect = 2; }; sobjectTypes9 : { startSound = -1; numSounds = 0; animDelay = 2; startFrame = 53; numFrames = 2; detectRange = 6; damage = 0; blowAway = 0; shadow = true; shake = 0; flash = 0; dirtEffect = 5; }; sobjectTypes10 : { startSound = 9; numSounds = 4; animDelay = 2; startFrame = 47; numFrames = 8; detectRange = 10; damage = 8; blowAway = 3000; shadow = true; shake = 2; flash = 3; dirtEffect = 8; }; sobjectTypes11 : { startSound = 9; numSounds = 4; animDelay = 2; startFrame = 42; numFrames = 13; detectRange = 15; damage = 13; blowAway = 3000; shadow = true; shake = 3; flash = 6; dirtEffect = 1; }; sobjectTypes12 : { startSound = 9; numSounds = 4; animDelay = 2; startFrame = 44; numFrames = 11; detectRange = 14; damage = 12; blowAway = 3000; shadow = true; shake = 3; flash = 5; dirtEffect = 1; }; sobjectTypes13 : { startSound = -1; numSounds = 0; animDelay = 0; startFrame = 0; numFrames = 0; detectRange = 0; damage = 0; blowAway = 65793; shadow = false; shake = 0; flash = 0; dirtEffect = -1; }; }; nobjectTypes : { nobjectTypes0 : { detectDistance = 0; gravity = 1000; speed = 120; speedV = 40; distribution = 8000; blowAway = 0; bounce = 10; hitDamage = 0; wormExplode = false; explGround = true; wormDestroy = false; bloodOnHit = 0; startFrame = 55; numFrames = 3; drawOnMap = true; colorBullets = 0; createOnExp = -1; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = true; bloodTrailDelay = 10; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes1 : { detectDistance = 0; gravity = 1000; speed = 120; speedV = 40; distribution = 8000; blowAway = 0; bounce = 10; hitDamage = 0; wormExplode = false; explGround = true; wormDestroy = false; bloodOnHit = 0; startFrame = 59; numFrames = 3; drawOnMap = true; colorBullets = 0; createOnExp = -1; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = true; bloodTrailDelay = 10; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes2 : { detectDistance = 0; gravity = 700; speed = 80; speedV = 40; distribution = 10000; blowAway = 0; bounce = 0; hitDamage = 0; wormExplode = false; explGround = true; wormDestroy = false; bloodOnHit = 0; startFrame = 0; numFrames = 0; drawOnMap = false; colorBullets = 17; createOnExp = -1; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes3 : { detectDistance = 0; gravity = 700; speed = 160; speedV = 140; distribution = 2000; blowAway = 10; bounce = 0; hitDamage = 2; wormExplode = false; explGround = true; wormDestroy = true; bloodOnHit = 1; startFrame = 0; numFrames = 0; drawOnMap = false; colorBullets = 67; createOnExp = 2; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes4 : { detectDistance = 0; gravity = 700; speed = 190; speedV = 160; distribution = 2000; blowAway = 10; bounce = 0; hitDamage = 3; wormExplode = false; explGround = true; wormDestroy = true; bloodOnHit = 1; startFrame = 0; numFrames = 0; drawOnMap = false; colorBullets = 67; createOnExp = 2; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes5 : { detectDistance = 0; gravity = 700; speed = 220; speedV = 180; distribution = 2000; blowAway = 15; bounce = 0; hitDamage = 4; wormExplode = false; explGround = true; wormDestroy = true; bloodOnHit = 1; startFrame = 0; numFrames = 0; drawOnMap = false; colorBullets = 67; createOnExp = 2; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes6 : { detectDistance = 0; gravity = 700; speed = 75; speedV = 40; distribution = 20000; blowAway = 0; bounce = 0; hitDamage = 0; wormExplode = false; explGround = true; wormDestroy = false; bloodOnHit = 0; startFrame = 0; numFrames = 0; drawOnMap = false; colorBullets = 82; createOnExp = -1; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = true; bloodTrailDelay = 10; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes7 : { detectDistance = 0; gravity = 1000; speed = 0; speedV = 0; distribution = 8000; blowAway = 0; bounce = 40; hitDamage = 0; wormExplode = false; explGround = true; wormDestroy = false; bloodOnHit = 0; startFrame = 45; numFrames = 3; drawOnMap = true; colorBullets = 0; createOnExp = -1; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes8 : { detectDistance = 1; gravity = 1000; speed = 220; speedV = 140; distribution = 10000; blowAway = 0; bounce = 0; hitDamage = 1; wormExplode = true; explGround = true; wormDestroy = true; bloodOnHit = 5; startFrame = 92; numFrames = 3; drawOnMap = false; colorBullets = 0; createOnExp = 1; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes9 : { detectDistance = 0; gravity = 1000; speed = 200; speedV = 120; distribution = 20000; blowAway = 0; bounce = 60; hitDamage = 0; wormExplode = false; explGround = false; wormDestroy = false; bloodOnHit = 0; startFrame = 67; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 0; affectByExplosions = true; dirtEffect = -1; splinterAmount = 3; splinterColour = 75; splinterType = 5; bloodTrail = false; bloodTrailDelay = 0; leaveObj = 5; leaveObjDelay = 5; timeToExplo = 200; timeToExploV = 50; }; nobjectTypes10 : { detectDistance = 1; gravity = 1000; speed = 140; speedV = 20; distribution = 20000; blowAway = 15; bounce = 0; hitDamage = 3; wormExplode = true; explGround = true; wormDestroy = true; bloodOnHit = 10; startFrame = 83; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 0; affectByExplosions = false; dirtEffect = -1; splinterAmount = 5; splinterColour = 66; splinterType = 3; bloodTrail = false; bloodTrailDelay = 0; leaveObj = 3; leaveObjDelay = 8; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes11 : { detectDistance = 1; gravity = 1000; speed = 200; speedV = 120; distribution = 20000; blowAway = 0; bounce = 60; hitDamage = 1; wormExplode = true; explGround = false; wormDestroy = true; bloodOnHit = 9; startFrame = 67; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 0; affectByExplosions = true; dirtEffect = -1; splinterAmount = 6; splinterColour = 75; splinterType = 4; bloodTrail = false; bloodTrailDelay = 0; leaveObj = 5; leaveObjDelay = 5; timeToExplo = 100; timeToExploV = 40; }; nobjectTypes12 : { detectDistance = 0; gravity = 1000; speed = 150; speedV = 90; distribution = 10000; blowAway = 0; bounce = 0; hitDamage = 0; wormExplode = false; explGround = true; wormDestroy = false; bloodOnHit = 0; startFrame = 0; numFrames = 0; drawOnMap = false; colorBullets = 10; createOnExp = 8; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = 8; leaveObjDelay = 4; timeToExplo = 40; timeToExploV = 10; }; nobjectTypes13 : { detectDistance = 0; gravity = 0; speed = 400; speedV = 800; distribution = 10000; blowAway = 0; bounce = 100; hitDamage = 0; wormExplode = false; explGround = false; wormDestroy = false; bloodOnHit = 0; startFrame = 0; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = -1; affectByExplosions = false; dirtEffect = 4; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 1; timeToExploV = 0; }; nobjectTypes14 : { detectDistance = 1; gravity = 1000; speed = 220; speedV = 150; distribution = 10000; blowAway = 0; bounce = 0; hitDamage = 4; wormExplode = true; explGround = true; wormDestroy = true; bloodOnHit = 10; startFrame = 109; numFrames = 3; drawOnMap = false; colorBullets = 0; createOnExp = 0; affectByExplosions = false; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes15 : { detectDistance = 1; gravity = 1000; speed = 120; speedV = 40; distribution = 10000; blowAway = 0; bounce = 60; hitDamage = 1; wormExplode = true; explGround = false; wormDestroy = true; bloodOnHit = 0; startFrame = 129; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 0; affectByExplosions = true; dirtEffect = -1; splinterAmount = 1; splinterColour = 0; splinterType = 16; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 70; timeToExploV = 60; }; nobjectTypes16 : { detectDistance = 1; gravity = 1000; speed = 120; speedV = 40; distribution = 10000; blowAway = 0; bounce = 60; hitDamage = 1; wormExplode = true; explGround = false; wormDestroy = true; bloodOnHit = 0; startFrame = 129; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 0; affectByExplosions = true; dirtEffect = -1; splinterAmount = 1; splinterColour = 0; splinterType = 17; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 70; timeToExploV = 60; }; nobjectTypes17 : { detectDistance = 1; gravity = 1000; speed = 120; speedV = 40; distribution = 10000; blowAway = 0; bounce = 60; hitDamage = 1; wormExplode = true; explGround = false; wormDestroy = true; bloodOnHit = 0; startFrame = 129; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 0; affectByExplosions = true; dirtEffect = -1; splinterAmount = 1; splinterColour = 0; splinterType = 18; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 70; timeToExploV = 60; }; nobjectTypes18 : { detectDistance = 1; gravity = 1000; speed = 120; speedV = 40; distribution = 10000; blowAway = 0; bounce = 60; hitDamage = 1; wormExplode = true; explGround = false; wormDestroy = true; bloodOnHit = 0; startFrame = 129; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 11; affectByExplosions = true; dirtEffect = -1; splinterAmount = 1; splinterColour = 0; splinterType = 19; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 70; timeToExploV = 60; }; nobjectTypes19 : { detectDistance = 1; gravity = 1000; speed = 120; speedV = 40; distribution = 10000; blowAway = 0; bounce = 60; hitDamage = 1; wormExplode = true; explGround = false; wormDestroy = true; bloodOnHit = 0; startFrame = 129; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 12; affectByExplosions = true; dirtEffect = -1; splinterAmount = 1; splinterColour = 0; splinterType = 22; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 70; timeToExploV = 60; }; nobjectTypes20 : { detectDistance = 3; gravity = 1000; speed = 0; speedV = 0; distribution = 0; blowAway = 0; bounce = 40; hitDamage = 0; wormExplode = false; explGround = false; wormDestroy = false; bloodOnHit = 0; startFrame = 103; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = -1; affectByExplosions = true; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes21 : { detectDistance = 3; gravity = 1000; speed = 0; speedV = 0; distribution = 0; blowAway = 0; bounce = 40; hitDamage = 0; wormExplode = false; explGround = false; wormDestroy = false; bloodOnHit = 0; startFrame = 104; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = -1; affectByExplosions = true; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 0; timeToExploV = 0; }; nobjectTypes22 : { detectDistance = 1; gravity = 1000; speed = 120; speedV = 40; distribution = 10000; blowAway = 0; bounce = 40; hitDamage = 1; wormExplode = true; explGround = false; wormDestroy = true; bloodOnHit = 0; startFrame = 129; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 1; affectByExplosions = true; dirtEffect = -1; splinterAmount = 1; splinterColour = 0; splinterType = 23; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 70; timeToExploV = 60; }; nobjectTypes23 : { detectDistance = 1; gravity = 1000; speed = 120; speedV = 40; distribution = 10000; blowAway = 0; bounce = 40; hitDamage = 1; wormExplode = true; explGround = false; wormDestroy = true; bloodOnHit = 0; startFrame = 129; numFrames = 0; drawOnMap = false; colorBullets = 0; createOnExp = 10; affectByExplosions = true; dirtEffect = -1; splinterAmount = 0; splinterColour = 0; splinterType = -1; bloodTrail = false; bloodTrailDelay = 0; leaveObj = -1; leaveObjDelay = 0; timeToExplo = 70; timeToExploV = 60; }; }; }; Textures : { textures0 : { nDrawBack = true; mFrame = 0; sFrame = 73; rFrame = 2; }; textures1 : { nDrawBack = true; mFrame = 1; sFrame = 73; rFrame = 2; }; textures2 : { nDrawBack = true; mFrame = 2; sFrame = 73; rFrame = 2; }; textures3 : { nDrawBack = true; mFrame = 37; sFrame = 73; rFrame = 2; }; textures4 : { nDrawBack = false; mFrame = 0; sFrame = 87; rFrame = 2; }; textures5 : { nDrawBack = true; mFrame = 39; sFrame = 73; rFrame = 2; }; textures6 : { nDrawBack = false; mFrame = 38; sFrame = 82; rFrame = 2; }; textures7 : { nDrawBack = true; mFrame = 99; sFrame = 73; rFrame = 2; }; textures8 : { nDrawBack = true; mFrame = 37; sFrame = 73; rFrame = 2; }; }; Others : { bonusRandTimer = ( [ 3000, 2000 ], [ 2000, 2000 ] ); aiParams = ( [ 120, 120, 50, 50, 80, 300, 400 ], [ 20, 20, 20, 20, 80, 60, 1 ] ); bonusSObjects = [ 0, 4 ]; }; lierolibre-0.5/data/lierolibre.desktop000066400000000000000000000002461205125547100201460ustar00rootroot00000000000000[Desktop Entry] Version=1.0 Name=lierolibre Comment=Earthworm action game Exec=lierolibre Icon=lierolibre Terminal=false Type=Application Categories=Game;ActionGame; lierolibre-0.5/data/lierolibre.svg000066400000000000000000000120141205125547100172700ustar00rootroot00000000000000 lierolibre icon image/svg+xml lierolibre icon 2012-04-23 Martin Erik Werner lierolibre-0.5/data/lierolibre.xpm000066400000000000000000000006011205125547100172740ustar00rootroot00000000000000/* XPM */ /* Copyright: 1998-1999 Joosa Reikkinen * License: WTFPL * Extracted from game screenshot. */ static char * liero_xpm[] = { "9 9 8 1", " c None", ". c #3CAC3C", "+ c #68BC68", "@ c #2C842C", "# c #D8D8D8", "$ c #B4B4B4", "% c #909090", "& c #206420", " ", " .. ", " .++. ", " +..@ ", " +###$%", " .++.@ ", " @.@+. ", "&.++.@ ", "@. .@ "}; lierolibre-0.5/data/sounds/000077500000000000000000000000001205125547100157345ustar00rootroot00000000000000lierolibre-0.5/data/sounds/ALIVE.wav000066400000000000000000000545721205125547100173300ustar00rootroot00000000000000RIFFrYWAVEfmt "V"VdataNY~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~}~~~~~~~~~~~~~~~}~~~~}}}}~}}~||~}}}|{||||}||||||{|}||||||}||{{||||}||}|||||{{}}{||~~~}}|}}}}|}}~}}}}}}}}|~}}}}}}~}}~~~}}~~~}}}}}}~}}}~}}}}~}~~~}}}}}}}~~}~~~}~~~~~~~~~~}~~~}~~}}}}~}~~}~~~~}}|}}~~~~~}}}}~~~~~}}~~}}}~~~~~~~~~~~~~~~~~~~~~~}}}~}}}}}}|}}~}}||}}}}~}{}||{|||||{|||||||{{{{{|{}{z|{|}{{{|{{||{{{|{z|||{{{|||||}||||||{||}{|}||}}}||}}|}}}}||||}}}}}||}}}}}}}}}|}}}}}~}|}~}}}}}~~~~~~~~~~~~~~~~~~~~~~}}~}}}~~~|}~}}}}|{|{{||{{{zzzy{zzzyyxyyyyyxzxxxyxwywyxxxwwwxxwwwwwwwwvwxwxxxwxxyxwwwxwwxxxxxxxyzyyyzzyyzz{{y{{|{{{||{||}}~|{||}}~}}}~}}}}~~~~~~}~~}~~~~~~~~~~}}|||~|}{{|}|{{{{{zzz{{{{{zzzz{zz{yyy{zyzyzzzzzyyyyzyzxxyyyyxyyyxxxyyyxxyyyyxyyyxxxxxzz{yyyyzzzyz{zzzzy{{{zz{|||z{}{|}}||}}}~~}|~~}~~}~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~}~}}~~~~~~~~~~~~~~}}}}}|{{|z{zyzz{zyxwxyyywvwyxwwwwvvuvvvvvuwvtutuuvtttttuuuuvtstuvuttstttttvvttuvvvvvvvvwxvwwwwxwxxxxxyyyyxxxyzyyzzyzyz{|{{y{|{{{{{{{{|{{|}|||{|}|~|||}}}}}|~|~~~~~}~~~~~~~~~~}~~~~~~~~~~~~}~~|}}}}{zz{|{{{zzzzyyxxyxxywvwxyywvwxwvvxxwvtuvvwvvtsttuutssstttrsrsrsrsqppqqqpponmnnooomnopnmmnnnnmnmmlmmnnooonnnnnnoonnpppppqqrsqrssstsvuwxwwwwy{|z{||}}~~}~~~}}}~~~|{}}}~|{zz|~}zzyz{||{{|}|{{|}~}}}{}~|}~~~~~~~~~~~~~~~~}}}}~|zzz||{zyyxwvvwxxvttttuusstttssrrrsrrqqrssrrqqqrrrqpoopqrqqprqqqpqrqqsrqsstrrrttssstsstvwvvuwvwwyzxy{|{{{||{z{|}||}}|}~}}~~~~~~}|{{zyz|{zyxxyywuvxutssstssrsrqppqqoqqqponnnponnooonnooppnnoooonopoonpqrsqqqrssrrqssrrrsvvttstvvuuvwyxwuvvyyzyzzyy{{yzz|||}}{{|~~~~~~~~~~}}}}}{{}~|zyzzzzzzzxxwvuwxwwvwvuuuttuvvtttvvuttvvvtvvutwvwvuuuvvwvwuuwxzzywwwyxyyzz{zxy{}~}}|||~~~}|~~~~}}~}~}}|}}}||{{|||zzz||{zz{{zyzzy|}{zyzzyyzyxxwxyxxyxuuwwwuxwvuuvvtttuvusssutsssrrsuuusqrrrqqsuvtsrrsrststuusuuttuuuuwxwwuwwxxz|zxxyz~|}}~~}|~~~}~~~~~~~}|}}||{||}}|z||}{{zzzz|{|zzyz|}{{|{z{|{||||||||||{{z{{{}~~}}}{{|~~}}|{{{yxyzz{{zz{yyzzzzywwwxyyywwwywxwxwwxxwxxywvwxyxwxxwxwvwxyxxxvuxyzzzywvvyzzzyywyz{{xwwwy{|}{{{{|{z{{|}~~|{|}~||}~|}~~~}}|~~{yxzzzy{}zyy|zywxz{zyxyyxyyyvuxwyyxvvwwvvuwwvtrvutuvuuusstuuutvvtrtvxvwwwvvvvvwz{|yxyyyz|}}{{}|{}~|z|~~|{zz|||||{z{{{yy{|{yx{{zywwxyyvxz{ywwwxz{xwzywvwwxxwx{zxxxxzzz{ywvz{zwwyyy|zyyzzyxyzzyzzyy|}zyz{zxyxy{}|z{|}{zy|~~}}||}~|}~~}}|~|xxy{{{zyxxvwy{{xxwwwxwxvwxzzxvwxwvwxxxwvwwwxyzywvxxyxywwwwyzzzxvwyxxyxwwyywwvutwy{xuvwusvwxvstuwustvvvvvuuvxurstvusqqtuspstssppqrssrqoqrponnpqnmmmmmnponnmonnnonmnooopononrtroqrrssuvvvttvttvxyzxxxxwwwzz|yyzyyzz|||}}{}}~}~}}}{}~~}|}{|~~~~~{yxyz|{{{yyxxwwyzzwvvxxxxwtqswwvxwvuttwtqqtwvssssrqrrqrrrqpqqpopponnnonnooooopnklosspmmpstsqprtsssqqqsurrruvuttwwxussvxxwvzxvvz~}{yy{{z{}||{}~||~~~~~~{y~|y}~}{|~}{{{z{{yx||vvvvxzxywvwvwxzyyxyxvyyyz|yw{|yxyywx||{xvx|~zvwyz}|zzxvz~~ywxzxz}~yyzwx|||}}||{yw{|{}~}~}|~}~}||z{}|z{}{z{ywxxxyzywuuyyxxutuwz}zvvxy{wwyxwxz{}}ywy{}|wz{{{z{|}}yyzy|}|zxyz{zyyzywwyyxxyxtvzywvutuuwvsuwvvvwxwutsuwvtttuwttuussssuywromnpoooonpqnnmmlnqmlmlkknnlkiimllmopppnmkhhqsppnnmnkmqtoomlmoqpoqqnnmnqpmllnoqqpqqppsrtwvrqtvwxw{|xvw{~|~|{{}~~~~~|}{xzzywwvvvsqqutomommnppljlmlhhlmjkmlmllmlkjkmllmmmkkklpplipqoljknpqsspkllouvqorrrrtutsvsqrtwxxvvvtvzzwursz{vx}|zxx|{wwy|}zx|wv{{wuutw{zstvstvqqvutuvrmiosstqmjkppmiknnjjjlnkhhgcfhghihddcffeglkgefgfdfhiiijjhhknjejnllmlpplilmosvtqstuusv}|zyxwy}~|~}|}}~~{~|~{}|yy{zxwwz}~wt{|xw|~|{xwy}|{||xvxyxw|{|zxyyuttyzuvtrsvtttwvqstsppsomqvupmssoorrlmtrorllrostnmnnnmmqlnrnhjsqigouwplknuvohouqoqpqspqtrorvwsqprzzwvtvvv{~yuwvwty|x|~yy|~}xxytt{|z{{{{rtyz{{}yxztxy{{{yyzvy}}~|{}}|y{}~~}~}}|~~{{}|~}}~~|~~z}zww|zwyxvtvzzzuturvzy{}utxxxx{xwywump{~zy}~{vu||uwywy}vxztvy~||~|~~~|xywv}|{t{yt{{v{}|y}y{~{|xy~|~zu|yvu{~}ytpw{zxyysux||}wysqy{vzus}zux{~yx}~zwussy|{z|wwzvqy~ypo|urtyysx|}{{zz|}xsw}yy~uu{z{~}z{vsx}w}}yyxwuz}{vu{{uzyyzuzvq{yzxt{}}{{}}y~}~}zvyqu|~y{zstsoppntsosmflpklmhhfidbdcc]^ee]WZ\^XTZXTZTNQPKIJLNPMHC@DJGCCDB@?@A=<;::>A=;;776;@@:>A<@EACA?C=ASLAB@7>PLC;ENJOGCILJFIZ`NAPcZQVQ`bZfX[k\Y__e^eqjkqe\cluzokzo]g|vrqpxps{ttuu}z{v}yu}vv}|}z||poyqumutylwcjpfxwh^bzxl`hffdcjgeYgdYgcX`^lbQkaY]`aYMQefh_NRciT_`OffZ\^TJWbd`^[\VbcZ[WcgibT^jecmVdubndbhdietkWesir}asm`wuutkruq|pntmvuqbw|jszvqx{uxw}s}wl|{qosz}vikvkol`oohnhb^dsfgj_njUhheebrd`aakVLqvc^haYnj\hiZcjpeWcgolWlrdebnpefkhgjvd]py}rgoqirrvcduylz~||u~yx{{~}y~z|üüȼľø~~}xq|tu{lssy~wUf{tcmepnqrjpbce`cmmbnnlloocidppjumnnodopvylscflyvl|i^lwqupgilxxtxrvxx{zxy{{|puv}}zx}wmu|}xuzqhnmlguiGfxniiY\k_Xdc_\NR\hXZ]?OfXRPXRGNTNNTJWL>ERPM?KQJJ9FRZP?HOCPRPCSZBNSK??QXScWNITLQ^LV_d\PSZak]_feeX[ngbjpme{dfpasxzwy}i|ysvq{swv{~vx}~xsm{vvl}vgltkyqtousnnqcoahvtnmgVQ[nhg`XP\XYca^VJWbJRVRNY^\MKNNK>QKWTI]T>PUOSHPOYZWYRX[QPUZXkhVjh]ia[pyybhnqqool|vy}svluzusrugcjjZT_V\g[[UP[RESUHKFPTEJMKLKAGNBCUaQ>MZLVODZJFg]YmXMdf_XY^ejcheaaaechkikghtnhr\f}kjqqvxhkulw}hqj`spqqnmrg]z~vrr|ftwooqx}svzw|xyu{w}{yspxy~x~zzz~|{{yyxu||tvyuoqmgruoiihmdWbkiee``aTJIZf\[PM^Z\\RPYPR`RSTMTVQZZZSHIXa[YM^_Wbc`\^Ygld\dsjekifutnjpik}k|q~~|}~sqyt||xxypy}xzliwyy||sqwwsnrzynal{|~mtz}~vy~{quurw|~y||y~||{txsut~ci|kimi_jklh`dZU^ffa_ca\`[T[MF^XLOX`UA@JOJDRMFH6,EL<;<-)=686/3.232".6127/"%-54)!#'*A1'3+43339E1/B98C8=F;:OLIE9Y[LOWS]j^Z\_`ondiei{xsppzvx{žĿÿĿú¾}}yy|~}}z{w|w{ri|yluwjggvydcopihg]]edfjc`g`Tfg_dWTlyc\cdjfiseWksoklgdqoq|vmi~suwt||z|~v|xytitzmhrtuechjhfghkbY[^W_dXheZ[XU[gcYX]Yb`XYc_Z]V^[dqo`Ydagqgdgchljcdleaomije]gckonhgjjj]dnl]ejjcg`apm`gwlohjtwnttprzu{|u}{{~}}˹ƽĿ˻ýʼȬ}}v|vltwqoppsstglqilgjqjgogerm\Zmohsh`hjedlpkuol}xqswwxzxu}{zz{~vz}qrxrtypouskihpojnfach\clje]`c_ckd]aebegdfccjeehcjlkilmlilnrskqprrqszyru{yxwpz{}|zywspnvzrrpc`kligiiegba\_`Zbc[TS]`Z]ZYUXgbSVa]XY\][VXZVX\XTYWPRX^WUSQUOPWRLKE@LXNJPFLQFKD5ANLG@BEAFIAFD=?>7:@CL@+0==::5?:;B67?<76;HH=BBBCEB>AHPIEJKFP^[XW[baejdiqiqz}||}ʽǽutzvfelqjig_de]\c_[`[YVTW^XPVWUPTVUZ[SXSPZY\YZWXSQY[ad_`^Y^fbUScigl``f[[gfa\Z[cfVVRWZXZRRTUZQQSRSPSVJMVWYMPLOWYUS\SQLOX[PIPW`aSO[dce\Yd``bb^aYX^`ddb\fh`dimmhipnmzwomsxx}qhlu}stvu|||}~~x}zv{{z||y}|w}~}}}{~{qnrsgca^fhgefh_Wfn]Y\]]dbXYZ`b^^dbWV^]SVZUOUagg[Wa]_egeebabYZd[LZ`UNYf[UYZXUX[b^U`c\U[YLJ[^RKL_^MCMUNIPVLLQGHDIPFC@7=NEBB94C=.EG01EC563=84BCD5)6II=@DLKOOCS_ZU_fbZ`b]noorsizz¾̹ǿù¾øyzienswuielhdg]P\cZf[USKRRLR_SIPQHNULDLTJCK][OKMOURRWadO[_Z_\cjg^`jwhaotugvgxuvyy}|tyvz~vrky|||wr||qhwvwzooot~{nwtqss~iivtmpvx{ncjjtok|zuxqo|~w|{~}htw{xxqoszztqyqmkd_irbkl^XT_hfhhfWTaalbQej_UO_e]RX_\UYZPPQ]RUaZ\[QYi_cbsjZckpehw}rvvjqy|ŽͽӺ̾ſtxsntofjkbbe^SWORUUVJDLPHGHFJJDDFIFA@C?FEA@?==F=5<=;:DD@D?@JH=9B@BCDC@AKDBB@?>??>>CB>@>@DBABAACEDEHFHECIKHJNJLNLPQMOTSSXWRWXX\YY]^^`_adeeffcgjgfjjjlimnmnoommrtutptswyvwxz{zz|~~|~}}|yz|}zxyyyxvvvwxwtvutrsstsqsqqpoppopoonnnllmmmlljjllkiikjjjjhijiihjihihhhhhiiiiikkklmnnmnnoppqqrqsttttwvxxxxz{{{}~~}|{zyxwutssrpoonmkkkjhghgfffedccbbaa`a__^^^]^\\\\\\\\\\\]]\]]^^^__````abcbeefgghgijllmnopqrsuvwxy{{}~}{{zxwvussqpnmkiihgfedba__]\[YWWUUSRQQONMLJJIHHFFFDDDDDCCCABBABBCCACCDDDEEFFGHHJJKLNOPQRTTVWXZ[]^`abefghhkknoqsuvxy{|~|{zyxusrponljhgfecba_]]ZXWVTTSQONMLKJIHHFFEDDDCBCBBBCBBBBCDBDDDEFFGHIJKLMNOQQSTUWXYZ\^_abdffijkmnprstvxz{}}|zxvusqomkjhgeca`]\ZZWVSRQONLLIHGEEDBB@@>><<:::8878767777877788989:;;<<=>>?AACDDFHGJJLNOPQSTVVXZ[]^`abdfhhilnnoqrtvwxz{|}}|{yxvusrqnmlkhgffdca_^\[YXWUTSQPONMKKJHGFEDCBA@@??>==<;;;:;;:::;;;;;;<<==>??@ACCDFGHJJLMOORSUVXZ[^_addfgikmopsuwy{~}|{yxwutsrqonmlkihhgfedba`_^]\\YYXWVVUTTRQQOPNNMLLKKIIHGGGFEEECDCCBCCBCBBBCBBABBBDCCEDEFEFGGHHIJKMLMNOPQRSVVVWYZ\\^``bdegghjklnpqrtuwxyz|~~||{yxwvtsrrqoonmkjijiggffedbaa__^]\\ZZYXWVVUTTRRRQQOONMLLKJIJHHHFGFFEEDCCCAAB@@??>?>===<<=<<<:;;;;<;<<<<<=<<====?@?AAABCCDDEGHHIJKLMNOPQRTUWXXZ[\^_accefhijllmopqsuwxyz|}~~~||zzzyxwvvuuttrrqqqoponmmlkkkkjijiiihghhhghgggggfegeeggffffffgeeffghggggggghihiigghihijjjkkkkmllmmmnnnoooopppqqqrrrsrrtutututvwwxvwxxwyyyyzz{{|{{||||}~}~}~}~~}~}}}||{{z{{yzyzxyxyxwwwvvvuuuuutttsssrsrrrrsqpqqqrqoppppoppopoopqpppppppopppqrrqqqrqrrrssstsssssuvuuvwvvwwwxxxyzzzyz|{||||}~}~~~~}~~~~~~~~~~~~~~~~~~}}~~~~~~~~~~}~~~~}}|}}}|}}}}}~}}}}}}}}|}}|||}|||||{{{{{{{z{{|{{{z{{{|z{zzz{zzzzyzzzzz{z{yzy{zzzyzyyyyyyyxyyyyzyzzzyzzyyzyzzzz{zzzzzzzzz{z{zz{zzz{{{{z|{{{zz{|{|{{{{z{{{z{{|zz{{{{{{z{|{z{{{{{{{{{|||{{{|z{{{{{|{|{{z{{{{|{{{{{|{{|{{{{z|{{{||{|{|||}||||||||||{||{||||||{{||}|}}}}|}}}~}}~~~~~~~~~~~~}~~}~~~~~~~~~~~~~}~~~~}~~~~~~~~~~~~~~~~~~~~}~}~~~~}}~}}~}~~}~}~~~~~~~}~~~~~~~}}~~~~~~~~~~~}~~~~}~~~~~~~~~~~~~}~~~~}~}}|}}|}}}}}|||||{{{{{{{{|{{z||{|{{zzyzzzz{zzzzzyzzzzzyyzzzzzyyzyyyyyyzyzxxyyyyyyzyyyxzyxyyz{yz{zzzyzyzzzzzzzzzyzzzzzzzzz{{zzy{|{{{{{{{|{{{{{{|{{{{{|{|{{{||||{|||||{||{||||||||||||}}}}}}}}~}}}}}}}}~~~~~lierolibre-0.5/data/sounds/BAZOOKA.wav000066400000000000000000000672441205125547100175560ustar00rootroot00000000000000RIFFnWAVEfmt "V"Vdataxn~~~|}}}|{{z||{y|{ywzz{xwxyxvwwzxvvwyvuvwvuvvvwutxwrtvuyvtwwvusuvvxuuxyvvyvxxuvuz{xuvz|wvvwzvyzyywxxyzyxw|z|zx||zw{{zz{|{x{y|~yz~z~|~|xw}~u|{v}zwnpzyuosiqullptopownfkomhmpsre[olil`ckfhg\gniaga\jbYhdXhg[eb[ebZd_]^ecW]`gdXXb]``[W_a\aY\Z\aWa_^_`veMehjh`ccjZ^hemmc_emnmqnj`irknwxogptgt}ryhz{z|{}v{~t}|u{x~|xs~~|x}xrnm}wvt~y|tvnyy~qst|xo~p{t~rw}~wxzxovxy}|uy~wzsxuwbuuo{kpgtpkfctjouSx{`v}|xVjj]wSVzlYYfvnab[TdZatVLXR\dTBsfMoXIafX[RPJLYbK-OTBKVM6A]UF;D-EFUti_adg]yY`llhnkkstgn~wn{uzytǶʵ͡ö˲ɼַ߲㼲ʵʻͬƻfdxż»ǥ{Ļɘ΢ƄϾ{¢}DZqdsr|^styohmjgmfbocqSthRd|zh`rdrSUnolVxTF|JGzze\lUXkEdPwxS{ki~}Dvuoo\Zfu~wX{cw{dYxVmYmtfj}cVplt{kfVpum}ni|uWWoQ^SikKo{DCDNPPsmEL]Ykw_DVpp1BGvjXWOhua4_kY_z^DI`ixtUAMavL;Z[;_m;#4nyg?KgH78K]^E37vq#CYE@XcM^[f\@@BD<^H`ekvm{wntvWzzy{||ßvxrws~x|ziuuw{ylf~{xkn~{|~rty~|crehzyvziwzxPnfV]ysZecVlgoa{nrrjzww}{ojmmj~bicifp^n}l_^_KCF`fPRReI;IUZ\GBL3E[aXI3BJPXXB<[I1DY0;]YnnI@OLGYcaYVTgsZV\OKSu]ht\ne``y[bne]VzLhkpZ^lm}btwc^hwue{mzwmo{~|d~p|yx{xrZuxse~wvi~qz]ju|}wQW|hqrrtpXNl}W_nz[Jvtv~`][mjnffeTv|c_Zry~d[uhZ}T{dKv^egZi~oLvUwwytUziLizmfnqqz~mzygxjxvu|h}rh|~{}dvrqit~x{vy^roxhjwtwb`q^kydqo}ruvxk{`qun~jbmxtkqawvIx^vuet^m}}qpugcnxrQbtpghw[htBkO]r[p~U`|prIlyofjh^fkU{dgmgai~}n\vybmcp:vjumX]wj\R]}x|`rO]bLkjzv{|`_\naW`^]|UWqyQlt^w|gmzg\r``rnPki{npalpr}^ims[typdKjqxqy|zwctp~~xr~_t|\jbj|un|qtomoyqiy}ngp|^yecWyjpf}rzsowvnvpX{xnaoqqr_jZ|UUv\ndM{jdkLlgN`qOuoDFu{fVq\PQVoxcR/pv1^n[_hM_E5]zQHgfFM^UUKOdHCF`YPfWXXzk;7pm^CtroXoqTaLLu{c`zm}{Uek`Rahy{}lSze^X{vljf~yzhokkh`vml}}saw`z}tpq}~n¯|ƭšʵФȫɭ̅ˏʘ}yfYjVGYfuPN|ussHUdn]gaLIu`aQ_TrT9DLZDH[Nb3PFFyr:{qHlSLa;oyRTM`f8gsM{t|~fqVY\}ptOdK}XtMyi[[sz`Tomc^{puf|hSDr_Bz;kfmbYnm[_}krNx}xGdcfoOw[s{pf}hI`incpuivnvdlmzaoi^awsl{XywjU|`rzsjed}dr}5zd]zcVcsbrqj~Udwrhzq}}qPe]bTyt{tm||jurq|jN|msb|T{Rqn`gTxj{tKdch^Ry_6rwxkbpi]unwsNgx~jPsg\pfuMxv~{sejVN~_p[`z`w}]ckjkc}~Osr|yxhw{trex\qutvdRNyf[z\_q_eNkdps~{uqHYVxv_`e]r~omzXijgSiieynkooyjsj{kkzqRjz~cb|{uHRud~v[}oNhTW_z}eXoeyxPcjosK~ir]oRgalL|j~PU{dj~XPqa{vfaYvnrsio`iisgY{bXjX[}^bL?|ci[vXb[s`i~]uoHhg}y`z^mttr[QVx|Vg]{{^_Btr}f|Wtbc}omloGvpXtmqqV^nqn|dB^Zckk}tIxbau_ut~O`byp[ux}{xhkoTy]L^r}X€]zjvrve]tM[phn|L}ikfMZ`Wixh\seLytp}~f`cevc~nZ~h}d||Ckrnumsxkd`iJgpy`mk`pnNtgc{`9yqbhxnVX|kuxl\gZjvZk]euxpnN{~^VlmE|kI`Ȝ{f|dShwlk_swrwzivyodj~g}VTijlcenjtfxYUoyxZwr^w^zxpy[}vdgi_q~mrlO[^ZTa~txyajwVSq`gI7\?Wr||cIrZI]@SuyV}]5shq\npMPkl?hfW[r{PXBZeq|dvoTZ{zTs`xxYwvlxjxXjwSvsrOw]Vo~z|\b_yVPvgzqko\hjjyvu_gJilxtfb{egmm~opa{~mSvX\zbohdld|l^rAxT[r{2mi?bsjNZ{kovIrhGVxRlUMRKb]9]Bbwp{axCmltj*J^|`{Tzx``n_xB`FcQrdkdJj~fp{n{dz[pur]~Szvm\SkWxp@Ou~`}jw{x]Lnnu\vGFJoo~x_j}zfvJwwm}wX}ZPPLk|gfemnzFzjdgtailjzkQ|idt||VflmlsqդNVxgfapdw~tj|ksdddchrOjyikPtY~rrpK|yetUxjYybqPcdy`xtO~jcrytLh{j}N{xQwrlyhXwhz|ocvfwJXUuau\c~N|qMYfUvkk}ydprixnasafyUfaejlwtmklRbamdrr]pBQxQ>bwervEUiu~rTfPBZ{ZsneqiysgvdveRYK_bd|vYilyH}XQbMfryy_pUe_}{]qwgysp}XtpIxw_wwkW_x|ajraXwkhziov^TbaUztvMhcywmucl~p{wQq}ymwMgk`o]PktbuaMmgly|vkfblzxOyppwoezxmqwaŀev\|sXm}u]mee`neWg}vȃ[qnnVppui~mo{ftp^|rTnwYomt~hR}{dQf›jtticlpqiJf>jWJkmnkjoDaha^ftnavyCueqt{vu_\ybygo|mpczdXYpYslgrhns\wurrsKjt[e;xz~rKY~K_hVaXlqHx}uc\kjv@kd~vmfiw[vmpq^t^xtYow_tn{ij|lrd}lpw`i[t}nXkohjxlsnsvqusyy}trwSYvXoqirlwhqvdxpYopbkmpxuvq}}fypokm^v~yzomzi{r\S{{|iHsxzn^wzBr|l[ygTN]zzsonFqfgf|wdgrYdzjsoub^z{]cxzcBNz{cpr{xv}dvZ_ogo_b{i^oire|v{ocemvk{wU~xyuz[x~`[xwKx^{ovVv~f~vuV~ZnnCqb|h~mUvy^xPk=LXwRzo^Vz{u{rr|n|v}sggiyxdb|ht[[S{kptfirdy}t}yz}z{z|inpsv}~~|{qysn|t~|La{{}ldr{}_}zzqusbtam|\otaf}un\jnWnvho{xfytfcLc|meqpldW\yjwN[yeajh_hw|mPaniwkIUpmxXVra]YZp|sec^Ykrxwl`IZqvkqqY?dpp}^flAbna`|e]spjw\jvrj~]kyxH^rWXmwwlnzb{vk_zf}kxzx|zjvqy{z~~wpxgw}ksynyz}ttk`gzyxz|}utrnztq[o_^w^jtu[`xpdVgw~hjpgj{rndRmtUyj_Yi]NacwjPta]lY[kveb}^_^ZbQb~m[eunbY^gfXdxafiHiYAVvztqnR[d{mgpY]YimheT`pvrwgMcrzssyfseglNkZm|h~^irqtnu|pdpxsz{t{}z}}yuptxkosvohtvktpn|j~flqpj|\knOTfhn_x^SwUxYdqJughZinkb{u\eyp\oqsnytgsbnounjjpnfilon|cdhrvn}nk^pkqj_rzz|yo{{fgktsjzzgir~poumvvz^\Zf]bioaZrwquxgtsagaltoqq`rlSa{r|pg_l|rZLiyowqZ[`lnQisNb}xgmtacvVsgbfjypoxp}k}ctw}|{q|w~~puwf~}wx}bjnupxv`f|qhn}pjpw|cipfnxm\daipm]W\Tetido^\aehUXcXOYcf_UXVkjQQH\e\ZZPQnfbaLaLO{UYtX]jevnJbj[o{hWbjtlkijynai`mousruzyzijusuuyxhkkezxt|y}tmzrs{xpw}~yt~w|d}z~qwy}mzw{n|q{u}wyzw|vwolunwn|rmnptmwikx{{xjipzvwypllbvt|il|iiwhvzwx|gi]uwiy}rxyt}xzurws{xnmd|yxmlpqyr\wzp~rtnYs{xzsovpsrzhbmyvveTywz{fpwrv}y{y|zw}~s}|rkwoxy|wnt~hf}uu~nnt{}tumnlzwxxwzx{jcb~ov~oelm~{yrs|~}zgn~|x~ynywqswu}v}yw~{dis}{xu~u{zvt{|hquysxl}|no~zs~s~uw~}|rwvrronqh{imqy|_v~ls}{xxxku~{yuntv{{|~pk|}zt{~syml{}wtyouoyvto{uizxwyy|vt~v}{yy}wrrxvs|vuxms|z|srv}mwu~zstqqy~y||yqszoty|y|{|tw{z~}}~wy{x{~r|~wwqzyz{}||os}}~|}{xxyxyx~yqny|}}wvz{~uo}wjm}qqzret|xxkmkfswkjdcs{ieooz}e_hgmtxtWTdbgrndhjik`WawiWV[gjdgk_Z[_ktmaOSfg\jwkccihcaloa_fhjnroib`gstfgpkksura`st^k|om|}vmqsy~~ztq|su}}||}}~uvw{w{z~}xz~|{z{w~}u|}}sytr{{zsnx{qornusjju}yvxurzxmu{nkoyxw{nijmsfj~yndq{miu{jbkonihqvnlwthlddstu|xg]frtmpysjkrrqortpqpwvpvrwyrtxxxmqy|~ws~{}|{}{ywz}{tw~~y|~~||~|wxu~{zr}zzzzztqx{wry|{yzmlyls~}{{uvt{xyzsr|}}zko}~u|~{y~}po}|xzyy{z{z||w|vw|}|zx~{r{tu~r|{{w{zx|xwrnz}xuqrnrwxuuulr{z}}{{yvtsvvowy}|{y{r||{{yy}y{z~{s}|z{}}z~wytxzrr}~}tt|}xytis|qrzoky~tmnwwuzxrpinpnprvorvupmvuhouwy~ytulgozzz~ujeilt~ynqvzw{ws{|vtx|yy{tqsy{x{{msyp{|pwumsw~xmy{khy{|{tums|v{}~ykywt~uwst}s~~~{~|xz}~zs|svt|}~{|yus{~~wt{{yz{y{}|}||~|~v~~{~{~z}}|{u~z~~{|v||{wsztuyz}uot{{qmquyuvvrw|tkouz{yuwvt{{qtyux}|piyzmr||wuxux}yzwki{{uvvtv}|vlkvxsz|szvjinsqptvpkmspfiqtpquvf^gsvihosnkqjgoxrnrrlgmmhisznkrndiwthdrxvot}vlltrjcp}oiir{vrzvpxvos|~|zxyx}|~y{}yzvzw|~}w~|vz~|xyytx}}vovstyzzzwns|vttvv|uqtyxz}tw{vrxwx|{ut}ry|zwu{}|sov{wu|xmku|{vtz~~xmjqz{|ysmov{wsqmoswxuzzqlippmv{{vpnrtvtqrnnvwrmkmrx|{piorvxxwopwzrju|yuttzzw|~{yzus}z||}~z{||z}}~||}}}{|ovyy|~{y~tywquzx~~vu|}}~~{v|{yz}yz{|}{~{|{{{|~~yzz{xvy||zv|wu{z|xw{ypz{y|w~}{zyzz{xrrt}{y}upu|{z{uuywzzxzzzx{}z}|ywsw}{xxz|zzy{}z}|z|{|~|{|y{~|tvxpw|{|xs}yuu|urw}~zx}xwxr}}||z||||}}~{}x|~{|{}|~{~|zz|z~}uy~{xx~~us~~y|zv{{rpv{{|}wvrrvuvuw}xrnt{zwvwxuttqnq~{mfgfkwuijnnosneffkotwmbcjmmgfkkkpmghoponlprlijhhhorprrjjsjdluyysostxyrosuqtuquusy|zwtytu{}}{~}{|~|~||}}{||y~{z~|usy{|yw}}ztryzx{~}yxy|~|zy~{z~~wv{{}z|{y~~~}yxw}zzsrw}zxzxzurw{u|vqx}ywwz}zuty{z{}}urx|yx{zsrz{y{{{~{ww}yu}}sswy{{}{vvy}~|||z~{y{}}|zx||~}yxz~{v|{yz{{{}yw~~}|{|y{~{}|v{}uv~{y~}z~~{{|{{}}~{z{{{zz~{|{~}|wy}zx~~{y{z}}}zzqz~~|zz||{zwv}xllxzstx|~yrprywv{}xy{xusuvwyz}xstvywtvz{{yxy|vru{xrw}{snr|~|vruy}}xvy{|ywxz{z|{z}~zutvrw{|{tsyuy}y{{}~w{|yyz~|||||xy}up{|x}}}zuy|~|usv{xw{|z{zvpszrquwtrswzsjlyyqrpnr{{uqqrxwuxwrmostrux}wqusjgmvzwmnuuppsxvuvwwyzwrllvvsx|uorv{wmihp{~ysnntvuvsmmuzxusklw|wlmwzrrx|{ywtor|~wtx}{xwy{z~yz~|{~|~{y{t{x}~z}~~}z|{}xvw~|y~|z{|wv}||}zz}~yy|}z~}z|v~y|{|zutw}uvyxzyvrvzyvuqpsy{yzyvolmmpsxwsonrttoknqutghrrrnnqrrsqnkluvnhjknrsmhmrtlmtvrljkotttsooorrqopwxrnqxtjioz{yxwsuxww{zuyzyz{|{{x{{{~{}{|}~|~}~}|~~{||xvyz{|yz|wy}w{~zv|~}{{{{{}}y{{z~|}~}~}~{x}vu{~|{}|uqqsxy|{xuqnqvwxwrmlsz|rjgksturruurmoqqotyuqpmlptsmjrvtswrjjqvsrqsturnlhkrttttrpqrrquurprsrqrpsvwzzxutuuxzxy{tptxww{|{{{{y{|{}}~|||||~z{z||~~}~}||~}{~~~~|{|yy|~xvz{xttuyzxvwusuwrryzsqsvxsmouyxrqsstrqrrrqtwtrrpptxvqptuqnqw{xtqtxxvtnmsz}xxyxwvuw|||~~}zvx~}|}~||}~}}|x{~{~~{{|}{}{yvx}~{wwy{}{vsv{zwwz{yuxxvuwxvwyzxvrsvwxwspqutuspoqrrqrqnpspswsnrtpnnrsropsrttrplostrtwrlnvxwusqrtstuy|ytpptxxyvssvz|xtqszxtx{xvwvuwvx{xvy{xwyz|yvw{wrwzzz{z{wvy|~|ywy}{xxy{}|}zwy{{}~~}~{~~}|yz|{}}{{|}{{~|wuvx}|yvxzz{{xvwuwz}|zvtvyzvtwyxxz|{trx|zz|{xuux|}yuuzz}~{zxwwy{}}{{{{{~{{z{zy||{zy{{ywxzyxyzz||{wtxyyyx||zvussw||yx{zyz|ywyxxy{{{~|zwy{{}~}}{{{{||{~~}|{~}{}~}}{||}~|}{}~~}}~~~{{|~}{}zy|~yy}~~}~~yz~~}~~~}~|z{}{~}{}~~~}|{{}~~|}}~~}|zz||{|xuw}}{z|{{{zz{xxwuuwy{xwxxvwz}zsptvwwzzxuuvtuxywvxyxwx{vtuxz{{wwyyyvwz|zusw{}|{{{}|{{{|{{{{|{~}{z|~}~~~|}~}|z|~yvx}}ywy|xvx|~|y{~~{z{{yy{{}|z||}}}}}}~|||}{|}{|~~|~~~~}}{|~}~|}|}}{|}~{}|}~{}~~~}~~}}|}~~|~|{~~|}|}}{{{~}|{|}|}~}|}}}~}{|z|~}|{||}~}{||{z|}~}yyyz}~|}|}|}{|{|~~~}}||}{z|~|{{{}~}|{{{}|z{z}~~}}}~}x{}~|yyy|~}|{{{||~~zwz{||~}}}}|{|{}}|~}~~}}}|~~~~~~}|~~~}~~~~yz~||~~~~~~|}}~~~|{|{z|~~|{{||}~~~|{{~}|{||}}{z}}z{}~}|||{{}}z}}~~}yz}}|}~~~~}{{~~~}}~~~~~~~|~~~~}}}}}~~|z{}||~{zz|}|{}|{{{}}}|||{z{}}|z|}}}}{|}||}}~|||}~}|~~}~~||{{|}~}z{}~~}}~~~~|}}}|}~~}|~}}~~~}}~~~}~~~}~}~~~||~}~~~~~{||~~~~}}}}~~}~~~~}~~~~~}~}~||~~~}~~}~~|~{}~}~~~~~}{~~~}~~~}}~}{}~}{~~}}}|}~}}|}~}z}}}~~~}}~~~}}~~}}|~~~||{}}||~~~}{}}}~~~~~~}}~~}|~|}~}~~~~~}}~}~~}~||}|~}}~~~~~}|}~~}~|}~}}}~}|||||}|}~}|z{{|||~~|xz{}~}{z|}|{|}|}|z{|}||}}||}~~|{z|}}|{{{}~}|z{z{|~~|{{z|}|{{{{|~}{{z{{{||}}}||{zz{{|}|{||{|~}|{{{}}}}||{||~}}||||~}}~||~~||~~}|~~}~~}}~}}~~~~~~~}~~}~~~~~|~~}~~~~}~~~~~~~~~~~~~}~~~~~~~~~}~~~}}}~~}{}~~~~~~}~~~~~}~~~}~~}~~}~}~~}}|{}}}}}~}{|}~}}~~~|}~~~}|~~}~~}|}}~}~|z|}~~~|{{}~||~}||{~}|||}}{|}~}|z{|}}}||~||z|}~~||{{{{|~||}}|}~}||~~~~~{|~~||~}|}|~}}}}}{~}}~~~~}~}}~~~}}~|~~}~}~}}}~}~~}}~}}}}~~}}}~~|}||||}}~~}{{|~}}|}~}~}~~~~~~}~~|~~~~}~~~~~~~}~~}}~~}~~~~~}~~~~~~~~~~~~}~~}}~~}~~~}||}}}~~|||}~}}~}|||}~}~~~}||}}}~~~}}}}~}{{||~}|{|{z|~~}}}|{{z|~}|}||{||~}|~~~~||~~~~~~~~~~~~~~~~~~~~~~~~}}~~~~}~~}~~~~~~~~~~}~~~~~~}~~~}}~~~~~~}~}~}~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}~~~~|~~~~~}}~~}~~~~~~~}~~~~~~}}~~~~~~~~~}|}~~~}}}}~~~~}|}}~}}}}~}|}}~~}~~}}}}~~~~~~~~~}~~~~~~~~}~~~~~~~~~~~~~}~~~~~~|~~~}~~~~~~}~~~~~}~~~}~~}}~~~~~~~~~~~~~~~~~~~}~~~~}~~~~~~~}~~~~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~}~~~}}}~~~}~~~~}~~~~~~~}}~~~~~~~~~~~}}~~~~~~~~~}}~~~}~~~~~}~~~}}}~}~~~~~~~~~~~~~~}}~~~}~~~~~~~}~~~~~~~~~~~~~~~~~~}~}~~~~~~~~~~~~~~~~~}~~~~~~~~~}}~~}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~}~~~~~~~}~~~~}~~~~~}~~~~}~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~~~~~}}~~}~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~lierolibre-0.5/data/sounds/BEGIN.wav000066400000000000000000001532361205125547100173110ustar00rootroot00000000000000RIFFWAVEfmt "V"VdatarĽ~~{yxuttsrpmkjhhgecab_]]ZXTZUQ[MJYEITH?SL=PL>IH9CV2Ab+=Z/EQ7FbB'gJ[M*ZY&ZpYh%\Z7NfK@L0W5[Ep2|5|RnQiGWXkjhJA[hR}b؂s٪M`Ǹm_G牉ǖqYpޢhBXuil֑aFɮ/̱/ZflN8CXQzz:_0B8?T"sLBPGw2LPi$\=w9w]bn{/*waj10{#)`QXXAmD0Ge˃smqD+ܚ'5YG7=Y>~t~Y!x=*O8%y.Ȇ˚=a,r1s C'CSoZ,?Eh0E9#"W3B?y6kY^xc%kj?%*eGNAꏖُڙYhg~gnᏻݗؚgvޅSQޘ}ݙѶاG꓊/։BΚ[{ۧy}PbjًLQ~gs_gmq[biؠ3y:!A{fR[rZfK6QyAHR_"͔P"HR|an} y=܇#/3";j¢:mrmH?`IP_aKʉ[nRLYM5=YS@a cY[\]!W\JQM_:ab(E)&[guA:>bE5Gg=54N\dBq64C.O(?@}I|TSWRt Q,Ȉ%i?31maLGSqjzq3CN[CQ=BPkJЇSi|UhACސUvE9ЙKom-yqwxghʩ-wrpwwTDvj=~-sj~"~rɖFg#KmߗM!p(]cdE:t:JWۤXj>melH-ыBf=M0jARXOIqh"(cGĤiВs9tmpЗ5'(TpQo?;`VYe֐YddIXMjy1tO=zXozozeRCIZ4uXQUz/.:]ʊz؜ZŢL{[ȋ>jHNr[r/Dozaz꺫}wҚrRZjm\5q9jͤemrO{ؑWz_[{BNYHaxa[dq~g2WJ&i.񼒻rjOj?"Lvj4pNW@OZ0`m=?Oh"rRx,)oSFtruYj$9h<KcRQV*P.0BkQ@oH1g5N4:00C4RT_SBCD9!n,U^fBRP)?Z%eZ3`QFo<7Z;rEAZrkveCZ_fZZhPUgyJxaZdjH}/KLet{qSHDbcb5azZp3}IqRf]\aZv8^w|}\"p prZ~ uss.s[{NI'CtVG?}u!^Afq:S|:9N'8D5{ieerZ.Y[|Q,6ZhPa7It"jy>P'Z N7x{Ip#b6-:GkiRjTrjr{V^Ho1hj_]>)B˧1rga0FutXZڡEǬR|G-us;2UѵszB`򏿹ezkZEwvʥnɗ^gͦƨw+mQZJ9q򂛒΄]^fy0oZBۋI^"$߹ny~ЄX]QsDneIQzIAtB-^2ʐC`O:c?2sV_~yWg#ʦk\bb=Xnm#k;Z[GZ2j6ZH64jvZKFh#@`9Zg*VUncEI6ͯJ8YDd9&x+v2j0icEf}N94iʈZ7QZԓшhKN9IijqвZͽQFȉ^s}-򎯼ss[okdzThꤶwaxN6UCqAfZނIDvg򬘺Ql;.Ŭ$!4͢je>Qp,ٮf`@wEaMyԬtIbjwKQ?4\K10-vyz!j@CsdI|YzSiOEbI>%IkU"5:*ZIlkPl!t2V"Sz)6SXkcFfEYjb?Lsl]svsz-r"kP{^j8G(tw\[_#AcPxzU>OJ4(7i<ܷ\kg^}jٷJnWIzAbzwxyjfmr[yI{pi`šbGqã~lu|c{ɣ\`}zQCUٶ8UrsmX@zHBlTtLzJ-pʖfk9bkgfJUŅWG]}ak0iJr^ubatIdunBDu:UaN3?rp~ِvpo`-r+47FNE|^_^bm1s\^COڄX YҨdMi~*oIvLra"Y;kaC7>zl]|p:|XkW\r~3bQu_bmibP`8q}WvKHyTteFXEblFv~Vizp8tz5~TknvxwgɎh3zuFVI\^čBLjjxJb9zVPlJzzwWt]HUo\j9҅H~cv[btxsXKtÕC֢HXJ,{[{\*υ(¬1Rw6n}`fD|^sUwS^dbiRJK3yfrqr1J[CazeiEs9knaw|ȒVqzy|o{%X3\[7BQ:pO@}azi]cqPSJxڥO{ajjLnQ³vRA<]Õ*=U2qOLT3rtMڅRpqBi3;ӊ[0O>]<`(uq8NnO{;?NAoYQ`z$_r6UqYNuZuYURDaxp=f(Z|"2qDr)BM*g,b0ZnB~jTt,_^K b**`8iHC6IuJT~p2Y\KhL/:bYnH9X~6WO`_t`IzÊ`jg9ֶs4mF9qwOwjrM)2B/>ajw|Phwc6BSjFax>LsaCV[1G;?QS,Q&?l+Ak)qk[6u0f*gr>;DqRZodjmW3~u|wj3SEu~J/yP^@s~6^*EX\n#QwsNRwdɁ0O5ٔuW:fyphBhaMewvjbyl\4zA!MYjq:`ggpyC=;6^Ow[()C^2_w9iʻzm`QnBsfiȵutnm^𱫱z∋lj`iknuX]brЩZYHx,o\YǽgPR9%ѺrstpTN|V~Yl}8aNɄfg`Mˀ=zqIQitu.dw1BB@sG)S@EDe2"U[z@jpJRhazqzIRk_eaR;ApmeN#h[<M1)Qr=p"s8-N\*-j8Zdpxy2b7X|`WSWAmja.l;AV@?Y]QJ"Jq?GVPy1yDJznNZ@T 7M)ob<5;HFJVf?ia&){3oyDӌj[R8Vs۔]ҥ:EtU_ϟCW=ƅh=WuwhɊ.ngFoۊb򔂅Ŵlc*ΚnَrkRg! ґjr:OK3s<d&2bzsyD@,WFsOyJriZ9BLe5vtgu\6aRYg4rwLyYCHzsj${w3?DT`R72a6:VSs,-dq*2kV7;V/:;#!z9pwEE_HUFD:j7k]j5@mcJj(2]ER^b0HxivHnˡj;u‹diVm _Y[d8j;uVmBPrlnZ;kc(6l;dCs0>qT_FϽX}ɥjlulZbtTTjo0yus~.TbojZ۽hGu԰yrfɟ<|ӑerʘgez޷s?ȹdgÈzjtQCWoaKz{rq[yřadvRYcu[`xZuQʻT`_n|{j{zpnWzkr2h^~u}C~˝FǢyf~yכə۞ŞѮࢧzƂ֍Ϗz}~ͤũ~Ԯʒ~LJzru{cx|bYnw|zoflEtpykzRynsme\nevR]cnBff8`fukllSqobzAduu^y{r]UeW]WcyQmaQq}CequTeQZq8cVz|zxdhd`fpeej1coAJt]VRlZqb^?bn?M_h[]ry!z[n_Hnz432xOziJiBlHMI}VEx=`v&9URbRQh:\wi1FpT[x5BquxNv_abBOAcWN]fr?Jd3qi:y|7\Nwl!Wyta~rr9MYqJs?BpY+jfY}CBinoqY]HRm@;jr[yjZA{O4xFW?Zxp_X_kiyJRCSMR\dLNbGZsp:\QQE[_pp@l~jZyM?^\jp1^AiaYz{GolNupzkqj^X+maTnzje^xqj~{{mr{Zkq~mdkoiT^ykUp~f^VlcZvbx{zUorPw{u}g{kbWpqvzAjVdybDpT_~CPqDsh~NK6IoU@IeCDdRN4[\=6DL]\@`>:^M0BI."?MUP59(L.4KHH3]GP;A135)%QMFH*+e@%KAF9\ZZBX).P:@/'Q*,7[B=MS(/l-H]S1.OL>2If@!5ZWmb-:='`pHUI3m87laIY{l6-wyC-]i*-~ZJvNCzSDhsJ:R~_:oobqdWy>"dUjjsXCx_i|fXyrf:uluFoYR^w{~zyWxmzuftrQaqvFÕsyz՞z~~qnw|ivj֕Y{o~}nJi{wtqc{KRpPHe`hJP_fmw]=Rx{nJoESjlv2@glQOdiR$JfSWiUYYIQxl20tW1DqLCNCkeG@2Aq_KWZg&@yXC*WyIRf[7LW9IdW0:ZbElcQ4?KG[>.b|JJF<_nIMLCMTY#Da^]b\GIDBmGF\k]baBjbltRVSWHZfguviHcbRbqSEdT[\dnn;NgKTza=JeZblyNDmrO=`c^HR]Z\JOhiSNL`ZJKY]LxR9E48`Q^adbGR`hNae5Dd}jeR]fsvEDaVV]RohL_K^bmuLNlrP[~qbWxhi_EnJJmygd{yzaZqnh[Za|{~zi|E`stxtyhktOqrudbq{kjnjxrwzp^zzxY{bYZv|u|J}dy~VhLSŅbdxuj}jjrokvpbɜXqyxz\sltyoz~ecʤ͋ŕm͕~򋋪ĵҚnݴÖvr~qn|ru~{eoq_w`wxW{pnyyseuxhshnquZ|{daprogXps{O|s`z|qʰgewzji|k{pxfxEev~ittznafp~}vkntzh^vozxfkiw~n}rnrvzxrf|i~qyp~Vvtwreqnt^avPyxruipUvZa{]au^xr}_dbywags`n{pmshjt\v\JTzfjvlu{XVlQ+SxrilumNImVvy`sb]byuxsl~ZuiC@z~V^^ocnzY|i~lf;ZPSlnXujjl@o}jbVufOl_ObnfaolZxjU^vfdligwRlsYh|ds{WT[kybuT`/MPE~dob]r`UgRfrYr{}[OHiI"}aU^|^EZTHoSBJY{_eoVtqCWpN\]TecVhqehxlJon[fiqCPhQriqI}`7pmYlcr{~`|vrkV\}oqt{yozvsmORiouxipRUzRyq[z?L]bn~[fkcRUWmtK\rtfcuhmtH]aBTuu`XRgfOQRatnJWimYO]_]b3*O^ul]RXYMPlrL@WeJeiCKcbJZ{{ZFXXmy1@v{xhE\hut_e`r`UZj^D`qQhvX^lrpd]oybn]ceVgvkgkvwmgowdmzVuzgn|luqkyog~jvkj\tct{{Q|ttftZkzdximwspt{Ikcuwyxpy|{wdtyyS^zaZ{yIir]}yeRX|eXnzQas|y}{zRjy^{sqP\sÇfpZBhzZjcbhzuwOb_rLi}aP~vjM:NywD\r_J~{occETY[|lN[zplk}aT}pcduuDir[49awSPb{kSCGzsJOkxkVWLPrxSQzp2FbmvI*geB@gq2TzZbcP_peRGP^a>]~|rG-kbBXylRV[caYt^W_k__\`vjM`ocbccPpvhyWobf_roa{mXUs{zitb`Sr_sgtdV~tafur\vnywawsozv{^Xrv[xt~qi~~vli{naq{x\sot{pUlm_ylyy~xrwm~yrbqur}zYWy{ht}{y}t~l}}yzv|rpΉfu}xrazzvqwyxo^qfww}lm|zkiyqtn{l|vrtv~zfyzrx|yjzsz{w|qzzf}kizdhayw{prjsydqjrs~thiouru{v`o{gwfwut~jw}f_tclu~mp]jy`hrrkYiv]]zkssdnP~r}rhprcpnAYlp|]r}lmynWfok}Ve|iq{~m]r|yufnvZvhsu[tqyy~|xrjq}btq}jkwp|txrtzw~zѯ|ɶzqw|vyuۧ}rx~|ptznzryus{rr|YhgZqvubL`l\emncWImt>aRHabgj[Y`cW^`Eo{UN^h]_H_YU~Y:Oi`aUSc]VM;=L`{rwzӹƻɶɌnjmYSwmO@Oe["&*1F+ !"""  /#}VYj~p^ckr}mvzũ¶ͬ˰ɼºŲջ˳տ̲轏ƶ̩³ve{s|walpdd~eYkonp`hheokY*#0KH)%J]hPDJ;GK[eSPjcN\hplbQR\Tj{rb_h{hhoNZzyvsctswyn~wy|w}vtsxtek^|ƶÿٻѸľл±¡̠ѷůʰx}io{|khtVWp}^mgpceormoOO_uvmd_W[UYocg_eO@KamPBPbNWRH??^A8BX\^X>,$NQPSLD8.=C0N[W:!,ipNkh\kNF|cQEaWQZT^CXEipUWRPBJ2VWN*fiQ^>@=`ZV\L8PsM>hIaSPZWL\_TXGRhz^b3p_^tm^Afee=fu~\Anop\]emKjLtkX]}ueqcopjujnoyg~^V~{f{etuRj{^Us}szrpp~~yxՒ̐՞}}tyuzr{vlqlk}=qn]|z|Xew^VW}b2oPy[|eueLhZpUmhbmYW]lYZaX_\yfH]rGTdiPNbkjOErU?Y{K|j^zyW|ZxbdoiYlS~||s~ʪͅ˗íʰʬŨƣ«ʚ|rwcrxqlp\gesxdhpKKZ^qgiWV^^R_X[SyI8b<`pOJR2_LUc5PE\NHGR?[BCLLOEALJLF@U@>IV-ZES'6bWGHHQFP]9QLP:|5\HNV*vCC>2OhM8E|[WLX[Br]D?QhRZpgO_pjZV[o?=|[vubyAKz`mr`f_cLz^ooqpT|aQhucc\hD~fs^y8_O\|jummoJf_;QRvHZi_\xPwO{j6V{eS~u{Sy{~vhcuҷَǗǷѼƬȣըǭӳ׶ԨͭǸͺܵǝؾӦⷒ龰ͮվΪ۷ʰ™Ͷۣκȣ߲͔˻ģÖӬ䩑˿ȳ|½wĴv~ax}xqaRnLPt`[s|UlV-bRzFj}NhBp\]`\.|5<[dYHZ6h.>:cJ]>A>dR\2Q/]-^TJ,UZB6;@4CWDB,_)L%?E0,6XIF014G_4;g28J/6(LEQ,=N-Tg1ENH@fQI8XKi5~cU:Lmqh[]9ZUobgcwgyOf[ospgĜۍ˷̼箿ͼݵdzմ۲֣ӻ½ۼܷٶΨóשxʗqqqgvyoQfxc{YcJb[wrYWlROyf3VxBCR`(RST`CpMc7JPcB>OBIjD.i9:PK,KE7S6@A?E=KJ[8-I>J(L"K#O4-8C%E1>S150 U@H>&O1;-VM>&96&)W15=D6?9V.h-7Rg7.c;PMd)"yV?^YDAoKLkId\T^eepuzMsuerTt{j|x{ּ̮ݫ棪㳠ҋپʽ֙⨰Ӄופ³ضŴЕ·ܥ¢萦ҮջأκӶϸ豲¬èĮαٯȔĥֱ|˗ֽʔ£|ˆ{M{j}olCo}cbx~qGnewCK^NY5\uDbhUO_k]gS8Jf-M=6QF2eJC\9<`N(P/A0D0CC$9;?PAR>-)!=$4F.*B.&(:*6 -6'*.#;!2#C$ 11.&?..9#.@@#0,#)(*( -8"8 +/$5 "/-/ 5?%)/0?'4 )&5*:+,+60/./7E(-9C.9:96?8CMOG6G"I2=^HQk[Hg@SSAcp[Y`bd`rrxmU\u|}wb{xțŘÉĞÜضֱꧽӚ߸չЭϼУİt~{wq~||yefddadcur]Os@jJPe'a8LYCHPIGK2ML3R&M6276C(I8L1G:0H*C8%U$82/8.:-ZT$=E*A88@L0V0N$J)D4GQ)\8JECW=HTTO?dDEDO>9n[RnS_WCQE\SMSUjAhPaVPcSkOVQdS>kMJ^VW`ZiX:x'T\VCaSOXFx\@MV@PQ`Rif_Ws^nZ_j`icc`TbexWq{lq|p|jvnxftf~fr}_|ssziqqvse|kukwpsfRglanl]_gkLpZ\PZ\HWRPKa_KIOCf)n>M#LH.\2V+aKCGE1D(_8OJ=R$Y'bGcK=D[;KUQJA]EaBt=]m8^UbpZahdMlfPg[b]xbh\_mvQV|qllzlcvYXonkjfO|nxl~qixtxx{q~ryu~yv}qjkx{jrdnF|bxxz|Ěɝ˰̪§IJѰŷӳաŬ޳ܵǵլ֫ɿ۱شԴνԳ˫ζįԶſüި¼޺ԵۿҸȍ˿ٴ٣ǯ袿̚Ų¶¨̝»ΛuniwvqnftugXhggW^_;iNF]>DEd3]D0D1:2=NB(80%/.%%$ $%9Q6'%6C2+K(@46:GL;Z=MV=TPMNTQ\5p6UITmTb]lfkl@vN\oNeid`A_rbpjol\widzbypqzdfhUX~yn{lpmwpw»м׼ܾϽۼտżЩƯءϟj{m{yenxUBOpbZNQTAZG`0h3g8Kc/EI19G%:M/54FO#73+942<F5&, .)$,=; 0$.% %(=O>&*)C;'Q:/9*1;(:0>f4>OQO.k*C>=OJbAm]Z[elcwaxnwt`{eoowú̥ٷ߷ܸиٯֺģxryvbvYfft`afXf^cUUITI6YO.QV=P?OZ&+@/*03 2><-+%7'!*9'  ',"D ?$!-2'3.4*I8$)(=.;,C&<P&7DF*7N*=9-338+0-A.<D1%*4%7H74*55&#$#( &-'('%'9*0#-PA(%2)=/24-0:/(N7=C#6:>)7T=81505P)>Q*CA9GQD#L>7BgcRPi`gFbsasghcqrkyDŽȬ۸ݸôȡÏiciltXmkf][jIMf[IQW@HK0@:9/#B",?&B1&8 $, #/)*# #) /4&935M "B-!,K.-KC-V*P"EQ=<`0J@N'7Z4MPS<]YOIeEYGgH_QUTQ_gQn\[Z]YXjZoZobtfq\Nkesio{qazznm{xozovn­ķİҩְиʲķӡΟǼ{~i{ra}|twi_ZH}OR`YR\;b?D`E1I62F>72;/0;8$3(' !#2 :*"N 6?<4DC>,I;`7_QMY@YZIXQbiKzmeq|\~`ffucapj||yk~˘ŷشޫ߹ԠѣƦ}~~noq{yxqi}lmsdSomkfsfaobVJ2RoFsHcoMA\JD[GUAg"c13N>S3PKL2D4D(/H0)F6H: ;)Y4&;"=),). 1'$&$#)!#"'*#'<C<2K7I9G*G<:KD\>YaGXUh^OMQQJbQQSLB>V/aDTUI]E0WFALGF>H:LD+^-=G0G"E:C>F:6*B-#3+F@<0182"6),981#=#//%$I +1)"51.514/".("99<('F/%;-=(=)(8-J:/D89D0H:5M.NK5I58dBJUML8T?LdCWYIN_iYPMXsLdekt_xsq{zaftŻƼǿǵԳӷԭľϵƴĹľʽ˶ȹȱ³ô÷ŵ©Ū–yzbzv|qnm~a_xoynfn_k[cqdeo]dVY\g^NfX_rU`Qb[NfOOZd`ZgbUaRbSZhcV\U_`niV\jqbpd_gh^m_efnlkhqjwt`jnououswh{putwttq{hrlcrzvltpulgpepyowuzwywjrphfukhsq{f|]nasl^k_pjkvh^jmibt^ravgr]\nLqlgfslf^geNfMcZ_oOpae_UMR]Xb[V`[UePWZ8VH@MXSS`M`SKGIRJ\LQKTW>EAH@MJJ[OHUNBOAHAKIQI@\<`PIQUJ=_PQYCJT?TGfQXfOSZZV^\iWYZl[vrhelkchgnflnournpd{iq||rtqy}x|||~wwr~w}y{qy|{~zv|ut|xlhtcgznlhl[Ul^]_`bf\TOQIAHX*Da7M=?;;8:72)719:0+4:9() -),1+) 6+&(-'6# $+#$6**&"&###<" $'*; 1+%1%5,5)'(+#4A84;28;N8IFZ1RKFWKVQaXj[WpWrll|knqvqҸƿϲƹz{wq~yksnusimiRdfVhh^a_NaYL[?FF>F;424418/=1$.,-++"(#!" ## '&*!))1#P&L2D?5G5E6I@UA^\YeRfX_\c^`dmhuzowwu}oyuu~qô½ůǶúƱ}zryovqqmu^obsYavVf[gSnZUcQVWTSRWXXNU\K]L[PHSOPL\OL_FQQKART=`HUQIMOFKSMIPGPPDQOQFUFSLFPCGOOHSNPTIJaKQRRMYJIZKSYYYXTWULVXMXZZUWWQYUWYY]T]TTQZVP[T]Y^W[YYLUWQSO^P[UXVYWQ^TNHSIHPMVYOTPBQBFOIKMQBOJOFPXKIOIJWNLMWNOJPOJZJWV]XWZ]^S`SV_\[bc]^gcjjqigqgootjsrx}{wz}zyzw~|z{{vxn|x}|tv~w|yt~{~}||x~~{~{{{z|}{uzxvwzzrz}u{zxws||qtoxvn}|q|su~y{ppqqzo~sz~~~{}~w{~zu}x}~}~~~}wzv|wlrrokkonflmkngfj^_ZZ[N_aZ^ZWZUPNGLPJNIKIHJCC<;;?=A:<;4/3/,1(7.,*)1!  "#%'!'& *%())(%*.-)31,51005>5:D48IB7OHFHFLLLUSW[U]^U^Y[accltntiivqmxzx|||·ŸĿüʿøĺwuzvuw}uwdfk\c_fa]]_]UYTSWVQPRLMLMOAMHKRGHIE?BE?:8=8;>6?=<1:8,14;98;5356.0152.5+6/42+0*0003355(.,.,,7-5-//+11//1.0.20081-..233;-7.:/5;24:99?0;08@83976<9?5?898>A?FHEBG>E@AE>JBFINONINLKPOUIUTWYOWVUZYXaUZY[^Yfchgbkdgifjgijciifjmojiqkqkutottutuuz}tqxqr|u}z~ȿ}}zvyqtumplfedm^chU`^RZORPERKEOMJNCJE:F@;@@<>8D<;767764@873:4475334,1/0012312--2.*1'(&&'*().(&',*(-#$$%!$! !!&&##!!"#!$!"%(! &#()$%)(%/2/,74,+,-+967<05:?>@E?9=@A>?>?>CBDCEHCIDFGEFFGEHJMJNQEOPOKOPSTVYTUTSWVYZ\[Z_]\]``]fbefhiljkorpmkrtqsx}}{~}¾üÿŽ{|zyz{y|wz{wxwzuvrutqrlsjkijklmpkpphmgcdbcdecfgecfb^b^c_dd`c_a`\aa_b^\\X]Y]\\_``^^[UUXV[WXZZVXVRVVTXZZ[XVXXXXVRUWUUVVVVVWUUWUWSTRTUQVTSQNQMLQPOOPOLFILHELFGEHDHHFHFDFBHFFBFHHJHHHHEGDDFEGJJIILLMQPOLNMQPQPRMLRQUXYYXUXU[ZY[Z[]b]Z]ZZ__dfgdgdabegfhmjlkemhkllonrqrvsrstuuvuvxuxsy|{~}z{~~}}{y||xz{{}|||{yy~xywxxxxpsqstxywwywwwswuwrrrrtxuuywxx{x|}|{|{|y|{}}~}zyxyxwyswtsvstsonlmnlkmjjmllmmkhhgghhghhdcabcafdgecc____bb`aa_e_a__a_aa_a`^```dddda_aacbbbfeedcedcdegllknmpopkjgmprtqqrtuutvutvwwxwwvvwyzz||~}}}|zzzz||z}{{{{}{{yyzzz}}{zxywwxxwssttwuwxtttrrsstttsssqqonlnoorttrsookkmpnnlnmkkmmooomkikknnnmmkgljjiighhfgijjfieiighcffdbbeeeffgeegcc_bbdbdbbb_aaceeeeegddfdfccccdddegihgihjkonmllijnmmnpqrstutuvvuvyz{|}~|{|y|}|{|ywvwvutstuqronlmlmklmlkiliijjgecdbeeecfdfdbddfffffceedbfedfgghgknporoplnklmoqstvvuuttuuttuswtxxyy{yxxzxvzzxyywwxxvywuutruuvtuttsqrrsonjiklmlomnoklhfeefehdgefdbcccdbdbbcacceca_[``bdbb``^``bbb```bbddd``__ca_a`cc`eggdfdda_a^bbdddfffggihgidfacdhjnnnmlilkkjkmnmsrvuturutvuvuwz{||{|{~}~}{zz}|}{{~||~||zzzx{{}{~{{{{yywzzx{wzzx}y|xvtususvvuuutttuuutttpomnnmpqrpqnlmkijfgffejkkjhfeccabdeeadbdb`cceece```^bbddddcccffegfedhehgkjlmllqpropknmqpruuvuvxwvwxzyzz{z|}~~{~|~~}}|||yyz{{|}}|zzywywvtuuutvwwstttuuuuvtrprnmopporpsqrpnlljkkkklljmmmommmiigjjjkigjhhiillhhffhfdfffeggliljceccccdffigiggfdddfddffhfhfhhheieedffhggifjkkjlnkmllkkmlnlnpoonpqqroorpqqutvxxywvvssrttvvxx|z|{wyvvxxxxxzzzyyywyyy}{{{{yyyy{{y{x{xzxzz|z|z|z||~|{yywyy{{{{}}{{}{{zzzz}||||zzz~~|~{{{}|}||{~~|yyzz{zyxvyxyxvyvtusspnmpnqrrsqnnlmkmljkijhijmklhfgcedbeddecfbcab``a_^^]__`^^__]][[[][^^^^^^\ZZZZZZ]___^^ZY[[[[[]^^``^^]]][\\\\[]]aa_c``bb_aa__^``^``bccabddeeedddfccceeeeeeeeeeddfffhfdhfhegggggbcegiiiiifhfhhgiihfffgiimkmmmjjikikmllmmjjmmqrrsuroqptquurtqutxwuxxyxzyzz{{z}~~~~}~|zz}{z{{|z{{||xxyywuwuvxtvwywwywywuussuuwywuwuwuwwwwyvxvxvvvvvxxxxxxxwwwwyyyxxxxxxzxzzzzzwwwyy{y{{x{z}}z|zzxxxx{x{{y{{y{z||zzy{{{{{z~|~~{}{}~|}~~~~}}~zzz{{~|~z}}}{{{|z|zzx{{wywzxx{ywyxxvvwwwvvvtussttttsususussqsqssqssssssusqsususuuwttrtrtssuuuuwwvvtvuuuuwwwwwwwwvvvvvxvxxxxxzxxxxuwwyywyvxxzzwyyy{{{{}yyyyyuwuzzzzzz|zyyyyyyy{y{{yyyy{{{{xzzzz||z|y{{{{{{{{{{{{{{{}}|~|~{{{||~~}~~~~}|~~}{|zz{y|z}{|zxywxvwwtvsstssrtsuqrploqqrppnmmmmrnnllmmmommmkkknnnnnllkkkknlnnnnkkkkmmmmkommkmkmomommlolnlnnnnnnnlllnnnpprnnmomommmmooqooqonnnnpooqqqpprpqssqsrtrrqssurttuuuvxwuvxwywxxzy{{|z{{z|y{|~~|}~}}~zzzz{{{|||zzzzz{yyyyyyzxzxxyyyyyywwusvxxyywyuuwuwuuuuuuuxswwwwwwuwwwwwvvvvvvvyyvvvvvyvwwwwuwuuvvvwuuuuvttrrsqstttussopppqqonnpoqompnlnllmoommmmkllllllllllljljllljllllllllllllllllnnllnnkkkmkmmmommlllnnpmoqpnpooqoqnrtptoqqqsssrprrtqssutttvwwvvsswvvxwwy{zzzx|w{y{zxxxzz|||||{{{{{y{y}}}{{{zzzz~~||~~{{{{{~~~}}~}~~}~~|}{{{{|~~|z}{}{{{{{{{{{{{{{y{{y|z||z|xz{{yyyzxxxyyyywxxxvvvvwwwwuvvvvwwuuqtrrsstttrqsqqrppnqqrnpnoomnnlommkkllnlljmkmmklljjkiiijhjfiigiigigigiiigigiigiifhhjjjjiikihjjljjnkkkikkkkmmmllnlmmmjlnkmooqprrmqoproqqqrrrtsuurvuuutvwwwvxwwwxzzyy{z|y{}z~}}|~}|~~~||y{z{{||{|zvywxvwwttwsttrssrtrsqrprqqonpqmmlnlmmmnnnlllllljnlnllljllllljljjlllllllllllllllllllllljlnllllnllllkmmmmlnlnnoqoonppoqqqpnrqqqsprrttvsusrtrtsuuwuwrtvxuwwwwvvxvxwywwyvxxxzxzzy{yyy{{xzxzz|z||{{{{{{{{}zz|||||}{||~}~~~}}}~~|}}{{y|z||z}}{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}}}}||z~|{{}}|||~~~}~~~{~|~|{}{}}{||||||~zzz|zzz|}}}{zzzzz{{}}{{{{{{y{||||z|zxxx{yy{|z|zxxxvxxwyyyywwwxvxxxxvxvxvxvvvvyvwwwwwwwwwwwswswyywwwvxvxvxvxxwywyyyyvxvzzxzwy{{{{z|zzyyy{{{{{{{{y|y{{y|y|y{{{{{{{{{{{{{}}{}}|||z|{{{}}|~~~}~}~~}~~~~~~~~~~~~~~~~|~}}}~~~~~}}~~~~~~~}}}}~~~|||~~}}}{{{}{|||||||||||zz|z|z}z}}{{{{{{{{||||zzzzxxz{yyy{y|zzxzxxvxvyyywywzxxxxvxxvvtvwwwwuxvxxvvtvvvvvvtsuxuxuxwwwwwsswwwwuswwswwwwywvvvxvxxwwwywywyyyyyvxvxxzzzz|y{yyxzzzz|y{{{{{{{z|z|{{{{}~~}~~}~}}~~|{}}||zz{{{y|||zzzx{yyyyzzxzxyyyywwwwwwuxxxxxxxxxxvxuwwwwyyyzzzyyyxxzz|||{{{{{{{}z|z|z{{}|~~}~~{~~~}}~~~|}}}{|z||z|z}z}{}}}{{{{{{{{{{{{{{{{{{{y{{{y{y{{{{y{y{y{{{{{{{{{{{{{{{{{{||||{{}}~|~~}}~~~~~~}}~~~~|}}}{{||~~|z|||z|zz~~|~zzz||z|z}|zzz|zzz|||||z||z|z||||||z||~~{}}}}}||~|~|~|~|~~||}}}}}{}}}{}{~||||~z|z|}{{}{{{{{{{{{{{y{|||zz|zzxzzzx{{y{y{yy{yyyyyyyyyzzzzxzxzxzxzxzzxzzxzzwyyyyyyyyyyyyyyyyyy{yyyzzzz|z|z|{{{{{{{{{{{{||||||{{}}}~~~}|}~~~~}}}}}~~~~~|}}}{{||||||zz{}}}{}{}{{{{{{{}{}}{{{{{{{{{{{{y{y{y{y|y||||z|z|zxzxz{y{{y{yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzyyyyyyyyyyyyyy{{{{{}{{xzxxxzzzzz|z||||zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz|||z||y{y{y{{{{{{{{{{{{{{{{{}{}z||z||}}}{}|~~}~~~~~~}}~~~}}{{{||||z|{}}}{{{{{{{{{{{{{|||||zzzzxxxx{{y{y{y{yyyyzzzzxxxzxzxzzzzzxzzzzzwzzzwzxzxzxzxzzxzzzzzzxxwwwzzzzzzyyy{y{y{yyxxzzzz|z|||{y{{y{{{}}}{{{{}z|z|z|||{}}}}}|~~|~~~~~}}}}}}}}}}}}}}}~~~~~~~~~~~~~~~~~~}}~~~~~~~~~}}}}}}}}}}}~~~~~~~~|~~|~|}}}{}{{y||||||z|||||z||||||z|z|z|||||z||||||||}{{}}}|~~~~~~}~~~~~~~}~~~~~~~~}}}}}}}}}}~~~~~~~~~~~|~~|~|}}}{{|||z|||z|z}z||~|zz|z|}z}{{{{{{{{{{{{{{{{{{{{{}}{}{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}{{y{y{|z|z|zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz||z|z|y{y{y{{{{{{{}{{}{{{{{}{}{}||||z|{}}}|~~~~}}}~~~~~~~~}}}}}}~~~|~|{}{||z|||z}{}{}{}}{{{{{{{}{}}{{{{{{{{{{{{y{y|y||z|z|z|z||y|y{{y{{{{{{{{}{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}{}}{}}z|z||||z||{}{}}|~|~~~~}}}}}}}}}}}~~~~~}}~~~~~~~}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}~~~~~~~~~~~~~~~~~~~}}~~~~~~~~~~~}}}}}}}}}~~~~~~~~~~~~~~~~~~~~~lierolibre-0.5/data/sounds/BOING.wav000066400000000000000000000117241205125547100173160ustar00rootroot00000000000000RIFFWAVEfmt "V"Vdata~~}}}~~~}|}|zvttv{xv~{}||~|t|~ysv{qsvnmytgnwuvwpgdn|e[__]`\ZYRRYUQZQDML8;MRPKLTOHPULHWeY>5J^YI;>@O_X_}rrxfrpo}qnƬՠü}zwýkJ:DNXZF,+8;ET`eghjsse`jrtnoure\`goe]jmb[[]cfpvpswty|yi_drqdYUctzuqaM6/83).=D7"&2'!/KXgbSLScuwqm__ilbSU`_OIGGKO_lgalquyzwcYdz}ؼå;tusdOJWff]XYXZa^]XHBIO\T95CN]r{viSP]mrqw}ug_ZY[jxob^\VYchhkx~kTHThsuke_J97801BVagt~|{}|pefiov~ygPBAFJ[t|{png^[am{ʻŰdzwonkflgUMI?8@FGGPUH5.9IRROME=CO\hihkpspbY]db[_kqfVW[PFJLEDLPHHU\TNPRT`gYH>:=GQWUTY`iqtyztonjeejs}wnhgkosww{}}~~~zxztjfhkorqniehmljpttvxvw|{z{}spqnjknptupcXTPNLMNMNQV[_bdhkqsnhc]XWYXX\\SHHKHC@<:@HIHJLGCLW]_`]]bintvwz||{}|}wvx}|vnjjkmpsuxwvuxwusokiijlpqpnonkgdb^]_cda___^][ZZXYYXYYXVWYYWYepuy{xvwxx{zttwwxxxy|~~~~{z}~~~~~}}}|zxvsokgeccddcbccdcba`_^]__^]\\ZXXYZ[[[\\]]ZYZZYYYY[_cefhklkotvx|~}||}}~}zvqnljfdeeefijlnprtvwxyz|}||||{xvtsstuvwwxxyz{zyzywvvvvuuuuttrrqomkkkijkkjklllllkkihhhedefffghijkkklmmllllmmnnoprsvxy|~|zwusqonnlkkmmmorsux|~~}}|{zzzzzzzzyxwvvvvuvwxxz{||}~~}}}|{yxwutsqqpoonoopopqpppqqppqqqqqstuvxy{|~~~~}|{zxxwwwvwwwxyy{|}~~}|zzyxwvutttssssssststuuvwwxyyyzzzzzyyxwwvussrqqqppppqqrrrsssssttttuuvvwxxyyyzzzz{{{{|||}}~~~}||{zzzzzzz{{{||}}}~~~~~~~}}}}}}}}~~~~~~~~~~~|||{zzzyyxyxyyyyzzz{{{{{{{|{{{{{|{{{{||{{|||||||||{{||{|||||}}}}}~~~~}~~~~~~~}~~~~~~~~~}||||{{{{{||}}~~}}|{zzyyxxxxxxxyyyyyzyzzzyyyzz{{||}~~~~~~}||{{{z{{{{{{|||}}}~~~~~~~~~}}}}}}}}}||||{{{{{{||||}~~~}|||{{{{{||{{||{|}}||}~}~~~~~~}~~~}~}~~~~~}}}}||{|||||}}}~~~~~~~~~~~~}}}||||||||}}}}}}~~~~~~~~~~}}}}}}||||||||}}}}}}}}}}}~~}~~~~~~~~~~~~}}}}}|}}||}}}}}~~~~~~~~~~~~~~~}}}}~~~~~~~~~~~~~~~~~~~~~}~~~}}~~}}~~~}~~~}}}}}}}}}|}}}}}}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~}}~~}~~}~~}}~~}~~~}}~~||~~}|}~}|}~}||}~}|}}}||}}|||}|{|}|{|}|{{||{{|}|{|}||}~}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}~~}}~~}}~~~}~~~~~lierolibre-0.5/data/sounds/BUMP.wav000066400000000000000000000064541205125547100172270ustar00rootroot00000000000000RIFF$ WAVEfmt "V"Vdata |||{{{{{{{{{zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz{z{{{{{{{{{{{{{{{{{{{{{{{{{|||}}}~~~~~~}||{{zzzyyyyyyxxxwwvutsssrrrrrsttuvvwxxyxxxxyyxwwwwwvuuuvvvvvwxxxxyzz{{||}~~}|{zzzyyxwvutsrqpoonnmmlkjiiiiijkkllllmmmmnopqrtvwxz{}ÿzuqlgb^YUPMIEB><97532/-,+)(&%#"!  !"#$&')*+-.023578:<>@CEHJMOQSVXZ]_behknqsvy|~~{xurolifca`\WUUSPLIHIGDA@@@><;9987555443211100/..//...////00111122223344455567789::;<<==>??@ABCDEGHHIJLMOPRTVWYZ[\]_`abdeghjlmoprsuvxy{|}~}|{zyxvutsrqqponmkjigfeddcbba`_^]\[ZYXXWWVUTTSSRRQPPOOONNMMMLLKJJIIIHHHHHGGFFEEEEEEEEFFFEEEEEEEEEFFFGGGGGGGGHHHIIIJJJJJKKLMMNOPPPQQRRSTUUVVWWXXYZ[[\]^_``abccddefghijkklllmmnoppqrstuvvwwwxxyz{|}}~~~~~~~~~~~}}}}}}}}}}~~~~~}}}}~~~~}|{zyyxxwvvutsrrqppponnmlkjjiihhggffeeddccccbbbaaaaaaa`````````````````````aaabbbbbcccddeeeeeeeeeffghhhhhhhhhiijkklllllllmmmnnnooooooooppppqqqqqqqqqrrrrrssssstttttuuutttttuuvvwwwwwwwwxxxyyyzzzzz{{{{{||||||}}~~~~~}}}}}}}}||||{{{{{{{zzzzzyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzzzzzzzzzz{{{{{{{{||||}}}}}}}}}}}}}~~~~~~~~~~~~~}}}}|||{{{{zzzzzzyyyyxxxwwwwwvvvvvuuuuttttttssssssrrrrrrrrrrqqqqqqqqqppppppppqqqqqqqqqqqqqqqrrrrrrrrrssssssttttuuuuuvvvvvwwwxxxxxyyyyyzzzz{{{{||||}}}}~~~~~~~~~~~~~lierolibre-0.5/data/sounds/BURNER.wav000066400000000000000000000212351205125547100174530ustar00rootroot00000000000000RIFF"WAVEfmt "V"Vdataq"uMM#Ԇ||4hfhH|`|F騞`TycR*(A\RAW^#rfw|4YfmywmHp2<ˡmWWf^ur%>_Ē%櫾F\;\H>7uCpޡ:JrמЏ|(;TFm2WRwˈj;wFcHyWmwrjmP`J2ruJH0wu`hwuuwH^4RW>2āAȤ^uhMAPܒY_w;TRuyW2c|;mTC|wj;hcMוHȾ_yMmƭwP!2˺>w;4YcF%Fr`y|:wCƾj˥m;y7Pܺpfjw`>j\TCy#򨞏(PMW!#ym:Rrh;|jhrPWp!Cċ_TcYu鏈HY_j>+R*F|C҆0rrWW*YPāff:0`2y-WFYYMpH;J_pT72PyfuyPP`fyACf`*FFwm-cJ>WpЗ|JT\7CrfjIJڕ7j%|2PyhwAj`yY7w4FJMF;mmWCTڭ>WHwpyrƺhwFY>Pc:rPyP_pH\w|0%!!H˥WcЗjĕ_YJj^|Ppȥp;wڏP`|mPwFyrM#_(fˈYjFmJ`ԏywfjh^pAC`˭p*Cr;yWfwyAhuHumY||-w>uyTFch`HFu^jwy%;ˋ>T(pwCRWJwm`2jy^FڡhJ0fT2yC4_\C2my\jh0Сr2*ڡWלWpPm2TRPu͍J`TC(-ҵܕ\cFhMwF>>Ƌ\cmFRڤj|4;>Cyr70mJfĈ|Cu0fFmC^%pw*FcfR^uomu-jF%yyh#ȁF^c<򲋭AM`Fr-#P:>Pj2%rr-MM_:h<ᕕWCwTwҵC7|CT|rr7|f>_T0pp4;7>-wfp;FfĆwT4(74ȲmT^Cm#Tp|˭^C`wr||:hmh\>܃7urp|cAڍchF!`||H!j;phTu!j:H^(fy%WMR2hcuuTp|uCCHWͯ|o^Y0ꭈ|Fw>ru`T|mļw\r|(ju>uJcJrfrhPFY:yCԼ:^7ҭHu-|ںWyu툯mFT^;fR\:hwpAY%yMf|\AƏrC;HżYAA`||Aj^ͤ\h_A\ˡHfhR#T_CͭCo`*Wu2f`hPR(፭4j0wrcy`WuR:-p>WAu|-^JHu|>FyW#`YܞmHзRrhԁ4mMhHhmTyWc0CJT>*AHhujYPc`:rwP4`T^Wymhf;h7|J`yuMp˯f-4*J`׺#Yuc(򆞭(\yjrMJmhFȒJC|^4r`uyfAR˷RFT(%fYYHw-!y>mju;AH04oYP7\ԆrhRW^^h|WfJH-u^ˈPwM^:Wuwj|h`wcu4CwҼ-#W>Wpw%Yyfmj\>ҥޗhC(myf|>04yrR0^ڕJPHPA`jy:FwAmr\hT7w|R70^o:h|*;rwhr>wp^TrȺ\\F`|Tu^YrruP`*F͍yM;RWwH:jm\ڵcԁ2pЫ+mhHmw0R``2Jcw;j\wPfHJˀc!0%Cpׯhu#c^:ˤWAm7m\>jj:fmԯ;`RcTp(wo:wRЫAjc0\RP;ƨ7!MyyY|(j\o`W(yT̓yޒcW-ҁ|hR|jc;YAޒf\%;Y(4Yh#:P˃pu|y|F*A헙PˀH|*Ww4ҷwȥwfYrYpm-h:ˋFCmhycurMW%PMWT|!|7f>RM!>rpWCc#42F%||\rf>WPP:\`pCf!>|jFA(A7YЍTw:hwr(24-fr͋-uhArT|w;m-\ȣ_`T0węmMT0܍AMwR>2uhymjFfFR|>|TJy`(JW`˒fM*Tm(CYmH0`\YYcM|\ou2fA2\R2h>˃|p2`PjJoFƫ\2;h^4H:fJy*;uF|A|wYfrwAmĞpT^YF4`CwޫŤp#7m4Yh7jm^cRw#2fMjf0|^|Ym|JHwRWy;JA*jjĥ^>r%ru|PTjfu*o4C7>PcWPu7`;P|ˍ2;0hYp^HpFY!-r\hP_^Pw*cy;ȡChc%Mm!#Yurfcܼmw(H*hלu`^:pJj:WĒRJ;AjA-Y\FChFuchM7ju7F톈MJfMW(F-c0`Y%`\TpWC!>˲\j4TwJw72upMu2wJ_#-Џ-y\7McmW%ܺF\cYhTT|RhƤph|p|jШmp͒\:m4Fm^4f0P*yf\Tcr`*cFJ*wPpwjmPpJy*눃R0f˥C7mTCpy2Wu`m:wu;(pPrrhT2m(:|+^MwFmRMhuw:\%HhwWh`hY\h^4FHT׵PCw`pP!hTWTF|0jJ^yTJ*뀯uᫀR!ƒy\u^ccpu`MRu7PHy>4|:y;c|hRĕרH!`AA*wjucJ˗\0ˀڗ0fc0\>wc>F2(Yf|MwuFmw`wh*j*r`!%˙A!|;pRjA\rcumYԙY>r>Y7T+yF^͜rf|R^Y`j*%hHJ:^yԍ0w%|frH2^||H0!j-|u>wf^#ywfjrJȏj˺j>T*wp|pďPrT׏-%hHHc#yh%ccor`\hmjyjA^-jM7׈j|fTYh_W뫆r:Ruw`˙juCj|FF%r\pJHPjf^|M:W\W*r4m%돡rj`\!(rJ2ȯPw2W_f`2Ćĥ>yh>40rW\>mWuYw7w0`Y`r(hwhp|H%Hԫ^cyf7yHm͡cH2Yj%\>;MfҨf`fr|M\|ƃ(r0Yw>M7ȼppcԗ4C`ċH|ȷ||uĵ|Pfhwļ\mYJf-4Jr׍2`MYRuFj-P0`pwRfˏ!jfPc2hPMj:AufJ0Ɨ\RuhmĨp`jc|:ͫȣ\CppuW>ңfcu|YPwPRˁ`ffwAur%MAP:*y\#MĀ0CchWchpwTrMy:W(TAfjmM!|%\yrWPc>fjuP%MW#Y24W7J>;(2ƥ||>P0Whu>ԭr!:RYfh%%!C|`AY|j-旙TY`PcmA:rƵFWF\\cApWu7;yhrfh\|mHpCAW:7\Hy`>`Y0\MCRYp^#^FwCAA420cJ%Aᵈ\Cw(%yfrF-C^F7Y;׏ԏ;Wj|p7A*#y4AІc\cc`fpҵAcou><%HYAA;WjוpwҏFyC2Fr4:TyuY`h˜y02-R:yMķP#fu(wH40#T`(%yPwPAT0YfƗCh\!|mYjȷ4*WR!Ȁf^˨A|p|fCҷp|_^W:uhr^M^4Я2uRHHjHf㵒WcT|>#o`WP`ĵ\Rr|Am2:fЯfWH:Ƌh|ypMYpR_M`Tr˒^WHMjuj㕥Hw`%W뺃!rHh77c7-^r|W:ww`h#CPš|jhw>`wˈ_FAPp:Pҋ(PWY|f!Hu(hMҫh(\yᵍ>7h2Jc4`c!rm|ڤJmPRRY\CuyYpܡ^Fײ*_yT`HĆ|T!|_mYumjwW4cu_*WfTM^Y`^:Pc(|J>ڞW|FwYc7uj#\rFP\ЙhryT:uJ2ԫȃ\\cr:c;rJ_(;^||rYf:m|y0AcwЈrJY|hC^jf^#^w27WTu򆏤(fwWᵨ^u(T>^wj%|҆C*y`A\;hA^u#A0YuhuHFwyPM!Ћ(7ҼJHFwy:CwWڲm2rFY׃fA-2uj\F򒯃2\\AJҜm0򨆤7WwJTJ(wmMmmp|FcJAyҲTpRR%;-W|47w0W!ucCyڍRY\|T_rācjTחpJMc|yF|^yymc`Ƌf|R|%cuJwmorf:hC||:R^>fw:yPwy>2*_PT;ܲYAh`#7C;hЏruWPom0`|ޯ4Fcm_pR0|%FrFᏒ;:h0uWR*wc͏cf>wJ`R`0fcu\`7rj_RhRp`Hr#_f*r-HpRp^pč#pWmwyYy2:rPFw\^wrc>HmmFyMFw0c;ԜJ7WuprWRjj(T!p-hfWYCjJrAcR-M`R4r;m0J㼷`juYp`AP|j_JJu顥HCuw*ׯHԏFpA;My>!\JRT7Y|7%Jj%Ɯjc(򆒞7>r%Fuympfr:7Ju*`f_ˣ0y0|7ځR_j!4WF0J4|FyRc7m7\Yyu:P揤T%Wפr|7jrcTycfCp`7YTcF2YchfY::큒crJyWCwЙ;PRp\4;;J;rc!<0ҒcFwyfҵāT!Hm|ypY;C;wFuf_yȍr`YWc<#fm0%מpY`W|`ww-jYCpPH%wf\YȺpRuHrކ_CAp:j׏uMup͋;:f!whFuYRrypRyWY^(Wȫ\A^cޥrFH`YFuMjCƆ;jPJmcPy܏7;;\jjTuWjyrf%muy:үr|`P|p:FСM:^p2wj(#\fTfWHfJjԆy2͋0!hcT0CM܏724hWmTm!CyM>\`w-A>RhRJy!Aw2>mr`p!fޙH㭭00rW_puhҏ\-T\ujYjFc!C(:rCWhWRMJRcCrJHjگ2^r`TAM򷜗`*cAp`-Jm`h`^-CЃjRcڏP:R_mcm|2:prCPRpCHAJmW72uMYFw`rCuڥjR\RhoYP^(f-f^fyHAp%yy^Py^r#PTc\cwAA|r74RpcyoM:M2W׵p4#Tc#2m`\TFPҗM:򏈵HrA70h>:-mH;mA>uF^4TTpJ҆w`J|0W-2MYF|4Ajr;fm:>Pȋmĵy`Rw_Mhh\Yrm͍%܋%cp*JYJM|m>lierolibre-0.5/data/sounds/DEATH1.wav000066400000000000000000001024031205125547100173610ustar00rootroot00000000000000RIFFWAVEfmt "V"Vdataׄy~sjktzxwsln_[YNEMY]gigkqvxhmvxe_i^`xwvtkfp}wveZjzyhnnd[d~~yzwY\b\guut{~z}}kd^sy{sqwqosn^o}wolhjvz{vpls|upo~{g\yv~qtwV4=dysleIYq|u|sqTbw~l~{}jjwkozyyl{|l|lwy{xv{|vws~uiwokjsbhzwxn|yrypadvoxr=ypyjlYoTqWrt[lQҥjpI,NEM`O`je>XQYE[5P8al}~c5OxC^pSxPWMUtZ=h{TP_RavyjRIhr~l{r^s|cbvi]_q⌦vtj7Fipeu9kyFѬjow]So¾wx~CɅޱe:@xosdd|gA_aT5]>U9{Paszds]bhmwkmi]^DGRYAVJttopswP]@ho}SAbnw[su;:#+^OqYZfLC`{K;AfK[CV`\}ieaMO_Efm]YfS6.wz\uogw[ohlmgN%xy`lsio||\sEjuW}5+Wqe{klaPҨheֳuthxlI`ZVSzhaIOWj\wtyskm{oY|S?r]!^r˶tmaA[cPЇP%Nv6 S@.,o{1FEO[1uCL- AR5+&RY~P'=M|_p Ye-poztauáwkS˸jiŻXe\T\7B`YuZ[qz٭{}X$,M/o㽘tdP6mwuA@Wy\q?FO6TW;i9hh*L?)XxeAQIl^*/Jy_RR{> <ƝV0,EEzijm3:>˧qC7Vu^u].:gZNB\~I  5^ڻieT΢(  wYC? +7Jq͢p4j͹ܻMco{a^A 4Gbn<*wvЧzi_Ny4*FߤS;#P`bge`v-򩔷^1űmF1GtZ22Lq<z|xS!*Rup\s'2B6:LWlO %G5I}tɿ#,k|WN8NJOFQgmsS  ;XpT4QB/C^K &TW\1 \svr^Y,2U^81E*'BXiǸݿǙWD[B :VּɮkbukcƧ|mZtэQ0-+5EF5Nnzzwudnn\knYWH7&/R{Ďhux~hoyK)&I~c{lʮXVhrmOoz̞e?VRml9(2:_qLF997*NPAu`MhE#, /[zcLth^>Ue{qrm@QF3)*7='*0Edt]J# $AZ\=8L+GUqܐUL}x`=3FCws?'D99P;=4EQa|n[kjYTdppaL@0LocK+6.FT@LdoQfnMa|j3'_fD& /-Nu¹bmUfC:Vlwja*$5.ksnEIwyltmlldz^Rxfc3J@<2-^WK[omTY^MPCEIKUQwxbk^BNPPR@BU\m|R6LU7H}UaO43!.=775@Zi#'oiiϥj9@9;G5  7\?hU93 VmȰļŰS R] DxݰhdTB917);cY@Il]EcιǸh^dkq``ͼtstkDOUiÚx_O\{zimxvjcgmʤzho[Hg}̷vclVMG. `DZfQGAbaxdB+91)@.,B1'&O=3`uZNV[_ju|~t^(>[eRGIH75McZX|LTkwƬ|l=.`U9]ocfUC-Mk̷iI:SspbZU8%%Nlh˩ԻlfN3$:?]vjlNa|zllbeewȓ~ckt^V^]ScunO;;8$ ?^bSyݺcotrm¿mJDAF:BR_|kww}崣{qh|msbxtowVnpnqkzks˼̼|biŢf=,.>e~⿱sIg~HG&5Tw{­ûRDFXUWTe{ްwqha;1A[m˽src^ipsmn^RRhϭk[grLPotfç\]fw_\vwmqwh^]hѽwiXOD95Hp{jRUecdahm|}YNO/&-M`yrc]^XXnĺ۽nxwaT>*"$Ab\Rmt}Ợ˼yv=/5 49=ZfygZlsrrƤvgbP1)?RIMhduqch`i|}kvslZF:K8TdVZ="Z޾Xc`uqsegTx}XMK]vŴɻqsiew|tgewp`ltjYTN>exo}zb~zZIMGJMNR^]{ʒX]Tkk~Xmr_hNy|dM{̾ÙmVc5.EYbLZ>QTegzi_cs}ƞ}oM[bWVhmrn|޲waaT:Wa]ru|n^ľعڿ˰xjfeyz۪Ǿʛz{xwq{pȺx`ik_`}vm{wȯ{vg+7yܶc^Y[hGNOk΢jX/+KZ}]7  ,M37[fft~yb645A]gNMWI]uNO_a+-')@jy}cr~]Yg{pUR:?;D, ,83eSA\c]Rn^zdztpx}eK9=PUK (@ETR{}we\D@X<45GlvytnI;6XdM0-MWprcbrնvmfbbSRjT7$ :poq~gwUQG&5#H_Bd}ïó{nykϟk_v^/4?Xvcbyd<5 .ESvzpxxssqhN/)5<`OFMWc֬vC%:W7EWEfw׶ϫwH:>=@(1ZηӾod{rtoE[w``zsoeVTppq^ůwWOI8)*/PRK'/12]{qio|npkfh\YO>E  4=GwyofORfessUdk]XUkhsjg|v{hbdb}{bTF; 0AMWYUFOKlySE\^mhjeYR=KC.@PVerloOXD(VWU]@;J`MYOs}vpfelkdQnf^PctlI8.:7CTfpbmx}`lyfZs\ql^rSW>:\}}zuhTn`Ai=XI\uhyir|agMewcU]\blkǿØzhrzyuzwsFJamuezxxmoVYn}qwm[RdwqwvpbB429Jfiz}bRNGH_a^E/#%8R`WE`mZZ`NS;Q_XVA@F:)?L/17I[TQcZC^OoxvqN__C^}dQGe^\W]oyy~{ellvhQ%!& *.P*0Ma^fxWiWB53.* 86-Ov|x[bQqmmYWhRBDVYBAFbdSgdomRnJWRBmm_\Q;R;ZdRbnPgd7QNs`rqZwvJN[DQZGpjXncyozrtftvjoqc[UrzmSirxykkvpotjjwiqQBmwttxx_]egngfhr}st_fj~vuzjK`vjzwlwowdrtwq{kV=]i^<")Nma\pw{}Qnxfo{tlwe]]vnjjRgdYy}jcd} }c[P^Y]hpq|or}~smj?|{qtzUWpXbvg`V}wvtz}w{{|v{owvēzz}^lZZxosXc|sglRoouetmOc}~v|oz~~n\lpea|~~oyXlt{isYh~v[crqvmn\}psvh}cHiyWejQd|jm|{s{bxqTIRlqb(TsG1Qlq~cgvkvqz}sSYngkq{{lk}rmry~esgx{~|uZ|ywlsnv|u_gz}n|mLTjCLz]7?XI]ichrƸڞ}oim`UYhzϻgg|rݹQx{x˺ϲʲ˥ћ~}~{zeSgìdXseww}cmvurarmTllgjabxn{tt^orw}~_cNNYcrrsncj{XwylQ~VLy]}wq`[d][iwmf{g}orWb}vwb:hlly(NMPCdt|z_Ja}wxygfxV6A(*a}wT<^yY^^abF\_T@4WG^Xhmci^T0s[Tj^~a}mf`RRPf}ķԧʜzthrɷǦȩwj|t̓hzYth1^bigoqW_yKYm]G!G^L/.Wr,UOIwMff@.C(4lpXT43M-HhkvcI=v~oc`@QP)3`aS=NbU'-:Rtc?'8L.$7DfiS|O&U@MK?XaP0,.8WW8W1&8VbeE*IrqMH;!Uj^BJ^sdZ:OyRRWxeTTbv`Rczs]9O'%Y^zZoyoY|~sRe\LGɉʱҷܠsnͺἍɨƵx\}e}]UfVjt]&>whVq^Zp0B8>^[]hQ_zh|ttf^lS?:Zz0`qw}}o\#+?R\T`pdZoL`rrz`ZndX#YZP_s~DDH1m<-H+EGGL;uf?/OI?SOINHfBLf}]XSJ2DCY)5&Uge=0.$ST;lQ3 !.C0U<)TlHQe}yT-ieQM0Li$Tdt}oC7N59hO%O]_H>c}vMOmO?[-"Gx@19Jd<9/]WMWw|c_vd7ZP|S:;~·hq[zvwc7Nm{k`_-[:TDzjw}fYS3Xبn{weZcsݭʸ{3ӕMjVӰwwͫgr๤~]K~}gtqrƫzvzĴרtƱRBo˵e#rReiŸjxr}֤ܿwC\xxG>YieoQ{^+M{n|wċngjDfZsh\T)U~pRkn}˴zuo}vf\Nbb]eÜf>˓|R<-rcՃto|}wyx}L^X]{BMz_PloĴAFwdlaywhŨsHRn|nyVWWHb\}lOPViwkqoqqmyehGz~Ocѕ̞լgbJxtÝ}pzwn\}˱ļʱīoftg-p{{uiV慻q+amd϶sqzjzvptwytӛ|ssZ]rd}zVmbwwjjbpga[vK\LiNX]EMxbZvg?VBtE]GgZ_vgmlsW;2>(nQٲ|QgcnR~A-jXh`k_}R4Dhr4"\Z;DRkwndbTs]^E.M^f_vMz]tY^fSVc^\2Z,u30jy=Ve{r`zgf|M"LbVhbl`]Z{\\icAli|^vi*Q[9LJtqrgM[]YU]uR^mX`UmlztqpbkSg{{cjQLAZwppon~pzcffj}yyj_`zwmRz|||tddɡηyon_V>Saszsy^ldufvokz|Y|Xnz|ypxsk4S|Z~|r}Ss~{}tqqϲzƪțǪRo}Ϯht¦~my|Zhw{gWclww^ht}_INRnZq] GLRjdZbj`d<9iacPML>6U`gxqQWtQoB\W;N23 0R|wWTXndgcCIW`MSO[U0C?WKYWNL/8\K4G=?-[A3N\hKJF/O`SeRONGX[NKD54D;NY[h;3,'4DECI)+5SgPEVFb]FGVbC1;<<0<0*,BK/3" '** 1MLogGmqsa59P?VdJ_>Xdbi_k[?9ggzrPhshJMgohUFQ`o_wsayI]tfYruN\^ccYbno_OU]p~fypmsmZfiOc|j|wpf[fmhgratsvvu}s\to^{z}xuqyompsurprz}ql}yjm}rEcx`ETgV}chcKfLhronrxzƝǝuTޝPsjstqe~{Ln}y|}wyugk~}v||^_qZ}}~zkfQstwwlp|u|[Rygdfh^BeiuQ8IO`jpcIbwoJwnpmfj[io[Jo[gcoÙ(,Ȩ ubbupovyx|oyn{s|{}y髳˰™Tsadx~zruXg`WC_wpbxvcz`rx^Yo~mz_bkl}Xc~rdv~kqyTf|^{xfy~mviRXgZIKkdroVhszy{}zmZd]Xyw~wzfvO^XSrt~~{n~m~~TbwJWpRbd`Waug:HU\qwzj\WN_LH`]W\nm}Rujw`dj]sdYmoNrozzmys]i{`uy}y_Wgp}b\Zo}ascp{}iut|gnmtrrsyy{|znt|wdsls}}w}|w{s}z|{ȏo~|zkix{j}vvr|qzolgatlvyhuipw]jjjhy~xysaI`df{muxn[Xasfkvzr{y\qqhXh\psev4>0E%3PxMGFau]lvoNgpVQif[fU||]svtSK_aRW\=\_Fbt[oTu}aclrtukWovs}vnvq|oYs{vmio5VLkA[[pf_XC'opmBzHi|Wrp_QlmwkZW}cItl:{]hy^ZX2sicVbgqfw~fflgyszZ~Yb{x|b"Kvh`\lnl{d|Zw}}lrnkesy}qquowuvqtZou^]rmlqwrtne|qy~mhpg~jduqn{`]Fq`vsoFa{gm_sgi]{pukhtjxenkmxtsxh|xxt~~n~qoqoxwauorqqgLnjbjld~xz}}|}|~{~|n}xrxmvqwrwy{uy|zzm{m^}~{ute}~zi}yyq{ztzrojvmzo}oorh|da}yr{yaqvxs}gqneztttp~r~zoygw}ifq}zxyywbrohm_qtxvnoml}qrkdplqep~xm^bqv}xjrrmvwzue~mUbZXrqlicjob`clwqpfnf^hr\snx}sgiqYg\bw]vUdo{kgfwrlzw}sroyjrz{y}aqxs{utnmsosokda{lr^{fyuwsyz}st[{xyrp{mlsnkbq|{mz[t}qqxwvmv~~u}zgsw[}l}krls|kq~o}wmnpy}np}y|u~Omvsy}o}cv|\duka^pkt}xcs_WUr`p{vuogdm~rN\uf]yhfwyrUTookkjrvTSYbsh`gxqpfrtzzafklroaoutiYuqhgy{wss~kpof}{rwynkxy|{|ȧ}v}{{~~}}xwqszyoy{u{t~}~v~~~}pz}}{loq{vuh~zuwlrkn||ymxrsxY^fUcqfgmr`hXVg_lkeZQ`nZK]g]XRVPGDU`W[ZVKN@JD?]VM>SYP[YHOZTNWK9XLYb]oQTb;@KX\[gP^n`^qnzokhhfL\^PNpv}tjsrfrqo{lxxz}mson~}kw}~rzdq|~ow~}vvxv|ouyvgaZcxvpirfyzzsz\yvYUkbop[iexyukc{qZjl~uq^Qhrfcsamwq{|fdqcTydegwYjrtpanwwxZtfiwX]Gkkl{ttvtvkhqq{z{aYnokph^}{ntfkqzvtjhf~wo|zsx{~hy~w~otvvu}w}~~sovspjuygyrpuh|m}pxxzwqjJNu_ipspxoy~yyc}eyRcӈT|zh{xntzt}m|{rwwvtmsxvksx}ylqqety}~mbzpjjo|gth~eoR|giptkql~rctvTb~~z|qMezqhgohxmxl}hYi|ioqovkcnksqnrtynesWovtIlmnl|awbxoestaM_prlpythunXXlymhexycOjsmxdvrvjluldbfdquch`TwkYnrpokfm]jsZcbU^URY]g]PNXf`bzhOF{U8Fn`igyw]{ww{zjhlqekqtf[~xzxrlqkpvzlr}~tv`lr|xt|~}r{{|~spxqyxu{|{u|y||vzrrmqxxvtxw|wzu~uyvz~ms~ouv{t||nb~n|v}}~u|~n}||~}ue|w~uxtdummtuyxthkxxgzqyr~|sxveϋh~}wȫFփZow~}{vxf{pn~pow`Ti\qtook{ysiyyapUvgflVyj[oi}tjwfgwkisyzi`mp}pkyp|~xyudqpffk`{Yfxzq{qghvkb|rqvkrqpzgtnu|jxrt~j|uhymksxlsnv{z~mmwzrhpaqQytakotqexoz{~vn||au|wasv[}|dzU|}rrrpxsjnyxqnvwvme~qth|}oumyxopz{{u|fls~uzuqFK{}ixzpszv~~nsxjjj{|zwyvy}yy|o{}|u|[zzt}unw|u|ozw|}{zwzznqpq[|gZz\h_BxnEto{afjTydbmge{uorowijfTn_1Mijxtxvs{zx{|jlunw~wgt{iumoYyNZpnhZ|UvxvqVt|cc{yy|xoJc}luu}yz|np{~~~o}wvv}~{~u|z{r{yrr{|py}|pyz|wzv~}|v|sy}|xz}vuwyy{{~}mx{|pxvft{vou|y{{ruqs}}z|nmq{wuvnrsv~ml|}lsqr{}}sqzmtloqp{lmhl{nToy`vrsyus{}so|{wyww}~}}|}uzjwly~x}||vx}~~xz~u|ytx~~~~t~k}}uvy|n{y|{y{t{u|vvpp~sxs|~}qutvt}sx{q{~zzywt}wxnpuyg|hjuvu}vgovp~nulu{x|vopzrssuw|{{rz}|z}~rpesv}y}~~{xxrw~o}|wv|}}yz|wz~vwq|xqtqyw}{xyzvx|}}zz|~}{{}zz|wx~}~wxyy{}x}}}}|~}}{x~rxszy~w|x~}zz|wx|vtxwNxtx|{w~wuxwzy{x{zsxr~~|tzvtsx|qsux{u{~v|uznumszy||x{zs||t~lzz}vvvzv~wp{|}u}xn{y~{v}~|}|{v~{{ortxpox}nxuruwzw~xy{{z|}{~v{~|~v{x}}~||zwjx}q|u~zyu||sipvj{rwpv~uhv}tt}zz~~x|~}}t|x}}{{y~~xvw{t~{~yx||zr}}~|m|{yr~u}zz{ngp}~||zw}{x}|{~||wzsz~y|}vm|}t{zzmn~z}}tp|ynz}tz{ryw~sz|sxw|y}yuzmwuw~w{{qrqq{xw{|}{~|~{|||lx|{wyx{|xxwwzzszuxzzyzuuxz{wr|~{wx~~y~{{y{|x}qrt|zyz}{zy~|~u}}z{v}~x{}~~|z{}x~{z|yyy}}xu}}~{yryy{yy||x{}z}~|k}{v}x}ytyy}m|}r~yx~{~{w~|{}y{r~w{zvl~u}~{y}y~{|v{{xw|rzxz}y|{~}|}z~z{}}u|}~}ztt|}~u|}~}zwxy|~~}|~px{t|~{|v~{x}y~{~zveo}f|{tj|~{zx{~}}t{}sxwtvy|vs{q}s{yyz}~x~xzx}~{|~~}|vujF2ftq}wzwf\rmp}y|rusvVqv|w|{~~}zy|{ur~{s|||u~{|w~{}y{~}~v}|{q}{||}~{}}|{||v}|}{{~}{}{}x|tsws|rdzbPof`w~|vvrx{d}yyz}x{sx}}ysrydvlr}xu}ustzz}ps|~z}}w{~vz}{w|zx}~w}}zy|_snx||~qku~z~v}{w~s{y}||o{}}z~~}x{njz}~~qx|qz~y~|}~|{|z|z{~~}wwz}wx~t~e}vr~txu{wyur|nwut{|}{|u~y}ywuzqpptz~xx|u}{~~~y}z{}|}{}y{x~}uosxw~}ysy}w~s{}|w|s|}z}xz~{zyy}{{~||}vt|}||y~{|~{s~~v~|{t~tx~}{}|~{s}}}{{yy~x||}yz|yx|z|}}{x{xr~{s{xz{~v~~{~~~|z}|w~~}~~||zwy{{~x~z{~}zz~y{wx{{}{}z}}y{~|~|zzy|z~}~s|~~~z~w~zxx~~~z}~y|||y}~||~|~s|~||~||z{~z}~{}~tz}}|~z~~z}y{{v}}~~}~~z{{xy|~y|}|~}{~~v||~{z}}{y|~}~}~|w{~u}}|yt|{v~~~~}|t~{~~}|~yx{}vx~~~{}x|z{x|{}u~{{||~}z|u}~~}||}z}}x}~yw~z~{~}||z||~~{z~|{|yt|yyzz}}~}u{~~kvlkx|y}x|~|~ywy~}~~|}~|~z|~{~ms|~}x|t{||zy~{x~~}|}~}~n{~~y|~|{y{xv~||}y~x~}~}~~~~~z|xx}y~|x~~{x}x|z|{w}~}~~|w{z~v{{~~|z{~|zz}}}}~x{~y~~~}~~~~{~|~~~}|~|w|z~~{~|||~}~}x|}~~}|~z~}~~{x{~y|}~~}|z|z~~{}}~|||{}}}z{|~y}y|vy}|~|{~~~~~}}yx||~}}{{~{~~~~}~~{~~|~~}~}{~}|||~~|}y{}x~~z{|}y}{z{z|~||x~}~|~}}{z}|~z|{z{z~z{~z}yy}{}|v|~{~|~|~x}|yy~~}y}|}~{~}}~~~{~~}{~}~~~z~|~~|}~~|~}}}{~{z{|}~~~||~~}|~|}}}}~|||}yz~z{v}|{~~uz|y~}||z~}}||~z}{{xyyx~|{~v|}~|~{~~{}~~}y}}|~~}~~{}~|~}~}|wy}~{zy~|~|~}y{}}}|~yzuo}~}}z~w|}~}}|~z|}y}t{|}y|}{}}{~}||~~}{|~|~~{}|~~{|}|}}{}}||z~|z{}~~}~~~|}|~{~~~~~|yw{|~~y|}{||}x}~~~~~~~}}~}~}|~w}}~~}~~~{{}|~~~~~|~}~~~}~~~|~~|}~~|~~~~z}}{~|}||}n|{}~}~}z|{}}~{}~~xz~~x}~}{}}~~~~}~~}~~~~~{|~~z~{~~~~}}~}~|~|{z~~~~~~~~}~y~~~~~~~~~~}~~~~}~~{~}~~~}~~~~|}z}~~|}~|~~~~~~~~~{|~~~}~~~~~~~~~~~~~~~~}}~~~~~~~~~~~~~lierolibre-0.5/data/sounds/DEATH2.wav000066400000000000000000000661271205125547100173760ustar00rootroot00000000000000RIFFOlWAVEfmt "V"Vdata+ltmg^|}v{qvaWUABYblr\hqzszvkrj}cZgXkv~hspmX`cjxf_uVUyl|j{ooQY^V^tg|~}ryxmm_Joqo~uiyshhjwtenmnngrbzy}y~khVV~Ƹ̎wqrfz~l`;aonpϯiGPZwpx}xePbtpxirevdbq}ϛx͙wmz]nk`jzknyz|{_xlYjpqyaq{qw|yg\ayyvphtxrd3|邦nnDaCi0gwigUx7?KGm?9BV;3eoUl|֝۽ŧz;bw|uk`|goNU~ez~YT|aQon3|n޷ɼyieώ2@]{qș3T\6϶om{KxaUYveܥy^Ѻ{w[rpCvo]<{O90eJɚVxuĀuclh>fG}YmǸ㺪q_U|aKaGrrno{a;X2f# AYlrzov}~-"9uleLqz[y^vg{Jv_tZdXTZ[H6D:@eA.S96ZfsU.kvbdb[{{IXa`kFߝ؍»۟{zI}{`C &FTrRXI-tpjbtfn;JecOJddеⷣuqgʼfsMA06! ]`7&HhXQ>yl`>O[bڣټ{vKbCgđI43MvtR$WmbpsFMwN,UlzӼ֜|nSjwdR: 'G%6!EQu}Pg\.Jb9jm9;cìI^Lʫpnfk7SG,)A;;]n:&"Cauʹ϶ֳy¥JaEg]F>#0IfyzkxaMK7d`\tyɼm*Jq̢BG_>fdmvnnaf oP+!ltizwXߕJg*g|Ik.éui:L~ryJdl)8돆ͅ]hҰ~zM=It`'f?6h̛~`ڲӮjvʳk͢ylV`>V^:Y =K7.AkAYsWzD7VLVk񹒒XKj¥Y&&3*=+!Zta +   <`iěx١{bYZY]r*Rqc`_55Ehsr_lYCU3Pz{mbcRbjeebJ;sⱅ[r7K>`?6XVe9 5r^LH178$Om±]+*"<{coqZRH  +C}t!jdc|_svlQC>>r:\q@2F96bw}quV9PT!-;Qyv𾌼٬hK $5 ,- 4Izr`q~jzjcsŠMRydglPrt*^?uT"[5_wȷ짙xl\@:>(EPpĦƹþ{p|hjboebcx^/:8$0BUaL>3WZ|rཨsnSD[psdVpxQ9.[KpxnRgkltVv|`0Sa /YϦxzx]G?V7Euðue?Skb@;3*@Utna_^md`eZkW?-#0cmٮŪ|gD .!<-UqbcUJ˶ֲsz~fNI4+;65Y?Nd[aHbtĿvwzS_igv^H! !EWߪps؟pY82:E]~cEYcF+7DVCJRd~x|ǗgqpizqTNI/(b|`zywhxǩqi^TUHJQyŬ~{ƷuWkfv`GLcXZ}poXOAYynWml\eI[m}~´ʮwYK0"Ujx^`owrstªwhqzx~fl[WVZpuƮsxh|~d]j|־˷}cm}R/[uidzSn}get~rZjv\dra|ӿν{fvpVH?2?X\Xre^N2HLm{hOOjx}s|T`pc=SZL=@`NNqw½˦HJqïbJ06-EUwxzojuZ\xvftz{wsbj]abaW\CEQ$kQ0uԱvd}||xzbbVqoK8)2:_ZWwuܵǻĴaW>$BSqyx{jc9MJK[pa]xnԹry\RTf[:DXdC:/HVDH03M_{x{dzyPQ]cbT'%#'NŽŸ}^x~kQq`TNGZL#;vaTLEIJ|`\JHE65MCF[I6.8FIISblNMp~C}aOHlhydwjmFK^cfeG "$>UEFe^dMKV@-OR\u{vs}nL,!/Un^tcO`UZ_LV{s;'.%S]N\QgybVGYsqPOPZjcj7Fc:sƴ_B4;/+,$;Nzsi]|beU#@&TG<>JpzȑnZ\,7p{bvrP1 0Vrκuswugoi[@M-5rŷyþe;8-,1;eʩyhA>APFGJ{jXTcwثv}l[7R^iuq`dd_hmSGN{Tkpw|֑aVfS@A$'=#'P`fykb]Q;DYuO.Rtnw|tuy{ne|yzwvg`T4$$]}dSJiyx|{ɽǠ^dP[3, %%-E.EDMCblJkb@g}|ng{rr}k6P>UHFV.6I1D;7SY\d{~jvaGRH_dE@]V/ =B07&//P{}{wr~}oduL:>B& %-5P;9DVjtp}r^P%0GPUHEWUYugHX-9VIQj~yxzu^hqxgZn_trea_pnMTD;E3GNJUXRP9ABI$ Iokshhqb`QI@K9(?Qdsvrs~XHhi}t]gWFCGjxrvngX:PSNQ\p`leRNabolDatxfJHR[`e`t`R_YH8LZ4)Xclwmqkd^qoPAEf\LZGdavstpYs[917=+4-GHWjkioknskslKP\f|ohlXRw~KW7A\64+-2VxpgXQcms}uy{{{mfnUYSk~fZTKQ@^Uojeu{MGAgUh|nssx}jry{y\cotpx\UW5K`ii]goupw{x~}~g]txldj`dtioP_?Q2]wUqV}y~{rirzjSPPPWPBTVdP,IEIUlđ̌}wzmnt^KP{VTc]KSmjhQi{M]\|}}}wi~n_|l_`Y~NxvØþyn_{Xss~kg\HI\[Z_Z~\jvw~y~~zq}}YkjpTafzҤlogtfo~pugfvrgyuaa[`aZhneZrvdkYXƮ}udmZnki_\jJa\UZ?pujtzum\^feidxyaQ_movz~ockasq}[uPZfqpYdPE]gkjq}^rhkW\]RGg~QHIPbwndUhkmgLnxjr}|vyzsps~{jlysrj_{ƨgt~naio[k`qirxyslZbuuofRaUI?Gk|wpt_d[sxfsymjhw{w`kw}ytra[eofwcfebSan{rh|u[QC7:?.?;8ONFIIY`g|qtw}tbcgI)4\@$4BNL,/A=4DUwtbMAMU^DHKLTWa}xgjuzywytRM??GWUGOY\``ic`qbsZLULOPfw||}ze~jowhwsyDgttswq$ʺ;qbQLXxs]{nˤvrurkl[CEHRmXRigjyhytu{|~js_yjjwsyqYYk{س2 Ãx`PCdmduғ柷ƹķ˯Ċ´üĢԱq}||yͳ~}ѿӫ|h~~ļ}pæszǹñˀolp\t{`}ǽķӯ_c_wchyxcykd~g{|}by{l~fhtm~w}iinurxfxŢtx|myyxҽŷɥlwztͼ񽭾œǢ«ƮøúŹ̯yvMh~|L=lzwyeq^EMWKNPYfj^Tcl`chcH=epGr{gNUk^Tw]^\4MIE*1djdMI:NONP:'073&$6.7LHb`U`UY@>HSZd_Q(G~mWMAGfIKcnmp=0StzuyB?mlnqexpph|nk^ii[L7{lrxJ?]f}uvrUQY]DJtc"Xx\|HEAUxMdR:GJ=XxhY@I`%H|puaVtzM+?ey[PLUN 4eRKEHqhsT%KG7CZkt;+-=Av~kxdHFR^ZUiwJ5VNA>NlT8+.$ECOUDQJqmHK4gOjk>YbO`_pnt_TmZ:PHN[kkctLA/'EF.7AYR:6YuP%+YORUcX1LMFTutVZ]^IBACE)2#-cng]^vU0PhSNG"3A.E>tv\_\q^aG<12#*.$ (6AVWW5$"6F]\GQDe_8ogSRRUM/Fal}l5nL9p^JI_vsg|i\^\Q;1;VIOO?ODJ@BS[meeeowhCI`gZ2>GJ_haL"1JHX^fy~[SdCdhWmyhfQqrdW\b^s_e_[W8Xg|eO?Te|tKGBReXVrO$,KIPakfzqB0/4DF\w~|~t{y`idx{úҥöжζ~~lɻĘ̝įzìv~ɺƢï`\hsӿvplugnhxxsgeDHmyzvvsvpoiv~[{|f}^YHFiشxtrvvž̴­}cZczаeŤiYpbr|r{؟|ml|ŷÓfV}~zë¹z]lwx{uek[j[VgywI0ew~uqbXQqxWFBSvxqnszxxwiw{XOFT{xzȟj_@jf~{trudx[bhmlefejzuҩU^q@ޛV{}aWRitmjADRf`yUtïwreul}dd`|||xTHRȴyvlr~mzϱʧʳ̜nn;bfs|sƴuYp}h_|~y}ʩ{xvi{ruy}||u^j~yrmvyfO[pUbJK\iqCJgt]aQ>daJ5.GehlnnQ[NVG7eX`hbq|_px\wx,_KapOgLd\{pgbv~eHn_cstst}VdhZqj\tohx}q\ilvr_kXSaa\dam\YSl_cUPW`fwktm{_5fu}P{aKo?8ZvzqLnWA_24`D [zvk\`GTiNucnvkX4;^pltFO~Zqelk[VyTs|NL_7S3,n\K\lUywwySC^j[cf~k~[Q{N=;mn\rg^\p^iZsb}litYcKeJE_[jjNĤBmsrqmg`\]\Y]EtH_`fQxiy@qaotfrgpI6unuswdghO3l~hnxoEOgϫ]sd|~iRϹ޾~Fߡ{Uyyܬɛյ۫ݭߤٽ˷mvkѳș}ܲڰʨ{xnxp{dUTxCahb\vMauoktx}xZd{]^rdqnv\8Lr}_~wznl}`aXu|jzxrq{}nntĞhqro}TR^m{cvri|hyyq\ZUtnmpuj~}{gT`tvzsxzuvbxy|uŬuƊawpɆŠvtѽwx{rfkwptyrjYpu{ork_QPVfzZlY'>JRYuicML]16]L[VPC(CO`LrnTSi]aeYp;>07Q`QJf[N@ghAHFQRU=(WX@96dP@3NWA64PW\>AH33*HXt|kF3@PTPvYFoPTiOb_v}\W_SKX,=P>RnE8mu{]^HWwfqm|Q`jkzfdsbbvqRI7a~fn[[ZWc_Qhyz|`\SOI0JT[\gr|wsfnx^\lybw]nnw~kut~uuwpu}wln}ugg{uĪzuŷɵڎФ㰙Ƕӭ¢°ŷîrű̲|mлś|¢FنxrrZ_Ͻtv]qzc}wT}lrhurUooy_9mztrqfpvs[j_dtUS\TQQQphEGusf{]ESTGNajdgsyvV,0Vm_Wcyknkzzrgsg`x|}diaNRSZG0&UYpviwypheivmjtzzq~cw{b`fuwagtoqb8Wҕ}pJ]cluosl~xss}]it|xdnujovmvn`jNUp]\~~nznt׷ìƹưȹƱz嫃vjxvxj{rvm_}_ue\x~lrggicjUXRAnj*?gD*\E9@@F/;LYEMUUG8LPZT:QN^WND;2>@$D?il0=EY H"L:!SH:'^FLSFG9d,L[9D/D%=2LD=&"/ (0La[WKol~g69HD=ACA?IOspze8w7Lm[dkN]JRofi\J^]hxsWPmbhbcvOBrxOduceXhaNVe]oo|u[w~kjb^jlinqdjsjotnmea`t{h~p||pyl|zy~|xyzkkz~o|vyni}qm}thct}vjM\`Ucæ}pzzŠ~uix}}vxz}j~z||zey~~~xml|{o~|tywe]zlhzxgdJUpwufNBWdif^baaovlrkmioygf_|ulddj_i]Mi~qvunmy{{yvm{vswe}m~xнǨ¢|px|llbgW`R_`w}nfaOdzqtmvz{jwunhlmZgcmnc`XlljpbQJUqLKrmtffwusudi|{~te\Q^fdoivy_y~vZJTegp|}xqzbCWzw|{UYvt}yvi}}pnln}rgfozssxt}s|}{yz{kiJb~emgRkzvs|xzzx~zsjouowgo{sqjz|{os|wd[m{}n~~mu{jvtk|lw|~jjeedos{e{yt~j`rorWjohuwp~~wqcdrpcq}x^_qfsxzwxwglzmxrqr}}dsp`WPhnb}wnm~|yulszwlmsxn{˼·~yu|x}~~wkhrYVnmzRtoXzym~ij`tdhzt|}r^l{clb^=_~Gxn}r{inrwT]~kpXi~twm{xu_^]pohluw}uv~\~x}x|z}sr{w~pltuvhhy`xpwNQTiZqu=>RdSVib:X\o_flmsi`iyljiuuxk]}vJOIPUTlnorif^yuleuvvl}pXkכ~~kk|}uztcdWmpnhetnissc`eo}x}u~mZr}mrLwlofnrqgWc|hxZfppp~~o|qmkj{|b\Yaw|m{px|~tzr}slj\]oi]tfIrntwlvs}tl{tg~n{dTtxj[uz|ks|gXchm{xt`q`txpbb]_e_Vhv{~aWixg]_T^eahg[J?Krn]|ppjgnzkSZwmgrce{sgdTFJ\Lajoz~k[{}ywogz|u{johwye`srkz}re\jvrkovrzrmvci~gvjouy~m}xut{y{~pjporjkrwx}~zwzw~jqdZrw~|wkebq|xlntskjSQhaitwnj~vopl{qes|]^iU[hw~r|}wyr~wzyzvxwpvwwxhsz~{yzxpe|xqo|qpwskmyktznZ\LNNWRP`iihpuuk\b]Xcf`T;;Zi]]p[MXYMN`P[lqtjlkieudT_i`fv_`U_ikmfhabx~llbmdmu]V\u}rme[gpswt}w|zjk]NWr~yzh`hlecZUXNABRZ\cgrpTaIFJI]MSWfoa_g]pkKTU7Pj\janaPIC_edhkfRSQVYCR`Vgy{zipphbpiip`dphWmhul`lc]^lwzvbclq|x|uykZ^sieqyzq{}~}q}xps|tq}{t|~|~hyysvuz{q}oqsz~|tqpTlodztpq|tgmlhvh]mxy|xvcU_Zqqghsv_OV]doxx~rjfknnetkXjkjwy0Zr4/l=_NEYWmp`}P^puL=aglziasxuwjUYW`]hdZMJQfTHlgRps{}u{u{~xnwpo{yypsxsss}|p{{ywyrnzpw}|~|}~}|unxr[vKi`urpwyp~}yr{lbknrestxwpmjgxvt~rufbydZbURfpf^\[ajtl]aiyzaQRlbSPX|_Tbsitldge]LQRUWY\`fhr{setx~zlnwskqgj`rjlld{{miqxy}}zhjhqoot}qjnno}zktqw~um}uhei{{jhx|sci\dvsr}~|z|y}z|~vws|xu{}w{||~w{{voplq^wqvhgty_dniXamyfiwjmmcbzlimcQUbZle`fYhqwk]pwzoozqw~tpjcd^ksvx|rsgrsw}w|s~{|runs|}ususovwo}znq|zzzrnsqipvmovuxrvplp[[mwtzg`gvvpqnzxotrrsvqxytgpylZYdZfij`ed[_jghgac^jmpqmlxwzuhqvrmnrsb]_pwy{xng`ZZ\WUahg\supwunzzxrx}rrxzr{}txywjnrultwo{uofsu~|~~|z~~u~yxz{xrlpnoznrt{nnin{x|{tsttllrpgiqqn]ZXdlu{hvvhmklzo`forssihhox{hjgspw~vwwsxquw{{}vory}z~~~~|~|r{}~wxpo{zzxy|uqlr|{yyvynmuxuukmvqx~wxolrvwzq||uxsvwrqp|sw~zyqovw}~}yz{z}v||x~}|zwyuuupplpsorttxvpiwyyxghpsogltsofgkx}|}qz|lsoszunghhgfgfipllomsor~{nhhmnjlgabptnlfetvnuypk_dnlvpyzxqtwxx{tnklsrqz|}zxx}}~xyrs{sxy||qszsz{{qmvy}|{tuur|mgmrt~wpu~wow~xwwxzwplzruyuxpsvpploph{x{~{|{zxsvwu{~ytvsswoowwv|}~}|w~|yxt}v}wvw|vq|~{yvwtrghpnrtuyullph`^_agefkqpmcbb`mlebgfhrpf[Pfcaq[\eb]]UW_mqljmoosqodidkiq|p{xrzpgi`dhltywwxxuqq~~|x{{}w|}~yvttyuoz~|qrhdnmsvmililg]^dhfkuvqohb]`gcWUZVVY`]bVXVOLCEFNHKTWLJMMIKNOOKNHSUNLMJIG=CBBHMXa]ZMORRWXSOPLMV]bglqhc`a_VPRcdnwvwomkfjjkttrsxww~yu{|u{v{|v{zz|vy~|qz|ld`Zemmlopmnwv|rrdjojgglifkacmlnpkioifkmkkhbYV^jqppmpfchgifdljdeifiommv{rqrsqigih`]\celqvwvzqrtuqkpqqy}qrnolkjnprtpoppnfhsw|wpmmu~wx|x{xy}x{x{|}vvqtzvx}towvvtuy}~|yvpltxspqvoyyw~zvzy~{v|}}x}~uztoju~y~y|{loov~sxpjrphbnniompw{ytpnrr{urxtw|~{~zoghrwux~~xofagomkfgns{uv{}yprskjtzypswvmlu|nhk`indcompobjot{{vyuinnlleggdicbhYeimuonhcZY\afh^`idimlqptnmrmnmpnikmrrpng_\^_hojdbalkgge`_]WXXXUVW[TT]]__hqj^fb]```bhglkfosxxwuosrmkmmnigtwxx|{{|wvww{tw|~~||}|}}{~x}~|~z~w|xyzz{zoy~szrzq{{z~}yssshxvv~vx|xv{z|{~~z|{~{souvppxzuzx{}|rmjfd`hqvy{xvtfdlkmuxngjgdfohhkehaehkndb`__]`fiospoghheghiedmpngd_\_dhbgknoljkmmsjlomjhfepuwsouxxwxyvvxumqvmfgdopqvzvuomniidehjhd`adnrvwv~ulofkgnprvmtifnmjvvwywyvtqvz}tkuqnkpkfpuzz|zwrt~|xxvwx}~|}~zvpgppx{wvxvsrvvy}|xw~wxuvxuu|}}x{vpzvyw{~jx{{}zy~~~|vvyz}y}x{}w{|||pxtt}xt|{{}|yx}~yyx{}~yzz}}{yxw|~y~~zz~}~|y~~z{{wy~}}z}w|zx~}|}wwx~~z}||zz~{}|x||yv{xrppw|{zywyvtvz}zywupmntojghlkpssqolknjjrvnhjlortuvqnlkecdfhfhd`\_cbdfachgebdjgdigionnnotsstroqtofchgbaghnttosxz}{yrovwronotywy~zwrsyyyxy|}zw{|}~|{}}~~zzy{~yyz~}~utxxyxvu}x|}wyvsxxvvtutvrprrz}vmvwt|zknwuporuspuwsjsuqssnpvww{ztovyrrsxx|~zpknrt{~{{vw}}~~}zxzuzqyxt}mw||{wwttpouqouqstrttsurijjhmnmqsrspoqolntqqnklifmpjqpppqtttvropihhnrqppsqohmnknqwsqrsqrhlripqu{{wywvwzwsxvwyzz|zxusqqxxwwvqorqwxvuxzy|~}{|}yw{x}~z{yyxww}|w|{vu||xvrouv|}{ywxx{}}zvxvrvz~yvwsxxtuyz{}~z~~{xz}}}{}~z}zvvxxz~}~~yyxwvspruutqmhgjllnoppoommpsqstvyvwxyzxwwwxyvrrsvrwunurtqtwrstupjolmqruutuwwvy~|{yy{~ywvwuyxzwvvw{{yvqotwxy{}}yvx}~}}|{{xx{x|~}}{z}}~~z{zyxz{x{zy|~{zwwx}}x{wuvvtwzyzywvwwutvxwwwwvutrssvyy|{wvwutsuuyzwwwsrtvqnoossutvuvwxyyy{|{{z{z{xx|}yz|}}}}|}~~}|{}xvvwyy{}|}}y{}yz}}|~{{|||}~zw{{xyyxvssoorwxwwwsqorxurvvuuwxxvrqqrruxy{y{|{}zyxwxz~}~}|{}~~{{{~~~||{}~|{{{}}~~~~~~}|}}}}{|~~}~~~~~}}}~~~||{{|~~~}{{}~}z}~~~~||~~|y{}}|}yxyzy{zx||zxwy}|zz|~~}~~{||{|z}}~~~~~}}~~}}~}{~|{{}~}{|}~}~~}||}|~~}|}|{{|~|||~~~}}}~~|{|~~~}{z{}||{{z{{zz{{||{{{{|}}||{{zyz{{~~|}}{xxxx{{|||{|{zxwxxyy|{{}~}{|}}}}|||{yz{||{|}}|}}~~~~|{zyxxwxy{{}|{}}||{|}~~}}||~}~}}}~~|}|zy{~}~~~~~~~~}}~lierolibre-0.5/data/sounds/DEATH3.wav000066400000000000000000001407241205125547100173730ustar00rootroot00000000000000RIFFWAVEfmt "V"Vdata|yslgcljYLP[\bek~|lnviisu|wu~~skgit}pf\`pzyyw~w_Yc\`d`kz~{riiglu}iholoyzjjifknonzyrefnot||sttpmgl{kcm~r^P9=Zpud]ein}s^Q`w}qs|loiovpjy}}~wrrxvtzrbbivzegjm~xz}zlksyj_iqu~lh~~~OƻwwbwX_r<@vqث:_Z}tn`lD[fazZ|z_rd|lllhmnPHj̭իrа\=Ĩ~tfergouE¼䩒{įbWeea{u>'ƋS绨ksNRhT̙P̓ަfaVgjx_tTzc<7{A ˈʙ^Tcmu=mWXp캥|}kuiViay]m۪j=Hdk-^3-T^~Wnwx|~84Cv\qE_Cygzh]ZeaBimy3B;5/246 b}g,) !&+?AL^IL8*E@IE<`M1gaTS̪xLneİ{vRH9U1QyTd9!F[7.VQGeh鱍{ζkH~i!7=G^w~ldz_UO]SsnaϳϚ}[iqw{VXZXlYRgj{N` ncE"b[FwViV0IjիV'=^,/Ďwq6lnT& 2psؑYm󳟷̟xXL`_2\x~ίo^{cξWuì}nxPӧjVB@5-B1-hL()'<5'ng/RV*jU6J   57AkObɠQU[XV+RZg-   (/ 6! '  8ATYþu윃ߞA蜟@kq"4V*fŵFgۡbBe@gtoॣϨڠntԚ|ҵqZzݸbL-Qjq]iphٗ]25~֔iîp,>6>02C/JtI2$@W:Pl+%uvklIYLXbV묄u{mijpD C-0 EmQWRC@E ->x֣THm铘նP(;u~}cY_||h;E  ]\VoeyU3*  .E(.(2A^uO #Bsq,   44Q}zx*%l+ME,)1yھ`U(+¹ڀ]E& {HG>vJI^…jvHBpWhebsMC- ߺaX)Wڣxvz4Het[ [Q:PQyd )^ǨԠux|QԐp Jjke~@OfntqP5+FVh}gkf®̹͎azk2-:2(6#93]qWp}㳅}mry]:  Z`>@Sj\MF{xg|\[VL$'Dh]LV6& =`QG7. 4DxƯѥI( vתF1808lnnugY "![{#ݏ3VՑԾMLǽ\   Aoô{S,E4' %5Cv{YKFh{T&$ +CPEOsvka~`/ 0~klzeV=L]R  3F>% !<^j˼{]<:"tP7   $Xrw`+Mv[uyv{ɱyhN>4&D\jLhY=!;GOEBfw}v֒n]Wϡb?Rwa-/WS5*=ܹƭ\#!/(-Cqp[rn^k}rclx}༯TSidoyfkRbne[dH$7R7,[qϾvyî}aUF;4G_xjȺeQPDYoxqfQL7(1.3?=F>7<%*GfȡٽvKB6CGWkT]aR#  ,7PjY4%3.%LNgyU/]m2  "/s{dVJLD@"+Yjgb=114;HCRCBlõc`ehnhv~wpXASJLMC5   "%=c~ǹcjoxʌkP3)3N_Q=BC9+$+(/BYnkkqia`hrmgVK4&.Ib_|bhvl]|ŪrqiNC;8?Rh¾ͯmiİrlf]\tsZMLT]mpflkM@Rj~`Z\NRWUsӸnP83@8 AYonz]T\v|jhʭwkxnqsuaL[gv˷sjcejfڽƧʲ̼zieyfS\ipb\Xs||sl`^]zӝ~~k[DI\exr}w^PFQWxrfbanw{n}f^kvo`][Wfyۣͫ|coɷzHA)386`y}kt·|hbkuzfMACYP_HLμ~zufhoyze>.29OUc{µѺ_C/""RtzrulP>=I_^`e\p˜niWU[eOHWVG/4EYL9"6]jx~qZo~~|{^ZY[TM7,G{~dmvrbWy]FKI<6/}{ss\H<:jykj[OS4+5PerűnhY¡pMgxbViy}f\qiYlifũȾ{]P^h_[XVVN\£rjq`UMZV]jpzxfewy˾{nijrʸſǹʮvy̸ֺe__eàɡߠízMdj-@AhipڜoRc7 /Ccsxg]L;3AqcQh~|j]-LtˮgQQSWU: *.MRKHOfqY6;8.2;@KimZWa]H.$0^g\mnrunrrYV}SSO"&QYHHS}dXQU_n]HDFdhZ=SmX_G=1B71.Ko{urng\J-94SMD< *MgʚvVIG%&Y̩}~oM#Ecnvǵ}wZ[bEMWY>:uɪqx}ں^Gn^8<[ϠŠq`os\AInyӤv۬oRczΤt\\ʯ}wlUD?T\9 7D%0`gbotpռhOCUm{U?aԾd[qe^ktzjH4%*@iylYVͱtZ[IA,*BWLN`[G=WM8>OfW\kky|v۰xsoQPUWU_mmgf_Q5(?@GZnaxhm~uW0 &7OdsƛkVD/7ovpUJDG4EQcvuttQRZNBMZvvvl\YX_]kd~{||oedd]UpZ@WabdDK.)N4AI[ox^mxZ<@[w}ȯ}p`XfSURWLD98zԶ~irynf[G3@77:?hnpik{ּ|Ǣ}zrnNawyzfp¦jZqo/)P[TYbcgaӿhZgmcbg_V8$JqǷjo{kP=&_zo\ORI90@Rfpxwp~zzti_Vn~󾗖s^WMO_fd[AB9#  )Pir~lUObx˹gZ^a]iZH-#7IUfkXE;&(10A~ğ}x}metzdafI/")!'BPf|njugJ@GE>EcttxQ')#&&+?[hxfXUVdytjas~eJ;.  "3Wee_UMMlgcWMNJ[qsVSXepɻ}~{}twme^`uwmlixu{|n}cfruikuhYF?=MX]^[Ycq}w{w{|lpf~oP97=>:B4.DY]f˴ξd]USJDS\Pf}nYYVV6"%#%;UVEIz࿱vkq|}wkj`HA 7.#"$%dϺŽʹlR?FH8#4OMOgcJN]^LFEHLI^ֿz]EHVY^XU@$ 4cvϼչq`B=LS=$9N\ms`VfwұeSE2=;DTPGZ}c>;Lisf^juǭpH5(''$&BR[kfaU_{ۿ|P9"/;MVRm{fs~jZetkaZLonmٿھ}txem]CNK+2BMtsh}̫eLA2% \վts{ozlA '5;CMX\rzsznbXbSNaggllxspwqa[U]YMZTG?\ozyvwo`YZR3-'!0;[y­zXeyvpc]ernoXKB57Zzzyie`TVWQD>Ldǹ}uwdabXbns|dI* /LWVdw~v\VULLXZSSTR\^fjo`H5>LPF91( C>0ASaUL=;1+-1i C HgZa{U·{4?]ubgcpp]ucW<*= #3c~suz¾blkSOb|twpqiSWMV[[jbedaJI[d_Y`baW`~}mῲ­kG8'HWrçpϼoZWQOMIJ@1.6FWe|}eNröi^BItȖs=33Ooq|i{užlUKUHNY\{⽯q[ESw|wеhLkf״y׿ºzlxƦǵr_pcY}wsuqnknhyhin~}ndQMUV]mm`ZP8 2MI9Jh{W7:73;Sm}{e`/  -\ly~b|t[N]|hYKVgwqrulnN',++D]6RXkۮwsioKRSGhQaa2GppE; 7@=k|iP'*XXD;WengjseleilkUDRZP\~ѳsWGSW,-Uqyl`BCVM?@A0++Rcfub\[xtxnd[5+Ios\llZB>;G;PBS]YpZJW;!)TRQkfua]^cT;?X7$4\@7apwjd\Uqti}ne`lsFNEQaJPTHB9PfizoVV`_hXp~vձdZXU_o`W?Q{v~ϺzrpQFa:B^INzѤȶzrjqzϱ{Ʈ֥}tpZoioqn{ksvrpqϯy>;P\kgj}}VdgXW1/9M\wλxfH>JJRFR`k`=8':\~{XI_ŲȪkaWA:++9"^utmtpre[sieMWȷuwlOIWmzezѧq_j|]auDRͺҵ|ZrqjW8WVGT|êǺ [52 GЮ\dg?W\Fo}Pzruqޛq\funV>  Jvj~A1WUmܝml]JV16i\_]B10 A'GuheOYs{<(:Ofi\Fefuip`l|a[eU;!.A1 1?9HzɸS  26Gny^L:7g}pXV"'%9gPv> /# .)3617Xr_YC\atƱ{^6?9GdnfkĴ•jxsG7!,6#/%*.%tod?P_VbWS;C1>bCQ`W,$ Mc;#GPOIgubHOB=JMfqhXvs[LaP0)(/ ,A8!8P@48 Pds}_|ۨeZQ> !1+Al_^ouynGQT_a{uH8Wg`$  !6F`[)"D`y~bz͊scjlKF>^[E?KeEP5*8]nzn:_v~jxaw}hfuIJоܵfozeŘƢѷܟmĴdmkwquoebh}}g~mefsٰcYXP   DDUzjwnc|v~z|e* &K:7Mkh~UQV+3Dsv|aP\R0(0 6KIBAg~}tX;&    -7/Km]?={X$,M`HSJIt~VRhqZ3%    /*-'&9E4Lx}uf_>&1)*9K\?0.;=,4?G=Rb|]MmpVOUq\Zp}01 86 40ep~on˴O9i?1eoYIZXRjxͬ~oG6L]v{cor|ŭpVafkT]mwLTFLiHH[vdavo|vhJCUC>A-I}hny|jtztLo|b}»VãdPRkq}~Udÿ|ħЪtcTstmmڹ}rFIIhydto^UPdka^Vmcdmfiqqvkuùŷ|cK/Jytsv[BF]zvjzкWP?HnMSj]hyXqnmѯaR08bp{xT\ityV??dU2=^XRTjq䭄\nks~URKGRq|~r>Bgxmc{sitibSv|uuFS`1.8nƤRJtϳtžخѩ֥»ĄQ)7q;#d}jw~fǖ{c}ȱdwtsskgx཮y{W\_XPhvhl~nwn{}}uUSRSB>FDH.>;duVuexGL8<3mzwN_[v}ohGNwvofOvSlfs}zv|fTcmff`jn_M>L`WMfutJ;czi7JdO91=hqjjg\M\VXIA@@WP_pww}~xyw~xmkl\KKH]R@?WWdiRHNwr|]Ufl_dgnsicSfJ@WMg]Tpgltk~u|siyclbMRXOqhZ^`~tzuxw@%~~ZqcCv?7RVwa_hYt_!OmA7^Ez&we}id[F{tG_w\oo]i^5.4Zeh<5zmrn^_f{|wuFQ_]]*6&_Kj?I\w\YeubG}KF3DMBB7Z]@f]un`>P\ftdz~tr[oC]w70fi`R\_QҰ@mzrbM[_.MGhEQg[Z7S}a}_mØf6Ad >?dsB8Pe68ZXgwxnvdxcarRNFeYee^ba^fnTTgfJ=)=PhY7ED1EwlCfdc~\e{ltZdli3 D)A!'Q:Bw}`co]NdB9Lt}gq|0OJwKB|YttU5~yhvzx|vh]oMymilq˿}p[yst7-:}|LWgm>itg9|ˋchx~_˟حأТեȱǷ˜uŕh˴緬`gmDZáԲ˾ɒoq^uu[}d]w}|od0SqA]U0-Ujt_yuRbqez_VZNbF:Xwi}[qUkvwEQ\LUf_\lupǖ}o`.Tu\O_nbn{uYovz\gXSrseuz|y~xvrnwkG19cd|}{}{ozpVXzuqq]iuzu|xŸw{|~hHN`jeqtoWa}ztǥ{y\f|yɂѰ}~xſlp}jyvuug^itP^NZ{sztljokdTXrdlb;:EV`UNVd`U)!E?8?3+*9IRT^rezsucjSL1 5ZY4>MVH1fa#+3/5G>5Q[R79\RiwdcI8Ea`UFJ8 'gZM_iH%%>H#*>M\vn80NZV\}pbtzsmaQ\sqjb;(8[birnmbtw_^lsfZn}~~{_fkdleVv|ki|UW~ylTGexmwdi_jndTT|zd\kbu{hvpglmkxdqs|v~ֱŜйôŷľóȶЭǮªvexzw{ywuod[svqryi^cf_TX_Z\VOUL]XJL?8:K:99@fTAN\ZGKZTNKMMDK^WZV&#;8:CPP=(),*0%(KRA+#)CWYB7IQW?E2Vo>','))&4K4%1/5T~z[JU|qL)3E@07K9-,Ggkj\L<=CbmPPkk[^Wys\gdLVfYmjGGbaY[qhQXfd]qsY^zswZVpbC}pu`roc|~ZTm_kqsgdss~iVKi~vXh~xmyzuyw}nqdst~~~{svuw|fj_pxv{qqw|vxzh}sluyq}xs^{}^Q[`kg{v~z~m˷xil~zj{kx~|xy`Quynnkyn|ywh|qZ]ehuy{umn^IbwmKHG]dWioW\k^Znplfzpd]toepuaZnhir{sw}`unnWqekVgyzeax}c{|Ȩ’ʴz}~xtzzppb_kdmU_jfm}tlp~ljsh^nx[c\awqmc`]f_ewX?Kc_lz}dcXkaCTj{`eojuurnjpwprZYPPWZnrsu{|c@]T`qwyjyv~xwW8Yvx~v{yPX}n|}{`e|yxV[wcqmz}zltmqoyz~|~pnnZ]z~uxg[jwikxt|xtymm|~qu|hdzzvt_pw|z{wivzmi[pgmzy~lx{o{vidnvglmtmg]Valr[txtpqzzotmforMmaKt~fWke{nr~udqtca`Varohzp~zxlhsnqvvYdudRGHXmx|mmiyeztpnoxvwsot||yų|ƸuX~}iwrqqfoz_DNfmpX}pVjfb[YPJyytrd`\citpjbf;Qx3ulhbrurj}lxYLdeutqpOXkohqkr{~yqyxxpiwiu~m{ltetvk`}}Zcvboi{QnsuxR^Pt^qE9IVFamz}sZHWBmlWqntkPd}kRb}mjsnohTc]UVUkjngqvVeZgq^n|n|m{szvtiTp}휀jzbsyvvlk\5^o1s^cftysa`s|xutqtau|u]djvpildo_]acnqsn}So}|rszdylpibk|_]]Zsrz|{sp_˥vkw~xxjfIcehcWTWnpyv]M|wxpd_b`]||\jsmiybMkqnic~pfoqk~tLXVGYdxzdi^kr_{k\YRVYbf_]WfW:_xfe[]e{vsvTBlbPnc{|vacUe\7JRmhaiizupwn}ʣoj{qvzuemoqogTyez|udXj}wUgzao|szpVc^UtyRkim`qxf¯|Ls~gsddokdKrioxtaw{~ogp{~qvyisnfg{jmP\xthdyaMQw`>Zpjpvxl}oiy^g_aidu}zpumtkw|ntptTih[`koyyuy}k$NʑKt{}|{vymwu}sk}welrjjrdMi~zZYmfH q&JnxvV[iTX[^U]g_L$FSGwXE?IWRDYew}uU3Df(JDqaUbflnm\GOsuipbntjlXRYrvyywyk\b~|q^}uxuui`UTciwVYlUX`b][:+CWIZ{sckkhH/6SbI\]Vu}_Sc~OAk`TVi\Zm>7^ecziIRTcR@S>X\VVEm^[hfa_kZ>AkwoktfeiWPonTWejysf~veFf{k[jsm}zzyc__{ptiZb7jЈEef}y|}y~kvöuethh~|}y|h|zqrx[Gu{n`mGJo^mdyk^\myffstjhb]\_XczbzRI^YUpyx}ndZ[zp]khY_laMPJ`e[m]IMa_GWT]khr^ee[oeC.A\bDIkTS X]ni,MGprD]{Y?nJ||tllrhuquUV~feRsvjmpi_tywy~vqtfon{hio}ưwOd[n>osv`h{~uzyqp^tqh{p~|cxhMip]hnmxxp{|z|i\[^d{aXpnlcuoiZ_[YUisejkaLdro_lm[boXLOZUTvjdd_`nugdrTg`OfUSGUnwl]c\arztZrumudXV`ombsklpep~uQT^lo_WAtjQi]XokpiZa_s|yOfv]Wop|ziRcxik~miuYxxxk|ywq{}vzekӢdlo_x~vx}~{x|rk{w||p|XShzng{}y}xogtv|uoxmoggnr`s}ldjwlX[Zl{yijr]V`r{n[NAMm|nE8L|~\g\a{}hQ{uXnJR`Y)_rYw¥yywxbT{pcw~mootrlu{yih}xdSwqcfyslf~y[j|qwxYi}|zÆThrtfh\pliomOvUL]\ULPMK=.(D>9N_j_\SH=FORWXLKXOO[WVntNMgaIPOSipvjjpmaWvkfzyu{y~}}xm~{o]rs|wwz|zv~}}ul}|v}zyuyruww|cciaeokm^_tlkhwxdsvFuSj[_Ldca|xfa\kustifg_Q]cjojspbb{mRUdfeja]Znkgse]}~fkbjzlTZlqfNNajuqtffuplmkgv~ovi^nxtjhcitwnmfgrqruq_x|qv}~qw~us~~|~ytwt|}vxv|v^bwtiyy~}oi}hV~jxuzwqcgooblxtmy}zrx~uuv}z{{vtr}|u~z{n}t{qlwrvzzrk[]tMstem^v}fXkfds~t{{izla^]pmfz~`Smr}nvhqrpwdbmnv}skj{ztphhqmlsnwKhep_fag``am}skunS^nv~q][ihoyjVYNXe^hrl_kiRUG\|lmVRod_ddllboqntvrpvidqecx][lcv\Pa[``p|gMZYTVO\\`NNhKQaVJUmpokjqrY[l`hfSYXgzty{mkln~xZIVqlkyyur~y~yit}k}x}z~{|wu{sp{~xhtwzw{ui~`pyy~mt}|wx{{uz~n}vzxwy{}mr}vtxkotp~}up}njjy|tjptj|vt|zz|{toecaaf}xp{s[yvup~zt}{pwmkysoq,_RP{@Bsg{{WTwcbndihqQaohu^ndewtpQ5_a?\rtaajecbledklmrs]WidWXg\\_ci~}b\hyfcfgmpgjntuonwyuytkpxcmttsaUchu}tm{jnukhU_Uca`Uj`Z\lxx|n\Yqwwnqmnghgp3,}lWfnzjXjfo|hjOtei\vlg|wnwx~i}}z{|p{uopXefj|vychðc@ThmihkbUMUiz}uh]\am|zʿ³֣q[vֶfjyswyj]gyug^Zas~hQFR`usXCMiwYC@QituqijnqoaU\l~ro~xiSNaƭj@WѭpWrį~vy{wpzxko{ms|whah}{sqppkjnoljb\]`ggb_`_[TPTbnnh`ZY\cidXXgsqg`bgiikou|}p[S`szj^an}{g]gzyjl|ouw}ʬcUrgSYunZ\ckntvgWTKIez\@49EYf\IBFQX[YMFMVSRWSJFIGFGGJMOF=9FYb^M>7=QhpaOJMRZdihd]]injlmhdcgqskiknstupq~smkps\iƴ|wsqVK`qNH\klj_OA?IX_R>:IY\SKKJ@>IX`UD;AW`WH968GTQOU_gihfn}|yqŚspϣrwɯЯ׻}iakuo]SSTOKJE?@=>9-,:LP<"1PeY<+$'CameRB@M_kc\[\^[U^s|tmqrps|}ur`c}|jfrzuoow}}|jbvxxw}ijra}ymrtqpw|ums|k`ahpvvmcgx{m`]dkbXW^fgb`behjmg_`ime[e}qfm|yrwtks~{rjlpqnjgfbcklaUVfso]LO^jcX[efe^Zajmkhffnx|{rnqw}wwſïzvttwqknqnhgif_UOQRSW^aYMDAFKKECHGB>?ISJ84ATXPEDMWYTSY_hqupmnswvv~iQPf|{keegjr{yiZOT`lw}|vtvuvxz}š͹˰æ̸}ry|z}rsqmmzumooliibV[cUEHWaW@+0L]ZH,@msN+)EsgD7Y{cUVilMSpp[WkyprwyvwyxmorhY]|iILod[p|||zjndYnodr|tmpyvslJHg[DLh}{iSCCVkobPIO\gjeaZS[s|i[Xg~znmsw}~hc{|~~}}|lcnproamxsrpjqsgfmkfjqvw~}w}{t~wst~eV_pz~sYPglNNgzwlc^btzmcdro^g~|rs}zz}{{|~menypdfnk_VXall]OKR_kgRGR^[UXVRX\ZYWZ`c]]hf_b^_txmkkw|oqx{}|u}~qswjkrxulmoqw|xqpvvuwyux}rv}}vv|zlejt{yk_`kuyqaY^ikifa[[]]YSRY[UMNTWSK@9AOQF;58>DD?977>DD:15=@>@ED>:4QxH-dWhqv~y}synjlfnlsn~}ysq}}imnfy~|}r}zrvohu|y||z~ngpxzzvz{qlykamkjtytz{xy~zzy{~x{~}}|ts{wrvqyxrty|~|~||oqsi|{vt{~wyus~ijtlw~{}zy|qswu|}~wu~|zyz~|~zx}tv~uv{{~~}}~}uu|{vvy~yx~|}{|}|}}z|}yz}w{}}}{|z|~rq{~sowvx|{~{y}}|||~vu~xs{~yw}zz}z|rq}wwzy{~~}|{|z~|zzy{yxt~zx~|}{z{}}z}|y}|~}}~~}{}{yw}|~}}x|~y{}z}~}||y{zx}~~}|~~}z{vw}|}{|z}~y|~~~|~z}}~}}~{}y}~z||{}~~}}y|{|||~~~}~y~~z}~~~{z|~~}}|}~}|u}~z|~~{~z|}z}||}}~{||~~|}|~|{~}}}~~}}~zy|}||}}|~}|}}~~{|~}~~~~}{~}|~z}~~~}|~z{~{~|~}|zx|}xw|~|~{|~}}|~~{~}}~~~{{|}}||~|w{{z~|}}~||}~}~}}~~~{{~}~~~}~~~z}~}~~~~}}|||~}|{~~}}}}}}}}|}~~~~}}}~~|}~~~|}~}~}}}~~~~~~~~~~}~}~~}}~~~{}|}~}~}~|{|~|{~}~}||||}|~}{~~}~}}|}~~~~{}~}~~}}~}}}}|}~}}~}~}~~~}~{}~|~~~{|~}~~}}}~~}~|~~}||||{~}~}|~~||}}~~~~}}||~~~}{~}{}}{}~~~~~~~~|~~}~}~~~}}~~}~~~}~~~~~~|}}}~~~~}~{}~~}~~~|}~|{~{{{{~{|~~~}~~~~~~{|}~|||{~~~~~|~~}~}~}~{|}}~~~~~~{|}}~~~~~~~~~}~~~~~~~~}}}~~~}|~~|~~~~~||~~}~}~}}~~}~}~~~}~}~~}~}~~~}}~}~~~}~}~}~~}}~~~~}|~~~~~~~~~~~~}}~~~~}~~}|~}~}~~~~~~~~~~~~~~~}~}}}}~~~}~~~~~}~~~~~~|}~~~~~}~}~~~~|~~~~~~~~~~~~|~}~~~|}~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~}~~~~~~}~}xrqiwyu|anj~ty}vyk\cyrmjsovu{wq}xv}~|{}uqx|~xy}tv}}~}|w~zuv|{}vzzu|w{|~}|~uw|pw~~}vvsqyx~~}~wzz}y}|{~|xz{||zw~~~|}|z}zx~|{vuh|_b{xGkTUjn=96,&5C=)*7/!*GO7'@4*794,!/AFDF?@1!'NXTD9FP[]WLB:;CIMQ[aejhoj]apoiqo`]ahjyywĽ⬨yvygQ>NVEik=G,KWJ` /     $0                      #*2+3E4F[>epv|iivt©´ϸӴǿìؾĺ߮ѼԹótovvsnkxynphfhoy\@?EHFDIT[_gUN=?DJD730:34[rXC`xyyednjkrmbT[qwmy}mkd}wbrʿлʽ§̷߷w~zyzrfjoqvypiksqqYEEBHYV=s{]hd<@^\_tOUyY^KLst\iy~sqQTlVaMK`yrdszs_\88BG0\^mVMCT.#;E# "   "      $*"* -,*94 BNJR*);NX=8imOEGqOWlb10suiyhy}ɲʹ{ngxz}MJVZqy]8&'#5JG1" -  *I    )  0+        3          )           %I(/1&7)8K^kiS62A\f^ZkvǸʾͻȺÿǣѮ{ok`pvjhUuwjT25CaB>6m@ ,9=N:*$:*' +04 AwjC`  9S]k2sUPZaWFK^mnok||ig|ǨԽʺλíoxrsla9I9BST?8A=2.& ($                   .2+(,0%/0".HP??PYNBCMevxiV\amsmnY^V>V\I=DRduhWXihUPWWF>M``XFVjXB[utbDFBFB@RVlf=454@NSEAL_X>I\SF[ovpB9ENr|īƿͿտµ¶ľ¾qygJJhn_bdeYQWYNG6-CHITRA6<4'-.+* &+ %!              *      '47"      "*."! &$ (LQVcRFSeaQVJ/%Emoq[yx\Mqzx{hѻ~soz}jbhfPCJX^\O=<62>BA=:8H8 %8=HMD>=730-#%53.# &40 '&&!/4'           8ZH(+8=GLK0'7;FFEYcwrY76rxy}podSodYo÷µťǯļǿôҽԼ޼λ¼÷tf`bl{rsuqlpmet|xkXOL8'-DZdcPEKZZN0,3 ,4$#'4<=><4,05&                %# !6@M< 8LU[WS4+'5YdWDOSVoqWJGUbis~ΰǧy|kSFEHUkl`OEGA>20))>67?:&(2.*'%8>8/31)),+'"$"#/4)'1FC:4$ #&<45<.CJCOWXRTRC.)DbkntgJABERTRWZ[V[]ZaZWXQJJMOKK\kdXC.1ALNEAILQSaV97CV[[TRfiN@;8MVYbVG@;6LPL5)5626BKD*#&(7@:\}mR@@389.;Tid\dqk```dbXIL[aqz~{wqplglkowu||{}yt`Wdrs`Zda^ZLJPD9>NYSF>:6' 0E^\:/??AELKDES\]Z[[QSYVSZZNGJUirpvq`_a`cfmqqkinmlnmjgfkqvrrx{iVZhuyoprspxxuzpdlϾкqintpejvxxsiXI==?FMKJMPUWK>;:62($$"3BE?<=<1'#(*)&)4:7+ ",5?@4()8>2*#"*3?FD:0/28=HLE<@C>>FKHEA=4+*'3:1,./**'&&-/.0-    #+)#&.6:0((*-21*!)?LH8+.@HFEEDDKOGB==?@?AA?=3/5CGHKGAESUJ>5<:889?FV\[ULGE@ADGPUUTUTYjqqhZ[`jpt{{ŵ|sd\aee^WRPV^\QKC;97," &,.8?DSahhh^NJS``YY[SD:;@IOZ`VNOKHEIOOPPPV][YXQJP[cbXC8DY`[XXYSP[_ZUUYhzxgXZeioodZ[cht|rmuzy|ľļýļľyurqx|}{vojlrqmheefdimfWZchoqpmf`bm{}upooolkkrxwz{}yrlhimlnvzwjb`b^YVOHBBHLNG>;AGNPMC95;??EONA;=DQ]a\SQU\bhd`aiwshfqwmmyqgjy{vttwyzw|zzz{{~|vw{|qtz{yrheky}sf]^fgeiqpcTJFCB?@JJ?41560)$ %).14620-$!)4;4*((#&,5<91(##&**-/352//*#%,20*##)&!#*,*)-,($!$%&%&+*$ $,6;3'%(".<;3,0:AGNPJGKNNMU\_ZW[birnlpt~ʾž~w{zy}~||zutuxtja\VQYcji]VZ[SE:8?KQKEDA>5-,3:@;0-14//+'##%").+"!!         #&&'&+7AGFED@>99=DLWfmkfefhfdfov{ttzɼʿƽtnpttqieea]]a_\Z[[^^ZWSQQPNSUUVYZYZVRPX[YYYZUOIKORZ[[TNNQTTRQRSPQUURPPLECDJPSSVRPV[[UW[TRQV^ega]YTTZ\^`bb\ZY[_dc\[[YZZ]`eiig`ZUTWW[_ba_`efd\QKLPRW]`UHC@?AHJGGIHKTXPIILNLJRRKGGKNNR[]\^`_VQRTZY\ZX]fopjfjproov|{|zuw|{zyysoprvyy}}||umjqvy{xuuvz~}~~{|yw|w|xxz|wvyvplnt}}}|y}}zumklptyy}{wsrtuqpprw{{}|vrprswyyyz{}yxz}ysy}xukgkkigjjlpqoje^WSV`fhd`_XOLPTURRRSSKB>CHIJHA>:76;9:?>8469=<9879?DINQNHEDBABCEKRTRMMPWYUUY]ZTVZ[]\ZY[`cksyvttusppomidgjmnkijptutxyvyz}zskijpu{}|}¿yvustsmhcdfgc^]YUPKEEFDGIKKGD?>=?<;;?B@<86:==?>;<@?@=;:79;>@@A<888850))/1662168:81/.)%&$"$+//.*++'&)(&+,,(! "!  #%'%&'')***)+.-)&+/5:==8.)+0:A;57@GJIB:=FLLKNQQSQTX^`_bfc`afiifcafpqqrrvxyz}~üľ¼~~~y{|x|{uuvxuutrpkiiklqsqnlmklmjgc_[XZXQJLUY[WSQPQSPIFFJLHFEDFEA=;?FIKLIIJIEDBDDDDFIIE??A@??>=;:9995579:9656523576/..24577740..,/4??BCCA>;6214:?BA<84///5:>@A?;64147;#5&2'/),+*,$-*q`33. SW_^b^bbdhgonvt|{ݹݷżëĿjxle]5[EBDTB>?:832-*$#              - # ! #%'&)+,.///16:=@CFIMNPRVX[]_bcgfpli?QW7MQWWZZZZZ[YXYWVVUSSPPOPB[pQ>]kQ\VbSI?>M@\Z:AFEHILLNNOPPRRUVWWYZ\Y_dtfrsٸɿ׽ݻɭtsqwi]]sjZ[^eaIGM@LF;UQP[Q52AF0(.#-%        +4'  +.+.$$! !)49*:ZDPgJ>NchUc`K*-VQoc^nOtry{јgzwrnjgd`]XUOKMVRKSC<93-AD!,7BIMJ@;674313,*.#*4+*+/%#$%$"   "  '    +2X2300//3285B63GJPX&B?VkcmV0/6~{{{t~oEhamҸҸǸʺöȹݾص໮صѮñýzwmdfo{o{yihf_lusoUBHJC@PUYYUIENL>9<<0.3.4,)/764,$0= 4*             !$,:3=5 8KUbSU0$%8abZDTURqxWTU`Zr_˴̽¿yviq}iZRT[Yc^LC?HDA99-)LB=75$"')15.!%$3.136+"+/0)' $ !%6>&$%AA9;2.,'6>(/;.FOH\ZRFLTO92G`eagfVPLHXXU_]d[UY_i_ZVVZRGQPIVlggTCKBEEFHRPUUaaRNPZ]XVU`fMECD^bZZOB>FNSWSODEO<%&@K30/7HACI8-++-03@NE;;HEDI4 6>C,NxqaLI9FL:BWkeY`jjjd`emi][`fpqyvmu}thqwt~~~qt|{yx_\dhfbbh[RYTQNHFIMPKFCB?>>6/.8>?748>9&%*'2A9:8/>M^]5:H9@PK>>Pa`YOST]ejjgeb`ggnorrrdc|}qhrmo{vcXbglywv|wknsxrqowxprzy~z}{{xwo{ys}ɽżռƮƹ˻úľȵϻϾƽķ}ujbfqoejohUKRYXQEBHIQR>7/+.*$ %!#!           $,)*/*)09?=>@BJIJY]VHP^YUTSV_WEEOSeonquxogc]W[^hoqpmlgfghkgmomplns~scWdps{zuotz{qry~|w{vҽƽzzxwkmvw|{paZPOSQRPRRPQ]ZQLE=@:41,>NPHBB>4+'.::72.18<94)&('-5;BB=69B>8611:@KFA99?AA>ADHD721<7-'',/,-- #&"$*'!!&1,6-%*0=?;?HA:8/(2DGD>9:>DHA56==ADGD7E=-&/BJHDCB@FJC>=B@?<EKMF@?FB;3*1<7/9FB61'!'+.//'%"! ""&"'--& !$&'$*:BELJ?9=BAEMQKFHOX]SFLYZSVSB/1:=;7-'*/,#          (15/-3?FJHFGMUV]b]VW]^^_clor|yngcbjqy|xvƾ̵Ƿ}uls|usqptqniquqicea^UR\cjlj`MHRSUUWYM:6CNV[WPJB<:;<9CJE:/3?B<23@DB?;. !,/.,,.*/0)#)'        0"$06?EMRQJ<:BRRP]`YV]ebjrnX^x}tk_`^dmtxvqp{u}{{{̾þwz~pcchmqqlcac_abhph`XQRPRTNCA@>?><1%'/6<6)"(.&'%"%               "# !2>?>:9<;99AFJJECLRSTXZZZXXX[fp{~tklpsux|~ǿĽ¾~pmns~p_Z[ZXVUSSPJGFGHHKMF@BC;>MPGA=>A=:>??AA>>@@=<;87:9?A@5-,-2;=<:421.130)+144,$%*04960,'(+/13/)'*,*,--**.42*(&)17402576/19@C6.1761-/58521.29=@=>??CORMGELSTONTYVQRXXZYVVZ_`fswqopsrmlnlgefjlnjhkqttuxxvw{}slilqw|~|zuswwnifcdd_\YYUQJB@A?@DHFB=;9997569=940/3689502455441./157972.,./-&!"&'..%%(,/-'## $" !!!  ##"*/34." (5;2'*2?B@7/3@GCCGHIJJNSXXX]`^XY`fgd]Zalomlnuwvx~|}ƽ»{|zx{v{xsqtvtvtroifihiopngfhhghd`a]XSSSLFHOUTOKLMNMH@=>EGB??<::94/5>CDFA?A@<:97::::61/17743126<@?>=>ACFEDEIJFDFECBACFGJHGNMKPTZYUSPNOSUUVRSVXXXZ[_afg`dkokklkmotxyyz|¾xutuxwvxz{zywwsqmikkhfcgkmkimkgaa`\Z]`aa_\YWX^bccb`_^^^a_XQSWXZY^caYRMNPQQPSTQPONQV\^ZVX_aYOOSUSSVXYVVVWXUSUVVXXVRPLKOVUK@=>??>>97:AB?>;:=A<9=CFEC?;::89>CFECDINNHFGNRPLIEGNV[ZVQTXXVTW[_`[VVX^aadc`]chiijkheegijkosvqppqvxusutrns|}vu{~}|{~ytx|xrkknsyzxyxusttpmijmoprsqoqx}}ywvsty{{~xuuwussspoomifhiihedehlligdddfiigd[XX[_bc`^XW[__Z[]_]XXXZ\Z[ZWW[`ab`[XY[\]^^_`\[\]ahjikpvvnggnswsprtx{{wuwyxyvqsz~|~~{~}zwx|~yvvvwsmloswwvsoonlmooonpnkhhhlsvtqohdgloollihipssogchtwspihjkkgheabgkifdgkjfgec`^afggdddb\X[^``^^^\_acedcbaaa`^\XZ]_afgdcfillihdcghhhhknqstspsxz~}{|}~yy||ysppqokhiiihjhdcbehgc_^\ZXXXZZYXZ^`_[Z]^Z[]]_^^_bjrvtsnihkmqvxyy{{ywwxwux{~~zz{|~|yvstx|{ywvsqrtnfdhnopqpmgb`a``ab^^ZXXY\\_]ZY[`cb[RU]`a_[XVX]`a]^addc`[[``\]`a``chfc_^[YXY^aacdgghhfb\XX_inkfdacfhhhinrvywssttsqsx|{y{|||xsv{~}y{}|}}{xwx{|{|z{zy{{|{ustvxz|{wvvvyyyxwtlmruxxtnkidaa``aejlic_]ZZ^`]YZZYVV\``^XUUWZ^]XXYZ]a_`a`__cfhgjovwqljiknsuy|~}yx{}~~~}zy}~{|~~~}}~{vww{~~|wvvvurqpqrtutqrsvxxxtpkhhklmpqrqoigfgfhghghkpppkdcfjkhebadfghga_ab`a``afkojd`^]]_acdced`[Z_``acba``__`^[[]_a^_cefgijliihklljiihinoljnpposw{}~|vppruvvz{|||zwutvwyzy{yvtuxz{{|zzxyyxyvvxxy{{{xxx|xutuxyz}}}{|zz{{zzyvv{~|zyyz{xz~~~}{{|~}|}{z~~zxy{|zxxxwsnhggjorrolilnojgefeehmjgc`_aaZ^```a_]\[XUUWXXXY[XWURRUWXYZYWROOPSTWX\YRNMQSSUZ]^[YVVURPORV[^]]^``_[YZZYWWWZ]^^]^`_`adc`^__aa_`a``_^bfgcaaaaacbb_]]_cdcaabceefb`^_abfjkhc```abgghhgfjnqsqliknqsplnptvvsuwxwwwvz}|}~~||||{{xxxvwvvvursssutstuxy{yvqopsuvwwwwvuwy{{{yyvxwxz|zxxyyxyz|||zyy{}|{{{ywvx{|~}|{}~{wvvwy{zvtuwy{zxxwvvw{|~~{xwx{|{|||{x{{xy|~~}{yx|}zxxy{||{{yxxxwvusqponppqsttrqqqpooomoqqqqqqqqquwvspnnpsssstuwwwttttvwxxxwvwxyyxutvx{{xtstvttwxxxxy{{z{|~~{xwvsssuvwwyz||yxwxxyxywwxyyxxxwwwwxyz{{xyyyzxwvwwx{~~{xxx|~~}{zxwy{{zx{{xxvwuqnkjmonjjgfflonlggfilifddghjigffghjkkgfgghjkijihggkkkkihgghiklkhijkklllkjhhghhkoonklkljhhilmmmjhiihjklkljjlnqqqooonmlloqqruvvwwvvwvwxyywwxy{||~~~~|{||{yxxwvwxz{xwwvvwvwvvvwwwxuqquxxxvsqrsttstqpqqvxwvsuvwwvvwuvxy|ywvwz{|{xxxxxwvxvtvwtspopoqssqpnkiiihhgghhhgffhhiiiigfaaeghffgfc`abcabcdgghfddeffgghhhigfgggikkhfghhhiikklkhhhkmopnllnpponnnopqpopruwvrqpstwy{z{{yz|~|yxxxx{~}zyyxy{{{{~~{xxxz{}}|zyy{~~}{}~|{}~{yy{}|{y{z{{yx{{{{{zz{}||||zxyz|{{yuvxzzyxwyxxyxxwuttuttvvrnnopstsqmljillmnljihffiijjhggggefgfecbcb`_`aa_`_]]]]]_aa`a``_a^]^_``aaaab_`bdedcbaaacdgjkkiiihgffggijlljhjlmmnnnknpstrrppptxyyxwvtvyyzxxy|~|{zyy|{yxvvtsssrqpopopomllllkjihgedcdddefggeb``adhihfca`bdbdceffddfhiifeffecdcdddefgghgedcccffeffijkkjghiiijklmooomlnpppnnoqttvtqpqtwwtqrtuwxxwvwvwxxxyxyxyxyyyzywwxxxxxz{{|{|yyyyy{|{{y{~~~~~~~~~~{{{}{{{{{}{yxz|{{{{wxxywxxxyyxxwwvxxyxwxzzy{{|{yz{}~~|{}}||}~}{}~}zyyz{||}|{xywz|~~|ywwvwz~}yzyz{}||zxwuvvwyyyxvusuvuvvwvwvsrpssstsrqpruwvtrqssvtppnnpuvvvutssstttvxxxwwwwvwxyz{{{|{yxxxxxz{{zxxxy|{{zyyyxzzyxxxz}~~}|||||||||~}}~||}~}||}~~~~~~~~~~~~~~~}}~~~~~}||}~~|||{z{|}~~~~{{yy{{||}|{zy{|zy{zywxwxwwxvvwxyxxwwutvvvussstuvuurqppqqsqqqqpopqqpppoprsrssssrqprssqpooqqqqrssssstuttttssussstvvxwwxwwvvwwvwx{|{|{{z{|||zy{|~~~~~~}|||}~~}}||zxyyyyxwvtssstqrtttrrqqrtrpqqqpopqrrqpqqtvutstuvwxyyyyxxyz{{{zz{{}~~~~~}}~~~}}||||}||{|{{{{{|zxyyyyyxyyy{{{yyxutuwxyywwwxxwwxyyxxwxwyxy{z{{zxz{{{}~~~~}|||~~~{{{{{{{{{zyxxx{{{|{|zywwxz|{|{zyxxy{||{yz{||||{|z{||~~~}{{|~~~~~~}~~|||}~~~{||{{|{yxxyyyxwwwxxxwxxwwvwvuvttvvwvuspppsuvvtttsstttttttsssutssstttttsuvutssrtvvwxwwwwyxyywyyzy{{z{z|{{}~}~~~}~~~~~~~}|||~~~{{{{yyxxx{{|}||zyyyyyyyyyzyyywxxxyyyxxwwwwwwwxxwwwvwvvstwwvuvvtttuttvvvvvvutuvvvvwvuvwwvttutvwwwxxxxwvvvvvuvxwwyxwwwxxxxwwvxxyxxxxyxxyxwwyxyzyxxxyyyyxwwvwxyzxxxxxzyyxz{z{{}}|{{{}~~~~~~{{||{{{||zyzyyyyyxwwwxyzyxvvvuvvtttttssstttrqqpppppqoppqponnoooppppooponnnpppoooopprqqqqrqqqprsstttttsssstvwwwwwvvxxyxyxxyyz|}}||||||{|||||~~|||~~~~~}||}~~~~~~~~~~~~~~}}~~~~~~~~~~~~~~|{|||~}{}}}}||}~}{||}|}|||}|{}{~}~}{yxyz{{yyy{|{yyzxxxyxzwxxyyxyxzyy{||zy{{||~~~|||}|{}~~~~~~~~~~~}~~~}~~}|}|||{||}|{zyxyxxyxxxxxwwwvvvuvvvuwwwwwwwvwvuxwwxyxxxxwwvwxwxwxxyxzyyxyxxxyyyyyyxyxyyzzyyyyyyyyyz{zyxwyxxwxwwxxxxxxwwwvwvvvwwwvvuwtttttuvtuttstuttttststttttttsttstttvvvvxwxvwvwwvwwyy{{|{zz{{||{||}~~~~~~~~~~~~}|{|{{{{|zyxy{z{zxxwwuxvwwxwvvvuvwvututrqrsstuttssttttttsssssttsttttssssttuvstttttvvvwvtttvuwvwvvvvvvvwvvvwwwwwvwwxxxvxxyyyyxxxxyyyyyyyyyz{zzyxzy{{|||||{|||~~~|~}~~~~~~~~~|}~}~~~~|||{||||||{{}|||}{}{|{}||{{{{{{{{||{{{||z{{{z{{{|z{z{z{{{{{z{{zyy|{z{z{{yyzzyy|{{|zxyxyy{{{z|{{{{{{{|{{{{{{|||||{|||||||{||{|||{||}~}||||||||||||||||||||||{|}{}|||||z}{|{z{|||{||{{{{z{|||||{{|z|{{|{|}{|}|{z||}||{||}||||}|~}~~~~~~~~~~~~~~~}~~~}}~~}|||~}~}|{~~}~}~~~~~~~||}~~~~~~~~~~~~}~~~~~~}~~|{|||||}|||||{{||||{}|||{{|z{{{{{|||z|zz{{z{zz{|{z{{{{z{{|{{{{z|{{{{zxzzz{{{zz{{{|yyzyxy{{z{|zyy{|{{yyyzyyyz||{{z{{|{{{zxxyyyy{{yyyz{{z{{{{{{{{{|{{{|{{{{|{{{{{z{{{{{{{{z{|{z{{{z|{{|{{{zz|{{{{{z{{|z{{|||||||}{~~~~~}~~~~~}~~~~~~}||{}|||{||{{{{|{{{{{{|{{|z{{{{{{zzy{|{{{{{|{{{{{|zyyxz{zzzzyxyyyyyyzxyyyyyyyyyyyyyxyxyyyyyyxxyyyzyyz{zzyzyz{z{yyy{{{{{{z{{{z{|{||||||||||||~~~||~~~}}~~~}~~~~~~~~~}~~~~}~~~~~~~~~~~~~~~~~~~~}}~~~~}||~}}|}|}}||||||||||{||}|||||||}|{}||||}||~~~~|{|||~~~~~}~~~~~~~~~~~~}}~~~~~~~~}~}~~~~~~~~~~~~~~~~~~~~~~~~}}~~~~~~~~~~~~}}~~}~}~~~~~~}~~~~}~~}~~}~~~~~}~~~}~~~}~~}~~~~~~~~~~~~~~~~~~~~~~~~~}~~}~~~~~~~}~~~}|||}~~|||||||}|{|{{}|{||}}||||||||{|||{{{{|{{{{{z{{{z{{|{{{{{{{|zyxyyyyyxyyyyyzyxyzyyzzzyyyzyyyyz{|{{z{z{{{zz||{{{z|{{{|||||{|||||~~~~~~~~~~~~~~~~~~~~~~}~~~}|||}||{||||}||{|}|}|{|||}|}|{}|||||}{}||||||||||||{|~~~{|}~}|||~}~}}~}~}~~~~~~~~~~~}~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~}~}~~~}~~}~}~~~}~}~~~~~}|}|{||||||}{|||{|||||{|||||||||}|{|||||||}|}||||||||||}|}|||||||||||{}~~~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~~}}~~~~~~~~~~~~~}~~~~~~~}~}~~~~~~~~~~~~}~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~lierolibre-0.5/data/sounds/EXP3A.wav000066400000000000000000000065571205125547100173100ustar00rootroot00000000000000RIFFg WAVEfmt "V"VdataC mdfccb`_^\\\][[Z\[[[[[Z[]]]^]]\[\\]^_`_`^_^^^^]][[[[[[[[ZXWVTTVWWWWVUSRQOOPQSTTSRRRSSTVWXXYY[\^]\]_befgiijlnprtuxxxxwxy{|}|{zyyz{{||||{zzyxxuvvwxz{}|}}}}}}}{zyzz{}~}{{yxvvy{{|}~~}}~~~}~~~}}|{{{|~}}~~~}}}~|{zyxxxzzzxxwvvtuvuwxy{{{zxxyzz{~~~{zxxy||{yxuqonnnnmmkjhhhjigghhgfededdeghikjjkjknprstttsrponqttspqonkimorqstuxzzzxz{|~}|yyvvuttx}}{vuvvwz{zzz}}~|xxz{}}zvsrrrrrqrsonoooorstwzzywtuuwwz}}~~}ysomkjhhfddba^^\[[Z[[[\[[[\\]]_`bbbb`bacdfeinkjnlpxv~~}||||{yzxxxxvvvvutsstsrsrrspwuxyrtwwsrtsrtruxtswtquwwxwwuxttwuwrvswvuwvvtuuttvppppnprsrpnlnkkjjnjijhiihhggggfffdeeeeddgeedcdcefdcffdgfijhghedhiljimmlmmnmnnpppsootrpqkswsttvurxxvzy{~~}|}~}|{|{zzxy{uvvtwuttsqqqooooolnnllllnkijlhgffeddedacccb_`^]\YYXUTTQRPNIEC@?;9798887888898:;=?>ADFLNOOQSSTTTRRUXVXZ\]^`acbcdddeefhhiffggfedffdddbadda^^]]]ZXWTRQPNMNPQTVWXYZ[`^_^``a``a_bb`^^\XY^adgihmnorstuuwyz{|}~}}}|{xvsqppnooomlligfgfecefikjkljhgggijmooqqpqrqqqqprqqtutuuvvvttuttssrsuwwvwvttwwwywz{|{zywwtww{xwyxzz|xxvwvwuvvvuuututttuxxuyttstruuuvrvttstrqoonnnooooopqqppopoorsrsuusroolilnlkopopnjigiggiijjhijhhffgiikjkjihhjiikmnprqppooooopruvwy{{|~~}~~}}{{xvtuustrrqplijjmlllljifghknpmlmlnloffonqxuprrsstokpx~~~}|{xuux{xuttsrrrroonnnklkjjiifcbadiiijkmlkiloruuwvuuvtutustututtrpomllmoqstuutssstwxyzzz{|~}}}}||}{||}}}}|}~}}}|}}}~}{|{{||{{|{{{yyyzzyzzzzxxzyyyyyyzyyzzzzz{{zzzzzzz{{|{{~}~}}}}}}}}~~~~~}~~|}}~}}||z{zzz{zzz{{{zyxvtttrtutsrqrrqpopppooppqppnmoopopqqqppoopqqrrrsqqpnonpppprrrrsssttuvvxwxxxwxwwxzzyzzzzzzzz{|{{{{{{z{{zz{{z{zzzy{yxyyyyxxxxxxxxxxxxxwwxxxxxxxxxxyywxxxxywxxxwyxxxxwxxxxxwwwvuvvvvvuuuttstsssssssqrrrrrrrstrssssttvuvvvvwxxxyzyz{zzzyz{yzzzzyyzzzzyyyxyyyxxywvuuututtsrrrrqqqppppoooooooopqpqqqrrsqrssttsutuuuvvvvwwvwwwwwxxxxxxywwwwvvvuuuuttstsrrqqppqppooonmmmmmnmmmmlklnnmnpnooopppqqqrsssttuttuttvuvvvvvwvvwwxwvwvvvuvvwvuwvvuvutttuttttttuusstststttttutttuuututuuvvuwuuuvvwwxxwyxxwxxxxwwwxwwwxxwwvvvuvvvvvvvvvwvtuuuvvvvvuvvwwxyxxxwwxxxwyyzzyzzzzzzzzzy{yzz{zzz{zzzzzzzzzzzzzzyzzzzyzzyzz{{z{{{||z{{{{{|{|}|||{{{{{||~}~}}~}~}|~~~~}~~~~~~~|}}~}~}}|z{{zzz{zyyxxxxywwwwwvvwwvwwvwvxyxxxxxyyxxxxxxyyxyxxxxxxxwxxxxxxxxxxxxwyyxxxwwwwwwwxxvwwvvwwxxxwwxyxxwxyxyxxwxxyxxzyxyxxyyyz{zzzzzzzzzzzy{zzzz{z{zzzzzzzzzzzz{zyyzxyzzyzyyyyxyyxyyzzzzxzzyyyyyxzyyyyzzzzzzzzyzzzzzzzzz{zzzzzyz{zzzzyzzyz|lierolibre-0.5/data/sounds/EXP3B.wav000066400000000000000000000065571205125547100173110ustar00rootroot00000000000000RIFFg WAVEfmt "V"VdataC |yzyxyxwwwyxvvvwwvttvxussuwwsqruwtrqrwwrmpvwslkqxuljlswphgmsshehptlcdjqpc]dmqi^^hpnb[alsn][hrsg[bnvqd`lyzodiy}phs~mjwzkn|zhmshm~ndqndvlk}qsrtrtykn|ymo|wijxwlr|ss}yr|trysouwov{svxuz~{sqx~{wtstvuutsrw{zwwyyz{xv|~}~yy{{z{wtxyrmklmppnfbfkojcahkifddghd_ckkkfchopkijpwwtppusnmpvwtjhnrqkhhmrwwtorz~{xvw~|}upls{w}{ruqsywqrq}vwsx}xywsqq|}{|pkkiqsryrghfnuszzqrpt{v|utruzzy|z{{xvzwstngc_chfee^XVVZ]]^\WTUX^`bb_\Z\`degea__ajoonoikss}~}}|||zzzyxxwwvvuututtstsrrrrqqpvuwwqsuvsssrqsrsvtswtquvvwuvvwutuuvrtsvttwuuutsttuqqqpnoqprnmlnlkkjmihihhhhggggfgffefeeeddfeddcccdfcdeedegiigghfehikiikmlmmmmmnonoqoosrppmrvsstvspvwvwyz|}~|{{~~}}}|z{yyywwxuuututtrrqpoppnpolnnlllkmkhjjhgggeeeedccdcc```^][ZYWUTRROLIFCA@=:898878878889:<>?@CEHMNPPRTTUUVTSWYWX[\^^_abccceeffghhhgfiigfefgeecccdd`_]]]]ZWVTRQQOMNPQSVXYYZ[^____`baa`_aa`^]\YZ_acfhhjlnqrtuuxxy{{}}}~~~|{zywtrpopomnmljjihgffecefhiiijiggghijmmopooqrqqqqqrpqtsuttuuutsttrssrttvvuvutuwwwxwyz{zywvwuwvywvxxyxywvuwuutuuutttttstttwuuxtrrtqttturutsrrqqonmmnmnoooppqoponoprrqrrsrqpnmjlnmkmnnmnjihiggiiihghjhgffgiijijighhiijklmnopnonnnpoqrsvvwz{|~}~}}~}}{|ywvuutsrqqooliijkkkkjkhghiknolkllmmnggonpvsnqqrssompw{~|}}{zwstvywtssrqqqponnmmkkijihgfcbadfhhijkljjlorttvwuuvtttuustuutrrpomllmoprrturrrstuvwyyz{{}}~||||{||{{{{{{z|{|}{|||||~~|{{z|{z{zzz{zzyyyyzxxwyxyxxwwwxwxxyxwxwxyyzyzyxyzzzzz{{{{{|||||{}||}}}~~}~~}~~~~~~~~~~~~~~~~}|||}|{||z{{zzzzzzz{yz{yyywuttssssssqqqpppooooooooppnnnnoonppqqppoopqqqqrqqppoooopqoqqqrrrsrsuuvvvvvwwwxwxxzzyyyzyzyz{{z{yzz{yyzzzzzzxyyxzyxyyxwwyxxxwwvwwxwwwwwvwwwwwwwwwwwwwwwwwwwvwwwwvvvuvvuvuvvvvvvuuuuuutstssssrrrqrqqqrqqqpqrrsrrsttuuuuvvvwwyxxzyyyyzzzzzzz{yyyxzyyyxxwyxxxwwvuuvtsssrrrqqqpopnoooopooooonoopppqqpqqrrrstrstttuuuvvvvvwvvwwwwwwwwvwvvvvvuuuuttstrrqqppqonoooomnmmmmmmlllllllmnmnnnnooppppqqprrsssttttttuuutvvvuvvvvwvvvvvwvuvuuvututtttttsssrssstssssssrsssssssuuttttttttuutuuvwvvvvvuvvvvvvwvvvvvvvvwvvvvvvutuvuuuvuuuvuuuuutuuuuvvwvvuwwxwvwxxwyxyxxyxxyxyyyyxyyyzzxyyyzyyzyyxyyyyxyyyyyyxyyxyxy{zzzzzyzzyzzy{{{{{{|{z{{{{{z{{{{{{||{||}}}}}}}}}~~}~~~~~~~~~~~~~~}~~~}|{||{|{{{zzzzyyzyxxwwwwwvvwvvvutvuvvvvwvvwwwvwxwwwwxxxxxxxxxxyxxxxwwvwwwwxwwwwwvvvvvwvuvuvvvvvvvvvvvuwvvxxwwvxxvwxwxvxxxxxxxxxxxxyyxxxxzyyyzyyyyyxyyyyyyyyxxywwxxxxxxyxxxxxxxwwxxxxwxxxxyxwxxxyyxxwyxxwxwxxxxxxyxyzyzyzyzyyyxxxwxwwwxxxxyxyyyyyz|lierolibre-0.5/data/sounds/EXP4.wav000066400000000000000000000477031205125547100172060ustar00rootroot00000000000000RIFFOWAVEfmt "V"VdataOyyzz{||z{zuussrrqsqrqqqopnpqqpoollmljgdbbozxxnelsszsorxv|lmltynopkaQFJKMMOPPQRRSTUUTRSTUVUUSSSSQPSSRQ]rn\QUROrÿưhdYfϾϸçwo{~g@>OttdaeSIPHW]D=????EIMNMGEIPPJCBDFEIKMWwl[TFPQ[jg[juln;d^{¾—hU0R~{}k<2WfR^ef}{xveL5>?U޴ɲŰDzؾӵ£յyuu~{ic|â~}tmkfYTZJXw~sI=C0)'%+2PF(076C[YVKKA7.(+-/,94+7TU>?DVrt]IUplG=GNG<6?Whimyouyrc^}~ǯ|hC).N]BBcu_IAGR=&:XTK[ehxnU@MxyZkzqdkdOQXK@:65Rl\WRTdkzb_kFGP<*.?BEOFNkV?:/*V{e[Ziyidq{}}vlnvusn[:(28?\l]XGKwfZehn]Nhl[w{|otzg\<4.(&.04&!%,MkZ90C[a^A( +IUSE>?/+;>50=ZggmxvbOFID8Bdn_Wagb]VZ^hdemtrTDIGF?50.47??;9('2CJIR_d]ZozaSXVG1&,;LOIHbs{ytlK?=8OSB@GWmyqds^JLNF?::884:AHOPPVMIF0-'6FZR=FU^pnyt}|dd]Ui~knldgsͶźŤ޷ͼtqwt~ncĻžҿӺŽՠssũ}wcKFGZjmd^]UH?@>'--&$?G?6FT@0<8&+-=LKKG?>7(EJ7'+99,!(*,178336<>82387/,-2/"&$ "$($# " !&()+0467+%#+377?A>:>@B8-,.(",670+(,0.& +41!-8C7Uusl~uzmqͷýʽŶq\RUZdtzmR=3.6+!%$$""'(($!+-005.$(-32(!3=*39- 0:BDIJB39Sjmrqggo|zs{xs}se_ei^dutspj`[SQVa_NEH3#31,%*14 (('"20&$$ '6UB*"0.0.!,ASM>CVTGJNY`ZNQ[Yco}zy{zwsytupdeiYMKTXG:423=<&$,.%-&("1;4173-34;?9?:-4FKFFNSOJKK7+798EILNKGNUUPLMUdqǻƲzs[cnxzͻŵŭоzst|xolb_fkhlvtlb_]_hddfd\QFM_]SC=AGGFSU@;9>609BC5-1:58=97BA:@KPN;0;?790*1+(%.:A<#$067:?>7?E=:ENNF;=DLA;58FLB75130")040! %%!&!&&+.-+%"(./6?;;>>??>HPLS\SCHHJJRSJEENbkiemqRIT_``mlfdinkkndTRX\dg_dozzwvgX\ffylXVcjsx~{|oǽǾ˹±żroxseafilgR?7:=?AU[B.5DFC7.-' ''&993!#!#5A6533.)+'!)-0, ##4>5(&7D@9.'-9FKH??=8IUMGEAIF=AA9>AHQ[f`TKIHLTZejijly|yvz}pkegmioÿżƺĻqklpstcU]]`a^SIH<8?B;AGC;0-$%..%"+)+680/87=3! 6=:6,,+7<0()-!$/8516/#(4=310.)'!'.*( $.0//+   06365615NYUM;205=@;CA773(*5=HSSNFDFNNF>Cbwvvoegmnksx}zzqdgpwwrw~zrowyqe]_gf^WZcefWB;FXgkeUJLQTOS]faWK@DSgv{sklx}mUTajsokwzu}ysp{zso{ȿusxx{{slehlifa_ac^RHNTUW\]UOHFFCED@926630*!(686-)#$%$!!!!! (#!#!%,(!+'(),(6==743451859:>DDA>HNZgj]S]pwme]]rxllqeabiruyz{tok`Z`msqsumkgkmdeoz|}~sdclmqz|ž½Ծͺ}|zsustzyndWPYbgjqqh]XWY\UPNU]\UMJFD>@EJTYXN;7=<:797+!*58?FC<0# %*.790-)(0798=DHHFFB527?FOTUQV]UKJPXZYUPQSSTUUX[^^``]]\^_bba_a`aaa`ccddb`[ZWUOJGJLMIFCCA@>>=>9?738?C@4$'-6>CHFDC>:?E:/.;DD=9=<=@?;=?A3,3?MNJB73>NQIA?LUUQNIFLU^cbdkoqqqswvzþż½zse]]agnqk]SPQUTUZ]ZTJEFJNQNG>8=B?:BNOKHGHA<9?NWVUWWUPX`VKFUkpjdfmlfadhlhbfnrtx{zqov~}vqmqywvz|{ojow|zw{|{xtsz|i]^juxtkdYSPIGNU^^`cXD:CNOJIGFE@6*'--09DHJKB509FE=>>7*""'.5?F<42/,*.57676;??=>707@HF:'*<@;:>?718>;9;?N^^OBDNQY\SLLPUcjaZdmoqtyŽýʿunu{zslkec^Z[[SQPPUYYXUPJJNOMJKNONRUN?ALRX]]YSNPYdhb_^`a^]]cjlqstpid`aeefmspg`]][YXSKFHOSOF??FNSUQJC@EGELXXNFFKVcfcZX\diliddlwshfp}~vmlvzmdit|uojijmnnkozzrnnlgikigmz|ndfjheabklhfedgsuolaWZajs{||||{vsrvz}}zupmtvh_[aosk_Y[dgfhnocUMIGFCCKLB:7==70+(*.16799763*)09A;1/.,07=CA;1-+,2345775671)*0770((//*'(.00.//++$""%(*+((+)$!'/7;3*(("0<90)-7<@EFA?CFECJRSPMQV_gb^aensz~zž˾üɼ{zz{zywxy~|ngkuxqt|{vwxx{xrtvtpt}}{z{sw{{{zxuttwslc^YV^hmj`Y]_UI@?DNSNGFCB;107?F@727:661-+,/*$#$#!%/40*##((&$ #!!'-264327DMONNMMLFEGOWalrpmmlkihks{wx~žºƻ}snqsspiddc]]__\\]]`a]ZUQRRQUVVW[\[\XSSZ]\\\]XSMMRT\^^XTUWZ[VUWWUV[[WUVTMKLOUY[\ZW\cc^^a[YW[bikhe`\[^bdegfdaacekjca`__adfknnkfb\]__cfihfhlmjdZUUXZ_dh_TNMLNSTRRRSU]b[UTVXVU]]UQRUWWYbdcegd\XZ[aacb`elstplpttssx~|zvx|{zzytrssxzz}~}|xqotz{||z{{~~}~zz~z~{z{}yy|ysprw~}}xrortx|}|xvxzvtuw|{xvwy|~~}{z}{v{|yrmppolooqtvtpkd^\]flljefaXUY]][ZZ\ZTMIMRSTQKHFBAFIFC@>5-()((.1/'&+/,)($""&&$&),+,-..--,*+.376337;??=<::;=?>?>>?>@CA=99;AGFBCCEFDEJNNFACGGA>?CFFCA@CGMQVWUOMLKIJLNSY[XTTW]^\\^c`[\_aca_^`dhmvzwwwxussrpliknpqnmmswwwzzyz}~{tmllrvz~|}¿¾zywuwvplhhjkicb_[WQMMMLNORRNLHFFFEEEHJGFA?BEFGFCEGFGFDB?BDGHIHDB@A@?9458;??;;?AC@:87401/-05987566213326673.)(,/-*)*+)(((*+)('(+*+**,+((((-0011232455646873159?CEE@836:CHD>?GNQOIBFNSSQUVVWWY]cddfkhdfjmlkgeksttuuxz{{ż¾¿~z{}{||wvyyxwwurmmlnptvtqopopqnkgd`]_]WQS[_`]ZWWWYUQNNQSONNMMMIFDGNPRRQPQONKKJLMMNPOMGHIIGGFFCDCDC??ABDB?>?>==???:79<>>A@@=;8879>FJNLGECFHGFCEEHLPPNNNNTUWUUVYUTTRQQORUVWUVX[Y]`bca][Y[]__a___`^adffjllkmrspnlopsvz{|{|~{ywxzz{{}~|{xwuqoomklnqttstsojfeedehjkhddddfkllljhghijga^__cdejlke_[[]^_^^_][\\^cfheddggc]]`_a`ddddadddcabddeca^]\\_``[ROPPPONKIKOROMLKMOMKNSVWTPMJJHINRUUTVY[[YVV\]][WUV\cefd``ddbcceiidaadgkmllihkooqrpommmorsuwxwuwwz{ywvvtsv}~xy|}|~{}zyz}{trqsu{{{{zwvwutqnossttutsvz|{{zywy{{zz{{ywwvuusomnqqopnprssspmnosssplgddeilmkgeefjihghjheddfhghfdeejlljfeedeffiigfedejprrtw{zvpnsvywuvz|}}|{|||{xwy|}~{{{~}{zyyyurssvyzxvttssstutstromnosvyywsomnrtsrqnmqtxytompwzzusppqrpmmklosrnnqrqommljijmopnmmkfdefiighfegklnmkllklkgecdfhkmmlmnrssrommnmoopruwuvwvxz}|||~~||}zwvwvsqnnpqrsomlllmmlgeeddddddcbdfhfeeedededefghlsw{zytrppsvz}~~}||{{{z{~~|}~{zxy|}||zwwvwunlnrttutsokjhgilkifddcddeefeegkljd`bfikhfdddgjijikmmmkhgjkhgijjkorolkgedddhklmmpqrqnkgdekqssrnllnmnnqtwz|{zyzxwww{|||}~|xx{|~||~~{zyz~~|{||}|~}yxwy{{|{|{{|~}{|yustwy|{{wspmlkjikmrtsnkgddghfededbdfhggd``cegfdddegijigijjllnqrv{|xspprsuy||~~{{|~~{z{|||~~|{{{}}{zyzxutuwvyzxwxwy{|{xusposstvwxxusqnmmnmooptwxvsomprqqnmmmnqrokjllllmmmptusmkighjlmmonmlgfiiklnmmllkklhfehjkjkmoopqrssssstssssqrttuttutvz}{xvwz{{}}{zy{|{}}zyz|~~}{{}~|zz|{|~}||{~|zxx{|~~|}|}|}|{z}}||~}|}|}~~}{}~}{z{|}|||{yutqmosuxxvsststqonmnosstqnlkligikllkjjgeedbdefeghfdb_`bdeffedb__``bdefec__`_adgjkjgddb``_adgjkjklmljheededdfhijiklmmmmnmkkllllllklklmopnmmmmmmmljhilnopnmnmnmnmljilnrsssnmlklmoppompsuyyyvssuvwuttuyzz{{|{{z{||~||}|{{{{{{|zyywxwwyxwy{{}||zwtuwz{{||{y{||}|}}|{{z{|}|}|{|{}~~||~~~~|zz{}~~~{yz{{}{z{z{|}|{z{z{{}~}{{z{}|~}|{|~}{{~~~|}}|~~||{|}}|}||{|{{zxwustuwwxwxwvtuttttvtvvwvtvxwx{{zxutsuwyzyyz{z{{{{z{{|{|{|{|{|||{|{||{{yyzz{{{{|}||}|{{zwy{{z{||~}||{{|}||{z{|}{{|{z{||{|~}{|{|{|{|{{||~|{|~~|{{}~}|}||{{{zwttsttusspmosuutrnortspoporsspoopsstsrpqrsststsrqrsststsqrrstutsstutututsssprssvxvtutssssstuttssqrqststtsttuxwwvwutttttvwyz{||{{|{{{{|{|{{|}~}|}||{|{{z|}|{{{{{{||{|{|{|{ywxz{}{{ywxwxwxwxwwxz|{{zz{{||{z{{|}||{{|}|}|}|||{|{|{z{z{yvvtvxyzxwuutstrqsssssrqrqsttssspoppoqrqqromnmnnmprqrqqrqoppoqsssssrqqststsqqsssssuttststtvwvvtuvvwwututuwwvwy{{{ywxyz{||~~}{|{|~}|}|}|}|~{{||~~}{|||~~~}{|~~|}|}|}|}|}|}|}|}|}|~~}|~}{{z||}|{{{{|{|{|{{{{{{{zyvtuwwyywvuututuwvstssssstssrrssqoqqrqpopommmnnmlllllkmnmmmmmnmklkmmopoppopoprqqrpmnoporsttsttsqopssstuwtstuvuvuutuwz{yzyxwz|{|{|{{z{||{||~~~~|}~~}{{|{z{xyywxwxwvwvwuvwutssroqrrqrsssqoppopsssspopopopopsssrssttssssqoppoporsssssrqpqrqrqssttuuststtutuuvvvvvvvwxwtvwxy{|{zwy{||{zyz|{||{z{{|}}}}|}|{|{|{|{|{||{||~}}}|}|}|~~~~~~~}|}|}|}|}~~|{|{|{|{}~{||{|{|{||||~}|}|}|}~~}||}~~~|{|||}|}|}{{{{}}}|~~~~||{z{|}}|}|z{zz{|{||{|zyzyzyzyzyyz{||{z{z{{zywvwx{|{{|{yzyz{|{||}|{{z{|{|~~~~||}~}||}}|}|}|}|}|}|}}|}~~~~~~~~~~~|~~~~~~~~~}|}|}|~~}{|{|{|{||}|}|}|{{z{{z{|{{|{|{{zzyxzz{z{{{ywxwxxwxwz{z{z{z{{yw{{{zwxwx{{z{{zyy{|{|{|{|{|{{{z{{{|}|}}|{|{|||}}||~~~~~~|}}}|{|{z{z{z{||{|zyzyzyyz{z{z{{yyzyzyz|{|{{{{z{|}~~|}|}~~~~~~~~~~|}|}|}|}|~~~}{|{|{}~|{|{|{||~}{||}|}|}~~~~~~~~~~}|}|}||}||}|}||}|~~~~~~~~~~~}|}|}||}|~~||||{||{{|}|}|}|z{{{{z{z{||{|{|{|{|{|{|{|{|{|{|{|{z{{z{z{{{|}|{|{|~}|}|}|~~~~~~~~}{~~~~~~}|}|}|}|}|}|}|}|}|~~~~||{|{|{||{|{|{|{|{|{|{|{|{|{|{|{|{|{|{||{|{|{|{~~~~{|||{|{|~~~~|}|}|}}|}|}|}|}|}|}|}|}|}|}|}|}|}|}|}|}|}|}|}|}|~~~~~}~~~~~~|}|}|}|}~}{|{|{{|}||}|}{{{{z{z{z{|{|{|{{|{|{|{|{||{|{|{|{|{|{{{{{{{{z{z{{{|}|}|{|{|{|{}~}|}|}|}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|}|}|}|}|}|}}|}|}|}|}|}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|}|}|}|}|}|}|}}}|}|}|}}|}}}}}}}}}}}}|}|}|}|}|}|}|}|~~~~~~~~~~~~~~~~~~~|}|}|}|}|}|}|}|}|}|}|}|}|}|}}}|}|}~~~~~~~~~~~~~~~~~~~~~~~~lierolibre-0.5/data/sounds/EXP5.wav000066400000000000000000001023751205125547100172040ustar00rootroot00000000000000RIFFWAVEfmt "V"Vdataфyrppuyvpgeinqsrqqu}ý~rf^[ZXSPQRPQSUWUSPKGGGC?>;=>==@DKLKPVZYVRTX\][XUPNORSL?88BMRSV\ekouxtlgeefghjnrtusqswzwrlijkjid`\XWWXXSLB91.-2;@B?@FIIGCDIIIDAEDA=:=@CGIIEA@DNRQHA@93/038;=@@@=8669>AEEEGMPNOSWX\clsvzzy}}zsqqmeWQSWcdYVMPSSVKLROFDHMTXZ^aa^YNMLG?8531*$(/7>GOWXWSQLA:>BP`eq}ƿº¿žϻqcluxtkikmic`_b_YSSZ`^`d`XUW`c^WUSRPQT]ehdTNNU[]VNHISWW\eiklttmgbbaYTPKFDINQSYekkf`aba[VNRVPQTTDKRD86=;AFKECGAHKTZYT@/6HHIKEMPE>?GGC8//9EHJJR]SAHRPG>7379+&'-4698=FJKNNMOMO\fihhnv|yw||}we^c_[c\dzsif_f{z|zz{|tcabbUWaahb]TTIGR\b[_`cpwyyvwrrja`db\WV]hrppoosstyƹȼǾʾ~lbb`abYNG>.2<686?N>7.)!(3-.00*%#$##"',8/ "&+0111( #'-++/:71,(&!$ (10+%&&,29:72+)18:>/+0692&!%++-,(#'.6956;BABIRVWWY]chekjgabinsrplpzvmxx|yy~yps|}tpsywvooy~vux}~stx|tpu{|{~ytx}|qp»{tpulefceicinaWVRaolb[`bghihgfbhjpz{xxspmpuzs~xvwwjdvvg{|rx{wu~jrqneib^aohf[clw}vbZ_eyqu|oeku|xvuŤupuolloollorqj_TPQVXWSLJDDGQVXX]hrvz~|ĽƵvo}||~{{}usrt}zvoifc]UQJILMKGC>5.% '09?A@CFJQQOQX[ZZVSVZWXalj`Z\[[XUX]lhekleo{pfk~rfen~yrxǽõvlxmfjWGZg`N3&!+6<74>PO2)(&&3?IN77:5CIR`Yajpl`bb\UOORBCNRKCH`gfedaY`]n~vr}}}{{ojifgdb]SOT^a_\XRPV^dffjnqsuqs~~y{ĹŲθ{{|vxpv{xlnjcmyppxzl\e||heiomlt|ykvzytpzukp~lhghqzymorrpd_`bgls{{qic[Z\`hlja[^dga^cb]TLECJMMOPOI@;60-5AMN9/30*&(260" !  %-&/LQWbYR`uzosiO::Qnp~p~^DUYOJlR5B;L:Iqxobeimop}{vzĻxrxz}utxrpibihhkoqrIG]wxsy~}qqtghnkfWG8"!+-1) 5:+.$"!!6;ABBA?0$)8@DGHNOVTWIGXXbis|yw}{pd_^gpj^XRJGOTUU[afheo|ygas~vxwgn|þʼþɿ̸ȭ׷m_RVQKVKGA1!$44,&-=2+;==?JI;1,)&' "-@Q]E"'CCC=+!'!"'+14DI6" "HUYJDH[rtlXPfξÝƿȸкufpzorxmYUW]]O>/'LC6@UYU^ga>+TtsfbRLS-'1:5* $08- )ARZgskoww]sx|{n_J959<16Pdq||j_O=10.27:EK[z{rhWUC@IMg}z|ſɿͽfO?38]}~qrov}ics~}j[]ahl`R@0002, 3<8*# 9bsqTNSMA=GRR@,=QUC254BOC56<=850ADY[kqd[[rȼмθαfS[nl`emdT]aZYZWYURbkfXRaxvhQQWRSQ[hiVQ`u{|nfiv{ws{qZ^\XD0-1(# "/;@5!)AHQd}vƽȵ}xvy{toEAD@[qRCBCBCBC?38BBBCKV`cdk]O>+%.BPJ:0(")53("%  2+!Chm_MTY[C)XofXB'52." ;BJE.8E90=c{p^JA?Qmznľ~aA?81Ddrj[L1)_cA6:G\fj_MEMffOIB34VjƬζwpeMPadL=Ou~swraQA_ήÿдsu^4 6>GV_rĻɻϻ}uq\C! !AC(!3?QM6.O~uwϵW`˹ѻy_CB>56Rp~jG8:=JTcuslo|{fHB>Fhkqټzk^OAPbk_VT[ms|ZP_ehȴtjxrdZfqD*#.5RXG3-(;`˾ȸc^fh\XO@H_u~ic}ؾå⾣ћunggcfbaZVF:5$%5+#  ,<5% -2Dc}ȟ幝آӱ|tx}|qe_^TLDG[`O;)%0?<2/1* &.&!$,5DKKCGeϾϷ´ȹкħ|}ɶּjSF6.7?JH91;TohH+!4JO> $29@<7FquusX1'Dg|{eaii[G@JTYP:./GWZVE92-  %&1++4<@?:>Pjx~ubVRN?-,440,/OVTPPRVgtwu}ʥίƭ~h[RNG;.$$+",2* 0@HNMF6 !(,/00.'%3GUO?3,3Kj{rfcYE865?H?(&//3;FZnmgegu}odvǾ̺ʱ{mqztfewwecqƱIJyrsºٻpYT_lvsspmosxt{ƬsbY_j|ǥ·ɸweemq~wgfmtq? )K]C1:Wfig[Wbsz{iOIWdmpv||zn[PHECE@/'/AB4)*-=MYYW]fd_YTZhiT?2B`m]@?PVY_YVRA7@LH4&%' '-057-,39/&%/HalqwyjhrlYA1)*16('2=,#)3=84;GUdpvyxk`dpvqqzmu{{~|m]V`{źԱݾznoy~z}÷woaN=1%"##*39FTew{vbI>BJRSNPC,"0FWdaN:,&1==0+.75-"""+7::FNY`^VM=,*<[so^RWaiur`ROWXPE?FSXZZRD4.&$12-&"&,+)030&#!#6TpwwοïynO1#)5@NSL<+"!+1-!+'!*0255/(#/49??==::=93/-.1/#/8 ,5::=>=DG:+ !+37=ADO_nvtnxúͽŻŷtnu~xkacgdbhtǶpir{xod\YL:*%)$!(4988>EKU\gqqkhtºǼk_^i{}yzyxh]YYaeb[RNRTOKNRXYRIABAB=:;8:CPTN@/+*((#$'$"   )+/..7?@=2&&481&-10)()6CP[]^\Z_gsĶɸʹŲü±Ȼzojhkoyywywvtnc]^bb`ZZbknfbdhjr~sq~ynkljif_TPVVI4()0:ELLE81242159:4/5ENONRXXK96@IA/"&:HKG>7303?OWM@9?GMSYYXW_bab_`ejnolmzyg]^aab\XSSUOHN]jhVHCHLQOHBDJYosj\I@ITSF??DC@CNQOPTSJKLOKB:=FKMOHHIMMNU]ZNGJUcu}rkmqohektqlfb``WLD:/06NQKFGEEHLF=?O^hje_YY`iklostwz}wkdely~wqq}~{seZ^s~nec`WKFGHLRUSLB>@CIS[VMB@>:78:858BRZYVTX`a^\_fqwtsxcLMbm}sleemnkmtxqihimlid[WYZUSQPOU_ihZTV\^[SHEIV_s{v|ûо»}sgfvĻŵ~yzm^UQRXZ`kw{qaZhy|x{{pdcedfkqsnc\]h~|rcQO^kl_M:+ '18:@=3)$-632A<1,-.*1BQWUPKE?5-""/>EFLXfg\NJMPMJNX_^_`ehe_]eg`WUZ``VOT_^XY[bhaYVURTZ_`YQOMKJIGJOPPNICA9410/12.$$"#'()-0//.6=CJU`cdkzþƿȽ½qmllqxwtpmprnjihihijqx~y}tprnjnvuk_[XPGEJQW]^^a_[XWUTQPPSXXX\fmsxxx|ótjhpz|saQKUjz|zupqkikquvy}ƹ~wsonvzoo|}yy~~qb^ajuxphgnxz}pgfn{}uofcjr||{vojc[SNJNPSTQL?0 %)06:=@@AFGFFIHHKLORRLC;1(""&,26:>EP[deddehrzzqppsx}|yy||sprvxwvwyzyxsmdYYWWWX]`b]YSNKMQX_b\MCAHORQG?=?CECDHNXVTW_^UG>>7.+,/:@EO[a[RKHINR[_XK@8/($!!%'(%!))('&&(29=BDMat¾ƽ½ùxnjeehhihcdda][^h{~{~|sljif`^^YN?2+..*%'1;@;50,)+6GQWY_hqrsplkmnnrrpiilswwwx{~~xofXNHC?7.'%'-/,'$&/7AFF<)"),/39:ACJS]jqw}}{xvz~upqqrx~{z|{odbjwzytokehurgcgjlq~|offkruwy{ºztw}{ohd`^aefjiijnqv}|}~{y{||xtrsrswytm`TT]ge^Z[]XRMNPKFDCABDE?5/2BFGG@<;@ELU]da\UTUUQPPOOKGFIMPPPKFBCFGECCADFIMJD:5.'"*35*!)..($$##&))*-/158;@DEFGFNRZery{zuqnpsy}~xrnkrtt}ľɻulgkljaSH<99?FIGFHMQRRQQU\dhihljgfgmqqqrqrrot|zk^SPPJC8/+,,(-9DC;7;>@BKPPI>1%$-...3624=IVYTJEGJS]glopywicjv}urquvstz{ui_^`]ZYYTHBACCEIIJIJIJNYeoswvx{wphZOFB=531.,+*)-3568?LZcdb]WUX]bfefilqtyzy~zrnryz|{xwtnijpuutqpv|}zww{}~||xuvvwwy|twuigprib_^``^[[WVVW[_bbdc`cm}||zslfa]\]YSNLP\hjcYULKMQUY[Y[`fkihhkmnoicaely}zzy~~~}yzwqppong^]bilnlhb\YWXYZ\ajppje`][XZajkdYQOQXbd\QGB?BGMQQRW\][SJDEGGHIILNR]iqvwqh]X[cpy~}vnnprvupicacgp{zvuyyy}|~ut}ƽtnmppnhgfhe\TQQRQOPUTPIJRZ^`glqrqqnloot{ssw||vne]Z^_a_YQE=:CEHFEC<7/*'%%'&&)**'(/7>HQ[fnqqqu}|xwz{~y|ÿ|zwuw{vvuuuvyyzzwsrpmd^^bipurpljhhkqwzwoaVLHFKSVVUW^`gmsutogb\XU]dhouzzvqqrstmcVMKPVZ]`ab`ZTOJA82000440+''-5;@?@A@@DGNOJFDDBEKRWXVUTRRRU[`dghklmib[YY^dnqppu~|vpjddhmtxzsh^[aegeabba][WTOMLPTURLGGJS]fjhhinstvwz{xurtw{~~{|{sojc^ZYXX\djjhffmv~vjc^]]\]biruqi^XY^\XTTW]a``[VPJFECBDHPU[^]^[WXbqzzsg]Y\^^[\]^\\[X\`fnx{xoloorvwtssuv{¿¾{ywsszyy~}|ywxvrmihigkomf^XTPLEDDHIE@@@ABDFEEHPRSTRPNQPRRS[clpponljjkjheaa__`aacca\WTTVX`gotvwvrqrtsmhcehjijhhmtyyxvqppnkifbYRKIJEABGKMLID@=:;=CGKNSY[]_bgea_aabcccb`^_bfghigjkjgc`^[]_``afjlmntxz{}}xtpjd`\\_dgjotxwwwtqifir~yvqnjjjjjjhhiimrsxzz}~ztqqpmhc`[TPPQVZ]acehhgddhmpqojfdbb`][Z[\]_dhkkfa[XTQPT[`a^ZY^flqqnia[YY^`][\chd_WSQOPTY[XRMJIMPSTW\_a``\ZYYXUQOOMMMMLMNRTWXXX[\YUSU\aehjjifhklkheeabcglpog`ZVY[\ZXY\_flqoifgkqwvsoljinruy{{z{zx|}ywlbZVW]ac`WOIHKT[^]]_adhgfeb`ZVX\afilrtxyz|wrppsspib^^abfhgdba`a^YWWX[\cmttqrvxzxurpou|~{vrmmllkhhhhhiigc_[XXY[^bgkjkorsnjb\Y\\[YYX[]``\\]_a^[Z[\WNIHNU_juz{{~}xxyzxy{vmbVPORSRMKGC?AGJKHFCFHNSZ]]]\\^dmssnfa[XTUY\`dhjkmqsroic_aisxxwwwuvwwsrqmmjhhhpx{wyzyri`XWX^cinprv{}zywxwursw}zuqnorvwxvvx}}{{{{{zxutusmgilpx|}{wropppqpmcZUSUX\_elomjjkmmpqqpomnov{~¿~z{|vqqw~xuw{~{vri^URRTWUSNKJLNOOOOPSPJGCEJPW^ehkmoppqonfa^`chlorttuvwxvpllqwy{|zvsmic_aba`\XTQNLLQVXTONJGDFINRQQRPPNMOSX_gmqkhdddfjnqu{~yqkhjloplhdcb^YUPLIHKRZaddfjqy}~|vpnooonlhb\XSQQRRQU\cefgfd`^[YX[`flptsojikpqnjgefgkptyxxz}}}||ywwvvuvxy{|{{|~wrtwyzzyxy{~}~|yvurqnihijlmpruutpmlmpsvz}|zx{~~{xtrswxxyzz{|~yslda`\YURSTURPPRV\`b_[YXX[]^^]\Z[]`ceffc]XZZXSQQNNPQXbkoqqokigghkptx{ytruwwxxwsmkkpssqonmmpuyxwtpliigc_\[\`deaZUOKHHGHJNSXYURKFAA@CCEGLQX[^`djqsrojijpz|}ypnmmqsvwy{~yru{yrlifa\UQPOPRUUSRUVVVUUVVVWZ^`_cjnppoigghltx|{zwsquyytpoljgfdb^[Z^ceknsuvx{~}yvqpnkgdccgkonlkjgb^^elqswxxwy~}tgTHACJRW[\afjmledbcd^YTUX_dimu~ý{wwrg]Z_dgikmkjheb^Z[ZZWWVUVWZ_chnswxuqjd]YYY\adijiihgeeghdbaeimnokjlkhebefknopnlmpsx}~~{yyvokhfedcdb`^^aegda[\^`fhhegikjihfjmpnpruuqlgdgiiijjigghlptwwy|~½{wuwy|zvtqnjhfda[XXY\[ZXTMHGIOUY\]adfedhmqwz~}{sokheaaa_^\`a^WQPQSWYZYXUTVVUSTXYVQOMJGA@FLRW\___adfhhigaYSPOMLNONLOSVVRNKOUZ[YXWX^fortxy}{wxxyxtqnmmnlhedeed]VQPPPQRPKD?=>@DJNQSW[_abciotwyxz{}||~}|zvuwz~z{~{tnlje]XVTSSWZ_fmqsvxzyzy}~~|vpjfdccceikqx{~~~}{tolnqv~~zvof`ZUUUVRJFEDDA>:8669;;87558>ACHIHGILPRSTX\_aa`belv{~ysnjjmnpppmigeeimnmljihhfedghhggghgb`^cinv}~~|y{|~|{}~zvqnkgdca`cdglqvy{{xrlihkrx~{wsuvvvx|}}{ytqppqqqoomnquz~{xwvuvvvtqqnokifcaaccdfghijjigebddiptxwurquz~|vtuy~}upmkhfdhjiigd_ZVVWXZYY[^abbcdddddehhmnrxyvng`[ZXY\`cd`[Y[_bbdeillmmllmlkknsuutux|ypkjnqquy}{yvuux}}~|wsmmkjklnlkjhggefiorsvusqroppqooqonkjknrssqppuz~}{zwvsrpnppuxz||zvuusrqqsrsqqnmmnquwvsqruxvrmjghhknrvxyz~{vpmlmmoqomjloqrw{~zxvy{||}{xwssvz{}xsqppoqrqpnnsvxxuusqrstuuvwxwxy{|||yurqppopojgc`aa`_^_dhlmliifddddca\XXZ[ZXY]^][WUQQSTWY[\^__\ZWUTVW[\^__``bdca`[VSSUX\`a`adfhikmmpomkiiilnqstuuusqpnllljgca^^_aflsw{|yxy|~|uqppppqqommmotw{}{{{|~}wsrruy|}{vsrswz~~yspomjhfhggc`\XXZ^adfgiijjjjjiiilnqpsxyvoic^\[\ZXURSWY]]^aacdcccbaehigea^ciifa`behgccbflsyy{|xusuuvxxwuxyyzx{{wrojc^[YXY]_]ZWVUVXXVTVZ^`][[[]`_][[[\]`abcddbcgmprsuuw|}{yyz~~yxvvx|~|yyz{zyxuvvy~ywsrpnoqtx{~~~}|{|}}zuqoorsrtxzzwsqqokfc__abehihea_^_a`cemsz~yxxxz|zwuvvustroheeceddddfjqvy{|~~zxzyspmlhhhhksvupnmkiilnoomlmmprvwyyxxvuspnmjiiggeggilqtvvwyz~~~~|{}~}yyyz}zurolkiklnquyxzvromnnpqrrrrrsvvxyz~~|{yxtpnjiiikmpolhfghiigc_]]^aehlpqsutpkhfgfc^[[\_`bdcehjnqqqrtvyyywstvx{~{xvuvwz{~~||{~zyyy~}{|~~~}yxxz|yuomnquxz{z{|~~zyuwzxvtpmjfdccacdgjlmoprtvusplijihgfeeccdehjllhfca`bcdimrwz|||||~}zxvvvxz}}zwssuvvurrqonkhgjnsuyyxvtqonmmpruxxwtuuwvvvvwurqppqqqsutrrtvxzz{}~~|yywvvxxyxvsqrtwvvtsstuvxyz|~zx{{||{z{yytpppppppruvvuwyyxvtrstvvrnlopsvxvtqpppsxyz{|{yxsrppporpqpqruwyyyz{||ywspollnnpssvwy}~||xvsssqpmkihgghkmprqqonononpnlihhgghijlmnmkklmmnkihhggefhkkpstwwwtutuxx{{yz}~{zxwx}~~|~~}~~{{{{|{wurpomnpoqqpmmmmlkllmllmprstssrrrtxy{{|~}zwvuuuvyyyy{~~||{|yyyyyxwuqkjhhgggghjmoommjjlprrrsrsstutvxyyywvtruuuvwxz|}|{yxusruwxyyz~~{|}~}|zyyz|~~|{}|{{}~|||z{|zxzxz~|ywzxyz{~~~~|zyxwwtssssspmlllmmmopqqqrqrrrrrrssrrrqqppqqqssrstssstuxy||~~{yywyyvsrqrssrqqqqppnmmljjjlljjklmnpqonmmooqrrspoqsuwz|~}zz{}~~}}~~}}~~~~~~|yxwwvvvvvvxxwvwy{}~~~~~}z|}~~|~}~}{{zyyyyzyyyyvurqpqppqoqqppnnopqqrrtuvy{~|{zxwtqomllmpqsssssuxzz|{{{{{{|}~~|}}{zyywuvvwwvvwwxyyxyzwurrrqqpppnmljihhhgggfgghijllprux{|{}~}~~~|{|{{yyxwwwxzy|~{xuqonoonpqssstvyz{|~{{yy|~|{zyy{{|||}{zyyxzz|~~|||~~|||~}|zyurssrsrrsstrrrqqqqqrrqoommnppqssrrqrrsuvyz}|{|{}||{{{{|}~}|yxvvvwxwwxwxwxwuvuuuwwxzxyz||}{}|{|yywxwyy{}}{ywxyyyxwuvxwxyxxwxyxyz{||||zyyyyyzyzzy{~~|zyyz}~~~}|{{||~~~zxvvuutrqqpnmmnoppononopopoponoqrttvuuuvvvvvvwyyyz{{yyyyyyz{|||}~~~~~~~||||zyxwwwxzy{{{{{|}}{{{yyyyyxyxvuvwwwvvvvwxxxutrrsrsrrrsrrrsrsssssssssrrrqrqrqqqrstuuvxyyyyyyz|}~|{||~~~~|{z{{|||~~~~~|{|z{zyyxvwxyyyyy{{{{{{|}|{||z{|~~~}~~~~}~~|}|}~~~|{|yyyxwyyyyyzyz|}~~|{{|{|||~~||}|~~~~}~~~~~~~~|{|{{{~~~~~~~~~~}||}|||||{{{{yyxwwwwxyyyyzyyxy{|}~~}{|z{|{{{|||{|}~}|yyzyzyxzyyz{{||~||zyyy{{{zzxyxxyyyz{{{yxyyzyxwvuutstvuvwvvvwyxy{{|}||{|{yyyyyxz{zzyxyy{{{{z{{{|}~~~~~~}~}||}~~}|{zxy{{{{{{z{||{{|{z{|{}~~~~~~~~||}||{{{||||{{{{{{{||~}|{~~~~~~~~}}~~~~~~~}~||zxyyzxyxxwvurtsuuuuutsrqpqqppooopppqrsuuuuuuuvuvvvvvuuwvvwvvwuuwxwxxwxyyyyyyyxywwwxwxxxyyyyyxz{||{{zzyyy{{{{{|}~~}|}|z|{yxz{{|}|||~~~~~~~~~~}|}|{|~~~}|{yxwwwxxwxxyyyxyxyyz{{{{{{xzyzyvvvvwwxyyyyxy{{{{{}{{{|{{{z{{{yyxyzyyxyyyyyxyyy{{}}~}~|||||}||||}}}~}~}~~~}}{{{xyyyzwxxvuvuvwwvvvvvwwwwyyxzy{{||}~}{|~~~~~~~{|}~~~~~~~}~|||{{|{{{{{{{|{|~~~}~~}|{|||||{|||}~~~~~~~||}||{{{|||}|||}}}~~||{||{}~~~~}~~~~~~~~~~~~~~~~~~~~}|}|{{{{{{||||z|{z{{{{yyyyyxyyyyyyyyyyzyzxyyzyzyyzyyxz{||||}|}||~~~|}~}~~~~~~~~~~}}~~~}~~~~~~~~~~~~}}~~~~~~~~~~~~~~~}~}~~~~~~~~~~}~~~~~~}~~}~}~~~}}~}~~~}}~~~~~~~~~~~~}~~~~~~~~~~~~||}}|}||||}}|}||||{}|||{||||}|||}}|}}{{||}{|||||||{|||||}||||}|||||||||||||}|||}|||}~~~~~~}~~~~~~}~~~~~~}~~}~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~}~~~~~~~~~~~}~~~~~~~~~}~~~~~~~~}||||{|||}{|||||||}|||||||{|{||||||{}|||{|||}|||}}|{||||||||||}|||{|||}|{||{||}~~~~~~~~~~~}~~~~~~~~}~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~}~}}~~}~~~}~~~|{{||||}||}||||||||||{{|}||||||||}|||||||||||}|{||}~~}~~~~~~~~~~~~}~~~~~~}~~~~~~}~~~~~~}}~~~~}~~~~~~~~~~~~~~~~~~~~~~}}~~~~}~~~||}||||||}|}|}}|||||}|{||||{|||||}|{{|||{{{{{|}}{{||||||||||{|||||}|{}|||||||||{|}|||||||||||||{||{}{||}~~}~~~~}~~~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~}~~~~~}~~~~~~}}~~~~~~~~~~~~~~~~~}~~~~}~}~~~~~~}}~}~~~~~~~~~~~~}}}}~}~}~~}~~}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~}~~~~~}}~}~~~~~~~~~~~~~}~~~~~}~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~lierolibre-0.5/data/sounds/HURT1.wav000066400000000000000000000344501205125547100173240ustar00rootroot00000000000000RIFF 9WAVEfmt "V"Vdata8~~~~~~~~}}}}}~~~}}}}}}~~~~~~~}}~}}~}}||||}}~~}}}}~~}}|}}}~}}|{||}~~~~~}}}~}}}}}}}~~}}}}~~~~~~}}}~~}}}}}}~~}}}}~}}}}}}}}||{{|||||||}~~~}}~~}|{yxy{|||||}~}||}|{|||~zwx{|ywx{~{yxxz{{xvuw|~~}yxx{{{zxwwwxz|}}}}}|}|zz{||}}|zyxz}}zz{~}}}|{xwvvwwxz||}{xwxyxvuvvwx|~}|{|||{zxxwwz||{z{}~~~~{z{~wux}}}||yvvz~zxy{}~~}{{{}zvtw{}{{}~~}{yyxwtrqrv{}{{zywsqqsw|{xvtsssssuwz|~|ywvvwxyyxwx{|~}}}~~~~}vpqv}}zz~m_Y\dnspicdkz}}zl`XVZainnlhgjr||yomr{wpr{ztrwywy{|xpgbcgnv}}||{yvpidejqw{~~ytpoqw}}|ysmgddfkoqpnmorw{~~|xtttvvtrnjiijmnoppqsvy}|zy{uru|}|}jZSXerxtkcbi{yzxi^YZ_gpvwtqoqw|}zpms|tv~{|~wv}vnmquxxtpmms~xqmkmnnmjjowxqoprrrpopt|ysnjihgcaacgmty||{{|{uronmlkiggimqvz|}zvsstx|zpkmu{pmmmlf]SKJP^mx}}xtt|n]TV`jokaUMO[oxw{wplnuxtwyy}~wqorv{~xtsw}{vtw}yutw|}yvw|}}~zwwz}{y{||}~ztrruxz{{xvuwz{{xurnjjlnmkhecbcgkmmmmmmptwyxvsrqrtvvtrpqsw{~}|}wja^cmw}}|}}zwtoeXLC?ER`kpolmtykhmv{xm]OJP^p}}xx||y{{x|xx|yqkils}wpljknrqonqw}wrrssrsvxwx|{vrtxzxx{~yrmkifcbccbejnpqrtttux||yvtsqpprronnoqsvz~{wtrrsux|zqiefikmmkjmr{|xsmf`[XX\`cinswy}{trty{xsja_ep}}z{}}{{yrpsx}}xrkimrwxwsojhjosvxxwvtvz}{wwy|~~~~wokikosvxz~|skc_^`beimptyxrnic^YUSQSW\bhnrw{~{wtrponnmnosx}~}}}}~}|zwspppqsuwxz{}}{ywtqnkiijlnpsvx|~{xvuvvvtrpoqu{{z{|~}|zzz|}zwvvvwuronosx}}}}}||}}xtrponnnqw~}tmhgggghikovwpic`][[Z[\^bgmt|ztokihijmprtx|{xurommmnquz~}}|zz|xpjffimopprty~zvrmjhfegjotzzussttrmifhnw||zvpnpuy|}z{}|{}yspqrporw}xrppoljjlmpw|wrlfeeghikpvz~|{|~}~}vpmmmnpsvx{}wrppqsvx}ysokjknruz}}wtrrrtuvwx{~}{ywtrqpqtvy{}~}xpkkpx}|tnpw~ujbbjxyvw{{ww|yyuootxy|}|xst{}{z}{wvvtsuwurnmmkijpvxz||{zxvvwwxxz}|vqnkifegjklpvz|}xtrrrruz}uommqv{{|wvwxyxxy~|xtpkfabfmt|ytpligecfksz|xsokhfffhmsy}wrmgca`aadgjnqvzzuoic^ZXVUVY_fowypia[VUW_ittjb[VQLHHLVcp{{xvsmga]]^dlu}~}~zurrtx|{z{|~|zz||vpkiiikmnprvy||xtqmhecdgknrtx{}xtqonnnnnnorvy}zvromjhffefhkortwxxxyzywtplifeb`][[]bhntx}|qjghjmoqrv{}ulc[VTRQPQTYakw}si`YVSTVY]afmu}{wrmifefhjknrw}}{wsnkigggjmquy}|xtpjea^^^^``bcfjortvwwwvspnjgec`]ZYZ\^`eilpuy}~|{ywvuttvwy{}ztokkmortvx|{voic^ZYZ\`fmt|}wsppqsvy|yurpoooqsvxz{}~|yvsomjjjhgedefjnsvy{}~|wronnoprstuwz~{vplheb``acgmsx}|vqmigffggiknsy~xrmifccdefhlpu{~}~~}zxvspnkjjkjjjlot{|xtqqsvz~zvsqponnoptw{~|ywvtttuvxy{|}}|||{ywvttuvvvvvvwwvvuttssssssttttsrponmkifca```abcefimqtwz||ywtrpnmmnorvz}~}|zyz||wpkea^]^`ejpw~zurrqrtw{~}|zz{|~~}{yxxxxvtqnmkklmnnopqsux{|zxwwxz|}wromkkkmosvz}wrooooqsvx{}{xtrnmmnoswz}{tmgcbbccccfks{ytrrqrrtx~voica_^^`bfkrz}wsnkgeeegimqv{|xtrpnkihijmpsux{}|zwsrqrtvx{|}{xsoljjjmosw|~|{xwvvywmfb```aejqy~xrkfcbcegkpv}~zvrpnmmnpsvx||wsokgca_^^`acehkosw{~}|xuromkkkkklnqux{~xrmkjihghjns{vpkjjkmnptz{xwvwxyz|}{ywwxz{||}}}}{xvsplhc`^_adgkosx~}||}zrjc^ZXXY[^biouz{vpkfca__acglqv||zwusrrstvy}~}||||||}~{wsnieca`^_`bfjosvy||wrmgcbdhmptw{zupmjiigfgjmpuz}~|xvsrqqrrtuwy||xtpnkifeccdfhkmosux||yupmigdbaabcgkpv{}|zzz|xneaaa`_`cipzxrkd]XUUVY]cks||tnjgeb^[YZ_fnv|ypf^YXXZ]`cjr{}zvspmjikotx}~zvromiecbcdeefffinty{}~}|yxtrpmkjlnpruy}~yuqnmnptx}}yurommnsx}}wsonmkiffhmrvz}}}}|{yy{|vpmjgc`]\\^bfimptx}}ytnjgggggggjnt{{vrnkjjjklnpsw{}|xvsrssstux|~zwsqpqsvx{zvspmjiilptw{~|zxxz|}|}|yxxz{|}}zxusrstuvwxz|~}}|{zwuronnmmmmmnoprssttvxwwvvvwxxyxxz{|~~||{wusrrrrrqqrsvx{|||}~{xwvuuvx}{yxxxyxz}{xwwwvusrrsvx{}~|xspomljjjkmosvy}}~}|}}}~~woga\Z\_befilpu|}zune^[]afjmorx}zvrporv|xsnjgfeccceinu{{vrqqrrqqty{wttrpoqstw{}|{xvsrpmjiihhiloruy}|zwsqonmlnqtwy}|xurpomkjklnqtx|}voifffgijlou{|vpmlmnoqruz{uojgefgjnqvz}yuqnljjloqssvy}{xvttuvwxz|~zuqnkhffgghjlnpruwxxxz{|||||{{|}~}|{{}}}~}|||}}|zxxy{{{{{zz{}}}|||||||{yyyxwvvutssuvwxy{}}|{{{}~}|{xwvtrrrqqqrrrsstuvvvvvvvwxxy{}|yxwvsppqsvxz|~|xsonmljiijjlnortwy|~|zxwutsrrstvwy{}zxwwvuttuwwwxz{{|~}|zxvvvvvxz{{}}{zwusrrqrrsssstvwwxxxxy{}~~{xvvwyzzz{}}zxwwvuspoopqrqprtvwwxyz{}|zz{ywvwxy{}|zvsonnmmnopqrvxz|}}|{zxwxxyxwxz{|}~|ywvtsrrstvwxy{}~}}}}|{zxxz|}~~}{ywwvvutsttuvvxz|~|zwwvuttvwz|}zwtrponnnnpsvwxz|~}||}}|||||}}{xvutsssstuwy{{}~~}}|{yxxxxyy|~}yxwxxxwwy||{{{{ywvvxxxwwxz{{|}~}zyxwwwyz{||yxwwvuvwxz|}}|{zyz{{{|}}~}||{zzxwvvwwwxxy{|}}|{zxxxxz|~{zzzxvuvx{|}}~||}}{yz{|}}}}~~{ywwxxxwwz}{yyy{{zyz{|{zzzxxxz{|}}|{zzxwxy{|}~|{{|}}~|xsrstuuvwxz{~}}}}||||||}}|zyxxwvvx}}{{{{zz|}~~}zxxxwvuvxy{|~|{{zxwvvwxz{|}~|||}}wuwxxwvvwxy{}~}~|zyz}{x{}{yvtvy|}{z|}{z|}|{{}{wtrsstuvxz|}zyz{||||}}~~~{vvy{zvsrtvy|}}{z{~{}~}~~{z~|xwwwxyzyxx{~|{|}}~~}|{{|~}|{|~yvtssrrrsvx|{yyz|}|{{{|}~}{{|~~}}~}~|{|zvwz{ytporuxzzywwy{y}}}~}}{vux{||ywuttvwvsrty}|}}}~}||||||}}{ywwxxwuttwz|}~{vronnopprsvxz}}{z{}~}|{{}~~}zxwvwwxxxxz|}|zyxxz|}yxz}~{uppsvvsporvy{|{{zy|zuvz|{{wvy~}xw{~{xvsrrtvtrqtz}}|{|}{zzzyzz{|||}}}}|zxwvvvvxz}{vsqqpommnprtvwwxy|}}|{{~~}}|||{zxwwy|~~~}{z|zwwz|ztonqttsrrux{}~yx|}|~{z}~yx|}}}{xvtsrrstsrsw|~}{z||{|}}|{{{|~}||}}{yxz{|{{{|~{yvtqppoooopsuvvwxz{zzz{{zyxxzzzz{|}|||{zxwvvvwz{{ywwxz{xurqrrsqpoptx|~{yy{||zxwy|~}~}|zwvutsrqooptwy{z{||ywvvvuttuvwxxxz{|||{zyyyzyzyxyz{|||||||{zzz{|||||}}}}~}}||}||{yyxyzzzzz|~}}}|{|}~}||{|}}}|}~}|}~}}}}~}|{{{|||||||}}~~~}||{{{{{|}}}}~~}~}|zyxxxwwwwxz{}~~}|}}}}}}~}}}}}~~~~}~}}}}}}}}}~}}||{|}}|zwvutttssstvxy{|}~}|zyxwwwwwwxyz|~}}|{zzyyyzyzzzz{{{||||}}~~}}||{{{{{{{{{{{|||}}~~~}}||{zyxxwwwvvvwwxxyz{|}}~~}}}|||{{{{{{{{{{{||}}~~}}}}|||||||||{{{{{{zzzz{{{||}}~}}||{{zzyyxxxyxyyzzzzzyzyyxxxxxwwwwxxxxxxyyzz{{{|||}}~~}}||{{zzxxxxxwwwwwwwwvvvwwwwwwwxxxyzz{{||}}~}||{zzxxwvvvvvvvwwxxyz{{|}}~~~}}||{{yyxxwwwwwwxxyyz{{||}}~~~}}}|||{{{{{zzzzzzzzzzzz{zz{{{{{{|||||}}}}}}}}}}}}}}}||||{{{{{{zzz{{{{{|||}}}}~~~~~}}}}}}||||||||||||||||||||||||}}~~~~}}}}}}}}}}}}}}}}}}}}~~~~~~~~}}}}}}}}}}}}}}||||||||||||||||||||||||||||||||||}}}}}}}}}}}}}}}}}}~~~~~~~}}}}}}|||||{|||||||}}}}~~~~~~~~}}}}}}}}}}}}}}}||||||||||}}}}}~~~}}}|||||||||||||}}}}~~}}}}|||||||{|||||||}}}~~~}}}||||{{{{{{{{{{||||}}}~~~}}}}}}}}}~~~}||{{zzyxxyyzz{||}}|zywwvvuuuvvwwxzz{|}~~~}}}}}}}}}}}}}||||}}}}~~~~}}~~~}}}}}}~~~~~~~~~~~~~}}}}}~~~}}}}}}}}}~~~~~~}}}}}}}}}~~~~~~}}}}|||||||||||}}}}~~~~~~~}}}}}}}}~~~~~~~~~~~~~~~~~~~~~}}}}}}}}}}}}}}}}}~}}|{{zzzzzyyyyzyzz{{{|}~~}}||{{{zzzzzzzzz{{||}}~}}|||||||}}~~~~}}}}}}}~~}|{{zyzzz{{|}~~}}|||||}}~~~}}||||||||}}~~}}||{{zzyxxxwwwvvvwxyz|~|yvrokheba_^_`begkoty}}yvromkjiiijkkmnoqrstuvwyz|}~}|{{zxxwvutttttuvxz{}}}||||||}~~~}~~~~~}}}~~}}}}}}}~~}}}}}}~~~~~}|||||||||}~~}}}}}}}||||}}}}}}~~~~~}}}}}}}}}}}~~~~}}}}}}~~~~~~~~~~~~~}}}}}}~~~~~~~~~}}}}||||}}}}~~~~~~}}}}}}}}~~~~}}}|||{{|{|||||}}}}}}}}}}}}}}}}}}}}}~}}}}}}}}||||||||||}}}}||||||||||||}}}}}~~~~~~~~~~~}}}}}}}}|||||||||||||||}}}}}~~~~~~~}}}}}}}}}}}}}}}}}}|||||||||||||}}}}}}}}}}|||||||||||||||||{{{{{{{{{{{{||||lierolibre-0.5/data/sounds/HURT2.wav000066400000000000000000000265751205125547100173360ustar00rootroot00000000000000RIFFu-WAVEfmt "V"VdataQ-~~~~~|||||~~}|{zzzz{|}~~~~|{zyxxyz{{|}~~|{zyxwwxyzz{{|||{{zzzzzzzzzz{{{{{zzzzzzyyyzzzz{{{{zzzyyyyyyzzz{{{{zyxwwwwwxyyz{{{zzywwwwwxyz{|||{{zyxwvwxyz{|}~~}|zzyyyyy{}~~~|zzzz{{|~~~}||{zzz{|}}|{zzz{|}~}|{zyyyy{|~~|{zzyyz{|~~|{zyyyz{}~~|{zzz{|~~~}|zyxyyz{|}~~~~}{zyyyyzz{||}}||{zyyyxxyyz{{{{{{{zyyyyyxyz{{|||||{{zxwwwxyz{|}~}|{yxwvvwyz|~~|zywvvvwy{}~|{ywvuvwz|}zxwvvxz|{yxwwxz}~{yyyz|~}{ywvvy{~|zwvvwx{~|zwutuvy{~~{xusrtuwz|~|zxvuuvwy{~~|zwutttuvy{}~|{{{{{{{|~}{zzzz{|~|{{|~}}~}}{xvvy|}zvuuuuwy{~~~|zwusqpqqsvy{}~|zvromlmorvz~{vrpppquz|xtqprw|wtuy~{z{|zyy{zsmighmrw}|unf`^]^cipw|~}ysmf`[YZ^dkqvxywupjeb`cgkpuwywurolkkmrw{~}}}|{zwx|~zy{~~~{wurqqsx}}ztnighhijkou{~|xtohb\YZ_hqyyncZTTYbmyzk^URU\hx~pb[]gwob_ft|~}wttz}pf`ahs~n`VQSZdpz|pd\XY^dkrzzqidehknoruvtnf`^biqy|pgccgnvznhddiswrqv|}|xpkkqxulc_`fq~{pc[Z]fq{yk_VVYan}sf\WW_l|raTKJSbvvdUKKRbxudUOR]o~n^UU[iyug_ahr~vlfhmvypikpu|~|{xx~}y||~~wrlllimqy~wlc[UTZ`iry~~yog`[[_cjpu~wnic``^_eku~~xstuvz{~~}~|{ywwz|~~zustsuwx{|{zvplhhkmpsux{{xrib_]]^`gqx}wpfa\VWZ^lx|sma[_`ky~{tijjm|}}~~|}zvqnqru|yuphghhpuxzwnjkgkpmrvu{|vupinnlpmluw{{y|xy|vwyv{~}~~}|}|}|xvutvwuvuw{||}zz{yyxttttwxwwvuwvvurrsuyz{}~||{||{|}~{yzz{}||{~|xtstvy{}|zxxwwz{~}{{|}}~~~~~~~~~~|{zyxwvwyz||{zxwwwvvvwxy{zywurpnlllmnpsuvvurqnlkhgghilnnnmlkihfeegimpqruuusqnmmnpqrvz|}~}||||}~}{xvvvvwvvwwwvsqpmkigfedggghfdda``^]^]_bbdfefecc`^_^_bbbeehlllmlnonpqrvxwxwwyyxyxy{|~zwtsrppqtvwvtrqpnkigfhklljhgfdb_\[\^bcdddcc`^][[_`bcdfhiiihhhijlpsxy{{{||{z{|}zyyz{{z{{{{xusrqqpqtvyyvrpmkgcb`accdfhijhdb``bcehilnnnnmmmlkkkpuz~~~~}~~}|~~}}~||{{|~}ytomlnpqrsvwwurpopomllotwxwvvvurnmmnpppqtvwwvvuvwwx{~|{zzyxxzz{{yvvvwzz{{zzzywvtsrpomlmmpqqomkklmnpqrstvwwxxxwurpqty|~|zxwvvuuwy{~|zz|~~~~~~~}zwvuvwy|~|zywvvwxxwwyzyywvvwwvtrtvvvuuuvvwwy|~~}~yvvyz{||||zvtrrsssrrsvy|~|xsmiggikkkjiklmmlkklmmosw|}yuqqsuvwxz}~|ywwvtsstuvvvvutqmlklnrtsplgca`_^]]_`bdfgiiihedfhlnpponnnmmlmnoqsvz}~|yvtrrqsuwwvurpmkhgefhiklnnnlkhggggeddfghgda__`bceilmnmmlmnoopruwy{}|yz}}~yutw{~~yuuvxwvtuwwwurolgc``djnqqpqrssrqqqqrsuwz{zxuttvy{}}yutuvwwvvutqomkihedegkmnnmjhd`__bdefghjlkigdb`\Z[^befdcbb`^^`dhjlptz|{~|z{~}yvy{yxvvxyyyz|~xtrrstuuwxvqnmqtusrqsw}|yslgdfiorstvwz|~~~~~~{yyyzzyyxxyz{~~{yz}xy~vlfflsyywwy|~skhiknqsssrrsw||vrsx{vpkkpy|}|ywvvx|zrlhimqv{zursvy|~~}{zxvtpliikmpt{ylbaflnnpv}vlghp|zpe^_diihjr|vssrqry~|xqkhkrzzsppu~wrrsuwz}{tnmpv~{uqmjihgeehmsyzwqic]YZ^floonmmprrpligegkr|vpmnpqqqpnoswz{ytnifgkr|}}xw}xv|}uqpnlikqx~~zvsqppppruz~|wqlheeinstsqnllkihimqtw{~{vrpnnoruwyzz{{{yvuuvx{~}ywwyz{}}{z{~}{xusqqu||xw~{sruvurrz|utwyxusw~{usw}wqkiiklnqv}~ummry~xusv||}|wx}|xtpmloty{{vpmoty||zyz~~zvuvwwupljmruvutsrrtv{|vrqsw|~~zwusrtx~|{|{{~zvv{{vv{~zwwz}zrnmptwvspqv|}zxvttuz}zwwy|~zwvwz}zwtqooqw~|ukb`fr}zz|slecemzxsru{wpkilr{vqprsvzzuru~{vssy~ytu|~{tqpqu{xwy~~vnhfjt|vssuy~|qiehmv}{rkhinsy{qigjpv|}vpmnu~~{z{|zyy{~zww|ysruy|}|||||{rnptwxxy{}zxxy{||yurrstsrqrv{xlghmqrqqswz|}{zz|{uqpnnnnpsw|~zz~|wsnhdbdipvwxyz{yvvx{{vqlgb`emv}}zz|~|zxwy||zxvuuwy{|~~zxwyyyzz{}~{yyz|~~|}{xx{|vqnmptvxzzvpkjlqxwoiilpv~~|zywwwwwz~~yvrpnmnprtvvtrqqruy~|wrnlkkklnqtxzzy{{rkhintvwwy|~~{tlebaekrvyy{}~zskc]\`irx{|slikosvz~xvvwwy}|skd`]\_eny~{wrmkloruusoic\UPPT[cluxrnkiilqvz{yurqpoopu~wpllnty~|wsnkknvwplklorw~~xtrruy~{uqnqw}zwtsuzyrlgdeku~vld_`fpx|}{zxuohb`dlvynd_^`dlu~~zurppu}ysmgeiq{}vqnptz}ywzxqkhkpv|zusux|yrmiils{|yuplkms|~pcZVVZakvypjgimsz}vlaXRRWan{~tg^[^dmvzqkfddhpz{vtuw{{pg_YW\gt~yphb_`cir|{xutrqpnnpqqonory~}|||zvsqppqqpoopponopruwwvuuuutssuw{~}vngb^\[[^ciouyzywvuvwy{}{unhc^YVV[dnx}~{vpkknsxz{|||{xrkhghlpsw{~}zvsrsv{~vmebchouz~~|{yupkhhkpw~|vqnlkkkkklmorux|ztniedegjnrx}~{yuqnkihhkmnmllmnqrsuwy{{zxvrnhc``bdfhilptvwvutuwyzxtplkkiebadkqvxxwwxxwussux||wsoljlqw{rkghlqvy{|~}{xustw|~skfeglqw~~|~{smihjnt|{slebceimqrssrpnorw}~zrjb[YY[_fnw|vpkijllkighnu{~~{{|}||~~{yvuw{~yxz|~~|yy{~{z}~xvy~}vqpruwy{zvsqonoqtx{~~}||~~}|zupkijlqv{~|zwutsssuy~~zyz~}|~zwwwz|z{}|vpmns{zvsqrtw|}zyz|~~~|||}~|{|~}||}}{ywuvwz}~{|}{{~~|~|ywuuuvy|~{wusssvy~~zxwy||zxz||zxy{|xutuwyz{|~~|ywutux{~~|{zz{~~zwvvvvwwz}{xwyz{|~|yvtrrruy~~}{ywvvxz}ytnjhjpv|zqjedfikmqu{|z{~{smkllligiow}wsruxzzyxyyyz{}vpkiikouz|vrnkiilot{zvsrrsuwyz{|||~}unjhggilpsvz|~~|{zyz{|~~}||{zywurqqtx||xsomnquxyzzz{|||{yvttuxz{yvtstvwyz{}|wurqpnnorv{~|{zzzyvsplihilqv|{uqpnnnnpruvvwwxyz}~ytnhb^\^cks|{vtssqmieb`adinty~{rjc^[ZZ[^dlu|~ytpkgdb`bflry~~xspmjhffgjnsyzvsqpppqrsuvxz||zyvtpmiggilqw}}wrpnmmprvz~|yuttrnhd`^_bfkpu|~yurpnkjjlpsuwwwwy{~}{wsniea_`djnrv{~{yvuuuttuvwxyxwustvwxyz{zywurpligfimsy|xvvwwwwwvvtrpppqswz}~|yupmmmnqty||{{z{{{zyvtrrsttttuwz~~{ywurolihghiloruvxz{{|{{zyxxyz{}~}{zyvrnjgedeghiklnqswz|~|xurpnoppruz~zwspligeefgijkmnrw|pf_[YZ_fpy|yuplhedcdiqzxrmlmpsvy}{vqmjhhimrw~~{zyyyyz{zywvvwy{|||}~{zyyxwxz||ywwwz|~|yvspmkkmquvwy|~wplikmquy~zupljiiiknsy~{zz{|~~|{zxurppqrtvy}|zzzzyxz|}|zyyyz{}{wtrqrux|~~|zwutvy~~~~~~~}|{{{zywvwxz|~}||~~{yvtrqpqqrtw|~~~~|zyz}~|{zyxwxy{}{yvuuvxz~}{ywwz{{{|~~~}~~|zxwvvw|~}~}zzz{}}|{||~~~}}}|{zyy{~~~||||xvx{}~}}~~~~}{{{|~~|zwuttuvwyz{}~|{{zzyxyz|~~~}||||{yxwxyyz{}~|zzyyzzzz{}~}}}}}}}}~}{{{}}~~}~~|zzzzzzzzz|}~~~}||||{zyz{|}}}}~~~~~~~}}}~~}{{{|}~~~}~~}|{zzyyyyyz{}~~~}}}}||{zzyyz{{||||}}~}||{{zzyz{{{{|}~~~~}~~~~~~~~}}||||}}}}~~~~~~}}}~}}}}}}}~~~~}~~~~~~}|||||{{zzyyzz{{{{{{{|||||{{{{{{{{{{zzz{{{zzzzz{{{{||{||||{{zzzzzzzzzzzzzzzzyyyyzzzzzz{{{{{{{zzzzz{{{{zz{{{{{{{{{||}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}}}}}}}}}}}}~}~}}}}}}||||||||||||||||{{{zzzzzzzzzzzz{{{{{{{{{||||{{{{{zzzzzyyyyzzzzzz{{{{{|||{{{{{||||{||||||||{{{{|||{{{{{{{{{{{{{||}}}|||||||||||||}}~~~~~~~~~~}}}}}|||||||||}}}}}~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}}}}}||||||||||||||||||||||}}}}}}}}}}}||||||{{{{{{{||||||||||||||||||||}}}}}}~~~~~}}}}}||||||||}}}~~~~~~~~~~~~}}}}}}}}}}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}}}}}}}}}}}}~~~~~~~~~~~~~~~~~~~~}}}}}}~~~~~~~~lierolibre-0.5/data/sounds/HURT3.wav000066400000000000000000000152611205125547100173250ustar00rootroot00000000000000RIFFWAVEfmt "V"Vdata~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}}||||||}}}}}}}}}|||}}}}}}~~~~~~~~~~~~~~~~~~~~}}}~~~~~~~~~~~~~}}||{{{zzzzzzzzzzzyyxxxxxxxyyzzzzzzzzz{{{{{|||}~~~~|{zzzzz{|~~}|{zyxxyz{}~~~}||{||~~~~}}||||}~~~~|{{zzxxwwxxyzzzzzzzyxwwwxxyyzz{{{{zzzzzz{|}~~}}~~~}|||}~~}||{zzyyyzzzzzzzzzzyxxxyyxxyz{|||{{{{{yxxy{|}~~||~~|{{|~~{ywvwz|~{xvvvwxyz{|||{xvtsrrssuvxz{{zzxwvtssuvwxxz|}}|zxwwwwxy{~}zxwy}|xvwz|{xvuuvz~zvssuy~{xvvvy}{wtssux{~{wusrsuwz}~{ywvvxz~~{{|~{{{|{vqonprvz~|xspmjijmqv{|wspmnorux||ywvvvy|~|zzzz{|~~~~||}~{zxy|~zwvvvx|~zwsqoprv{~}yvtsrsuvz~~zurrrtuvwx||ywuspoprw||wrppqtwy|}yvsrrsv{zurpptzytrsw|~|{{}~zxx{~~zwtssstx|}zwsojhimquy{{|{yupjgefilosz|wspnllnrx|xvuvy~~zz|~~{xxuqnnrz~zvpieeipv|wpieccgmwzsmilrz{xx|~zz||zww|~zxwwvuux|~zwusrqsvz|yvusrqqrvz}~}|{{zyyzz}~}~~}zwwy~~~}zvrqswzzxvvwx{zwuttvvuusrtvwyz{~~||{|~~{zz|~~}}}zsrw}vlfit{mb`gqz}slhffimv}unmnqvz}zvtu{~|~|wv{|umlr|}~xpijqx|zz}~xpjgimoqrsw{~~|{zxwvtstvz|~|{~|x|sqv{~~}wrroidcjy~xqha\_fnv}yrmkloruy}}xwwvwx|~~mjrz~yrusqtsi\W`wtdVPS_lxslheegnwwnhhmv~~zx||sw|qr}{v{{ohlx|utwzxsmjloqrqqrsutruwxzxutvy{xurqsz~{ww||z~{~|zuv~~xz|zz{{xvuvxyxxxxzywxy{~~{xwx~zx|xuz~~{z}wrprrrsxysnkiinsx{wusqrsuw{}{|{wy{v}vsymp~~zyjjr{|umn{vsuvrjdfp~~}ztmjmv~xustw|~z}xvxyvx~{truy||xusv~}vplkmoqruy~zurstrqsx{zyzwuw}uqu~zz|xvtv~xrhdgmx}vpidaaenzulilrx~{vx{|~|xvz{usuvwwvvy{{xurqommlnqrrqqsuuqib^agmrtv{{xxxvtux~~qmvrkmqvwvvx~}vqmlliiilonlnqw~~|wnjhgebahs|yvneackx~z|wz|zw{xoms{zuswxwsmjmrym\Wbu~zs]Ye{{lm{{sw~~uquskltzy~vsw|}|qlpzpcajt||skfglnljls{xsommmjilq{|wroljjo{|zw{zz~xppv~xj_^dnuwx|yi^\bltzn\W`tlW[oyimywjgvxuri[NLWj{zn_URTUU\j{|rlie^UMN^x{ttvwqd[bz|zcZh{^Ua{lbeow{|~zmdciszzuprwsmUOfvl|xWESvequVHUsuc\im__jtsh[V\mtihnrpf[Zg{rpzsghv|y{~~pelz|ngn~wlgjsxre\\`hprporvy}yoecl|~php~~|peiz|m_Z^hw~zsgYPLTeu{{se^_dils}~zumgisuqswyzz~{utrnlov|wqljlrx|xkhq}xsxpmx|zxorz|tpwzxupjip|xrmjgfhp~~zwrh^\cnx~qfciprmjnx|unjjq~ywxwvvz|}~zwvzvminz~ujehwsd\aoxvja^bmxzrmq{tgfr{z|uihr||{vqmmptuqkimt||vpmmmlllnqv|zsnnuxxxnp|rp|yjhs~ril{lbgvxnly~iaj{}vxvuz~{}{rmlqzpd``clxvmeb__clw|skgeddisvj`^hxr_TWhdNK_}w\PWk|xrvqhiosuw{umow~{~y}~|~|~}{z}xuuvuuwy~~|xspquz~|tonquwvuw|~vqpqstux}zwx{}|yvwunr|}~xw{~~~xv{~wqorzyqjgku~|upnqv{~}}|zz~}z|{tt|}z||vw~uoqv|~ujiqy}~~wpmnqu{}yvrpnnns~|ukcbgow~ukffkry~{uqquz~|zxzyuqoqv{spomihnx{xtoigir{rllpvyxz~wromovvjefkt{qhb`ep~vmggjnsyupmmnry~siejt{snkjmr{~xsnigiowxqmmpsx~yusux|qlnu|~pechqx~yne`birzyrlhghmu||slils~rhgq|xsqrv{{vutrqrv|vnijqz~xrnpx~zwvwz~yuqoorv{{vqlhinu|~{xxwtqprx{wvwz|~}xwxz|~vporx|~~~|vsqqrtwz~zwuuw{~zxx{|zz~~|{zz|~|zwvx||xvvx|~}{zzz|~}||{{|}~|{{|~~~~}{zz}~{zz|~{zz|~~}|{z{}~~~~|{{{|}~~}||}~~|||~~||}}~~~~~}||~~~~}}~~~~~~}||~~|{z{{{{{}~~~|zyxxy{~~~~{yz{~~zz|~}{{~~|{{}~}|{|||}}}~~|zz{}}|}~~~~~~~~~~}}}}~~~}|{{||}~~~}|||}~}}}~~~~~~~}}~~~~~~~~~~}~~~}}}~~~~~~}}|}}~~~~}}}~~~~~}~}|}~||}~~~~}}~lierolibre-0.5/data/sounds/LARPA.wav000066400000000000000000000337711205125547100173250ustar00rootroot00000000000000RIFF7WAVEfmt "V"Vdata7~~~}~}}}}|}}|{{|}|{{zz{{zyyzyxxyyxwwxxxwxxwwwxwxvvwwxwxyyyxyzz{|zy{|{{{|{y{|{||{|{||z{~}z}}~}z|~|}~~~~~}}~~~~~|}}{|}{zz{zxzwxzyrz~wrvwx|tovvtvvprqsupxqszxtstw{yurwvqjormhsqelqplgnrlhlqmhfnomsjfgomgkhcdf__d][`^[[_^U\bZWY^aSPWVRSSTTU`YOQVQSYMSZSTPPWNMOMNLOEHFOYOKMLQLJVSKRYSSTUQM\_VYZ^aafgmmkgcvtmnjoxx~|z|vo~vmpmjen_^bVQfcJVUMEHLQG4=@?ENV`jt~»zpf\SKC<61,)'&&'),06DKRZbkt}|sjbZRKE?:631001259=CIOW_gox½xog_WPJD?;75323469=BGMT\ckt|¾}tld]VOID?;865567:=AFLRY`hpx¾yqib[TNHD?<:8889;>AFKPW]elt|}vng`YSMHD@=;::;<>AEJOU[bipxzskd^XRMHDA?===>@BEINSY_fmt|~wpib\VQMIECA@?@ACFIMRX]djqx{tmga[VQMIFDCBBCDGJMRV\ahnu{xrke_ZUQMJHFEDEFHJMQVZ`ekrx|void^ZUQNKIHGGHIKNQUY^diou{ysmhc^YUROMKJJJKMORUY]bgmrx~}wqlgb]YVSPNMLLMNPRUY]afkpv{zupkfa]ZVTRPOOOPQSVY\`einsy~}xsnjea]ZWUSRQQRSUWY\`dhmqv{{vrmiea^[YWUTTTUVXZ]`cgkpty~~yuplhea_\ZXWWWWXY[]`cgjnsw{|xtplheb_]\ZYYYZ[\^acfjmquy~~zvsokheca_]\\\\]^`bdgjmptx|}yurokifdb`__^^_`acegjmpsvz~{xuroligedbaaaabcdfhjmoruy|}zwtqoljhgeddcddefgikmorux{~|ywtromkjhggfffghijlnprtwz|~{yvtrpnmkjiiiiijjlmnprtwy{~}{yvtsqonmllkkkllmnpqsuvy{}~|zywutrqponnnnnnopqrtuwxz|~~|zywvutsrqqpppqqrstuvwyz|}}|{yxwvuttsssssstuuvwxyz|}~~}|{zyxxwvvvvvvvvwwxxyz{|}~~}}|{zzyyyxxxxxxyyzz{{|}}~~~}}|||{{{{{{{{{{{||}}}~~~~~~~}}}}}}}}~~~~~~lierolibre-0.5/data/sounds/MOVEUP.wav000066400000000000000000000057241205125547100174760ustar00rootroot00000000000000RIFF WAVEfmt "V"Vdata ü}uld\TMF?93.)%""%).39?FMT\dlt|ýxph`XQJC=72-)&# !#&*.39>EKRZaiqyľ{skd\UNGA;61-)&$"! !#%(+/38>DJQX_gov~ľ~wog`YRKE?:51-*'%$###%&),048>CIPV]elt{Ŀzrkc\VOIC>941-*('&%&'(*-049=CHOU\cjqyĿ}ung`YSMGB=841.+*)(()*,.159=BHNTZahov}Ŀxqjd]WPKE@<841/-,+++,.0269>BGMSY_fmt{ÿ{tng`ZTNID@;8520/.--./147:>BGLRX^dkqxÿ~wqjd^XRMHC?;853200001358;?CGLQW]ciov|¾ztmga[VPKGC?<96533233579ADHLPUZ_ejpv|{vpje`[VQMIFC@><;:::;<>@BEILPUY^dintz~xsmhc^YUPMIFDA?>====>@ADFIMQUY^chmrx}{upkfa\XTPMIGDCA@??@@ACEGJMQUY]bglqv{}xrmid_[WSPMJHFDCBBBBCEGIKNRUY]afkpuzzupkgb^ZVSPMKIGFEEDEFGHJMORVY]aejnsx}|wrniea]ZVSPNLJIHGGGHIJLNPSVY]aeinrw{~yuplhd`]YVSQOMLKJJJJKLNORTWZ]aeimquz~{wsokgc`\YWTRPONMLLLMNOQSUX[^aehlptx}}yuqmifb_\ZWUSRPPOOOOPQSTWY[^aehlosw{{wsolheb_]ZXVUSRRQQRRSUVXZ\_behkosvz~|yurnkheb_][YWVUTTTTUUVXY[]`behkoruy|~zwtpmjgeb`^\ZYXWWWWWXXZ[]_acfhknrux{|yvspmjgeca_]\[ZYYYYZ[\]^`bdfilnqtwz~}zwtroljhecb`_^]\\\\\]^_`bcegjloqtwz}|yvtqoljhfdcb``_^^^__`abcefhjmoqtvy|~}{xusqolkigfdcbbaaaaabcdefhikmortvy{~~|ywusqomkjhgfedddccddefghiklnprtvx{}}{ywusqonlkjihggffffgghijklnoqstvxz|~~|zxvusqpomlkjjiiiiiiijkllnoprsuwxz|~}{zxvutrqponmlllkkkkllmmnoprstvwyz|}~|{zxwvtsrqppoonnnnnnnoppqrstuvxyz|}}|{zxwvuttsrrqqqpppqqqrrsttuvwxy{|}~~}|{zyxwwvuuttssssssstttuuvwxxyz{|}~~}|{{zyyxwwwvvvvvvvvvvwwwxxyzz{|}}~~}}|{{zzzyyyxxxxxxxxyyyyzz{{||}}~~~~}}}|||{{{{{{{{{{{{{{||||}}}~~~~~~~~~~}}}}}}}}}}}~~~~~~~~~lierolibre-0.5/data/sounds/RELOADED.wav000066400000000000000000000221641205125547100176370ustar00rootroot00000000000000RIFFl$WAVEfmt "V"VdataH$~~~~~}~~~~}{}}|}|~~~~{}|{||}~}~|~}|}~~}|~~~~~}||~~~~}~{|}|}}~}}}{|||~~~~}|~~~~~~~~~~}}~~~}~}~~}y{}{}}~~~~~}}|{~~~}~~~~~|}~|}}}~{|}{|~~|}~{}|}~}}~}}||~{x}~|}}{~~|{|~}}}}}}}~|}~}{||}}{}{|}|~~|~~}|~~|~~}z{z}y|~}~~~{}|z}{||{|~~{|z|~}~}}~}~}z{}}}~~{}}~~~{}~}}|~}}~~}~~~||}||x}}z}}}}~}zy~}|~|}}|||}~}|}tvR Y1ňS;\Ghk~pc~{~zquu|zzg{z{|r|wy}yzz~}u~sw|wv~zq{z}y{|}}{y~||||~}{{~}|{~|~~}|~~{{}w}}z~{}|}~|{|z}~}}~}}|~}}~|~{~x~yv|||z~}|{~y|x{ttw}{}x}x~y}}~|}}v{}{}}~}}~}~{}}~{o|u{|l{|~wzx~zq|z}|x~|}}{}~~y{{~}{xg{vwzx~~|wz~|}|~}w}y}{~~w||vv}|v~xg}vuQf[Q__w|v^ssontmu}ok|{}pl~uupwk~}wxzxpZrr}KWcuwz|{}xud[d}xso^c}djhnrtulxiuryt}z}{v|u|ujuz^r^p}|l~uctpzyxt|vxz~svvz~str{|njv}ysty~ywx}ms~rwyu|{m~}{x}vryfF~B,\êl)ZPe7gl}y\)hWJTm mPy|vhTZ̃\cu+kԗXcfS(f\cYiuky@ywvrtg~putnzwtU}a}yZqxs\gde{L>lKWtHidcwOOaҐX*?ȑl[l^q^spv{vfrAjw{[KGd夒iY}JvNqmvw|A,}woxz`Ahkl}cZtm\wpi>okhd`tyzKsusL|Sbstfwz~sbmUi^wj_kp|xZYo~l[uj@Ět`r*f^~ykkgus{hqf|bXj^ptivo\~jum`ton|tVaak`P}ztNvjz^vfzsbdmuqwxv|xtgota?3{yW2uv.moM*1|VlTeqs>C{̴9~B4ŗjF=po[_Vx_MCQqDMriFNx[q|VVoqtmCUrzynzh~U[kxyy}xQr~vqkftbioepukoxgVezsja`w|kbpxwpsˣl^v|~glv|}yzq{ecg}amkfizr{gTWze|arjx}oa}|wW]cfsxotf\WJu|`lQOaqfw\vz}~tqsk~n|gSZvwzXwdUegpzyrr{yvrtiq}y~{ynyojp{as~vpmps|y~~x{x|}|y~y|np|qxusnzusvzvun`x{nio~zypzutlh{soen~qrpomy~zj~f{}l~xlxz}arxtvuq|s}yy}{m}w~r{|{~vywxvy|x~zyxx}{yv{x{rvt|yxwr|vwv{}xuxu|{~msuz|~z||~xvury}{xwy{{~x{wqzx~rkzykl|z|xslm}w|yxqt~~w}{so{xov}svxrx~}nyzw~{x}yw~ww||{~x|z{vyqmx~|s|{uq|~s~ts~~|uvxt~}y~|{x{~z{y{y}yrz~wvz}zzz}~|x|||{v||w~xv}~|{yzy~|}}~~xry~~z{}{~}~xv||}yyzz}{z{{}||~|z}}~~{z{{v}~{z~|v|}}|{~~~~~}|~{z{~}}z||x~}}~||yzzvw~~{~~x}~~|{}~~~z{~|}~zz{y~||~~z|~z{~{zx{~{yzy{~zyxy{|~{wxz{yxy{~~|xz~|w}}{|xxy{}xsv|vrvrkq|{|wvvt}~{zvw}nm|ovqsqhz~vv|yux~w|nl|vpt}{x|}txtt{xlr~~|qz~vts}tq}uq||vwrq}ty}{w|~|~w{|x~z{~}zx{}|}{zuy~|{zzx}xzww}xy{rzy|zw{~{|}xz}~~}~~x~x{}~{~~}}{|w|~~}{zw{zw}~~{{~z~~}|~zx}|}}}w|htpifصIgpOMn{^ep|q`VTm{1FUdOOLH~[Btnchj`Lƣ^Bv|Za}ym^o\bha{kwlm[Q}fHo{evp}p`}mQsxXoxprp}n\}tXgcluyyuzxftgppnwtw}lkhe|iq|zpykxhqps}~v{ipigpp}{xoowtstx|vywxqwoyv~u{xh{~kwymvww}xwvq{pwu{|~ywxrs|uvz{~uwwu~zzv}x{u~zz}|xq{v{}uz~y~{zyux}~{|z}|~|~~}~~}}~{~z}~xz|}}|}~|~|{|~~~}~|}|z}~}~{~|{~~|y~}}~{z~z{}~~{|{}{yz~|||}}~}||}}{z|}xy}|}}}~}}z~~~~{|~}}{~|~~~}{~~zz|zz|~~zz}|}}~{~~}{yx|~|}|~}}}|{}~{{}}~||~~}yv|yz~|xtzrx~uv~|}}~||}{yx{{|~w{~~||~}~~}|~~~zx}|}r~}yy||v{{w~}z|~~{|y}}yw}|{{|}|xuu{}{y{~}~|~~~~~y|zzy~{z|~~}}|}~}zz}{vu~vtz~~}}|yx~~z{~~}|z{|}~~~~~~|}}v|}{y~}z}{utulzum|wnwbpd{Sxoh}vpxy{ql{zvuf[fvgseqpa|qfxofx|v{{ux{x|{|~|}}|~|}~~||~~{|~|zz}}uuz}{y~}z{||{}}|~}|yvx{yxzyyux{yz|}~~z{{|zz{zz~||~}~~~~}~~}~}}}yzwqm|~snyy{oeWxtv^|{YrwUz\wWtf[lz?nv$oh_\\֡'eiaҏ|zqvNu{sqgJRRgx}~we{wt{}xz^~sq|ywMczZeubwzo{vn~nZpwry}wqh|wtPe}w}p|[nqnjjyplhvrj}z.]mrTerti~pubNv~pZkmmz}aVafq~okm[ew_mzVxHhz|atFh|evPDw_CLh[V|`L{zuomyzp~ttvq_ezu_CvZ^{x`qfw~^T=}bv,wfZF8v%A{df`xNt9z~kqpQju]a}p[jzg|ur{w@IURwz0xw~rXsv©a_t{eU~qBĔW|3X7O5dndHϹuɳE|QexyKb`_Y_zy|wsowtPZquebjvnep{sorshoxm~{wuwa`jz{}yx{xvnpifmslenuy~{y}voiqrrtr|uu{~}w|wy~vop|wqu~x}{}{{xr{tqquuyuko|{{{}z|xsrvurrpwyyuptnmqmjssxrr}}}y{}~z||z{xzyyx~yz~pswuqx{}|y}~|~tx|tqz{vn|{{|}z{|ztrqqqvywzxxuwy}}{yzyy}}z{~uz}xuuxws{zyt}z|nv|zxz}~~~yzz~yw~~|{u~~{wzxzyz{zyy|{z|{{}{~~|}zwy}~~xv~y}~~{|~}yz{|yz}wzxqvs|}u{{xosl~lymqqyo|sxotpyp~w{}spo{~{u~{~w{wy{z}{x}}~~yw}|{w|y|z|~z~y}}}}~~}z~~~}~|~}~}zyv|}|||}~~}~~~}|}~~~~~}zz~}z{|~~~x|z~~~}}~~}~{{{}{~}~~~|zx}y||~}~~}zy~z~}zwnv~{w~}}}}}|~~||~~}~|}}~}}~~~}~|}~||~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~~~~}~~~}~~~~}~~}~~~~~~~~~~~~~~~~lierolibre-0.5/data/sounds/RIFLE.wav000066400000000000000000000461431205125547100173240ustar00rootroot00000000000000RIFF[LWAVEfmt "V"Vdata7L~C63&.-%CJYJObȨțkLU[ػĀy||ujr{~kQ^fnkmuwnbbqgkfljkstXX6&!6nikhF4<:\uo-0=%666nB&-)2(!"'%*0*)&/,M}yn-5+&&(*%%'&*+)31&,'!14+%,MdlhgZ0-1,*!!)!%)+,1byJ+,+%!#-?Nlnnzr2,%&&-$,*Fž{~~|{{z媲Ϸvn|z{yT8(''('((29567Ga~}x{qgdeuƲnVQWhnz{|{~ʺѮtlsϰf-%),-*&#'?GAA==>@6"&.,&"**+#$*591.,)%  ,-*)(8DR``D#" )+)&"$(--040/,#"#!!).2/)#"'& ',.+(3_wif`SN@1+#!$'(+/))/<_r{βѬ|~}ǰw_loaMMO@=LRO[cVPKXcS4(1BHG<58:B>E_­}Z@232$ %()*,'&(%'&#%*167978IbpeXVmnZ:" #$'%%',*%#"%&+./3.$/EJVozyzcUO1#46,&!:o}^G<5*%!$'@enOCTyǬr^Znvwv|vvX3$'))/7CHGNZM:23CA;?L[it~maxu}_7.()($&+/)%'-Ecb[ZTSDMH?;*'%#*+)002520(!!%'***-+,+)"#(*3:1(""!'(')5gwmmlfioB&1/4300991.0,0=;;?8+*D_]Z`[NNSL=Ke׻yvttƲɿuv{ѽo?'1/0*195,,+*$#$'-4521,,//,/)#&))0CKBFVY[`^[]YF0)*(++%!"),/8>DBCD:ANZ[Q?%!#'(''*'$*/.%$$))+-,+,)++)%1=3++:AGF3+126HawwhWNEGC;UhojcYIOfpd`f^QITS:""46+)(# #$&+4:41Oz־e[iplV?=\ytehiw],$(043/1/$#*,1,%%(2I\be]H.$-7:5+&!+4BO\qkG+!%&"! #($%&5@1'-C\`TNHOUTZvýοİwjUBJWZSJE<.)).3-(,./,*,-0,%%&.@RP\u{hF7;CBKR[j}C$'-%,.)$&'./)++('*()&'$"3<=9,*0.+4>=82.+)+,*)?[diphOEB9;B<.))+,-,*,,/04>B>9EUZPA:ImκiN=;5:K\l~x^Pcrjk`T?.2:=7-+% $),&###"*;D?88?C?AH6%',12-))'')*$!#(--25/'!'Fdlgbdo~yooaWXTRK?4,),($())3600,/0.71)+=Qb|hl{vidrü²¥xƴƠzqrluwgVZd^O508EL\ksybMNA5AK=+(&).3=E@?M]hb\hmg]VPL@/,,/41)%%(.,*24/,&!$*01*%!"$'%#$1CGK<,+()/-"!"%(!!()((%$IZ_P1(*+,("5H]vŹ}yǰ¯ȷƶɸżĬ{fNABJEQiuobY[S4)&$&Giwpa^VG2,'#"*4G`daL,$(,*,6B4AcssegĹüq^Rcոw~gboºѾnyxzk^Q\wϬ{rŻs__osjfuɼvpŤȽԴ˺Էphy~wjlpjl{ʺ{{shkxţ{bTDEQ[jzzvkrư{}zjZ__dϺȺϷżҼwszʿնŰпykqvpngG0*-//Dcrhcgnwzvg__YU^b\XQE:7DUZTK9*++,/BOSMB>93.,.2,+-0,)./,.937C7,//4@M]ilst_D54=GLE82,,-7EGQTNQ[`[VSR^yƾ¾ö½ĺzj``hyuXLMJ?;90(%'6CCA@DJMK?5-,00/.-,,06779<;:JR\ivʱxgfsxe]bhikocXWSYvɾypglutlovqn{ypnnmja\fw|vph_VSRSX^erx^MS__YMABS_]`he\\`Q@@HMSUVUF2).6>H_|r_UHEGCHVUF:.00153.(',?>?>Ifxn`X^fnnje\TVXY`_Z\bjxvgoÿƿĽ¾|umeafjlhb^]\Z`hhb^WPIA?DRabZPIJPSSMJLLOPC876?SdfbXD:96787768:=ELRPHNajtzeUPH:42-$&5DEDUgjd\VPMMGEIE4,*'&)/?PW[ZZ]_^dibSJGHM]wŹļ~smjo|ĵvv}wmnodRKILSTMKTbotogdelpf_XQLHHNX_`agv}gPNMJKLMMJHFA7-(&$(,,+)*+.27?EE:641226=@HP[jv~ywsi^TXcgieXI;23LWVPOLDGOTSJA?BJT[bcaegggjnroaXWM?623>JPMFIKGDEIPUUTVWWW[a`VNIGGMTRNKGB?>>CN[eghkjgbbdcb_[XWVZ_c^WWWUVTMHFC==BCBHQX^deb^]^bimqv}}vniidZSSX\ZQD5,->Ylswzulmj`WV\aa\WOKS_dcku|}~òĻȾŲȹriglqtplpuuqme\WSK@==940-,,+-7BKU_kvzwoe^ZVOJD??=60,*+-.2=<8;JW\_dksxzyspprvtokllp|~la[Z\]covvuzû~~ysrw{{wuywnjc]`hjilt~zqifn|ysoljgb`_ZNCAJTZYUSW_dis}skgcchlkkr~ynaXVX]gry~ļȽvlfbchlpswzxqi`YQJJOWblt}qcXOHBAELSZcimrx}Ǽ~wvxyvpic`\VRY`^WV\cinokfb_]aeb\Y\adimptwyywy~thfksy}{zxuqj`[^htzvk`ZYWY_ejnqsu{ynaWSTVZ^gq||~{xz}º~zyxupjhijjloruwz}||wqu{~}~{z|~}qgcbabc`]^_^bjrx}}yvssw{xspnry|}~~zxx}zvwy|~zvssw|~zvuwzywvxzzwurokiknqv}wpjfcadgijns{{tojbZTNJKPTUX^bgntvuuwyz}}||zyxy{{zxzwpmlpuxuqqtvwxyz~{vpqtuux~}ywvx{~}zwz}}|}}}woid^XTPOSX_immmotx|{tqnjb]]_`acflt|}vngdc`[Y]cjpvz||~zqjebba```aba`bfjmqw|~zuqnid`][ZYXZ]__``cglrx}~wohc`^\]`bejnqssqomlpv|ytpmjhfjrwxxx}}yrnmpw|~|y}{tokheegfffhjjkou|{vuxyyxussuzzuttvvtpmid``chlpuyzxurpopruwy~}{z|~~|{yvrmhdbabdgkosy}zxwxyz{|}{wqidcdgkosy}ypg`ZUSRQQSW[\\_enx{toia[XY\`bfimrw|~|{{~~{xvvvwxwwy{{|}{umiikljifccbcfkorux|xmfcdfggfd`[XWY_hr|~xqlhfffeedbbemxzrnouz|{wtuz|upmmnomjhggilpv{}zwtojfc_]]]]\]`dgknqtx|~{z{zxtrsuwyzzz}~zxwwxyvtpmlkklmnpsvx{~ukgfc`]ZWUTSRQQPQTY]aekt~}zvqmiea`abdehlry}{ywusrrsrsssrrrsssssuy~~zwvvvwz}~xusrqrstsqooqtx}|wuuutssstvwwwxy{{wspmkjkmorv{|xtnieb`abfkpty}}zwuuuutrqqqqruy~}{wronmmorwz~~{xvtrqpppqqrv{~~ytojd`^\\\\]`gnu{{vplgb_\\\\\_cedccdfgjmory~~zwtsssssrqpqruxz|~~|wuwxx{~}}||{ywutuutsrqqqrtvwz|~~{xxwwwwxxwvvxz|~}zxwutrqrstux{}{}}{xvtstttuvx{}yurnkifdcccdefhjmpw~{yxvsrrux|~}{yy|~}}}}||{zyxyz{|~~}|||}~~zwsqoonoruxz|}~}}}}|yvrpmkjijlortvwz|~|{zxvtqnkhgffgjmosw|~{yvsqpooprvz}}zwvvvwy}}|zyy{}~}{ywvuutrrtwyz{{}~{wtpmkiijlptz~}|{z{}~{wusqppqswz~~}{yvtrqppqsux{}~~{xuqomkkmptx{~~~}~~{wtqonnopqrsux|~}~}{zywwwy{~~|yxxwvvuuuwy{|~}}}~~}|{{{|}~~|zxxy{}~~~|zxxy{~~|{zyyyxwwwxz|~}{yyyyz{||}}~~~~|||~|xurqpoonnmmmnnnprtw{~}|{zyxwuuuuvwwwxyz|~}{z{|~~~~~}}~~}||}}~~}|zyxwxy{}~~}}~~~~~~~~~~|yxwwwxyz{|}|yxwvvvvvwxz|}}|||||{{zzyyxxyz{|||{zzz|~}zwusstuwy{}|zzz{|}~~~}}~~}|||}~~}{zzz|}~~~}}}~}||{{{|}~~~~~}}}}}~~}}}}~~~~~~~~~~~|zxvttuvwy{|~}|{zyzzzzz{|}}|{zzzzzz{|}~}||{|}~~~~~}|{{yyyz|~}|{{{{|~~~}||{||}}}}}}}}~~|{z{{{{{zzzzzz{{|}~~}}}~~~~~}}}}}}}~~}||}}~~}{yxxxyz|~~}}}}}}~~~}|zyxxxy{}}}}}~~}}|{{{{{||}~~~~}}}~}{yxwwwxy{}~||||}}}}}}}}~~}}|||}}~~}}~~~~~~}||||||||||}~~~}||{{{||}~~}}}~~~}}~~}|{zyyxxyz|}~~}|{{zzzz{{{|}~~~}~~~~~~~~~~~~~~~~~~~}}||||}~~~~~}}}~~~~~~}}||||||||}}}~~~~~}}}~~~~~}}|||}~~~~}}|||}}~~~~~~~~~~}}}|||||}}}}}~~~}}}}}~~~~~}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~lierolibre-0.5/data/sounds/SELECT.wav000066400000000000000000000106501205125547100174340ustar00rootroot00000000000000RIFFWAVEfmt "V"Vdata|wlaWMD;3,'"#(.5=FOYdozû}sh]SJA92,'#  #(-3:CKU_itƾyndZPG?81,'$! "$(,28@HQZdoy~tj`VME=71,(%###%(,17>EMV`jt~»zpf\SKC<61,)'&&'),06DKRZbkt}|sjbZRKE?:631001259=CIOW_gox½xog_WPJD?;75323469=BGMT\ckt|¾}tld]VOID?;865567:=AFLRY`hpx¾yqib[TNHD?<:8889;>AFKPW]elt|}vng`YSMHD@=;::;<>AEJOU[bipxzskd^XRMHDA?===>@BEINSY_fmt|~wpib\VQMHECA@?@ACFIMRX]djqx{tmga[VQMIFDCBBCDGJMRV\ahnu{xrke_ZUQMJHFEDEFHJMQVZ`ekrx~|void^ZUQNKIHGGHIKNQUY^diou{ysmhc^YUROMKJJJKLORUY]bgmrx~}wqlgb]YVSPNMLLMNPRUY]afkpv{zupkfa]ZVTRPOOOPQSVY\`einsy~}xsnjea]ZWUSRQQRSUWY\`dhmqv{{vrmiea^[YWUTTTUVXZ]`cgkpty~~yuplhea^\ZXWWWWXY[]`cgjnsw{|xtplheb_]\ZYYYZ[\^acfjmquy~~zvsokheca_]\\\\]^`bdgjmptx|}yurokifdb`__^^_`acegjmpsvz~{xuroligedbaaaabcdfhjmoruy|}zwtqoljhgeddccdefgikmorux{~|ywtromkjhggfffghijlnprtwz|~{yvtrpnmkjiiiiijjlmnprtwy{~}{yvtsqonmllkkkllmnpqsuwy{}~|zywutrqponnnnnnopqrtuwxz|~~|zywvutsrqqpppqqrstuvwyz|}}|{yxwvuttsssssstuuvwxyz|}~~}|{zyxxwvvvvvvvvwwxxyz{|}~~}}|{zzyyyxxxxxxyyzz{{|}}~~~}}|||{{{{{{{{{{|||}}}~~~~~~~}}}}}}}}~~~~~~ż}rg\RH?70)$ !%+19AJT^itǿxmcXOE=5/)%!"%*07>GPZdoyº~si_ULC;4.)%"! !#&*/583/+)(()+.28=DLT\eox¼vmd[RKD=830-+++,/27;9888:===?ADGLQV\cjqx{slf_YTOJGDA@??@BDHKPUZ`gmt{~xqjd^XSOKHECBBBCEHKOTY_dkqx{unhb]XSOLIGEEEEGILOSX]chnu{yrlga\WSPLJHGGGHJLPSW\aflrx~|vpke`[WSPNLJJJJLNPSW[`ejpu{ztoid`[WTQONMLLMOQTW[_chmsx~}xrmhc_[XUSQPOOOPRTW[^bglqv{{vqlgc_\YVTSRQRRTVX[^bfjoty~~ytokgc_\ZWVUTTTUWY[^beimrw{|wsnjfc`][YXWWWWXZ\_behlpuy~~zvrnjgca^\[ZYYYZ\]_behlosw{|xtqmjgdb`^]\\\\]_acehkorvz~{wtpmjgeca`_^^__`bdfhknqux|}zvspmkhfdcbaaaabcegiknqtwz~|yvspnkigfeddcddefhjlnqsvy|~{xuspnljihgffffghikmoqsvx{~}zxusqomlkjiiiiijklnoqsuxz}~|zxutrponmlkkkllmnoprtvxz|~}{zxvtsqpoonnnnnopprstvxy{}}{zxwutsrqqqppqqrrstuwxy{}~~}{zyxwvuttsssssttuvwxyz{|~~}|{zyxwwvvvvvvvvwwxyz{|}~~}||{zzyyxxxxxxyyyzz{||}~~~~}}||{{{{{{{{{{{|||}}~~~~~~~}}}}}}}}}~~~~~~lierolibre-0.5/data/sounds/SHOT.wav000066400000000000000000000023371205125547100172350ustar00rootroot00000000000000RIFFWAVEfmt "V"Vdata>H_roIZPV~}U>>>\t>>>>\bQ>>>>AMK>>>>>P[P>>>>ByB>>>>>>>>>>>>S>>>ĸa\X>>ʿƦ>>>И>>{>Юk>Ћ>>>к>>>Р>>kUЖ>zD>>ͩN>>>Ж>>>b>>>>>>>L>>>>>>>fe>>>>MJP?>>>>BID>>>>>CFA>>>>>FHA>>>>DQRC>>>FFux>>>g>K>>>Bm>>>>>>>>>>>Ў>>>dsm>>>>>rr>>UVx>>>Г>>Ѐhh>>>>AFFA>>>>>>?>>>>>>>>>>>>>>>>>>>>>@@>>>>>hPS>>>D>]>\>>>>K>>>Я>>M>>Џ>>>>>д>>>>>P>tI>>>>>>>>>>n>>P\S@>>>>@ED>>>>>>?>>>>>>>>>>>>>>>>>>>BDA>>>>>>>>>>>>>>>>Pt>>>>u>>m>>Ch>V>>h>>ЧO>>н>GПEA[W>V>;>>>>Z>>>>kг>>>>J>Ѝ>>>>>>>A>>>GmMWAW>>>>>>>>>>>>>>>>>s>cQ>>>П>>ЀW>>иS>\?Ȣ>qг>>УľЈЧФ>IПЫ>bЌM>QЧ>>>>>t>>>YЀZ>>`xW>>SK\?>>aIЖ>>Uhdu>>>EFLm\J]thZJAY`urmI>IЃ>>{W>\p\ZfitSC`fCtfzmhe{tx|xa~x}{{|~ta]}΀lierolibre-0.5/data/sounds/SHOTGUN.wav000066400000000000000000000465321205125547100176140ustar00rootroot00000000000000RIFFRMWAVEfmt "V"Vdata.M.--.2.-252-/70,1/%6qs(%2//130179:;:=:86:A945&U2 QZL9'黬ܶnJsl]w|i7#ѹƒr6$''% 43$  32 zmkrtsfbc|LaBLleyL5|,8!)&"3:;=;?9+,<67J@"'-%?lbF91.EY\^dmX>OkmutjfhytRyzyy~z~zvz˭r|vLZ|~YQaW1:G1ac//(<  !! !"!!!&.&"6A:582!!!!""!! !   &u|ӬdG]B6BEh}~gPdm^{udyaF=yhҊHrS>Sj{{xLk~E#{HFn+  $>%  ;B,Etdn~P>0X~ϙ|¦ǟ_HUmujkgY@&37 +N>9VU2Q<-&fמJ3gi(fH)3VR /,62& !%  VSVتc촶~ɔsxvgd}sVrwM)CgoykHG㧜ɔþs>DrNJlnoqy? 9%\yvyzwtxxltv#-}}}{v8oq',=CIQz{yzyv{ytwvwwwvrtstsntwy{citO6'N)QssW%84 $'1VgK-=QSO@7%R^Uaipj|`btyy캤}z{~~}}uvֹvuyʷںx[buy[2+1>@DRtRGpţM+5NXXazyN56DSF/,GH&&N0W|n`[f|lKSh?*]X  %  >B*'9hW7 M޹xyخv^4Zt9/~粶ΟiM_S@J\RFKYbI!4RB-BOJ*& )5bkmsizposyx|~}fPc0 ^8D+! 7?"=DSO#0@=0( :t~tpEKC*U{lήб̷ضΔL^xevl{rt~~~||{||z{zzuukp{t|~ytuyzz|w||zɰλ#%&&)&%%""  "#!" %]bTvgTwcv˶sD0.4DG5',/---..'(50/Rêlq~rL,17,%'8$&;E3 4&(hпsjmk`\i~ʸڝȳ۶ΟnSJG# &OMD^uLJYZ[m|jJq{krڿҽŶ{cMHMJIUF&%+)*)'(&&&%&%#$#"#"""!""!" ! ! !! !! ! ! !!! ! ! !! ! ! ! !"!##"$$%%&('))082,aü{sqswtdZWTRU[abXA2AT^XFABBDQirgiƭơwffy|ܪȽz`ZRH?.'**,+*+)'(&'&%%&%&&$%%%&%&%&%'('('(')(((*++,,-,,*&/IVUU_haW]dehoxzz~gmsr}|s]Zg`P@673*),+,+**(*)(()*()(++(((2;HX\ZY[ck|övzwqdL(3@/!%6ACDILKLGDFCHe~~o[[juywrxγȸм{gfcacdT=+" $*$   ""#%%&&))*+-*)>L:9;KI1++*8EC80+%)21'%('('('&''&'(''')(')*(*),.,,.-..)'4O`egcnzwx}zt}mb[UOXb\G%$+*+*)))'&&&%$$####"!"" "!!" ""!"!"$1E;*!*B`plaTFPrǿڻƶȹ˲÷rrwwsouxzwjky}sѷm]Yhx|{nlree^G'%'(&)'&'%%%$$$#$"#"#"##"##"##"#"#"#"#$#"#"#$$#"$%$$$%%$&""5EE9)&&".DPYmwйҽzszsa[gw~tw|uimʸɿpQ816789317;4(GVRMOnֿyv~{xsps}jgntseXUH:5.'((+*())(()'(''(&'&))')(***+,.,//0102223-,DWdvxtty{wonzxbXTRK@8/1132/0/.--,,++)*()'(''''%&&&%#%$#$$"#!"#! !   ! "!!"##%%#%"-ET]cjo}Ƕ|{||rXXrw_MMVZRI<.'-2* !!"$#$$&&$(2)('$.C]gb^fw{xýxYQ`p{xsm`QOQOG52466547<4243323221231010101100.382-0/./..250,..-.---,,-,+*+)**)*))*')('(&(&&'$&&%$%%#$#$$#$%#&&%''***,,*))$-²ȶ÷ӶӴӯĨ³ɥɯzmaSTZO6! !" !!   "!!"$#"%DLIRWZk|ѽy`7$*))*(&'&&%$%!#" ! ! !!"""$$&'&()*+-,.*)7DKUt˳~l^L=60,*,//(%&$%#! !!  !!)4*(C\kihc^h}mzuqtu}xy}yoccsηyog`^^]O;1/+%%.BI;45;DC54AYnsutyxtrx~{q`WTKGC=<99AEF3#')*7=-$385)0Z_SZmqpv¿ջuyxvvl^]n}sknu{u~ǷȾqJ@LPLQZOEOO<*+8BBAD7% "!" 4<:;@8*%+234Mz}Y>/.Rgluɱzd^XG,!$$$""  "##$%%&&"$=JGPlݭ{cXI<4560'&''''&%%%%%$$%:CACEOjʼiQB=<=@Tt}b?,6CIMWetzutiL6,.;M]ipnjhzykdsɻǹzgZA*&,--.-+**+*()((&'&'&&'%'&%%'('(')(()'*))+)+*)*)*))0049=DIJKHA:+&**,,+,+,+,-,+,*++**+*('.7;:/%&)()())*+)(())(*)+,+-.-...-)2I_\OWi{ózkjeSIMXcfE ;I: #-//.*%2BM_kp|ܼj_ZWWWWcswpfZRMTk}wp~yg`ozpfijf_WXbq}}uwƭι{|ѼrohYJISZVPH5"!#$#%%%%%#%%&&%&'+(''((#"5IV^_VE8=Rn|{tmkh]P?@OVOEFNF=QfleYH7,)--////..-..,--+-,,-+-++,*,++,*)+)++)*)*)*)++*+,+--,-.././--:?EQdty{|~~Ҿ|xqttrssrkeis|wWIJSZZUI<5/'&/>HGHMMF@J\fjjdbjx}}}wsuzuxκ{v}wg\[^[X]m~vjoyyyŸrjjgYG1'*'&*+&)471**/.( 1?FLYhcXOR_q¯Ծwgbo{}qillcP2  4>=BIINUM9&+7=HV_a_kϿjH800:M]^L9*)-,,('.BPOG>CP_dfcUG?@Pj~}tsqi`ZN@>=@GA/!%/)   ! -@CEJGGQ\dp~±rrsuz}jcikrxthblmgfoͼî~fUOS\bfi_RR[]THCK^ilmn^F898>Pk|vp|z|vjdceffirvt}tidhu|{}siipy~ytqpjb_dmx}|zm`WWWLD81)!$##$#!!" ! ! """##%&&(**,,..)'5HZovf[I8.032111/.---,*+*)*)()*())))*))%$1>FILOW^WJCFPZfhc`UKMK;40#$$"$"""!"!"! ! ! !!!3DKRXWLLRQV_`]]`jy|}Ű~tdXW\dd\OA1&+:<4.*#(44* &/782.+-.1019A?;CLOPMLKLYdeimoswxnhc\RNR^ouvmYQTRPKB8454.&(/:FJJMLGEGT`ZPKLRVQQ[hrvwz|vzxqsujc^^\Y]bky}sqtyzwzyvyƾyutplh`_[WXY[XQI@:9>BHPSOJBBGJIFHMJCFT_dda^`fnwqov}vcRLPPE:36<>5"""#!""!#"###$$%$$%*1=GR\ckpvw}ļ|zsnljjlh_UPMKTajonllmzûyvw{}~|xlcZRMIHJRbryobWTRQX]`l{|{zzskh^Z[TF6350$ !! !! "#'2>FHJT`n{ſuonjca^\Z[TMMHD@@EIMMMIC?@DLVZ^hu~{ss{{~u}xromomligd\SQU][LFJQVUOG?764)"" ""$##$.;GV[WPOS`lwѿ~xnjljaXVURQRRQUWSSVXWVQI@AGMKA:0,,,/:CJOLJIGFCDKQW]][`fijqz{vw|~|zyvwskfefb_\]]YSLIJNSPPRZcjuzyvrrs{ǽ|{tkjnmibacfnvxqhaZWTTQPT^eb`]_cbabehhdbdeirv{}|{~~{|{wrnqtwy}|zvpgccdiifbceheabaair{~ytyytkbVMG@;<>=<;<<8<>>?><8977525459=@???=@JPPLIGKR[_\^^`dbdccba]SSTMKF====>>FKIIDA@@ABFGNOHA:=BFGMSW[bcfir|ƿ}|qgcfhgd_]aipog]WYYYZZ\\aiookjf_[^afmrsrllkossrpmfa`gimpoqlkmmlnw¾|zz|}{srtx{{zwqqprrpszzywyz{|~xsomolkllmtvvzwpieegkootx||snnt}~}{tnkd`cd_XVVQQQSTTXbkme`_cjlnsuvqpmiqvy}|}xolie^\\WN@;;;764689??=9239<<>BILQVYYYWVX\`bfiow|zwz|||~wttuvzxurqqsw}{z}zslkf[WUVYXWSSSRRQUVRRQRRSURV]`ddcmqpplkjnx|pkinsqga]][^a^^^ZXWX]bhjigijpuuy}{ytqppt{|{vsqrkbdeba]WTX\[XXWWXXWTUQQQORX^cffntzzz{uv{ywxx||{y|{zzz{~{y}|}~yuvvttw{~~~{{{{ytpooopstusonnlokf`[WWUSSLIIHIEFHMNNMLMLQUY]_`cfb`b_\]`isroicdgoqjjlmtyyupmmpqrty}||zxyuvv{}|}{{{|zwxwvwuwwyzwuniihjpuxwzwtvront|}{yw{{wutvsopqnnjjica]ZY\[\__`^\_`_^bc`]_]`bcccdfiqyxz}~wtwwz~xsqqsuwvyyvvusqqqrtsu||vpoorstsqpjigdaabc_^^[ZUVUQRTTSNJFDAABEC???@BAADEIKOSXXVTVY\afnu}yrvzurrssplkifeccgebbb``hlpnlpsvyxuvx{{||~{zvutuvwsnlmnnlggfa[Z]^YSPOQRQQSSPT]abcbbdgkhfjnoy~}x{x{}{z{xy|wx{wkjmponqrqoklkiggca`cejnnr}xmefnlebgihghlqrmlkklqsrsy}|ztqqtssw}yz{}|ytrutlkieeefdgihhc`bdcddfhifekrvvttwy|zttnmppnonigpmempjlsuwwvssssv{z{|{{pnkegqomqrswzvnmpoqx|~~}}zyzorwidsulpja`aVMQOONJBADCDGHG?@LI@JPKOVTU\_^cmlovutux{}D?aMҜccl_orrcyxru~nijqjZbhe^Qbvh[_jphbmposrt{uz~}~tssrqnqrkksrqlksy{{tu|wpstuwy|xx~z}|}}~~|~}|~||{{{|~}~{|~~~{z~|vx~yy||~~|{|{~|z{|~~}~|z~{x{{xwzwustvywwutqopqonmnlmpmjjmorokmoilmm_ZBDusJJ|u_bhXcu{zz|{~{|{vpv|wstpmjjmqutsyuquvru|woonlw{opvwuwtqubrsq~{u~~t~wYsoakmqewiyktt~vtp{~q{~}utlyx{vvz|xw~yyz}{wzup}}ys}wdrpX{t\yier{r^kbhcfx[bq_k}havyls~nlwzqhs~{ulq{~~~|yz~{z|~~vsx{pov}vwladotsw}l_bemqi`a``dnzxjhongnxtegmjekqjosst{~xsw|wmsxz|zs}v{wv|}xts{k~ypsr{nhyzsnlmw|{ut{w|}o`etpgonmkdoxujhlmfbirwsssod\jXFu{\0Av|]^qRAYotpz\m|{|i]`躁lYđuwJblb{pVao}|wz{Rd|l}kcf]Jplem[elkqlkskIUwtiilkjlsgjzqzyh^iuvxqsrgeifmjnmjqkqTq~w|ym|siv}gtɠ_թwpwv{Wzn[Sbx\EC]hrcxcIcoxujCTvoXe|zwuzohmqk_t{yfCfwfhaYTkm]rfeoely}ulN]yxz{|lgkqkan|pn}xypn^e}~}w|xwqnr~rqwdZxxagjqqu|jhzwz|zvoxrbmpquqGmibt}|wddn`iut|ryw}vtyqsf|zj`Iyzvqns~zxwwpqgmg|czzpdyyvnbpp{}|oTXjekmgy|zdaxnkz~vkwwkqz{}uy}ks|mnxdfntunnw|qpz{yyy}|vnl}rd~qr~r{sav~sbdvz\WqqhpwfdliulkhWLetcr|wubtvmyylrxqy}|~qs|q|{yuw~rrosqp{{q~{|}~{j{zw|zxqzzxz{u}z{zrzwsz|w|{wx{yux{zxw{}}}zx{y~xqz~~zvx~~{yz~wstxxzz{z{}xw||{ywysxtrvzvw{{vxw}vvz}~z{vv|tyxs|xrww}{xtyw{}~~}}}yttz}x~st}w}~z|~{y{~ww|}}|{zzz}}xz~~x{|}|{{}}{|{q|z~zy{|zz~}}~|~~xvy{qp~|}}xzxs~ys|uxz~zuy{|ts{zx{}{zvw|{x{~~z~{~||{{}}z{~{{~z~~xu{~{}}}~|}ywz{~|y}}y||{{y{|}{~{|z}{z}{zz{~}wz}{|zwyz~{zzzz~|}|z|zxyy~zw||z~{uty||{{{}~{uw|{~z|{z~{zyy{{~|{~~}{|~|}~~}{~~}~}}~~~~~~~}~~}|~~}~~~~|}~}~}}|~|~|{|}~~}~}}|}~~|}~~||||}||{}~}{{|}{{|}|}|}|}{|||}~~}}{|{||}||{|}|{|||{|}|{{~}{|{|{|{|}|{|}|{|{|}|||{|{|{|{|||}~}~}||{|}|{|}~~}~}||{|{||{|{||}~|{}}||}|}|}|}||{|{||{|{|||}|}}|}|}}|}|}||}|{|{|{||{|{|{|{|{|}{{|~}{}|}{{|{{|}{||{~~}~{|}|}||{}}~}~~~~~~~~~~~~~~~}~~~~~}~~{}|~~~~}}~~~~~}~~~~~~~}}{~}~~}~~}~~}~~~|~~}|~~}|~}}~|~}~~~}~~}~~~|~~}~~~~~~~~~~~~~~~~~~~~~~~}|~|}~|~}~~}~~|{|{|||}|||{||{|{|}|{||{}{||{}|}{z}}}}|}~~~~}}~|~|}~~}~}}~||~}|}|~}~}~~}||~}}~|~}}~}~}~}|~}~~}|~}}{}|{|}|}}|}}|}|}|}}|}|}|}|}~{{}||}|}||}{|}||}|{|{|}}~z|}}{}~{{}}~{{{}~{{{|}}~~}~}|}}{{}|}~~~~}}~~}~~}~|~}}}~}~}|||}~z{{|~}{~|{xx|~v{|sn}~zvz~~~{yz|~}{yv~|{yxnjx{owzmtymrtmrtotyopz{{{zzw{{z|{~{~}|~}~~|z|}~~}~|z~|~zx{~zww{|wxzs~yxu}z}~{z|}|~}}y|rqx|ww~rxvszuzzu||z~~||{|xz}~|{{{{|{x||z|}~{~}}}}|~|~}~~|}}}~{z|{{}tpszu}~ru{{j^}Yy~p|z}c{wxba|iQ{kZrxi`kbsSdHSzfnb0N|ln^]A̸uG@g}sd|uŻdxfsxmblwthd{|ocfXN^zz~wytxgp~|p{zy{z~yq|xWp}kq{}x{dVdyaan}x]mzx}swz|xwwzs^c|rn{uvw^emsxRX|~tsvpskersmtet{{^i{xxzzihjtsqks~um|c)Azgk{cXlrprhiTqlw|[Mjnolcm}x{oah|rukRRswt~npvkcfmyfaowzhTsmBs~`|r|u]wjTYnhfxyk:RxmL=Uǵ`Odė@JYTslrgx`[tbp|vksxrou{iak{yyn}}|p}JYeqru`twfVb\t}uv{dFZ|qhHj4JR@V)Io^?AivfAŀZpo]m_D{S,.smv}umnv`Qcwxnjd`uzqg_kukg{ojxc@Iu>gmvE:yr{~u|sZwtb~`b`tYSjX9fhQp\C]kC!O}OyP&9JW{qj]V{qqf^v}{~ij|x|odmuxsmhl|{~}{~xy~~}{~|xy{sx{||ysrttutrw~}zwz{wzxuvx{{|}|zz{|zz{~zx}xz~zy||~zyxxwvzyxz{{|yu{||tpzyyxzyz{{{{z}|~}~|yw~|}}|{yx|~~}|{~zsy~{{}}{yzy{|{x|}{|{{{z|{zz{}{zz~|y{}~{{}|{xw{|{{~~~|zxy~|y|~z}}|}||~~~|{{}|{{{|x{vu}ysxmu|{usztx{ypz|yytnoqnr{trok}y}ox{{rp{zsz}twvtwy|{~tw~ol|{z|zwwx{~zvz|yzzzxzvy{}}|~|{{zy~}y{~{z|}yz~~{{y|{|zy}yz~|{~{{}|{|}~{yz~~}~~|}~|~}}||||~~{}{||{zw|~|~|}~||~|~}|}~}{}}z}}|}|~~~}}}~~~|~~~}}~~}{~}z||~~{~|{~~|}}{~}y}}|}~|}}|~}~~~{{}|}|~~||~}~}|~{{}}}|||~}~}}~|||}}|~}||{{vw~x{~z|~~~~}}~~~~~~}|}}}~|~~}}~~}~~~~~~~}~~~}~}~~~}~~}~}~}~~~~}~~~~~~~~~~~~~lierolibre-0.5/data/sounds/THROW.wav000066400000000000000000000203231205125547100173560ustar00rootroot00000000000000RIFF WAVEfmt "V"Vdata ~~~~~~~}}||}~~~~~~~~~~~}}|}~~~}~~~}~~}~~~~~~}}~}}}}}~|{|~~}zwwwy}~}~}}|~~|zy{~~~|||}~~|{{{zzz|~~}}|||{|}~{yvvxz}~}}|}~~}{yyyz|}~|zyz}}}}~}~~}|}~}zxy|{yz}~}|zzz|~}{}~~}|~~~zyz|}|{{||~~}|zxwuuwy|~~}|~~~}~~}|}~xspoqrrrrsux}~}|~{tmgeglsxzyy|}{zxvuvwz}}yx{zvstvwxyzzzwttv|{tolot{zrlhefhjmqv|}|~~yuqnlmpqqolhghmt~ytsuwz|{yvpmmmorwxwutwz~~yurtz~wrnljigdb`bhox|}zy{~|wpga_bgoy}~wtux|tqtx|peabgmsx}}{wvz{tt{}wrkc_bhlmmpswy}xtx{trqquz~|xtpoqv}}xux{ofb`^`eny~}zuoic``diotxyywsporxzuvxyxurqsvy{zvpicabehlrwz}~}~{tolloruuttx~{utvy~wnihkqvwsomouzuuvz|usru{vnhinv|}}~zsnjgehpz}||tnov~zz}ypjikou}}{~|tnnu~~|}l]USYgw~xuw~~{yz}~~}|ztmfcdipw}~zqjhkqwz~~{yvttqmihikpv|}|{zvttwyz|ysppuwi`bluy{ywurquy~zsnjgdelz{vsrrqnmnrvvutqmiipx~}ukghnw{||~ym`XW^hqsqnnnoppolfchp{zupmigd`\[^dntupidcfq}~}~~ypf_[XXZ_`]YVW\gs{z~|wsrooqrrmiinv{|{|}{|~}xrlhimqsssqomms|vw}|rloyyusv{~{upqwvpqv~wonrw}{xx{{xsqpqrssvy|||}~{spqtwyzzyyy{|||zwronosvxvttvy{}~~|zwsmgdbcglqttsru}zsmhgimopmiebbgouz|}}|rlmqv{}}zurrtuvvvtssuwz~}yvrooswyxslfdfmu|}}vsux}zwvx{~}|{zywvvxyxvwz~ztonpv~}wrsw{ww|~smlpw~{}}{}xuux|zwwz|zz|}tmihhjlpsuvsomnrx}yy|~|yusrrstvwxwvuttx|zxwvuvx|~{yxxxwuqnkkmrx~zwvw{}}{zyxz}{yxz|}}{wsqty~zvuuwz}|{|~~~{xvy}|z{~|xxy}~vqpppnlihkqx}}||~|~}|}~~}}|zyxy{{trrtvxyxyyy{}}xutuy}}zy|~zxy|}ywvwyz}|ywwxyzywutvz~~zwttuy}}{||wstwz~~||{zyxxwuuw{~}zz}{yxy{}~~~~~~~}zyyz|~~}}~~~~|}~|{zz{|~}{zz|}}{z{|||{{|}}~~~}|||~}|~}{zz|~|yxy{|}}}}}~}~{yyy{||||{{}}zzz{|~~||~~}~~~~~~}||||}}~~~~~|{{|}}||~}zxxxxyyyz{}~}}}~~~}~~}{zz{}~}}}~~~}|{{|~~}{{}}||}~~~}}}}}~~~~~~~~~~~~}||}~~~~|{z|~}||}~}~~~~}~~~}}~~|{{{|}~~~~~~~}|{{|}~~}}~~~~~~~~~}{zz|}~~~}}~~~~~~~~~~~~~}}}~~~~~~~~~}}}~~~}~~~~~~~~}}}~~~~~~}~~~~~}}}}~~~~~~~}}}~~}|||}~~~~~~~~~~~~~~~~~~~}}}}~~~~~~~~~~~~~~~~~~}}}}}~~~~~~~}}}}~~}}}~~~~}}~~~~~}}||}}~~~~~~~}}}}~~~~~~~~~~}}|}}~~~~~}|||}~~}}}~~}}|||}~~~~~~~~~~~}}}~~~~~~~}}}}~~~}}}}~~~~~~~}~~~~~~~~~~~~~}}}~~~~~~}}|||}}~~~~}}}~~~~~~~~~~~~~~~~}}}~~~~}~~~~~~~~~~~~~~~~~~~~~}}}}}}~~~~~~~~~~~~}}}}}}}}~~~~}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~}}}}}}~~~~~~~~~~~~}}|||}}}}}}}}}}~~~}}}}~~~~~~~~~~~~~~~}}~~~~~~~~~~~~~~~~}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}}~~~~~~}}}}}}~~~}}}}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~lierolibre-0.5/data/sounds/sounds.txt000066400000000000000000000021041205125547100200050ustar00rootroot00000000000000The sounds in this directory are replacements for the original Liero sounds (which are not under a completely free license). These sounds are created by "sea", and they are licensed under the WTFPL. -----//----- Files: ALIVE.wav BAZOOKA.wav BEGIN.wav BLASTER.wav BOING.wav BUMP.wav BURNER.wav DEATH1.wav DEATH2.wav DEATH3.wav DIRT.wav DROPSHEL.wav EXP2.wav EXP3A.wav EXP3B.wav EXP3.wav EXP4.wav EXP5.wav HURT1.wav HURT2.wav HURT3.wav LARPA.wav MOVEDOWN.wav MOVEUP.wav RELOADED.wav RIFLE.wav SELECT.wav SHOTGUN.wav SHOT.wav THROW.wav Copyright: "sea" License: WTFPL DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 . Copyright (C) 2004 Sam Hocevar . Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. . DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION . 0. You just DO WHAT THE FUCK YOU WANT TO. lierolibre-0.5/lgpl-2.1.txt000066400000000000000000000646301205125547100155160ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! lierolibre-0.5/man/000077500000000000000000000000001205125547100142635ustar00rootroot00000000000000lierolibre-0.5/man/lierolibre-extractgfx.6.am000066400000000000000000000020131205125547100212470ustar00rootroot00000000000000.TH #UPPERCASE_PACKAGE#-EXTRACTGFX 6 2012-04-27 "#PACKAGE# #PACKAGE_VERSION#" "#PACKAGE# Manual" .SH NAME #PACKAGE#-extractgfx \- script to extract images from LIERO.CHR files .SH SYNOPSIS .SY #PACKAGE# .I inputfile.CHR .I outputdir .SH DESCRIPTION This script extracts the three sprite canvases contained within .IR LIERO.CHR , and dumps them as greyscale images in xpm format. Use the .BR #PACKAGE#-packgfx (6) script to pack them back up again. .SH OPTIONS .TP .I inputfile.CHR This file must be a valid LIERO.CHR file containing three sprite canvases with the exact dimensions 16x1760, 7x910 and 4x120, respectively. .TP .I outputdir The script will create the files .I gfx1.xpm gfx2.xpm gfx3.xpm in this directory. .SH AUTHORS The script and this manual page was written by Martin Erik Werner .SH "SEE ALSO" .BR #PACKAGE# (6) .br .BR #PACKAGE#-packgfx (6) .br .BR #PACKAGE#-extractsounds (6) .BR #PACKAGE#-packsounds (6) .br .BR #PACKAGE#-extractlev (6) .BR #PACKAGE#-packlev (6) lierolibre-0.5/man/lierolibre-extractlev.6.am000066400000000000000000000015231205125547100212560ustar00rootroot00000000000000.TH #UPPERCASE_PACKAGE#-EXTRACTLEV 6 2012-04-27 "#PACKAGE# #PACKAGE_VERSION#" "#PACKAGE# Manual" .SH NAME #PACKAGE#-extractlev \- script to extract the image from Liero level files .SH SYNOPSIS .SY #PACKAGE# .I inputfile.lev .I outputfile.xpm .SH DESCRIPTION This script extracts the image from a Liero lev file. Use the .BR #PACKAGE#-packlev (6) script to pack it back up again. .SH OPTIONS .TP .I inputfile.lev This file must be a valid lev file with dimensions 504x350. .TP .I outputfile.xpm The output will be a greyscale xpm file. .SH AUTHORS The script and this manual page was written by Martin Erik Werner .SH "SEE ALSO" .BR #PACKAGE# (6) .br .BR #PACKAGE#-extractgfx (6) .BR #PACKAGE#-packgfx (6) .br .BR #PACKAGE#-extractsounds (6) .BR #PACKAGE#-packsounds (6) .br .BR #PACKAGE#-packlev (6) lierolibre-0.5/man/lierolibre-extractsounds.6.am000066400000000000000000000016771205125547100220150ustar00rootroot00000000000000.TH #UPPERCASE_PACKAGE#-EXTRACTSOUNDS 6 2012-04-27 "#PACKAGE# #PACKAGE_VERSION#" "#PACKAGE# Manual" .SH NAME #PACKAGE#-extractsounds \- script to extract sounds from LIERO.SND files .SH SYNOPSIS .SY #PACKAGE# .I inputfile.SND .I outputdir .SH DESCRIPTION This script extracts the 30 sound files contained within .IR LIERO.SND , and dumps them as wav files. Use the .BR #PACKAGE#-packsounds (6) script to pack them back up again. .SH OPTIONS .TP .I inputfile.SND This file must be a valid .I LIERO.SND file containing 30 sound files in raw SFX format. .TP .I outputdir The script will create the files with filenames .I NAME.wav in this directory. .SH AUTHORS The script and this manual page was written by Martin Erik Werner .SH "SEE ALSO" .BR #PACKAGE# (6) .br .BR #PACKAGE#-extractgfx (6) .BR #PACKAGE#-packgfx (6) .br .BR #PACKAGE#-packsounds (6) .br .BR #PACKAGE#-extractlev (6) .BR #PACKAGE#-packlev (6) lierolibre-0.5/man/lierolibre-packgfx.6.am000066400000000000000000000016371205125547100205260ustar00rootroot00000000000000.TH #UPPERCASE_PACKAGE#-PACKGFX 6 2012-04-27 "#PACKAGE# #PACKAGE_VERSION#" "#PACKAGE# Manual" .SH NAME #PACKAGE#-packgfx \- script to create LIERO.CHR files .SH SYNOPSIS .SY #PACKAGE# .I inputfile1.xpm .I inputfile2.xpm .I inputfile3.xpm .I outputfile.CHR .SH DESCRIPTION This script creates a LIERO.CHR file from three xpm images. Use the .BR #PACKAGE#-extractgfx (6) script to extract them again. .SH OPTIONS .TP .I inputfile.{1..3}.xpm These three files must be must be xpm greyscale files with the exact dimensions 16x1760, 7x910 and 4x120, respectively. .TP .I outputfile.CHR This is the resulting file. .SH AUTHORS The script and this manual page was written by Martin Erik Werner .SH "SEE ALSO" .BR #PACKAGE# (6) .br .BR #PACKAGE#-extractgfx (6) .br .BR #PACKAGE#-extractsounds (6) .BR #PACKAGE#-packsounds (6) .br .BR #PACKAGE#-extractlev (6) .BR #PACKAGE#-packlev (6) lierolibre-0.5/man/lierolibre-packlev.6.am000066400000000000000000000015001205125547100205150ustar00rootroot00000000000000.TH #UPPERCASE_PACKAGE#-PACKLEV 6 2012-04-27 "#PACKAGE# #PACKAGE_VERSION#" "#PACKAGE# Manual" .SH NAME #PACKAGE#-packlev \- script to create Liero lev files .SH SYNOPSIS .SY #PACKAGE# .I inputfile.xpm .I outputfile.lev .SH DESCRIPTION This script creates a Liero lev file from an image file. Use the .BR #PACKAGE#-extractlev (6) script to extract it again. .SH OPTIONS .TP .I inputfile.xpm This file must be a greyscale xpm file with the exact dimensions 504x350. .TP .I outputfile.lev This is the resulting file. .SH AUTHORS The script and this manual page was written by Martin Erik Werner .SH "SEE ALSO" .BR #PACKAGE# (6) .br .BR #PACKAGE#-extractgfx (6) .BR #PACKAGE#-packgfx (6) .br .BR #PACKAGE#-extractsounds (6) .BR #PACKAGE#-packsounds (6) .br .BR #PACKAGE#-extractlev (6) lierolibre-0.5/man/lierolibre-packsounds.6.am000066400000000000000000000022141205125547100212450ustar00rootroot00000000000000.TH #UPPERCASE_PACKAGE#-PACKSOUNDS 6 2012-04-27 "#PACKAGE# #PACKAGE_VERSION#" "#PACKAGE# Manual" .SH NAME #PACKAGE#-packsounds \- script to create LIERO.SND files .SH SYNOPSIS .SY #PACKAGE# .I inputdir .I outputfile.SND .SH DESCRIPTION This script creates a LIERO.SND file from 30 sounds files. Use the .BR #PACKAGE#-extractsounds (6) script to extract them again. .SH OPTIONS .TP .I inputdir This directory must contain 30 sound files in wav format, correspondingly named .br .I SHOTGUN.wav SHOT.wav RIFLE.wav BAZOOKA.wav BLASTER.wav THROW.wav LARPA.wav EXP3A.wav EXP3B.wav EXP2.wav EXP3.wav EXP4.wav EXP5.wav DIRT.wav BUMP.wav DEATH1.wav DEATH2.wav DEATH3.wav HURT1.wav HURT2.wav HURT3.wav ALIVE.wav BEGIN.wav DROPSHEL.wav RELOADED.wav MOVEUP.wav MOVEDOWN.wav SELECT.wav BOING.wav BURNER.wav \fR. .TP .I outputfile.SND This is the resulting file. .SH AUTHORS The script and this manual page was written by Martin Erik Werner .SH "SEE ALSO" .BR #PACKAGE# (6) .br .BR #PACKAGE#-extractgfx (6) .BR #PACKAGE#-packgfx (6) .br .BR #PACKAGE#-extractsounds (6) .br .BR #PACKAGE#-extractlev (6) .BR #PACKAGE#-packlev (6) lierolibre-0.5/man/lierolibre.6.am000066400000000000000000000066041205125547100171040ustar00rootroot00000000000000.TH #UPPERCASE_PACKAGE# 6 2012-11-14 "#PACKAGE# #PACKAGE_VERSION#" "#PACKAGE# Manual" .SH NAME #PACKAGE# \- script to launch #PACKAGE# .SH SYNOPSIS .SY #PACKAGE# [\fIinputfile \fR[\fIinputdir \fR[\fIoutputfile\fR]]] .YS .SY #PACKAGE# .OP \-f\fR|\fB\-\-file inputfile .OP \-d\fR|\fB\-\-dir inputdir .OP \-w\fR|\fB\-\-write outputfile .OP \-v\fR|\fB\-\-sdlvideo videodriver .OP -h\fR|\fB\-\-help .SH DESCRIPTION #PACKAGE# is an old-school earthworm action game. It is a direct fork of Liero. .PP .IP Features: .RS .IP \[bu] 2 2 worms, 40 weapons, great playability, two game modes: Kill'em All and Game of Tag, plus AI-players without true intelligence! .IP \[bu] 2 Extensions via a hidden F1 menu: .RS .IP \[bu] 2 Replays, game controller support, powerlevel palettes .RE .IP \[bu] 2 Fullscreen, x2, x3 and x4 scaling via the F5, F6, F7 and F8 keys .RE .PP .B #PACKAGE# is a script which executes the .BR #PACKAGE# binary from the .I #LIBEXECDIR#/#PACKAGE# directory. The script defaults to using the directory .IR #PKGDATADIR# as the .I inputfile parameter. .PP If .I inputfile points to a directory (which is the default case), .B #PACKAGE# copies the file .I #CFGFILE# from this directory to .I $HOME/.#PACKAGE#/ unless it already exists in this location. .I #CFGFILE# is a plain text file which can be modified, go wild! But don't be surprised if the game crahes ;) .SH OPTIONS .TP [\fB\-f\fR|\fB\-\-file\fR] \fIinputfile Reads game variables from the given file or directory. .IP If .I inputfile points to a directory or a file with an unknown extension, and .I inputdir is not set, .br OR .br if .I inputfile points to a directory and .I inputdir is set, .br the game will try to load the .I #CFGFILE# file from .I $HOME/.#PACKAGE#/ first, otherwise it loads it from the directory of .IR inputfile . .TP [\fB\-d\fR|\fB\-\-dir\fR] \fIinputdir Reads the files .I LIERO.CHR LIERO.SND NAMES.DAT from the given directory. If not set, the game uses the directory of .I inputfile instead. .TP [\fB\-w\fR|\fB\-\-write\fR] \fIoutputfile Writes all game variables to a plain text file. .TP \fB\-v\fR|\fB\-\-sdlvideo \fIvideodriver Sets the SDL_VIDEODRIVER environment variable. .TP \fB-h\fR|\fB\-\-help Print a brief help overview. .SH EXAMPLES .B #PACKAGE# mymod/LIERO.EXE .RS 4 Reads game variables from a (potentially) modded EXE file, and reads game data from files in .IR mymod/ . .RE .B #PACKAGE# -f mymod/LIERO.EXE -d #PKGDATADIR# -w mymod_liero.cfg .RS 4 Reads game variables from a (potentially) modded EXE file and writes them to a plain text config file (and starts the game). .RE .B #PACKAGE# mymod_liero.cfg mydata .RS 4 Reads game variables from a custom plain text config file, and reads the game data from another directory. .RE .SH AUTHORS This manual page was written by Martin Erik Werner .SH HISTORY Joosa Reikkinen "Mets„nEl„imet" .br created the original Liero game and graphics. Erik Lindroos "Gliptic", with help from Mario Carbajal "basro" .br re-created Liero as OpenLiero, which later became the official version of Liero. Martin Erik Werner "arand" .br created lierolibre as a direct fork from Liero (OpenLiero). "sea" .br created the replacement sounds used in lierolibre. .SH "SEE ALSO" .BR #PACKAGE#-extractgfx (6) .BR #PACKAGE#-packgfx (6) .br .BR #PACKAGE#-extractsounds (6) .BR #PACKAGE#-packsounds (6) .br .BR #PACKAGE#-extractlev (6) .BR #PACKAGE#-packlev (6) lierolibre-0.5/scripts/000077500000000000000000000000001205125547100151775ustar00rootroot00000000000000lierolibre-0.5/scripts/cross-compile000077500000000000000000000002411205125547100177010ustar00rootroot00000000000000#!/bin/bash ./autogen.sh ./configure --enable-windows-includes --enable-windows-libraries --host=i686-w64-mingw32 --build=x86_64-unknown-linux-gnu make distdir lierolibre-0.5/scripts/lierolibre-cmd.bat000066400000000000000000000001461205125547100205610ustar00rootroot00000000000000@ECHO OFF ECHO. ECHO Available command-line options for lierolibre.exe: lierolibre.exe -h cmd /K lierolibre-0.5/scripts/lierolibre-extractgfx000077500000000000000000000060341205125547100214350ustar00rootroot00000000000000#!/bin/bash # # This script is licensed under the BSD-2-Clause license: # # -----//----- # # Copyright (c) 2012, Martin Erik Werner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # -----//----- # # This script extracts the three sprite canvases contained within LIERO.CHR, # and dumps them as greyscale images in xpm format, use the 'packgfx' script to # pack them back up again # # Credit goes to Sander de Jong for information regarding the CHR file format: # http://lierohell.free.fr/lierohack/docformats/liero-chr.html usage="Usage: $0 " if [ $# != 2 ]; then echo >&2 $usage exit 1 fi if [ ! -r "$1" ]; then echo >&2 "Unable to read file '"$1"', aborting" exit 1 fi if [ ! -d "$2" ]; then echo >&2 "'"$2"' is not a directory, aborting" exit 1 fi if [ ! -w "$2" ]; then echo >&2 "'"$2"' is not writable, aborting" exit 1 fi hash convert 2>&- || { echo >&2 "This script requires the "'"convert"'" tool from the "'"ImageMagick"'" suite, aborting"; exit 1; } inputfile="$1" outputdir="$2" headersize1=10 headersize2=4 headersize3=4 imgsize1=$((16 * 1760)) imgsize2=$((7 * 910)) imgsize3=$((4 * 120)) imgoffset1="$headersize1" imgoffset2="$(($headersize1 + $imgsize1 + $headersize2))" imgoffset3="$(($headersize1 + $imgsize1 + $headersize2 + $imgsize2 + \ $headersize3))" imgdim1=16x1760 imgdim2=7x910 imgdim3=4x120 dd if="$inputfile" bs=1 ibs=1 skip="$imgoffset1" count="$imgsize1" \ 2>/dev/null | \ convert -depth 8 -size "$imgdim1" gray:- "$outputdir"/gfx1.xpm dd if="$inputfile" bs=1 ibs=1 skip="$imgoffset2" count="$imgsize2" \ 2>/dev/null | \ convert -depth 8 -size "$imgdim2" gray:- "$outputdir"/gfx2.xpm dd if="$inputfile" bs=1 ibs=1 skip="$imgoffset3" count="$imgsize3" \ 2>/dev/null | \ convert -depth 8 -size "$imgdim3" gray:- "$outputdir"/gfx3.xpm lierolibre-0.5/scripts/lierolibre-extractlev000077500000000000000000000043251205125547100214400ustar00rootroot00000000000000#!/bin/bash # # This script is licensed under the BSD-2-Clause license: # # -----//----- # # Copyright (c) 2012, Martin Erik Werner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # -----//----- # # This script extracts the level canvas contained within a Liero .LEV file and # dumps it to a greyscale images in xpm format, use the 'packlev' script to # pack it back up again. # # Credit goes to Tim Verweij for information regarding the LEV file format: # http://lierohell.free.fr/lierohack/docformats/liero-lev.html usage="Usage: $0 " if [ $# != 2 ]; then echo >&2 $usage exit 1 fi if [ ! -r "$1" ]; then echo >&2 "Unable to read file '"$1"', aborting" exit 1 fi touch "$2" 2>&- || { echo >&2 "'"$2"' is not writable, aborting"; exit 1; } inputfile="$1" outputfile="$2" imgsize=$((504 * 350)) imgdim=504x350 dd if="$inputfile" bs=1 ibs=1 count="$imgsize" 2>/dev/null | \ convert -depth 8 -size "$imgdim" gray:- "$outputfile" lierolibre-0.5/scripts/lierolibre-extractsounds000077500000000000000000000063331205125547100221660ustar00rootroot00000000000000#!/bin/bash # # This script is licensed under the BSD-2-Clause license: # # -----//----- # # Copyright (c) 2012, Martin Erik Werner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # -----//----- # # This script extracts individual sound files from the LIERO.SND binary blob # and dumps them as wav files, use the 'packsounds' script to pack them back # up again. # # Credit goes to Tim Verweij for information regarding the SND file format: # http://lierohell.free.fr/lierohack/docformats/liero-snd.html usage="Usage: $0 " if [ $# != 2 ]; then echo >&2 $usage exit 1 fi if [ ! -r "$1" ]; then echo >&2 "Unable to read file '"$1"', aborting" exit 1 fi if [ ! -d "$2" ]; then echo >&2 "'"$2"' is not a directory, aborting" exit 1 fi if [ ! -w "$2" ]; then echo >&2 "'"$2"' is not writable, aborting" exit 1 fi hash sox 2>&- || { echo >&2 "This script requires the "'"SoX"'" audio manipulator, aborting"; exit 1; } sndfile="$1" outputdir="$2" sounds=30 headersize=2 entrysize=16 nameoffset=0 namesize=8 offsetoffset=8 offsetsize=4 sizeoffset=12 sizesize=4 # Input file: # header # NAME|offset|size # NAME|offset|size # NAME|offset|size # Raw PCM sound data (signed 8bit, 22050 Hz, mono)... # For more info, look at # echo "$(dd if=$sndfile ibs=1 skip=2 | xxd -g 4 | head -30)" # For each entry for i in $(seq 0 $(($sounds - 1))); do name="$(dd if=$sndfile ibs=1 \ skip=$(($i * $entrysize + $(($headersize + $nameoffset)))) \ count=$namesize 2>/dev/null | tr -d ' ')" offset="$((0x$(dd if=$sndfile ibs=1 \ skip=$(($i * $entrysize + $(($headersize + $offsetoffset)))) \ count=$offsetsize 2>/dev/null | od -A n -t x4 | tr -d ' ')))" size="$((0x$(dd if=$sndfile ibs=1 \ skip=$(($i * $entrysize + $(($headersize + $sizeoffset)))) \ count=$sizesize 2>/dev/null | od -A n -t x4 | tr -d ' ')))" dd if=$sndfile ibs=1 skip=$offset count=$size 2>/dev/null | \ sox -t raw -b 8 -e signed-integer -r 22050 -B -c 1 - -t wav "$outputdir"/"$name".wav done lierolibre-0.5/scripts/lierolibre-packgfx000077500000000000000000000076531205125547100207110ustar00rootroot00000000000000#!/bin/bash # # This script is licensed under the BSD-2-Clause license: # # -----//----- # # Copyright (c) 2012, Martin Erik Werner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # -----//----- # # This script reads a set of three greyscale xpm images with dimensions # 16x1760, 7x910, 4x120 and packs them into a CHR-file for Liero. # # Credit goes to Sander de Jong for information regarding the CHR file format: # http://lierohell.free.fr/lierohack/docformats/liero-chr.html usage="Usage: $0 " if [ $# != 4 ]; then echo >&2 $usage exit 1 fi for i in "$1" "$2" "$3"; do if [ ! -r "$i" ]; then echo >&2 "Unable to read file '"$i"', aborting" exit 1 fi done touch "$4" 2>&- || { echo >&2 "'"$4"' is not writable, aborting"; exit 1; } hash convert 2>&- || { echo >&2 "This script requires the "'"convert"'" tool from the "'"ImageMagick"'" suite, aborting"; exit 1; } inputfile1="$1" inputfile2="$2" inputfile3="$3" outputfile="$4" title="Liero" titlesize=6 img1_x=16 img1_y_factor1=16 img1_y_factor2=110 img1_y=$(($img1_y_factor1 * $img1_y_factor2)) img1_size=$(($img1_x *$img1_y)) img1_header="2 $img1_x $img1_y_factor1 $img1_y_factor2" img2_x=7 img2_y_factor1=7 img2_y_factor2=130 img2_y=$(($img2_y_factor1 * $img2_y_factor2)) img2_size=$(($img2_x *$img2_y)) img2_header="2 $img2_x $img2_y_factor1 $img2_y_factor2" img3_x=4 img3_y_factor1=4 img3_y_factor2=30 img3_y=$(($img3_y_factor1 * $img3_y_factor2)) img3_size=$(($img3_x *$img3_y)) img3_header="2 $img3_x $img3_y_factor1 $img3_y_factor2" function pad { # Write $1 NULL bytes to file pad="$1" p=0 until [ $p = $pad ]; do printf "\x00" >> $outputfile p=$(expr $p + 1) done } function writedec { # write decimal number $1 to file, and pad to $2 bytes dec="$1" decsize="$2" hex="$(printf '%x\n' $1)" d=0 for h in $(echo "$hex" | rev | fold -b2 | rev); do printf "\x$h" >> $outputfile export d=$(expr $d + 1) done if [ $decsize ]; then pad $(($decsize - $d)) fi } function writestring () { # Write string $1 to file, padding to $2 bytes name="$1" stringsize="$2" s=0 for c in $(echo $name | fold -b1); do dec=$(printf "%d\n" \'$c) writedec $dec export s=$(expr $s + 1) done if [ $stringsize ]; then pad $(($stringsize - $s)) fi } # Main echo -n "" > "$outputfile" writestring "$title" "$titlesize" for i in $img1_header; do writedec "$i" done convert "$inputfile1" -set colorspace Gray -depth 8 gray:- >> "$outputfile" for i in $img2_header; do writedec "$i" done convert "$inputfile2" -set colorspace Gray -depth 8 gray:- >> "$outputfile" for i in $img3_header; do writedec "$i" done convert "$inputfile3" -set colorspace Gray -depth 8 gray:- >> "$outputfile" lierolibre-0.5/scripts/lierolibre-packlev000077500000000000000000000042521205125547100207030ustar00rootroot00000000000000#!/bin/bash # # This script is licensed under the BSD-2-Clause license: # # -----//----- # # Copyright (c) 2012, Martin Erik Werner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # -----//----- # # This script takes a 504x350 greyscale xpm file and packs it into a Liero # .LEV file # # Credit goes to Tim Verweij for information regarding the LEV file format: # http://lierohell.free.fr/lierohack/docformats/liero-lev.html usage="Usage: $0 " if [ $# != 2 ]; then echo >&2 $usage exit 1 fi if [ ! -r "$1" ]; then echo >&2 "Unable to read file '"$1"', aborting" exit 1 fi touch "$2" 2>&- || { echo >&2 "'"$2"' is not writable, aborting"; exit 1; } hash convert 2>&- || { echo >&2 "This script requires the "'"convert"'" tool from the "'"ImageMagick"'" suite, aborting"; exit 1; } inputfile="$1" outputfile="$2" convert "$inputfile" -set colorspace Gray -depth 8 gray:- > "$outputfile" lierolibre-0.5/scripts/lierolibre-packsounds000077500000000000000000000107051205125547100214300ustar00rootroot00000000000000#!/bin/bash # # This script is licensed under the BSD-2-Clause license: # # -----//----- # # Copyright (c) 2012, Martin Erik Werner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # -----//----- # # This script reads a set of 30 name-defined wav files from a given directory # and packs them into a SND-file for LIERO, files must be named correctly # ("NAME.wav") but may differ in content from the originals. # # Credit goes to Tim Verweij for information regarding the SND file format: # http://lierohell.free.fr/lierohack/docformats/liero-snd.html usage="Usage: $0 " if [ $# != 2 ]; then echo >&2 $usage exit 1 fi if [ ! -d "$1" ]; then echo >&2 "'"$1"' is not a directory, aborting" exit 1 fi if [ ! -r "$1" ]; then echo >&2 "'"$1"' is not readable, aborting" exit 1 fi touch "$2" 2>&- || { echo >&2 "Unable to write to file '"$1"', aborting"; exit 1; } hash sox 2>&- || { echo >&2 "This script requires the "'"SoX"'" audio manipulator, aborting"; exit 1; } inputdir="$1" outputfile="$2" names="SHOTGUN SHOT RIFLE BAZOOKA BLASTER THROW LARPA EXP3A EXP3B EXP2 EXP3 EXP4 EXP5 DIRT BUMP DEATH1 DEATH2 DEATH3 HURT1 HURT2 HURT3 ALIVE BEGIN DROPSHEL RELOADED MOVEUP MOVEDOWN SELECT BOING BURNER" LANG=C # relying on english output from dd for i in $names; do if [ ! -r "$inputdir"/"$i".wav ]; then echo >&2 "'"$inputdir"/"$i".wav' is not readable or nonexistant, aborting" exit 1 fi done sounds=30 headersize=2 nameoffset=0 namesize=8 offsetoffset=$namesize offsetsize=4 sizeoffset=$(($namesize + offsetsize)) sizesize=4 entrysize=$(($namesize + $offsetsize + $sizesize)) indexsize=$(($headersize + $sounds * $entrysize)) # Output file: # header # NAME|offset|size # NAME|offset|size # NAME|offset|size # Raw PCM sound data (signed 8bit, 22050 Hz, mono)... function pad { # Write $1 NULL bytes to file pad="$1" p=0 until [ $p = $pad ]; do printf "\x00" >> $outputfile p=$(expr $p + 1) done } function writedec { # write decimal number $1 to file, and pad to $2 bytes dec="$1" decsize="$2" hex="$(printf '%x\n' $1)" d=0 for h in $(echo "$hex" | rev | fold -b2 | rev); do printf "\x$h" >> $outputfile export d=$(expr $d + 1) done if [ $decsize ]; then pad $(($decsize - $d)) fi } function writeheader { writedec $sounds $headersize } function writestring () { # Write string $1 to file, padding to $2 bytes name="$1" stringsize="$2" s=0 for c in $(echo $name | fold -b1); do dec=$(printf "%d\n" \'$c) writedec $dec export s=$(expr $s + 1) done if [ $stringsize ]; then pad $(($stringsize - $s)) fi } # Main echo -n "" > $outputfile writeheader dataoffset="$indexsize" datasize=0 # Index i=0 for n in $names; do name="$n" file="$inputdir"/"$n".wav entryoffset="$(($headersize + $i * $entrysize))" dataoffset="$(($dataoffset + datasize))" datasize="$(sox -t wav "$file" \ -t raw -b 8 -e signed-integer -r 22050 -B -c 1 - | \ dd 2>&1 >/dev/stdout | sed -n 's/\([0-9]*\)\ bytes\ .*/\1/p')" writestring $name $namesize writedec $dataoffset $offsetsize writedec $datasize $sizesize i=$(expr $i + 1) done # Raw data for n in $names; do file="$inputdir"/"$n".wav sox -t wav "$file" -t raw -b 8 -e signed-integer -r 22050 -B -c 1 - \ >> $outputfile done lierolibre-0.5/scripts/lierolibre.am000066400000000000000000000007551205125547100176550ustar00rootroot00000000000000#!/bin/sh defaultpath="#PKGDATADIR#" manualpath="false" # We want to catch the no-inputfile-path case, and pass on everything else # inputfile can be given via -f, --file, --file= or positional arg1 for arg in "$@"; do case "$arg" in -f|--file|--file=*) manualpath="true" ;; -*) ;; ?*) manualpath="true" ;; esac done if [ "x$manualpath" = xtrue ]; then exec #LIBEXECDIR#/#PACKAGE#/#PACKAGE# "$@" else exec #LIBEXECDIR#/#PACKAGE#/#PACKAGE# "$defaultpath" "$@" fi lierolibre-0.5/src/000077500000000000000000000000001205125547100142775ustar00rootroot00000000000000lierolibre-0.5/src/Jamfile000066400000000000000000000022611205125547100155720ustar00rootroot00000000000000SubDir TOP ; C++FLAGS = -Wall -I$(TOP) -I/usr/include -DNDEBUG -g ; CFLAGS = -Wall -I$(TOP) -I/usr/include -DNDEBUG -g ; OPTIM = -O3 ; LINK = "g++" ; LINKLIBS on lierolibre$(SUFEXE) = -lSDL -lSDL_mixer -lrt -lconfig++ -lboost_program_options ; Main lierolibre : bobject.cpp bonus.cpp common.cpp console.cpp constants.cpp filesystem.cpp game.cpp gfx.cpp keys.cpp level.cpp main.cpp math.cpp ninjarope.cpp nobject.cpp rand.cpp reader.cpp sdlmain.cpp replay.cpp settings.cpp sfx.cpp sobject.cpp sys.cpp text.cpp viewport.cpp weapon.cpp weapsel.cpp worm.cpp dataPath.cpp binReader.cpp to_string.cpp configCompat.cpp configHelper.cpp configInit.cpp argParse.cpp controller/commonController.cpp controller/localController.cpp controller/replayController.cpp gfx/blit.cpp gfx/font.cpp gfx/palette.cpp gfx/sprite.cpp menu/booleanSwitchBehavior.cpp menu/enumBehavior.cpp menu/hiddenMenu.cpp menu/integerBehavior.cpp menu/itemBehavior.cpp menu/menu.cpp menu/menuItem.cpp menu/timeBehavior.cpp ; File config.h : dummy_config.h ; LOCATE on config.h = $(LOCATE_SOURCE) ; MakeLocate lierolibre$(SUFEXE) : $(TOP)/_bin ; LinkLibraries lierolibre : libgvl ; SubInclude TOP gvl ; lierolibre-0.5/src/argParse.cpp000066400000000000000000000044131205125547100165510ustar00rootroot00000000000000/* * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "argParse.hpp" #include using namespace std; namespace po = boost::program_options; ArgParse::ArgParse(int argc, char* argv[]) { // Declare the supported options. desc.add_options() ("file,f", po::value(), "read game variables from file or directory") ("dir,d", po::value(), "load game data from separate directory") ("write,w", po::value(), "write game variables to file") ("sdlvideo,v", po::value(), "set the SDL_VIDEODRIVER environment variable") ("help,h", "print this help message") ; // First positional option is input file // second is data dir, third is output file po::positional_options_description p; p.add("file", 1).add("dir", 1).add("write", 1); // Export to "vm" po::store(po::command_line_parser(argc, argv) .options(desc).positional(p).run(), vm); po::notify(vm); } lierolibre-0.5/src/argParse.hpp000066400000000000000000000033341205125547100165570ustar00rootroot00000000000000/* * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef ARG_PARSE_HPP #define ARG_PARSE_HPP #include #include "config.h" // Sets Dynamic boost linking class ArgParse { public: ArgParse(int argc, char* argv[]); boost::program_options::variables_map vm; boost::program_options::options_description desc; }; #endif // ARG_PARSE_HPP lierolibre-0.5/src/binReader.cpp000066400000000000000000000071261205125547100167040ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // Compile via: g++ -c -lSDL binReader.cpp #include // Needed for cross-platform *int32 definitions #include #include "binReader.hpp" using namespace std; void checkedFread(void* ptr, size_t size, size_t count, FILE* f) { if(fread(ptr, size, count, f) != count) throw runtime_error("fread failed to read fully"); } string readPascalString(FILE* f) { unsigned char length; checkedFread(&length, 1, 1, f); char txt[256]; checkedFread(txt, 1, length, f); return string(txt, length); } string readPascalString(FILE* f, unsigned char fieldLen) { char txt[256]; checkedFread(txt, 1, fieldLen, f); unsigned char length = static_cast(txt[0]); return string(txt + 1, length); } void writePascalString(FILE* f, string const& str, unsigned char fieldLen) { int len = int(str.size() < fieldLen ? str.size() : fieldLen - 1); size_t zeroes = fieldLen - 1 - len; fputc(len, f); fwrite(str.data(), 1, len, f); for(size_t i = 0; i < zeroes; ++i) fputc(0, f); } string readPascalStringAt(FILE* f, int location) { unsigned char length; fseek(f, location, SEEK_SET); checkedFread(&length, 1, 1, f); char txt[256]; checkedFread(txt, 1, length, f); return string(txt, length); } Uint32 readUint8(FILE* f) { unsigned char temp[1]; checkedFread(temp, 1, 1, f); return temp[0]; } void writeUint8(FILE* f, Uint32 v) { fputc(v & 0xff, f); } Sint32 readSint8(FILE* f) { char temp[1]; checkedFread(temp, 1, 1, f); return temp[0]; } Uint32 readUint16(FILE* f) { unsigned char temp[2]; checkedFread(temp, 1, 2, f); return temp[0] + (temp[1] << 8); } void writeUint16(FILE* f, Uint32 v) { fputc(v & 0xff, f); fputc((v >> 8) & 0xff, f); } Sint32 readSint16(FILE* f) { unsigned char temp[2]; checkedFread(temp, 1, 2, f); return temp[0] + (static_cast(temp[1]) << 8); } Uint32 readUint32(FILE* f) { unsigned char temp[4]; checkedFread(temp, 1, 4, f); return temp[0] + (temp[1] << 8) + (temp[2] << 16) + (temp[3] << 24); } Sint32 readSint32(FILE* f) { unsigned char temp[4]; checkedFread(temp, 1, 4, f); return temp[0] + (temp[1] << 8) + (temp[2] << 16) + (static_cast(temp[3]) << 24); } lierolibre-0.5/src/binReader.hpp000066400000000000000000000041621205125547100167060ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef VAR_READER_HPP #define VAR_READER_HPP #include #include void checkedFread(void* ptr, size_t size, size_t count, FILE* f); std::string readPascalString(FILE* f); std::string readPascalString(FILE* f, unsigned char fieldLen); std::string readPascalStringAt(FILE* f, int location); void writePascalString(FILE* f, std::string const& str, unsigned char fieldLen); Uint32 readUint8(FILE* f); Sint32 readSint8(FILE* f); Uint32 readUint16(FILE* f); Sint32 readSint16(FILE* f); Uint32 readUint32(FILE* f); Sint32 readSint32(FILE* f); void writeUint8(FILE* f, Uint32 v); void writeUint16(FILE* f, Uint32 v); #endif //VAR_READER_HPP lierolibre-0.5/src/bobject.cpp000066400000000000000000000050401205125547100164120ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "bobject.hpp" #include "gfx/color.hpp" #include "game.hpp" #include "constants.hpp" void Game::createBObject(fixed x, fixed y, fixed velX, fixed velY) { BObject& obj = *bobjects.newObjectReuse(); obj.color = rand(common->C[NumBloodColours]) + common->C[FirstBloodColour]; obj.x = x; obj.y = y; obj.velX = velX; obj.velY = velY; } bool BObject::process(Game& game) { Common& common = *game.common; x += velX; y += velY; int ix = ftoi(x); int iy = ftoi(y); if(!game.level.inside(ix, iy)) { return false; } else { PalIdx c = game.level.pixel(ix, iy); Material m = common.materials[c]; if(m.background()) velY += common.C[BObjGravity]; if((c >= 1 && c <= 2) || (c >= 77 && c <= 79)) // TODO: Read from EXE { game.level.pixel(ix, iy) = 77 + game.rand(3); return false; } /* This can't happen! else if(iy >= game.level.height) { // Nothing }*/ else if(m.anyDirt()) { game.level.pixel(ix, iy) = 82 + game.rand(3); return false; } else if(m.rock()) { game.level.pixel(ix, iy) = 85 + game.rand(3); return false; } } return true; } lierolibre-0.5/src/bobject.hpp000066400000000000000000000034731205125547100164270ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_BOBJECT_HPP #define LIERO_BOBJECT_HPP #include "math.hpp" #include "objectList.hpp" //#include "exactObjectList.hpp" #include "fastObjectList.hpp" struct Game; struct BObject // : ExactObjectListBase { bool process(Game& game); fixed x, y; fixed velX, velY; int color; }; //void createBObject(fixed x, fixed y, fixed velX, fixed velY); #endif // LIERO_BOBJECT_HPP lierolibre-0.5/src/bonus.cpp000066400000000000000000000043161205125547100161350ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "bonus.hpp" #include "game.hpp" #include "constants.hpp" #include #include void Bonus::process(Game& game) { Common& common = *game.common; y += velY; int ix = ftoi(x), iy = ftoi(y); if(game.level.inside(ix, iy + 1) && common.materials[game.level.pixel(ix, iy + 1)].background()) { velY += common.C[BonusGravity]; } int inewY = ftoi(y + velY); if(inewY < 0 || inewY >= game.level.height - 1 || common.materials[game.level.pixel(ix, inewY)].dirtRock()) { velY = -(velY * common.C[BonusBounceMul]) / common.C[BonusBounceDiv]; if(std::abs(velY) < 100) // TODO: Read from EXE velY = 0; } if(--timer <= 0) { common.sobjectTypes[common.bonusSObjects[frame]].create(game, ix, iy, 0); if(used) game.bonuses.free(this); } } lierolibre-0.5/src/bonus.hpp000066400000000000000000000034061205125547100161410ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_BONUS_HPP #define LIERO_BONUS_HPP #include "math.hpp" #include "objectList.hpp" #include "exactObjectList.hpp" struct Game; struct Bonus : ExactObjectListBase { Bonus() : frame(-1) { } fixed x; fixed y; fixed velY; int frame; int timer; int weapon; void process(Game& game); }; #endif // LIERO_BONUS_HPP lierolibre-0.5/src/boostTesting.cpp000066400000000000000000000261751205125547100175020ustar00rootroot00000000000000// Compile & run with: // ~$ g++ -lboost_unit_test_framework -lboost_system -lboost_filesystem dataPath.o filesystem.o -oboosttest boostTesting.cpp && ./boosttest --loglevel=test_suite /* * These are unit tests for dataPath. * * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE DataPath #include #include #include #include #include #include #include #include "dataPath.hpp" using namespace boost::filesystem; using namespace std; string correct_message; bool test_exception_message(exception const& ex) { return ex.what() == correct_message; } struct DirectorySetup { string template_string; char c_temp_homedir[FILENAME_MAX]; char c_temp_readonlydir[FILENAME_MAX]; string temp_homedir; string temp_readonlydir; string temp_configdir; string original_home; map file_access_map; map::iterator file_access_pair; vector names_rw; fstream file; string filepath; DirectorySetup() { // cout << "begin DirectorySetup" << endl; file_access_map.insert(pair("LIERO.EXE", false)); file_access_map.insert(pair("LIERO.CHR", false)); file_access_map.insert(pair("LIERO.SND", false)); file_access_map.insert(pair("NAMES.DAT", false)); file_access_map.insert(pair("LIERO.OPT", true)); file_access_map.insert(pair("LIERO.DAT", true)); file_access_map.insert(pair("liero.cfg", true)); file_access_map.insert(pair("lierocfg.txt", true)); names_rw.push_back("LIERO.DAT"); names_rw.push_back("liero.cfg"); names_rw.push_back("lierocfg.txt"); template_string = "/tmp/liero_tmp_XXXXXX"; strcpy(c_temp_homedir, template_string.c_str()); strcpy(c_temp_readonlydir, template_string.c_str()); temp_homedir = mkdtemp(c_temp_homedir); temp_readonlydir = mkdtemp(c_temp_readonlydir); original_home = getenv("HOME"); setenv("HOME", temp_homedir.c_str(), 1); } ~DirectorySetup() { // cout << "teardown DirectorySetup" << endl; setenv("HOME", original_home.c_str(), 1); remove_all(temp_homedir); remove_all(temp_readonlydir); } }; struct ConfigdirSetup : DirectorySetup { ConfigdirSetup() { temp_configdir = temp_homedir + '/' + ".lierolibre"; create_directory(temp_configdir); } }; struct FilesInReadonlySetup : virtual ConfigdirSetup { FilesInReadonlySetup() { // cout << "begin FilesInReadonlySetup" << endl; // create all files with content "readonly FILENAME" for (file_access_pair = file_access_map.begin(); file_access_pair != file_access_map.end(); file_access_pair++) { filepath = temp_readonlydir + '/' + file_access_pair->first; file.open(filepath.c_str(), ios::out); if (file.is_open()) { file << "readonly " << file_access_pair->first << endl; file.close(); } else { cout << "Can't write to file: " << file << endl; } } } ~FilesInReadonlySetup() { // cout << "teardown FilesInReadonlySetup" << endl; } }; struct FilesInWritableSetup : virtual ConfigdirSetup { FilesInWritableSetup() { // cout << "begin FilesInWritableSetup" << endl; // create all writable files with content "writable FILENAME" for (file_access_pair = file_access_map.begin(); file_access_pair != file_access_map.end(); file_access_pair++) { if (file_access_pair->second) { // file should be writable filepath = temp_configdir + '/' + file_access_pair->first; file.open(filepath.c_str(), ios::out); if(file.is_open()) { file << "writable " << file_access_pair->first << endl; file.close(); } else { cout << "Can't write to file: " << file << endl; } } } } ~FilesInWritableSetup() { // cout << "teardown FilesInWritableSetup" << endl; } }; struct AllFilesSetup : FilesInWritableSetup, FilesInReadonlySetup { AllFilesSetup() { // cout << "begin AllFilesSetup" << endl; } ~AllFilesSetup() { // cout << "teardown AllFilesSetup" << endl; } }; BOOST_FIXTURE_TEST_CASE(configdir_exists__Path, ConfigdirSetup) { DataPath data_path(temp_readonlydir); BOOST_CHECK_EQUAL(data_path.configdir(), temp_configdir); } BOOST_FIXTURE_TEST_CASE(configdir_exists__CreateFile, ConfigdirSetup) { string configfile_path; fstream configfile; DataPath data_path(temp_readonlydir); configfile_path = data_path.configdir() + '/' + "W"; configfile.open(configfile_path.c_str(), ios::out); BOOST_CHECK(configfile.is_open()); } BOOST_FIXTURE_TEST_CASE(configdir_no_exists__CreateFile, DirectorySetup) { string configfile_path; fstream configfile; DataPath data_path(temp_readonlydir); configfile_path = data_path.configdir() + '/' + "W"; configfile.open(configfile_path.c_str(), ios::out); BOOST_CHECK(configfile.is_open()); } BOOST_FIXTURE_TEST_CASE(lieroexe_no_exists__Error, ConfigdirSetup) { DataPath data_path(temp_readonlydir); correct_message = "Could not open file '" + temp_readonlydir + '/' + "LIERO.EXE" + "'"; BOOST_CHECK_EXCEPTION(throw data_path.file("LIERO.EXE"), runtime_error, test_exception_message); } BOOST_FIXTURE_TEST_CASE(lieroexe_ro_exists__Path_Nocopy, FilesInReadonlySetup) { string lieroexe_path; string lieroexe_wrong_path; fstream lieroexe_wrong; DataPath data_path(temp_readonlydir); // test returned path lieroexe_path = temp_readonlydir + '/' + "LIERO.EXE"; BOOST_CHECK_EQUAL(data_path.file("LIERO.EXE"), lieroexe_path); // make sure it wasn't copied to configdir lieroexe_wrong_path = temp_configdir + '/' + "LIERO.EXE"; lieroexe_wrong.open(lieroexe_wrong_path.c_str(), ios::out|ios::in); BOOST_CHECK(!lieroexe_wrong.is_open()); } BOOST_FIXTURE_TEST_CASE(liero_rwfile_no_exists__Error, ConfigdirSetup) { DataPath data_path(temp_readonlydir); for (int i = 0; i < names_rw.size(); ++i ) { correct_message = "Could not open file '" + temp_configdir + '/' + names_rw.at(i) + "'"; BOOST_CHECK_EXCEPTION(throw data_path.file(names_rw.at(i)), runtime_error, test_exception_message); } } BOOST_FIXTURE_TEST_CASE(liero_rwfile_ro_exists__Path_Writable_Contents, FilesInReadonlySetup) { for (int i = 0; i < names_rw.size(); ++i ) { string path_ro; string path_rw; fstream f_rw; fstream f_ro; stringstream buf_ro; stringstream buf_rw; // save readonly contents to buffer path_ro = temp_readonlydir + '/' + names_rw.at(i); f_ro.open(path_ro.c_str(), ios::in); if (f_ro.is_open()) { buf_ro << f_ro.rdbuf(); f_ro.close(); } else { cout << "Can't read readonly '" + names_rw.at(i) + "'" << endl; } DataPath data_path(temp_readonlydir); // test returned path path_rw = temp_configdir + '/' + names_rw.at(i); BOOST_CHECK_EQUAL(data_path.file(names_rw.at(i)), path_rw); // test if file is rw f_rw.open(path_rw.c_str(), ios::out|ios::in); BOOST_CHECK(f_rw.is_open()); if (f_rw.is_open()) { buf_rw << f_rw.rdbuf(); // convert both buffers to strings and compare BOOST_CHECK_EQUAL(buf_ro.str(), buf_rw.str()); f_rw.close(); } else { BOOST_ERROR("Cant open rw after copying"); } } } BOOST_FIXTURE_TEST_CASE(liero_rwfile_exists__Path, FilesInWritableSetup) { DataPath data_path(temp_readonlydir); for (int i = 0; i < names_rw.size(); ++i ) { string path; fstream f; // test returned path and if file is rw path = temp_configdir + '/' + names_rw.at(i); BOOST_CHECK_EQUAL(data_path.file(names_rw.at(i)), path); f.open(path.c_str(), ios::out|ios::in); BOOST_CHECK(f.is_open()); } } BOOST_FIXTURE_TEST_CASE(all_exists__NoOverwrite, AllFilesSetup) { for (int i = 0; i < names_rw.size(); ++i ) { string path_ro; string path_rw; fstream f_rw; fstream f_ro; stringstream buf_ro; stringstream buf_rw; stringstream buf; string orig_content_ro; string orig_content_rw; // save readonly file content path_ro = temp_readonlydir + '/' + names_rw.at(i); f_ro.open(path_ro.c_str(), ios::in); if (f_ro.is_open()) { buf << f_ro.rdbuf(); f_ro.close(); orig_content_ro = buf.str(); // clear buffer buf.str(""); } else { cout << "Can't read readonly '" + names_rw.at(i) + "'" << endl; } // save writable file content path_rw = temp_configdir + '/' + names_rw.at(i); f_rw.open(path_rw.c_str(), ios::in); if(f_rw.is_open()) { buf << f_rw.rdbuf(); f_rw.close(); orig_content_rw = buf.str(); // clear buffer buf.str(""); } else { cout << "Can't read writable '" + names_rw.at(i) + "'" << endl; } DataPath data_path(temp_readonlydir); data_path.file(names_rw.at(i)); f_ro.open(path_ro.c_str(), ios::in); if (f_ro.is_open()) { buf << f_ro.rdbuf(); f_ro.close(); // check that file is unchanged BOOST_CHECK_EQUAL(orig_content_ro, buf.str()); // clear buffer buf.str(""); } else { cout << "Can't read readonly '" + names_rw.at(i) + "'" << endl; } f_rw.open(path_rw.c_str(), ios::in); if (f_rw.is_open()) { buf << f_rw.rdbuf(); f_rw.close(); // check that file is unchanged BOOST_CHECK_EQUAL(orig_content_rw, buf.str()); // clear buffer buf.str(""); } else { cout << "Can't read writable '" + names_rw.at(i) + "'" << endl; } } } BOOST_FIXTURE_TEST_CASE(all_exists__IncompleteFilename, AllFilesSetup) { DataPath data_path(temp_readonlydir); correct_message = "Unknown file 'LIE'"; BOOST_CHECK_EXCEPTION(throw data_path.file("LIE"), runtime_error, test_exception_message); } BOOST_FIXTURE_TEST_CASE(all_exists__AnyDatPath_AnyDatRw, AllFilesSetup) { string meepdat_path; fstream meepdat; DataPath data_path(temp_readonlydir); // test returned path and if file is rw meepdat_path = temp_configdir + '/' + "MEEP.DAT"; BOOST_CHECK_EQUAL(data_path.file("MEEP.DAT"), meepdat_path); meepdat.open(meepdat_path.c_str(), ios::out); BOOST_CHECK(meepdat.is_open()); } lierolibre-0.5/src/build-aux/000077500000000000000000000000001205125547100161715ustar00rootroot00000000000000lierolibre-0.5/src/build-aux/compile000077500000000000000000000161521205125547100175540ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-03-05.13; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free # Software Foundation, Inc. # Written by Tom Tromey . # # 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: lierolibre-0.5/src/build-aux/config.guess000077500000000000000000001274321205125547100205220ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # 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, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-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*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-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 -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx 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: lierolibre-0.5/src/build-aux/config.sub000077500000000000000000001053271205125547100201640ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-04-18' # 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, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -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 \ | aarch64 | aarch64_be \ | 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 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | 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-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: lierolibre-0.5/src/build-aux/depcomp000077500000000000000000000506431205125547100175560ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011, 2012 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, see . # 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 outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # A tabulation character. tab=' ' # A newline character. nl=' ' 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 cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. gccflag=-qmakedep=gcc,-MF depmode=gcc 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 ' ' "$nl" < "$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. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## 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 "s|.*$object$||" -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 ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$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" ;; xlc) # 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 ;; 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. 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.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$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 anf tcc (Tiny C Compiler) understand '-MD -MF file'. # However on # $CC -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 ... \ # ... # tcc 0.9.26 (FIXME still under development at the moment of writing) # will emit a similar output, but also prepend the continuation lines # with horizontal tabulation characters. "$@" -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 -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ < "$tmpdepfile" > "$depfile" sed ' s/[ '"$tab"'][ '"$tab"']*/ /g s/^ *// s/ *\\*$// s/^[^:]*: *// /^$/d /:$/d s/$/ :/ ' < "$tmpdepfile" >> "$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" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # 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 ;; #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 "X$1" != 'X--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:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' "$nl" < "$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 "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi 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. -arch) eat=yes ;; -*|$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" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## 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 "X$1" != 'X--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. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # 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 ;; 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: lierolibre-0.5/src/build-aux/install-sh000077500000000000000000000332561205125547100202060ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: lierolibre-0.5/src/build-aux/ltmain.sh000066400000000000000000010520261205125547100200170ustar00rootroot00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1.1" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # 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" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # 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= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_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 $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append 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 -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append 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. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # 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 func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append 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. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$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 use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$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 func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac 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 func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append 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:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append 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 [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append 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" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append 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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; 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 " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) 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 ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_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 func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 func_append 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append 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 func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 lierolibre-0.5/src/build-aux/missing000077500000000000000000000241521205125547100175740ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 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, see . # 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 yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. 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 # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # 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). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) 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 $program 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 $? 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 ;; *) 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: lierolibre-0.5/src/common.cpp000066400000000000000000001150361205125547100163010ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "common.hpp" #include #include "reader.hpp" #include "rand.hpp" #include "gfx.hpp" #include "to_string.hpp" #include "configHelper.hpp" int Common::fireConeOffset[2][7][2] = { {{-3, 1}, {-4, 0}, {-4, -2}, {-4, -4}, {-3, -5}, {-2, -6}, {0, -6}}, {{3, 1}, {4, 0}, {4, -2}, {4, -4}, {3, -5}, {2, -6}, {0, -6}}, }; int stoneTab[3][4] = { {98, 60, 61, 62}, {63, 75, 85, 86}, {89, 90, 97, 96} }; int Common::readCFGVersion(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); int version; if (cfg.lookupValue("Version", version)) return version; else return 0; // const libconfig::Setting &sversion = cfg.lookup("version"); }; void Common::writeCFGVersion(std::string cfgFilePath, int version) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); cfgHelp.putVersion(root, version); cfg.writeFile(cfgFilePath.c_str()); }; void Texts::loadFromEXE() { FILE* exe = openLieroEXE(); random = readPascalStringAt(exe, 0xD6E3); random2 = readPascalStringAt(exe, 0xD413); regenLevel = readPascalStringAt(exe, 0xD41A); reloadLevel = readPascalStringAt(exe, 0xD42D); copyright1 = readPascalStringAt(exe, 0xFB60); // Get rid of NULL + 2 garbage bytes... copyright1.erase(0, 3); copyright2 = readPascalStringAt(exe, 0xE693); saveoptions = readPascalStringAt(exe, 0xE6BB); loadoptions = readPascalStringAt(exe, 0xE6CC); curOptNoFile = readPascalStringAt(exe, 0xE6DD); curOpt = readPascalStringAt(exe, 0xE6FA); fseek(exe, 0x1B2BA, SEEK_SET); for(int i = 0; i < 4; ++i) { gameModes[i] = readPascalString(exe, 17); } gameModeSpec[0] = readPascalStringAt(exe, 0xD3EC); gameModeSpec[1] = readPascalStringAt(exe, 0xD3F2); gameModeSpec[2] = readPascalStringAt(exe, 0xD3FF); onoff[0] = readPascalStringAt(exe, 0x1AE84); onoff[1] = readPascalStringAt(exe, 0x1AE88); controllers[0] = readPascalStringAt(exe, 0x1B204); controllers[1] = readPascalStringAt(exe, 0x1B20A); fseek(exe, 0x1B2FE, SEEK_SET); for(int i = 0; i < 3; ++i) { weapStates[i] = readPascalString(exe, 13); } fseek(exe, 0x209A6, SEEK_SET); for(int i = 1; i < 177; ++i) // First key starts at 1 { keyNames[i] = readPascalString(exe, 13); } selWeap = readPascalStringAt(exe, 0xA9C0); levelRandom = readPascalStringAt(exe, 0xA9D5); levelIs1 = readPascalStringAt(exe, 0xA9E3); levelIs2 = readPascalStringAt(exe, 0xA9EC); randomize = readPascalStringAt(exe, 0xA9F4); done = readPascalStringAt(exe, 0xA9EE); reloading = readPascalStringAt(exe, 0x7583); pressFire = readPascalStringAt(exe, 0x7590); kills = readPascalStringAt(exe, 0x75A4); lives = readPascalStringAt(exe, 0x75AC); selLevel = readPascalStringAt(exe, 0xD6F2); weapon = readPascalStringAt(exe, 0xD700); availability = readPascalStringAt(exe, 0xD707); noWeaps = readPascalStringAt(exe, 0xD714); fseek(exe, 0xFC5B, SEEK_SET); copyrightBarFormat = readUint8(exe); } void Texts::loadFromCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &texts = cfg.lookup("Texts"); random = (char const*)texts["random"]; random2 = (char const*)texts["random2"]; regenLevel = (char const*)texts["regenLevel"]; reloadLevel = (char const*)texts["reloadLevel"]; copyright1 = (char const*)texts["copyright1"]; copyright2 = (char const*)texts["copyright2"]; saveoptions = (char const*)texts["saveoptions"]; loadoptions = (char const*)texts["loadoptions"]; curOptNoFile = (char const*)texts["curOptNoFile"]; curOpt = (char const*)texts["curOpt"]; const libconfig::Setting &sgmodes = texts["gameModes"]; for(int i = 0; i < 4; ++i) { gameModes[i] = (char const*)sgmodes["gameModes" + to_string(i)]; } const libconfig::Setting &sgmspec = texts["gameModeSpec"]; gameModeSpec[0] = (char const*)sgmspec["gameModeSpec0"]; gameModeSpec[1] = (char const*)sgmspec["gameModeSpec1"]; gameModeSpec[2] = (char const*)sgmspec["gameModeSpec2"]; const libconfig::Setting &sonoff = texts["onoff"]; onoff[0] = (char const*)sonoff["onoff0"]; onoff[1] = (char const*)sonoff["onoff1"]; const libconfig::Setting &scontrollers = texts["controllers"]; controllers[0] = (char const*)scontrollers["controllers0"]; controllers[1] = (char const*)scontrollers["controllers1"]; const libconfig::Setting &swstates = texts["weapStates"]; for(int i = 0; i < 3; ++i) { weapStates[i] = (char const*)swstates["weapStates" + to_string(i)]; } const libconfig::Setting &sknames = texts["keyNames"]; for(int i = 1; i < 177; ++i) // First key starts at 1 { keyNames[i] = (char const*)sknames["keyNames" + to_string(i)]; } selWeap = (char const*)texts["selWeap"]; levelRandom = (char const*)texts["levelRandom"]; levelIs1 = (char const*)texts["levelIs1"]; levelIs2 = (char const*)texts["levelIs2"]; randomize = (char const*)texts["randomize"]; done = (char const*)texts["done"]; reloading = (char const*)texts["reloading"]; pressFire = (char const*)texts["pressFire"]; kills = (char const*)texts["kills"]; lives = (char const*)texts["lives"]; selLevel = (char const*)texts["selLevel"]; weapon = (char const*)texts["weapon"]; availability = (char const*)texts["availability"]; noWeaps = (char const*)texts["noWeaps"]; copyrightBarFormat = (int)texts["copyrightBarFormat"]; } void Texts::writeToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &texts = cfgHelp.getSubgroup(root, "Texts"); cfgHelp.put(texts, "random", random); cfgHelp.put(texts, "random2", random2); cfgHelp.put(texts, "regenLevel", regenLevel); cfgHelp.put(texts, "reloadLevel", reloadLevel); cfgHelp.put(texts, "copyright1", copyright1); cfgHelp.put(texts, "copyright2", copyright2); cfgHelp.put(texts, "saveoptions", saveoptions); cfgHelp.put(texts, "loadoptions", loadoptions); cfgHelp.put(texts, "curOptNoFile", curOptNoFile); cfgHelp.put(texts, "curOpt", curOpt); libconfig::Setting &sgmodes = cfgHelp.getSubgroup(texts, "gameModes"); for(int i = 0; i < 4; ++i) { cfgHelp.put(sgmodes, "gameModes" + to_string(i), gameModes[i]); } libconfig::Setting &sgmspec = cfgHelp.getSubgroup(texts, "gameModeSpec"); cfgHelp.put(sgmspec, "gameModeSpec0", gameModeSpec[0]); cfgHelp.put(sgmspec, "gameModeSpec1", gameModeSpec[1]); cfgHelp.put(sgmspec, "gameModeSpec2", gameModeSpec[2]); libconfig::Setting &sonoff = cfgHelp.getSubgroup(texts, "onoff"); cfgHelp.put(sonoff, "onoff0", onoff[0]); cfgHelp.put(sonoff, "onoff1", onoff[1]); libconfig::Setting &scontrollers = cfgHelp.getSubgroup(texts, "controllers"); cfgHelp.put(scontrollers, "controllers0", controllers[0]); cfgHelp.put(scontrollers, "controllers1", controllers[1]); libconfig::Setting &swstates = cfgHelp.getSubgroup(texts, "weapStates"); for(int i = 0; i < 3; ++i) { cfgHelp.put(swstates, "weapStates" + to_string(i), weapStates[i]); } libconfig::Setting &sknames = cfgHelp.getSubgroup(texts, "keyNames"); for(int i = 1; i < 177; ++i) // First key starts at 1 { cfgHelp.put(sknames, "keyNames" + to_string(i), keyNames[i]); } cfgHelp.put(texts, "selWeap", selWeap); cfgHelp.put(texts, "levelRandom", levelRandom); cfgHelp.put(texts, "levelIs1", levelIs1); cfgHelp.put(texts, "levelIs2", levelIs2); cfgHelp.put(texts, "randomize", randomize); cfgHelp.put(texts, "done", done); cfgHelp.put(texts, "reloading", reloading); cfgHelp.put(texts, "pressFire", pressFire); cfgHelp.put(texts, "kills", kills); cfgHelp.put(texts, "lives", lives); cfgHelp.put(texts, "selLevel", selLevel); cfgHelp.put(texts, "weapon", weapon); cfgHelp.put(texts, "availability", availability); cfgHelp.put(texts, "noWeaps", noWeaps); cfgHelp.put(texts, "copyrightBarFormat", copyrightBarFormat); cfg.writeFile(cfgFilePath.c_str()); } void Common::loadPalette() { FILE* exe = openLieroEXE(); std::fseek(exe, 132774, SEEK_SET); exepal.read(exe); std::fseek(exe, 0x1AF0C, SEEK_SET); for(int i = 0; i < 4; ++i) { colorAnim[i].from = readUint8(exe); colorAnim[i].to = readUint8(exe); } } void Common::loadPaletteFromCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &palette = cfg.lookup("Palette"); exepal.readFromCFG(cfgFilePath); const libconfig::Setting &scanim = palette["colorAnim"]; for(int i = 0; i < 4; ++i) { colorAnim[i].from = (int)scanim["colorAnim" + to_string(i) + "from"]; colorAnim[i].to = (int)scanim["colorAnim" + to_string(i) + "to"]; } } void Common::writePaletteToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; exepal.writeToCFG(cfgFilePath); cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &palette = cfgHelp.getSubgroup(root, "Palette"); libconfig::Setting &scanim = cfgHelp.getSubgroup(palette, "colorAnim"); for(int i = 0; i < 4; ++i) { cfgHelp.put(scanim, "colorAnim" + to_string(i) + "from", colorAnim[i].from); cfgHelp.put(scanim, "colorAnim" + to_string(i) + "to", colorAnim[i].to); cfg.writeFile(cfgFilePath.c_str()); } } void Common::loadMaterials() { FILE* exe = openLieroEXE(); std::fseek(exe, 0x01C2E0, SEEK_SET); for(int i = 0; i < 256; ++i) { materials[i].flags = 0; } unsigned char bits[32]; for(int i = 0; i < 5; ++i) { checkedFread(bits, 1, 32, exe); for(int j = 0; j < 256; ++j) { int bit = ((bits[j >> 3] >> (j & 7)) & 1); materials[j].flags |= bit << i; } } std::fseek(exe, 0x01AEA8, SEEK_SET); checkedFread(bits, 1, 32, exe); for(int j = 0; j < 256; ++j) { int bit = ((bits[j >> 3] >> (j & 7)) & 1); materials[j].flags |= bit << 5; } } void Common::loadMaterialsFromCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &smaterials = cfg.lookup("Materials"); for(int i = 0; i < 256; ++i) { const libconfig::Setting &smflags = smaterials["flags" + to_string(i)]; materials[i].flags = smflags; } } void Common::writeMaterialsToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &smaterials = cfgHelp.getSubgroup(root, "Materials"); for(int i = 0; i < 256; ++i) { cfgHelp.put(smaterials, "flags" + to_string(i), materials[i].flags); } cfg.writeFile(cfgFilePath.c_str()); } struct Read32 { static inline int run(FILE* f) { return readSint32(f); } }; struct Read16 { static inline int run(FILE* f) { return readSint16(f); } }; struct Read8 { static inline int run(FILE* f) { return readUint8(f); } }; struct ReadBool { static inline bool run(FILE* f) { return readUint8(f) != 0; } }; template struct Dec { static inline int run(FILE* f) { return T::run(f) - 1; } }; template inline void readMembers(FILE* f, T(&arr)[N], U (T::*mem)) { for(int i = 0; i < N; ++i) { (arr[i].*mem) = Reader::run(f); } } void Common::loadWeapons() { FILE* exe = openLieroEXE(); fseek(exe, 112806, SEEK_SET); readMembers(exe, weapons, &Weapon::detectDistance); readMembers(exe, weapons, &Weapon::affectByWorm); readMembers(exe, weapons, &Weapon::blowAway); for(int i = 0; i < 40; ++i) { weapOrder[i + 1] = readUint8(exe) - 1; } readMembers(exe, weapons, &Weapon::gravity); readMembers(exe, weapons, &Weapon::shadow); readMembers(exe, weapons, &Weapon::laserSight); readMembers >(exe, weapons, &Weapon::launchSound); readMembers(exe, weapons, &Weapon::loopSound); readMembers >(exe, weapons, &Weapon::exploSound); readMembers(exe, weapons, &Weapon::speed); readMembers(exe, weapons, &Weapon::addSpeed); readMembers(exe, weapons, &Weapon::distribution); readMembers(exe, weapons, &Weapon::parts); readMembers(exe, weapons, &Weapon::recoil); readMembers(exe, weapons, &Weapon::multSpeed); readMembers(exe, weapons, &Weapon::delay); readMembers(exe, weapons, &Weapon::loadingTime); readMembers(exe, weapons, &Weapon::ammo); readMembers >(exe, weapons, &Weapon::createOnExp); readMembers >(exe, weapons, &Weapon::dirtEffect); readMembers(exe, weapons, &Weapon::leaveShells); readMembers(exe, weapons, &Weapon::leaveShellDelay); readMembers(exe, weapons, &Weapon::playReloadSound); readMembers(exe, weapons, &Weapon::wormExplode); readMembers(exe, weapons, &Weapon::explGround); readMembers(exe, weapons, &Weapon::wormCollide); readMembers(exe, weapons, &Weapon::fireCone); readMembers(exe, weapons, &Weapon::collideWithObjects); readMembers(exe, weapons, &Weapon::affectByExplosions); readMembers(exe, weapons, &Weapon::bounce); readMembers(exe, weapons, &Weapon::timeToExplo); readMembers(exe, weapons, &Weapon::timeToExploV); readMembers(exe, weapons, &Weapon::hitDamage); readMembers(exe, weapons, &Weapon::bloodOnHit); readMembers(exe, weapons, &Weapon::startFrame); readMembers(exe, weapons, &Weapon::numFrames); readMembers(exe, weapons, &Weapon::loopAnim); readMembers(exe, weapons, &Weapon::shotType); readMembers(exe, weapons, &Weapon::colorBullets); readMembers(exe, weapons, &Weapon::splinterAmount); readMembers(exe, weapons, &Weapon::splinterColour); readMembers >(exe, weapons, &Weapon::splinterType); readMembers(exe, weapons, &Weapon::splinterScatter); readMembers >(exe, weapons, &Weapon::objTrailType); readMembers(exe, weapons, &Weapon::objTrailDelay); readMembers(exe, weapons, &Weapon::partTrailType); readMembers >(exe, weapons, &Weapon::partTrailObj); readMembers(exe, weapons, &Weapon::partTrailDelay); fseek(exe, 0x1B676, SEEK_SET); for(int i = 0; i < 40; ++i) { weapons[i].name = readPascalString(exe, 14); weapons[i].id = i; } // Special objects fseek(exe, 115218, SEEK_SET); readMembers >(exe, sobjectTypes, &SObjectType::startSound); //fseek(exe, 115232, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::numSounds); //fseek(exe, 115246, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::animDelay); //fseek(exe, 115260, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::startFrame); //fseek(exe, 115274, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::numFrames); //fseek(exe, 115288, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::detectRange); //fseek(exe, 115302, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::damage); //fseek(exe, 0x1C274, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::blowAway); // blowAway has 13 slots, not 14. The last value will overlap with shadow. fseek(exe, 115368, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::shadow); //fseek(exe, 115382, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::shake); //fseek(exe, 115396, SEEK_SET); readMembers(exe, sobjectTypes, &SObjectType::flash); //fseek(exe, 115410, SEEK_SET); // Was 115409 readMembers >(exe, sobjectTypes, &SObjectType::dirtEffect); for(int i = 0; i < 14; ++i) // TODO: Unhardcode { sobjectTypes[i].id = i; } fseek(exe, 111430, SEEK_SET); readMembers(exe, nobjectTypes, &NObjectType::detectDistance); readMembers(exe, nobjectTypes, &NObjectType::gravity); readMembers(exe, nobjectTypes, &NObjectType::speed); readMembers(exe, nobjectTypes, &NObjectType::speedV); readMembers(exe, nobjectTypes, &NObjectType::distribution); readMembers(exe, nobjectTypes, &NObjectType::blowAway); readMembers(exe, nobjectTypes, &NObjectType::bounce); readMembers(exe, nobjectTypes, &NObjectType::hitDamage); readMembers(exe, nobjectTypes, &NObjectType::wormExplode); readMembers(exe, nobjectTypes, &NObjectType::explGround); readMembers(exe, nobjectTypes, &NObjectType::wormDestroy); readMembers(exe, nobjectTypes, &NObjectType::bloodOnHit); readMembers(exe, nobjectTypes, &NObjectType::startFrame); readMembers(exe, nobjectTypes, &NObjectType::numFrames); readMembers(exe, nobjectTypes, &NObjectType::drawOnMap); readMembers(exe, nobjectTypes, &NObjectType::colorBullets); readMembers >(exe, nobjectTypes, &NObjectType::createOnExp); readMembers(exe, nobjectTypes, &NObjectType::affectByExplosions); readMembers >(exe, nobjectTypes, &NObjectType::dirtEffect); readMembers(exe, nobjectTypes, &NObjectType::splinterAmount); readMembers(exe, nobjectTypes, &NObjectType::splinterColour); readMembers >(exe, nobjectTypes, &NObjectType::splinterType); readMembers(exe, nobjectTypes, &NObjectType::bloodTrail); readMembers(exe, nobjectTypes, &NObjectType::bloodTrailDelay); readMembers >(exe, nobjectTypes, &NObjectType::leaveObj); readMembers(exe, nobjectTypes, &NObjectType::leaveObjDelay); readMembers(exe, nobjectTypes, &NObjectType::timeToExplo); readMembers(exe, nobjectTypes, &NObjectType::timeToExploV); for(int i = 0; i < 24; ++i) // TODO: Unhardcode { nobjectTypes[i].id = i; } } void Common::loadWeaponsFromCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &sweapons = cfg.lookup("Weapons"); const libconfig::Setting &swworder = sweapons["weapOrder"]; for(int i = 0; i < 40; ++i) { // Weapons { weapOrder { weapOrder1 weapOrder[i + 1] = swworder[i]; } const libconfig::Setting &swweapons = sweapons["weapons"]; for(int i = 0; i < 40; ++i) { // Weapons { weapons { weapon0 { property weapons[i].name = (const char*)swweapons[i]["name"]; weapons[i].id = i; // Not in config weapons[i].detectDistance = (int)swweapons[i]["detectDistance"]; weapons[i].affectByWorm = (bool)swweapons[i]["affectByWorm"]; weapons[i].blowAway = (int)swweapons[i]["blowAway"]; weapons[i].gravity = (fixed)swweapons[i]["gravity"]; weapons[i].shadow = (bool)swweapons[i]["shadow"]; weapons[i].laserSight = (bool)swweapons[i]["laserSight"]; weapons[i].launchSound = (int)swweapons[i]["launchSound"]; weapons[i].loopSound = (int)swweapons[i]["loopSound"]; weapons[i].exploSound = (int)swweapons[i]["exploSound"]; weapons[i].speed = (int)swweapons[i]["speed"]; weapons[i].addSpeed = (fixed)swweapons[i]["addSpeed"]; weapons[i].distribution = (int)swweapons[i]["distribution"]; weapons[i].parts = (int)swweapons[i]["parts"]; weapons[i].recoil = (int)swweapons[i]["recoil"]; weapons[i].multSpeed = (int)swweapons[i]["multSpeed"]; weapons[i].delay = (int)swweapons[i]["delay"]; weapons[i].loadingTime = (int)swweapons[i]["loadingTime"]; weapons[i].ammo = (int)swweapons[i]["ammo"]; weapons[i].createOnExp = (int)swweapons[i]["createOnExp"]; weapons[i].dirtEffect = (int)swweapons[i]["dirtEffect"]; weapons[i].leaveShells = (int)swweapons[i]["leaveShells"]; weapons[i].leaveShellDelay = (int)swweapons[i]["leaveShellDelay"]; weapons[i].playReloadSound = (bool)swweapons[i]["playReloadSound"]; weapons[i].wormExplode = (bool)swweapons[i]["wormExplode"]; weapons[i].explGround = (bool)swweapons[i]["explGround"]; weapons[i].wormCollide = (bool)swweapons[i]["wormCollide"]; weapons[i].fireCone = (int)swweapons[i]["fireCone"]; weapons[i].collideWithObjects = (bool)swweapons[i]["collideWithObjects"]; weapons[i].affectByExplosions = (bool)swweapons[i]["affectByExplosions"]; weapons[i].bounce = (int)swweapons[i]["bounce"]; weapons[i].timeToExplo = (int)swweapons[i]["timeToExplo"]; weapons[i].timeToExploV = (int)swweapons[i]["timeToExploV"]; weapons[i].hitDamage = (int)swweapons[i]["hitDamage"]; weapons[i].bloodOnHit = (int)swweapons[i]["bloodOnHit"]; weapons[i].startFrame = (int)swweapons[i]["startFrame"]; weapons[i].numFrames = (int)swweapons[i]["numFrames"]; weapons[i].loopAnim = (bool)swweapons[i]["loopAnim"]; weapons[i].shotType = (int)swweapons[i]["shotType"]; weapons[i].colorBullets = (int)swweapons[i]["colorBullets"]; weapons[i].splinterAmount = (int)swweapons[i]["splinterAmount"]; weapons[i].splinterColour = (int)swweapons[i]["splinterColour"]; weapons[i].splinterType = (int)swweapons[i]["splinterType"]; weapons[i].splinterScatter = (int)swweapons[i]["splinterScatter"]; weapons[i].objTrailType = (int)swweapons[i]["objTrailType"]; weapons[i].objTrailDelay = (int)swweapons[i]["objTrailDelay"]; weapons[i].partTrailType = (int)swweapons[i]["partTrailType"]; weapons[i].partTrailObj = (int)swweapons[i]["partTrailObj"]; weapons[i].partTrailDelay = (int)swweapons[i]["partTrailDelay"]; } // Special objects const libconfig::Setting &swsotypes = sweapons["sobjectTypes"]; for(int i = 0; i < 14; ++i) { sobjectTypes[i].id = i; // Not in config sobjectTypes[i].startSound = (int)swsotypes[i]["startSound"]; sobjectTypes[i].numSounds = (int)swsotypes[i]["numSounds"]; sobjectTypes[i].animDelay = (int)swsotypes[i]["animDelay"]; sobjectTypes[i].startFrame = (int)swsotypes[i]["startFrame"]; sobjectTypes[i].numFrames = (int)swsotypes[i]["numFrames"]; sobjectTypes[i].detectRange = (int)swsotypes[i]["detectRange"]; sobjectTypes[i].damage = (int)swsotypes[i]["damage"]; sobjectTypes[i].blowAway = (int)swsotypes[i]["blowAway"]; sobjectTypes[i].shadow = (bool)swsotypes[i]["shadow"]; sobjectTypes[i].shake = (int)swsotypes[i]["shake"]; sobjectTypes[i].flash = (int)swsotypes[i]["flash"]; sobjectTypes[i].dirtEffect = (int)swsotypes[i]["dirtEffect"]; } // Normal objects const libconfig::Setting &swnotypes = sweapons["nobjectTypes"]; for(int i = 0; i < 24; ++i) { nobjectTypes[i].id = i; // Not in config nobjectTypes[i].detectDistance = (int)swnotypes[i]["detectDistance"]; nobjectTypes[i].gravity = (fixed)swnotypes[i]["gravity"]; nobjectTypes[i].speed = (int)swnotypes[i]["speed"]; nobjectTypes[i].speedV = (int)swnotypes[i]["speedV"]; nobjectTypes[i].distribution = (int)swnotypes[i]["distribution"]; nobjectTypes[i].blowAway = (int)swnotypes[i]["blowAway"]; nobjectTypes[i].bounce = (int)swnotypes[i]["bounce"]; nobjectTypes[i].hitDamage = (int)swnotypes[i]["hitDamage"]; nobjectTypes[i].wormExplode = (bool)swnotypes[i]["wormExplode"]; nobjectTypes[i].explGround = (bool)swnotypes[i]["explGround"]; nobjectTypes[i].wormDestroy = (bool)swnotypes[i]["wormDestroy"]; nobjectTypes[i].bloodOnHit = (int)swnotypes[i]["bloodOnHit"]; nobjectTypes[i].startFrame = (int)swnotypes[i]["startFrame"]; nobjectTypes[i].numFrames = (int)swnotypes[i]["numFrames"]; nobjectTypes[i].drawOnMap = (bool)swnotypes[i]["drawOnMap"]; nobjectTypes[i].colorBullets = (int)swnotypes[i]["colorBullets"]; nobjectTypes[i].createOnExp = (int)swnotypes[i]["createOnExp"]; nobjectTypes[i].affectByExplosions = (bool)swnotypes[i]["affectByExplosions"]; nobjectTypes[i].dirtEffect = (int)swnotypes[i]["dirtEffect"]; nobjectTypes[i].splinterAmount = (int)swnotypes[i]["splinterAmount"]; nobjectTypes[i].splinterColour = (int)swnotypes[i]["splinterColour"]; nobjectTypes[i].splinterType = (int)swnotypes[i]["splinterType"]; nobjectTypes[i].bloodTrail = (bool)swnotypes[i]["bloodTrail"]; nobjectTypes[i].bloodTrailDelay = (int)swnotypes[i]["bloodTrailDelay"]; nobjectTypes[i].leaveObj = (int)swnotypes[i]["leaveObj"]; nobjectTypes[i].leaveObjDelay = (int)swnotypes[i]["leaveObjDelay"]; nobjectTypes[i].timeToExplo = (int)swnotypes[i]["timeToExplo"]; nobjectTypes[i].timeToExploV = (int)swnotypes[i]["timeToExploV"]; } } void Common::writeWeaponsToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &sweapons = cfgHelp.getSubgroup(root, "Weapons"); libconfig::Setting &swworder = cfgHelp.getSubgroup(sweapons, "weapOrder"); for(int i = 0; i < 40; ++i) { cfgHelp.put(swworder, "weapOrder" + to_string(i + 1), weapOrder[i + 1]); } libconfig::Setting &swweapons = cfgHelp.getSubgroup(sweapons, "weapons"); for(int i = 0; i < 40; ++i) { libconfig::Setting &swwweapons = cfgHelp.getSubgroup(swweapons, "weapons" + to_string(i)); cfgHelp.put(swwweapons, "name", weapons[i].name); cfgHelp.put(swwweapons, "detectDistance", weapons[i].detectDistance); cfgHelp.put(swwweapons, "affectByWorm", weapons[i].affectByWorm); cfgHelp.put(swwweapons, "blowAway", weapons[i].blowAway); cfgHelp.put(swwweapons, "gravity", weapons[i].gravity); cfgHelp.put(swwweapons, "shadow", weapons[i].shadow); cfgHelp.put(swwweapons, "laserSight", weapons[i].laserSight); cfgHelp.put(swwweapons, "launchSound", weapons[i].launchSound); cfgHelp.put(swwweapons, "loopSound", weapons[i].loopSound); cfgHelp.put(swwweapons, "exploSound", weapons[i].exploSound); cfgHelp.put(swwweapons, "speed", weapons[i].speed); cfgHelp.put(swwweapons, "addSpeed", weapons[i].addSpeed); cfgHelp.put(swwweapons, "distribution", weapons[i].distribution); cfgHelp.put(swwweapons, "parts", weapons[i].parts); cfgHelp.put(swwweapons, "recoil", weapons[i].recoil); cfgHelp.put(swwweapons, "multSpeed", weapons[i].multSpeed); cfgHelp.put(swwweapons, "delay", weapons[i].delay); cfgHelp.put(swwweapons, "loadingTime", weapons[i].loadingTime); cfgHelp.put(swwweapons, "ammo", weapons[i].ammo); cfgHelp.put(swwweapons, "createOnExp", weapons[i].createOnExp); cfgHelp.put(swwweapons, "dirtEffect", weapons[i].dirtEffect); cfgHelp.put(swwweapons, "leaveShells", weapons[i].leaveShells); cfgHelp.put(swwweapons, "leaveShellDelay", weapons[i].leaveShellDelay); cfgHelp.put(swwweapons, "playReloadSound", weapons[i].playReloadSound); cfgHelp.put(swwweapons, "wormExplode", weapons[i].wormExplode); cfgHelp.put(swwweapons, "explGround", weapons[i].explGround); cfgHelp.put(swwweapons, "wormCollide", weapons[i].wormCollide); cfgHelp.put(swwweapons, "fireCone", weapons[i].fireCone); cfgHelp.put(swwweapons, "collideWithObjects", weapons[i].collideWithObjects); cfgHelp.put(swwweapons, "affectByExplosions", weapons[i].affectByExplosions); cfgHelp.put(swwweapons, "bounce", weapons[i].bounce); cfgHelp.put(swwweapons, "timeToExplo", weapons[i].timeToExplo); cfgHelp.put(swwweapons, "timeToExploV", weapons[i].timeToExploV); cfgHelp.put(swwweapons, "hitDamage", weapons[i].hitDamage); cfgHelp.put(swwweapons, "bloodOnHit", weapons[i].bloodOnHit); cfgHelp.put(swwweapons, "startFrame", weapons[i].startFrame); cfgHelp.put(swwweapons, "numFrames", weapons[i].numFrames); cfgHelp.put(swwweapons, "loopAnim", weapons[i].loopAnim); cfgHelp.put(swwweapons, "shotType", weapons[i].shotType); cfgHelp.put(swwweapons, "colorBullets", weapons[i].colorBullets); cfgHelp.put(swwweapons, "splinterAmount", weapons[i].splinterAmount); cfgHelp.put(swwweapons, "splinterColour", weapons[i].splinterColour); cfgHelp.put(swwweapons, "splinterType", weapons[i].splinterType); cfgHelp.put(swwweapons, "splinterScatter", weapons[i].splinterScatter); cfgHelp.put(swwweapons, "objTrailType", weapons[i].objTrailType); cfgHelp.put(swwweapons, "objTrailDelay", weapons[i].objTrailDelay); cfgHelp.put(swwweapons, "partTrailType", weapons[i].partTrailType); cfgHelp.put(swwweapons, "partTrailObj", weapons[i].partTrailObj); cfgHelp.put(swwweapons, "partTrailDelay", weapons[i].partTrailDelay); } // Special objects libconfig::Setting &swsotypes = cfgHelp.getSubgroup(sweapons, "sobjectTypes"); for(int i = 0; i < 14; ++i) { libconfig::Setting &swssotypes = cfgHelp.getSubgroup(swsotypes, "sobjectTypes" + to_string(i)); cfgHelp.put(swssotypes, "startSound", sobjectTypes[i].startSound); cfgHelp.put(swssotypes, "numSounds", sobjectTypes[i].numSounds); cfgHelp.put(swssotypes, "animDelay", sobjectTypes[i].animDelay); cfgHelp.put(swssotypes, "startFrame", sobjectTypes[i].startFrame); cfgHelp.put(swssotypes, "numFrames", sobjectTypes[i].numFrames); cfgHelp.put(swssotypes, "detectRange", sobjectTypes[i].detectRange); cfgHelp.put(swssotypes, "damage", sobjectTypes[i].damage); cfgHelp.put(swssotypes, "blowAway", sobjectTypes[i].blowAway); // blowAway has 13 slots, not 14. The last value will overlap with shadow. cfgHelp.put(swssotypes, "shadow", sobjectTypes[i].shadow); cfgHelp.put(swssotypes, "shake", sobjectTypes[i].shake); cfgHelp.put(swssotypes, "flash", sobjectTypes[i].flash); cfgHelp.put(swssotypes, "dirtEffect", sobjectTypes[i].dirtEffect); } // Normal objects libconfig::Setting &swnotypes = cfgHelp.getSubgroup(sweapons, "nobjectTypes"); for(int i = 0; i < 24; ++i) { libconfig::Setting &swnnotypes = cfgHelp.getSubgroup(swnotypes, "nobjectTypes" + to_string(i)); cfgHelp.put(swnnotypes, "detectDistance", nobjectTypes[i].detectDistance); cfgHelp.put(swnnotypes, "gravity", nobjectTypes[i].gravity); cfgHelp.put(swnnotypes, "speed", nobjectTypes[i].speed); cfgHelp.put(swnnotypes, "speedV", nobjectTypes[i].speedV); cfgHelp.put(swnnotypes, "distribution", nobjectTypes[i].distribution); cfgHelp.put(swnnotypes, "blowAway", nobjectTypes[i].blowAway); cfgHelp.put(swnnotypes, "bounce", nobjectTypes[i].bounce); cfgHelp.put(swnnotypes, "hitDamage", nobjectTypes[i].hitDamage); cfgHelp.put(swnnotypes, "wormExplode", nobjectTypes[i].wormExplode); cfgHelp.put(swnnotypes, "explGround", nobjectTypes[i].explGround); cfgHelp.put(swnnotypes, "wormDestroy", nobjectTypes[i].wormDestroy); cfgHelp.put(swnnotypes, "bloodOnHit", nobjectTypes[i].bloodOnHit); cfgHelp.put(swnnotypes, "startFrame", nobjectTypes[i].startFrame); cfgHelp.put(swnnotypes, "numFrames", nobjectTypes[i].numFrames); cfgHelp.put(swnnotypes, "drawOnMap", nobjectTypes[i].drawOnMap); cfgHelp.put(swnnotypes, "colorBullets", nobjectTypes[i].colorBullets); cfgHelp.put(swnnotypes, "createOnExp", nobjectTypes[i].createOnExp); cfgHelp.put(swnnotypes, "affectByExplosions", nobjectTypes[i].affectByExplosions); cfgHelp.put(swnnotypes, "dirtEffect", nobjectTypes[i].dirtEffect); cfgHelp.put(swnnotypes, "splinterAmount", nobjectTypes[i].splinterAmount); cfgHelp.put(swnnotypes, "splinterColour", nobjectTypes[i].splinterColour); cfgHelp.put(swnnotypes, "splinterType", nobjectTypes[i].splinterType); cfgHelp.put(swnnotypes, "bloodTrail", nobjectTypes[i].bloodTrail); cfgHelp.put(swnnotypes, "bloodTrailDelay", nobjectTypes[i].bloodTrailDelay); cfgHelp.put(swnnotypes, "leaveObj", nobjectTypes[i].leaveObj); cfgHelp.put(swnnotypes, "leaveObjDelay", nobjectTypes[i].leaveObjDelay); cfgHelp.put(swnnotypes, "timeToExplo", nobjectTypes[i].timeToExplo); cfgHelp.put(swnnotypes, "timeToExploV", nobjectTypes[i].timeToExploV); } cfg.writeFile(cfgFilePath.c_str()); } void Common::loadTextures() { FILE* exe = openLieroEXE(); fseek(exe, 0x1C208, SEEK_SET); readMembers(exe, textures, &Texture::nDrawBack); fseek(exe, 0x1C1EA, SEEK_SET); readMembers(exe, textures, &Texture::mFrame); fseek(exe, 0x1C1F4, SEEK_SET); readMembers(exe, textures, &Texture::sFrame); fseek(exe, 0x1C1FE, SEEK_SET); readMembers(exe, textures, &Texture::rFrame); } void Common::loadTexturesFromCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &stextures = cfg.lookup("Textures"); for(int i = 0; i < 9; ++i) { // Textures { textures0 { property textures[i].nDrawBack = (bool)stextures[i]["nDrawBack"]; textures[i].mFrame = (int)stextures[i]["mFrame"]; textures[i].sFrame = (int)stextures[i]["sFrame"]; textures[i].rFrame = (int)stextures[i]["rFrame"]; } } void Common::writeTexturesToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &stextures = cfgHelp.getSubgroup(root, "Textures"); for(int i = 0; i < 9; ++i) { libconfig::Setting &sttextures = cfgHelp.getSubgroup(stextures, "textures" + to_string(i)); cfgHelp.put(sttextures, "nDrawBack", textures[i].nDrawBack); cfgHelp.put(sttextures, "mFrame", textures[i].mFrame); cfgHelp.put(sttextures, "sFrame", textures[i].sFrame); cfgHelp.put(sttextures, "rFrame", textures[i].rFrame); } cfg.writeFile(cfgFilePath.c_str()); } void Common::loadOthers() { FILE* exe = openLieroEXE(); fseek(exe, 0x1C1E2, SEEK_SET); for(int i = 0; i < 2; ++i) for(int j = 0; j < 2; ++j) bonusRandTimer[j][i] = readUint16(exe); fseek(exe, 0x1AEEE + 2, SEEK_SET); for(int i = 0; i < 2; ++i) for(int j = 0; j < 7; ++j) aiParams.k[i][j] = readUint16(exe); fseek(exe, 0x1C1E0, SEEK_SET); for(int i = 0; i < 2; ++i) bonusSObjects[i] = readUint8(exe) - 1; } void Common::loadOthersFromCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &sothers = cfg.lookup("Others"); const libconfig::Setting &sobrtimer = sothers["bonusRandTimer"]; for(int i = 0; i < 2; ++i) for(int j = 0; j < 2; ++j) { // Others { bonusRandTimer ( array[j], array[j] bonusRandTimer[i][j] = (int)sobrtimer[i][j]; } const libconfig::Setting &soaparams = sothers["aiParams"]; for(int i = 0; i < 2; ++i) for(int j = 0; j < 7; ++j) aiParams.k[i][j] = (int)soaparams[i][j]; for(int i = 0; i < 2; ++i) bonusSObjects[i] = (int)sothers["bonusSObjects"][i]; } void Common::writeOthersToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &sothers = cfgHelp.getSubgroup(root, "Others"); libconfig::Setting &sobrtimer = cfgHelp.mkList(sothers, "bonusRandTimer"); for(int i = 0; i < 2; ++i) { // Adding new since above list is created empty libconfig::Setting &sobarray = sobrtimer.add(libconfig::Setting::TypeArray); for(int j = 0; j < 2; ++j) { // Others { bonusRandTimer ( array[j], array[j] sobarray.add(libconfig::Setting::TypeInt) = bonusRandTimer[i][j]; } } libconfig::Setting &soaparams = cfgHelp.mkList(sothers, "aiParams"); for(int i = 0; i < 2; ++i) { libconfig::Setting &soaarray = soaparams.add(libconfig::Setting::TypeArray); for(int j = 0; j < 7; ++j) soaarray.add(libconfig::Setting::TypeInt) = aiParams.k[i][j]; } libconfig::Setting &sobsobjects = cfgHelp.mkArray(sothers, "bonusSObjects"); for(int i = 0; i < 2; ++i) sobsobjects.add(libconfig::Setting::TypeInt) = bonusSObjects[i]; cfg.writeFile(cfgFilePath.c_str()); } void Common::loadGfxFromEXE() { FILE* exe = openLieroEXE(); fseek(exe, 0x1C1DE, SEEK_SET); bonusFrames[0] = readUint8(exe); bonusFrames[1] = readUint8(exe); } void Common::loadGfxFromCHR() { FILE* gfx = openLieroCHR(); fseek(gfx, 10, SEEK_SET); // Skip some header largeSprites.read(gfx, 16, 16, 110); fseek(gfx, 4, SEEK_CUR); // Extra stuff smallSprites.read(gfx, 7, 7, 130); fseek(gfx, 4, SEEK_CUR); // Extra stuff textSprites.read(gfx, 4, 4, 26); } void Common::loadGfxExtra() { Rand rand; for(int y = 0; y < 16; ++y) for(int x = 0; x < 16; ++x) { int idx = y * 16 + x; largeSprites.spritePtr(73)[idx] = rand(4) + 160; largeSprites.spritePtr(74)[idx] = rand(4) + 160; largeSprites.spritePtr(87)[idx] = rand(4) + 12; largeSprites.spritePtr(88)[idx] = rand(4) + 12; largeSprites.spritePtr(82)[idx] = rand(4) + 94; largeSprites.spritePtr(83)[idx] = rand(4) + 94; } wormSprites.allocate(16, 16, 2 * 2 * 21); for(int i = 0; i < 21; ++i) { for(int y = 0; y < 16; ++y) for(int x = 0; x < 16; ++x) { PalIdx pix = (largeSprites.spritePtr(16 + i) + y*16)[x]; (wormSprite(i, 1, 0) + y*16)[x] = pix; if(x == 15) (wormSprite(i, 0, 0) + y*16)[15] = 0; else (wormSprite(i, 0, 0) + y*16)[14 - x] = pix; if(pix >= 30 && pix <= 34) pix += 9; // Change worm color (wormSprite(i, 1, 1) + y*16)[x] = pix; if(x == 15) (wormSprite(i, 0, 1) + y*16)[15] = 0; // A bit haxy, but works else (wormSprite(i, 0, 1) + y*16)[14 - x] = pix; } } fireConeSprites.allocate(16, 16, 2 * 7); for(int i = 0; i < 7; ++i) { for(int y = 0; y < 16; ++y) for(int x = 0; x < 16; ++x) { PalIdx pix = (largeSprites.spritePtr(9 + i) + y*16)[x]; (fireConeSprite(i, 1) + y*16)[x] = pix; if(x == 15) (fireConeSprite(i, 0) + y*16)[15] = 0; else (fireConeSprite(i, 0) + y*16)[14 - x] = pix; } } } void Common::loadGfx() { loadGfxFromEXE(); loadGfxFromCHR(); loadGfxExtra(); } void Common::loadGfxFromCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &sgfx = cfg.lookup("Gfx"); bonusFrames[0] = (int)sgfx["bonusFrames"][0]; bonusFrames[1] = (int)sgfx["bonusFrames"][1]; loadGfxFromCHR(); loadGfxExtra(); } void Common::writeGfxToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &sgfx = cfgHelp.getSubgroup(root, "Gfx"); libconfig::Setting &sgbframes = cfgHelp.mkArray(sgfx, "bonusFrames"); sgbframes.add(libconfig::Setting::TypeInt) = bonusFrames[0]; sgbframes.add(libconfig::Setting::TypeInt) = bonusFrames[1]; cfg.writeFile(cfgFilePath.c_str()); } void Common::drawTextSmall(char const* str, int x, int y) { for(; *str; ++str) { unsigned char c = *str - 'A'; if(c < 26) { blitImage(gfx.screen, textSprites.spritePtr(c), x, y, 4, 4); } x += 4; } } lierolibre-0.5/src/common.hpp000066400000000000000000000130731205125547100163040ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_9E238CFB9F074A3A432E22AE5B8EE5FB #define UUID_9E238CFB9F074A3A432E22AE5B8EE5FB #include "gfx/font.hpp" #include "weapon.hpp" #include "sobject.hpp" #include "nobject.hpp" #include "constants.hpp" #include "gfx/palette.hpp" #include "gfx/sprite.hpp" #include #include #include extern int stoneTab[3][4]; struct Material { enum { Dirt = 1<<0, Dirt2 = 1<<1, Rock = 1<<2, Background = 1<<3, SeeShadow = 1<<4, WormM = 1<<5 }; bool dirt() { return (flags & Dirt) != 0; } bool dirt2() { return (flags & Dirt2) != 0; } bool rock() { return (flags & Rock) != 0; } bool background() { return (flags & Background) != 0; } bool seeShadow() { return (flags & SeeShadow) != 0; } // Constructed bool dirtRock() { return (flags & (Dirt | Dirt2 | Rock)) != 0; } bool anyDirt() { return (flags & (Dirt | Dirt2)) != 0; } bool dirtBack() { return (flags & (Dirt | Dirt2 | Background)) != 0; } bool worm() { return (flags & WormM) != 0; } int flags; }; struct Texture { bool nDrawBack; // 1C208 int mFrame; // 1C1EA int sFrame; // 1C1F4 int rFrame; // 1C1FE }; struct Texts { void loadFromEXE(); void loadFromCFG(std::string cfgFilePath); void writeToCFG(std::string cfgFilePath); std::string copyright1; std::string copyright2; std::string loadoptions; std::string saveoptions; std::string curOptNoFile; std::string curOpt; std::string gameModes[4]; std::string gameModeSpec[3]; std::string onoff[2]; std::string controllers[2]; std::string keyNames[177]; std::string random; std::string random2; std::string reloadLevel; std::string regenLevel; std::string selWeap; std::string levelRandom; std::string levelIs1; std::string levelIs2; std::string randomize; std::string done; std::string kills; std::string lives; std::string suicide; std::string reloading; std::string pressFire; std::string selLevel; std::string noWeaps; std::string weapon; std::string availability; std::string weapStates[3]; int copyrightBarFormat; }; struct ColourAnim { int from; int to; }; struct AIParams { int k[2][7]; // 0x1AEEE, contiguous words }; struct Common : gvl::shared { Common() { } static int fireConeOffset[2][7][2]; int readCFGVersion(std::string cfgFilePath); void writeCFGVersion(std::string cfgFilePath, int version); void loadMaterials(); void loadMaterialsFromCFG(std::string); void writeMaterialsToCFG(std::string); void loadWeapons(); void loadWeaponsFromCFG(std::string cfgFilePath); void writeWeaponsToCFG(std::string cfgFilePath); void loadTextures(); void loadTexturesFromCFG(std::string cfgFilePath); void writeTexturesToCFG(std::string cfgFilePath); void loadOthers(); void loadOthersFromCFG(std::string cfgFilePath); void writeOthersToCFG(std::string cfgFilePath); void loadConstantsFromEXE(); void loadConstantsFromCFG(std::string cfgFilePath); void writeConstantsToCFG(std::string cfgFilePath); void loadConstantsFromCFGVer0(std::string cfgFilePath); // configCompat.cpp void loadGfxFromEXE(); void loadGfxFromCHR(); void loadGfxExtra(); void loadGfx(); void loadGfxFromCFG(std::string cfgFilePath); void writeGfxToCFG(std::string cfgFilePath); void loadPalette(); void loadPaletteFromCFG(std::string cfgFilePath); void writePaletteToCFG(std::string cfgFilePath); void drawTextSmall(char const* str, int x, int y); PalIdx* wormSprite(int f, int dir, int w) { return wormSprites.spritePtr(f + dir*7*3 + w*2*7*3); } PalIdx* fireConeSprite(int f, int dir) { return fireConeSprites.spritePtr(f + dir*7); } Material materials[256]; Texts texts; Texture textures[9]; Weapon weapons[40]; SObjectType sobjectTypes[14]; NObjectType nobjectTypes[24]; int weapOrder[41]; // 1-based! int bonusRandTimer[2][2]; int bonusSObjects[2]; AIParams aiParams; ColourAnim colorAnim[4]; int bonusFrames[2]; SpriteSet smallSprites; SpriteSet largeSprites; SpriteSet textSprites; SpriteSet wormSprites; SpriteSet fireConeSprites; Palette exepal; Font font; int C[MaxC]; std::string S[MaxS]; bool H[MaxH]; }; #endif // UUID_9E238CFB9F074A3A432E22AE5B8EE5FB lierolibre-0.5/src/config.h.in000066400000000000000000000157261205125547100163350ustar00rootroot00000000000000/* src/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FENV_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the `localeconv' function. */ #undef HAVE_LOCALECONV /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if the system has the type `ptrdiff_t'. */ #undef HAVE_PTRDIFF_T /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the header file. */ #undef HAVE_SDL_SDL_MIXER_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_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_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_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_TUT_TUT_HPP /* Define to 1 if you have the header file. */ #undef HAVE_TUT_TUT_REPORTER_HPP /* Define to 1 if you have the header file. */ #undef HAVE_TUT_TUT_RESTARTABLE_HPP /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Caption for SDL window */ #undef PACKAGE_CAPTION /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint64_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT64_T /* Define for Solaris 2.5.1 so the uint8_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT8_T /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to the type of a signed integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef int16_t /* Define to the type of a signed integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef int32_t /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t /* Define to the type of a signed integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef int8_t /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `long int' if does not define. */ #undef off_t /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef uint16_t /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef uint64_t /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef uint8_t lierolibre-0.5/src/configCompat.cpp000066400000000000000000000053411205125547100174170ustar00rootroot00000000000000// #include "configCompat.hpp" #include #include "configHelper.hpp" #include "common.hpp" using namespace std; using namespace libconfig; string valueConstantsNamesCFGVer0[] = { "NRInitialLength", "NRAttachLength", "MinBounceUp", "MinBounceDown", "MinBounceLeft", "MinBounceRight", "WormGravity", "WalkVelLeft", "MaxVelLeft", "WalkVelRight", "MaxVelRight", "JumpForce", "MaxAimVelLeft", "AimAccLeft", "MaxAimVelRight", "AimAccRight", "NinjaropeGravity", "NRMinLength", "NRMaxLength", "BonusGravity", "BObjGravity", // WormFloat hack "WormFloatPower", "BloodLimit", "WormFricMult", "WormFricDiv", "WormMinSpawnDistLast", "WormMinSpawnDistEnemy", "WormSpawnRectX", "WormSpawnRectY", "WormSpawnRectW", "WormSpawnRectH", "AimFricMult", "AimFricDiv", "NRThrowVelX", "NRThrowVelY", "NRForceShlX", "NRForceDivX", "NRForceShlY", "NRForceDivY", "NRForceLenShl", "BonusBounceMul", "BonusBounceDiv", "BonusFlickerTime", "BonusDropChance", "SplinterLarpaVelDiv", "SplinterCracklerVelDiv", // WormFloat hack "WormFloatLevel", // BonusSpawnRect hack "BonusSpawnRectX", "BonusSpawnRectY", "BonusSpawnRectW", "BonusSpawnRectH", "AimMaxRight", "AimMinRight", "AimMaxLeft", "AimMinLeft", "NRColourBegin", "NRColourEnd", "BonusExplodeRisk", "BonusHealthVar", "BonusMinHealth", "LaserWeapon", "FirstBloodColour", "NumBloodColours", "RemExpObject", "NRPullVel", "NRReleaseVel", // FallDamage hack "FallDamageRight", "FallDamageLeft", "FallDamageDown", "FallDamageUp", "BloodStepUp", "BloodStepDown" }; string stringConstantsNamesCFGVer0[] = { "InitSound", "LoadingSounds", "Init_BaseIO", "Init_IRQ", "Init_DMA8", "Init_DMA16", "Init_DSPVersion", "Init_Colon", "Init_16bit", "Init_Autoinit", "Init_XMSSucc", "Init_FreeXMS", "Init_k", "LoadingAndThinking", "OK", "OK2", "PressAnyKey", "CommittedSuicideMsg", "KilledMsg", "YoureIt" }; std::string hackConstantsNamesVer0[] = { "HFallDamage", "HBonusReloadOnly", "HBonusSpawnRect", "HWormFloat", "HBonusOnlyHealth", "HBonusOnlyWeapon", "HBonusDisable", "HRemExp", "HSignedRecoil", "HAirJump", "HMultiJump" }; void Common::loadConstantsFromCFGVer0(string cfgFilePath) { Config cfg; cfg.readFile(cfgFilePath.c_str()); const Setting &constants = cfg.lookup("Constants"); const Setting &vconstants = constants["Values"]; for(int i = 0; i < MaxC; ++i) { C[i] = (int)vconstants[valueConstantsNamesCFGVer0[i]]; } const Setting &sconstants = constants["Strings"]; for(int i = 0; i < MaxS; ++i) { S[i]= (char const*)sconstants[stringConstantsNamesCFGVer0[i]]; } const Setting &hconstants = constants["Hacks"]; for(int i = 0; i < MaxH; ++i) { H[i] = (bool)hconstants[hackConstantsNamesVer0[i]]; } } lierolibre-0.5/src/configHelper.cpp000066400000000000000000000101441205125547100174100ustar00rootroot00000000000000/* * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "configHelper.hpp" #include #include #include #include using namespace std; using namespace libconfig; void ConfigHelper::putVersion(Setting &node, int version) { put(node, "Version", version); } // This templateification is somewhat unnecessay, could just use getUint8() template Dest ConfigHelper::getValue(Node &node, Idx index) { int value = node[index]; if(value <= numeric_limits::max() && value >= numeric_limits::min()) { return static_cast(value); } else { throw overflow_error("Config value is too big"); } } template Uint8 ConfigHelper::getValue(const Setting &node, int index); template Uint8 ConfigHelper::getValue(const Setting &node, char const* index); template Uint8 ConfigHelper::getValue(const Setting &node, string index); // Non-const template Uint8 ConfigHelper::getValue(Setting &node, int index); template Uint8 ConfigHelper::getValue(Setting &node, char const* index); template Uint8 ConfigHelper::getValue(Setting &node, string index); // Since we still need specialisation per value type (Setting::Type), // no need to templateify these void ConfigHelper::put(Setting &node, string variable, string value) { if(!node.exists(variable)) { node.add(variable, Setting::TypeString) = value; } else { Setting &var = node[variable]; var = value; } } void ConfigHelper::put(Setting &node, string variable, int value) { if(!node.exists(variable)) { node.add(variable, Setting::TypeInt) = value; } else { Setting &var = node[variable]; var = value; } } void ConfigHelper::put(Setting &node, string variable, Uint8 value) { if(!node.exists(variable)) { node.add(variable, Setting::TypeInt) = value; } else { Setting &var = node[variable]; var = value; } } void ConfigHelper::put(Setting &node, string variable, bool value) { if(!node.exists(variable)) { node.add(variable, Setting::TypeBoolean) = value; } else { Setting &var = node[variable]; var = value; } } Setting& ConfigHelper::mkArray(Setting &node, string arrayName) { if(node.exists(arrayName)) { node.remove(arrayName); } return node.add(arrayName, Setting::TypeArray); } Setting& ConfigHelper::mkList(Setting &node, string listName) { if(node.exists(listName)) { node.remove(listName); } return node.add(listName, Setting::TypeList); } Setting& ConfigHelper::getSubgroup(Setting &node, string groupName) { if(!node.exists(groupName)) { node.add(groupName, Setting::TypeGroup); } return node[groupName]; } lierolibre-0.5/src/configHelper.hpp000066400000000000000000000044351205125547100174230ustar00rootroot00000000000000/* * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef CONFIG_HELPER_HPP #define CONFIG_HELPER_HPP #include #include // Fixed-width integer types #include class ConfigHelper { public: void putVersion(libconfig::Setting &node, int version); template Dest getValue(Node &node, Idx index); void put(libconfig::Setting &node, std::string variable, bool value); void put(libconfig::Setting &node, std::string variable, Uint8 value); void put(libconfig::Setting &node, std::string variable, int value); void put(libconfig::Setting &node, std::string variable, std::string value); libconfig::Setting& mkArray(libconfig::Setting &node, std::string arrayName); libconfig::Setting& mkList(libconfig::Setting &node, std::string listName); libconfig::Setting& getSubgroup(libconfig::Setting &node, std::string groupName); }; #endif // CONFIG_HELPER_HPP lierolibre-0.5/src/configInit.cpp000066400000000000000000000150741205125547100171030ustar00rootroot00000000000000/* * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "configInit.hpp" #include #include #include #include "filesystem.hpp" #include "gfx.hpp" #include "common.hpp" #include "console.hpp" #include "reader.hpp" using namespace std; ConfigInit::ConfigInit(string filePath, gvl::shared_ptr a_common) { common = a_common; if (getExtension(filePath) == "EXE" || getExtension(filePath) == "exe") { setLieroPath(filePath); loadFromEXE(filePath); } else if (getExtension(filePath) == "cfg" || getExtension(filePath) == "txt") { setLieroPath(filePath); loadFromCFG(filePath); // Force reading from given CFG } else { setLieroPath(filePath); setLieroCFG(filePath); // Copies to $HOME if need be if (upgradeCFG(lieroCFG, CFGVERSION)) ; // upgrade function loaded the CFG else loadFromCFG(lieroCFG); } } ConfigInit::ConfigInit(string filePath, string dirPath, gvl::shared_ptr a_common) { common = a_common; if (getExtension(filePath) == "EXE" || getExtension(filePath) == "exe") { setLieroPath(dirPath); loadFromEXE(filePath); } else if (isDir(filePath)) { // User gave us two directories setLieroPath(dirPath); setLieroCFG(filePath); if (upgradeCFG(lieroCFG, CFGVERSION)) ; // upgrade function loaded the CFG else loadFromCFG(lieroCFG); } else { setLieroPath(dirPath); loadFromCFG(filePath); } } void ConfigInit::consoleBlurb() { Console::clear(); Console::writeTextBar(common->texts.copyright1, common->texts.copyrightBarFormat); Console::setAttributes(0x07); Console::writeLine(""); Console::write(common->S[LoadingAndThinking]); } void ConfigInit::loadFromEXE(string filePath) { setLieroEXE(filePath); common->texts.loadFromEXE(); initKeys(); common->loadConstantsFromEXE(); loadTablesFromEXE(); consoleBlurb(); common->font.loadFromEXE(); common->loadPalette(); gfx.loadPalette(); // This gets the palette from common gfx.loadMenus(); common->loadGfx(); common->loadMaterials(); common->loadWeapons(); common->loadTextures(); common->loadOthers(); } void ConfigInit::loadFromCFG(string filePath) { /* The neat exception methods were introduced in v 1.4 of libconfig * don't try to use them on earlier versions */ #if LIBCONFIGXX_VER_MAJOR >= 1 && LIBCONFIGXX_VER_MINOR >= 4 try { #endif int CFGFileVersion = common->readCFGVersion(filePath); if (CFGFileVersion > CFGVERSION) throw runtime_error("Config file '" + filePath + "' is of a newer, incompatible version"); common->texts.loadFromCFG(filePath); initKeys(); if (CFGFileVersion == 0) common->loadConstantsFromCFGVer0(filePath); else common->loadConstantsFromCFG(filePath); loadTablesFromCFG(filePath); consoleBlurb(); common->font.loadFromCFG(filePath); common->loadPaletteFromCFG(filePath); gfx.loadPalette(); // This gets the palette from common gfx.loadMenusFromCFG(filePath); common->loadGfxFromCFG(filePath); common->loadMaterialsFromCFG(filePath); common->loadWeaponsFromCFG(filePath); common->loadTexturesFromCFG(filePath); common->loadOthersFromCFG(filePath); #if LIBCONFIGXX_VER_MAJOR >= 1 && LIBCONFIGXX_VER_MINOR >= 4 } catch (const libconfig::ParseException& e) { cerr << e.getError() << " in file '" << e.getFile() << "' at line " << e.getLine() << endl; throw; } catch (const libconfig::SettingException e) { cerr << "Problem at " << e.getPath() << endl; throw; } #endif } void ConfigInit::write(string filePath) { /* The neat exception methods were introduced in v 1.4 of libconfig * don't try to use them on earlier versions */ #if LIBCONFIGXX_VER_MAJOR >= 1 && LIBCONFIGXX_VER_MINOR >= 4 try { #endif Console::writeLine(""); Console::writeLine("Saving variables to file '" + filePath +"'"); // Create empty if nonexistant if (!fileExists(filePath)) { ofstream f(filePath.c_str()); f << flush; f.close(); } common->writeCFGVersion(filePath, CFGVERSION); common->texts.writeToCFG(filePath); common->writeConstantsToCFG(filePath); writeTablesToCFG(filePath); common->font.writeToCFG(filePath); common->writePaletteToCFG(filePath); gfx.writeMenusToCFG(filePath); common->writeGfxToCFG(filePath); common->writeMaterialsToCFG(filePath); common->writeWeaponsToCFG(filePath); common->writeTexturesToCFG(filePath); common->writeOthersToCFG(filePath); #if LIBCONFIGXX_VER_MAJOR >= 1 && LIBCONFIGXX_VER_MINOR >= 4 } catch (const libconfig::ParseException& e) { cerr << e.getError() << " in file '" << e.getFile() << "' at line " << e.getLine() << endl; throw; } catch (const libconfig::SettingException e) { cerr << "Problem at " << e.getPath() << endl; throw; } #endif } bool ConfigInit::upgradeCFG(string filePath, int version) { try { int CFGFileVersion = common->readCFGVersion(filePath); if (CFGFileVersion > CFGVERSION) throw runtime_error("Config file '" + filePath + "' is of a newer, incompatible version"); else if (CFGFileVersion < CFGVERSION) { loadFromCFG(filePath); backupFile(filePath); rmFile(filePath); write(filePath); return true; } } catch (std::exception& e) { throw runtime_error("Error when upgrading CFG file: " + string(e.what())); } catch (...) { throw runtime_error("Error when upgrading CFG file"); } return false; // Not upgraded } lierolibre-0.5/src/configInit.hpp000066400000000000000000000041371205125547100171060ustar00rootroot00000000000000/* * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_CONFIG_INIT_HPP #define LIERO_CONFIG_INIT_HPP #define CFGVERSION 1 // Bump in case of CFG file format changes #include "configHelper.hpp" #include #include #include "common.hpp" class ConfigInit { public: ConfigInit(std::string filePath, gvl::shared_ptr a_common); ConfigInit(std::string filePath, std::string dirPath, gvl::shared_ptr a_common); void write(std::string cfgFilePath); private: void loadFromEXE(std::string exeFilePath); void loadFromCFG(std::string cfgFilePath); bool upgradeCFG(std::string filePath, int version); void consoleBlurb(); gvl::shared_ptr common; }; #endif // LIERO_CONFIG_INIT_HPP lierolibre-0.5/src/console.cpp000066400000000000000000000131221205125547100164440ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "console.hpp" //#include "game.hpp" //#include "constants.hpp" #include #include #if GVL_WIN32 #include "windows.h" namespace Console { namespace { HANDLE stdIn; HANDLE stdOut; CONSOLE_SCREEN_BUFFER_INFO bufferInfo; } WORD dosToWinForeColours[16] = { 0, FOREGROUND_BLUE, FOREGROUND_GREEN, FOREGROUND_BLUE | FOREGROUND_GREEN, FOREGROUND_RED, FOREGROUND_RED | FOREGROUND_BLUE, FOREGROUND_RED | FOREGROUND_GREEN, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE, FOREGROUND_INTENSITY, FOREGROUND_BLUE | FOREGROUND_INTENSITY, FOREGROUND_GREEN | FOREGROUND_INTENSITY, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY, FOREGROUND_RED | FOREGROUND_INTENSITY, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY }; WORD dosToWinBackColours[16] = { 0, BACKGROUND_BLUE, BACKGROUND_GREEN, BACKGROUND_BLUE | BACKGROUND_GREEN, BACKGROUND_RED, BACKGROUND_RED | BACKGROUND_BLUE, BACKGROUND_RED | BACKGROUND_GREEN, BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE, BACKGROUND_INTENSITY, BACKGROUND_BLUE | BACKGROUND_INTENSITY, BACKGROUND_GREEN | BACKGROUND_INTENSITY, BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY, BACKGROUND_RED | BACKGROUND_INTENSITY, BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY, BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY, BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY }; void init() { stdIn = GetStdHandle(STD_INPUT_HANDLE); stdOut = GetStdHandle(STD_OUTPUT_HANDLE); GetConsoleScreenBufferInfo(stdOut, &bufferInfo); } void setAttributes(int attr) { WORD f = dosToWinForeColours[attr & 0xf] | dosToWinBackColours[(attr >> 4) & 0xf]; SetConsoleTextAttribute(stdOut, f); } int getAttributes() { WORD const allFore = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY; WORD const allBack = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY; CONSOLE_SCREEN_BUFFER_INFO info; GetConsoleScreenBufferInfo(stdOut, &info); int fore = 0x7; int back = 0x0; for(int i = 0; i < 16; ++i) { if((info.wAttributes & allFore) == dosToWinForeColours[i]) fore = i; if((info.wAttributes & allBack) == dosToWinBackColours[i]) back = i; } return (back << 4) | fore; } void write(std::string const& str) { DWORD dummy; WriteConsole(stdOut, str.data(), DWORD(str.size()), &dummy, 0); } void writeLine(std::string const& str) { DWORD dummy; WriteConsole(stdOut, str.data(), DWORD(str.size()), &dummy, 0); WriteConsole(stdOut, "\r\n", 2, &dummy, 0); } void writeTextBar(std::string const& str, int barFormat) { char const* ptr = str.data(); std::size_t len = str.size(); if(ptr[0] == 0) { setAttributes(ptr[1] + (ptr[2] << 4)); ptr += 3; len -= 3; } DWORD dummy; WriteConsole(stdOut, ptr, DWORD(len), &dummy, 0); setAttributes(barFormat); int left = bufferInfo.dwSize.X - int(len); for(int i = 0; i < left; ++i) WriteConsole(stdOut, " ", 1, &dummy, 0); } void waitForAnyKey() { FlushConsoleInputBuffer(stdIn); INPUT_RECORD input[1]; do { DWORD read = 0; ReadConsoleInput(stdIn, input, 1, &read); } while(input[0].EventType != KEY_EVENT); } void clear() { DWORD dummy; COORD ul = {0, 0}; FillConsoleOutputAttribute( stdOut, 0, int(bufferInfo.dwSize.X) * bufferInfo.dwSize.Y, ul, &dummy); FillConsoleOutputCharacter( stdOut, 32, int(bufferInfo.dwSize.X) * bufferInfo.dwSize.Y, ul, &dummy); SetConsoleCursorPosition(stdOut, ul); } } #else namespace Console { void init() { } void setAttributes(int attr) { } int getAttributes() { return 0x07; } void write(std::string const& str) { std::cout << str; } void writeLine(std::string const& str) { std::cout << str << std::endl; } void writeTextBar(std::string const& str, int barFormat) { std::cout << str << std::endl; } void waitForAnyKey() { } void clear() { } } #endif namespace Console { void writeWarning(std::string const& str) { Console::LocalAttributes la(0x4f); Console::write("WARNING: "); Console::writeLine(str); } } lierolibre-0.5/src/console.hpp000066400000000000000000000037771205125547100164700ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_CONSOLE_HPP #define LIERO_CONSOLE_HPP #include namespace Console { void init(); void test(); void waitForAnyKey(); void setAttributes(int attr); int getAttributes(); void write(std::string const& str); void writeLine(std::string const& str); void writeTextBar(std::string const& str, int barFormat); void clear(); void writeWarning(std::string const& str); struct LocalAttributes { LocalAttributes(int attr) : oldAttributes(getAttributes()) { setAttributes(attr); } ~LocalAttributes() { setAttributes(oldAttributes); } int oldAttributes; }; } #endif // LIERO_CONSOLE_HPP lierolibre-0.5/src/constants.cpp000066400000000000000000000264631205125547100170320ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "constants.hpp" #include "reader.hpp" #include "game.hpp" // TODO: We should move Common somewhere else #include #include "configHelper.hpp" std::string valueConstantsNames[] = { "NRInitialLength", "NRAttachLength", "MinBounceUp", "MinBounceDown", "MinBounceLeft", "MinBounceRight", "WormGravity", "WalkVelLeft", "MaxVelLeft", "WalkVelRight", "MaxVelRight", "JumpForce", "MaxAimVelLeft", "AimAccLeft", "MaxAimVelRight", "AimAccRight", "NinjaropeGravity", "NRMinLength", "NRMaxLength", "BonusGravity", "WormFricMult", "WormFricDiv", "WormMinSpawnDistLast", "WormMinSpawnDistEnemy", "WormSpawnRectX", "WormSpawnRectY", "WormSpawnRectW", "WormSpawnRectH", "AimFricMult", "AimFricDiv", "NRThrowVelX", "NRThrowVelY", "NRForceShlX", "NRForceDivX", "NRForceShlY", "NRForceDivY", "NRForceLenShl", "BonusBounceMul", "BonusBounceDiv", "BonusFlickerTime", "AimMaxRight", "AimMinRight", "AimMaxLeft", "AimMinLeft", "NRPullVel", "NRReleaseVel", "NRColourBegin", "NRColourEnd", "BonusExplodeRisk", "BonusHealthVar", "BonusMinHealth", "LaserWeapon", "FirstBloodColour", "NumBloodColours", "BObjGravity", "BonusDropChance", "SplinterLarpaVelDiv", "SplinterCracklerVelDiv", "BloodStepUp", "BloodStepDown", "BloodLimit", // FallDamage hack "FallDamageRight", "FallDamageLeft", "FallDamageDown", "FallDamageUp", // WormFloat hack "WormFloatLevel", "WormFloatPower", // BonusSpawn hack "BonusSpawnRectX", "BonusSpawnRectY", "BonusSpawnRectW", // This is used even when the hack isn't enabled "BonusSpawnRectH", // -==- // RemExp hack "RemExpObject" }; std::string stringConstantsNames[] = { "InitSound", "LoadingSounds", "LoadingAndThinking", "OK", "OK2", "PressAnyKey", "CommittedSuicideMsg", "KilledMsg", "YoureIt", "Init_BaseIO", "Init_IRQ", "Init_DMA8", "Init_DMA16", "Init_DSPVersion", "Init_Colon", "Init_16bit", "Init_Autoinit", "Init_XMSSucc", "Init_FreeXMS", "Init_k" }; std::string hackConstantsNames[] = { "HFallDamage", "HBonusReloadOnly", "HBonusSpawnRect", "HWormFloat", "HBonusOnlyHealth", "HBonusOnlyWeapon", "HBonusDisable", "HRemExp", "HSignedRecoil", "HAirJump", "HMultiJump" }; int CSint32desc[][3] = { {NRInitialLength, 0x32D7, 0x32DD}, {NRAttachLength, 0xA679, 0xA67F}, {0, -1, -1} }; int CSint24desc[][3] = { {MinBounceUp, 0x3B7D, 0x3B74}, {MinBounceDown, 0x3B00, 0x3AF7}, {MinBounceLeft, 0x3A83, 0x3A7A}, {MinBounceRight, 0x3A06, 0x39FD}, {WormGravity, 0x3BDE, 0x3BD7}, {WalkVelLeft, 0x3F97, 0x3F9D}, {MaxVelLeft, 0x3F8C, 0x3F83}, {WalkVelRight, 0x4018, 0x401E}, {MaxVelRight, 0x400D, 0x4004}, {JumpForce, 0x3327, 0x332D}, {MaxAimVelLeft, 0x30F2, 0x30E9}, {AimAccLeft, 0x30FD, 0x3103}, {MaxAimVelRight, 0x311A, 0x3111}, {AimAccRight, 0x3125, 0x312B}, {NinjaropeGravity, 0xA895, 0xA89B}, {NRMinLength, 0x3206, 0x31FD}, {NRMaxLength, 0x3229, 0x3220}, {BonusGravity, 0x72C3, 0x72C9}, {BObjGravity, 0x744A, 0x7450}, // WormFloat hack {WormFloatPower, 0x29DB, 0x29E1}, {0, -1, -1} }; int CUint16desc[][2] = { {BloodLimit, 0xE686}, {0, -1} }; int CSint16desc[][2] = { {WormFricMult, 0x39BD}, {WormFricDiv, 0x39C7}, {WormMinSpawnDistLast, 0x242E}, {WormMinSpawnDistEnemy, 0x244B}, {WormSpawnRectX, 0x4913}, {WormSpawnRectY, 0x4925}, {WormSpawnRectW, 0x490B}, {WormSpawnRectH, 0x491D}, {AimFricMult, 0x3003}, {AimFricDiv, 0x300D}, {NRThrowVelX, 0x329B}, {NRThrowVelY, 0x32BF}, {NRForceShlX, 0xA8AD}, {NRForceDivX, 0xA8B7}, {NRForceShlY, 0xA8DA}, {NRForceDivY, 0xA8E4}, {NRForceLenShl, 0xA91E}, {BonusBounceMul, 0x731F}, {BonusBounceDiv, 0x7329}, {BonusFlickerTime, 0x87B8}, {BonusDropChance, 0xBECA}, {SplinterLarpaVelDiv, 0x677D}, {SplinterCracklerVelDiv, 0x67D0}, // WormFloat hack {WormFloatLevel, 0x29D3}, // BonusSpawnRect hack {BonusSpawnRectX, 0x2319}, {BonusSpawnRectY, 0x2327}, {BonusSpawnRectW, 0x2311}, // This is used even when the hack isn't enabled {BonusSpawnRectH, 0x231F}, // -==- {0, -1} }; int CUint8desc[][2] = { {AimMaxRight, 0x3030}, {AimMinRight, 0x304A}, {AimMaxLeft, 0x3066}, {AimMinLeft, 0x3080}, {NRColourBegin, 0x10FD2}, {NRColourEnd, 0x11069}, {BonusExplodeRisk, 0x2DB2}, {BonusHealthVar, 0x2D56}, {BonusMinHealth, 0x2D5D}, {LaserWeapon, 0x7255}, {FirstBloodColour, 0x2388}, {NumBloodColours, 0x2381}, {RemExpObject, 0x8F8B}, {0, -1} }; int CSint8desc[][2] = { {NRPullVel, 0x31D0}, {NRReleaseVel, 0x31F0}, // FallDamage hack {FallDamageRight, 0x3A0E}, {FallDamageLeft, 0x3A8B}, {FallDamageDown, 0x3B08}, {FallDamageUp, 0x3B85}, {BloodStepUp, 0xE67B}, {BloodStepDown, 0xE68E}, {0, -1} }; int Sstringdesc[][2] = { {InitSound, 0x177F}, {LoadingSounds, 0x18F2}, {Init_BaseIO, 0x17DD}, {Init_IRQ, 0x17E5}, {Init_DMA8, 0x17EE}, {Init_DMA16, 0x17F8}, {Init_DSPVersion, 0x181E}, {Init_Colon, 0x182B}, {Init_16bit, 0x182F}, {Init_Autoinit, 0x1840}, {Init_XMSSucc, 0x189D}, {Init_FreeXMS, 0x18C5}, {Init_k, 0x18D8}, {LoadingAndThinking, 0xFB92}, {OK, 0xFBA8}, {OK2, 0x190E}, {PressAnyKey, 0xFBAB}, {CommittedSuicideMsg, 0xE70C}, {KilledMsg, 0xE71F}, {YoureIt, 0x75C5}, {0, -1} }; struct HackDesc { int which; int (*indicators)[2]; }; int hFallDamageInd[][2] = { {0x3A0A, 0x26}, {0x3A87, 0x26}, {0x3B04, 0x26}, {0x3B81, 0x26}, {-1, 0} }; int hBonusReloadOnlyInd[][2] = { {0x2DB1, 0xEB}, // We check one byte only, because ProMode has a silly jump destination {-1, 0} }; int hBonusSpawnRectInd[][2] = { {0x2318, 0x05}, // These are the first bytes of the add instructions that offset the spawn {0x2323, 0x05}, {-1, 0} }; int hBonusOnlyHealthInd[][2] = { {0x228B, 0xB0}, {0x228C, 0x02}, {-1, 0} }; int hBonusOnlyWeaponInd[][2] = { {0x228B, 0xB0}, {0x228C, 0x01}, {-1, 0} }; int hBonusDisableInd[][2] = { {0xBED3, 0xEB}, {-1, 0} }; int hWormFloatInd[][2] = { {0x29D7, 0x26}, // 0x26 is the first byte of the sub instruction {0x29DA, 0x34}, // 0x34 is the offset to part of velY of the worm {-1, 0} }; int hRemExpInd[][2] = { // Start of the mov instruction that zeroes the timeout counter {0x8fc9, 0x26}, {0x8fca, 0xc7}, {-1, 0} }; int hSignedRecoilInd[][2] = { {0x38AC, 0x98}, {0x38EC, 0x98}, {-1, 0} }; int hAirJumpInd[][2] = { {0x3313, 0xEB}, {0x3314, 0x06}, {-1, 0} }; int hMultiJumpInd[][2] = { {0x331B, 0xEB}, {0x331C, 0x06}, {-1, 0} }; HackDesc Hhackdesc[] = { {HFallDamage, hFallDamageInd}, {HBonusReloadOnly, hBonusReloadOnlyInd}, {HBonusSpawnRect, hBonusSpawnRectInd}, {HWormFloat, hWormFloatInd}, {HBonusOnlyHealth, hBonusOnlyHealthInd}, {HBonusOnlyWeapon, hBonusOnlyWeaponInd}, {HBonusDisable, hBonusDisableInd}, {HRemExp, hRemExpInd}, {HSignedRecoil, hSignedRecoilInd}, {HAirJump, hAirJumpInd}, {HMultiJump, hMultiJumpInd}, {0, 0} }; void Common::loadConstantsFromEXE() { FILE* exe = openLieroEXE(); for(int i = 0; CSint32desc[i][1] >= 0; ++i) { fseek(exe, CSint32desc[i][1], SEEK_SET); int a = readUint16(exe); fseek(exe, CSint32desc[i][2], SEEK_SET); int b = readSint16(exe); C[CSint32desc[i][0]] = a + (b << 16); //std::cout << C[CSint32desc[i][0]] << std::endl; } for(int i = 0; CSint24desc[i][1] >= 0; ++i) { fseek(exe, CSint24desc[i][1], SEEK_SET); int a = readUint16(exe); fseek(exe, CSint24desc[i][2], SEEK_SET); int b = readSint8(exe); C[CSint24desc[i][0]] = a + (b << 16); //std::cout << C[CSint24desc[i][0]] << std::endl; } for(int i = 0; CSint16desc[i][1] >= 0; ++i) { fseek(exe, CSint16desc[i][1], SEEK_SET); C[CSint16desc[i][0]] = readSint16(exe); //std::cout << C[CSint16desc[i][0]] << std::endl; } for(int i = 0; CUint16desc[i][1] >= 0; ++i) { fseek(exe, CUint16desc[i][1], SEEK_SET); C[CUint16desc[i][0]] = readUint16(exe); //std::cout << C[CUint16desc[i][0]] << std::endl; } for(int i = 0; CSint8desc[i][1] >= 0; ++i) { fseek(exe, CSint8desc[i][1], SEEK_SET); C[CSint8desc[i][0]] = readSint8(exe); } for(int i = 0; CUint8desc[i][1] >= 0; ++i) { fseek(exe, CUint8desc[i][1], SEEK_SET); C[CUint8desc[i][0]] = readUint8(exe); //std::cout << C[CUint8desc[i][0]] << std::endl; } for(int i = 0; Sstringdesc[i][1] >= 0; ++i) { S[Sstringdesc[i][0]] = readPascalStringAt(exe, Sstringdesc[i][1]); } for(int i = 0; Hhackdesc[i].indicators; ++i) { int (*ind)[2] = Hhackdesc[i].indicators; bool active = true; for(; (*ind)[0] >= 0; ++ind) { std::fseek(exe, (*ind)[0], SEEK_SET); int b = std::fgetc(exe); if(b != (*ind)[1]) { active = false; break; } } H[Hhackdesc[i].which] = active; } } void Common::loadConstantsFromCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &constants = cfg.lookup("Constants"); const libconfig::Setting &vconstants = constants["Values"]; for(int i = 0; i < MaxC; ++i) { C[i] = (int)vconstants[valueConstantsNames[i]]; } const libconfig::Setting &sconstants = constants["Strings"]; for(int i = 0; i < MaxS; ++i) { S[i]= (char const*)sconstants[stringConstantsNames[i]]; } const libconfig::Setting &hconstants = constants["Hacks"]; for(int i = 0; i < MaxH; ++i) { H[i] = (bool)hconstants[hackConstantsNames[i]]; } } void Common::writeConstantsToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelper; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &constants = cfgHelper.getSubgroup(root, "Constants"); libconfig::Setting &vconstants = cfgHelper.getSubgroup(constants, "Values"); for(int i = 0; i < MaxC; ++i) { cfgHelper.put(vconstants, valueConstantsNames[i], C[i]); } libconfig::Setting &sconstants = cfgHelper.getSubgroup(constants, "Strings"); for(int i = 0; i < MaxS; ++i) { cfgHelper.put(sconstants, stringConstantsNames[i], S[i]); } libconfig::Setting &hconstants = cfgHelper.getSubgroup(constants, "Hacks"); for(int i = 0; i < MaxH; ++i) { cfgHelper.put(hconstants, hackConstantsNames[i], H[i]); } cfg.writeFile(cfgFilePath.c_str()); } lierolibre-0.5/src/constants.hpp000066400000000000000000000065541205125547100170360ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_CONSTANTS_HPP #define LIERO_CONSTANTS_HPP #include enum { NRInitialLength, NRAttachLength, MinBounceUp, MinBounceDown, MinBounceLeft, MinBounceRight, WormGravity, WalkVelLeft, MaxVelLeft, WalkVelRight, MaxVelRight, JumpForce, MaxAimVelLeft, AimAccLeft, MaxAimVelRight, AimAccRight, NinjaropeGravity, NRMinLength, NRMaxLength, BonusGravity, WormFricMult, WormFricDiv, WormMinSpawnDistLast, WormMinSpawnDistEnemy, WormSpawnRectX, WormSpawnRectY, WormSpawnRectW, WormSpawnRectH, AimFricMult, AimFricDiv, NRThrowVelX, NRThrowVelY, NRForceShlX, NRForceDivX, NRForceShlY, NRForceDivY, NRForceLenShl, BonusBounceMul, BonusBounceDiv, BonusFlickerTime, AimMaxRight, AimMinRight, AimMaxLeft, AimMinLeft, NRPullVel, NRReleaseVel, NRColourBegin, NRColourEnd, BonusExplodeRisk, BonusHealthVar, BonusMinHealth, LaserWeapon, FirstBloodColour, NumBloodColours, BObjGravity, BonusDropChance, SplinterLarpaVelDiv, SplinterCracklerVelDiv, BloodStepUp, BloodStepDown, BloodLimit, // FallDamage hack FallDamageRight, FallDamageLeft, FallDamageDown, FallDamageUp, // WormFloat hack WormFloatLevel, WormFloatPower, // BonusSpawn hack BonusSpawnRectX, BonusSpawnRectY, BonusSpawnRectW, // This is used even when the hack isn't enabled BonusSpawnRectH, // -==- // RemExp hack RemExpObject, MaxC }; enum { InitSound, LoadingSounds, LoadingAndThinking, OK, OK2, PressAnyKey, CommittedSuicideMsg, KilledMsg, YoureIt, Init_BaseIO, Init_IRQ, Init_DMA8, Init_DMA16, Init_DSPVersion, Init_Colon, Init_16bit, Init_Autoinit, Init_XMSSucc, Init_FreeXMS, Init_k, MaxS }; enum { HFallDamage, HBonusReloadOnly, HBonusSpawnRect, HBonusOnlyHealth, HBonusOnlyWeapon, HBonusDisable, HWormFloat, HRemExp, HSignedRecoil, HAirJump, HMultiJump, MaxH }; // TODO: Move these to Common #endif // LIERO_CONSTANTS_HPP lierolibre-0.5/src/controller/000077500000000000000000000000001205125547100164625ustar00rootroot00000000000000lierolibre-0.5/src/controller/commonController.cpp000066400000000000000000000045601205125547100225270ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "commonController.hpp" #include "../gfx.hpp" CommonController::CommonController() : frameSkip(1) , inverseFrameSkip(false) , cycles(0) { } bool CommonController::process() { int newFrameSkip = 0; if(gfx.testSDLKeyOnce(SDLK_1)) newFrameSkip = 1; else if(gfx.testSDLKeyOnce(SDLK_2)) newFrameSkip = 2; else if(gfx.testSDLKeyOnce(SDLK_3)) newFrameSkip = 4; else if(gfx.testSDLKeyOnce(SDLK_4)) newFrameSkip = 8; else if(gfx.testSDLKeyOnce(SDLK_5)) newFrameSkip = 16; else if(gfx.testSDLKeyOnce(SDLK_6)) newFrameSkip = 32; else if(gfx.testSDLKeyOnce(SDLK_7)) newFrameSkip = 64; else if(gfx.testSDLKeyOnce(SDLK_8)) newFrameSkip = 128; else if(gfx.testSDLKeyOnce(SDLK_9)) newFrameSkip = 256; else if(gfx.testSDLKeyOnce(SDLK_0)) newFrameSkip = 512; if(newFrameSkip) { inverseFrameSkip = (gfx.testSDLKey(SDLK_RCTRL) || gfx.testSDLKey(SDLK_LCTRL)); frameSkip = newFrameSkip; } ++cycles; return true; } lierolibre-0.5/src/controller/commonController.hpp000066400000000000000000000033511205125547100225310ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_CONTROLLER_COMMON_CONTROLLER_HPP #define LIERO_CONTROLLER_COMMON_CONTROLLER_HPP #include "controller.hpp" struct CommonController : Controller { CommonController(); bool process(); int frameSkip; bool inverseFrameSkip; int cycles; }; #endif // LIERO_CONTROLLER_COMMON_CONTROLLER_HPP lierolibre-0.5/src/controller/controller.hpp000066400000000000000000000044341205125547100213630ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_9CD8C22BC14D4832AE2A859530FE6339 #define UUID_9CD8C22BC14D4832AE2A859530FE6339 struct Level; struct Game; struct Controller { virtual ~Controller() { } // Called when a key event is forwarded to the controller virtual void onKey(int key, bool state) = 0; // Called when the controller loses focus. When not focused, it will not receive key events among other things. virtual void unfocus() = 0; // Called when the controller gets focus. virtual void focus() = 0; virtual bool process() = 0; virtual void draw() = 0; // Returns true if the game is still running. The menu should check this to decide whether to show the resume option. virtual bool running() = 0; virtual Level* currentLevel() = 0; virtual Game* currentGame() = 0; virtual void swapLevel(Level& newLevel) = 0; }; #endif // UUID_9CD8C22BC14D4832AE2A859530FE6339 lierolibre-0.5/src/controller/localController.cpp000066400000000000000000000155451205125547100223360ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "localController.hpp" #include "../keys.hpp" #include "../gfx.hpp" #include "../reader.hpp" #include "../filesystem.hpp" #include LocalController::LocalController(gvl::shared_ptr common, gvl::shared_ptr settings) : game(common, settings) , state(StateInitial) , fadeValue(0) , goingToMenu(false) { game.createDefaults(); } LocalController::~LocalController() { endRecord(); } void LocalController::onKey(int key, bool keyState) { Worm::Control control; Worm* worm = game.findControlForKey(key, control); if(worm) { worm->cleanControlStates.set(control, keyState); if(control < Worm::MaxControl) { // Only real controls worm->setControlState(control, keyState); } if(worm->cleanControlStates[WormSettings::Dig]) { worm->press(Worm::Left); worm->press(Worm::Right); } else { if(!worm->cleanControlStates[Worm::Left]) worm->release(Worm::Left); if(!worm->cleanControlStates[Worm::Right]) worm->release(Worm::Right); } } if(key == DkEscape && !goingToMenu) { fadeValue = 31; goingToMenu = true; } } // Called when the controller loses focus. When not focused, it will not receive key events among other things. void LocalController::unfocus() { if(replay.get()) replay->unfocus(); if(state == StateWeaponSelection) ws->unfocus(); } // Called when the controller gets focus. void LocalController::focus() { if(state == StateGameEnded) { goingToMenu = true; fadeValue = 0; return; } if(state == StateWeaponSelection) ws->focus(); if(replay.get()) replay->focus(); if(state == StateInitial) changeState(StateWeaponSelection); game.focus(); goingToMenu = false; fadeValue = 0; } bool LocalController::process() { if(state == StateWeaponSelection) { if(ws->processFrame()) changeState(StateGame); } else if(state == StateGame || state == StateGameEnded) { int realFrameSkip = inverseFrameSkip ? !(cycles % frameSkip) : frameSkip; for(int i = 0; i < realFrameSkip && (state == StateGame || state == StateGameEnded); ++i) { for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& worm = *game.worms[i]; if(worm.ai.get()) worm.ai->process(); } if(replay.get()) { try { replay->recordFrame(); } catch(std::runtime_error& e) { Console::writeWarning(std::string("Error recording replay frame: ") + e.what()); Console::writeWarning("Replay recording aborted"); replay.reset(); } } game.processFrame(); if(game.isGameOver()) { changeState(StateGameEnded); } } } //CommonController::process(); if(goingToMenu) { if(fadeValue > 0) fadeValue -= 1; else { if(state == StateGameEnded) endRecord(); return false; } } else { if(fadeValue < 33) { fadeValue += 1; } } return true; } void LocalController::draw() { if(state == StateWeaponSelection) { ws->draw(); } else if(state == StateGame || state == StateGameEnded || state == StateInitial) { game.draw(); } gfx.fadeValue = fadeValue; } void LocalController::changeState(State newState) { if(state == newState) return; // NOTE: We prepare new state before destroying the old. // e.g. weapon selection is destroyed first after we successfully // started recording. // NOTE: Must do this here before starting recording! if(state == StateWeaponSelection) { ws->finalize(); } if(newState == StateWeaponSelection) { ws.reset(new WeaponSelection(game)); } else if(newState == StateGame) { // NOTE: This must be done before the replay recording starts below for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& worm = *game.worms[i]; worm.lives = game.settings->lives; } game.startGame(); if(game.settings->extensions && game.settings->recordReplays) { try { std::time_t ticks = std::time(0); std::tm* now = std::localtime(&ticks); char buf[512]; std::strftime(buf, sizeof(buf), " %Y-%m-%d %H.%M.%S.lrp", now); std::string prefix; for(std::size_t i = 0; i < 2; ++i) { Worm& worm = *game.worms[i]; std::string const& name = worm.settings->name; int chars = 0; if(i > 0) prefix.push_back('-'); for(std::size_t c = 0; c < name.size() && chars < 4; ++c, ++chars) { unsigned char ch = (unsigned char)name[c]; if(std::isalnum(ch)) prefix.push_back(ch); } } std::string path = joinPath(data_path->configdir(), prefix + buf); replay.reset(new ReplayWriter(gvl::stream_ptr(new gvl::fstream(path.c_str(), "wb")))); replay->beginRecord(game); } catch(std::runtime_error& e) { //Console::writeWarning(); gfx.infoBox(std::string("Error starting replay recording: ") + e.what()); goingToMenu = true; fadeValue = 0; return; } } } else if(newState == StateGameEnded) { if(!goingToMenu) { fadeValue = 180; goingToMenu = true; } } if(state == StateWeaponSelection) { fadeValue = 33; ws.reset(); } state = newState; } void LocalController::endRecord() { if(replay.get()) { replay.reset(); } } void LocalController::swapLevel(Level& newLevel) { currentLevel()->swap(newLevel); } Level* LocalController::currentLevel() { return &game.level; } Game* LocalController::currentGame() { return &game; } bool LocalController::running() { return state != StateGameEnded && state != StateInitial; } lierolibre-0.5/src/controller/localController.hpp000066400000000000000000000052301205125547100223310ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_CONTROLLER_LOCAL_CONTROLLER_HPP #define LIERO_CONTROLLER_LOCAL_CONTROLLER_HPP #include "commonController.hpp" #include "../game.hpp" #include "../worm.hpp" #include "../weapsel.hpp" #include "../replay.hpp" #include "../console.hpp" #include #include #include #include struct WeaponSelection; struct ReplayWriter; struct LocalController : CommonController { enum State { StateInitial, StateWeaponSelection, StateGame, StateGameEnded }; LocalController(gvl::shared_ptr common, gvl::shared_ptr settings); ~LocalController(); void onKey(int key, bool keyState); // Called when the controller loses focus. When not focused, it will not receive key events among other things. void unfocus(); // Called when the controller gets focus. void focus(); bool process(); void draw(); void changeState(State newState); void endRecord(); void swapLevel(Level& newLevel); Level* currentLevel(); Game* currentGame(); bool running(); Game game; std::auto_ptr ws; State state; int fadeValue; bool goingToMenu; std::auto_ptr replay; }; #endif // LIERO_CONTROLLER_LOCAL_CONTROLLER_HPP lierolibre-0.5/src/controller/replayController.cpp000066400000000000000000000110561205125547100225310ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "replayController.hpp" #include "../game.hpp" ReplayController::ReplayController(gvl::shared_ptr common, gvl::stream_ptr source) : state(StateInitial) , fadeValue(0) , goingToMenu(false) , replay(new ReplayReader(source)) , common(common) { } void ReplayController::onKey(int key, bool keyState) { if(key == DkEscape && !goingToMenu) { fadeValue = 31; goingToMenu = true; } } // Called when the controller loses focus. When not focused, it will not receive key events among other things. void ReplayController::unfocus() { } // Called when the controller gets focus. void ReplayController::focus() { if(state == StateGameEnded) { goingToMenu = true; fadeValue = 0; return; } if(state == StateInitial) { try { game = replay->beginPlayback(common); } catch(std::runtime_error& e) { //Console::writeWarning(std::string("Error starting replay playback: ") + e.what()); gfx.infoBox(std::string("Error starting replay playback: ") + e.what()); goingToMenu = true; fadeValue = 0; return; } // Changing state first when game is available changeState(StateGame); } game->focus(); goingToMenu = false; fadeValue = 0; } bool ReplayController::process() { if(state == StateGame || state == StateGameEnded) { int realFrameSkip = inverseFrameSkip ? !(cycles % frameSkip) : frameSkip; for(int i = 0; i < realFrameSkip && (state == StateGame || state == StateGameEnded); ++i) { if(replay.get()) { try { if(!replay->playbackFrame()) { // End of replay changeState(StateGameEnded); } } catch(gvl::stream_error& e) { gfx.infoBox(std::string("Stream error in replay: ") + e.what()); //Console::writeWarning(std::string("Stream error in replay: ") + e.what()); changeState(StateGameEnded); } catch(gvl::archive_check_error& e) { gfx.infoBox(std::string("Archive error in replay: ") + e.what()); //Console::writeWarning(std::string("Archive error in replay: ") + e.what()); changeState(StateGameEnded); } } game->processFrame(); } if(game->isGameOver() && !goingToMenu) { fadeValue = 180; goingToMenu = true; } } CommonController::process(); if(goingToMenu) { if(fadeValue > 0) fadeValue -= 1; else return false; } else { if(fadeValue < 33) { fadeValue += 1; } } return true; } void ReplayController::draw() { if(state == StateGame || state == StateGameEnded) { game->draw(true); } gfx.fadeValue = fadeValue; } void ReplayController::changeState(State newState) { if(state == newState) return; if(newState == StateGame) game->startGame(); else if(newState == StateGameEnded) { if(!goingToMenu) { fadeValue = 180; goingToMenu = true; } replay.reset(); } state = newState; } void ReplayController::swapLevel(Level& newLevel) { currentLevel()->swap(newLevel); } Level* ReplayController::currentLevel() { if(game.get() && replay.get()) return &game->level; return 0; } Game* ReplayController::currentGame() { return game.get(); } bool ReplayController::running() { return state != StateGameEnded && state != StateInitial; } lierolibre-0.5/src/controller/replayController.hpp000066400000000000000000000051721205125547100225400ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_CONTROLLER_REPLAY_CONTROLLER_HPP #define LIERO_CONTROLLER_REPLAY_CONTROLLER_HPP #include "commonController.hpp" #include "../keys.hpp" #include "../gfx.hpp" #include "../worm.hpp" #include "../weapsel.hpp" #include "../replay.hpp" #include "../console.hpp" #include #include #include #include struct Game; struct ReplayController : CommonController { enum State { StateInitial, StateGame, StateGameEnded }; ReplayController(gvl::shared_ptr common, gvl::stream_ptr source); void onKey(int key, bool keyState); // Called when the controller loses focus. When not focused, it will not receive key events among other things. void unfocus(); // Called when the controller gets focus. void focus(); bool process(); void draw(); void changeState(State newState); void swapLevel(Level& newLevel); Level* currentLevel(); Game* currentGame(); bool running(); std::auto_ptr game; State state; int fadeValue; bool goingToMenu; std::auto_ptr replay; gvl::shared_ptr common; //gvl::shared_ptr settings; }; #endif // LIERO_CONTROLLER_REPLAY_CONTROLLER_HPP lierolibre-0.5/src/dataPath.cpp000066400000000000000000000115351205125547100165360ustar00rootroot00000000000000/* * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // Compile via ~$ g++ -c dataPath.cpp #include "dataPath.hpp" #include #include #include #include #include #include #include // For GVL_WINDOWS #include "filesystem.hpp" using namespace std; #if GVL_WINDOWS #include // _mkdir() #endif string create_configdir(string directory) { #if GVL_WINDOWS if (_mkdir(directory.c_str()) == 0) { return directory; #else if (mkdir(directory.c_str(), 0777) == 0) { return directory; #endif } else if (errno == EEXIST) { return directory; } else { throw runtime_error("Unable to create configdir '" + directory + "'"); } } DataPath::DataPath(string a_readonly_path) { if (isDir(a_readonly_path)) readonly_path = a_readonly_path; // Don't getRoot on a dir else readonly_path = getRoot(a_readonly_path); #if GVL_WINDOWS configdotdir = "user"; #else configdotdir = string(getenv("HOME")) + '/' + ".lierolibre"; #endif // Map of files we may want to return path to // should probably be read from plaintext file // true means writable, false read-only file_access_map.insert(pair("LIERO.EXE", false)); file_access_map.insert(pair("LIERO.CHR", false)); file_access_map.insert(pair("LIERO.SND", false)); file_access_map.insert(pair("NAMES.DAT", false)); file_access_map.insert(pair("LIERO.OPT", true)); file_access_map.insert(pair("LIERO.DAT", true)); file_access_map.insert(pair("liero.cfg", true)); file_access_map.insert(pair("lierocfg.txt", true)); } string DataPath::file(string filename) { fstream file_writable; ifstream file_readonly; string filepath_readonly = readonly_path + '/' + filename; string filepath_writable = configdotdir + '/' + filename; if (file_access_map.count(filename) == 0) { if (filename.substr(filename.find_last_of(".") + 1) == "DAT") { // file ends with .DAT return filepath_writable; } else { throw runtime_error("Unknown file '" + filename + "'"); } } bool file_shouldbe_writable = file_access_map.find(filename)->second; if (file_shouldbe_writable) { file_writable.open(filepath_writable.c_str(), ios::binary | ios::in); if (file_writable.is_open()) { // File exists in configdir return filepath_writable; } else { // file does not exist in configdir file_readonly.open(filepath_readonly.c_str(), ios::binary); if (file_readonly.is_open()) { // file exists in readonly create_configdir(configdotdir); file_writable.open( filepath_writable.c_str(), ios::binary | ios::out); if (file_writable.is_open()) { file_writable << file_readonly.rdbuf(); // error handling return filepath_writable; } else { // couldn't open writable file throw runtime_error("Could not open file '" + filepath_writable + "' for writing"); } } else { // file does not exist anywhere throw runtime_error("Could not open file '" + filepath_writable + "'"); } } } else { // file should not be writable file_readonly.open(filepath_readonly.c_str()); if (file_readonly.is_open()) { // file exists in readonly return filepath_readonly; } else { // file does not exist anywhere throw runtime_error("Could not open file '" + filepath_readonly + "'"); } } } string DataPath::configdir(void) { return create_configdir(configdotdir); } lierolibre-0.5/src/dataPath.hpp000066400000000000000000000055301205125547100165410ustar00rootroot00000000000000/* This object is intended to simplify integration into a GNU/Linux multi-user * system. * It contains two methods, file() and configdir(). * The constructor requires a path to a directory containing the (readonly) * Liero data files. * * file() is used for getting the path to a file that Liero might want to read * or write to, it accepts a filename, e.g. "LIERO.DAT". When it is invoked it * goes through the following steps: * * Checks if the file should be writable or readonly, using an internally * defined map * * If file should be readonly, checks if file exists, then returns its path * * If file should be writable, it makes sure the file exits in the * $HOME/.lierolibre directory (by copying if need be), then returns its path * * Throws runtime_error()s if it is unable to provide the path. * configdir() is used simply for getting the path to the $HOME/.liero * directory, creating it if need be. * configdir() throws a runtime_error() if it is unable to provide the path. * * Unit tests for this object are avaialble in boostTesting.cpp * * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef DATA_PATH_HPP #define DATA_PATH_HPP #include #include class DataPath { public: DataPath(std::string a_readonly_path); std::string file(std::string filename); std::string configdir(void); private: std::string readonly_path; std::string configdotdir; // map: std::map file_access_map; }; #endif //DATA_PATH_HPP lierolibre-0.5/src/dummy_config.h000066400000000000000000000001071205125547100171260ustar00rootroot00000000000000/* dummy file for working around Jam not having config.h to include */ lierolibre-0.5/src/exactObjectList.hpp000066400000000000000000000075231205125547100201060ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_EXACTOBJECTLIST_HPP #define LIERO_EXACTOBJECTLIST_HPP #include #include #include struct ExactObjectListBase : gvl::pairing_node<> { bool operator<(ExactObjectListBase const& b) const { return index < b.index; } int index; bool used; }; template struct ExactObjectList { struct iterator { iterator(T* cur_) : cur(cur_) { while(!cur->used) { ++cur; } } iterator& operator++() { do { ++cur; } while(!cur->used); return *this; } T& operator*() { assert(cur->used); return *cur; } T* operator->() { assert(cur->used); return cur; } bool operator!=(iterator b) { return cur != b.cur; } T* cur; }; ExactObjectList() { clear(); } T* getFreeObject() { /* T* ptr = static_cast(nextFree); nextFree = ptr->nextFree; */ assert(!freeList.empty()); T* ptr = freeList.unlink_min(); assert(!ptr->used); ptr->used = true; /* sentinel.prev->next = ptr; ptr->prev = sentinel.prev; ptr->next = &sentinel; sentinel.prev = ptr; */ ++count; return ptr; } T* newObjectReuse() { T* ret; if(freeList.empty()) ret = &arr[Limit - 1]; else ret = getFreeObject(); assert(ret->used); return ret; } T* newObject() { if(freeList.empty()) return 0; T* ret = getFreeObject(); assert(ret->used); return ret; } iterator begin() { return iterator(&arr[0]); } iterator end() { return iterator(&arr[Limit]); } void free(T* ptr) { assert(ptr->used); if(ptr->used) { //ptr->nextFree = nextFree; //nextFree = ptr; freeList.insert(ptr); ptr->used = false; assert(count > 0); --count; } } void free(iterator i) { free(&*i); } void clear() { count = 0; /* sentinel.prev = &sentinel; sentinel.next = &sentinel;*/ arr[Limit].used = true; // Sentinel for(std::size_t i = 0; i < Limit; ++i) { //arr[i].nextFree = &arr[i + 1]; arr[i].used = false; arr[i].index = i; freeList.insert(&arr[i]); } //arr[Limit - 1].nextFree = 0; //arr[Limit - 1].used = false; //nextFree = &arr[0]; } std::size_t size() const { return count; } T arr[Limit + 1]; // One sentinel //ObjectListBase* nextFree; //ObjectListBase sentinel; gvl::pairing_heap, gvl::dummy_delete> freeList; std::size_t count; }; #endif // LIERO_EXACTOBJECTLIST_HPP lierolibre-0.5/src/fastObjectList.hpp000066400000000000000000000057701205125547100177410ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_A25E9863C68345C3B8E281AB7DFE5401 #define UUID_A25E9863C68345C3B8E281AB7DFE5401 #include #include #include #include #include template struct FastObjectList { struct iterator { iterator(T* cur_) : cur(cur_) { } iterator& operator++() { ++cur; return *this; } T& operator*() { return *cur; } T* operator->() { return cur; } bool operator!=(iterator b) { return cur != b.cur; } T* cur; }; FastObjectList(std::size_t limit = 1) : limit(limit), arr(limit) { clear(); } T* getFreeObject() { sassert(nextFree != &arr[0] + limit); T* ptr = nextFree++; ++count; return ptr; } T* newObjectReuse() { T* ret; if(nextFree == &arr[0] + limit) ret = &arr[limit - 1]; else ret = getFreeObject(); return ret; } T* newObject() { if(nextFree == &arr[0] + limit) return 0; T* ret = getFreeObject(); return ret; } iterator begin() { return iterator(&arr[0]); } iterator end() { return iterator(nextFree); } void free(T* ptr) { sassert(ptr < nextFree && ptr >= &arr[0]); *ptr = *--nextFree; --count; } void free(iterator i) { free(&*i); } void clear() { count = 0; nextFree = &arr[0]; } void resize(std::size_t newLimit) { limit = newLimit; count = std::min(count, newLimit); arr.resize(newLimit); nextFree = &arr[0] + count; } std::size_t size() const { return count; } std::size_t limit; std::vector arr; T* nextFree; std::size_t count; }; #endif // UUID_A25E9863C68345C3B8E281AB7DFE5401 lierolibre-0.5/src/filesystem.cpp000066400000000000000000000273721205125547100172020ustar00rootroot00000000000000/* * Copyright (c) 2001, Dietmar Kühl, under the Boost Software License, * Version 1.0 * Copyright (c) 2002, Beman Dawes, under the Boost Software License, * Version 1.0 * Copyright (c) 2007-2010, Erik Lindroos , under the * BSD-2-Clause License * Copyright (c) 2010, "basro", under the BSD-2-Clause License. * * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any person or organization * obtaining a copy of the software and accompanying documentation covered by * this license (the "Software") to use, reproduce, display, distribute, * execute, and transmit the Software, and to prepare derivative works of the * Software, and to permit third-parties to whom the Software is furnished to * do so, all subject to the following: * * The copyright notices in the Software and this entire statement, including * the above license grant, this restriction and the following disclaimer, * must be included in all copies of the Software, in whole or in part, and * all derivative works of the Software, unless such copies or derivative * works are solely in the form of machine-executable object code generated by * a source language processor. * * 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * * BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "filesystem.hpp" #include #include #include #include #include #include #include #include #include #if GVL_WINDOWS #include // _mktemp(), _mktemp_s() #endif std::string changeLeaf(std::string const& path, std::string const& newLeaf) { std::size_t lastSep = path.find_last_of("\\/"); if(lastSep == std::string::npos) return newLeaf; // We assume there's only a leaf in the path return path.substr(0, lastSep + 1) + newLeaf; } std::string getRoot(std::string const& path) { std::size_t lastSep = path.find_last_of("\\/"); if(lastSep == std::string::npos) return ""; return path.substr(0, lastSep); } std::string getBasename(std::string const& path) { std::size_t lastSep = path.find_last_of("."); if(lastSep == std::string::npos) return path; return path.substr(0, lastSep); } std::string getExtension(std::string const& path) { std::size_t lastSep = path.find_last_of("."); if(lastSep == std::string::npos) return ""; return path.substr(lastSep + 1); } void toUpperCase(std::string& str) { for(std::size_t i = 0; i < str.size(); ++i) { str[i] = std::toupper(static_cast(str[i])); // TODO: Uppercase conversion that works for the DOS charset } } void toLowerCase(std::string& str) { for(std::size_t i = 0; i < str.size(); ++i) { str[i] = std::tolower(static_cast(str[i])); // TODO: Lowercase conversion that works for the DOS charset } } FILE* tolerantFOpen(std::string const& name, char const* mode) { FILE* f = std::fopen(name.c_str(), mode); if(f) return f; std::string ch(name); toUpperCase(ch); f = std::fopen(ch.c_str(), mode); if(f) return f; toLowerCase(ch); f = std::fopen(ch.c_str(), mode); if(f) return f; // Try with first letter capital ch[0] = std::toupper(static_cast(ch[0])); f = std::fopen(ch.c_str(), mode); if(f) return f; return 0; } std::string joinPath(std::string const& root, std::string const& leaf) { if(!root.empty() && root[root.size() - 1] != '\\' && root[root.size() - 1] != '/') { return root + '/' + leaf; } else { return root + leaf; } } bool fileExists(std::string const& path) { FILE* f = fopen(path.c_str(), "rb"); bool state = (f != 0); if(f) fclose(f); return state; } bool isDir(std::string const& path) { struct stat s; if(stat(path.c_str(), &s) == 0) { if(s.st_mode & S_IFDIR) return true; } return false; } void backupFile(std::string const& path) { char tmpFileName[FILENAME_MAX]; strcpy(tmpFileName, path.c_str()); strcat(tmpFileName, "_backup_XXXXXX"); #ifdef __MINGW32__ // _mktemp_s was only very recently implemented for mingw-w64 if (_mktemp(tmpFileName) == NULL) #elif GVL_WINDOWS if (_mktemp_s(tmpFileName, strlen(tmpFileName) + 1) != 0) #else if (mkstemp(tmpFileName) == -1) #endif throw std::runtime_error("Unable to create temp file for backup"); std::ifstream in; in.open(path.c_str(), std::ios::binary); std::ofstream out; out.open(tmpFileName, std::ios::binary | std::ios::out); if (in.is_open() && out.is_open()) out << in.rdbuf(); else throw std::runtime_error("Unable to open files for backup"); } void rmFile(std::string const& path) { if (remove(path.c_str()) != 0) throw std::runtime_error("Could not remove file '" + path + "'"); } std::size_t fileLength(FILE* f) { long old = ftell(f); fseek(f, 0, SEEK_END); long len = ftell(f); fseek(f, old, SEEK_SET); return len; } #if GVL_WINDOWS # include "windows.h" # if defined(__BORLANDC__) || defined(__MWERKS__) # if defined(__BORLANDC__) using std::time_t; # endif # include "utime.h" # else # include "sys/utime.h" # endif # else # include "dirent.h" # include "unistd.h" # include "fcntl.h" # include "utime.h" # include # endif namespace { struct filename_result { filename_result() : name(0), alt_name(0) { } filename_result(char const* name, char const* alt_name) : name(name), alt_name(alt_name) { } operator void const*() { return name; } char const* name; char const* alt_name; }; #if GVL_LINUX # define BOOST_HANDLE DIR * # define BOOST_INVALID_HANDLE_VALUE 0 # define BOOST_SYSTEM_DIRECTORY_TYPE struct dirent * inline filename_result find_first_file( const char * dir, BOOST_HANDLE & handle, BOOST_SYSTEM_DIRECTORY_TYPE & ) // Returns: 0 if error, otherwise name { const char * dummy_first_name = "."; return ( (handle = ::opendir( dir )) == BOOST_INVALID_HANDLE_VALUE ) ? filename_result() : filename_result(dummy_first_name, dummy_first_name); } inline void find_close( BOOST_HANDLE handle ) { assert( handle != BOOST_INVALID_HANDLE_VALUE ); ::closedir( handle ); } inline filename_result find_next_file( BOOST_HANDLE handle, BOOST_SYSTEM_DIRECTORY_TYPE & ) // Returns: if EOF 0, otherwise name // Throws: if system reports error { // TODO: use readdir_r() if available, so code is multi-thread safe. // Fly-in-ointment: not all platforms support readdir_r(). struct dirent * dp; errno = 0; if ( (dp = ::readdir( handle )) == 0 ) { if ( errno != 0 ) { throw std::runtime_error("Error iterating directory"); } else { return filename_result(); } // end reached } return filename_result(dp->d_name, dp->d_name); } #elif GVL_WINDOWS # define BOOST_HANDLE HANDLE # define BOOST_INVALID_HANDLE_VALUE INVALID_HANDLE_VALUE # define BOOST_SYSTEM_DIRECTORY_TYPE WIN32_FIND_DATAA inline filename_result find_first_file( const char * dir, BOOST_HANDLE & handle, BOOST_SYSTEM_DIRECTORY_TYPE & data ) // Returns: 0 if error, otherwise name { // std::cout << "find_first_file " << dir << std::endl; std::string dirpath( std::string(dir) + "/*" ); bool fail = ( (handle = ::FindFirstFileA( dirpath.c_str(), &data )) == BOOST_INVALID_HANDLE_VALUE ); if(fail) return filename_result(); return filename_result( data.cFileName, data.cAlternateFileName[0] ? data.cAlternateFileName : data.cFileName); } inline void find_close( BOOST_HANDLE handle ) { // std::cout << "find_close" << std::endl; assert( handle != BOOST_INVALID_HANDLE_VALUE ); ::FindClose( handle ); } inline filename_result find_next_file( BOOST_HANDLE handle, BOOST_SYSTEM_DIRECTORY_TYPE & data ) // Returns: 0 if EOF, otherwise name // Throws: if system reports error { if ( ::FindNextFileA( handle, &data ) == 0 ) { if ( ::GetLastError() != ERROR_NO_MORE_FILES ) { throw std::runtime_error("Error iterating directory"); } else { return filename_result(); } // end reached } return filename_result( data.cFileName, data.cAlternateFileName[0] ? data.cAlternateFileName : data.cFileName); } #else #error "Not supported" #endif } struct dir_itr_imp { public: dir_itr_imp() { } std::string entry_path; std::string entry_alt_path; BOOST_HANDLE handle; ~dir_itr_imp() { if ( handle != BOOST_INVALID_HANDLE_VALUE ) find_close( handle ); } }; DirectoryIterator::DirectoryIterator(std::string const& dir) { dir_itr_init( m_imp, dir.c_str() ); } DirectoryIterator::~DirectoryIterator() { } inline bool dot_or_dot_dot( char const * name ) { return name[0]=='.' && (name[1]=='\0' || (name[1]=='.' && name[2]=='\0')); } // directory_iterator implementation ---------------------------------------// void dir_itr_init( dir_itr_imp_ptr & m_imp, char const* dir_path ) { m_imp.reset( new dir_itr_imp() ); BOOST_SYSTEM_DIRECTORY_TYPE scratch; filename_result name; // initialization quiets compiler warnings if ( !dir_path[0] ) m_imp->handle = BOOST_INVALID_HANDLE_VALUE; else name = find_first_file( dir_path, m_imp->handle, scratch ); // sets handle if ( m_imp->handle != BOOST_INVALID_HANDLE_VALUE ) { if ( !dot_or_dot_dot( name.name ) ) { m_imp->entry_path = name.name; m_imp->entry_alt_path = name.alt_name; } else { //m_imp->entry_path.m_path_append( "dummy", no_check ); dir_itr_increment( m_imp ); } } else { throw std::runtime_error("Directory iterator ctor"); } } std::string & dir_itr_dereference( const dir_itr_imp_ptr & m_imp ) { assert( m_imp.get() ); // fails if dereference end iterator return m_imp->entry_path; } std::string & dir_itr_alt_dereference( const dir_itr_imp_ptr & m_imp ) { assert( m_imp.get() ); // fails if dereference end iterator return m_imp->entry_alt_path; } void dir_itr_increment( dir_itr_imp_ptr & m_imp ) { assert( m_imp.get() ); // fails on increment end iterator assert( m_imp->handle != BOOST_INVALID_HANDLE_VALUE ); // reality check BOOST_SYSTEM_DIRECTORY_TYPE scratch; filename_result name; while ( (name = find_next_file( m_imp->handle, scratch )) ) { // append name, except ignore "." or ".." if ( !dot_or_dot_dot( name.name ) ) { m_imp->entry_path = name.name; m_imp->entry_alt_path = name.alt_name; return; } } m_imp.reset(); // make base() the end iterator } lierolibre-0.5/src/filesystem.hpp000066400000000000000000000112511205125547100171740ustar00rootroot00000000000000/* * Copyright (c) 2001, Dietmar Kühl, under the boost software license, * version 1.0. * Copyright (c) 2002, Jan Langer, under the boost software license, * version 1.0. * Copyright (c) 2002-2003, Beman Dawes, under the Boost Software License, * Version 1.0. * Copyright (c) 2007-2010, Erik Lindroos , under the * BSD-2-Clause License * Copyright (c) 2010, "basro", under the BSD-2-Clause License. * * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any person or organization * obtaining a copy of the software and accompanying documentation covered by * this license (the "Software") to use, reproduce, display, distribute, * execute, and transmit the Software, and to prepare derivative works of the * Software, and to permit third-parties to whom the Software is furnished to * do so, all subject to the following: * * The copyright notices in the Software and this entire statement, including * the above license grant, this restriction and the following disclaimer, * must be included in all copies of the Software, in whole or in part, and * all derivative works of the Software, unless such copies or derivative * works are solely in the form of machine-executable object code generated by * a source language processor. * * 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * * BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_FILESYSTEM_HPP #define LIERO_FILESYSTEM_HPP #include #include #include std::string changeLeaf(std::string const& path, std::string const& newLeaf); std::string getRoot(std::string const& path); std::string getBasename(std::string const& path); std::string getExtension(std::string const& path); void toUpperCase(std::string& str); std::string joinPath(std::string const& root, std::string const& leaf); bool fileExists(std::string const& path); bool isDir(std::string const& path); void backupFile(std::string const& path); void rmFile(std::string const& path); FILE* tolerantFOpen(std::string const& name, char const* mode); std::size_t fileLength(FILE* f); struct dir_itr_imp; typedef std::auto_ptr dir_itr_imp_ptr; void dir_itr_init( dir_itr_imp_ptr & m_imp, char const* dir_path ); std::string& dir_itr_dereference(dir_itr_imp_ptr const& m_imp ); std::string& dir_itr_alt_dereference(dir_itr_imp_ptr const& m_imp ); void dir_itr_increment( dir_itr_imp_ptr & m_imp ); struct DirectoryIterator { dir_itr_imp_ptr m_imp; DirectoryIterator(std::string const& dir); ~DirectoryIterator(); operator void*() { return m_imp.get(); } std::string const& operator*() const { return dir_itr_dereference( m_imp ); } std::string const& alt() const { return dir_itr_alt_dereference( m_imp ); } void operator++() { dir_itr_increment(m_imp); } }; struct ScopedFile { ScopedFile(FILE* f) : f(f) { } ~ScopedFile() { if(f) fclose(f); } operator FILE*() { return f; } FILE* f; }; #endif // LIERO_FILESYSTEM_HPP lierolibre-0.5/src/game.cpp000066400000000000000000000267561205125547100157340ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "game.hpp" #include "viewport.hpp" #include "worm.hpp" #include "gfx.hpp" #include "sfx.hpp" #include "weapsel.hpp" #include "constants.hpp" #include #include void Game::createDefaults() { Worm* worm1 = new Worm(*this); worm1->settings = settings->wormSettings[0]; worm1->health = worm1->settings->health; worm1->index = 0; if(worm1->settings->controller == 1) worm1->ai.reset(new DumbLieroAI(*worm1)); Worm* worm2 = new Worm(*this); worm2->settings = settings->wormSettings[1]; worm2->health = worm2->settings->health; worm2->index = 1; if(worm2->settings->controller == 1) worm2->ai.reset(new DumbLieroAI(*worm2)); #if 0 for(int i = 0; i < 10; ++i) { Worm* worm2 = new Worm(*this); worm2->settings = settings->wormSettings[1]; worm2->health = worm2->settings->health; worm2->index = 1; if(worm2->settings->controller == 1) worm2->ai.reset(new DumbLieroAI(*worm2)); addWorm(worm2); } #endif addViewport(new Viewport(Rect(0, 0, 158, 158), worm1, 0, 504, 350, *this)); addViewport(new Viewport(Rect(160, 0, 158+160, 158), worm2, 218, 504, 350, *this)); addWorm(worm1); addWorm(worm2); } Game::Game(gvl::shared_ptr common, gvl::shared_ptr settingsInit) : common(common) , soundPlayer(new DefaultSoundPlayer) , settings(settingsInit) , screenFlash(0) , gotChanged(false) , lastKilled(0) , paused(true) { rand.seed(Uint32(std::time(0))); cycles = 0; // TODO: Unhardcode 40. Also, this loop makes loading time settings only take effect when // starting a new game. Although this emulates liero, consider changing it. // TODO: This also ties common to the settings, it really has to change. /* for(int w = 0; w < 40; ++w) { common->weapons[w].computedLoadingTime = (settings->loadingTime * common->weapons[w].loadingTime) / 100; if(common->weapons[w].computedLoadingTime == 0) common->weapons[w].computedLoadingTime = 1; }*/ } Game::~Game() { clearViewports(); clearWorms(); } void Game::onKey(Uint32 key, bool state) { for(std::size_t i = 0; i < worms.size(); ++i) { Worm& w = *worms[i]; for(std::size_t control = 0; control < WormSettings::MaxControl; ++control) { if(w.settings->controls[control] == key) { w.setControlState(static_cast(control), state); } } } } Worm* Game::findControlForKey(uint32_t key, Worm::Control& control) { for(std::size_t i = 0; i < worms.size(); ++i) { Worm& w = *worms[i]; uint32_t* controls = settings->extensions ? w.settings->controlsEx : w.settings->controls; std::size_t maxControl = settings->extensions ? WormSettings::MaxControlEx : WormSettings::MaxControl; for(std::size_t c = 0; c < maxControl; ++c) { if(controls[c] == key) { control = static_cast(c); return &w; } } } return 0; } void Game::releaseControls() { for(std::size_t i = 0; i < worms.size(); ++i) { Worm& w = *worms[i]; for(std::size_t control = 0; control < WormSettings::MaxControl; ++control) { w.release(static_cast(control)); } } } void Game::clearViewports() { for(std::size_t i = 0; i < viewports.size(); ++i) delete viewports[i]; viewports.clear(); } void Game::addViewport(Viewport* vp) { //vp->worm->viewport = vp; viewports.push_back(vp); } void Game::processViewports() { for(std::size_t i = 0; i < viewports.size(); ++i) { viewports[i]->process(); } } void Game::drawViewports(bool isReplay) { for(std::size_t i = 0; i < viewports.size(); ++i) { viewports[i]->draw(isReplay); } } void Game::clearWorms() { for(std::size_t i = 0; i < worms.size(); ++i) delete worms[i]; worms.clear(); } void Game::resetWorms() { for(std::size_t i = 0; i < worms.size(); ++i) { Worm& w = *worms[i]; w.health = w.settings->health; w.lives = settings->lives; // Not in the original! w.kills = 0; w.visible = false; w.killedTimer = 150; w.currentWeapon = 1; } } void Game::addWorm(Worm* worm) { worms.push_back(worm); } void Game::draw(bool isReplay) { drawViewports(isReplay); //common->font.drawText(toString(cycles / 70), 10, 10, 7); gfx.pal = gfx.origpal; gfx.pal.fade(gfx.fadeValue); if(screenFlash > 0) { gfx.pal.lightUp(screenFlash); } } bool checkBonusSpawnPosition(Game& game, int x, int y) { Common& common = *game.common; Rect rect(x - 2, y - 2, x + 3, y + 3); rect.intersect(game.level.rect()); for(int cx = rect.x1; cx < rect.x2; ++cx) for(int cy = rect.y1; cy < rect.y2; ++cy) { if(common.materials[game.level.pixel(cx, cy)].dirtRock()) return false; } return true; } void Game::createBonus() { if(int(bonuses.size()) >= settings->maxBonuses) return; Bonus* bonus = bonuses.newObject(); if(!bonus) return; for(std::size_t i = 0; i < 50000; ++i) { int ix = rand(common->C[BonusSpawnRectW]); int iy = rand(common->C[BonusSpawnRectH]); if(common->H[HBonusSpawnRect]) { ix += common->C[BonusSpawnRectX]; iy += common->C[BonusSpawnRectY]; } if(checkBonusSpawnPosition(*this, ix, iy)) { int frame; if(common->H[HBonusOnlyHealth]) frame = 1; else if(common->H[HBonusOnlyWeapon]) frame = 0; else frame = rand(2); bonus->x = itof(ix); bonus->y = itof(iy); bonus->velY = 0; bonus->frame = frame; bonus->timer = rand(common->bonusRandTimer[frame][1]) + common->bonusRandTimer[frame][0]; if(frame == 0) { do { bonus->weapon = rand(40); // TODO: Unhardcode } while(settings->weapTable[bonus->weapon] == 2); } common->sobjectTypes[7].create(*this, ix, iy, 0); return; } } // 234F bonuses.free(bonus); } void Game::processFrame() { if((cycles & 3) == 0) { for(int w = 0; w < 4; ++w) { gfx.origpal.rotate(common->colorAnim[w].from, common->colorAnim[w].to); } } if(screenFlash > 0) --screenFlash; for(std::size_t i = 0; i < viewports.size(); ++i) { if(viewports[i]->shake > 0) viewports[i]->shake -= 4000; // TODO: Read 4000 from exe? } /* // TODO: Move this stuff if(gfx.testSDLKeyOnce(SDLK_ESCAPE) && !shutDown) { gfx.firstMenuItem = 0; gfx.fadeValue = 31; shutDown = true; } */ for(BonusList::iterator i = bonuses.begin(); i != bonuses.end(); ++i) { i->process(*this); } if((cycles & 1) == 0) { for(std::size_t i = 0; i < viewports.size(); ++i) { Viewport& v = *viewports[i]; bool down = false; if(v.worm->killedTimer > 16) down = true; if(down) { if(v.bannerY < 2) ++v.bannerY; } else { if(v.bannerY > -8) --v.bannerY; } } } for(SObjectList::iterator i = sobjects.begin(); i != sobjects.end(); ++i) { i->process(*this); } // TODO: Check processing order of bonuses, wobjects etc. for(WObjectList::iterator i = wobjects.begin(); i != wobjects.end(); ++i) { i->process(*this); } for(NObjectList::iterator i = nobjects.begin(); i != nobjects.end(); ++i) { i->process(*this); } for(BObjectList::iterator i = bobjects.begin(); i != bobjects.end(); ) { if(i->process(*this)) ++i; else bobjects.free(i); } // NOTE: This was originally the beginning of the processing, but has been rotated down to // separate out the drawing ++cycles; // This can be moved after the drawing if(!common->H[HBonusDisable] && settings->maxBonuses > 0 && rand(common->C[BonusDropChance]) == 0) { createBonus(); } for(std::size_t i = 0; i < worms.size(); ++i) { worms[i]->process(); } for(std::size_t i = 0; i < worms.size(); ++i) { worms[i]->ninjarope.process(*worms[i]); } switch(settings->gameMode) { case Settings::GMGameOfTag: { bool someInvisible = false; for(std::size_t i = 0; i < worms.size(); ++i) { if(!worms[i]->visible) { someInvisible = true; break; } } if(!someInvisible && lastKilled && (cycles % 70) == 0 && lastKilled->timer < settings->timeToLose) { ++lastKilled->timer; } } break; } processViewports(); // Store old control states so we can see what changes (mainly for replays) for(std::size_t i = 0; i < worms.size(); ++i) { worms[i]->prevControlStates = worms[i]->controlStates; } } void Game::gameLoop() { #if 0 shutDown = false; do { processFrame(); draw(); gfx.flip(); gfx.process(this); } while(gfx.fadeValue > 0); gfx.clearKeys(); //releaseControls(); #endif } void Game::focus() { updateSettings(); } void Game::updateSettings() { gfx.origpal = level.origpal; // Activate the Level palette for(std::size_t i = 0; i < worms.size(); ++i) { Worm& worm = *worms[i]; if(worm.index >= 0 && worm.index < 2) gfx.origpal.setWormColour(worm.index, *worm.settings); } } void Game::startGame() { soundPlayer->play(22); bobjects.resize(settings->bloodParticleMax); } bool Game::isGameOver() { if(settings->gameMode == Settings::GMKillEmAll) { for(std::size_t i = 0; i < worms.size(); ++i) { if(worms[i]->lives <= 0) return true; } } else if(settings->gameMode == Settings::GMGameOfTag) { for(std::size_t i = 0; i < worms.size(); ++i) { if(worms[i]->timer >= settings->timeToLose) return true; } } else if(settings->gameMode == Settings::GMCtF || settings->gameMode == Settings::GMSimpleCtF) { for(std::size_t i = 0; i < worms.size(); ++i) { if(worms[i]->flags >= settings->flagsToWin) return true; } } return false; } bool checkRespawnPosition(Game& game, int x2, int y2, int oldX, int oldY, int x, int y) { Common& common = *game.common; int deltaX = oldX; int deltaY = oldY - y; int enemyDX = x2 - x; int enemyDY = y2 - y; if((std::abs(deltaX) <= common.C[WormMinSpawnDistLast] && std::abs(deltaY) <= common.C[WormMinSpawnDistLast]) || (std::abs(enemyDX) <= common.C[WormMinSpawnDistEnemy] && std::abs(enemyDY) <= common.C[WormMinSpawnDistEnemy])) return false; int maxX = x + 3; int maxY = y + 4; int minX = x - 3; int minY = y - 4; if(maxX >= game.level.width) maxX = game.level.width - 1; if(maxY >= game.level.height) maxY = game.level.height - 1; if(minX < 0) minX = 0; if(minY < 0) minY = 0; for(int i = minX; i != maxX; ++i) for(int j = minY; j != maxY; ++j) { if(common.materials[game.level.pixel(i, j)].rock()) // TODO: The special rock respawn bug is here, consider an option to turn it off return false; } return true; } lierolibre-0.5/src/game.hpp000066400000000000000000000066671205125547100157400ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_GAME_HPP #define LIERO_GAME_HPP #include #include "level.hpp" #include "settings.hpp" #include "weapon.hpp" #include "sobject.hpp" #include "nobject.hpp" #include "bobject.hpp" #include "rand.hpp" #include "bonus.hpp" #include "sfx.hpp" #include "constants.hpp" #include #include #include "common.hpp" struct Viewport; struct Worm; struct Game { Game(gvl::shared_ptr common, gvl::shared_ptr settings); ~Game(); void onKey(Uint32 key, bool state); Worm* findControlForKey(uint32_t key, Worm::Control& control); void releaseControls(); void processFrame(); void gameLoop(); void focus(); void updateSettings(); void createBObject(fixed x, fixed y, fixed velX, fixed velY); void createBonus(); void clearViewports(); void addViewport(Viewport*); void processViewports(); void drawViewports(bool isReplay = false); void clearWorms(); void addWorm(Worm*); void resetWorms(); void draw(bool isReplay = false); void startGame(); bool isGameOver(); void createDefaults(); Material pixelMat(int x, int y) { return common->materials[level.pixel(x, y)]; } Level level; gvl::shared_ptr common; gvl::shared_ptr soundPlayer; gvl::shared_ptr settings; int screenFlash; bool gotChanged; Worm* lastKilled; // Last killed worm !CLONING bool paused; int cycles; Rand rand; std::vector viewports; std::vector worms; typedef ExactObjectList BonusList; typedef ExactObjectList WObjectList; typedef ExactObjectList SObjectList; typedef ExactObjectList NObjectList; typedef FastObjectList BObjectList; BonusList bonuses; WObjectList wobjects; SObjectList sobjects; NObjectList nobjects; BObjectList bobjects; }; bool checkRespawnPosition(Game& game, int x2, int y2, int oldX, int oldY, int x, int y); //extern Game game; #endif // LIERO_GAME_HPP lierolibre-0.5/src/gfx.cpp000066400000000000000000001432711205125547100155770ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "gfx.hpp" #include "reader.hpp" #include "game.hpp" #include "sfx.hpp" #include "text.hpp" #include "keys.hpp" #include "filesystem.hpp" #include #include #include #include #include #include #include #include //#include #include #include #include "controller/replayController.hpp" #include "controller/localController.hpp" #include "controller/controller.hpp" #include "gfx/macros.hpp" #include "menu/arrayEnumBehavior.hpp" #include "configHelper.hpp" #include "to_string.hpp" #include "config.h" // name and version for window caption /* ds:0000 is 0x 1AE80 */ Gfx gfx; struct KeyBehavior : ItemBehavior { KeyBehavior(Common& common, uint32_t& key, uint32_t& keyEx, bool extended = false) : common(common) , key(key) , keyEx(keyEx) , extended(extended) { } int onEnter(Menu& menu, int item) { sfx.play(27); uint32_t k; bool isEx; do { k = gfx.waitForKeyEx(); isEx = isExtendedKey(k); } while(!extended && isEx); if(k != (unsigned char)DkEscape) { if(!isEx) key = k; keyEx = k; onUpdate(menu, item); } gfx.clearKeys(); return -1; } void onUpdate(Menu& menu, int item) { menu.items[item].value = gfx.getKeyName(extended ? keyEx : key); } Common& common; uint32_t& key; uint32_t& keyEx; bool extended; }; struct WormNameBehavior : ItemBehavior { WormNameBehavior(Common& common, WormSettings& ws) : common(common) , ws(ws) { } int onEnter(Menu& menu, int item) { sfx.play(27); ws.randomName = false; gfx.inputString(ws.name, 20, 275, 20); if(ws.name.empty()) { Settings::generateName(ws); } sfx.play(27); onUpdate(menu, item); return -1; } void onUpdate(Menu& menu, int item) { menu.items[item].value = ws.name; } Common& common; WormSettings& ws; }; struct ProfileSaveBehavior : ItemBehavior { ProfileSaveBehavior(Common& common, WormSettings& ws, bool saveAs = false) : common(common) , ws(ws) , saveAs(saveAs) { } int onEnter(Menu& menu, int item) { sfx.play(27); int x, y; if(!menu.itemPosition(item, x, y)) return -1; x += menu.valueOffsetX + 2; if(saveAs) { std::string name; if(gfx.inputString(name, 30, x, y) && !name.empty()) ws.saveProfile(name); sfx.play(27); } else ws.saveProfile(ws.profileName); onUpdate(menu, item); return -1; } void onUpdate(Menu& menu, int item) { if(saveAs) { menu.items[item].value = ws.profileName; menu.items[item].hasValue = true; } } Common& common; WormSettings& ws; bool saveAs; }; Gfx::Gfx() : mainMenu(53, 20) , settingsMenu(178, 20) , playerMenu(178, 20) , hiddenMenu(178, 20) , curMenu(0) , screen(0) , back(0) , frozenScreen(320 * 200) , running(true) , fullscreen(false) , fadeValue(0) , menuCyclic(0) , windowW(320) , windowH(200) , prevMag(0) { clearKeys(); } void Gfx::init() { SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); SDL_EnableUNICODE(1); #ifdef PACKAGE_CAPTION SDL_WM_SetCaption(PACKAGE_CAPTION, 0); #else SDL_WM_SetCaption("lierolibre", 0); #endif SDL_ShowCursor(SDL_DISABLE); lastFrame = SDL_GetTicks(); screen = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 200, 8, 0, 0, 0, 0); screenPixels = static_cast(screen->pixels); screenPitch = screen->pitch; // Joystick init: SDL_JoystickEventState(SDL_ENABLE); int numJoysticks = SDL_NumJoysticks(); joysticks.resize(numJoysticks); for ( int i = 0; i < numJoysticks; ++i ) { joysticks[i].sdlJoystick = SDL_JoystickOpen(i); joysticks[i].clearState(); } // Save for checking to not go above const SDL_VideoInfo* vidInfo = SDL_GetVideoInfo(); desktopH = vidInfo->current_h; desktopW = vidInfo->current_w; } void Gfx::setVideoMode() { int bitDepth = 8; if(settings->depth32) bitDepth = 32; int flags = SDL_SWSURFACE | SDL_RESIZABLE; if(fullscreen) { flags |= SDL_FULLSCREEN; // Use the (host) desktop resolution windowW = desktopW; windowH = desktopH; } if(!SDL_VideoModeOK(windowW, windowH, bitDepth, flags)) { // Default to 640x480 windowW = 640; windowH = 480; } back = SDL_SetVideoMode(windowW, windowH, bitDepth, flags); } // Prioritises maximum supported 320x200 multiple void Gfx::setMaxVideoMode() { int bitDepth = 8; if(settings->depth32) bitDepth = 32; int flags = SDL_SWSURFACE | SDL_RESIZABLE; if(fullscreen) { flags |= SDL_FULLSCREEN; windowW = desktopW; windowH = desktopH; } else { // Get max possible within desktop size int max = 1; while((320 * max <= desktopW) && (200 * max <= desktopH)) ++max; --max; // Last known working windowW = 320 * max; windowH = 200 * max; } if(!SDL_VideoModeOK(windowW, windowH, bitDepth, flags)) { // Default to 640x480 windowW = 640; windowH = 480; } back = SDL_SetVideoMode(windowW, windowH, bitDepth, flags); } void Gfx::loadPalette() { origpal = common->exepal; pal = origpal; } void Gfx::loadMenus() { FILE* exe = openLieroEXE(); fseek(exe, 0x1B08A, SEEK_SET); mainMenu.readItems(exe, 14, 4, true); fseek(exe, 0x1B0C2, SEEK_SET); settingsMenu.readItems(exe, 21, 15, false, 48, 7); settingsMenu.valueOffsetX = 100; //settingsMenu.addItem(MenuItem(48, 7, common->texts.gameModeSpec[0]), 1); settingsMenu.items[Settings::SiLives].string = common->texts.gameModeSpec[0]; settingsMenu.addItem(MenuItem(48, 7, common->texts.gameModeSpec[1]), Settings::SiTimeToLose); settingsMenu.addItem(MenuItem(48, 7, common->texts.gameModeSpec[2]), Settings::SiFlagsToWin); //settingsMenuValues.items.assign(12, MenuItem(48, 7, "")); // First 14 items have values for(int i = 0; i < Settings::SiPlayer1Options; ++i) { settingsMenu.items[i].hasValue = true; } fseek(exe, 0x1B210, SEEK_SET); playerMenu.readItems(exe, 13, 12, false, 48, 7); // Extra control settings: playerMenu.addItem(MenuItem(48, 7, "DIG")); // Finish reading liero menus: playerMenu.readItems(exe, 13, 1, false, 48, 7); playerMenu.valueOffsetX = 95; playerMenu.addItem(MenuItem(3, 7, "SAVE PROFILE")); playerMenu.addItem(MenuItem(3, 7, "SAVE PROFILE AS...")); playerMenu.addItem(MenuItem(3, 7, "LOAD PROFILE")); for(int i = 0; i < 14; ++i) { playerMenu.items[i].hasValue = true; } hiddenMenu.addItem(MenuItem(48, 7, "Extensions")); hiddenMenu.addItem(MenuItem(48, 7, "Record replays")); hiddenMenu.addItem(MenuItem(48, 7, "Load replay...")); hiddenMenu.addItem(MenuItem(48, 7, "PowerLevel palettes")); hiddenMenu.addItem(MenuItem(48, 7, "Scaling filter")); hiddenMenu.addItem(MenuItem(48, 7, "TESTING 32-bit mode")); hiddenMenu.valueOffsetX = 100; } void Gfx::loadMenusFromCFG(std::string cfgFilePath) { // Menus { SomeMenu { items0 { color, disColour, string } libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &smenus = cfg.lookup("Menus"); const libconfig::Setting &smmain = smenus["MainMenu"]; for(int i = 0; i < 4; ++i) { const libconfig::Setting &smmitem = smmain[i]; Uint8 col = cfgHelp.getValue(smmitem, "color"); Uint8 dCol = cfgHelp.getValue(smmitem, "disColour"); std::string str = smmitem["string"]; mainMenu.addItem(MenuItem(static_cast(col), static_cast(dCol), str)); } mainMenu.setTop(0); libconfig::Setting &smsettings = smenus["SettingsMenu"]; // 15 + 2 since we are incuding the non-exe TimeToLose and FlagsToWin (inserted afterwards when reading from exe) for(int i = 0; i < 17; ++i) { libconfig::Setting &smsitem = smsettings[i]; Uint8 col = cfgHelp.getValue(smsitem, "color"); Uint8 dCol = cfgHelp.getValue(smsitem, "disColour"); std::string str = smsitem["string"]; settingsMenu.addItem(MenuItem(static_cast(col), static_cast(dCol), str)); } settingsMenu.setTop(0); settingsMenu.valueOffsetX = 100; settingsMenu.items[Settings::SiLives].string = common->texts.gameModeSpec[0]; // First 14 items have values for(int i = 0; i < Settings::SiPlayer1Options; ++i) { settingsMenu.items[i].hasValue = true; } libconfig::Setting &smplayer = smenus["PlayerMenu"]; // 12 + DIG + 1 since including the non-exe entry out of iteration convenience for(int i = 0; i < 14; ++i) { libconfig::Setting &smpitem = smplayer[i]; Uint8 col = cfgHelp.getValue(smpitem, "color"); Uint8 dCol = cfgHelp.getValue(smpitem, "disColour"); std::string str = smpitem["string"]; playerMenu.addItem(MenuItem(static_cast(col), static_cast(dCol), str)); // This is done when loading from exe, uncertain if necessary if(i == 12) { playerMenu.setTop(0); } } playerMenu.setTop(0); playerMenu.valueOffsetX = 95; playerMenu.addItem(MenuItem(3, 7, "SAVE PROFILE")); playerMenu.addItem(MenuItem(3, 7, "SAVE PROFILE AS...")); playerMenu.addItem(MenuItem(3, 7, "LOAD PROFILE")); for(int i = 0; i < 14; ++i) { playerMenu.items[i].hasValue = true; } hiddenMenu.addItem(MenuItem(48, 7, "Extensions")); hiddenMenu.addItem(MenuItem(48, 7, "Record replays")); hiddenMenu.addItem(MenuItem(48, 7, "Load replay...")); hiddenMenu.addItem(MenuItem(48, 7, "PowerLevel palettes")); hiddenMenu.addItem(MenuItem(48, 7, "Scaling filter")); hiddenMenu.addItem(MenuItem(48, 7, "TESTING 32-bit mode")); hiddenMenu.valueOffsetX = 100; } void Gfx::writeMenusToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &smenus = cfgHelp.getSubgroup(root, "Menus"); libconfig::Setting &smmenu = cfgHelp.getSubgroup(smenus, "MainMenu"); for(int i = 0; i < 4; ++i) { libconfig::Setting &smmitems = cfgHelp.getSubgroup(smmenu, "items" + to_string(i)); cfgHelp.put(smmitems, "color", static_cast(mainMenu.items[i].color)); cfgHelp.put(smmitems, "disColour", static_cast(mainMenu.items[i].disColour)); cfgHelp.put(smmitems, "string", mainMenu.items[i].string); } libconfig::Setting &smsettings = cfgHelp.getSubgroup(smenus, "SettingsMenu"); // 15 + 2 since we are incuding the non-exe TimeToLose and FlagsToWin (inserted afterwards when reading from exe) for(int i = 0; i < 17; ++i) { libconfig::Setting &smsitems = cfgHelp.getSubgroup(smsettings, "items" + to_string(i)); cfgHelp.put(smsitems, "color", static_cast(settingsMenu.items[i].color)); cfgHelp.put(smsitems, "disColour", static_cast(settingsMenu.items[i].disColour)); cfgHelp.put(smsitems, "string", settingsMenu.items[i].string); } libconfig::Setting &smplayer = cfgHelp.getSubgroup(smenus, "PlayerMenu"); for(int i = 0; i < 14; ++i) { libconfig::Setting &smpitems = cfgHelp.getSubgroup(smplayer, "items" + to_string(i)); cfgHelp.put(smpitems, "color", static_cast(playerMenu.items[i].color)); cfgHelp.put(smpitems, "disColour", static_cast(playerMenu.items[i].disColour)); cfgHelp.put(smpitems, "string", playerMenu.items[i].string); } cfg.writeFile(cfgFilePath.c_str()); } void Gfx::updateSettingsMenu() { settingsMenu.items[Settings::SiGameMode].value = common->texts.gameModes[settings->gameMode]; settingsMenu.setVisibility(Settings::SiLives, false); settingsMenu.setVisibility(Settings::SiTimeToLose, false); settingsMenu.setVisibility(Settings::SiFlagsToWin, false); switch(settings->gameMode) { case Settings::GMKillEmAll: settingsMenu.setVisibility(Settings::SiLives, true); break; case Settings::GMGameOfTag: settingsMenu.setVisibility(Settings::SiTimeToLose, true); break; case Settings::GMCtF: case Settings::GMSimpleCtF: settingsMenu.setVisibility(Settings::SiFlagsToWin, true); break; } } void Gfx::processEvent(SDL_Event& ev, Controller* controller) { switch(ev.type) { case SDL_KEYDOWN: { SDLKey s = ev.key.keysym.sym; /* gfx.keys[s] = true; */ Uint32 dosScan = SDLToDOSKey(ev.key.keysym); if(dosScan) { dosKeys[dosScan] = true; if(controller) controller->onKey(dosScan, true); } #if 0 std::cout << "v " << s << ", " << std::hex << ev.key.keysym.mod << ", " << std::dec << int(ev.key.keysym.scancode) << std::endl; #endif if((ev.key.keysym.mod & KMOD_ALT) && s == SDLK_F4) running = false; if(((ev.key.keysym.mod & KMOD_ALT) && s == SDLK_RETURN) || s == SDLK_F5) { fullscreen = !fullscreen; if(!fullscreen) { // Restore pre-fullscreen size windowW = storedWindowW; windowH = storedWindowH; setVideoMode(); } // Store pre-fullscreen size storedWindowW = windowW; storedWindowH = windowH; setVideoMode(); } else if(s == SDLK_F6) { if(windowW >= 640 && windowH >= 400) { windowW = 320; windowH = 200; } else { windowW = 640; windowH = 400; } setVideoMode(); } else if(s == SDLK_F7) { if(windowW >= 960 && windowH >= 600) { windowW = 640; windowH = 400; } else { windowW = 960; windowH = 600; } setVideoMode(); } else if(s == SDLK_F8) { if(windowW >= 1280 && windowH >= 800) { windowW = 640; windowH = 400; } else { windowW = 1280; windowH = 800; } setVideoMode(); } } break; case SDL_KEYUP: {/* gfx.keys[ev.key.keysym.sym] = false; */ SDLKey s = ev.key.keysym.sym; Uint32 dosScan = SDLToDOSKey(s); if(dosScan) { dosKeys[dosScan] = false; if(controller) controller->onKey(dosScan, false); } #if 0 std::cout << "^ " << s << ", " << std::hex << ev.key.keysym.mod << ", " << std::dec << int(ev.key.keysym.scancode) << std::endl; #endif } break; case SDL_VIDEORESIZE: { windowW = ev.resize.w; windowH = ev.resize.h; setVideoMode(); } break; case SDL_QUIT: { running = false; } break; case SDL_JOYAXISMOTION: { Joystick& js = joysticks[ev.jbutton.which]; int jbtnBase = 4 + 2 * ev.jaxis.axis; bool newBtnStates[2]; newBtnStates[0] = (ev.jaxis.value > JoyAxisThreshold); newBtnStates[1] = (ev.jaxis.value < -JoyAxisThreshold); for(int i = 0; i < 2; ++i) { int jbtn = jbtnBase + i; bool newState = newBtnStates[i]; if(newState != js.btnState[jbtn]) { js.btnState[jbtn] = newState; if (controller) controller->onKey(joyButtonToExKey(ev.jbutton.which, jbtn), newState); } } } break; case SDL_JOYHATMOTION: { Joystick& js = joysticks[ev.jbutton.which]; bool newBtnStates[4]; newBtnStates[0] = (ev.jhat.value & SDL_HAT_UP) != 0; newBtnStates[1] = (ev.jhat.value & SDL_HAT_DOWN) != 0; newBtnStates[2] = (ev.jhat.value & SDL_HAT_LEFT) != 0; newBtnStates[3] = (ev.jhat.value & SDL_HAT_RIGHT) != 0; for(int jbtn = 0; jbtn < 4; ++jbtn) { bool newState = newBtnStates[jbtn]; if(newState != js.btnState[jbtn]) { js.btnState[jbtn] = newState; if(controller) controller->onKey(joyButtonToExKey(ev.jbutton.which, jbtn), newState); } } } break; case SDL_JOYBUTTONDOWN: case SDL_JOYBUTTONUP: /* Fall-through */ { Joystick& js = joysticks[ev.jbutton.which]; int jbtn = 16 + ev.jbutton.button; js.btnState[jbtn] = (ev.jbutton.state == SDL_PRESSED); if(controller) controller->onKey(joyButtonToExKey(ev.jbutton.which, jbtn), js.btnState[jbtn]); } break; } } void Gfx::process(Controller* controller) { SDL_Event ev; while(SDL_PollEvent(&ev)) { processEvent(ev, controller); } processReader(); } SDL_keysym Gfx::waitForKey() { SDL_Event ev; while(running && SDL_WaitEvent(&ev)) { processEvent(ev); if(ev.type == SDL_KEYDOWN) { return ev.key.keysym; } } return SDL_keysym(); // Dummy } uint32_t Gfx::waitForKeyEx() { SDL_Event ev; while(SDL_WaitEvent(&ev)) { processEvent(ev); switch (ev.type) { case SDL_KEYDOWN: return SDLToDOSKey(ev.key.keysym); case SDL_JOYAXISMOTION: if(ev.jaxis.value > JoyAxisThreshold) return joyButtonToExKey( ev.jbutton.which, 4 + 2 * ev.jaxis.axis ); else if ( ev.jaxis.value < -JoyAxisThreshold ) return joyButtonToExKey( ev.jbutton.which, 5 + 2 * ev.jaxis.axis ); break; case SDL_JOYHATMOTION: if(ev.jhat.value & SDL_HAT_UP) return joyButtonToExKey(ev.jbutton.which, 0); else if(ev.jhat.value & SDL_HAT_DOWN) return joyButtonToExKey(ev.jbutton.which, 1); else if (ev.jhat.value & SDL_HAT_LEFT) return joyButtonToExKey(ev.jbutton.which, 2); else if (ev.jhat.value & SDL_HAT_RIGHT) return joyButtonToExKey(ev.jbutton.which, 3); break; case SDL_JOYBUTTONDOWN: return joyButtonToExKey(ev.jbutton.which, 16 + ev.jbutton.button); } } return 0; // Dummy } std::string Gfx::getKeyName(uint32_t key) { if(key < MaxDOSKey) { return common->texts.keyNames[key]; } else if(key >= JoyKeysStart) { key -= JoyKeysStart; int joyNum = key / MaxJoyButtons; key -= joyNum * MaxJoyButtons; return "J" + toString(joyNum) + "_" + toString(key); } return ""; } void Gfx::clearKeys() { //std::memset(keys, 0, sizeof(keys)); std::memset(dosKeys, 0, sizeof(dosKeys)); } void preparePalette(SDL_PixelFormat* format, SDL_Palette* pal, uint32_t (&pal32)[256]) { for(int i = 0; i < 256; ++i) { pal32[i] = SDL_MapRGB(format, pal->colors[i].r, pal->colors[i].g, pal->colors[i].b); } } int Gfx::fitScreen(int backW, int backH, int scrW, int scrH, int& offsetX, int& offsetY) { int mag = 1; while(scrW*mag <= backW && scrH*mag <= backH) ++mag; --mag; // mag was the first that didn't fit scrW *= mag; scrH *= mag; offsetX = backW/2 - scrW/2; offsetY = backH/2 - scrH/2; return mag; } void Gfx::flip() { gvl::rect updateRect; pal.activate(); if(screen != back) { int offsetX, offsetY; int mag = fitScreen(back->w, back->h, screen->w, screen->h, offsetX, offsetY); gvl::rect newRect(offsetX, offsetY, screen->w * mag, screen->h * mag); if(mag != prevMag) { // Clear background if magnification is decreased to // avoid leftovers. SDL_FillRect(back, 0, 0); updateRect = lastUpdateRect | newRect; } else updateRect = newRect; prevMag = mag; std::size_t destPitch = back->pitch; std::size_t srcPitch = screenPitch; PalIdx* dest = reinterpret_cast(back->pixels) + offsetY * destPitch + offsetX * back->format->BytesPerPixel; PalIdx* src = screenPixels; if(back->format->BitsPerPixel == 8) { if(mag == 1) { for(int y = 0; y < 200; ++y) { PalIdx* line = src + y*srcPitch; PalIdx* destLine = dest + y*destPitch; std::memcpy(destLine, line, 320); #if 0 for(int x = 0; x < 320; ++x) { PalIdx pix = src[y*srcPitch + x]; dest[y*destPitch + x] = pix; } #endif } } else if(mag == 2) { #if 1 if(settings->scaleFilter == Settings::SfNearest) { for(int y = 0; y < 200; ++y) { PalIdx* line = src + y*srcPitch; PalIdx* destLine = dest + 2*y*destPitch; #if 0 for(int x = 0; x < 320; ++x) { PalIdx pix = *line++; destLine[0] = pix; destLine[1] = pix; destLine[destPitch] = pix; destLine[destPitch + 1] = pix; destLine += 2; } #else // NOTE! This only works on a little-endian machine that allows unaligned access for(int x = 0; x < 320/4; ++x) { // !arch NOTE! Unaligned access uint32_t pix = *reinterpret_cast(line); line += 4; uint32_t a = (pix & 0xff000000); uint32_t b = (pix & 0x00ff0000) >> 8; uint32_t c = (pix & 0x0000ff00) << 16; uint32_t d = (pix & 0x000000ff) << 8; uint32_t A = a | b; uint32_t C = c | d; A |= A >> 8; C |= C >> 8; uint32_t* dest32T = reinterpret_cast(destLine); uint32_t* dest32B = reinterpret_cast(destLine + destPitch); // !arch NOTE! Assumes little-endian, C and A should be swapped if big-endian dest32T[0] = C; dest32T[1] = A; dest32B[0] = C; dest32B[1] = A; destLine += 8; } #endif } } else if(settings->scaleFilter == Settings::SfScale2X) { #define DECL int downOffset = destPitch ; SCALE2X_DECL FILTER_X(dest, 2*destPitch, src, srcPitch, 320, 200, 1, 2, SCALE2X, DECL, READER_8, WRITER_2X_8); #undef DECL } #endif } else if(mag > 2) { if(settings->scaleFilter == Settings::SfNearest) { for(int y = 0; y < 200; ++y) { PalIdx* line = src + y*srcPitch; int destMagPitch = mag*destPitch; PalIdx* destLine = dest + y*destMagPitch; for(int x = 0; x < 320/4 - 1; ++x) { uint32_t pix = *reinterpret_cast(line); line += 4; uint32_t a = pix >> 24; uint32_t b = pix & 0x00ff0000; uint32_t c = pix & 0x0000ff00; uint32_t d = pix & 0x000000ff; a |= (a << 8); b |= (b << 8); c |= (c >> 8); d |= (d << 8); a |= (a << 16); b |= (b >> 16); c |= (c << 16); d |= (d << 16); // !arch #define WRITE_BLOCK(C) \ do { \ int i = mag; \ while(i >= 4) { \ for(int y = 0; y < destMagPitch; y += destPitch) { \ uint32_t* dest32 = reinterpret_cast(destLine + y); \ *dest32 = (C); \ } \ destLine += 4; \ i -= 4; \ } \ if(i > 0) { \ for(int y = 0; y < destMagPitch; y += destPitch) { \ uint32_t* dest32 = reinterpret_cast(destLine + y); \ *dest32 = (C); \ } \ destLine += i; \ } \ } while(0) // !arch WRITE_BLOCK(d); WRITE_BLOCK(c); WRITE_BLOCK(b); WRITE_BLOCK(a); #undef WRITE_BLOCK } for(int x = 0; x < 4; ++x) { PalIdx pix = *line++; for(int dy = 0; dy < destMagPitch; dy += destPitch) { for(int dx = 0; dx < mag; ++dx) { destLine[dy + dx] = pix; } } destLine += mag; } } } else if(settings->scaleFilter == Settings::SfScale2X) { #define DECL int downOffset = destPitch ; SCALE2X_DECL FILTER_X(dest, mag*destPitch, src, srcPitch, 320, 200, 1, mag, SCALE2X, DECL, READER_8, WRITER_2X_8); #undef DECL } } } else if(back->format->BitsPerPixel == 32) { uint32_t pal32[256]; preparePalette(back->format, screen->format->palette, pal32); if(mag == 1) { for(int y = 0; y < 200; ++y) { PalIdx* line = src + y*srcPitch; uint32_t* destLine = reinterpret_cast(dest + y*destPitch); for(int x = 0; x < 320; ++x) { PalIdx pix = *line++; *destLine++ = pal32[pix]; } } } else if(settings->scaleFilter == Settings::SfScale2X) { #define DECL int downOffset = destPitch ; SCALE2X_DECL #define PALREADER_8(x, src) do { \ x = pal32[*(src)]; \ } while(0) #define WRITE32(p, v) *reinterpret_cast(p) = (v) #define WRITER_2X_32(dest) do { \ uint8_t* pix_2x_dest_ = dest; \ WRITE32(pix_2x_dest_, R1); \ WRITE32(pix_2x_dest_+4, R2); \ WRITE32(pix_2x_dest_+downOffset, R3); \ WRITE32(pix_2x_dest_+downOffset+4, R4); \ } while(0) FILTER_X(dest, mag*destPitch, src, srcPitch, 320, 200, 1, mag*4, SCALE2X, DECL, PALREADER_8, WRITER_2X_32); #undef DECL } else { if(mag > 1) { for(int y = 0; y < 200; ++y) { PalIdx* line = src + y*srcPitch; int destMagPitch = mag*destPitch; uint8_t* destLine = dest + y*destMagPitch; for(int x = 0; x < 320/4; ++x) { uint32_t pix = *reinterpret_cast(line); line += 4; uint32_t a = pal32[pix >> 24]; uint32_t b = pal32[(pix & 0x00ff0000) >> 16]; uint32_t c = pal32[(pix & 0x0000ff00) >> 8]; uint32_t d = pal32[pix & 0x000000ff]; //uint32_t* destLine32 = reinterpret_cast(destLine); for(int dx = 0; dx < mag; ++dx) { for(int dy = 0; dy < destMagPitch; dy += destPitch) { *reinterpret_cast(destLine + dy) = d; } destLine += 4; } for(int dx = 0; dx < mag; ++dx) { for(int dy = 0; dy < destMagPitch; dy += destPitch) { *reinterpret_cast(destLine + dy) = c; } destLine += 4; } for(int dx = 0; dx < mag; ++dx) { for(int dy = 0; dy < destMagPitch; dy += destPitch) { *reinterpret_cast(destLine + dy) = b; } destLine += 4; } for(int dx = 0; dx < mag; ++dx) { for(int dy = 0; dy < destMagPitch; dy += destPitch) { *reinterpret_cast(destLine + dy) = a; } destLine += 4; } } } } } } } //if(fullscreen) SDL_Flip(back); /*else SDL_UpdateRect(back, updateRect.x1, updateRect.y1, updateRect.width(), updateRect.height());*/ lastUpdateRect = updateRect; if(settings->screenSync) { static unsigned int const delay = 14u; uint32_t wantedTime = lastFrame + delay; while(true) { uint32_t now = SDL_GetTicks(); if(now >= wantedTime) break; SDL_Delay(wantedTime - now); } lastFrame = wantedTime; while((SDL_GetTicks() - lastFrame) > delay) lastFrame += delay; } else SDL_Delay(0); } void Gfx::clear() { SDL_FillRect(screen, 0, 0); } void playChangeSound(int change) { if(change > 0) { sfx.play(25); } else { sfx.play(26); } } void resetLeftRight() { /* gfx.keys[SDLK_LEFT] = false; gfx.keys[SDLK_RIGHT] = false;*/ gfx.releaseSDLKey(SDLK_LEFT); gfx.releaseSDLKey(SDLK_RIGHT); } template void changeVariable(T& var, T change, T min, T max, T scale) { if(change < 0 && var > min) { var += change * scale; } if(change > 0 && var < max) { var += change * scale; } } struct LevelSelectBehavior : ItemBehavior { LevelSelectBehavior(Common& common) : common(common) { } int onEnter(Menu& menu, int item) { sfx.play(27); gfx.selectLevel(); sfx.play(27); onUpdate(menu, item); return -1; } void onUpdate(Menu& menu, int item) { std::string levelPath = joinPath(data_path->configdir(), gfx.settings->levelFile + ".lev"); if(!gfx.settings->randomLevel && fileExists(levelPath)) { menu.items[Settings::SiLevel].value = '"' + gfx.settings->levelFile + '"'; menu.items[Settings::SiRegenerateLevel].string = common.texts.reloadLevel; // Not string? } else { menu.items[Settings::SiLevel].value = common.texts.random2; menu.items[Settings::SiRegenerateLevel].string = common.texts.regenLevel; } } Common& common; }; struct ProfileLoadBehavior : ItemBehavior { ProfileLoadBehavior(Common& common, WormSettings& ws) : common(common) , ws(ws) { } int onEnter(Menu& menu, int item) { sfx.play(27); gfx.selectProfile(ws); sfx.play(27); menu.updateItems(common); return -1; } Common& common; WormSettings& ws; }; struct WeaponOptionsBehavior : ItemBehavior { int onEnter(Menu& menu, int item) { sfx.play(27); gfx.weaponOptions(); sfx.play(27); return -1; } }; struct PlayerSettingsBehavior : ItemBehavior { PlayerSettingsBehavior(int player) : player(player) { } int onEnter(Menu& menu, int item) { sfx.play(27); gfx.playerSettings(player); return -1; } int player; }; ItemBehavior* SettingsMenu::getItemBehavior(Common& common, int item) { switch(item) { case Settings::SiNamesOnBonuses: return new BooleanSwitchBehavior(common, gfx.settings->namesOnBonuses); case Settings::SiMap: return new BooleanSwitchBehavior(common, gfx.settings->map); case Settings::SiRegenerateLevel: return new BooleanSwitchBehavior(common, gfx.settings->regenerateLevel); case Settings::SiShadows: return new BooleanSwitchBehavior(common, gfx.settings->shadow); case Settings::SiScreenSync: return new BooleanSwitchBehavior(common, gfx.settings->screenSync); case Settings::SiLoadChange: return new BooleanSwitchBehavior(common, gfx.settings->loadChange); case Settings::SiLoadingTimes: return new IntegerBehavior(common, gfx.settings->loadingTime, 0, 9999, 1, true); case Settings::SiMaxBonuses: return new IntegerBehavior(common, gfx.settings->maxBonuses, 0, 99, 1); case Settings::SiAmountOfBlood: { IntegerBehavior* ret = new IntegerBehavior(common, gfx.settings->blood, 0, common.C[BloodLimit], common.C[BloodStepUp], true); ret->allowEntry = false; return ret; } case Settings::SiLives: return new IntegerBehavior(common, gfx.settings->lives, 1, 999, 1); case Settings::SiTimeToLose: { TimeBehavior* ret = new TimeBehavior(common, gfx.settings->timeToLose, 60, 3600, 10); ret->allowEntry = false; return ret; } case Settings::SiFlagsToWin: return new IntegerBehavior(common, gfx.settings->flagsToWin, 1, 999, 1); case Settings::SiLevel: return new LevelSelectBehavior(common); case Settings::SiGameMode: return new ArrayEnumBehavior(common, gfx.settings->gameMode, common.texts.gameModes); case Settings::SiWeaponOptions: return new WeaponOptionsBehavior(); case Settings::SiPlayer1Options: return new PlayerSettingsBehavior(0); case Settings::SiPlayer2Options: return new PlayerSettingsBehavior(1); default: return Menu::getItemBehavior(common, item); } } void Gfx::updateExtensions(bool enabled) { for(std::size_t i = HiddenMenu::Extensions + 1; i < HiddenMenu::Depth32; ++i) { hiddenMenu.setVisibility(i, enabled); } playerMenu.setVisibility(12, enabled); for(std::size_t i = 14; i < playerMenu.items.size(); ++i) { playerMenu.setVisibility(i, enabled); } } struct LevelSort { typedef std::pair type; bool operator()(type const& a, type const& b) const { return ciLess(a.first, b.first); } }; void Gfx::selectLevel() { Menu levelMenu(178, 28); levelMenu.setHeight(14); levelMenu.addItem(MenuItem(48, 7, common->texts.random)); bool altName = settings->extensions ? false : true; DirectoryIterator di(joinPath(data_path->configdir(), ".")); // TODO: Fix lieroEXERoot to be "." instead of "" std::vector > levels; for(; di; ++di) { std::string const& name = *di; std::string const& altName = di.alt(); if(ciCompare(getExtension(name), "LEV")) { levels.push_back(std::make_pair(getBasename(name), getBasename(altName))); //levelMenu.addItem(MenuItem(7, 7, getBasename(str))); } } std::sort(levels.begin(), levels.end(), LevelSort()); for(std::size_t i = 0; i < levels.size(); ++i) { if(altName) levelMenu.addItem(MenuItem(48, 7, levels[i].second)); else levelMenu.addItem(MenuItem(48, 7, levels[i].first)); } levelMenu.moveToFirstVisible(); if(!settings->levelFile.empty()) { for(std::size_t i = 1; i < levelMenu.items.size(); ++i) { if(ciCompare(levels[i-1].second, settings->levelFile)) { levelMenu.moveTo(i); break; } } } do { std::memcpy(gfx.screenPixels, &frozenScreen[0], frozenScreen.size()); drawBasicMenu(); drawRoundedBox(178, 20, 0, 7, common->font.getDims(common->texts.selLevel)); common->font.drawText(common->texts.selLevel, 180, 21, 50); levelMenu.draw(*common, false); if(testSDLKeyOnce(SDLK_UP)) { sfx.play(26); levelMenu.movement(-1); } if(testSDLKeyOnce(SDLK_DOWN)) { sfx.play(25); levelMenu.movement(1); } if(testSDLKeyOnce(SDLK_RETURN) || testSDLKeyOnce(SDLK_KP_ENTER)) { sfx.play(27); if(levelMenu.selection() == 0) { settings->randomLevel = true; settings->levelFile.clear(); } else { settings->randomLevel = false; settings->levelFile = levels[levelMenu.selection() - 1].second; } break; } if(settings->extensions) { if(testSDLKeyOnce(SDLK_PAGEUP)) { sfx.play(26); levelMenu.movementPage(-1); } if(testSDLKeyOnce(SDLK_PAGEDOWN)) { sfx.play(25); levelMenu.movementPage(1); } } origpal.rotate(168, 174); pal = origpal; flip(); process(); } while(running && !testSDLKeyOnce(SDLK_ESCAPE)); } void Gfx::selectProfile(WormSettings& ws) { Menu profileMenu(28, 28); profileMenu.setHeight(14); DirectoryIterator di(joinPath(data_path->configdir(), ".")); // TODO: Fix lieroEXERoot to be "." instead of "" std::vector profiles; for(; di; ++di) { std::string str = *di; if(ciCompare(getExtension(str), "LPF")) profiles.push_back(getBasename(str)); } std::sort(profiles.begin(), profiles.end(), ciLess); for(std::size_t i = 0; i < profiles.size(); ++i) profileMenu.addItem(MenuItem(7, 7, profiles[i])); profileMenu.moveToFirstVisible(); do { std::memcpy(gfx.screenPixels, &frozenScreen[0], frozenScreen.size()); common->font.drawFramedText("Select profile", 28, 20, 50); profileMenu.draw(*common, false); if(testSDLKeyOnce(SDLK_UP)) { sfx.play(26); profileMenu.movement(-1); } if(testSDLKeyOnce(SDLK_DOWN)) { sfx.play(25); profileMenu.movement(1); } if(testSDLKeyOnce(SDLK_RETURN) || testSDLKeyOnce(SDLK_KP_ENTER)) { if(profileMenu.isSelectionValid()) { ws.loadProfile(profileMenu.items[profileMenu.selection()].string); return; } } if(settings->extensions) { if(testSDLKeyOnce(SDLK_PAGEUP)) { sfx.play(26); profileMenu.movementPage(-1); } if(testSDLKeyOnce(SDLK_PAGEDOWN)) { sfx.play(25); profileMenu.movementPage(1); } } origpal.rotate(168, 174); pal = origpal; flip(); process(); } while(running && !testSDLKeyOnce(SDLK_ESCAPE)); return; } int Gfx::selectReplay() { Menu replayMenu(28, 28); replayMenu.setHeight(14); DirectoryIterator di(joinPath(data_path->configdir(), ".")); // TODO: Fix lieroEXERoot to be "." instead of "" std::vector replays; for(; di; ++di) { std::string str = *di; if(ciCompare(getExtension(str), "LRP")) replays.push_back(getBasename(str)); } std::sort(replays.begin(), replays.end(), ciLess); for(std::size_t i = 0; i < replays.size(); ++i) replayMenu.addItem(MenuItem(7, 7, replays[i])); replayMenu.moveToFirstVisible(); do { std::memcpy(gfx.screenPixels, &frozenScreen[0], frozenScreen.size()); std::string selReplay = "Select replay"; common->font.drawFramedText(selReplay, 28, 20, 50); /* drawRoundedBox(28, 20, 0, 7, common->font.getDims(selReplay)); common->font.drawText(selReplay, 30, 21, 50);*/ replayMenu.draw(*common, false); if(testSDLKeyOnce(SDLK_UP)) { sfx.play(26); replayMenu.movement(-1); } if(testSDLKeyOnce(SDLK_DOWN)) { sfx.play(25); replayMenu.movement(1); } if(testSDLKeyOnce(SDLK_RETURN) || testSDLKeyOnce(SDLK_KP_ENTER)) { if(replayMenu.isSelectionValid()) { std::string replayName = replayMenu.items[replayMenu.selection()].string + ".lrp"; std::string fullPath = joinPath(data_path->configdir(), replayName); // Reset controller before opening the replay, since we may be recording it controller.reset(); gvl::stream_ptr replay(new gvl::fstream(std::fopen(fullPath.c_str(), "rb"))); controller.reset(new ReplayController(common, replay)); return MaReplay; } } if(settings->extensions) { if(testSDLKeyOnce(SDLK_PAGEUP)) { sfx.play(26); replayMenu.movementPage(-1); } if(testSDLKeyOnce(SDLK_PAGEDOWN)) { sfx.play(25); replayMenu.movementPage(1); } } origpal.rotate(168, 174); pal = origpal; flip(); process(); } while(running && !testSDLKeyOnce(SDLK_ESCAPE)); return -1; } struct WeaponMenu : Menu { WeaponMenu(int x, int y) : Menu(x, y) { } ItemBehavior* getItemBehavior(Common& common, int item) { int index = common.weapOrder[item + 1]; return new ArrayEnumBehavior(common, gfx.settings->weapTable[index], common.texts.weapStates); } }; void Gfx::weaponOptions() { WeaponMenu weaponMenu(179, 28); weaponMenu.setHeight(14); weaponMenu.valueOffsetX = 89; for(int i = 1; i < 41; ++i) { int index = common->weapOrder[i]; weaponMenu.addItem(MenuItem(48, 7, common->weapons[index].name)); } weaponMenu.moveToFirstVisible(); weaponMenu.updateItems(*common); while(true) { std::memcpy(gfx.screenPixels, &frozenScreen[0], frozenScreen.size()); drawBasicMenu(); drawRoundedBox(179, 20, 0, 7, common->font.getDims(common->texts.weapon)); drawRoundedBox(249, 20, 0, 7, common->font.getDims(common->texts.availability)); common->font.drawText(common->texts.weapon, 181, 21, 50); common->font.drawText(common->texts.availability, 251, 21, 50); weaponMenu.draw(*common, false); if(testSDLKeyOnce(SDLK_UP)) { sfx.play(26); weaponMenu.movement(-1); } if(testSDLKeyOnce(SDLK_DOWN)) { sfx.play(25); weaponMenu.movement(1); } if(testSDLKeyOnce(SDLK_LEFT)) { weaponMenu.onLeftRight(*common, -1); } if(testSDLKeyOnce(SDLK_RIGHT)) { weaponMenu.onLeftRight(*common, 1); } if(settings->extensions) { if(testSDLKeyOnce(SDLK_PAGEUP)) { sfx.play(26); weaponMenu.movementPage(-1); } if(testSDLKeyOnce(SDLK_PAGEDOWN)) { sfx.play(25); weaponMenu.movementPage(1); } } origpal.rotate(168, 174); pal = origpal; flip(); process(); if(!running) break; if(testSDLKeyOnce(SDLK_ESCAPE)) { int count = 0; for(int i = 0; i < 40; ++i) { if(settings->weapTable[i] == 0) ++count; } if(count > 0) break; // Enough weapons available infoBox(common->texts.noWeaps, 223, 68, false); } } } void Gfx::infoBox(std::string const& text, int x, int y, bool clearScreen) { static int const bgColor = 0; if(clearScreen) { pal = common->exepal; SDL_FillRect(screen, 0, bgColor); } int height; int width = common->font.getDims(text, &height); int cx = x - width/2 - 2; int cy = y - height/2 - 2; drawRoundedBox(cx, cy, 0, height+1, width+1); common->font.drawText(text, cx+2, cy+2, 6); flip(); process(); if(!running) return; waitForKey(); clearKeys(); if(clearScreen) SDL_FillRect(screen, 0, bgColor); } bool Gfx::inputString(std::string& dest, std::size_t maxLen, int x, int y, int (*filter)(int), std::string const& prefix, bool centered) { std::string buffer = dest; while(running) { std::string str = prefix + buffer + '_'; Font& font = common->font; int width = font.getDims(str); int adjust = centered ? width/2 : 0; int clrX = x - 10 - adjust; int offset = clrX + y*320; // TODO: Unhardcode 320 blitImageNoKeyColour(screen, &frozenScreen[offset], clrX, y, clrX + 10 + width, 8, 320); drawRoundedBox(x - 2 - adjust, y, 0, 7, width); font.drawText(str, x - adjust, y + 1, 50); process(); flip(); SDL_keysym key(waitForKey()); switch(key.sym) { case SDLK_BACKSPACE: if(!buffer.empty()) { buffer.erase(buffer.size() - 1); } break; case SDLK_RETURN: case SDLK_KP_ENTER: dest = buffer; sfx.play(27); clearKeys(); return true; case SDLK_ESCAPE: clearKeys(); return false; default: int k = unicodeToDOS(key.unicode); if(k && buffer.size() < maxLen && ( !filter || (k = filter(k)))) { buffer += char(k); } } } return false; // Treat SDL_QUIT as ESC for unwinding here } int filterDigits(int k) { return std::isdigit(k) ? k : 0; } void Gfx::inputInteger(int& dest, int min, int max, std::size_t maxLen, int x, int y) { std::string str(toString(dest)); if(inputString(str, maxLen, x, y, filterDigits) && !str.empty()) { dest = std::atoi(str.c_str()); if(dest < min) dest = min; else if(dest > max) dest = max; } } void PlayerMenu::drawItemOverlay(Common& common, int item, int x, int y, bool selected, bool disabled) { if(item >= 2 && item <= 4) //Color settings { int rgbcol = item - 2; if(selected) { drawRoundedBox(x + 24, y, 168, 7, ws->rgb[rgbcol] - 1); } else // CE98 { drawRoundedBox(x + 24, y, 0, 7, ws->rgb[rgbcol] - 1); } fillRect(x + 25, y + 1, ws->rgb[rgbcol], 5, ws->color); } // CED9 } ItemBehavior* PlayerMenu::getItemBehavior(Common& common, int item) { switch(item) { case 0: return new WormNameBehavior(common, *ws); case 1: return new IntegerBehavior(common, ws->health, 1, 10000, 1, true); case 2: case 3: case 4: return new IntegerBehavior(common, ws->rgb[item - 2], 0, 63, 1, false); case 5: // D2AB case 6: case 7: case 8: case 9: case 10: case 11: return new KeyBehavior(common, ws->controls[item - 5], ws->controlsEx[item - 5], gfx.settings->extensions ); case 12: // Controls Extension return new KeyBehavior(common, ws->controlsEx[item - 5], ws->controlsEx[item - 5], gfx.settings->extensions ); case 13: // Controller { // Controller cannot be changed with Enter return new ArrayEnumBehavior(common, ws->controller, common.texts.controllers, true); } case 14: // Save profile return new ProfileSaveBehavior(common, *ws, false); case 15: // Save profile as return new ProfileSaveBehavior(common, *ws, true); case 16: return new ProfileLoadBehavior(common, *ws); default: return Menu::getItemBehavior(common, item); } } void Gfx::playerSettings(int player) { playerMenu.ws = settings->wormSettings[player]; playerMenu.updateItems(*common); playerMenu.moveToFirstVisible(); curMenu = &playerMenu; return; } void Gfx::mainLoop() { Rand rand = gfx.rand; controller.reset(new LocalController(common, settings)); { Level newLevel; newLevel.generateFromSettings(*common, *settings, rand); controller->swapLevel(newLevel); } controller->currentGame()->focus(); // TODO: Unfocus game when necessary while(running) { clear(); controller->draw(); gfx.mainMenu.setVisibility(0, controller->running()); int selection = menuLoop(); if(selection == MaNewGame) { std::auto_ptr newController(new LocalController(common, settings)); Level* oldLevel = controller->currentLevel(); if(oldLevel && !settings->regenerateLevel && settings->randomLevel == oldLevel->oldRandomLevel && settings->levelFile == oldLevel->oldLevelFile) { // Take level and palette from old game newController->swapLevel(*oldLevel); } else { Level newLevel; newLevel.generateFromSettings(*common, *settings, rand); newController->swapLevel(newLevel); } controller = newController; } else if(selection == MaResumeGame) { } else if(selection == MaQuit) // QUIT TO OS { break; } else if(selection == MaReplay) { //controller.reset(new ReplayController(common/*, settings*/)); } controller->focus(); while(running) { if(!controller->process()) break; clear(); controller->draw(); flip(); process(controller.get()); } controller->unfocus(); clearKeys(); /* game->shutDown = false; do { game->processFrame(); clear(); game->draw(); flip(); process(game.get()); } while(fadeValue > 0);*/ } controller.reset(); } void Gfx::saveSettings() { settings->save(data_path->file(settingsFile + ".DAT")); } bool Gfx::loadSettings() { settings.reset(new Settings); return settings->load(data_path->file(settingsFile + ".DAT")); } void Gfx::loadOPT(std::string path) { FILE* f = fopen(path.c_str(), "rb"); if (f == NULL) { throw std::runtime_error("failed to open '" + path + "' for reading"); } std::size_t len = fileLength(f); if (len > 255) len = 255; char buf[256]; if (fread(buf, 1, len, f) != len) { fclose(f); throw std::runtime_error("failed to fully read '" + path + "'"); } gfx.settingsFile.assign(buf, len); rtrim(gfx.settingsFile); fclose(f); } void Gfx::saveOPT(std::string path) { FILE* f = fopen(path.c_str(), "wb"); if (f == NULL) { throw std::runtime_error("failed to open '" + path + "' for writing"); } else if (fwrite(gfx.settingsFile.data(), 1, gfx.settingsFile.size(), f) != gfx.settingsFile.size()) { fclose(f); throw std::runtime_error("failed to fully write to '" + path + "'"); } else if (fputc('\r', f) == EOF || fputc('\n', f) == EOF) { fclose(f); throw std::runtime_error("failed to fully write to '" + path + "'"); } fclose(f); } void Gfx::drawBasicMenu(/*int curSel*/) { std::memcpy(screen->pixels, &frozenScreen[0], frozenScreen.size()); common->font.drawText(common->texts.saveoptions, 36, 54+20, 0); common->font.drawText(common->texts.loadoptions, 36, 61+20, 0); common->font.drawText(common->texts.saveoptions, 36, 53+20, 10); common->font.drawText(common->texts.loadoptions, 36, 60+20, 10); if(settingsFile.empty()) { common->font.drawText(common->texts.curOptNoFile, 36, 46+20, 0); common->font.drawText(common->texts.curOptNoFile, 35, 45+20, 147); } else { common->font.drawText(common->texts.curOpt + settingsFile, 36, 46+20, 0); common->font.drawText(common->texts.curOpt + settingsFile, 35, 45+20, 147); } /* TODO if(!settingsfile[0]) { DrawTextMW(txt_curoptnofile, 36, 46+20, 0); DrawTextMW(txt_curoptnofile, 35, 45+20, 147); } else // E8A6 { char buffer[256]; sprintf(buffer, txt_curopt, settingsfile); DrawTextMW(buffer, 36, 46+20, 0); DrawTextMW(buffer, 35, 45+20, 147); } // E90E */ mainMenu.draw(*common, curMenu != &mainMenu); } int upperCaseOnly(int k) { k = std::toupper(k); if((k >= 'A' && k <= 'Z') || (k == 0x8f || k == 0x8e || k == 0x99) // � �and � || (k >= '0' && k <= '9')) return k; return 0; } int Gfx::menuLoop() { std::memset(pal.entries, 0, sizeof(pal.entries)); flip(); process(); if(!running) return 0; fillRect(0, 151, 160, 7, 0); common->font.drawText(common->texts.copyright2, 2, 152, 19); mainMenu.moveToFirstVisible(); settingsMenu.moveToFirstVisible(); settingsMenu.updateItems(*common); fadeValue = 0; curMenu = &mainMenu; std::memcpy(&frozenScreen[0], screen->pixels, frozenScreen.size()); updateExtensions(settings->extensions); updateSettingsMenu(); menuCyclic = 0; int selected = -1; do { if(curMenu == &playerMenu) menuCyclic = (menuCyclic + 1) & 3; else menuCyclic = (menuCyclic + 1) % 5; drawBasicMenu(); if(curMenu == &mainMenu) settingsMenu.draw(*common, true); else curMenu->draw(*common, false); if(testSDLKeyOnce(SDLK_ESCAPE)) { if(curMenu == &playerMenu) curMenu = &settingsMenu; else if(curMenu == &mainMenu) mainMenu.moveTo(3); else curMenu = &mainMenu; } if(testSDLKeyOnce(SDLK_UP)) { sfx.play(26); curMenu->movement(-1); } if(testSDLKeyOnce(SDLK_DOWN)) { sfx.play(25); curMenu->movement(1); } if(testSDLKeyOnce(SDLK_RETURN) || testSDLKeyOnce(SDLK_KP_ENTER)) { if(curMenu == &mainMenu) { sfx.play(27); if(mainMenu.selection() == MaSettings) { curMenu = &settingsMenu; // Go into settings menu } else // ED71 { curMenu = &mainMenu; selected = mainMenu.selection(); } // ED75 } else if(curMenu == &settingsMenu) { settingsMenu.onEnter(*common); updateSettingsMenu(); } else { selected = curMenu->onEnter(*common); } } if(testSDLKeyOnce(SDLK_F1) && curMenu != &hiddenMenu) { curMenu = &hiddenMenu; curMenu->updateItems(*common); curMenu->moveToFirstVisible(); } if(testSDLKeyOnce(SDLK_s)) // TODO: Check for the real 's' here? { if(inputString(settingsFile, 8, 35, 65, upperCaseOnly, "Filename: ", false)) { saveSettings(); } } if(testSDLKeyOnce(SDLK_l)) // TODO: Check if inputString should make a sound even when loading fails { while(inputString(settingsFile, 8, 35, 65, upperCaseOnly, "Filename: ", false)) { if(loadSettings()) { updateSettingsMenu(); settingsMenu.updateItems(*common); break; } } } if(curMenu == &settingsMenu) { if(testSDLKey(SDLK_LEFT)) { //settingLeftRight(-1, settingsMenu.selection()); if(!settingsMenu.onLeftRight(*common, -1)) resetLeftRight(); updateSettingsMenu(); } // EDAE if(testSDLKey(SDLK_RIGHT)) { //settingLeftRight(1, settingsMenu.selection()); if(!settingsMenu.onLeftRight(*common, 1)) resetLeftRight(); updateSettingsMenu(); } // EDBF } else // if(curMenu == &playerMenu) { if(testSDLKey(SDLK_LEFT)) { if(!curMenu->onLeftRight(*common, -1)) resetLeftRight(); } if(testSDLKey(SDLK_RIGHT)) { if(!curMenu->onLeftRight(*common, 1)) resetLeftRight(); } } if(settings->extensions) { if(testSDLKeyOnce(SDLK_PAGEUP)) { sfx.play(26); curMenu->movementPage(-1); } if(testSDLKeyOnce(SDLK_PAGEDOWN)) { sfx.play(25); curMenu->movementPage(1); } } origpal.setWormColours(*settings); origpal.rotate(168, 174); pal = origpal; if(fadeValue < 32) { fadeValue += 1; pal.fade(fadeValue); } // EDE3 flip(); process(); } while(running && selected < 0); for(fadeValue = 32; fadeValue > 0; --fadeValue) { pal = origpal; pal.fade(fadeValue); flip(); // TODO: We should just screen sync and set the palette here } // EE36 return selected; } lierolibre-0.5/src/gfx.hpp000066400000000000000000000141151205125547100155760ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2011-2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_GFX_HPP #define LIERO_GFX_HPP #include #include #include #include #include #include "gfx/font.hpp" #include "gfx/blit.hpp" #include "gfx/color.hpp" #include "menu/menu.hpp" #include "menu/hiddenMenu.hpp" #include "rect.hpp" #include "rand.hpp" #include "keys.hpp" #include "settings.hpp" #include "common.hpp" struct Key { Key(int sym, char ch) : sym(sym), ch(ch) { } int sym; char ch; }; struct Game; struct Controller; struct Gfx; struct PlayerMenu : Menu { PlayerMenu(int x, int y) : Menu(x, y) { } virtual void drawItemOverlay(Common& common, int item, int x, int y, bool selected, bool disabled); virtual ItemBehavior* getItemBehavior(Common& common, int item); gvl::shared_ptr ws; }; struct SettingsMenu : Menu { SettingsMenu(int x, int y) : Menu(x, y) { } virtual ItemBehavior* getItemBehavior(Common& common, int item); }; enum { MaResumeGame = 0, MaNewGame = 1, MaSettings = 2, MaQuit = 3, MaReplay = 4 }; struct Joystick { SDL_Joystick *sdlJoystick; bool btnState[MaxJoyButtons]; void clearState() { for ( int i = 0; i < MaxJoyButtons; ++i ) btnState[i] = false; } }; struct Gfx { Gfx(); void init(); void setVideoMode(); void setMaxVideoMode(); void loadPalette(); void loadMenus(); void loadMenusFromCFG(std::string cfgFilePath); void writeMenusToCFG(std::string cfgFilePath); void process(Controller* controller = 0); void flip(); void clear(); void clearKeys(); unsigned char& getScreenPixel(int x, int y) { return (static_cast(screenPixels) + y*screenPitch)[x]; } /* bool testKeyOnce(int key) { bool state = keys[key]; keys[key] = false; return state; } bool testKey(int key) { return keys[key]; } void releaseKey(int key) { keys[key] = false; }*/ bool testKeyOnce(Uint32 key) { bool state = dosKeys[key]; dosKeys[key] = false; return state; } bool testKey(Uint32 key) { return dosKeys[key]; } void releaseKey(Uint32 key) { dosKeys[key] = false; } void pressKey(Uint32 key) { dosKeys[key] = true; } void setKey(Uint32 key, bool state) { dosKeys[key] = state; } void toggleKey(Uint32 key) { dosKeys[key] = !dosKeys[key]; } bool testSDLKeyOnce(SDLKey key) { Uint32 k = SDLToDOSKey(key); return k ? testKeyOnce(k) : false; } bool testSDLKey(SDLKey key) { Uint32 k = SDLToDOSKey(key); return k ? testKey(k) : false; } void releaseSDLKey(SDLKey key) { Uint32 k = SDLToDOSKey(key); if(k) dosKeys[k] = false; } SDL_keysym waitForKey(); uint32_t waitForKeyEx(); std::string getKeyName( uint32_t key ); void saveSettings(); bool loadSettings(); void saveOPT(std::string); void loadOPT(std::string); void processEvent(SDL_Event& ev, Controller* controller = 0); //void settingEnter(int item); //void settingLeftRight(int change, int item); void updateSettingsMenu(); //void setWormColours(); int menuLoop(); void mainLoop(); void drawBasicMenu(/*int curSel*/); void playerSettings(int player); //void inputString(std::string& dest, std::size_t maxLen, int x, int y, bool onlyDigits = false); bool inputString(std::string& dest, std::size_t maxLen, int x, int y, int (*filter)(int) = 0, std::string const& prefix = "", bool centered = true); void inputInteger(int& dest, int min, int max, std::size_t maxLen, int x, int y); void selectLevel(); int selectReplay(); void selectProfile(WormSettings& ws); void updateExtensions(bool enabled); void weaponOptions(); void infoBox(std::string const& text, int x = 320/2, int y = 200/2, bool clearScreen = true); int fitScreen(int backW, int backH, int scrW, int scrH, int& offsetX, int& offsetY); Menu mainMenu; SettingsMenu settingsMenu; PlayerMenu playerMenu; HiddenMenu hiddenMenu; Menu* curMenu; std::string settingsFile; // Currently loaded settings file gvl::shared_ptr settings; Palette pal; Palette origpal; //bool keys[SDLK_LAST]; bool dosKeys[177]; SDL_Surface* screen; SDL_Surface* back; std::vector frozenScreen; unsigned char* screenPixels; unsigned int screenPitch; bool running; bool fullscreen; int fadeValue; Uint32 lastFrame; int menuCyclic; int desktopH, desktopW, windowW, windowH, storedWindowH, storedWindowW; int prevMag; // Previous magnification used for drawing gvl::rect lastUpdateRect; // Last region that was updated when flipping Rand rand; // PRNG for things that don't affect the game gvl::shared_ptr common; std::auto_ptr controller; std::vector joysticks; }; extern Gfx gfx; #endif // LIERO_GFX_HPP lierolibre-0.5/src/gfx/000077500000000000000000000000001205125547100150635ustar00rootroot00000000000000lierolibre-0.5/src/gfx/blit.cpp000066400000000000000000000252721205125547100165310ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../gfx.hpp" #include "../rect.hpp" #include "../constants.hpp" #include "../level.hpp" #include "macros.hpp" #include #include #include void fillRect(int x, int y, int w, int h, int color) { SDL_Rect rect; rect.x = x; rect.y = y; rect.w = w; rect.h = h; SDL_FillRect(gfx.screen, &rect, color); } void drawBar(int x, int y, int width, int color) { if(width > 0) { std::memset(&gfx.getScreenPixel(x, y), color, width); std::memset(&gfx.getScreenPixel(x, y+1), color, width); } } void drawRoundedBox(int x, int y, int color, int height, int width) { height--; std::memset(&gfx.getScreenPixel(x+1,y), color, width+1); for(long i=1; iclip_rect); PalIdx* scrptr = static_cast(scr->pixels) + y*scr->pitch + x; for(int y = 0; y < height; ++y) { std::memcpy(scrptr, mem, width); scrptr += scr->pitch; mem += pitch; } } void blitImage(SDL_Surface* scr, PalIdx* mem, int x, int y, int width, int height) { int pitch = width; CLIP_IMAGE(scr->clip_rect); PalIdx* scrptr = static_cast(scr->pixels) + y*scr->pitch + x; for(int y = 0; y < height; ++y) { PalIdx* rowdest = scrptr; PalIdx* rowsrc = mem; for(int x = 0; x < width; ++x) { PalIdx c = *rowsrc; if(c) *rowdest = c; ++rowsrc; ++rowdest; } scrptr += scr->pitch; mem += pitch; } } #define BLIT(body) do { \ PalIdx* scrptr = static_cast(scr->pixels) + y*scr->pitch + x; \ for(int y = 0; y < height; ++y) { \ PalIdx* rowdest = scrptr; \ PalIdx* rowsrc = mem; \ for(int x = 0; x < width; ++x) { \ PalIdx c = *rowsrc; \ body \ ++rowsrc; \ ++rowdest; } \ scrptr += scr->pitch; \ mem += pitch; } } while(false) #define BLIT2(pixels, destpitch, body) do { \ PalIdx* scrptr = static_cast(pixels) + y*(destpitch) + x; \ for(int y = 0; y < height; ++y) { \ PalIdx* rowdest = scrptr; \ PalIdx* rowsrc = mem; \ for(int x = 0; x < width; ++x) { \ PalIdx c = *rowsrc; \ body \ ++rowsrc; \ ++rowdest; } \ scrptr += (destpitch); \ mem += pitch; } } while(false) void blitImageR(SDL_Surface* scr, PalIdx* mem, int x, int y, int width, int height) { int pitch = width; CLIP_IMAGE(scr->clip_rect); PalIdx* scrptr = static_cast(scr->pixels) + y*scr->pitch + x; for(int y = 0; y < height; ++y) { PalIdx* rowdest = scrptr; PalIdx* rowsrc = mem; for(int x = 0; x < width; ++x) { PalIdx c = *rowsrc; if(c && (PalIdx(*rowdest - 160) < 8)) *rowdest = c; ++rowsrc; ++rowdest; } scrptr += scr->pitch; mem += pitch; } } void blitFireCone(SDL_Surface* scr, int fc, PalIdx* mem, int x, int y) { int width = 16; int height = 16; int pitch = width; CLIP_IMAGE(scr->clip_rect); switch(fc) { case 0: BLIT( { if(c > 116) *rowdest = c - 5; } ); break; case 1: BLIT( { if(c > 114) *rowdest = c - 3; } ); break; case 2: BLIT( { if(c > 112) *rowdest = c - 1; } ); break; default: BLIT( { if(c) *rowdest = c; } ); break; } } void blitImageOnMap(Common& common, Level& level, PalIdx* mem, int x, int y, int width, int height) { int pitch = width; SDL_Rect clipRect = {0, 0, level.width, level.height}; CLIP_IMAGE(clipRect); BLIT2(&level.data[0], level.width, { if(c) { if(common.materials[*rowdest].dirtBack()) *rowdest = c; else *rowdest = c + 3; } }); } void blitShadowImage(Common& common, SDL_Surface* scr, PalIdx* mem, int x, int y, int width, int height) { int pitch = width; CLIP_IMAGE(scr->clip_rect); PalIdx* scrptr = static_cast(scr->pixels) + y*scr->pitch + x; for(int y = 0; y < height; ++y) { PalIdx* rowdest = scrptr; PalIdx* rowsrc = mem; for(int x = 0; x < width; ++x) { PalIdx c = *rowsrc; if(c && common.materials[*rowdest].seeShadow()) // TODO: Speed up this test? *rowdest += 4; ++rowsrc; ++rowdest; } scrptr += scr->pitch; mem += pitch; } } void blitStone(Common& common, Level& level, bool p1, PalIdx* mem, int x, int y) { int width = 16; int height = 16; int pitch = width; SDL_Rect clip = {0, 0, level.width, level.height}; CLIP_IMAGE(clip); PalIdx* dest = &level.pixel(x, y); if(p1) { for(int y = 0; y < height; ++y) { PalIdx* rowdest = dest; PalIdx* rowsrc = mem; for(int x = 0; x < width; ++x) { PalIdx c = *rowsrc; if(c && common.materials[*rowdest].dirtBack()) // TODO: Speed up this test? *rowdest = c; else *rowdest = c + 3; ++rowsrc; ++rowdest; } dest += level.width; mem += pitch; } } else { for(int y = 0; y < height; ++y) { PalIdx* rowdest = dest; PalIdx* rowsrc = mem; for(int x = 0; x < width; ++x) { PalIdx c = *rowsrc; if(c) *rowdest = c; ++rowsrc; ++rowdest; } dest += level.width; mem += pitch; } } } void drawDirtEffect(Common& common, Rand& rand, Level& level, int dirtEffect, int x, int y) { Texture& tex = common.textures[dirtEffect]; PalIdx* tFrame = common.largeSprites.spritePtr(tex.sFrame + rand(tex.rFrame)); PalIdx* mFrame = common.largeSprites.spritePtr(tex.mFrame); // TODO: Optimize this if(tex.nDrawBack) { for(int cy = 0; cy < 16; ++cy) { int my = cy + y; if(my >= level.height - 1) break; if(my < 0) continue; for(int cx = 0; cx < 16; ++cx) { int mx = cx + x; if(mx >= level.width) break; if(mx < 0) continue; switch(mFrame[(cy << 4) + cx]) { case 6: if(common.materials[level.pixel(mx, my)].anyDirt()) { level.pixel(mx, my) = tFrame[((my & 15) << 4) + (mx & 15)]; } break; case 1: PalIdx& pix = level.pixel(mx, my); if(common.materials[pix].dirt()) pix = 1; if(common.materials[pix].dirt2()) pix = 2; } } } } else { for(int cy = 0; cy < 16; ++cy) { int my = cy + y; if(my >= level.height - 1) break; if(my < 0) continue; for(int cx = 0; cx < 16; ++cx) { int mx = cx + x; if(mx >= level.width) break; if(mx < 0) continue; switch(mFrame[(cy << 4) + cx]) { case 10: case 6: if(common.materials[level.pixel(mx, my)].background()) { level.pixel(mx, my) = tFrame[((my & 15) << 4) + (mx & 15)]; } break; case 2: { PalIdx& pix = level.pixel(mx, my); if(common.materials[pix].background()) pix = 2; } break; case 1: { PalIdx& pix = level.pixel(mx, my); if(common.materials[pix].background()) pix = 1; } break; } } } } } void correctShadow(Common& common, Level& level, Rect rect) { rect.intersect(Rect(0, 3, level.width - 3, level.height)); for(int x = rect.x1; x < rect.x2; ++x) for(int y = rect.y1; y < rect.y2; ++y) { PalIdx& pix = level.pixel(x, y); if(common.materials[pix].seeShadow() && common.materials[level.pixel(x + 3, y - 3)].dirtRock()) { pix += 4; } else if(pix >= 164 // Remove shadow && pix <= 167 && !common.materials[level.pixel(x + 3, y - 3)].dirtRock()) { pix -= 4; } } } inline int sign(int v) { return v < 0 ? -1 : (v > 0 ? 1 : 0); } bool isInside(SDL_Rect const& rect, int x, int y) { return static_cast(x - rect.x) < rect.w && static_cast(y - rect.y) < rect.h; } #define DO_LINE(body_) { \ int cx = fromX; \ int cy = fromY; \ int dx = toX - fromX; \ int dy = toY - fromY; \ int sx = sign(dx); \ int sy = sign(dy); \ dx = std::abs(dx); \ dy = std::abs(dy); \ if(dx > dy) { \ int c = -(dx >> 1); \ while(cx != toX) { \ c += dy; \ cx += sx; \ if(c > 0) { \ cy += sy; \ c -= dx; } \ body_ } \ } else { \ int c = -(dy >> 1); \ while(cy != toY) { \ c += dx; \ cy += sy; \ if(c > 0) { \ cx += sx; \ c -= dy; } \ body_ } } } void drawNinjarope(Common& common, int fromX, int fromY, int toX, int toY) { int color = common.C[NRColourBegin]; SDL_Rect& clip = gfx.screen->clip_rect; PalIdx* ptr = gfx.screenPixels; unsigned int pitch = gfx.screenPitch; DO_LINE({ if(++color == common.C[NRColourEnd]) color = common.C[NRColourBegin]; if(isInside(clip, cx, cy)) ptr[cy*pitch + cx] = color; }); } void drawLaserSight(int fromX, int fromY, int toX, int toY) { SDL_Rect& clip = gfx.screen->clip_rect; PalIdx* ptr = gfx.screenPixels; unsigned int pitch = gfx.screenPitch; DO_LINE({ if(gfx.rand(5) == 0) { if(isInside(clip, cx, cy)) ptr[cy*pitch + cx] = gfx.rand(2) + 83; } }); } void drawShadowLine(Common& common, int fromX, int fromY, int toX, int toY) { SDL_Rect& clip = gfx.screen->clip_rect; PalIdx* ptr = gfx.screenPixels; unsigned int pitch = gfx.screenPitch; DO_LINE({ if(isInside(clip, cx, cy)) { PalIdx& pix = ptr[cy*pitch + cx]; if(common.materials[pix].seeShadow()) pix += 4; } }); } void drawLine(int fromX, int fromY, int toX, int toY, int color) { SDL_Rect& clip = gfx.screen->clip_rect; PalIdx* ptr = gfx.screenPixels; unsigned int pitch = gfx.screenPitch; DO_LINE({ if(isInside(clip, cx, cy)) { ptr[cy*pitch + cx] = color; } }); } lierolibre-0.5/src/gfx/blit.hpp000066400000000000000000000061521205125547100165320ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_9059AB0F9EA54E1EDF52E7BF41433D0B #define UUID_9059AB0F9EA54E1EDF52E7BF41433D0B #include #include "color.hpp" #include "../rect.hpp" struct Level; struct Common; struct Rand; void fillRect(int x, int y, int w, int h, int color); void drawBar(int x, int y, int width, int color); void drawRoundedBox(int x, int y, int color, int height, int width); void blitImageNoKeyColour(SDL_Surface* scr, PalIdx* mem, int x, int y, int width, int height, int pitch); void blitImage(SDL_Surface* scr, PalIdx* mem, int x, int y, int width, int height); void blitImageR(SDL_Surface* scr, PalIdx* mem, int x, int y, int width, int height); void blitShadowImage(Common& common, SDL_Surface* scr, PalIdx* mem, int x, int y, int width, int height); void blitStone(Common& common, Level& level, bool p1, PalIdx* mem, int x, int y); void blitFireCone(SDL_Surface* scr, int fc, PalIdx* mem, int x, int y); void drawDirtEffect(Common& common, Rand& rand, Level& level, int dirtEffect, int x, int y); void blitImageOnMap(Common& common, Level& level, PalIdx* mem, int x, int y, int width, int height); void correctShadow(Common& common, Level& level, Rect rect); void drawNinjarope(Common& common, int fromX, int fromY, int toX, int toY); void drawLaserSight(int fromX, int fromY, int toX, int toY); void drawShadowLine(Common& common, int fromX, int fromY, int toX, int toY); void drawLine(int fromX, int fromY, int toX, int toY, int color); bool isInside(SDL_Rect const& rect, int x, int y); inline void blitImageNoKeyColour(SDL_Surface* scr, PalIdx* mem, int x, int y, int width, int height) { blitImageNoKeyColour(scr, mem, x, y, width, height, width); } #endif // UUID_9059AB0F9EA54E1EDF52E7BF41433D0B lierolibre-0.5/src/gfx/color.hpp000066400000000000000000000031431205125547100167130ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_5BD6F9D1EBD64180EE632D8970906BDA #define UUID_5BD6F9D1EBD64180EE632D8970906BDA typedef unsigned char PalIdx; #endif // UUID_5BD6F9D1EBD64180EE632D8970906BDA lierolibre-0.5/src/gfx/font.cpp000066400000000000000000000117661205125547100165500ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "font.hpp" #include "../reader.hpp" #include "../gfx.hpp" #include "macros.hpp" #include "color.hpp" #include #include #include "configHelper.hpp" #include "to_string.hpp" void Font::loadFromEXE() { chars.resize(250); std::size_t const FontSize = 250 * 8 * 8 + 1; std::vector temp(FontSize); FILE* exe = openLieroEXE(); fseek(exe, 0x1C825, SEEK_SET); checkedFread(&temp[0], 1, FontSize, exe); for(int i = 0; i < 250; ++i) { unsigned char* ptr = &temp[i*64 + 1]; for(int y = 0; y < 8; ++y) { for(int x = 0; x < 7; ++x) { chars[i].data[y*7 + x] = ptr[y*8 + x]; } } chars[i].width = ptr[63]; } } void Font::loadFromCFG(std::string cfgFilePath) { chars.resize(250); libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &sfont = cfg.lookup("Font"); for(int i = 0; i < 250; ++i) { const libconfig::Setting &sfchar = sfont[i]; for(int j = 0; j < 56; ++j) { // Font { char0 { data[] const libconfig::Setting &sfcdata = sfchar["data"]; chars[i].data[j] = cfgHelp.getValue(sfcdata, j); } // Font { char0 { width chars[i].width = sfchar["width"]; } } void Font::writeToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &sfont = cfgHelp.getSubgroup(root, "Font"); for(int i = 0; i < 250; ++i) { libconfig::Setting &sfchar = cfgHelp.getSubgroup(sfont, "char" + to_string(i)); libconfig::Setting &sfcdata = cfgHelp.mkArray(sfchar, "data"); for(int j = 0; j < 56; ++j) { // convert from Uint8 to int for config sfcdata.add(libconfig::Setting::TypeInt) = static_cast(chars[i].data[j]); } // Font { char0 { width cfgHelp.put(sfchar, "width", chars[i].width); } cfg.writeFile(cfgFilePath.c_str()); } void Font::drawChar(unsigned char c, int x, int y, int color) { if(c >= 2 && c < 252) // TODO: Is this correct, shouldn't it be c >= 0 && c < 250, since drawText subtracts 2? { SDL_Surface* scr = gfx.screen; uint8_t* mem = chars[c].data; int width = 7; int height = 8; int pitch = 7; CLIP_IMAGE(scr->clip_rect); PalIdx* scrptr = static_cast(scr->pixels) + y*scr->pitch + x; for(int cy = 0; cy < height; ++cy) { PalIdx* rowdest = scrptr; PalIdx* rowsrc = mem; for(int cx = 0; cx < width; ++cx) { PalIdx c = *rowsrc; if(c) *rowdest = color; ++rowsrc; ++rowdest; } scrptr += scr->pitch; mem += pitch; } } } void Font::drawText(char const* str, std::size_t len, int x, int y, int color) { int orgX = x; for(std::size_t i = 0; i < len; ++str, ++i) { unsigned char c = static_cast(*str); if(!c) { x = orgX; y += 8; } else if(c >= 2 && c < 252) { c -= 2; drawChar(c, x, y, color); x += chars[c].width; } } } void Font::drawFramedText(std::string const& text, int x, int y, int color) { drawRoundedBox(x, y, 0, 7, getDims(text)); drawText(text, x + 2, y + 1, color); } int Font::getDims(char const* str, std::size_t len, int* height) { int width = 0; int maxHeight = 8; int maxWidth = 0; for(std::size_t i = 0; i < len; ++str, ++i) { unsigned char c = static_cast(*str); if(c >= 2 && c < 252) width += chars[c - 2].width; else if(!c) { maxWidth = std::max(maxWidth, width); width = 0; maxHeight += 8; } } if(height) *height = maxHeight; return std::max(maxWidth, width); } lierolibre-0.5/src/gfx/font.hpp000066400000000000000000000046321205125547100165470ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_B06B65B783A849C7B4E509A9676180F8 #define UUID_B06B65B783A849C7B4E509A9676180F8 #include #include struct Font { struct Char { unsigned char data[8*7]; int width; }; Font() : chars(250) { } void loadFromEXE(); void loadFromCFG(std::string cfgFilePath); void writeToCFG(std::string cfgFilePath); void drawText(char const* str, std::size_t len, int x, int y, int color); int getDims(char const* str, std::size_t len, int* height = 0); void drawChar(unsigned char ch, int x, int y, int color); void drawText(std::string const& str, int x, int y, int color) { drawText(str.data(), str.size(), x, y, color); } int getDims(std::string const& str, int* height = 0) { return getDims(str.data(), str.size(), height); } void drawFramedText(std::string const& text, int x, int y, int color); std::vector chars; }; #endif // UUID_B06B65B783A849C7B4E509A9676180F8 lierolibre-0.5/src/gfx/macros.hpp000066400000000000000000000142241205125547100170630ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_16A8D91C6BEA4174A45E11A5F85FB93C #define UUID_16A8D91C6BEA4174A45E11A5F85FB93C inline uint8_t choose(uint8_t this_, uint8_t if_this, uint8_t is_different_from_this, uint8_t otherwise_this) { int32_t mask = (int32_t(if_this^is_different_from_this) - 1) >> 31; return this_ ^ ((this_^otherwise_this) & mask); } #define SCALE2X_DECL uint32_t R1, R2, R3, R4 #if 1 #define SCALE2X() do { \ if(B != H && F != D) { \ R1 = D == B ? B : E; \ R2 = B == F ? F : E; \ R4 = F == H ? H : E; \ R3 = H == D ? D : E; \ } else { \ R1 = E; \ R2 = E; \ R4 = E; \ R3 = E; \ } \ } while(0) #else #define SCALE2X() do { \ if(B != H && F != D) { \ R1 = choose(E, D, B, B); \ R2 = choose(E, B, F, F); \ R4 = choose(E, F, H, H); \ R3 = choose(E, H, D, D); \ } else { \ R1 = E; \ R2 = E; \ R4 = E; \ R3 = E; \ } \ } while(0) #endif #define WRITER_2X_8(dest) do { \ uint8_t* pix_2x_dest_ = (dest); \ pix_2x_dest_[0] = R1; \ pix_2x_dest_[1] = R2; \ pix_2x_dest_[downOffset] = R3; \ pix_2x_dest_[downOffset+1] = R4; \ } while(0) #define READER_8(x, src) do { \ x = *(src); \ } while(0) #define SHIFT_X() do { \ A = B; \ B = C; \ D = E; \ E = F; \ G = H; \ H = I; \ } while(0) #define FILTER_X(dest, destPitch, src, srcPitch, width, height, srcSize, destSize, FUNC, ATTRIB, READER, WRITER) do { \ uint8_t* dest_ = (dest); \ uint8_t const* src_ = (src); \ int destPitch_ = (destPitch); \ int srcPitch_ = (srcPitch); \ int width_ = (width); \ int height_ = (height); \ int srcSize_ = (srcSize); \ int destSize_ = (destSize); \ ATTRIB; \ uint32_t A, B, C, D, E, F, G, H, I; \ /* First line */ \ { \ uint8_t const* line_ = src_; \ uint8_t const* lineB_ = src_ + srcPitch_; \ uint8_t* destLine_ = dest_; \ A = 0; B = 0 ; C = 0 ; \ D = 0; READER(E, line_) ; READER(F, line_ += srcSize_); \ G = 0; READER(H, lineB_); READER(I, lineB_ += srcSize_); \ /* First pixel on first line */ \ for(int x_ = 0;;) { \ FUNC(); \ WRITER(destLine_); \ SHIFT_X(); \ destLine_ += destSize_; \ if(++x_ >= width - 1) \ break; \ line_ += srcSize_; lineB_ += srcSize_; \ READER(F, line_); \ READER(I, lineB_); \ } \ C = 0; F = 0; I = 0; \ /* Last pixel on first line */ \ FUNC(); \ WRITER(destLine_); \ } \ for(int y_ = 1; y_ < height - 1; ++y_) \ { \ uint8_t const* lineA_ = src_ + (y_-1)*srcPitch_; \ uint8_t const* line_ = src_ + y_*srcPitch_; \ uint8_t const* lineB_ = src_ + (y_+1)*srcPitch; \ uint8_t* destLine_ = dest_ + y_*destPitch; \ A = 0; READER(B, lineA_); READER(C, lineA_ += srcSize_); \ D = 0; READER(E, line_) ; READER(F, line_ += srcSize_); \ G = 0; READER(H, lineB_); READER(I, lineB_ += srcSize_); \ /* First pixel */ \ for(int x_ = 0;;) { \ FUNC(); \ WRITER(destLine_); \ SHIFT_X(); \ destLine_ += destSize_; \ if(++x_ >= width - 1) \ break; \ lineA_ += srcSize_; line_ += srcSize_; lineB_ += srcSize_; \ READER(C, lineA_); \ READER(F, line_); \ READER(I, lineB_); \ } \ /* Last pixel */ \ C = 0; F = 0; I = 0; \ FUNC(); \ WRITER(destLine_); \ } \ /* Last line */ \ { \ uint8_t const* lineA_ = src_ + (height-2)*srcPitch_; \ uint8_t const* line_ = src_ + (height-1)*srcPitch_; \ uint8_t* destLine_ = dest_ + (height-1)*destPitch; \ A = 0; READER(B, lineA_); READER(C, lineA_ += srcSize_); \ D = 0; READER(E, line_) ; READER(F, line_ += srcSize_); \ G = 0; H = 0 ; I = 0 ; \ /* First pixel on last line */ \ for(int x_ = 0;;) { \ FUNC(); \ WRITER(destLine_); \ SHIFT_X(); \ destLine_ += destSize_; \ if(++x_ >= width - 1) \ break; \ lineA_ += srcSize_; line_ += srcSize_; \ READER(C, lineA_); \ READER(F, line_); \ } \ /* Last pixel on last line */ \ C = 0; F = 0; I = 0; \ FUNC(); \ WRITER(destLine_); \ } \ } while(0) #define CLIP_IMAGE(clip) \ { \ int top = y - (clip).y; \ if(top < 0) { \ mem += -top * pitch; \ height += top; \ y = (clip).y; } \ int bottom = y + height - ((clip).y + (clip).h); \ if(bottom > 0) height -= bottom; \ int left = x - (clip).x; \ if(left < 0) { \ mem -= left; \ width += left; \ x = (clip).x; } \ int right = x + width - ((clip).x + (clip).w); \ if(right > 0) width -= right; \ if(width <= 0 || height <= 0) return; \ } #endif // UUID_16A8D91C6BEA4174A45E11A5F85FB93C lierolibre-0.5/src/gfx/palette.cpp000066400000000000000000000111711205125547100172260ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "palette.hpp" #include "../settings.hpp" #include "../reader.hpp" #include "../gfx.hpp" #include #include #include "to_string.hpp" #include "configHelper.hpp" void Palette::activate() { SDL_Color realPal[256]; for(int i = 0; i < 256; ++i) { realPal[i].r = entries[i].r << 2; realPal[i].g = entries[i].g << 2; realPal[i].b = entries[i].b << 2; } SDL_SetColors(gfx.back, realPal, 0, 256); SDL_SetColors(gfx.screen, realPal, 0, 256); } int fadeValue(int v, int amount) { assert(v < 64); v = (v * amount) >> 5; if(v < 0) v = 0; return v; } int lightUpValue(int v, int amount) { v = (v * (32 - amount) + amount*63) >> 5; if(v > 63) v = 63; return v; } void Palette::fade(int amount) { if(amount >= 32) return; for(int i = 0; i < 256; ++i) { entries[i].r = fadeValue(entries[i].r, amount); entries[i].g = fadeValue(entries[i].g, amount); entries[i].b = fadeValue(entries[i].b, amount); } } void Palette::lightUp(int amount) { for(int i = 0; i < 256; ++i) { entries[i].r = lightUpValue(entries[i].r, amount); entries[i].g = lightUpValue(entries[i].g, amount); entries[i].b = lightUpValue(entries[i].b, amount); } } void Palette::rotate(int from, int to) { SDL_Color tocol = entries[to]; for(int i = to; i > from; --i) { entries[i] = entries[i - 1]; } entries[from] = tocol; } void Palette::clear() { std::memset(entries, 0, sizeof(entries)); } void Palette::read(FILE* f) { for(int i = 0; i < 256; ++i) { unsigned char rgb[3]; checkedFread(rgb, 1, 3, f); entries[i].r = rgb[0] & 63; entries[i].g = rgb[1] & 63; entries[i].b = rgb[2] & 63; } } void Palette::readFromCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &spentries = cfg.lookup("Palette.entries"); for(int i = 0; i < 256; ++i) { entries[i].r = cfgHelp.getValue(spentries, "entries" + to_string(i) + "r"); entries[i].g = cfgHelp.getValue(spentries, "entries" + to_string(i) + "g"); entries[i].b = cfgHelp.getValue(spentries, "entries" + to_string(i) + "b"); } } void Palette::writeToCFG(std::string cfgFilePath) { libconfig::Config cfg; ConfigHelper cfgHelp; cfg.readFile(cfgFilePath.c_str()); libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &palette = cfgHelp.getSubgroup(root, "Palette"); libconfig::Setting &spentries = cfgHelp.getSubgroup(palette, "entries"); for(int i = 0; i < 256; ++i) { cfgHelp.put(spentries, "entries" + to_string(i) + "r", entries[i].r); cfgHelp.put(spentries, "entries" + to_string(i) + "g", entries[i].g); cfgHelp.put(spentries, "entries" + to_string(i) + "b", entries[i].b); } cfg.writeFile(cfgFilePath.c_str()); } void Palette::setWormColour(int i, WormSettings const& settings) { int const b[2] = {0x58, 0x78}; // TODO: Read from EXE? int idx = settings.color; setWormColoursSpan(idx, settings.rgb); for(int j = 0; j < 6; ++j) { entries[b[i] + j] = entries[idx + (j % 3) - 1]; } for(int j = 0; j < 3; ++j) { entries[129 + i * 4 + j] = entries[idx + j]; } } void Palette::setWormColours(Settings const& settings) { for(int i = 0; i < 2; ++i) { setWormColour(i, *settings.wormSettings[i]); } } lierolibre-0.5/src/gfx/palette.hpp000066400000000000000000000055001205125547100172320ustar00rootroot00000000000000/* * Copyright (c) 2009, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_74C8EE76D5564F2D8C7BBC9B26C16192 #define UUID_74C8EE76D5564F2D8C7BBC9B26C16192 #include #include #include #include struct Settings; struct WormSettings; struct Palette { SDL_Color entries[256]; // TODO: Move definitions of these from gfx.cpp to palette.cpp void activate(); void fade(int amount); void lightUp(int amount); void rotate(int from, int to); void read(FILE* f); void readFromCFG(std::string); void writeToCFG(std::string); void scaleAdd(int dest, int const(&c)[3], int scale, int add) { entries[dest].r = (add + c[0] * scale) / 64; entries[dest].g = (add + c[1] * scale) / 64; entries[dest].b = (add + c[2] * scale) / 64; sassert(entries[dest].r < 64); sassert(entries[dest].g < 64); sassert(entries[dest].b < 64); } void setWormColoursSpan(int base, int const (&c)[3]) { scaleAdd(base - 2, c, 38, 0); scaleAdd(base - 1, c, 50, 0); scaleAdd(base , c, 64, 0); scaleAdd(base + 1, c, 47, 1008); scaleAdd(base + 2, c, 28, 2205); } void resetPalette(Palette const& newPal, Settings const& settings) { *this = newPal; //setWormColours(settings); } void setWormColour(int i, WormSettings const& settings); void setWormColours(Settings const& settings); void clear(); }; #endif // UUID_74C8EE76D5564F2D8C7BBC9B26C16192 lierolibre-0.5/src/gfx/sprite.cpp000066400000000000000000000045631205125547100171050ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "sprite.hpp" #include "../reader.hpp" #include #include void SpriteSet::read(FILE* f, int width, int height, int count) { assert(width == height); // We only support rectangular sprites right now this->width = width; this->height = height; this->spriteSize = width * height; this->count = count; int amount = spriteSize * count; data.resize(amount); std::vector temp(amount); checkedFread(&temp[0], 1, amount, f); PalIdx* dest = &data[0]; PalIdx* src = &temp[0]; for(int i = 0; i < count; i++) { for(int x = 0; x < width; ++x) { for(int y = 0; y < height; ++y) { dest[x + y*width] = src[y]; } src += height; } dest += spriteSize; } } void SpriteSet::allocate(int width, int height, int count) { this->width = width; this->height = height; this->spriteSize = width * height; this->count = count; int amount = spriteSize * count; data.resize(amount); } lierolibre-0.5/src/gfx/sprite.hpp000066400000000000000000000036301205125547100171040ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_FB823C685B8D47570B89508CD25CC4A6 #define UUID_FB823C685B8D47570B89508CD25CC4A6 #include #include #include "color.hpp" struct SpriteSet { std::vector data; int width; int height; int spriteSize; int count; void read(FILE* f, int width, int height, int count); PalIdx* spritePtr(int frame) { return &data[frame*spriteSize]; } void allocate(int width, int height, int count); }; #endif // UUID_FB823C685B8D47570B89508CD25CC4A6 lierolibre-0.5/src/gvl/000077500000000000000000000000001205125547100150675ustar00rootroot00000000000000lierolibre-0.5/src/gvl/Jamfile000066400000000000000000000016731205125547100163700ustar00rootroot00000000000000SubDir TOP gvl ; C++FLAGS = -Wall -I$(TOP) -DNDEBUG ; CFLAGS = -Wall -I$(TOP) -DNDEBUG ; OPTIM = -O3 ; LINK = "g++" ; LINKLIBS on libgvl$(SUFLIB) = -lz ; LINKLIBS on gvltest$(SUFEXE) = -lrt -lz ; Library libgvl : containers/list.cpp crypt/curve25519.cpp io/stream.cpp io/encoding.cpp io/convert.cpp math/ieee.cpp math/tt800.cpp resman/shared.cpp sockets/fd_set.cpp sockets/sockets.cpp sockets/socketstream.cpp support/bits.c support/debug.cpp support/hash.cpp support/log.cpp support/profile.cpp system/system.c tut/quickcheck/context.cpp ; Main gvltest : gvl_test/containers/list.cpp gvl_test/containers/pairing_heap.cpp gvl_test/containers/treap.cpp gvl_test/io/bitstream.cpp gvl_test/io/stream.cpp gvl_test/support/bits.cpp gvl_test/math/deterministic_float.cpp gvl_test/test.cpp ; LinkLibraries gvltest : libgvl ; MakeLocate libgvl$(SUFLIB) : $(TOP)/gvl/_bin ; MakeLocate gvltest$(SUFEXE) : $(TOP)/gvl/_bin ; lierolibre-0.5/src/gvl/_build/000077500000000000000000000000001205125547100163255ustar00rootroot00000000000000lierolibre-0.5/src/gvl/_build/Gvl C++0x.props000066400000000000000000000006761205125547100207140ustar00rootroot00000000000000 GVL_CPP0X=1;%(PreprocessorDefinitions) lierolibre-0.5/src/gvl/_build/Gvl IEEE SEE2.props000066400000000000000000000010561205125547100213130ustar00rootroot00000000000000 StreamingSIMDExtensions2 GVL_X87=0;GVL_FORCE_SSE2_FPU=1;%(PreprocessorDefinitions) lierolibre-0.5/src/gvl/_build/Gvl Standard Config.props000066400000000000000000000012461205125547100230540ustar00rootroot00000000000000 _bin\$(PlatformName)\$(Configuration)\ _trash\$(PlatformName)\$(Configuration)\ _SECURE_SCL=0;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) $(IntDir)\%(Directory) lierolibre-0.5/src/gvl/_build/Gvl_C++0x.props000066400000000000000000000006761205125547100210130ustar00rootroot00000000000000 GVL_CPP0X=1;%(PreprocessorDefinitions) lierolibre-0.5/src/gvl/_build/Gvl_IEEE_SEE2.props000066400000000000000000000010561205125547100215110ustar00rootroot00000000000000 StreamingSIMDExtensions2 GVL_X87=0;GVL_FORCE_SSE2_FPU=1;%(PreprocessorDefinitions) lierolibre-0.5/src/gvl/_build/Gvl_Standard_Config.props000066400000000000000000000012461205125547100232520ustar00rootroot00000000000000 _bin\$(PlatformName)\$(Configuration)\ _trash\$(PlatformName)\$(Configuration)\ _SECURE_SCL=0;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) $(IntDir)\%(Directory) lierolibre-0.5/src/gvl/_build/gvl.vcproj000066400000000000000000000745461205125547100203620ustar00rootroot00000000000000 lierolibre-0.5/src/gvl/_build/gvl.vcxproj000066400000000000000000000534771205125547100205520ustar00rootroot00000000000000 Debug Win32 Debug x64 Release Win32 Release x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9} gvl StaticLibrary true StaticLibrary StaticLibrary MultiByte true StaticLibrary MultiByte <_ProjectFileVersion>10.0.30128.1 AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset ..;..\..\..\lib;$(IncludePath) ..\..\..\lib;$(IncludePath) Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL true Level3 EditAndContinue true ..\..\..\lib;%(AdditionalLibraryDirectories) X64 Disabled _WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL true Level3 ProgramDatabase true MaxSpeed AnySuitable true Speed WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) true MultiThreadedDLL true true Level3 ProgramDatabase MachineX86 X64 MaxSpeed true _WIN64;_LIB;NDEBUG;%(PreprocessorDefinitions) MultiThreaded true true Level3 ProgramDatabase true AnySuitable Size true false false false false true true true true true true true false false false false false false false false false false false false true true true true true true true true true true true true true true {745dec58-ebb3-47a9-a9b8-4c6627c01bf8} true true false true false lierolibre-0.5/src/gvl/_build/gvl.vcxproj.filters000066400000000000000000000437541205125547100222160ustar00rootroot00000000000000 {55cec4dd-3c9a-4c16-a330-9ae0e4b91bef} {e11dc92c-cf10-4e5a-b6ce-8603988d10d6} {c41c8202-dffd-4722-8a1e-11ab79b654e4} {92d0d3a1-ae27-4906-861f-54ca9930e914} {4b1584f8-7ad4-4695-8cef-f85647734331} {a5c5508b-a34d-4126-94a6-25aedc20834c} {19ecccd3-e7e4-4253-aaa8-b13fbc6d1d65} {37e564b6-7826-4b3e-b193-052dd24cf7a6} {3e900672-0e79-40bf-bc17-858f790ce831} {8f2b2f49-5ca5-4ef2-95f8-56d92b07450d} {b1fa008e-4fb0-44a3-9e33-7e966ce3db24} {6ce3af90-9709-45ef-9bd6-82ce645e7ec0} {97f9af1f-9489-401c-a222-0f74673e1596} {3b487da1-cb03-4a27-8584-ff1140608dec} {f49ece83-6500-49e0-8c78-abbf7e4843da} {e25b10a9-00b5-4e21-8e25-864f1e721d50} {12c28440-c648-4b57-8fbc-343a5203bd7c} {4d8f82df-5bcd-453a-9520-f929eecb3eb5} {baa86fe2-1718-4fba-aeed-7d84ec8bc342} {90f4d4d5-7e10-4543-8f28-3bc11f6d66c9} {5e8d8ef0-8fad-49c4-a527-f315f4a4ccca} support support support support support support support containers containers containers resman math math io io io io sockets sockets sockets system crypt tut\quickcheck containers\tests test containers\tests containers\tests containers\tests io\tests io\tests support\tests sockets text containers\tests system support support support support support support support support support support support support support support support support support support support support support support containers containers containers containers containers containers containers containers containers containers containers containers containers containers containers containers containers containers containers containers containers containers containers\trees resman resman resman resman resman resman resman resman math math math math math math math math math math io io io io io io io io io sockets sockets sockets system containers\trees crypt crypt crypt text serialization serialization serialization tut\quickcheck tut\quickcheck tut\quickcheck tut\quickcheck meta meta meta meta containers io io io io test io test sockets text system hash_set hash_set support system system containers io io io io sockets lierolibre-0.5/src/gvl/containers/000077500000000000000000000000001205125547100172345ustar00rootroot00000000000000lierolibre-0.5/src/gvl/containers/accurate_rectangle_packing.hpp000066400000000000000000000152761205125547100252670ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_ACCURATE_RECTANGLE_PACKING_HPP #define GVL_ACCURATE_RECTANGLE_PACKING_HPP #include "../math/rect.hpp" #include "../support/debug.hpp" #include #include namespace gvl { template std::pair operator+(std::pair const& a, std::pair const& b) { return std::pair(a.first + b.first, a.second + b.second); } struct accurate_rectangle_packing { typedef std::list rect_list; typedef rect_list::iterator rect_handle; accurate_rectangle_packing(int width, int height) : width(width), height(height) { clear(); } typedef std::pair distance_t; std::pair distance(gvl::ivec2 const& a, gvl::ivec2 const& b) { std::pair p(std::abs(a.x - b.x), std::abs(a.y - b.y)); if(p.second < p.first) std::swap(p.first, p.second); return p; } template T min4(T const& a, T const& b, T const& c, T const& d) { T const& x = a < b ? a : b; T const& y = c < d ? c : d; return x < y ? x : y; } rect_handle try_fit(int w, int h, bool allow_rotate) { rect_handle best_rect = free_rects.end(); int best_dir; distance_t min_dist(0xffffff, 0); for(rect_handle i = free_rects.begin(); i != free_rects.end(); ++i) { gvl::rect& r = *i; if((r.width() >= w && r.height() >= h) || (allow_rotate && r.width() >= h && r.height() >= w)) { distance_t ul = distance(r.ul(), gvl::ivec2(0, 0)); distance_t ur = distance(r.ur(), gvl::ivec2(width, 0)); distance_t lr = distance(r.lr(), gvl::ivec2(width, height)); distance_t ll = distance(r.ll(), gvl::ivec2(0, height)); int dir; distance_t dist; dist = ll; dir = 0; if(lr < dist) { dist = lr; dir = 1; } #if 0 if(ul < dist) { dist = ul; dir = 2; } if(ur < dist) { dist = ur; dir = 3; } #endif if(dist < min_dist) { min_dist = dist; best_rect = i; best_dir = dir; } } } if(best_rect == free_rects.end()) return used_rects.end(); if(allow_rotate) { int space_w = best_rect->width(); int space_h = best_rect->height(); distance_t non_rot = distance(gvl::ivec2(space_w, space_h), gvl::ivec2(w, h)); distance_t rot = distance(gvl::ivec2(space_w, space_h), gvl::ivec2(h, w)); if(best_rect->width() < w || best_rect->height() < h) std::swap(w, h); else if(best_rect->width() < h || best_rect->height() < w) /* cannot rotate */; else if(rot < non_rot) std::swap(w, h); } gvl::rect r; bool above = best_dir >= 2; // best_rect->center_y() < height/2; bool left = (best_dir & 1) == 0; // best_dirbest_rect->center_x() < width/2; if(left) { if(above) r = gvl::rect(best_rect->x1, best_rect->y1, best_rect->x1 + w, best_rect->y1 + h); else r = gvl::rect(best_rect->x1, best_rect->y2 - h, best_rect->x1 + w, best_rect->y2); } else { if(above) r = gvl::rect(best_rect->x2 - w, best_rect->y1, best_rect->x2, best_rect->y1 + h); else r = gvl::rect(best_rect->x2 - w, best_rect->y2 - h, best_rect->x2, best_rect->y2); } cut(r); used_rects.push_front(r); return used_rects.begin(); } bool is_valid(rect_handle h) { return h != used_rects.end(); } gvl::rect const& get_rect(rect_handle h) { return *h; } void cut(gvl::rect r) { for(rect_handle i = free_rects.begin(); i != free_rects.end();) { gvl::rect hole(r); gvl::rect solid(*i); if(hole.intersect(solid)) { i = free_rects.erase(i); add_free_rect(solid.x1, solid.y1, solid.x2, hole .y1); add_free_rect(solid.x1, hole .y2, solid.x2, solid.y2); add_free_rect(solid.x1, solid.y1, hole .x1, solid.y2); add_free_rect(hole .x2, solid.y1, solid.x2, solid.y2); continue; } ++i; } process_insert_queue(); } bool add_free_rect(int x1, int y1, int x2, int y2) { if(x1 != x2 && y1 != y2) { insert_queue.push_back(gvl::rect(x1, y1, x2, y2)); return true; } return false; } void process_insert_queue() { for(rect_handle q = insert_queue.begin(); q != insert_queue.end();) { gvl::rect& r = *q; int accum_change_mask; do { accum_change_mask = 0; for(rect_handle i = free_rects.begin(); i != free_rects.end();) { int change_mask = i->maximal_extend(r); accum_change_mask |= change_mask; if(*i == r) { // Discard *i because it's the same as r i = free_rects.erase(i); continue; } else if(change_mask & 1) // *i was changed { // Must reprocess *i because it changed rect_handle curi = i; ++i; // NOTE: Important to insert at the end, so we don't skip it insert_queue.splice(insert_queue.end(), free_rects, curi); continue; } ++i; } } while(accum_change_mask & 2); // While r changed, repeat // Processed, insert // NOTE: We insert at the end so the processed // rectangle can be e.g. cut again if necessary // (when cut is the caller). rect_handle curq = q; ++q; free_rects.splice(free_rects.end(), insert_queue, curq); } sassert(insert_queue.empty()); } void clear() { used_rects.clear(); free_rects.clear(); free_rects.push_back(gvl::rect(0, 0, width, height)); } std::list free_rects; std::list used_rects; std::list insert_queue; int width, height; }; } #endif // GVL_ACCURATE_RECTANGLE_PACKING_HPP lierolibre-0.5/src/gvl/containers/avl_tree.hpp000066400000000000000000000154431205125547100215550ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_DE2C7B4CE76345E6A69E1F9BBB7FC7DB #define UUID_DE2C7B4CE76345E6A69E1F9BBB7FC7DB #error Total mishmash #include "node_base.hpp" #include #include #include #include "function.hpp" #include "debug.hpp" namespace vl { struct avl_node_common { avl_node_common* left; avl_node_common* right; bool threads[2]; signed char balance; }; template struct avl_node : avl_node_common { }; template, typename Deleter = default_delete> struct avl_tree : Compare { static T* downcast(avl_node_common* p) { return static_cast(static_cast*>(p)); } static avl_node* upcast(T* p) { return static_cast*>(p); } avl_tree() : n(0) , root(0) { } bool empty() const { return n == 0; } void swap(avl_tree& b) { std::swap(n, b.n); std::swap(root, b.root); } void insert(T* el_) { fib_node_common* el = upcast(el_); el->degree = 0; el->parent = 0; el->child = 0; el->left = el; el->right = el; el->mark = false; root_list_insert_(el); if(!pmin || Compare::operator()(*el_, *downcast(pmin))) pmin = el; // A new smallest ++n; } // NOTE: It's assumed that the key was decreased // right before this was called. // One could make a debug check that makes sure the // key wasn't increased beyond it's children, but // it would affect the complexity of the operation. void decreased_key(T* el_) { fib_node_common* el = upcast(el_); fib_node_common* elp = el->parent; if(elp && Compare::operator()(*el_, *downcast(elp))) { cut_(el, elp); cascading_cut_(elp); } if(Compare::operator()(*el_, *downcast(pmin))) { pmin = el; } } void unlink_min() { passert(pmin, "Empty heap"); fib_node_common* el = pmin; fib_node_common* x = el->child; if(x) { fib_node_common* orig = x; do { fib_node_common* next = x->right; x->parent = 0; root_list_insert_(x); x = next; } while(x != orig); } root_list_remove_(el); --n; if(n == 0) pmin = 0; else { //pmin = el->right; // Why is this done? pmin is both incorrect and overwritten in consolidate_ consolidate_(); } } void unlink(T* el_) { fib_node_common* el = upcast(el_); force_to_min_(el); unlink_min(); } void erase_min() { fib_node_common* old = pmin; unlink_min(); Deleter::run(old); } void erase(T* el) { unlink(el); Deleter::run(el); } T& min() { passert(pmin, "Empty heap"); return *downcast(pmin); } private: // Force el to become the smallest element by // pretending it compares smaller to all other elements. // cut_ and cascading_cut_ do not do any comparisons, so it's fine. void force_to_min_(fib_node_common* el) { fib_node_common* elp = el->parent; if(elp) { cut_(el, elp); cascading_cut_(elp); } pmin = el; } void root_list_insert_(fib_node_common* el) { if(!root) { root = el; el->left = el; el->right = el; } else insert_after_(root, el); } void root_list_remove_(fib_node_common* el) { if(el->left == el) root = 0; else root = remove_(el); } void insert_after_(fib_node_common* a, fib_node_common* b) { fib_node_common* old_a_right = a->right; b->right = old_a_right; old_a_right->left = b; a->right = b; b->left = a; } void insert_before_(fib_node_common* a, fib_node_common* b) { fib_node_common* old_a_left = a->left; b->right = a; a->left = b; old_a_left->right = b; b->left = old_a_left; } fib_node_common* remove_(fib_node_common* el) { fib_node_common* next = 0; if(el->left != el) next = el->left; if(el->parent && el->parent->child == el) el->parent->child = next; fib_node_common* right = el->right; fib_node_common* left = el->left; right->left = left; left->right = right; // NOTE: Do we need to do this? el->parent = 0; el->left = el; el->right = el; return next; } void consolidate_() { std::size_t const max_n_lg2 = CHAR_BIT * sizeof(std::size_t); fib_node_common* a[max_n_lg2] = {}; // TODO: We don't need to do root_list_remove_ for each, we could // just iterate through them all, then set root = 0 while(fib_node_common* w = root) { fib_node_common* x = w; root_list_remove_(w); std::size_t d = x->degree; sassert(d < max_n_lg2); while(fib_node_common* y = a[d]) { if(Compare::operator()(*downcast(y), *downcast(x))) std::swap(x, y); link_(y, x); a[d] = 0; ++d; sassert(d < max_n_lg2); } a[d] = x; } pmin = 0; for(std::size_t i = 0; i < max_n_lg2; ++i) { if(a[i]) { root_list_insert_(a[i]); if(!pmin || Compare::operator()(*downcast(a[i]), *downcast(pmin))) pmin = a[i]; } } } void link_(fib_node_common* y, fib_node_common* x) { if(!x->child) x->child = y; else insert_before_(x->child, y); y->parent = x; ++x->degree; y->mark = false; } void cut_(fib_node_common* a, fib_node_common* b) { remove_(a); --b->degree; root_list_insert_(a); a->parent = 0; a->mark = false; } void cascading_cut_(fib_node_common* el) { while(fib_node_common* elp = el->parent) { if(!el->mark) { el->mark = true; return; } else { cut_(el, elp); el = elp; } } } void clean_() { n = 0; pmin = 0; root = 0; } std::size_t n; fib_node_common* pmin; fib_node_common* root; }; } #endif // UUID_DE2C7B4CE76345E6A69E1F9BBB7FC7DB lierolibre-0.5/src/gvl/containers/bounded_rectangle_packing.hpp000066400000000000000000000334271205125547100251160ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_E2BFCF9F131A4133528A3FB16B022FC6 #define UUID_E2BFCF9F131A4133528A3FB16B022FC6 #include #include #include #include #include #include namespace gvl { struct recursive_bounded_rectangle_packing { struct node { friend struct recursive_bounded_rectangle_packing; node(node* parent, int x1, int y1, int x2, int y2) : occupied(false) , splittable(false) , parent(parent) , largest_free_width(x2 - x1) , largest_free_height(y2 - y1) , rect_(x1, y1, x2, y2) , enclosing_(x1, y1, x2, y2) { } bool may_fit(int w, int h, bool allow_rotate) { bool ret = (w <= largest_free_width && h <= largest_free_height); ret = ret || (allow_rotate && h <= largest_free_width && w <= largest_free_height); return ret; } node* try_fit(int w, int h, bool allow_rotate) { if(!may_fit(w, h, allow_rotate)) return 0; if(splittable) { sassert(occupied); // TODO: may_fit may return true even if the rectangle doesn't // fit, no matter how we split. We should test this case before // splitting. int cur_w = rect_.width(); int cur_h = rect_.height(); int enc_w = enclosing_.width(); int enc_h = enclosing_.height(); int space_w = (enc_w - cur_w); int space_h = (enc_h - cur_h); // TODO: Should we split so that the new rectangle fits? bool cut_horiz; #if 0 if(((h > cur_h || w > space_w) && (w > cur_h || h > space_w)) || ((h > space_h || w > enc_w ) && (w > space_h || h > enc_w ))) cut_horiz = false; // ...must cut vertically (if anything) else if(((h > space_h || w > cur_w ) && (w > space_h || h > cur_w )) || ((h > enc_h || w > space_w) && (w > enc_h || h > space_w))) cut_horiz = true; // ...must cut horizontally else #endif int diff_w = std::abs(std::max(w, h) - cur_w); int diff_h = std::abs(std::max(w, h) - cur_h); cut_horiz = space_w < space_h; //cut_horiz = diff_h > diff_w; if(cut_horiz) { if(enclosing_.x1 + cur_w != enclosing_.x2) children[0].reset(new node(this, enclosing_.x1 + cur_w, enclosing_.y1, enclosing_.x2, enclosing_.y1 + cur_h)); children[1].reset(new node(this, enclosing_.x1, enclosing_.y1 + cur_h, enclosing_.x2, enclosing_.y2)); } else { if(enclosing_.y1 + cur_h != enclosing_.y2) children[0].reset(new node(this, enclosing_.x1, enclosing_.y1 + cur_h, enclosing_.x1 + cur_w, enclosing_.y2)); children[1].reset(new node(this, enclosing_.x1 + cur_w, enclosing_.y1, enclosing_.x2, enclosing_.y2)); } // largest_free_width/largest_free_height does not need to be changed here if // propagate_largest_splittable has done its job correctly. splittable = false; } node* ch0 = children[0].get(); node* ch1 = children[1].get(); if(ch1) // ch1 is always set if ch0 or ch1 is set { if(ch0) { node* n = ch0->try_fit(w, h, allow_rotate); if(n) return n; } return ch1->try_fit(w, h, allow_rotate); } if(occupied) return 0; // may_fit is accurate for leaves, so we know it will fit at this point. // We just need to find out the best orientation. if(allow_rotate && should_rotate_(largest_free_width, largest_free_height, w, h)) std::swap(w, h); return known_fit_(w, h); } void make_empty() { sassert(occupied); occupied = false; propagate_empty_(); // 'this' is not occupied } bool empty() { return leaf() && !occupied; } private: static bool should_rotate_(int cw, int ch, int w, int h) { if(w > ch || h > cw) return false; // Cannot rotate else if(h > ch || w > cw) return true; // Must rotate // Try to counter-act the shape of the container (making the // uncovered parts more square). return (cw < ch) == (w < h); } node* known_fit_(int w, int h) { sassert(w <= largest_free_width && h <= largest_free_height); sassert(leaf()); sassert(!occupied && !splittable); occupied = true; // Place rectangle rect_.x1 = enclosing_.x1; rect_.y1 = enclosing_.y1; rect_.x2 = enclosing_.x1 + w; rect_.y2 = enclosing_.y1 + h; if(w == largest_free_width && h == largest_free_height) { // Perfect fit propagate_largest_(0, 0); return this; } splittable = true; propagate_largest_splittable_(); return this; } void propagate_largest_(int new_width, int new_height) { largest_free_width = new_width; largest_free_height = new_height; if(parent) parent->propagate_largest_non_leaf_(); } void propagate_largest_only_() { if(parent) parent->propagate_largest_non_leaf_(); } void propagate_largest_non_leaf_() { sassert(!leaf()); if(!children[1].get()) propagate_largest_(children[0]->largest_free_width, children[0]->largest_free_height); else if(!children[0].get()) propagate_largest_(children[1]->largest_free_width, children[1]->largest_free_height); else { int new_width = std::max( children[0]->largest_free_width, children[1]->largest_free_width); int new_height = std::max( children[0]->largest_free_height, children[1]->largest_free_height); propagate_largest_(new_width, new_height); } } void set_largest_(int new_width, int new_height) { largest_free_width = new_width; largest_free_height = new_height; } void set_largest_splittable_() { sassert(leaf() && splittable && occupied); if(enclosing_.x2 == rect_.x2) // Only bottom half empty set_largest_(enclosing_.width(), enclosing_.y2 - rect_.y2); else if(enclosing_.y2 == rect_.y2) // Only right half empty set_largest_(enclosing_.x2 - rect_.x2, enclosing_.height()); else set_largest_(enclosing_.width(), enclosing_.height()); } void set_largest_empty_() { sassert(empty()); set_largest_(enclosing_.width(), enclosing_.height()); } void propagate_largest_splittable_() { set_largest_splittable_(); propagate_largest_only_(); } void propagate_largest_() { if(leaf()) { if(splittable) propagate_largest_splittable_(); else if(occupied) propagate_largest_(0, 0); else propagate_largest_(rect_.width(), rect_.height()); } else propagate_largest_non_leaf_(); } bool leaf() { return !children[0].get() && !children[1].get(); } bool mergable() { if((!children[0].get() || children[0]->empty()) && (!children[1].get() || children[1]->empty())) return true; return false; } void merge_children_() { sassert(mergable()); children[0].reset(); children[1].reset(); if(occupied) { splittable = true; set_largest_splittable_(); } else { set_largest_empty_(); } if(parent) parent->propagate_empty_(); // parent is not a leaf } void propagate_empty_() { if(mergable()) return merge_children_(); propagate_largest_non_leaf_(); } bool occupied; bool splittable; node* parent; std::auto_ptr children[2]; int largest_free_width; int largest_free_height; gvl::rect enclosing_; gvl::rect rect_; }; typedef node* rect_handle; recursive_bounded_rectangle_packing(int width, int height) : root(new node(0, 0, 0, width, height)) { } rect_handle try_fit(int w, int h, bool allow_rotate) { return root->try_fit(w, h, allow_rotate); } gvl::rect const& get_rect(rect_handle h) { return h->rect_; } bool is_valid(rect_handle h) { return !!h; } void erase(rect_handle n) { n->make_empty(); } // NOTE! This invalidates all rect_handles returned from any try_fit call. void clear() { root->children[0].reset(); root->children[1].reset(); root->propagate_largest_(); } std::auto_ptr root; }; #if 0 struct accurate_rectangle_packing { typedef std::list rectangle_list; typedef rectangle_list::iterator rect_handle; typedef std::map line_map; accurate_rectangle_packing(int w, int h) : width(w), height(h) { add_vline(0); add_vline(w); add_hline(0); add_hline(h); } bool is_valid_pos(gvl::rect const& r) { if(r.x1 < 0 || r.y1 < 0 || r.x2 > width || r.y2 > height) return false; for(rect_handle i = rectangles.begin(); i != rectangles.end(); ++i) { if(r.proper_intersecting(*i)) return false; } return true; } rect_handle add(gvl::rect const& r) { add_vline(r.x1); add_vline(r.x2); add_hline(r.y1); add_hline(r.y2); rectangles.push_front(r); return rectangles.begin(); } rect_handle try_fit(int x, int y, int w, int h) { gvl::rect r(x, y, x + w, y + h); if(is_valid_pos(r)) return add(r); r = gvl::rect(x - w, y, x, y + h); if(is_valid_pos(r)) return add(r); r = gvl::rect(x, y - h, x + w, y); if(is_valid_pos(r)) return add(r); r = gvl::rect(x - w, y - h, x, y); if(is_valid_pos(r)) return add(r); return rectangles.end(); } rect_handle try_fit(int w, int h, bool allow_rotate) { line_map::iterator yi = hlines.begin(); for(; yi != hlines.end(); ++yi) { line_map::iterator xi = vlines.begin(); int y = yi->first; for(; xi != vlines.end(); ++xi) { int x = xi->first; rect_handle n = try_fit(x, y, w, h); if(n != rectangles.end()) return n; n = try_fit(x, y, h, w); if(n != rectangles.end()) return n; } } return rectangles.end(); } gvl::rect const& get_rect(rect_handle h) { return *h; } bool is_valid(rect_handle h) { return h != rectangles.end(); } void erase(rect_handle h) { remove_line(h->x1, vlines); remove_line(h->x2, vlines); remove_line(h->y1, hlines); remove_line(h->y2, hlines); rectangles.erase(h); } void add_vline(int x) { ++vlines[x]; } void add_hline(int y) { ++hlines[y]; } void remove_line(int v, line_map& m) { line_map::iterator i = m.find(v); sassert(i != m.end()); if(--i->second == 0) m.erase(i); } void clear() { rectangles.clear(); vlines.clear(); hlines.clear(); add_vline(0); add_vline(width); add_hline(0); add_hline(height); } std::map vlines, hlines; rectangle_list rectangles; int width, height; int }; #endif #define ROTATE 1 struct gosu_rectangle_packing { typedef std::list rectangle_list; typedef rectangle_list::iterator rect_handle; gosu_rectangle_packing(int w, int h) : width(w), height(h) , first_x(0), first_y(0) , max_w(w), max_h(h) { } bool is_valid_pos(gvl::rect const& r) { if(r.x1 < 0 || r.y1 < 0 || r.x2 > width || r.y2 > height) return false; for(rect_handle i = rectangles.begin(); i != rectangles.end(); ++i) { if(r.proper_intersecting(*i)) return false; } return true; } rect_handle add(gvl::rect const& r) { first_x += r.width(); if (first_x + r.width() >= width) { first_x = 0; first_y += r.height(); } rectangles.push_front(r); return rectangles.begin(); } rect_handle try_fit(int w, int h, bool allow_rotate) { if((w > max_w || h > max_h) #if ROTATE && (w > max_h || h > max_w) #endif ) { return rectangles.end(); } gvl::rect r(first_x, first_y, first_x + w, first_y + h); #if ROTATE gvl::rect r2(first_x, first_y, first_x + h, first_y + w); #endif if(is_valid_pos(r)) return add(r); #if ROTATE else if(is_valid_pos(r2)) return add(r2); #endif for (int y = 0; y <= height - h; y += 16) for (int x = 0; x <= width - w; x += 8) { #if ROTATE r = gvl::rect(x, y, x + h, y + w); r2 = gvl::rect(x, y, x + w, y + h); if(is_valid_pos(r2)) r = r2; else if(!is_valid_pos(r)) continue; #else r = gvl::rect(x, y, x + w, y + h); if(!is_valid_pos(r)) continue; #endif // Found a nice place! // Try to make up for the large for()-stepping. while (r.y1 > 0 && is_valid_pos(gvl::rect(r.x1, r.y1 - 1, r.x2, r.y2 - 1))) { --r.y1; --r.y2; } while (r.x1 > 0 && is_valid_pos(gvl::rect(r.x1 - 1, r.y1, r.x2 - 1, r.y2))) { --r.x1; --r.x2; } return add(r); } max_w = w - 1; max_h = h - 1; return rectangles.end(); } gvl::rect const& get_rect(rect_handle h) { return *h; } bool is_valid(rect_handle h) { return h != rectangles.end(); } void erase(rect_handle h) { rectangles.erase(h); } void clear() { first_x = 0; first_y = 0; max_w = width; max_h = height; rectangles.clear(); } rectangle_list rectangles; int width, height; int first_x, first_y; int max_w, max_h; }; } #endif // UUID_E2BFCF9F131A4133528A3FB16B022FC6 lierolibre-0.5/src/gvl/containers/bucket.hpp000066400000000000000000000142651205125547100212320ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_BUCKET_HPP #define GVL_BUCKET_HPP #include #include #include #include "../containers/list.hpp" #include "../resman/shared_ptr.hpp" #include "../support/cstdint.hpp" namespace gvl { typedef std::size_t bucket_size; struct bucket; struct bucket_data : shared { typedef bucket_size size_type; static size_type const nsize = size_type(-1); bucket_data() { } virtual size_type size() const = 0; virtual uint8_t const* get_ptr(bucket& owner_bucket, size_type offset) = 0; // Placement-new void* operator new(std::size_t, void* p) { return p; } // To shut up the compiler void operator delete(void*, void*) { } // Allocation is overloaded in order to allow arbitrary sized objects void* operator new(std::size_t n) { return new char[n]; } void operator delete(void* m) { delete [] static_cast(m); } }; struct bucket_data_mem : bucket_data { static std::size_t compute_size(bucket_size n) { // We would normally subtract 1 from this to get it right. // However, we allocate one byte extra to fit the zero- // terminator in gvl::string. return sizeof(bucket_data_mem) + n*sizeof(uint8_t); } static bucket_data_mem* create(bucket_size size) { return create(size, size); } static bucket_data_mem* create(bucket_size capacity, bucket_size size) { sassert(size <= capacity); void* mem = new char[compute_size(capacity)]; return new (mem) bucket_data_mem(size); } static bucket_data_mem* create_from(uint8_t const* b, uint8_t const* e, std::size_t cap_init) { std::size_t s = e - b; sassert(cap_init >= s); bucket_data_mem* ret = create(cap_init, s); std::memcpy(ret->data, b, s); return ret; } bucket_data_mem* clone(std::size_t cap_new, std::size_t size_new) const { bucket_data_mem* n = create(cap_new, size_new); std::memcpy(n->data, data, size_new); return n; } bucket_data_mem(bucket_size size) : size_(size) { } uint8_t const* get_ptr(bucket& owner_bucket, size_type offset) { return data + offset; } size_type size() const { return size_; } void unsafe_push_back(uint8_t el) { data[size_] = el; ++size_; } void unsafe_push_back(uint8_t const* p, bucket_size len) { std::memcpy(&data[size_], p, len); size_ += len; } bucket_data_mem* enlarge(bucket_size n) { bucket_data_mem* new_data = create(n, size_); std::memcpy(new_data->data, data, size_); return new_data; } uint8_t* begin() { return data; } uint8_t* end() { return data + size_; } std::size_t size_; uint8_t data[1]; }; typedef shared_ptr data_buf_ptr; struct bucket : list_node<> { typedef bucket_size size_type; bucket() : begin_(0) , end_(-1) { } bucket(bucket const& b, std::size_t begin, std::size_t end) : data_(b.data_) , begin_(begin) , end_(end) { } bucket(bucket_data_mem* data) : data_(data) , begin_(0) , end_(0) { end_ = data_->size(); if(end_ == bucket_data::nsize) { end_ = 0; begin_ = 1; } } bucket(bucket_data_mem* data, size_type begin, size_type end) : data_(data) , begin_(begin) , end_(end) { } bucket(void const* ptr, size_type len); bool size_known() const { return begin_ <= end_; } size_type begin() const { passert(size_known(), "Size is unknown"); return begin_; } size_type end() const { passert(size_known(), "Size is unknown"); return end_; } size_type size() const { passert(size_known(), "Size is unknown"); return static_cast(end_ - begin_); } void split(std::size_t point) { passert(size_known(), "Size is unknown"); passert(0 <= point && point <= size(), "Split point is out of bounds"); if(point == 0 || point == size()) return; // No need to do anything // Insert before // TODO: We should actually let the bucket split itself. // It should at least know when it's being copied. relink_after(this, new bucket(*this, begin_ + point, end_)); end_ -= (size() - point); } inline uint8_t const* get_ptr(); void cut_front(size_type amount) { passert(size_known(), "Size is unknown"); begin_ += amount; passert(begin_ <= end_, "Underflow"); } void cut_back(size_type amount) { passert(size_known(), "Size is unknown"); end_ -= amount; passert(begin_ <= end_, "Underflow"); } shared_ptr release_data() { begin_ = 0; end_ = 0; return data_.release(); } bool bucket_begins_at_zero() const { return begin_ == 0; } bucket* clone() const { return new bucket(*this, begin_, end_); } ~bucket() { } protected: shared_ptr data_; std::size_t begin_; std::size_t end_; }; uint8_t const* bucket::get_ptr() { uint8_t const* ptr = data_->get_ptr(*this, begin_); //passert(dynamic_cast(data_.get()), "get_ptr must replace the bucket_data with bucket_data_mem"); return ptr; } } #endif // GVL_BUCKET_HPP lierolibre-0.5/src/gvl/containers/buffer.cpp000066400000000000000000000074601205125547100212200ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "buffer.hpp" #include #include namespace gvl { buffer::buffer() : base(0), end(0), limit(0) , mem(0), redirected(false) { } buffer::buffer(void const* p, std::size_t s) : base(static_cast(std::malloc(s))) , end(base + s) , limit(base + s) , mem(base) , redirected(false) { std::memcpy(base, p, s); } buffer::buffer(void* p, std::size_t s, buffer::redirect_tag) : base(static_cast(p)) , end(base + s) , limit(base + s) , mem(base) , redirected(true) { } buffer::~buffer() { if(!redirected) std::free(mem); } void buffer::resize(std::size_t new_size) { retry: uint8_t* p = base + new_size; if(p > limit) { if(base != mem) { std::memmove(mem, base, size()); base = mem; goto retry; } std::size_t min_cap = new_size; std::size_t new_cap = size() * 2; if(new_cap < min_cap) new_cap = min_cap; if(redirected) { uint8_t* old_base = base; std::size_t old_size = size(); base = mem = static_cast(std::malloc(new_cap)); std::memcpy(base, old_base, old_size); redirected = false; /* Not redirected anymore */ } else base = mem = static_cast(std::realloc(mem, new_cap)); limit = mem + new_cap; end = base + new_size; } else { end = p; } } void buffer::begin_redirect(uint8_t* ptr, std::size_t len, buffer_memory& old) { old.save(*this); mem = ptr; base = ptr; end = ptr + len; limit = ptr + len; } // NOTE: TODO: This is quite error prone as there is no way to check if end_redirect is called in error void buffer::end_redirect(buffer_memory& old) { if(!redirected) std::free(mem); /* The only way a redirection can cease is if resize allocated a new buffer */ old.restore(*this); } uint8_t* buffer::insert_uninitialized(std::size_t extra_space) { uint8_t* new_end = end + extra_space; if(new_end > limit) { std::size_t old_size = size(); resize(old_size + extra_space); return base + old_size; } else { uint8_t* old_end = end; end = new_end; return old_end; } } void buffer::reserve(buffer* self, std::size_t extra_space) { if((end + extra_space) > limit) { resize(size() + extra_space); } } void buffer::insert(void const* p, std::size_t s) { std::memcpy(insert_uninitialized(s), p, s); } void buffer::insert_fill(uint8_t b, std::size_t s) { std::memset(insert_uninitialized(s), b, s); } void buffer::concat(buffer& other) { insert(other.base, other.size()); } } // namespace gvl lierolibre-0.5/src/gvl/containers/buffer.hpp000066400000000000000000000073251205125547100212250ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_ADFEAF07FE6C4EB59559E1AFCB250911 #define UUID_ADFEAF07FE6C4EB59559E1AFCB250911 #include "../support/cstdint.hpp" #include "../support/debug.hpp" #include namespace gvl { struct buffer_memory; struct buffer { uint8_t* base; uint8_t* end; uint8_t* limit; uint8_t* mem; bool redirected; struct redirect_tag {}; buffer(); buffer(void const* p, std::size_t s); buffer(void* p, std::size_t s, redirect_tag); ~buffer(); void resize(std::size_t new_size); uint8_t* insert_uninitialized(std::size_t extra_space); void reserve(buffer* self, std::size_t extra_space); void insert(void const* p, std::size_t s); void insert_fill(uint8_t b, std::size_t s); void concat(buffer& other); void begin_redirect(uint8_t* ptr, std::size_t len, buffer_memory& old); void end_redirect(buffer_memory& old); void clear() { end = base = mem; } std::size_t size() const { return end - base; } void put(uint8_t b) { if(end == limit) { resize(size() + 1); end[-1] = b; } else *end++ = b; } uint8_t get() { passert(base < end, "Buffer underrun"); uint8_t v = base[0]; consume(1); return v; } uint8_t& operator[](std::size_t o) { passert(o < size(), "Out of bounds"); return base[o]; } uint8_t const& operator[](std::size_t o) const { passert(o < size(), "Out of bounds"); return base[o]; } void consume(std::size_t amount) { passert(amount <= size(), "Buffer underrun"); base += amount; } std::size_t cost_of_insert(std::size_t amount) { if(end + amount > limit) { std::size_t cost = amount; std::size_t size = this->size(); if(base != mem) cost += size; if(mem + size + amount > limit) cost += size * 2 + amount; return cost; } return amount; } bool empty() const { return base == end; } uint8_t* offset(std::size_t o) { return base + o; } uint8_t* data() { return base; } uint8_t const* data() const { return base; } }; struct buffer_memory { uint8_t* mem; uint8_t* limit; void save(buffer& buf) { passert(!buf.redirected, "Can't store memory from redirected buffer"); mem = buf.mem; limit = buf.limit; buf.redirected = true; } void restore(buffer& buf) { buf.base = mem; buf.end = mem; buf.limit = limit; buf.mem = mem; buf.redirected = false; } }; } // namespace gvl #endif // UUID_ADFEAF07FE6C4EB59559E1AFCB250911 lierolibre-0.5/src/gvl/containers/compact_interval_set.hpp000066400000000000000000000117051205125547100241560ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_E8CD4134467C409B367DA595A15C7D89 #define UUID_E8CD4134467C409B367DA595A15C7D89 #include #include #include "../support/debug.hpp" namespace gvl { template struct compact_interval_set { struct range { range(T begin, T end) : begin(begin), end(end) { } bool operator==(range const& b) const { return begin == b.begin && end == b.end; } bool operator!=(range const& b) const { return !operator==(b); } T begin, end; }; typedef typename std::vector::iterator range_iterator; // Amortized O(N), N = number of ranges void insert_no_overlap(T begin, T end) { for(range_iterator i = ranges.begin(); i != ranges.end(); ++i) { sassert(i->begin != i->end); if(i->end == begin) { i->end = end; extend_forwards_(i, end); return; } else if(i->begin == end) { i->begin = begin; extend_backwards_(i, begin); return; } } // Isolated range ranges.push_back(range(begin, end)); } // O(N), N = number of ranges void erase_no_overlap(T hole_begin, T hole_end) { for(range_iterator i = ranges.begin(); i != ranges.end(); ++i) { T begin = i->begin; T end = i->end; T length = end - begin; sassert(begin != end); T offset_hole_begin = hole_begin - begin; T offset_hole_end = hole_end - begin; if(offset_hole_begin >= 0 && offset_hole_begin <= length && offset_hole_end >= 0 && offset_hole_end <= length) { erase_no_overlap(i, hole_begin, hole_end); return; } } sassert(false); throw std::runtime_error("Erase is not within any range"); } static bool combine_(T b1, T e1, T b2, T e2, T& retb, T& rete) { T len1 = e1 - b1; T len2 = e2 - b2; T offs1 = b1 - b2; T offs2 = b2 - b1; T retb, rete; if(offs1 >= 0 && offs1 < len2) { rete = std::max(e1 - b1, e2 - b1); if(offs2 > 0) retb = std::max(offs2, rete); else retb = 0; retb += b1; rete += b1; } else if(offs2 >= 0 && offs2 < len1) { rete = std::max(e1 - b2, e2 - b2); if(offs1 > 0) retb = std::max(offs1, rete); else retb = 0; retb += b2; rete += b2; } } void insert(T begin, T end) { } // Amortized O(1) // Assumes [hole_begin, hole_end) is a subset of [r->begin, r->end) void erase_no_overlap(range_iterator r, T hole_begin, T hole_end) { T begin = r->begin; T end = r->end; sassert(begin <= hole_begin && end >= hole_end); if(begin == hole_begin) { if(end == hole_end) { // Hole covers the whole range erase_(r); } else { r->begin = hole_end; } } else if(end == hole_end) { // begin != hole_begin, so we don't need to check that r->end = hole_begin; } else { // Hole in the middle. // Use the current range for the lower piece and add // another for the upper piece. r->end = hole_begin; ranges.push_back(range(hole_end, end)); } return; } range_iterator begin() { return ranges.begin(); } range_iterator end() { return ranges.end(); } private: void extend_forwards_(range_iterator r, T end) { range_iterator i = r; for(; ++i != ranges.end(); ) { if(i->begin == end) { r->end = i->end; erase_(i); return; } } } void extend_backwards_(range_iterator r, T begin) { range_iterator i = r; for(; ++i != ranges.end();) { if(i->end == begin) { r->begin = i->begin; erase_(i); return; } } } void erase_(range_iterator r) { *r = ranges.back(); ranges.pop_back(); } std::vector ranges; }; } // namespace gvl #endif // UUID_E8CD4134467C409B367DA595A15C7D89 lierolibre-0.5/src/gvl/containers/critbit.cpp000066400000000000000000000111051205125547100213760ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "critbit.hpp" #include "../support/cstdint.hpp" #include #include #include namespace gvl { struct critbit_node { void* children[2]; uint32_t byte; uint8_t otherbits; static critbit_node* alloc() { return reinterpret_cast(std::malloc(sizeof(critbit_node))); } }; struct critbit_external_node { std::size_t len; uint8_t data[1]; static std::size_t size(std::size_t len) { return sizeof(critbit_external_node) + len - sizeof(uint8_t); } static critbit_external_node* alloc(std::size_t len) { critbit_external_node* self = reinterpret_cast(std::malloc(size(len))); self->len = len; return self; } }; uint8_t* walk(uint8_t* p, uint8_t const* u, std::size_t ulen) { while(1 & (intptr_t)p) { critbit_node* q = reinterpret_cast(p - 1); uint8_t c = 0; uint32_t byte = q->byte; if(byte < ulen) c = u[byte]; int const direction = (1 + (q->otherbits | c)) >> 8; p = static_cast(q->children[direction]); } return p; } bool critbit::contains(uint8_t const* u, std::size_t ulen) { if(!root) return false; uint8_t* p = static_cast(root); p = walk(p, u, ulen); critbit_external_node* en = reinterpret_cast(p); if(en->len != ulen) return false; return 0 == std::memcmp(u, en->data, ulen); } int critbit::insert(uint8_t const* u, std::size_t ulen) { uint8_t* p = static_cast(root); if(!p) { critbit_external_node* x = critbit_external_node::alloc(ulen); std::memcpy(x->data, u, ulen); root = x; return 2; } p = walk(p, u, ulen); critbit_external_node* en = reinterpret_cast(p); uint32_t newbyte, newotherbits; std::size_t min_len = std::min(ulen, en->len); uint8_t c; for(newbyte = 0; newbyte < min_len; ++newbyte) { uint8_t pbyte = en->data[newbyte]; uint8_t ubyte = u[newbyte]; if(pbyte != ubyte) { newotherbits = pbyte ^ ubyte; c = en->data[newbyte]; goto different_byte_found; } } if(ulen > en->len) { newotherbits = u[en->len]; c = 0; } else if(ulen < en->len) { newotherbits = en->data[ulen]; c = en->data[ulen]; } else return 1; different_byte_found: // Leave last bit set while(newotherbits & (newotherbits - 1)) newotherbits &= newotherbits - 1; newotherbits ^= 0xff; int newdirection = (1 + (newotherbits | c)) >> 8; critbit_node* newnode = critbit_node::alloc(); critbit_external_node* x = critbit_external_node::alloc(ulen); std::memcpy(x->data, u, ulen); newnode->byte = newbyte; newnode->otherbits = newotherbits; newnode->children[1 - newdirection] = x; void** wherep = &root; for(;;) { p = static_cast(*wherep); if(!(1 & (intptr_t)p)) break; critbit_node* q = reinterpret_cast(p - 1); if(q->byte > newbyte) break; if((q->byte == newbyte) ^ (q->otherbits > newotherbits)) break; c = 0; if(q->byte < ulen) c = en->data[q->byte]; int direction = (1 + (q->otherbits | c)) >> 8; wherep = q->children + direction; } newnode->children[newdirection] = *wherep; *wherep = 1 + reinterpret_cast(newnode); return 2; } } lierolibre-0.5/src/gvl/containers/critbit.hpp000066400000000000000000000033641205125547100214130ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_DCF3012792AF4ABD1F44ED84EABEA581 #define UUID_DCF3012792AF4ABD1F44ED84EABEA581 #include "../support/cstdint.hpp" #include namespace gvl { struct critbit { void* root; bool contains(uint8_t const* u, std::size_t ulen); int insert(uint8_t const* u, std::size_t ulen); }; } #endif // UUID_DCF3012792AF4ABD1F44ED84EABEA581 lierolibre-0.5/src/gvl/containers/deque.hpp000066400000000000000000000147551205125547100210640ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_49300C6029444349B888CE8010F07482 #define UUID_49300C6029444349B888CE8010F07482 #include #include #include #include #include #include "../support/debug.hpp" #include "../support/functional.hpp" #include "../support/platform.hpp" namespace gvl { template T* talloc(std::size_t count) { return static_cast(std::malloc(sizeof(T) * count)); } template T* trealloc(T* p, std::size_t count) { return static_cast(std::realloc(p, sizeof(T) * count)); } template struct deque : Deleter { deque() : len(32), buf(talloc(len)) , begin(0), end(0), len_mask(len - 1) { } ~deque() { clear(); } #if GVL_CPP0X deque(deque&& other) : Deleter(std::forward(other)) , len(other.len) , buf(other.buf) , begin(other.begin) , end(other.end) , len_mask(other.len_mask) { // Minimal necessary to make destruction safe other.buf = 0; other.begin = 0; other.end = 0; } deque& operator=(deque&& other) { clear(); len = other.len; buf = other.buf; begin = other.begin; end = other.end; len_mask = other.len_mask; // Minimal necessary to make destruction safe other.buf = 0; other.begin = 0; other.end = 0; return *this; } #endif #if 0 // TODO T extract(std::size_t i) { T& r = buf[(begin + i) & len_mask]; T v(r); r = T(); return v; } #endif T& operator[](std::size_t i) { return buf[(begin + i) & len_mask]; } /* void set(std::size_t i, T const& c) { buf[(begin + i) & len_mask] = c; } */ #if GVL_CPP0X void push_back(T&& c) { cons_(buf + end, std::move(c)); end = (end + 1) & len_mask; if(end == begin) expand(); } void push_front(T&& c) { // Nothing is updated before the construction is done // for exception safety. std::size_t newbegin = (begin - 1) & len_mask; cons_(buf + newbegin, std::move(c)); begin = newbegin; if(end == begin) expand(); } #endif void push_back(T const& c) { // Nothing is updated before the construction is done // for exception safety. cons_(buf + end, c); end = (end + 1) & len_mask; if(end == begin) expand(); } void push_front(T const& c) { // Nothing is updated before the construction is done // for exception safety. std::size_t newbegin = (begin - 1) & len_mask; cons_(buf + newbegin, c); begin = newbegin; if(end == begin) expand(); } void pop_front() { passert(begin != end, "Empty deque"); std::size_t oldbegin = begin; begin = (begin + 1) & len_mask; dest_(buf + oldbegin); } void pop_back() { passert(begin != end, "Empty deque"); end = (end - 1) & len_mask; dest_(buf + end); } #if 0 // TODO T extract_front() { passert(begin != end, "Empty deque"); T* p = buf + begin; begin = (begin + 1) & len_mask; return GVL_MOVE(*p); } T extract_back() { passert(begin != end, "Empty deque"); end = (end - 1) & len_mask; T* p = buf + end; return GVL_MOVE(*p); } #endif void pop_front_n(size_t n) { //passert(size() <= n, "Not enough items to pop"); for(std::size_t i = 0; i < n; ++i) { pop_front(); } } void pop_back_n(size_t n) { //passert(size() <= n, "Not enough items to pop"); for(std::size_t i = 0; i < n; ++i) { pop_back(); } } void clear() { pop_front_n(size()); //begin = end = 0; } bool empty() const { return begin == end; } T& back() { passert(!empty(), "Empty deque"); return buf[(end - 1) & len_mask]; } T& front() { passert(!empty(), "Empty deque"); return buf[(begin) & len_mask]; } std::size_t size() const { return (end - begin) & len_mask; } void swap(deque& b) { std::swap(len, b.len); std::swap(buf, b.buf); std::swap(begin, b.begin); std::swap(end, b.end); std::swap(len_mask, b.len_mask); } private: std::size_t len; T* buf; std::size_t begin; std::size_t end; std::size_t len_mask; void expand() { // TODO: This isn't exception safe at all passert(begin == end, "expand can only be called when begin == end"); std::size_t count = len; std::size_t new_len = len * 2; T* new_buf = talloc(new_len); size_t part1_len = (count - begin); size_t part2_len = end; T* p; T* e; T* d; for(p = buf + begin, e = p + part1_len, d = new_buf; p != e; ++p, ++d) cons_(d, GVL_MOVE(*p)); for(p = buf, e = p + part2_len, d = new_buf + part1_len; p != e; ++p, ++d) cons_(d, GVL_MOVE(*p)); dest_(buf, buf + count); begin = 0; end = count; len = new_len; len_mask = len - 1; std::free(buf); buf = new_buf; } #if GVL_CPP0X void cons_(T* p, T&& v) { new (p) T(std::move(v)); } #endif void cons_(T* p, T const& v = T()) { new (p) T(v); } void dest_(T* p) { Deleter::operator()(*p); p->~T(); } void dest_(T* b, T* e) { for(; b != e; ++b) dest_(b); } // Disallow copying deque(deque const&); void operator=(deque const&); }; template struct pdeque : deque { // set, get, push_back, pop_front, pop_front_n, reset are fine // back, front, empty, size are fine }; } // namespace gvl #endif // UUID_49300C6029444349B888CE8010F07482 lierolibre-0.5/src/gvl/containers/generic_hash_set.hpp000066400000000000000000000201731205125547100232420ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_080B6EF700D0430C6B7571952F9E9E99 #define UUID_080B6EF700D0430C6B7571952F9E9E99 #include #include #include #include #include "../support/debug.hpp" #include "../support/hash.hpp" namespace gvl { /* Generic hash set generic_hash_set Let t : generic_hash_set a, b : T Requirements: Hash is a function of type (KeyT -> integer in 0..MaxInt). Compare is a transitive, reflexive, symmetrical, binary relation on KeyT. T::key : T -> KeyT T::is_empty : T -> Boolean T::is_filled : T -> Boolean T::make_empty : T -> Void T::make_deleted : T -> Void T::assign_value : T T -> Void T::value : T -> ValueT a.is_empty() iff 'a' does not have a key, nor value. a.is_filled() iff 'a' does have a key and/or value. (T()).is_empty() == true a.is_empty() => !a.is_filled() a.is_filled() => !a.is_empty() a.assign_value(b) assigns the value part of 'b' to 'a' (if any). A precondition is that Compare(a.key(), b.key()) == true, so the function can assign the key part as well without breaking the semantics. a.make_empty(): Precond: a.is_filled() && !a.is_empty() Postcond: !a.is_filled() && a.is_empty() a.make_deleted(): Precond: a.is_filled() && !a.is_empty() Postcond: !a.is_filled() && !a.is_empty() Compare(a.key(), b.key()) == true iff the keys of 'a' and 'b' are equal Compare(a.key(), b.key()) == true => Hash(a.key()) == Hash(b.key()) If SafeEmptyKey == true, then // NOTE: This is not made use of a.is_empty() && !b.is_empty() => Compare(a.key(), b.key()) == false Operations: */ template struct base_select : BaseT { base_select(BaseT const& b) : BaseT(b) {} }; template inline T* dummy_ptr() { return reinterpret_cast(1); } template inline bool is_null_or_dummy_ptr(T* p) { return p <= dummy_ptr(); // Assumes dummy_ptr is 1 } template, bool SafeEmptyKey = false> struct generic_hash_set : Hash, Compare { typedef Compare compare_type; // NOTE: Compare can't be the same type as Hash. This is a (minor) semantics issue. //typedef T index_type; struct iterator { typedef std::ptrdiff_t difference_type; typedef std::forward_iterator_tag iterator_category; typedef ValueT* pointer; typedef ValueT& reference; typedef ValueT value_type; struct found_tag {}; iterator(T* p, T* end) : p(p), end(end) { find(); } iterator(T* p, T* end, found_tag) : p(p), end(end) { sassert(p == end || p->is_filled()); } ValueT& operator*() const { return p->value(); } ValueT* operator->() { return &p->value(); } KeyT& key() const { return p->key(); } iterator& operator++() { ++p; find(); return *this; } bool operator==(iterator b) const { return p == b.p && end == b.end; } bool operator!=(iterator b) const { return !operator==(b); } private: void find() { while(p != end && !p->is_filled()) { ++p; } } T* p; T* end; }; generic_hash_set( Hash const& hash = Hash(), Compare const& compare = Compare()) : Hash(hash), Compare(compare) , t(11), tsize(11) , elems(0) , deleted(0) , uload(0.666) , lload(0.20) , shload(0.45) // 2*lload < shload < uload { } ~generic_hash_set() { clear(); } void clear() { for(std::size_t i = 0; i < tsize; ++i) { if(t[i].is_filled()) t[i].make_empty(); else if(!t[i].is_empty()) t[i] = T(); } elems = 0; } template T* lookup(SpecKeyT const& k) { std::size_t h = Hash::operator()(k); int step = 1; do { T& slot = t[h % tsize]; if(slot.is_empty()) return 0; if(slot.is_filled() && Compare::operator()(slot.key(), k)) return &slot; h += step; step += 2; } while(step < 1024); return 0; } template iterator find(SpecKeyT const& k) { T* p = lookup(k); T* end = &t[0] + tsize; if(p) return iterator(p, end, iterator::found_tag()); else return iterator(end, end, iterator::found_tag()); } bool try_insert(T const& v) { std::size_t h = Hash::operator()(v.key()); std::size_t step = 1; do { T& slot = t[h % tsize]; if(!slot.is_filled()) { if(!slot.is_empty()) --deleted; ++elems; slot = v; sassert(slot.is_filled()); return true; } h += step; step += 2; } while(step < 1024); return false; } void insert(T const& v) { maybe_enlarge(); T* idx = lookup(v.key()); if(idx) idx->assign_value(v); else { while(!try_insert(v)) enlarge(); } } template void remove(SpecKeyT const& k) { T* idx = lookup(k); if(idx) { sassert(idx->is_filled()); idx->make_deleted(); sassert(!idx->is_filled()); --elems; ++deleted; maybe_shrink(); } } void erase(iterator i) { passert( i.p >= &t[0] && i.p < &t[0] + tsize && i.p->is_filled(), "Invalid iterator"); i.p->make_deleted(); --elems; ++deleted; } template void erase_if(Pred pred = Pred()) { for(std::size_t i = 0; i < t.size(); ++i) { if(t[i].is_filled() && pred(t[i].value())) { t[i].make_deleted(); --elems; ++deleted; } } maybe_shrink(); } std::size_t size() const { return elems; } iterator begin() { T* p = &t[0]; return iterator(p, p + tsize); } iterator end() { T* p = &t[0]; return iterator(p + tsize, p + tsize); } protected: void rehash(std::vector& e) { deleted = 0; // There will be no deleted elements afterwards try_insert: elems = 0; for(std::size_t i = 0; i < e.size(); ++i) { if(e[i].is_filled() && !try_insert(e[i])) { // We need to make the table larger tsize = next_prime(tsize + 1); t.assign(tsize, T()); goto try_insert; } } } void maybe_enlarge() { if(elems >= std::size_t(tsize * uload)) { enlarge(); } } void maybe_shrink() { if(elems <= std::size_t(tsize * lload) && tsize > 11) { shrink(); } } void enlarge() { tsize = next_prime(tsize + 1); std::vector temp(tsize); t.swap(temp); // temp is now the old vector, reinsert all the old elements rehash(temp); } void shrink() { tsize = next_prime(std::size_t(elems / shload)); std::vector temp(tsize); t.swap(temp); // temp is now the old vector, reinsert all the old elements rehash(temp); } std::size_t tsize; std::vector t; std::size_t elems; std::size_t deleted; // NOTE: Do we need to keep track of this? double uload; // Load limit where size is increased double lload; // Load limit where size is decreased double shload; // Approximate load after shrinking }; } #endif // UUID_080B6EF700D0430C6B7571952F9E9E99 lierolibre-0.5/src/gvl/containers/hash_map.hpp000066400000000000000000000061111205125547100215240ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_230800A056934D64F2EB04A436B203D7 #define UUID_230800A056934D64F2EB04A436B203D7 #include "generic_hash_set.hpp" #include namespace gvl { template struct hash_map_index { hash_map_index(std::pair* ptr = 0) : ptr(ptr) { } KeyT const& key() const { return ptr->first; } ValueT const& value() const { return ptr->second; } bool is_empty() const { return !ptr; } bool is_filled() const { return !is_null_or_dummy_ptr(ptr); } void make_empty() { if(is_filled()) delete ptr; ptr = 0; } void make_deleted() { delete ptr; ptr = dummy_ptr >(); } void assign_value(hash_map_index v) { // TODO: Either copy v.ptr->second and delete v.ptr, // or delete ptr and assign v.ptr to ptr. The latter // seems to be cheaper, so that has been chosen tentatively. delete ptr; ptr = v.ptr; } std::pair* ptr; }; template > struct hash_map : generic_hash_set, KeyT, ValueT, Hash, Compare> { typedef generic_hash_set, KeyT, ValueT, Hash, Compare> base; typedef std::pair index_type; hash_map(Hash const& hash = Hash(), Compare const& compare = Compare()) : base(hash, compare) { } void insert(index_type* v) { base::insert(hash_map_index(v)); } template ValueT* get(SpecKeyT const& v) { hash_map_index* index = base::lookup(v); return index ? &index->ptr->second : 0; } }; } #endif // UUID_230800A056934D64F2EB04A436B203D7 lierolibre-0.5/src/gvl/containers/hash_set.hpp000066400000000000000000000067061205125547100215540ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_D140C63FD82B4342E7DD71BD6C73E92D #define UUID_D140C63FD82B4342E7DD71BD6C73E92D #include "generic_hash_set.hpp" #include namespace gvl { template struct hash_set_index { hash_set_index(KeyT* ptr = 0) : ptr(ptr) { } KeyT& key() const { return *ptr; } KeyT& value() const { return *ptr; } bool is_empty() const { return !ptr; } bool is_filled() const { return !is_null_or_dummy_ptr(ptr); } void make_empty() { if(is_filled()) delete ptr; ptr = 0; } void make_deleted() { delete ptr; ptr = dummy_ptr(); } void assign_value(hash_set_index v) { delete ptr; ptr = v.ptr; } // hash_set specific KeyT* release() { KeyT* ret = ptr; ptr = dummy_ptr(); return ptr; } KeyT* ptr; }; template > struct hash_set : generic_hash_set, KeyT, KeyT, Hash, Compare> { typedef generic_hash_set, KeyT, KeyT, Hash, Compare> base; hash_set(Hash const& hash = Hash(), Compare const& compare = Compare()) : base(hash, compare) { } void insert(KeyT const& v) { base::insert(hash_set_index(new KeyT(v))); } void insert(KeyT* v) { base::insert(hash_set_index(v)); } template bool has(SpecKeyT const& v) { return base::lookup(v) != 0; } template KeyT* get(SpecKeyT const& v) { hash_set_index* index = base::lookup(v); return index ? index->ptr : 0; } template KeyT& operator[](SpecKeyT const& v) { hash_set_index* index = base::lookup(v); if(index) return *index->ptr; KeyT* k = new KeyT(v); // !exp insert(k); return *k; } template KeyT* release(SpecKeyT const& v) { hash_set_index* index = base::lookup(v); return index ? index->release() : 0; } template void erase(SpecKeyT const& v) { if(KeyT* k = release(v)) delete k; } }; } #endif // UUID_D140C63FD82B4342E7DD71BD6C73E92D lierolibre-0.5/src/gvl/containers/int_set.hpp000066400000000000000000000046321205125547100214170ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_C27C476E17CF4899A94FCBB265827A0F #define UUID_C27C476E17CF4899A94FCBB265827A0F #include #include namespace gvl { template struct int_set { typedef std::size_t size_type; typedef T* iterator; int_set(size_type max) : n(0) , dense(new T[max]) , sparse(new size_type[max]) , max(max) { } bool contains(T v) { if(v >= sparse.size()) return false; if(sparse[v] < n && dense[sparse[v]] == v) return true; return false; } void insert(T v) { if(contains(v)) return; if(v >= max) throw std::out_of_range("integer is out of range"); dense[n] = v; sparse[v] = n; ++n; } void remove(T v) { if(!contains(v)) return; size_type dense_pos = sparse[v]; --n; T last = dense[n]; dense[dense_pos] = last; sparse[last] = dense_pos; } iterator begin() { return dense; } iterator end() { return dense + n; } private: size_t n; T* dense; size_type* sparse; size_type max; }; } #endif // UUID_C27C476E17CF4899A94FCBB265827A0F lierolibre-0.5/src/gvl/containers/iterator.hpp000066400000000000000000000060441205125547100216020ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_45275E9930944E2D32B8A686DB5E647A #define UUID_45275E9930944E2D32B8A686DB5E647A namespace gvl { #if 0 struct auto_any_base { operator bool() const { return false; } }; template struct auto_any : auto_any_base { auto_any(T const& t) : item(t) { } mutable T item; }; typedef auto_any_base const& auto_any_t; T* type_as_pointer(T const&) { return 0; } template inline auto_any to_auto_any(T const& t) { return t; } #define GVL_TYPEOF_AS_POINTER(V) (true ? 0 : type_as_pointer(V)) #define GVL_EVAL_AUTO_ANY(expr) to_auto_any(expr) if(auto_any_t _iter = GVL_EVAL_AUTO_ANY(iter)) {} else for(; #endif #include #include // Deprecated, see range.hpp template struct iterator_range { typedef typename std::iterator_traits::value_type value_type; typedef typename std::iterator_traits::difference_type difference_type; typedef typename std::iterator_traits::distance_type distance_type; typedef typename std::iterator_traits::pointer pointer; typedef typename std::iterator_traits::reference reference; typedef std::size_t size_type; typedef ForwardIterator iterator; iterator_range(ForwardIterator begin_init, ForwardIterator end_init) : begin_(begin_init) , end_(end_init) { } ForwardIterator begin() { return begin_; } ForwardIterator end() { return end_; } std::size_t size() const { return end_ - begin_; } private: ForwardIterator begin_; ForwardIterator end_; }; } // namespace gvl #endif // UUID_45275E9930944E2D32B8A686DB5E647A lierolibre-0.5/src/gvl/containers/linked_vector.hpp000066400000000000000000000203211205125547100225730ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_C9885A5B4D7F4D849D6DC18BE63A0131 #define UUID_C9885A5B4D7F4D849D6DC18BE63A0131 #include "../resman/linked_object.hpp" #include "../support/move.hpp" namespace gvl { /// NOTE: Only really usable with PODs template struct linked_vector : linked_object > { typedef std::size_t size_type; typedef T& reference; typedef T const& const_reference; typedef T* pointer; typedef T const* const_pointer; typedef pointer iterator; typedef const_pointer const_iterator; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef linked_object > base; struct take_ownership_tag {}; struct borrow_tag {}; linked_vector() : data_(0), begin_(0), end_(0), limit_(0) { } explicit linked_vector(size_type s) : data_(0), begin_(0), end_(0), limit_(0) { alloc_(s); } linked_vector(T const* p, size_type s) : data_(0), begin_(0), end_(0), limit_(0) { begin_ = data_ = new T[s]; limit_ = end_ = data_ + s; std::memcpy(data_, p, s * sizeof(T)); } linked_vector(T* p, size_type s, take_ownership_tag) : data_(p), begin_(p), end_(p + s), limit_(p + s) { } linked_vector(T* p, size_type s, borrow_tag) : data_(0), begin_(p), end_(p + s), limit_(p + s) { } linked_vector(move_holder m) : base(move(m)) , data_(m->data_), begin_(m->begin_), end_(m->end_), limit_(m->limit_) { m->data_ = m->begin_ = m->end_ = m->limit_ = 0; } // Default copy-ctor is fine, op= is not linked_vector& operator=(linked_vector const& b) { delete_(); linked_object >::operator=(b); data_ = b.data_; begin_ = b.begin_; end_ = b.end_; limit_ = b.limit_; return *this; } ~linked_vector() { if(this->unique()) delete[] this->data_; } /* TODO: COW T* data() { return begin_; }*/ T const* data() const { return begin_; } /// Returned pointer is only valid until any other non-const member function /// is called. NOTE: Returned pointer can also be invalidated if this /// vector refers to some transient storage that is destroyed. T* mut_data() { if(!this->unique()) realloc_(size()); return begin_; } bool full() const { return end_ == limit_; } bool empty() const { return begin_ == end_; } /// Precondition: !full() && this->unique() /// WARNING: Use with extreme care. void unsafe_unique_push_back(T const& v) { passert(!full(), "Vector full"); passert(this->unique(), "Vector is not unique"); *end_ = v; ++end_; } /// Precondition: this->unique() /// WARNING: Use with extreme care. void unique_push_back(T const& v) { passert(this->unique(), "Vector is not unique"); if (full()) realloc_((size() + 1) * 3 / 2); *end_ = v; ++end_; } void push_back(T const& v) { *space1_() = v; /* if(full()) { realloc_(1 + (size() * 3 / 2)); unsafe_push_back(v); return; } // Repeated to possibly help compiler with aliasing information unsafe_push_back(v);*/ } /// Resizes the vector to n elements. /// The contents is undefined. /// The pointer returned is the same as /// would be returned from mut_data(). T* assign(size_type n) { if(capacity() < n) { delete_(); alloc_(n); } else { end_ = begin_ + n; } return begin_; } void reserve(size_type n) { if(capacity() < n) realloc_(n); } #if 0 // Incorrect void swap(linked_vector& b) { std::swap(_data, b._data); std::swap(_begin, b._begin); std::swap(_end, b._end); std::swap(_limit, b._limit); } #endif size_type size() const { return end_ - begin_; } size_type capacity() const { return limit_ - begin_; } bool valid(size_type n) const { return n < size(); } void cut_front(size_type n) { sassert(n <= size()); begin_ += n; } /* // TODO: COW iterator begin() { return data_; } iterator end() { return end_; }*/ const_iterator begin() const { return begin_; } const_iterator end() const { return end_; } // TODO: COW for mutable version const_reference operator[](size_type n) const { passert(valid(n), "Out of bounds"); return data_[n]; } /// NOTE: Invalidates iterators to this object /// Precondition: not heap allocated void heap_allocate() { passert(!data_, "Already heap allocated"); realloc_(size()); } protected: T* space_(size_type amount) { if(!this->unique() || size() + amount >= capacity()) { // Make unique realloc_((size() + amount) * 3 / 2); } T* ret = end_; end_ += amount; return ret; } T* space1_() { if(!this->unique() || end_ == limit_) { // Make unique realloc_((size() + 1) * 3 / 2); } T* ret = end_; ++end_; return ret; } void alloc_(size_type s) { begin_ = data_ = new T[s]; limit_ = end_ = data_ + s; } void realloc_(size_type new_capacity) { size_type new_size = std::min(new_capacity, size()); T* new_data = new T[new_capacity]; std::memcpy(new_data, begin_, new_size * sizeof(T)); delete_(); begin_ = data_ = new_data; end_ = new_data + new_size; limit_ = new_data + new_capacity; } void delete_() { if(this->unique()) delete[] this->data_; else this->make_unique(); } T* data_; // If non-zero, data_ is allocated with new[] T* begin_; T* end_; T* limit_; }; /* template struct linked_vector_heap : linked_vector { linked_vector() : data_(0), begin_(0), end_(0), limit_(0) { } explicit linked_vector(size_type s) : data_(0), begin_(0), end_(0), limit_(0) { begin_ = data_ = new T[s]; limit_ = end_ = data_ + s; } linked_vector(T const* p, size_type s) : data_(0), begin_(0), end_(0), limit_(0) { begin_ = data_ = new T[s]; limit_ = end_ = data_ + s; std::memcpy(data_, p, s * sizeof(T)); } linked_vector(T* p, size_type s, ownership_tag) : data_(p), begin_(p), end_(p + s), limit_(p + s) { } ~linked_vector_heap() { if(this->unique()) delete[] this->data_; } }; */ template struct linked_vector_temp : linked_vector { typedef linked_vector base; linked_vector_temp() : base(temp_data_, N, typename base::borrow_tag()) { } ~linked_vector_temp() { if(!this->unique()) { // Go through all // NOTE: This will invalidate iterators for all // the containers. typedef typename base::linked_iterator iter; iter i = this->linked_begin(), e = this->linked_end(); for(; i != e; ) { // heap_allocate will invalidate the iterator iter next = i; ++next; i->heap_allocate(); i = next; } } } /* Not safe, use mut_data() // Only to be used before this is copied T* data() { return temp_data_; } */ private: // Can't copy to other linked_vector_temp as there can // only be one owner. linked_vector_temp(linked_vector_temp const&); linked_vector_temp& operator=(linked_vector_temp const&); T temp_data_[N]; }; } // namespace gvl #endif // UUID_C9885A5B4D7F4D849D6DC18BE63A0131 lierolibre-0.5/src/gvl/containers/list.cpp000066400000000000000000000036561205125547100207250ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "list.hpp" #include namespace gvl { std::size_t list_common::size() const { gvl_list_node const* n = first(); std::size_t c = 0; for(; n != &sentinel_; n = n->next) ++c; return c; } void list_common::integrity_check() { if(empty()) return; std::set seen; gvl_list_node* n = sentinel(); for(;;) { passert(seen.find(n) == seen.end(), "No cycles"); sassert(n->next->prev == n); sassert(n->prev->next == n); seen.insert(n); n = n->next; if(n == sentinel()) break; } } } lierolibre-0.5/src/gvl/containers/list.h000066400000000000000000000051271205125547100203650ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_BFFA58059B0C49630DD657937FF53E6C #define UUID_BFFA58059B0C49630DD657937FF53E6C #include "../support/platform.hpp" #ifdef __cplusplus extern "C" { #endif typedef struct gvl_list_node_ { struct gvl_list_node_* next; struct gvl_list_node_* prev; } gvl_list_node; typedef struct gvl_list_ { gvl_list_node sentinel; } gvl_list; GVL_INLINE void gvl_list_link_after(gvl_list_node* self, gvl_list_node* new_node) { gvl_list_node* old_self_next = self->next; new_node->next = old_self_next; new_node->prev = self; old_self_next->prev = new_node; self->next = new_node; } GVL_INLINE void gvl_list_link_before(gvl_list_node* self, gvl_list_node* new_node) { gvl_list_node* old_self_prev = self->prev; new_node->next = self; new_node->prev = old_self_prev; old_self_prev->next = new_node; self->prev = new_node; } GVL_INLINE void gvl_list_unlink(gvl_list_node* self) { gvl_list_node* self_next = self->next; gvl_list_node* self_prev = self->prev; self_prev->next = self_next; self_next->prev = self_prev; } #define gvl_list_first(self) ((self)->sentinel.next) #define gvl_list_last (self) ((self)->sentinel.prev) #ifdef __cplusplus } #endif #endif // UUID_BFFA58059B0C49630DD657937FF53E6C lierolibre-0.5/src/gvl/containers/list.hpp000066400000000000000000000431511205125547100207240ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_D5923885C48B49588EAD94A276B131F0 #define UUID_D5923885C48B49588EAD94A276B131F0 #include #include #include #include #include "../support/functional.hpp" #include "../support/debug.hpp" #include "list.h" // BIG TODO: Exception safety namespace gvl { struct default_list_tag {}; /* struct gvl_list_node : gvl_list_node { gvl_list_node() { next = this; prev = this; } void unlink() { gvl_list_unlink(this); } // NOTE: The behaviour of relink is only defined if the // nodes that were immediately left and right of this node when // it was unlinked are now consecutive (and in the same order). // This is (of course) the case right after the unlink. void relink() { passert( prev->next == next && next->prev == prev, "Adjacent nodes must be consecutive"); prev->next = this; next->prev = this; } template void move_to(ListT& dest); }; */ template inline void move_to(gvl_list_node* self, ListT& dest); template inline void unlink(gvl_list_node* self); // NOTE: The behaviour of relink is only defined if the // nodes that were immediately left and right of this node when // it was unlinked are now consecutive (and in the same order). // This is (of course) the case right after the unlink. inline void relink(gvl_list_node* self) { passert( self->prev->next == self->next && self->next->prev == self->prev, "Adjacent nodes must be consecutive"); self->prev->next = self; self->next->prev = self; } inline void unlink(gvl_list_node* self) { gvl_list_unlink(self); } inline void relink(gvl_list_node* x, gvl_list_node* p) { gvl_list_link_before(x, p); } inline void relink_before(gvl_list_node* x, gvl_list_node* p) { gvl_list_link_before(x, p); } inline void relink_after(gvl_list_node* x, gvl_list_node* p) { gvl_list_link_after(x, p); } /* template bool do_list_compare(void* comparer, gvl_list_node* a, gvl_list_node* b) { Op& real_comparer = *static_cast(comparer); return real_comparer(*static_cast(a), *static_cast(b)); } typedef bool (*do_list_compare_func)(void*, gvl_list_node*, gvl_list_node*); */ template struct list_node : gvl_list_node { template static T* downcast(gvl_list_node* p) { return static_cast(static_cast*>(p)); } list_node() { next = this; prev = this; } template static list_node* upcast(T* p) { return static_cast*>(p); } /* void relink(T* p) { gvl_list_link_before(this, upcast(p)); } void relink_before(T* p) { gvl_list_link_before(this, upcast(p)); } void relink_after(T* p) { gvl_list_link_after(this, upcast(p)); } template void move_to(ListT& dest) { gvl::move_to(this, dest); }*/ /* T* next() { return static_cast(gvl_list_node::next); } T* prev() { return static_cast(gvl_list_node::prev); }*/ }; // NOTE: Be very careful with these! They assume the list you insert // into hold a base class of T (or T itself). template inline void unlink(T* self) { gvl_list_unlink(list_node::upcast(self)); } template inline void relink(T* x, T* p) { gvl_list_link_before(list_node::upcast(x), list_node::upcast(p)); } template inline void relink_before(T* x, T* p) { gvl_list_link_before(list_node::upcast(x), list_node::upcast(p)); } template inline void relink_after(T* x, T* p) { gvl_list_link_after(list_node::upcast(x), list_node::upcast(p)); } template inline void move_to(T* x, ListT& dest) { gvl::move_to(list_node::upcast(x), dest); } struct list_common { list_common() { sentinel_.next = &sentinel_; sentinel_.prev = &sentinel_; } gvl_list_node* relink_back(gvl_list_node* el) { gvl_list_link_before(&sentinel_, el); return el; } gvl_list_node* relink_front(gvl_list_node* el) { gvl_list_link_after(&sentinel_, el); return el; } gvl_list_node* unlink(gvl_list_node* i) { gvl_list_node* n = i->next; gvl::unlink(i); return n; } gvl_list_node* relink(gvl_list_node* b, gvl_list_node* el) { gvl_list_link_before(b, el); return el; } gvl_list_node* relink_after(gvl_list_node* b, gvl_list_node* el) { gvl_list_link_after(b, el); return el; } void swap(list_common& b) { gvl_list_node* a_first = sentinel_.next; gvl_list_node* a_last = sentinel_.prev; gvl_list_node* b_first = b.sentinel_.next; gvl_list_node* b_last = b.sentinel_.prev; // Order is important std::swap(a_first->prev, b_first->prev); std::swap(a_last->next, b_last->next); std::swap(sentinel_.next, b.sentinel_.next); std::swap(sentinel_.prev, b.sentinel_.prev); } bool empty() const { return sentinel_.next == &sentinel_; } std::size_t size() const; void unlink_all() { sentinel_.next = &sentinel_; sentinel_.prev = &sentinel_; } void integrity_check(); /* gvl_list_node* raw_first() const { return sentinel_.next; } gvl_list_node* raw_last() const { return sentinel_.prev; } */ gvl_list_node* sentinel() { return &sentinel_; } //void sort(void* comparer, do_list_compare_func do_compare); gvl_list_node* first() const { return static_cast(sentinel_.next); } gvl_list_node* last() const { return static_cast(sentinel_.prev); } gvl_list_node sentinel_; }; template inline void move_to(gvl_list_node* self, ListT& dest) { unlink(self); dest.list_common::relink_back(self); } struct default_ownership { template T* take(T* p) { return p; // Verbatim } /* template T* release(T* p) { return p; }*/ }; template< typename T, typename Tag = default_list_tag, typename Deleter = default_delete, typename Ownership = default_ownership> struct list : list_common, protected Deleter, protected Ownership { static T* downcast(gvl_list_node* p) { return static_cast(static_cast*>(p)); } static list_node* upcast(T* p) { return static_cast*>(p); } struct iterator { typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef T* pointer; typedef T& reference; typedef T value_type; iterator() : ptr_(0) { } iterator(gvl_list_node* ptr) : ptr_(ptr) { } iterator(T* ptr) : ptr_(upcast(ptr)) { } T& operator*() { return *downcast(ptr_); } T* operator->() { return downcast(ptr_); } iterator& operator++() { ptr_ = ptr_->next; return *this; } iterator& operator--() { ptr_ = ptr_->prev; return *this; } iterator next() const { return iterator(ptr_->next); } iterator prev() const { return iterator(ptr_->prev); } bool operator==(iterator const& b) { return b.ptr_ == ptr_; } bool operator!=(iterator const& b) { return b.ptr_ != ptr_; } operator T*() { return downcast(ptr_); } gvl_list_node* ptr_; }; struct reverse_iterator { typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef T* pointer; typedef T& reference; typedef T value_type; reverse_iterator() : ptr_(0) { } reverse_iterator(gvl_list_node* ptr) : ptr_(ptr) { } reverse_iterator(T* ptr) : ptr_(upcast(ptr)) { } T& operator*() { return *downcast(ptr_); } T* operator->() { return downcast(ptr_); } reverse_iterator& operator++() { ptr_ = ptr_->prev; return *this; } reverse_iterator& operator--() { ptr_ = ptr_->next; return *this; } reverse_iterator next() const { return reverse_iterator(ptr_->prev); } reverse_iterator prev() const { return reverse_iterator(ptr_->next); } bool operator==(reverse_iterator const& b) { return b.ptr_ == ptr_; } bool operator!=(reverse_iterator const& b) { return b.ptr_ != ptr_; } operator T*() { return downcast(ptr_); } gvl_list_node* ptr_; }; struct range { range(gvl_list_node* front_init, gvl_list_node* end_init) : front_(front_init) , end_(end_init) { } bool empty() { return front_ == end_; } void pop_front() { front_ = front_->next; } T& front() { return *downcast(front_); } private: gvl_list_node* front_; gvl_list_node* end_; }; list(/*Deleter const& deleter = Deleter(), */Ownership const& ownership = Ownership()) : /*Deleter(deleter) , */Ownership(ownership) { } /* list(list const& b) { // TODO: Add proper cloning semantics for(gvl_list_node* f = b.first(); f != &b.sentinel_; f = f->next) { push_back(new T(*downcast(f))); } }*/ ~list() { clear(); } T* first() const { sassert(!empty()); return downcast(sentinel_.next); } T* last() const { sassert(!empty()); return downcast(sentinel_.prev); } iterator push_back(T* el) { el = static_cast(Ownership::take(el)); return iterator(list_common::relink_back(upcast(el))); } iterator push_front(T* el) { el = static_cast(Ownership::take(el)); return iterator(list_common::relink_front(upcast(el))); } iterator relink_back(T* el) { return iterator(list_common::relink_back(upcast(el))); } void pop_back() { erase(iterator(list_common::last())); } void pop_front() { erase(iterator(list_common::first())); } void unlink_back() { list_common::unlink(list_common::last()); } void unlink_front() { list_common::unlink(list_common::first()); } iterator erase(iterator i) { iterator n(list_common::unlink(i.ptr_)); Deleter::operator()(downcast(i.ptr_)); return n; } iterator erase(iterator b, iterator e) { iterator n; for(; b != e;) { n = list_common::unlink(b.ptr_); Deleter::operator()(downcast(b.ptr_)); b = n; } return n; // NOTE: n should be equal to e } iterator begin() { return iterator(list_common::first()); } iterator end() { return iterator(&sentinel_); } reverse_iterator rbegin() { return reverse_iterator(list_common::last()); } reverse_iterator rend() { return reverse_iterator(&sentinel_); } range all() { return range(list_common::first(), &sentinel_); } T& front() { return *first(); } T& back() { return *last(); } bool is_end(T* p) { return upcast(p) == &sentinel_; } /* size_t size() { return list_common::size(); }*/ iterator unlink(T* i) { return iterator(list_common::unlink(upcast(i))); } void unlink_front(range& r) { T* f = &r.front(); r.pop_front(); unlink(f); } void erase_front(range& r) { T* f = &r.front(); r.pop_front(); erase(f); } iterator relink(iterator b, T* el) { return iterator( list_common::relink( b.ptr_, upcast(el))); } reverse_iterator relink(reverse_iterator b, T* el) { return reverse_iterator( list_common::relink_after( b.ptr_, upcast(el))); } iterator insert(iterator b, T* el) { el = static_cast(Ownership::take(el)); return relink(b, el); } reverse_iterator insert(reverse_iterator b, T* el) { el = static_cast(Ownership::take(el)); return relink(b, el); } template iterator insert_sorted(T* el, Compare compare) { el = static_cast(Ownership::take(el)); gvl_list_node* before = &sentinel_; gvl_list_node* after = before->next; while(after != &sentinel_ && compare(*downcast(after), *el)) { before = after; after = after->next; } return iterator(list_common::relink(after, upcast(el))); } void move_to(iterator i, list& dest) { list_common::unlink(i.ptr_); dest.list_common::relink_back(i.ptr_); } void clear() { for(gvl_list_node* n = sentinel_.next; n != &sentinel_;) { gvl_list_node* next = n->next; Deleter::operator()(downcast(n)); n = next; } list_common::unlink_all(); } void splice(list& b) { if(!b.empty()) { b.sentinel_.next->prev = sentinel_.prev; b.sentinel_.prev->next = &sentinel_; sentinel_.prev->next = b.sentinel_.next; sentinel_.prev = b.sentinel_.prev; b.list_common::unlink_all(); } } void splice_front(list& b) { if(!b.empty()) { b.sentinel_.prev->next = sentinel_.next; b.sentinel_.next->prev = &sentinel_; sentinel_.next->prev = b.sentinel_.prev; sentinel_.next = b.sentinel_.next; b.list_common::unlink_all(); } } void split(iterator i, list& b) { if(i.ptr_ == &sentinel_) return; // Nothing to do sassert(sentinel_.prev != &sentinel_); gvl_list_node* new_last = i.ptr_->prev; i.ptr_->prev = b.sentinel_.prev; b.sentinel_.prev->next = i.ptr_; b.sentinel_.prev = sentinel_.prev; sentinel_.prev = new_last; new_last->next = &sentinel_; } /* template void sort(Op op) { list_common::sort(&op, do_list_compare); }*/ template void merge(list& b, Op op) { forward_decycle_(); b.forward_decycle_(); sentinel_.next = _merge(sentinel_.next, b.sentinel_.next, op); stitch_up_(); b.unlink_all(); } template void sort(Op op) { if(empty()) return; std::size_t const MaxBins = 25; gvl_list_node* binlist[MaxBins] = {}; forward_decycle_(); gvl_list_node* el = list_common::first(); std::size_t max_bin = 0; while(el) { // Splice into temp and move el to the next element gvl_list_node* temp = el; el = el->next; temp->next = 0; std::size_t bin = 0; for(; bin < max_bin && binlist[bin]; ++bin) { temp = _merge(binlist[bin], temp, op); binlist[bin] = 0; } if(bin == MaxBins) { binlist[bin - 1] = _merge(binlist[bin - 1], temp, op); } else { binlist[bin] = temp; if(bin == max_bin) ++max_bin; } } for(std::size_t bin = 1; bin < max_bin; ++bin) { binlist[bin] = _merge(binlist[bin], binlist[bin - 1], op); } sentinel_.next = binlist[max_bin - 1]; stitch_up_(); } /* Cross events are a too specific functionality struct dummy_cross_event { void operator()(T const&, T const&) const { // Do nothing } };*/ template void insertion_sort(Op op/*, CrossEvent cross_event = dummy_cross_event()*/) { gvl_list_node* sent = &sentinel_; gvl_list_node* lprev = sent; gvl_list_node* cur = lprev->next; while(cur != sent) { gvl_list_node* lnext = cur->next; T const* curt = downcast(cur); if(lprev != sent && op(*curt, *downcast(lprev))) { //cross_event(*downcast(prev), *downcast(cur)); // Unlink lprev->next = lnext; lnext->prev = lprev; gvl_list_node* before = lprev->prev; gvl_list_node* after = lprev; while(before != sent && op(*curt, *downcast(before))) { //cross_event(*downcast(before), *downcast(cur)); after = before; before = after->prev; } cur->next = after; cur->prev = before; before->next = cur; after->prev = cur; // prev stays the same here } else lprev = cur; // No move, prev will be cur cur = lnext; } } protected: template gvl_list_node* _merge(gvl_list_node* first, gvl_list_node* second, Op& op) { if(!first) return second; else if(!second) return first; gvl_list_node* a = first; gvl_list_node* b = second; gvl_list_node* ret; gvl_list_node* prev; if(op(*downcast(b), *downcast(a))) { ret = b; prev = b; b = b->next; } else { ret = a; prev = a; a = a->next; } while(a && b) { if(op(*downcast(b), *downcast(a))) { prev->next = b; prev = b; b = b->next; } else { prev->next = a; prev = a; a = a->next; } } // Check if there's left-overs in any of the lists if(a) prev->next = a; else if(b) prev->next = b; return ret; } void forward_decycle_() { list_common::last()->next = 0; // Decycle chain } void stitch_up_() { // Fix back pointers and stitch up gvl_list_node* prev = &sentinel_; gvl_list_node* cur = sentinel_.next; for(; cur; cur = cur->next) { cur->prev = prev; prev = cur; } prev->next = &sentinel_; sentinel_.prev = prev; } private: // Non-copyable list(list const& b); list& operator=(list const& b); }; template struct weak_list : list { weak_list() { } }; } // namespace gvl #endif // UUID_D5923885C48B49588EAD94A276B131F0 lierolibre-0.5/src/gvl/containers/list3.hpp000066400000000000000000000367111205125547100210130ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_F51696CEB29749EE46B29A892B53C538 #define UUID_F51696CEB29749EE46B29A892B53C538 #include #include #include #include #include "../support/functional.hpp" #include "../support/debug.hpp" #include "list.h" // BIG TODO: Exception safety namespace gvl { struct default_list_tag {}; /* struct gvl_list_node : gvl_list_node { gvl_list_node() { next = this; prev = this; } void unlink() { gvl_list_unlink(this); } // NOTE: The behaviour of relink is only defined if the // nodes that were immediately left and right of this node when // it was unlinked are now consecutive (and in the same order). // This is (of course) the case right after the unlink. void relink() { passert( prev->next == next && next->prev == prev, "Adjacent nodes must be consecutive"); prev->next = this; next->prev = this; } template void move_to(ListT& dest); }; */ template inline void move_to(gvl_list_node* self, ListT& dest); inline void unlink(gvl_list_node* self) { gvl_list_unlink(self); } // NOTE: The behaviour of relink is only defined if the // nodes that were immediately left and right of this node when // it was unlinked are now consecutive (and in the same order). // This is (of course) the case right after the unlink. inline void relink(gvl_list_node* self) { passert( self->prev->next == self->next && self->next->prev == self->prev, "Adjacent nodes must be consecutive"); self->prev->next = self; self->next->prev = self; } /* template bool do_list_compare(void* comparer, gvl_list_node* a, gvl_list_node* b) { Op& real_comparer = *static_cast(comparer); return real_comparer(*static_cast(a), *static_cast(b)); } typedef bool (*do_list_compare_func)(void*, gvl_list_node*, gvl_list_node*); */ template struct list_node : gvl_list_node { static T* downcast(gvl_list_node* p) { return static_cast(static_cast*>(p)); } static list_node* upcast(T* p) { return static_cast*>(p); } void relink(T* p) { gvl_list_link_before(this, upcast(p)); } void relink_before(T* p) { gvl_list_link_before(this, upcast(p)); } void relink_after(T* p) { gvl_list_link_after(this, upcast(p)); } template void move_to(ListT& dest) { gvl::move_to(this, dest); } /* T* next() { return static_cast(gvl_list_node::next); } T* prev() { return static_cast(gvl_list_node::prev); }*/ }; struct list_common { list_common() { sentinel_.next = &sentinel_; sentinel_.prev = &sentinel_; } gvl_list_node* relink_back(gvl_list_node* el) { gvl_list_link_before(&sentinel_, el); return el; } gvl_list_node* relink_front(gvl_list_node* el) { gvl_list_link_after(&sentinel_, el); return el; } gvl_list_node* unlink(gvl_list_node* i) { gvl_list_node* n = i->next; gvl::unlink(i); return n; } gvl_list_node* relink(gvl_list_node* b, gvl_list_node* el) { gvl_list_link_before(b, el); return el; } gvl_list_node* relink_after(gvl_list_node* b, gvl_list_node* el) { gvl_list_link_after(b, el); return el; } void swap(list_common& b) { gvl_list_node* a_first = sentinel_.next; gvl_list_node* a_last = sentinel_.prev; gvl_list_node* b_first = b.sentinel_.next; gvl_list_node* b_last = b.sentinel_.prev; // Order is important std::swap(a_first->prev, b_first->prev); std::swap(a_last->next, b_last->next); std::swap(sentinel_.next, b.sentinel_.next); std::swap(sentinel_.prev, b.sentinel_.prev); } bool empty() const { return sentinel_.next == &sentinel_; } std::size_t size() const; void unlink_all() { sentinel_.next = &sentinel_; sentinel_.prev = &sentinel_; } void integrity_check(); /* gvl_list_node* raw_first() const { return sentinel_.next; } gvl_list_node* raw_last() const { return sentinel_.prev; } */ gvl_list_node* sentinel() { return &sentinel_; } //void sort(void* comparer, do_list_compare_func do_compare); gvl_list_node* first() const { return static_cast(sentinel_.next); } gvl_list_node* last() const { return static_cast(sentinel_.prev); } gvl_list_node sentinel_; }; template inline void move_to(gvl_list_node* self, ListT& dest) { unlink(self); dest.list_common::relink_back(self); } struct default_ownership { template T* take(T* p) { return p; // Verbatim } /* template T* release(T* p) { return p; }*/ }; template< typename T, typename Tag = default_list_tag, typename Deleter = default_delete, typename Ownership = default_ownership> struct list : list_common, protected Deleter, protected Ownership { static T* downcast(gvl_list_node* p) { return static_cast(static_cast*>(p)); } static list_node* upcast(T* p) { return static_cast*>(p); } struct iterator { typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef T* pointer; typedef T& reference; typedef T value_type; iterator() : ptr_(0) { } iterator(gvl_list_node* ptr) : ptr_(ptr) { } iterator(T* ptr) : ptr_(upcast(ptr)) { } T& operator*() { return *downcast(ptr_); } T* operator->() { return downcast(ptr_); } iterator& operator++() { ptr_ = ptr_->next; return *this; } iterator& operator--() { ptr_ = ptr_->prev; return *this; } iterator next() const { return iterator(ptr_->next); } iterator prev() const { return iterator(ptr_->prev); } bool operator==(iterator const& b) { return b.ptr_ == ptr_; } bool operator!=(iterator const& b) { return b.ptr_ != ptr_; } operator T*() { return downcast(ptr_); } gvl_list_node* ptr_; }; struct reverse_iterator { typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef T* pointer; typedef T& reference; typedef T value_type; reverse_iterator() : ptr_(0) { } reverse_iterator(gvl_list_node* ptr) : ptr_(ptr) { } reverse_iterator(T* ptr) : ptr_(upcast(ptr)) { } T& operator*() { return *downcast(ptr_); } T* operator->() { return downcast(ptr_); } reverse_iterator& operator++() { ptr_ = ptr_->prev; return *this; } reverse_iterator& operator--() { ptr_ = ptr_->next; return *this; } reverse_iterator next() const { return reverse_iterator(ptr_->prev); } reverse_iterator prev() const { return reverse_iterator(ptr_->next); } bool operator==(reverse_iterator const& b) { return b.ptr_ == ptr_; } bool operator!=(reverse_iterator const& b) { return b.ptr_ != ptr_; } operator T*() { return downcast(ptr_); } gvl_list_node* ptr_; }; list(/*Deleter const& deleter = Deleter(), */Ownership const& ownership = Ownership()) : /*Deleter(deleter) , */Ownership(ownership) { } /* list(list const& b) { // TODO: Add proper cloning semantics for(gvl_list_node* f = b.first(); f != &b.sentinel_; f = f->next) { push_back(new T(*downcast(f))); } }*/ ~list() { clear(); } T* first() const { sassert(!empty()); return downcast(sentinel_.next); } T* last() const { sassert(!empty()); return downcast(sentinel_.prev); } iterator push_back(T* el) { el = static_cast(Ownership::take(el)); return iterator(list_common::relink_back(upcast(el))); } iterator push_front(T* el) { el = static_cast(Ownership::take(el)); return iterator(list_common::relink_front(upcast(el))); } iterator relink_back(T* el) { return iterator(list_common::relink_back(upcast(el))); } void pop_back() { erase(iterator(list_common::last())); } void pop_front() { erase(iterator(list_common::first())); } void unlink_back() { list_common::unlink(list_common::last()); } void unlink_front() { list_common::unlink(list_common::first()); } iterator erase(iterator i) { iterator n(list_common::unlink(i.ptr_)); Deleter::operator()(downcast(i.ptr_)); return n; } iterator erase(iterator b, iterator e) { iterator n; for(; b != e;) { n = list_common::unlink(b.ptr_); Deleter::operator()(downcast(b.ptr_)); b = n; } return n; // NOTE: n should be equal to e } iterator begin() { return iterator(list_common::first()); } iterator end() { return iterator(&sentinel_); } reverse_iterator rbegin() { return reverse_iterator(list_common::last()); } reverse_iterator rend() { return reverse_iterator(&sentinel_); } T& front() { return *first(); } T& back() { return *last(); } bool is_end(T* p) { return upcast(p) == &sentinel_; } /* size_t size() { return list_common::size(); }*/ iterator unlink(T* i) { return iterator(list_common::unlink(upcast(i))); } iterator relink(iterator b, T* el) { return iterator( list_common::relink( b.ptr_, upcast(el))); } reverse_iterator relink(reverse_iterator b, T* el) { return reverse_iterator( list_common::relink_after( b.ptr_, upcast(el))); } iterator insert(iterator b, T* el) { el = static_cast(Ownership::take(el)); return relink(b, el); } reverse_iterator insert(reverse_iterator b, T* el) { el = static_cast(Ownership::take(el)); return relink(b, el); } template iterator insert_sorted(T* el, Compare compare) { el = static_cast(Ownership::take(el)); gvl_list_node* before = &sentinel_; gvl_list_node* after = before->next; while(after != &sentinel_ && compare(*downcast(after), *el)) { before = after; after = after->next; } return iterator(list_common::relink(after, upcast(el))); } void move_to(iterator i, list& dest) { list_common::unlink(i.ptr_); dest.list_common::relink_back(i.ptr_); } void clear() { for(gvl_list_node* n = sentinel_.next; n != &sentinel_;) { gvl_list_node* next = n->next; Deleter::operator()(downcast(n)); n = next; } list_common::unlink_all(); } void splice(list& b) { if(!b.empty()) { b.sentinel_.next->prev = sentinel_.prev; b.sentinel_.prev->next = &sentinel_; sentinel_.prev->next = b.sentinel_.next; sentinel_.prev = b.sentinel_.prev; b.list_common::unlink_all(); } } void split(iterator i, list& b) { if(i.ptr_ == &sentinel_) return; // Nothing to do sassert(sentinel_.prev != &sentinel_); gvl_list_node* new_last = i.ptr_->prev; i.ptr_->prev = b.sentinel_.prev; b.sentinel_.prev->next = i.ptr_; b.sentinel_.prev = sentinel_.prev; sentinel_.prev = new_last; new_last->next = &sentinel_; } /* template void sort(Op op) { list_common::sort(&op, do_list_compare); }*/ template void merge(list& b, Op op) { forward_decycle_(); b.forward_decycle_(); sentinel_.next = _merge(sentinel_.next, b.sentinel_.next, op); stitch_up_(); b.unlink_all(); } template void sort(Op op) { if(empty()) return; std::size_t const MaxBins = 25; gvl_list_node* binlist[MaxBins] = {}; forward_decycle_(); gvl_list_node* el = list_common::first(); std::size_t max_bin = 0; while(el) { // Splice into temp and move el to the next element gvl_list_node* temp = el; el = el->next; temp->next = 0; std::size_t bin = 0; for(; bin < max_bin && binlist[bin]; ++bin) { temp = _merge(binlist[bin], temp, op); binlist[bin] = 0; } if(bin == MaxBins) { binlist[bin - 1] = _merge(binlist[bin - 1], temp, op); } else { binlist[bin] = temp; if(bin == max_bin) ++max_bin; } } for(std::size_t bin = 1; bin < max_bin; ++bin) { binlist[bin] = _merge(binlist[bin], binlist[bin - 1], op); } sentinel_.next = binlist[max_bin - 1]; stitch_up_(); } /* Cross events are a too specific functionality struct dummy_cross_event { void operator()(T const&, T const&) const { // Do nothing } };*/ template void insertion_sort(Op op/*, CrossEvent cross_event = dummy_cross_event()*/) { gvl_list_node* sent = &sentinel_; gvl_list_node* lprev = sent; gvl_list_node* cur = prev->next; while(cur != sent) { gvl_list_node* lnext = cur->next; T const* curt = downcast(cur); if(prev != sent && op(*curt, *downcast(prev))) { //cross_event(*downcast(prev), *downcast(cur)); // Unlink lprev->next = lnext; lnext->prev = lprev; gvl_list_node* before = lprev->prev; gvl_list_node* after = lprev; while(before != sent && op(*curt, *downcast(before))) { //cross_event(*downcast(before), *downcast(cur)); after = before; before = after->prev; } cur->next = after; cur->prev = before; before->next = cur; after->prev = cur; // prev stays the same here } else lprev = cur; // No move, prev will be cur cur = next; } } protected: template gvl_list_node* _merge(gvl_list_node* first, gvl_list_node* second, Op& op) { if(!first) return second; else if(!second) return first; gvl_list_node* a = first; gvl_list_node* b = second; gvl_list_node* ret; gvl_list_node* prev; if(op(*downcast(b), *downcast(a))) { ret = b; prev = b; b = b->next; } else { ret = a; prev = a; a = a->next; } while(a && b) { if(op(*downcast(b), *downcast(a))) { prev->next = b; prev = b; b = b->next; } else { prev->next = a; prev = a; a = a->next; } } // Check if there's left-overs in any of the lists if(a) prev->next = a; else if(b) prev->next = b; return ret; } void forward_decycle_() { list_common::last()->next = 0; // Decycle chain } void stitch_up_() { // Fix back pointers and stitch up gvl_list_node* prev = &sentinel_; gvl_list_node* cur = sentinel_.next; for(; cur; cur = cur->next) { cur->prev = prev; prev = cur; } prev->next = &sentinel_; sentinel_.prev = prev; } private: // Non-copyable list(list const& b); list& operator=(list const& b); }; } // namespace gvl #endif // UUID_F51696CEB29749EE46B29A892B53C538 lierolibre-0.5/src/gvl/containers/node_base.hpp000066400000000000000000000127051205125547100216710ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_F9757216C57B4B791CB65390226613D5 #define UUID_F9757216C57B4B791CB65390226613D5 #include "../../support/debug.hpp" namespace gvl { template struct tree_node_multiway { private: typedef DerivedT this_t; public: tree_node_multiway() : prev(0) , first_child(0) , next_sibling(0) { } this_t* prev; this_t* first_child; this_t* next_sibling; bool is_first_child() { return prev->first_child == this; } bool is_root() { return !prev; } void unlink() { if(prev) update_prev(next_sibling); if(next_sibling) next_sibling->prev = prev; } void unlink_nonroot() { sassert(prev); update_prev(next_sibling); if(next_sibling) next_sibling->prev = prev; } void insert_before(this_t* n) { next_sibling = n; prev = n->prev; if(prev) n->update_prev(this); n->prev = this; } void insert_before_nonroot(this_t* n) { next_sibling = n; prev = n->prev; sassert(prev); n->update_prev(this); n->prev = this; } void insert_after(this_t* n) { next_sibling = n->next_sibling; prev = n; n->next_sibling->prev = this; n->next_sibling = this; } void insert_as_child(this_t* n) { prev = n; this_t* ch = n->first_child; next_sibling = ch; if(ch) ch->prev = this; n->first_child = this; } this_t* child() { return first_child; } this_t* next() { return next_sibling; } private: void update_prev(this_t* n) { sassert(prev); if(is_first_child()) prev->first_child = n; else prev->next_sibling = n; } }; /* template struct tree_node_multiway : tree_node_multiway_common { private: typedef tree_node_multiway_common base_t; typedef DerivedT this_t; public: void insert_before(this_t* n) { base_t::insert_before(n); } void insert_before_nonroot(this_t* n) { base_t::insert_before(n); } void insert_after(this_t* n) { base_t::insert_after(n); } void insert_as_child(this_t* n) { base_t::insert_as_child(n); } DerivedT* child() { return static_cast(first_child); } DerivedT* next() { return static_cast(next_sibling); } };*/ // Same as tree_node_multiway_common, but without ability // to iterate backwards (to previous siblings or parent). // Should be slightly faster. template struct tree_node_multiway_forward { private: typedef DerivedT this_t; public: this_t** prev_next; this_t* first_child; this_t* next_sibling; bool is_root() { return !prev_next; } void unlink() { if(next_sibling) next_sibling->prev_next = prev_next; if(prev_next) *prev_next = next_sibling; } void unlink_nonroot() { sassert(prev_next); if(next_sibling) next_sibling->prev_next = prev_next; *prev_next = next_sibling; } void insert_before(this_t* n) { next_sibling = n; prev_next = n->prev_next; if(prev_next) *prev_next = this; n->prev_next = &next_sibling; } void insert_before_nonroot(this_t* n) { next_sibling = n; prev_next = n->prev_next; sassert(prev_next); *prev_next = this; n->prev_next = &next_sibling; } void insert_after(this_t* n) { next_sibling = n->next_sibling; prev_next = &n->next_sibling; if(n->next_sibling) n->next_sibling->prev_next = &next_sibling; n->next_sibling = this; } void insert_as_child(this_t* n) { prev_next = &n->first_child; this_t* ch = n->first_child; next_sibling = ch; if(ch) ch->prev_next = &next_sibling; n->first_child = this; } }; /* template struct tree_node_multiway_forward : tree_node_multiway_forward_common { private: typedef tree_node_multiway_forward_common base_t; typedef DerivedT this_t; public: void insert_before(this_t* n) { base_t::insert_before(n); } void insert_before_nonroot(this_t* n) { base_t::insert_before_nonroot(n); } void insert_after(this_t* n) { base_t::insert_after(n); } void insert_as_child(this_t* n) { base_t::insert_as_child(n); } };*/ template struct tree_node_binary { private: typedef tree_node_binary this_t; public: DerivedT* left; DerivedT* right; }; } #endif // UUID_F9757216C57B4B791CB65390226613D5 lierolibre-0.5/src/gvl/containers/pairing_heap.hpp000066400000000000000000000262441205125547100224030ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_332507506BA94073DD795F88B83DFD8B #define UUID_332507506BA94073DD795F88B83DFD8B #include #include #include #include "../support/functional.hpp" #include "../support/debug.hpp" // AUX_TWOPASS seems to be slower in general, at least up to a million elements #define AUX_TWOPASS 0 namespace gvl { struct pairing_node_common { pairing_node_common* left_child; // Left child pairing_node_common** prev_next; // Previous node slot pointing to this pairing_node_common* right_sibling; // Right sibling }; struct default_pairing_tag; template struct pairing_node : pairing_node_common { }; template, typename Deleter = default_delete> struct pairing_heap : Compare, Deleter { typedef pairing_node node_t; static T* downcast(pairing_node_common* p) { return static_cast(static_cast(p)); } static node_t* upcast(T* p) { return static_cast(p); } pairing_heap() : root(0) #if AUX_TWOPASS , tail_aux(0) #endif //, n(0) { } ~pairing_heap() { clear(); } bool empty() const { return !root; } void swap(pairing_heap& b) { std::swap(root, b.root); #if AUX_TWOPASS std::swap(tail_aux, b.tail_aux); #endif } void meld(pairing_heap& b) { #if !AUX_TWOPASS if(root && b.root) // comparison_link_ assumes non-zero pointers { root = comparison_link_(root, b.root); } else if(!root) { // root is 0, but b.root may not be root = b.root; } // If root is non-zero and b.root is zero, we leave root as is b.root = 0; #else if(root && b.root) { aux_splice_(b.root, b.tail_aux); } else if(!root) { // root is 0, but b.root may not be root = b.root; tail_aux = b.tail_aux; } b.root = 0; b.tail_aux = 0; #endif } // NOTE: TODO: Does root->prev have to have a defined value? void insert(T* el_) { pairing_node_common* el = upcast(el_); el->left_child = 0; #if !AUX_TWOPASS // NOTE: right_sibling and prev are left undefined for // the new root. if(!root) { root = el; } else { root = comparison_link_(root, el); } #else if(!root) { root = el; root->right_sibling = 0; tail_aux = root; } else { aux_insert_(el); } #endif } // NOTE: This actually "works" for increasing as well, // but this fact may change! Certainly the runtime // complexity bounds do not hold if keys are increased // using this function. void decreased_key(T* el_) { pairing_node_common* el = upcast(el_); if(el != root) { // NOTE: If prev is still larger than el, we can quit now, because: // * If prev is the parent, then obviously the heap property still holds. // * If prev is a sibling, then the parent must be larger than the sibling, and the heap property holds. // Does this affect the complexity in a negative way? One wouldn't think so. // A better question is whether it's common enough to pay off. // Assuming the children are in no particular order, the probability that // we can skip the tree manipulation ought to be less than 50%. // Assuming 50% probability, this means that the expected average // number of comparisons done per decreased_key would be 1.5 compared to // 1 without the optimization. unlink_subtree_(el); #if !AUX_TWOPASS root = comparison_link_(root, el); // NOTE: right_sibling and prev are left undefined for // the new root. #else aux_insert_(el); #endif } } T* unlink_min() { passert(root, "Empty heap"); pairing_node_common* ret = root; #if AUX_TWOPASS ret = combine_siblings_multipass_(ret); #endif pairing_node_common* left_child = ret->left_child; if(left_child) { root = combine_siblings_(left_child); #if !AUX_TWOPASS // NOTE: right_sibling and prev are left undefined for // the new root. #else root->right_sibling = 0; #endif } else { root = 0; } #if AUX_TWOPASS tail_aux = root; #endif return downcast(ret); } #if 0 void print_tree() { print_siblings_(0, root); } // TEMP void print_siblings_(int indent, pairing_node_common* el) { if(!el) return; for(; el; el = el->right_sibling) { std::cout << std::string(indent, ' ') << static_cast(el)->v << std::endl; print_siblings_(indent + 1, el->left_child); } } #endif T* unlink(T* el_) { pairing_node_common* el = upcast(el_); if(el != root) { unlink_subtree_(el); if(el->left_child) { #if !AUX_TWOPASS root = comparison_link_(root, combine_siblings_(el->left_child)); #else aux_insert_(combine_siblings_(el->left_child)); #endif } } else unlink_min(); return el_; } void erase_min() { passert(root, "Empty heap"); Deleter::operator()(unlink_min()); } void erase(T* el) { unlink(el); Deleter::operator()(el); } void clear() { if(root) { delete_subtree_(root); unlink_all(); } } void unlink_all() { root = 0; #if AUX_TWOPASS tail_aux = 0; #endif } T& min() { passert(root, "Empty heap"); return *downcast(root); } std::size_t size() const { if(!root) return 0; return 1 + subtree_size_(root->left_child); } private: std::size_t subtree_size_(pairing_node_common* el) const { if(!el) return 0; return 1 + subtree_size_(el->left_child) + subtree_size_(el->right_sibling); } void unlink_subtree_(pairing_node_common* el) { pairing_node_common** prev_next = el->prev_next; pairing_node_common* right_sibling = el->right_sibling; if(right_sibling) right_sibling->prev_next = prev_next; *prev_next = right_sibling; } // comparison_link_ ignores the value of right_sibling and prev_next // for both a and b. // BUT NOTE: Returned node has unmodified right_sibling and prev_next! pairing_node_common* comparison_link_(pairing_node_common* a, pairing_node_common* b) { if(Compare::operator()(*downcast(a), *downcast(b))) { // Make 'b' a child of 'a' b->prev_next = &a->left_child; pairing_node_common* ch = a->left_child; b->right_sibling = ch; if(ch) ch->prev_next = &b->right_sibling; a->left_child = b; return a; } else { // Make 'a' a child of 'b' a->prev_next = &b->left_child; pairing_node_common* ch = b->left_child; a->right_sibling = ch; if(ch) ch->prev_next = &a->right_sibling; b->left_child = a; return b; } } // NOTE: Return node has undefined right_sibling and prev! pairing_node_common* combine_siblings_(pairing_node_common* el) { sassert(el); //VL_PROF_COUNT("entry"); pairing_node_common* first = el; pairing_node_common* second = first->right_sibling; if(!second) return first; // Only one sub-tree // We're fast-tracking the case with two children pairing_node_common* next = second->right_sibling; pairing_node_common* stack = comparison_link_(first, second); if(!next) return stack; stack->right_sibling = 0; // stack termination //VL_PROF_COUNT("more than two children"); // First pass do { first = next; second = next->right_sibling; if(!second) { // Add first to the stack first->right_sibling = stack; stack = first; break; } next = second->right_sibling; pairing_node_common* tree = comparison_link_(first, second); // Add tree to the stack tree->right_sibling = stack; stack = tree; } while(next); // Second pass first = stack; second = stack->right_sibling; // The two-children test above guarantees there's at least two trees in the stack sassert(second); do { pairing_node_common* next = second->right_sibling; first = comparison_link_(first, second); second = next; } while(second); return first; } // NOTE: Return node has undefined right_sibling and prev! pairing_node_common* combine_siblings_multipass_(pairing_node_common* el) { pairing_node_common* first = el; while(true) { pairing_node_common* second = first->right_sibling; if(!second) return first; // Only one sub-tree // We're fast-tracking the case with two children pairing_node_common* next = second->right_sibling; first = comparison_link_(first, second); if(!next) return first; pairing_node_common* prev = first; do { pairing_node_common* a = next; pairing_node_common* b = a->right_sibling; if(!b) { prev->right_sibling = a; sassert(prev->right_sibling != prev); prev = a; break; } next = b->right_sibling; pairing_node_common* tree = comparison_link_(a, b); // Append tree prev->right_sibling = tree; sassert(prev->right_sibling != prev); prev = tree; } while(next); // Terminate list prev->right_sibling = 0; } return first; } void delete_subtree_(pairing_node_common* el) { pairing_node_common* child = el->left_child; while(child) { pairing_node_common* next = child->right_sibling; delete_subtree_(child); child = next; } Deleter::operator()(el); } #if AUX_TWOPASS void aux_insert_(pairing_node_common* el) { sassert(root && el); if(Compare::operator()(*downcast(el), *downcast(root))) { // el is the new root el->right_sibling = root; root = el; } else { // insert el at the end (after tail_aux) tail_aux->right_sibling = el; tail_aux = el; el->right_sibling = 0; } } void aux_splice_(pairing_node_common* el, pairing_node_common* tail) { sassert(root && el); if(Compare::operator()(*downcast(el), *downcast(root))) { // el is the new root tail->right_sibling = root; root = el; } else { // insert el after tail_aux->right_sibling = el; tail_aux = tail; } } #endif pairing_node_common* root; // root->prev_next and root->right_sibling are undefined (unless AUX_TWOPASS) #if AUX_TWOPASS pairing_node_common* tail_aux; #endif }; } #endif // UUID_332507506BA94073DD795F88B83DFD8B lierolibre-0.5/src/gvl/containers/pod_vector.hpp000066400000000000000000000102751205125547100221160ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_CA651223F7B545D1CC76BEB52DC2A9D3 #define UUID_CA651223F7B545D1CC76BEB52DC2A9D3 #include namespace gvl { template struct pod_vector { typedef std::size_t size_type; typedef T& reference; typedef T const& const_reference; typedef T* pointer; typedef T const* const_pointer; typedef pointer iterator; typedef const_pointer const_iterator; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; pod_vector() : data_(0), end_(0), limit_(0) { } explicit pod_vector(size_type s) : data_(0), end_(0), limit_(0) { data_ = new T[s]; limit_ = end_ = data_ + s; } pod_vector(T const* p, size_type s) : data_(0), end_(0), limit_(0) { data_ = new T[s]; limit_ = end_ = data_ + s; std::memcpy(data_, p, s * sizeof(T)); } T* data() { return data_; } T const* data() const { return data_; } bool full() const { return end_ == limit_; } /// Precondition: !full() void unsafe_push_back(T const& v) { passert(!full(), "Vector full"); *end_ = v; ++end_; } void push_back(T const& v) { if(full()) { realloc_(1 + (size() * 3 / 2)); unsafe_push_back(v); return; } // Repeated to possibly help compiler with aliasing information unsafe_push_back(v); } void reserve(size_type n) { if(capacity() < n) realloc_(n); } ~pod_vector() { dealloc_(); } void dealloc_() { /* for(T* p = data_; p != end_; ++p) { src->~T(); } */ delete[] data_; } void realloc_(size_type new_capacity) { /* vector tmp; size_type new_size = std::min(new_capacity, size()); // Number of elements to copy tmp.data_ = reinterpret_cast(new char[new_capacity * sizeof(T)]); tmp.end_ = tmp.data; tmp.limit_ = tmp.data_ + new_capacity; for(pointer p = data_, e = data_ + new_size; p != e; ++p) { tmp.unsafe_push_back(*p); } swap(tmp);*/ size_type new_size = std::min(new_capacity, size()); T* new_data = new T[new_capacity]; std::memcpy(new_data, data_, new_size * sizeof(T)); delete[] data_; data_ = new_data; end_ = new_data + new_size; limit_ = new_data + new_capacity; } void swap(pod_vector& b) { std::swap(_data, b._data); std::swap(_end, b._end); std::swap(_limit, b._limit); } size_type size() const { return end_ - data_; } size_type capacity() const { return limit_ - data_; } bool valid(size_type n) const { return n < size(); } iterator begin() { return data_; } iterator end() { return end_; } const_iterator begin() const { return data_; } const_iterator end() const { return end_; } reference operator[](size_type n) { passert(valid(n), "Out of bounds"); return data_[n]; } private: T* data_; T* end_; T* limit_; }; } // namespace gvl #endif // UUID_CA651223F7B545D1CC76BEB52DC2A9D3 lierolibre-0.5/src/gvl/containers/range.hpp000066400000000000000000000110071205125547100210400ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_4800C387FBD44D146E8D33AE59C4A598 #define UUID_4800C387FBD44D146E8D33AE59C4A598 #include #include #include "../support/cstdint.hpp" #include "../support/debug.hpp" namespace gvl { // Functor -> infinite range adaptor template struct functor_range { typedef typename Functor::value_type value_type; functor_range(Functor func = Functor()) : cached_(false), func_(func) { } Functor& functor(); bool empty() const { return false; } value_type& front() { if(!cached_) { val = func_(); cached_ = true; } return val; } void pop_front() { if(!cached_) func_(); // Skip else cached_ = false; } private: Functor func_; bool cached_; value_type val; }; struct delimited_iterator_range_overflow : std::exception { delimited_iterator_range_overflow() { } }; template struct delimited_iterator_range { typedef typename std::iterator_traits::value_type value_type; typedef typename std::iterator_traits::reference reference; delimited_iterator_range() : i(), e() { } delimited_iterator_range(It i_init, It e_init) : i(i_init), e(e_init) { } void put(value_type const& x) { if(i != e) *i++ = x; else if(Except) throw delimited_iterator_range_overflow(); } void put(value_type const* x, uint32_t count) { while(count-- > 0) { put(*x++); } } bool empty() const { return i == e; } std::size_t size() const { return std::distance(i, e); } reference front() { sassert(i != e); return *i; } void pop_front() { sassert(i != e); ++i; } It i, e; }; template struct unsafe_delimited_iterator_range { typedef typename std::iterator_traits::value_type value_type; unsafe_delimited_iterator_range(It i_init, It e_init) : i(i_init), e(e_init) { } void put(value_type const& x) { *i++ = x; } void put(value_type const* x, uint32_t count) { while(count-- > 0) { put(*x++); } } bool empty() const { return i == e; } std::size_t size() const { return std::distance(i, e); } value_type& front() { sassert(i != e); return *i; } void pop_front() { sassert(i != e); ++i; } It i, e; }; template struct container_output_range { typedef typename Cont::value_type value_type; typedef typename Cont::reference reference; void put(value_type const& x) { cont.push_back(x); } void put(value_type const* x, uint32_t count) { while(count-- > 0) { put(*x++); } } Cont cont; }; template unsafe_delimited_iterator_range iter_range(ForwardIterator const& b, ForwardIterator const& e) { return unsafe_delimited_iterator_range(b, e); } template unsafe_delimited_iterator_range iter_range(Container& cont) { return unsafe_delimited_iterator_range(cont.begin(), cont.end()); } template void for_range(T range, F func) { for(; !range.empty(); range.pop_front()) func(range.front()); } } #endif // UUID_4800C387FBD44D146E8D33AE59C4A598 lierolibre-0.5/src/gvl/containers/string.hpp000066400000000000000000000257111205125547100212610ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_STRING_HPP #define GVL_STRING_HPP #include "bucket.hpp" #include "../support/debug.hpp" #include #include // Alternative implementation namespace gvl { template struct basic_string_pod { std::size_t size_; std::size_t cap_; union { bucket_data_mem* data; mutable uint8_t inline_data[InlineCapacity]; } d; }; template struct basic_string : basic_string_pod // Includes the 0-terminator { typedef basic_string_pod base; struct take_data_tag {}; template friend struct basic_string; // All ranges are invalidated when the string is changed except via // range functions, in which case all but the manipulating range are // invalidated. All ranges are also invalidated when the string is copied. struct range { template friend struct basic_string; uint8_t front() const { sassert(!empty()); return *cur; } void pop_front() { sassert(!empty()); ++cur; } uint8_t back() const { sassert(!empty()); return end[-1]; } void pop_back() { sassert(!empty()); --end; } bool empty() const { return cur >= end; } void put(uint8_t c) { sassert(!empty()); if(Cow) { uint8_t* prev_begin = self.begin_(); if(self.cow_()) cur = self.begin_() + (cur - prev_begin); } *cur++ = c; } private: range(basic_string& self, uint8_t* cur_init, uint8_t* end_init) : self(self), cur(cur_init), end(end_init) { } basic_string& self; uint8_t* cur; uint8_t* end; }; basic_string() { reset_next_limit_(); } basic_string(basic_string const& b) { base::operator=(b); if(!is_inline_()) { if(Cow) this->d.data->add_ref(); else { // bucket_data_mem allocates 1 byte extra for the zero-terminator this->d.data = this->d.data->clone(capacity(), size()); } } } basic_string(char const* b_) { uint8_t const* b = reinterpret_cast(b_); init_from_(b, std::strlen(b_)); } basic_string(uint8_t const* b, std::size_t len) { init_from_(b, len); } basic_string( shared_ptr data_init, std::size_t size_init, std::size_t cap_init, take_data_tag) { // We can't take over the data pointer unless we're doing // Cow or the ref_count() is 1. if(!Cow && data_init->ref_count() > 1) init_from_(data_init->data, size_init); // Copy else init_from_(data_init.get(), size_init, cap_init, take_data_tag()); } basic_string( shared_ptr data_init, take_data_tag) { // We can't take over the data pointer unless we're doing // Cow or the ref_count() is 1. if(!Cow && data_init->ref_count() > 1) init_from_(data_init->data, data_init->size()); // Copy else init_from_(data_init.get(), data_init->size(), data_init->size(), take_data_tag()); } template basic_string(basic_string const& b) { init_from_(b); } template basic_string(basic_string const& b, take_data_tag) { if(b.is_inline_()) { init_from_(b.d.inline_data, b.size_); b.reset_next_limit_(); } else { init_from_(b.d.data, b.size_, b.cap_, take_data_tag()); b.reset_next_limit_(); } } ~basic_string() { release_(); } void clear() { if(Cow && !is_inline_() && this->d.data->ref_count() > 1) { // No point to retain the bucket_data_mem, release // and reset. this->d.data->release(); reset_next_limit_(); } else { this->size_ = 0; } } basic_string& operator=(basic_string b) { b.swap(*this); return *this; } template basic_string& operator=(basic_string b) { b.swap(*this); return *this; } template void assign(basic_string b) { b.swap(*this); } void assign(shared_ptr data_new, std::size_t size_new, std::size_t cap_new) { basic_string b(data_new, size_new, cap_new, take_data_tag()); b.swap(*this); } void assign(shared_ptr data_new) { basic_string b(data_new, data_new->size(), data_new->size(), take_data_tag()); b.swap(*this); } void assign(uint8_t const* begin, std::size_t len) { basic_string b(begin, len); b.swap(*this); } void push_back(uint8_t x) { cow_(); if(this->size_ == this->cap_) reserve(size() * 2); begin_()[this->size_++] = x; } template void append(basic_string const& b) { // cow_ called by append below append(b.begin_(), b.size_); } // NOTE: [b, e) cannot be inside *this void append(uint8_t const* b, std::size_t len) { sassert(!(b >= begin_() && b + len < end_())); cow_(); if(capacity_left_() < len) reserve(size() + len); std::memcpy(next_(), b, len); this->size_ += len; } void append(char const* b) { append(reinterpret_cast(b), std::strlen(b)); } void reserve(std::size_t s) { if(InlineSize > 1 && s <= InlineSize) return; if(is_inline_()) { std::size_t cur_size = this->size_; std::size_t cap_new = std::max(s, InlineSize * 2); // At least double the capacity // bucket_data_mem allocates 1 byte extra for the zero-terminator bucket_data_mem* data_init = bucket_data_mem::create(cap_new, cap_new); std::memcpy(data_init->data, this->d.inline_data, cur_size); this->d.data = data_init; this->size_ = cur_size; this->cap_ = cap_new; } else if(this->d.data->size_ < s) { std::size_t cur_size = this->size_; std::size_t cap_new = std::max(s, capacity() * 2); // At least double the capacity bucket_data_mem* old_data = this->d.data; // bucket_data_mem allocates 1 byte extra for the zero-terminator this->d.data = old_data->enlarge(cap_new); old_data->release(); this->size_ = cur_size; this->cap_ = cap_new; } } basic_string release_as_cow() { if(Cow) { basic_string ret(*this); clear(); return ret; } else { basic_string ret(*this, take_data_tag()); return ret; } } char const* c_str() const { // One additional byte is always allocated for the 0-terminator *this->end_() = 0; return reinterpret_cast(begin_()); } char const* data() const { return reinterpret_cast(begin_()); } std::size_t capacity() const { return this->cap_; } std::size_t size() const { return this->size_; } bool empty() const { return this->size_ == 0; } range all() { return range(*this, begin_(), end_()); } void swap(basic_string& rhs) { std::swap(static_cast(*this), static_cast(rhs)); } uint8_t operator[](std::size_t i) { sassert(i < size()); return begin_()[i]; } void set(std::size_t i, uint8_t c) { sassert(i < size()); cow_(); begin_()[i] = c; } private: std::size_t capacity_left_() const { return std::size_t(this->cap_ - this->size_); } void release_() { if(!is_inline_()) { if(Cow) this->d.data->release(); else delete this->d.data; } } void reset_next_limit_() { this->size_ = 0; if(InlineSize > 1) { this->cap_ = InlineSize; // We don't reset d.data, because it will not be // accessed when cap_ <= InlineSize } else { this->cap_ = 0; this->d.data = 0; } } uint8_t* begin_() const { return (is_inline_() ? this->d.inline_data : this->d.data->data); } uint8_t* end_() const { return begin_() + this->size_; } uint8_t* next_() const { return begin_() + this->size_; } bool is_inline_() const { return InlineSize > 1 && (this->cap_ <= InlineSize); } bool cow_() { if(Cow && !is_inline_() && this->d.data->ref_count() > 1) { // bucket_data_mem allocates 1 byte extra for the zero-terminator this->d.data = this->d.data->clone(capacity(), size()); return true; } return false; } template void init_from_(basic_string const& b) { if(b.is_inline_()) init_from_(b.d.inline_data, b.size_); else if(Cow && Cow2) init_from_(b.d.data, b.size_, b.cap_); else init_from_(b.d.data->data, b.size_); } void init_from_(uint8_t const* b, std::size_t size_init) { this->size_ = size_init; if(InlineSize > 1 && size_init <= InlineSize) { this->cap_ = InlineSize; std::memcpy(this->d.inline_data, b, size_init); } else { // bucket_data_mem allocates 1 byte extra for the zero-terminator this->d.data = bucket_data_mem::create_from(b, b + size_init, size_init); this->cap_ = size_init; } } void init_from_(bucket_data_mem* data_init, std::size_t size_init, std::size_t cap_init) { sassert(Cow); this->size_ = size_init; if(InlineSize > 1 && size_init <= InlineSize) { this->cap_ = InlineSize; std::memcpy(this->d.inline_data, data_init->data, size_init); // TODO: memcpy isn't very fast for very small strings } else { this->d.data = data_init; this->d.data->add_ref(); this->cap_ = cap_init; } } void init_from_(bucket_data_mem* data_init, std::size_t size_init, std::size_t cap_init, take_data_tag) { this->size_ = size_init; if(InlineSize > 1 && size_init <= InlineSize) { this->cap_ = InlineSize; std::memcpy(this->d.inline_data, data_init->data, size_init); data_init->release(); } else { this->d.data = data_init; this->cap_ = cap_init; } } }; typedef basic_string<> string; typedef basic_string<7, true> string_cow; } #endif // GVL_STRING_HPP lierolibre-0.5/src/gvl/containers/tests/000077500000000000000000000000001205125547100203765ustar00rootroot00000000000000lierolibre-0.5/src/gvl/containers/tests/deque.cpp000066400000000000000000000060751205125547100222150ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../../test/test.hpp" #include "../../containers/deque.hpp" #include "../../math/tt800.hpp" #include "../../support/algorithm.hpp" #include "../../resman/allocator.hpp" #include "../../support/platform.hpp" #include #include #include #include #include struct track_obj; std::set track_obj_live; int track_obj_copies = 0; #define MOVABLE CPP0X struct track_obj { track_obj(int v) : v(v) { track_obj_live.insert(this); } #if !MOVABLE track_obj(track_obj const& other) : v(other.v) { ++track_obj_copies; track_obj_live.insert(this); } track_obj& operator=(track_obj const& other) { ++track_obj_copies; v = other.v; return *this; } #endif ~track_obj() { if(track_obj_live.count(this) > 0) track_obj_live.erase(this); } int v; #if MOVABLE track_obj(track_obj&& other) : v(other.v) { track_obj_live.insert(this); } track_obj& operator=(track_obj&& other) { v = other.v; return *this; } private: track_obj(track_obj const& other); track_obj& operator=(track_obj const& other); #endif }; GVLTEST_SUITE(gvl, deque) GVLTEST(gvl, deque, push_pop) { typedef gvl::deque l_t; l_t l; gvl::tt800 r(1234); int const iter = 1000; int const limit = iter; for(int i = 0; i < iter; ++i) { l.push_back(track_obj(i)); } for(int i = 0; i < iter; ++i) { track_obj& v = l.front(); GVLTEST_ASSERT("popped in the right order", v.v == i); l.pop_front(); } GVLTEST_ASSERT("empty after pops", l.empty()); GVLTEST_ASSERT("all track_obj were destroyed", track_obj_live.empty()); #if MOVABLE GVLTEST_ASSERT("no copied were made in C++0x", track_obj_copies == 0); #endif } lierolibre-0.5/src/gvl/containers/tests/hash_set.cpp000066400000000000000000000050621205125547100227030ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../../test/test.hpp" #include "../../hash_set/hash_set.hpp" GVLTEST_SUITE(gvl, hash_set_new) GVLTEST_SUITE(gvl, hash_set_unboxed) GVLTEST(gvl, hash_set_new, insert_find) { gvl::hash_set_new h; for(int i = 0; i < 100; ++i) h.insert(i); for(int i = 0; i < 100; ++i) GVLTEST_ASSERT("exists", h.has(i) && h.lookup(i)->key() == i); for(int i = 100; i < 200; ++i) GVLTEST_ASSERT("not exists", !h.has(i)); } GVLTEST(gvl, hash_set_unboxed, insert_find) { gvl::hash_set_unboxed h; // 0 will work as empty element for(int i = 1; i < 100; ++i) h.insert(i); for(int i = 1; i < 100; ++i) GVLTEST_ASSERT("exists", h.has(i) && *h.get(i) == i); for(int i = 100; i < 200; ++i) GVLTEST_ASSERT("not exists", !h.has(i)); for(int i = 100; i < 100000; ++i) h.insert(i); for(int i = 100; i < 100000; ++i) GVLTEST_ASSERT("exists 2", h.has(i) && h.lookup(i)->key() == i); for(int i = 500; i < 5000; ++i) h.erase(i); for(int i = 100; i < 500; ++i) GVLTEST_ASSERT("exists 3", h.has(i)); for(int i = 500; i < 5000; ++i) GVLTEST_ASSERT("not exists 2", !h.has(i)); for(int i = 5000; i < 100000; ++i) GVLTEST_ASSERT("exists 4", h.has(i)); }lierolibre-0.5/src/gvl/containers/tests/list.cpp000066400000000000000000000123241205125547100220570ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../../test/test.hpp" #include "../list.hpp" #include "../../math/cmwc.hpp" #include "../../support/algorithm.hpp" #include "../../support/macros.hpp" #include #include #include #include "../../tut/quickcheck/context.hpp" #include "../../tut/quickcheck/generator.hpp" #include "../../tut/quickcheck/property.hpp" struct tag1; struct tag2; struct integer : gvl::list_node , gvl::list_node { integer(int v) : v(v) { } bool operator<(integer const& b) const { return v < b.v; } int v; }; typedef gvl::list integer_list; QC_BEGIN_GEN(empty_list_gen, integer_list) return ptr_t(new t); QC_END_GEN() QC_BEGIN_GEN(singleton_list_gen, integer_list) ptr_t ret(new t); ret->push_back(new integer(ctx.rand(10000))); return ret; QC_END_GEN() QC_BEGIN_GEN(concat_list_gen, integer_list) if(ctx.generator_depth() > 10) { return ctx.generate("singleton"); } ptr_t a(ctx.generate_any()); ptr_t b(ctx.generate_any()); a->splice(*b); return a; QC_END_GEN() QC_BEGIN_GEN(erase_list_gen, integer_list) ptr_t a(ctx.generate_any()); if(!a->empty()) a->pop_front(); return a; QC_END_GEN() QC_BEGIN_GEN(sorted_list_gen, integer_list) ptr_t a(ctx.generate_any()); a->sort(std::less()); return a; QC_END_GEN() QC_BEGIN_PROP(list_integrity_property, integer_list) gvl::qc::chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, obj)) { obj->integrity_check(); return gvl::qc::chk_ok_reuse; } QC_END_PROP() QC_BEGIN_GENERIC_PROP(list_pop_front_property) gvl::qc::chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, obj)) { if(obj->empty()) return gvl::qc::chk_not_applicable; std::size_t before_count = obj->size(); obj->pop_front(); std::size_t after_count = obj->size(); QC_ASSERT("pop_front decrease count with 1", after_count + 1 == before_count); return gvl::qc::chk_ok_reuse; } QC_END_PROP() template struct greater : std::binary_function { bool operator()(T const& a, T const& b) const { return b < a; } }; GVLTEST_SUITE(gvl, list) GVLTEST(gvl, list, insert_delete_sort) { typedef gvl::list l1_t; typedef gvl::list l2_t; l1_t l1; l2_t l2; gvl::mwc r(1234); for(int repeat = 0; repeat < 100; ++repeat) { std::size_t l1_count = 0; std::size_t l2_count = 0; int count = r(0, 200); for(int i = 0; i < count; ++i) { integer* o = new integer(r(0, 10000)); l1.push_back(o); l2.push_back(o); ++l1_count; ++l2_count; } ASSERT("l1 size after inserting", l1.size() == l1_count); ASSERT("l2 size after inserting", l2.size() == l2_count); l1.integrity_check(); l2.integrity_check(); FOREACH_DELETE(l2_t, i, l2) { if((r() & 1) == 0) { l2.unlink(i); --l2_count; } } ASSERT("l2 size after erasing", l2.size() == l2_count); l1.sort(std::less()); l2.sort(greater()); ASSERT("l1 size after sorting", l1.size() == l1_count); ASSERT("l2 size after sorting", l2.size() == l2_count); ASSERT("l1 sorted", gvl::is_sorted(l1.begin(), l1.end())); ASSERT("l2 sorted", gvl::is_sorted(l2.begin(), l2.end(), greater())); l1.integrity_check(); l2.integrity_check(); l2.unlink_all(); if(r() & 1) { FOREACH_DELETE(l1_t, i, l1) { l1.erase(i); } } else { l1.clear(); } ASSERT("l1 empty", l1.empty()); ASSERT("l2 empty", l2.empty()); } } GVLTEST(gvl, list, quickcheck) { gvl::qc::context ctx; ctx.add("singleton", new singleton_list_gen, 1.5); ctx.add("concat", new concat_list_gen, 1.5); ctx.add("sorted", new sorted_list_gen); ctx.add("empty", new empty_list_gen); ctx.add("erase", new erase_list_gen); gvl::qc::test_property(ctx); gvl::qc::test_property >(ctx); } lierolibre-0.5/src/gvl/containers/tests/pairing_heap.cpp000066400000000000000000000147661205125547100235460ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../../test/test.hpp" #include "../pairing_heap.hpp" #include "../../math/tt800.hpp" #include "../../support/algorithm.hpp" #include #include #include #include #include #include #include #include "../../tut/quickcheck/context.hpp" #include "../../tut/quickcheck/generator.hpp" #include "../../tut/quickcheck/property.hpp" #include "../../support/log.hpp" #include "../../support/profile.hpp" struct pairing_heap_integer : gvl::pairing_node<> { pairing_heap_integer(int v) : v(v) { } bool operator<(pairing_heap_integer const& b) const { return v < b.v; } int v; }; typedef gvl::pairing_heap h_t; #define TANDEM(x, op) do { (x)->first.op; (x)->second.op; } while(0) template struct heap_model { struct ptr_comp { bool operator()(T* a, T* b) const { return *a < *b; } }; void insert(T* x) { elements.insert(x); } void meld(heap_model& b) { elements.insert(b.elements.begin(), b.elements.end()); b.elements.clear(); } void erase_min() { delete *elements.begin(); unlink_min(); } void unlink_min() { elements.erase(elements.begin()); } void unlink_all() { elements.clear(); } T& min() { return **elements.begin(); } std::size_t size() const { return elements.size(); } bool empty() const { return elements.empty(); } std::multiset elements; }; typedef std::pair > test_type; QC_BEGIN_GEN(empty_heap_gen, test_type) TLOG("Empty"); return ptr_t(new t); QC_END_GEN() QC_BEGIN_GEN(singleton_heap_gen, test_type) ptr_t ret(new t); int v = ctx.rand(10000); TANDEM(ret, insert(new pairing_heap_integer(v))); TLOG("Singleton(" << v << ")"); return ret; QC_END_GEN() QC_BEGIN_GEN(merge_heap_gen, test_type) if(ctx.generator_depth() > 10) { return ctx.generate("singleton"); } TLOG("Meld("); ptr_t a(ctx.generate_any()); TLOG(", "); ptr_t b(ctx.generate_any()); TLOG(")"); /* std::cout << "\n\n"; a->first.print_tree(); std::cout << "U\n"; b->first.print_tree(); std::cout << "=\n"; */ a->first.meld(b->first); a->second.meld(b->second); /* a->first.print_tree(); std::cout << "\n\n"; */ return a; QC_END_GEN() QC_BEGIN_GEN(erase_min_heap_gen, test_type) TLOG("EraseMin("); ptr_t a(ctx.generate_any()); TLOG(")"); if(!a->first.empty()) a->first.erase_min(); if(!a->second.empty()) a->second.erase_min(); return a; QC_END_GEN() QC_BEGIN_GEN(insert_heap_gen, test_type) TLOG("Insert("); ptr_t a(ctx.generate_any()); int v = ctx.rand(10000); TLOG(", " << v << ")"); TANDEM(a, insert(new pairing_heap_integer(v))); return a; QC_END_GEN() QC_BEGIN_PROP(heap_integrity_property, test_type) gvl::qc::chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, obj)) { TLOG(std::endl << "=== heap_integrity_property ==="); while(!obj->first.empty() && !obj->second.empty()) { int a = obj->first.min().v; int b = obj->second.min().v; QC_ASSERT("elements are the same", a == b); obj->first.erase_min(); obj->second.erase_min(); } QC_ASSERT("both empty", obj->first.empty() && obj->second.empty()); return gvl::qc::chk_ok; } QC_END_PROP() /* template struct greater : std::binary_function { bool operator()(T const& a, T const& b) const { return b < a; } };*/ GVLTEST_SUITE(gvl, pairing_heap) GVLTEST(gvl, pairing_heap, push_pop) { h_t heap; int const count = 1000; std::vector added; gvl::tt800 rand(1); for(int i = 0; i < count; ++i) { int v = rand.range(0, 10000); added.push_back(v); heap.insert(new pairing_heap_integer(v)); } std::sort(added.begin(), added.end()); for(int i = 0; i < count; ++i) { ASSERT("not empty", !heap.empty()); ASSERT("all items are present and popped in the right order", added[i] == heap.min().v); heap.erase_min(); } } GVLTEST(gvl, pairing_heap, quickcheck) { gvl::qc::context ctx; ctx.add("singleton", new singleton_heap_gen, 0.5); ctx.add("merge", new merge_heap_gen); ctx.add("insert", new insert_heap_gen, 1.5); ctx.add("empty", new empty_heap_gen, 0.2); ctx.add("erase_min", new erase_min_heap_gen, 0.4); gvl::qc::test_property(ctx, 1000, 500); } GVLTEST(gvl, pairing_heap, profiling) { #if GVL_PROFILE std::vector added; gvl::mwc rand; rand.seed(1); int const count = 500000; for(int i = 0; i < count; ++i) { int v = rand(0, 10000); added.push_back(pairing_heap_integer(v)); } { h_t heap; GVL_PROF_TIMER("pairing heap"); for(int i = 0; i < 20; ++i) { for(std::size_t i = 0; i < added.size(); ++i) { heap.insert(&added[i]); } for(int i = 0; i < 200; ++i) //while(!heap.empty()) { heap.unlink_min(); //heap.erase_min(); } heap.unlink_all(); } } { std::priority_queue heap; GVL_PROF_TIMER("binary heap"); for(int i = 0; i < 20; ++i) { for(std::size_t i = 0; i < added.size(); ++i) { heap.push(added[i].v); } for(int i = 0; i < 200; ++i) //while(!heap.empty()) { heap.pop(); } } } #endif } lierolibre-0.5/src/gvl/containers/tests/treap.cpp000066400000000000000000000065011205125547100222170ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../../test/test.hpp" #include "../treap2.hpp" #include "../../math/tt800.hpp" #include "../../support/algorithm.hpp" #include "../../resman/allocator.hpp" #include #include #include #include #include struct treap_integer2 : gvl::treap_node2<> { treap_integer2(int v) : v(v) { } bool operator<(treap_integer2 const& b) const { return v < b.v; } int v; }; template struct greater : std::binary_function { bool operator()(T const& a, T const& b) const { return b < a; } }; double log2(double x) { return std::log(x) / std::log(2.0); } struct timer { timer() : start(std::clock()) { } ~timer() { std::clock_t stop = std::clock(); std::printf("Time: %f\n", (stop - start) / (double)(CLOCKS_PER_SEC)); } std::clock_t start; }; GVLTEST_SUITE(gvl, treap) GVLTEST(gvl, treap, push_erase_find) { //typedef gvl::treap l1_t; typedef std::set l2_t; typedef gvl::treap2 l3_t; //l1_t l1; /*l2_t l2;*/ l3_t l3; gvl::tt800 r(1234); int const iter = 1000; int const limit = iter; { for(int repeat = 0; repeat < iter; ++repeat) { l3.insert(new treap_integer2(/*repeat*/r.range(0, limit))); } } int sum = 0; { for(int repeat = 0; repeat < 30; ++repeat) { int v = r.range(0, limit); for(l3_t::range iter = l3.all(); !iter.empty(); iter.pop_front()) { sum += iter.front().v; } } } { for(int repeat = 0; repeat < iter; ++repeat) { int v = r.range(0, limit); l3_t::range iter = l3.find(v); if(!iter.empty()) l3.erase_front(iter); //l3.integrity_check(); } } { for(int repeat = 0; repeat < iter; ++repeat) { int v = r.range(0, limit); l3.find(v); } } } GVLTEST(gvl, treap, useless) { typedef gvl::treap2 l1_t; l1_t l1; gvl::tt800 r(1234); int const iter = 1500000; } lierolibre-0.5/src/gvl/containers/treap.hpp000066400000000000000000000465361205125547100210760ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_62728EE0B31F4930782885B97479EAC1 #define UUID_62728EE0B31F4930782885B97479EAC1 #include #include #include #include "../support/functional.hpp" #include "../support/debug.hpp" #include "../math/tt800.hpp" #include "../system/system.hpp" #include namespace gvl { // NOTE: Not quite in working condition right now struct treap_node_common { static int const left_bit = 1; static int const right_bit = 2; treap_node_common* parent; treap_node_common* ch[2]; int thread_flags; // std::size_t priority; template treap_node_common*& child() { return ch[Ch]; } template treap_node_common*& mchild() { return ch[Ch^1]; } template bool has_() { return ((thread_flags >> Ch) & 1) != 0; } template // Ch == 0 => left, Ch == 1 => right treap_node_common* move() { if(!has_()) return ch[Ch]; // It's a thread return ch[Ch]->extreme_in_subtree(); } template // Ch == 0 => left, Ch == 1 => right treap_node_common* extreme_in_subtree() { treap_node_common* n = this; while(n->has_()) n = n->ch[Ch]; return n; } bool is_leaf() const { return thread_flags == 0; } }; struct default_treap_tag { }; template struct treap_node : treap_node_common { }; struct default_random { default_random() : r(1) // TEMP r(get_ticks()) { } std::size_t operator()() { return r(); } tt800 r; // TODO: A smaller PRNG? }; template , typename Deleter = default_delete , typename Random = default_random> struct treap : Compare, Random, Deleter { typedef T value_type; static T* downcast(treap_node_common* p) { return static_cast(static_cast*>(p)); } static treap_node* upcast(T* p) { return static_cast*>(p); } struct range { friend struct treap; bool empty() const { return front_ == back_prev_; } T& front() { return *downcast(front_); } T& back() { return *downcast(back_); } void pop_front() { front_ = front_->move<1>(); } void pop_back() { back_prev_ = back_; back_ = back_->move<0>(); } private: range(treap_node_common* front_init, treap_node_common* back_init) : front_(front_init) , back_(back_init) , back_prev_(back_->move<1>()) { } range(treap_node_common* front_init, treap_node_common* back_init, treap_node_common* back_prev_init) : front_(front_init) , back_(back_init) , back_prev_(back_prev_init) { } treap_node_common* front_; treap_node_common* back_; treap_node_common* back_prev_; }; #if 0 struct iterator { friend struct treap; typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef T* pointer; typedef T& reference; typedef T value_type; iterator() : ptr_(0) {} /* explicit iterator(treap_node_common* ptr) : ptr_(ptr) {} */ explicit iterator(T* ptr) : ptr_(upcast(ptr)) {} T& operator*() { return *downcast(ptr_); } T* operator->() { return downcast(ptr_); } iterator& operator++() { ptr_ = ptr_->move<1>(); return *this; } iterator& operator--() { ptr_ = ptr_->move<0>(); return *this; } iterator next() const { return iterator(ptr_->move<1>()); } iterator prev() const { return iterator(ptr_->move<0>()); } bool operator==(iterator const& b) { return b.ptr_ == ptr_; } bool operator!=(iterator const& b) { return b.ptr_ != ptr_; } private: treap_node_common* ptr_; }; #endif treap() : n(0) , root(0) { head.thread_flags = 0; // Head is always a leave (sort of) head.ch[0] = &head; head.ch[1] = &head; } ~treap() { clear(); } bool empty() const { return n == 0; } std::size_t size() const { return n; } void clear() { if(root) delete_node_(root); clean_(); } /* iterator begin() { sassert(root); return root->extreme_in_subtree<0>(); } iterator end() { return iterator(0); }*/ range all() { return range(head.child<1>(), head.child<0>(), &head); } void swap(treap& b) { std::swap(n, b.n); std::swap(root, b.root); std::swap(head.ch[0], b.head.ch[0]); std::swap(head.ch[1], b.head.ch[1]); // All head nodes have thread_flags == 0, no need to swap } void insert(T* el_) { treap_node_common* el = upcast(el_); el->priority = Random::operator()(); el->thread_flags = 0; // Newly inserted nodes are always leaves if(root) insert_under_(root, el, 0, root, &head, &head); else { root = el; root->parent = 0; root->ch[0] = &head; root->ch[1] = &head; head.ch[0] = root; head.ch[1] = root; sassert(n == 0); n = 1; } } void unlink(T* el_) { treap_node_common* el = upcast(el_); treap_node_common* parent = el->parent; if(parent) { if(parent->child<0>() == el) unlink_nonroot_<0>(el, parent); else unlink_nonroot_<1>(el, parent); } else { if(el->is_leaf()) { root = 0; head.ch[0] = &head; head.ch[1] = &head; } else { if(el == head.ch[0]) head.ch[0] = el->move<1>(); if(el == head.ch[1]) head.ch[1] = el->move<0>(); root_unlink_(el, 0, root); } } --n; } T* unlink_front(range& r) { sassert(!r.empty()); T* front = &r.front(); r.pop_front(); unlink(front); return front; } T* unlink_back(range& r) { sassert(!r.empty()); T* back = &r.front(); // We don't want to call pop_back() as it would set back_prev_ to the unlinked element. // back_prev_ remains correct. r.back_ = r.back_->move<0>(); unlink(back); return back; } /* void erase(iterator i) { T* el_ = downcast(i.ptr_); unlink(el_); Deleter::operator()(el_); }*/ void erase_front(range& r) { Deleter::operator()(unlink_front(r)); } void erase_back(range& r) { Deleter::operator()(unlink_back(r)); } template range find(SpecKeyT const& k) { return range(downcast(find_(k, root)), 0); } template bool test(SpecKeyT const& k) { return find(k) != end(); } // Assumes the predicate is true for elements [0, x) and false for [x, count) where x is in [0, count] template treap_node_common* last_where(SpecKeyT const& k, Relation rel) { treap_node_common* prev = 0; if(!root) return &head; treap_node_common* el = root; while(true) { if(pred(*downcast(el), k)) { // Left and center satisfy the condition, we can skip left completely. // prev is the last known qualifying element. prev = el; if(!el->has_<1>()) return prev; el = el->child<1>(); } else { // Center and right doesn't satisfy, but left may if(!el->has_<0>()) return prev; el = el->child<0>(); } } } // Assumes the predicate is true for elements [x, count) and false for [0, x) where x is in [0, count] template treap_node_common* first_where(SpecKeyT const& k, Relation rel) { treap_node_common* prev = 0; if(!root) return &head; treap_node_common* el = root; while(true) { if(pred(*downcast(el), k)) { // Right and center satisfy the condition, we can skip right completely. // prev is the last known qualifying element. prev = el; if(!el->has_<0>()) return prev; el = el->child<0>(); } else { // Center and left doesn't satisfy, but right may if(!el->has_<1>()) return prev; el = el->child<1>(); } } } void integrity_check() { range r = all(); std::size_t count = 0; if(!r.empty()) { ++count; passert(root->extreme_in_subtree<0>() == head.ch[1], "Right of head should be the smallest element"); passert(root->extreme_in_subtree<1>() == head.ch[0], "Left of head should be the largest element"); T* prev = &r.front(); r.pop_front(); check_node(prev); for(; !r.empty(); r.pop_front()) { ++count; passert(Compare::operator()(*prev, r.front()), "Each element must be larger than the previous"); prev = &r.front(); check_node(prev); } } passert(size() == count, "Manual count does not correspond to cached count"); } std::size_t depth() const { if(!root) return 0; return depth_(root); } private: std::size_t depth_(treap_node_common* node) const { std::size_t depth = 0; if(node->has_<0>()) depth = std::max(depth, depth_(node->child<0>())); if(node->has_<1>()) depth = std::max(depth, depth_(node->child<1>())); return 1 + depth; } void check_node(T* n_) { treap_node_common* n = upcast(n_); if(n->parent) { passert(n->parent->priority <= n->priority, "Parent priority must be less or equal to it's children's"); } else { passert(n == root, "Only the root node can lack a parent"); } } template void unlink_nonroot_(treap_node_common* el, treap_node_common* parent) { treap_node_common** child_slot = &parent->child(); // Correct head children if necessary if(el == head.mchild()) // If we descended left, right of head could be an extreme and vice versa head.mchild() = el->move(); if(el->is_leaf()) { // If it's a leaf, the node on the side is the next one *child_slot = el->child(); passert(((parent->thread_flags >> Ch) & 1) != 0, "Parent must have the thread flag for this path set"); parent->thread_flags ^= 1< treap_node_common* find_(SpecKeyT const& k, treap_node_common* el) { if(!el) return 0; if(Compare::operator()(k, *downcast(el))) return find_(k, el->child<0>()); else if(Compare::operator()(*downcast(el), k)) return find_(k, el->child<1>()); else return el; } void delete_node_(treap_node_common* el) { if(el->has_<0>()) delete_node_(el->child<0>()); if(el->has_<1>()) delete_node_(el->child<1>()); Deleter::operator()(downcast(el)); } template static void rotate_with_( treap_node_common* n, treap_node_common* parent, treap_node_common*& child_slot) { treap_node_common* k1 = n->child(); n->parent = k1; // Copy the threading flag for k1->mchild() to n->child() /* int kmch = (k1->thread_flags & (2 >> Ch)); int mirrored_kmch = (Ch == 0) ? (kmch >> 1) : (kmch << 1); n->thread_flags = (n->thread_flags & (2 >> Ch)) | mirrored_kmch; */ passert(n->thread_flags & (1 << Ch), "n->child() flag must be set"); if(k1->thread_flags & (2 >> Ch)) { // n->child() flag already set (k1 is a child) n->child() = k1->mchild(); } else { n->thread_flags ^= (1 << Ch); // Clear n->child() flag n->child() = k1; // k1 is the new thread } k1->parent = parent; k1->mchild() = n; k1->thread_flags |= (2 >> Ch); // Set threading flag for k1->mchild() child_slot = k1; } template void insert_side_( treap_node_common* n, treap_node_common* el, treap_node_common* parent, treap_node_common*& child_slot, treap_node_common* prev_element, // The closest element smaller than all elements under the child treap_node_common* next_element) // The closest element smaller than all elements under the child { treap_node_common*& chr = n->child(); if(!n->has_()) { // If the previous or next element (depending on side) is the head, // the new element is a new extreme. if((Ch == 0 && prev_element == &head) || (Ch == 1 && next_element == &head)) head.mchild() = el; // New extreme node n->child() = el; n->thread_flags |= 1<parent = n; el->ch[0] = prev_element; el->ch[1] = next_element; ++this->n; } else { insert_under_(chr, el, n, chr, prev_element, next_element); } #if 1 // NOTE: insert_under_ may change n->child(), we must reread it here. if(chr->priority < n->priority) return rotate_with_(n, parent, child_slot); #endif } void insert_under_( treap_node_common* n, treap_node_common* el, treap_node_common* parent, treap_node_common*& child_slot, treap_node_common* prev_element, // The closest element smaller than all elements under n treap_node_common* next_element) // The closest element larger than all elements under n { sassert(n); if(Compare::operator()(*downcast(el), *downcast(n))) { insert_side_<0>(n, el, parent, child_slot, prev_element, n); } else if(Compare::operator()(*downcast(n), *downcast(el))) { insert_side_<1>(n, el, parent, child_slot, n, next_element); } else { // TODO: Equal to an existing element, throw or return something here? Deleter::operator()(downcast(el)); } } /* void insert_under2_( treap_node_common* n, treap_node_common* el, treap_node_common* parent, treap_node_common*& child_slot, treap_node_common* prev_element, // The closest element smaller than all elements under n treap_node_common* next_element) // The closest element larger than all elements under n { sassert(n); if(Compare::operator()(*downcast(el), *downcast(n))) { insert_side_<0>(n, el, parent, child_slot, prev_element, n); } else if(Compare::operator()(*downcast(n), *downcast(el))) { insert_side_<1>(n, el, parent, child_slot, n, next_element); } else { // TODO: Equal to an existing element, throw or return something here? Deleter::operator()(downcast(el)); } }*/ template void root_unlink_child_( treap_node_common* n, treap_node_common* parent, treap_node_common*& child_slot) { passert(!n->is_leaf(), "Assumed to be a non-leaf"); treap_node_common* new_parent = n->child(); rotate_with_(n, parent, child_slot); passert(!n->is_leaf(), "Rotation cannot turn a non-leaf into a leaf"); root_unlink_(n, new_parent, new_parent->mchild()); } void root_unlink_( treap_node_common* n, treap_node_common* parent, treap_node_common*& child_slot, int child_slot_mask) { assert(!n->is_leaf()); // Leafs should be handled before calling this function if(!n->has_<0>()) { // TODO: Need to correct the threading flags of child_slot if(parent) { passert((parent->thread_flags & child_slot_mask) != 0, "Thread flag for child_slot must be set"); int right_mask = -(n->thread_flags >> 1); // All 1 if right is a child, 0 otherwise // Mask child_slot thread flag if there is no child parent->thread_flags = parent->thread_flags & (right_mask & child_slot_mask); } child_slot = n->child<1>(); } else if(!n->has_<1>()) { // As the test above failed, we know that there's a child to the left, // we don't need to update the child_slot thread flag. child_slot = n->child<0>(); } else if(n->child<0>()->priority < n->child<1>()->priority) { root_unlink_child_<0>(n, parent, child_slot); } else { root_unlink_child_<1>(n, parent, child_slot); } } #if 0 // Only useful without parent pointers void unlink_( treap_node_common* n, treap_node_common* el, treap_node_common* parent, treap_node_common*& child_slot) { if(Compare::operator()(*downcast(el), *downcast(n))) { if(n->child<0>()) unlink_(n->child<0>(), el, n, n->child<0>()); } else if(Compare::operator()(*downcast(n), *downcast(el))) { if(n->child<1>()) unlink_(n->child<1>(), el, n, n->child<1>()); } else { root_unlink_(n, parent, child_slot); } } #endif void clean_() { n = 0; root = 0; head.ch[0] = &head; head.ch[1] = &head; } std::size_t n; treap_node_common* root; treap_node_common head; }; template struct treap_map_node : treap_node > { treap_map_node(KeyT const& first) : first(first) { } KeyT first; ValueT second; }; template struct treap_map_compare : Compare { bool operator()( treap_map_node const& a, treap_map_node const& b) const { return Compare::operator()(a.first, b.first); } bool operator()( KeyT const& a, treap_map_node const& b) const { return Compare::operator()(a, b.first); } bool operator()( treap_map_node const& a, KeyT const& b) const { return Compare::operator()(a.first, b); } }; template , typename Deleter = default_delete , typename Random = default_random> struct treap_map : treap< treap_map_node, treap_map_compare, Deleter, Random> { typedef treap< treap_map_node, treap_map_compare, Deleter, Random> base; typedef treap_map_node value_type; typedef typename base::iterator iterator; ValueT& operator[](KeyT const& k) { iterator el_ = this->find(k); if(el_ != this->end()) return el_->second; value_type* p = new value_type(k); this->insert(p); return p->second; } }; template struct treap_set_node : treap_node > { treap_set_node(KeyT const& first) : value(value) { } KeyT value; }; template struct treap_set_compare : Compare { bool operator()( treap_set_node const& a, treap_set_node const& b) const { return Compare::operator()(a.value, b.value); } bool operator()( KeyT const& a, treap_set_node const& b) const { return Compare::operator()(a, b.value); } bool operator()( treap_set_node const& a, KeyT const& b) const { return Compare::operator()(a.value, b); } }; template , typename Deleter = default_delete , typename Random = default_random> struct treap_set : treap< treap_set_node, treap_set_compare, Deleter, Random> { typedef treap< treap_set_node, treap_set_compare, Deleter, Random> base; typedef treap_set_node value_type; typedef typename base::iterator iterator; }; } // namespace gvl #endif // UUID_62728EE0B31F4930782885B97479EAC1 lierolibre-0.5/src/gvl/containers/treap2.hpp000066400000000000000000000507551205125547100211560ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_72728EE0B31F4930782885B97479EAC2 #define UUID_72728EE0B31F4930782885B97479EAC2 #include #include #include #include "../support/cstdint.hpp" #include "../support/functional.hpp" #include "../support/debug.hpp" //#include "../math/tt800.hpp" #include "../math/cmwc.hpp" #include "../system/system.hpp" #include #include namespace gvl { // NOTE: Not quite in working condition right now struct treap_node_common2 { static int const left_bit = 1; static int const right_bit = 2; treap_node_common2* ch[2]; treap_node_common2* parent; //int isnil; #if 1 std::size_t priority_; std::size_t priority() const { return priority_; } #else std::size_t priority() const { std::size_t x = (std::size_t)this; x ^= x >> 7; x += 2654435761; x ^= x >> 17; return x; } #endif template treap_node_common2*& child() { return ch[Ch]; } template treap_node_common2*& mchild() { return ch[Ch^1]; } template bool has_() const { return !ch[Ch]->is_nil(); } bool is_nil() const { return parent == this; // Only head has itself as parent } template // Ch == 0 => left, Ch == 1 => right treap_node_common2* move() { treap_node_common2* next_ch = ch[Ch]; if(!next_ch->is_nil()) return next_ch->extreme_in_subtree(); treap_node_common2* lparent = parent; treap_node_common2* child = this; while(!lparent->is_nil() && lparent->ch[Ch] == child) { // Went up this path child = lparent; lparent = child->parent; } return lparent; } template // Ch == 0 => left, Ch == 1 => right treap_node_common2* extreme_in_subtree() { treap_node_common2* n = this; while(true) { treap_node_common2* child = n->ch[Ch]; if(child->is_nil()) return n; n = child; } } bool is_leaf() const { return !has_<0>() && !has_<1>(); } }; struct default_treap_tag2 { }; template struct treap_node2 : treap_node_common2 { }; struct default_random2 { default_random2() : r(1) // TEMP r(get_ticks()) { } std::size_t operator()() { return r(); } //tt800 r; // TODO: A smaller PRNG? mwc r; }; template , typename Deleter = default_delete , typename Random = default_random2> struct treap2 : Compare, Random, Deleter { typedef T value_type; static T* downcast(treap_node_common2* p) { return static_cast(static_cast*>(p)); } static treap_node2* upcast(T* p) { return static_cast*>(p); } struct range { template friend struct treap2; bool empty() const { return front_ == back_prev_; } T& front() { return *downcast(front_); } T& back() { return *downcast(back_); } void pop_front() { front_ = front_->move<1>(); } void pop_back() { back_prev_ = back_; back_ = back_->move<0>(); } private: range(treap_node_common2* front_init, treap_node_common2* back_init) : front_(front_init) , back_(back_init) , back_prev_(back_->move<1>()) { } range(treap_node_common2* front_init, treap_node_common2* back_init, treap_node_common2* back_prev_init) : front_(front_init) , back_(back_init) , back_prev_(back_prev_init) { } treap_node_common2* front_; treap_node_common2* back_; treap_node_common2* back_prev_; }; #if 0 struct iterator { friend struct treap2; typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef T* pointer; typedef T& reference; typedef T value_type; iterator() : ptr_(0) {} /* explicit iterator(treap_node_common2* ptr) : ptr_(ptr) {} */ explicit iterator(T* ptr) : ptr_(upcast(ptr)) {} T& operator*() { return *downcast(ptr_); } T* operator->() { return downcast(ptr_); } iterator& operator++() { ptr_ = ptr_->move<1>(); return *this; } iterator& operator--() { ptr_ = ptr_->move<0>(); return *this; } iterator next() const { return iterator(ptr_->move<1>()); } iterator prev() const { return iterator(ptr_->move<0>()); } bool operator==(iterator const& b) { return b.ptr_ == ptr_; } bool operator!=(iterator const& b) { return b.ptr_ != ptr_; } private: treap_node_common2* ptr_; }; #endif treap2() : n(0) , head(new treap_node_common2) { head->ch[0] = head; head->ch[1] = head; head->parent = head; //head->isnil = true; head->priority_ = 0; // Head always has lower (or equal) priority to all others rotations = 0; } ~treap2() { clear(); delete head; } treap_node_common2*& root() { return head->ch[0]; } bool empty() const { return n == 0; } std::size_t size() const { return n; } void clear() { if(root() != head) delete_node_(root()); clean_(); } /* iterator begin() { sassert(root); return root->extreme_in_subtree<0>(); } iterator end() { return iterator(0); }*/ range all() { return range(head->extreme_in_subtree<0>(), head->extreme_in_subtree<1>(), head); } void swap(treap2& b) { std::swap(n, b.n); std::swap(head, b.head); } void insert(T* el_) { treap_node_common2* el = upcast(el_); std::size_t el_priority = Random::operator()(); el->priority_ = el_priority; el->ch[0] = head; el->ch[1] = head; treap_node_common2* parent = head; treap_node_common2** child_slot = &parent->ch[0]; while(true) { treap_node_common2* child = *child_slot; if(child == head) { *child_slot = el; el->parent = parent; ++n; break; } if(Compare::operator()(*downcast(el), *downcast(child))) { child_slot = &child->ch[0]; } else if(Compare::operator()(*downcast(child), *downcast(el))) { child_slot = &child->ch[1]; } else { // TODO: Equal to an existing element, throw or return something here? Deleter::operator()(downcast(el)); return; } parent = child; } // Fix up heap property //treap_node_common2* lhead = head; if(el_priority < parent->priority()) { do { ++rotations; treap_node_common2* parent_parent = parent->parent; // If parent_parent is head, ch[0] will be picked treap_node_common2** parent_child_slot; if(parent_parent->ch[0] == parent) { parent_child_slot = &parent_parent->ch[0]; } else { parent_child_slot = &parent_parent->ch[1]; } if(child_slot == &parent->ch[0]) rotate_with_<0>(parent, parent_parent, *parent_child_slot); else rotate_with_<1>(parent, parent_parent, *parent_child_slot); parent = parent_parent; child_slot = parent_child_slot; } while(el_priority < parent->priority()); } head->ch[1] = root(); // Synchronize right branch in case it changed } void unlink(T* el_) { treap_node_common2* el = upcast(el_); treap_node_common2* parent = el->parent; if(parent->ch[0] == el) { // If parent is head, this branch will be taken. We correct // ch[1] because ch[0] was passed. root_unlink_(el, parent, &parent->ch[0]); head->ch[1] = root(); // Synchronize right branch in case it changed } else root_unlink_(el, parent, &parent->ch[1]); --n; } T* unlink_front(range& r) { sassert(!r.empty()); T* front = &r.front(); r.pop_front(); unlink(front); return front; } T* unlink_back(range& r) { sassert(!r.empty()); T* back = &r.front(); // We don't want to call pop_back() as it would set back_prev_ to the unlinked element. // back_prev_ remains correct. r.back_ = r.back_->template move<0>(); unlink(back); return back; } /* void erase(iterator i) { T* el_ = downcast(i.ptr_); unlink(el_); Deleter::operator()(el_); }*/ void erase_front(range& r) { Deleter::operator()(unlink_front(r)); } void erase_back(range& r) { Deleter::operator()(unlink_back(r)); } template range find(SpecKeyT const& k) { return range(downcast(find_(k, root())), head/*head->extreme_in_subtree<1>()*/, head); } template bool test(SpecKeyT const& k) { return !find(k).empty(); } // Assumes the predicate is true for elements [0, x) and false for [x, count) where x is in [0, count] template treap_node_common2* last_where(SpecKeyT const& k, Relation rel) { treap_node_common2* prev = 0; if(empty()) return head; treap_node_common2* el = root(); while(true) { if(pred(*downcast(el), k)) { // Left and center satisfy the condition, we can skip left completely. // prev is the last known qualifying element. prev = el; el = el->child<1>(); if(el == head) return prev; } else { // Center and right doesn't satisfy, but left may el = el->child<0>(); if(el == head) return prev; } } } // Assumes the predicate is true for elements [x, count) and false for [0, x) where x is in [0, count] template treap_node_common2* first_where(SpecKeyT const& k, Relation rel) { treap_node_common2* prev = 0; if(empty()) return head; treap_node_common2* el = root(); while(true) { if(pred(*downcast(el), k)) { // Right and center satisfy the condition, we can skip right completely. // prev is the last known qualifying element. prev = el; el = el->child<0>(); if(el == head) return prev; } else { // Center and left doesn't satisfy, but right may el = el->child<1>(); if(el == head) return prev; } } } void integrity_check() { range r = all(); std::size_t count = 0; if(!r.empty()) { ++count; T* prev = &r.front(); r.pop_front(); check_node(prev); for(; !r.empty(); r.pop_front()) { ++count; passert(Compare::operator()(*prev, r.front()), "Each element must be larger than the previous"); prev = &r.front(); check_node(prev); } } passert(size() == count, "Manual count does not correspond to cached count"); } std::size_t depth() const { if(empty()) return 0; return depth_(head->ch[0]); } double average_depth() const { if(empty()) return 0.0; return total_depth_(head->ch[0], 1.0) / size(); } int64_t rotations; private: void split_at_(treap_node_common2* tree, treap_node_common2* el) { treap_node_common2* arrow = el; int arrow_dir; treap_node_common2* split = tree; int split_dir; if(Compare::operator()(*downcast(el), *downcast(tree))) { el->ch[1] = tree; tree->parent = el; arrow_dir = 0; split_dir = 0; } else if(Compare::operator()(*downcast(tree), *downcast(el))) { el->ch[0] = tree; tree->parent = el; arrow_dir = 1; split_dir = 1; } else { // TODO: Equal to an existing element, throw or return something here? Deleter::operator()(downcast(el)); return; } while(true) { treap_node_common2* split_node = split->ch[split_dir]; if(split_node == head) { arrow->ch[arrow_dir] = head; // Close off arrow return; } if(Compare::operator()(*downcast(el), *downcast(split_node))) { if(split_dir == 0) { // We don't need to split, test next split = split->ch[split_dir]; } else { // Need to split arrow->ch[arrow_dir] = split_node; split->parent = arrow; arrow = split; split = split_node; split_dir ^= 1; arrow_dir ^= 1; } } else if(Compare::operator()(*downcast(split_node), *downcast(el))) { if(split_dir == 1) { // We don't need to split, test next split = split->ch[split_dir]; } else { // Need to split arrow->ch[arrow_dir] = split_node; split->parent = arrow; arrow = split; split = split_node; split_dir ^= 1; arrow_dir ^= 1; } } else { // Problem! We'd have to rotate up this node to join the two created trees. // If we could replace the old node, we would delete it and continue inserting the new // one. // TODO: Equal to an existing element, throw or return something here? Deleter::operator()(downcast(el)); return; } } } std::size_t depth_(treap_node_common2 const* node) const { std::size_t depth = 0; if(node->has_<0>()) depth = std::max(depth, depth_(node->ch[0])); if(node->has_<1>()) depth = std::max(depth, depth_(node->ch[1])); return 1 + depth; } double total_depth_(treap_node_common2 const* node, double depth) const { double depth_sum = depth; if(node->has_<0>()) depth_sum += total_depth_(node->ch[0], depth + 1.0); if(node->has_<1>()) depth_sum += total_depth_(node->ch[1], depth + 1.0); return depth_sum; } void check_node(T* n_) { treap_node_common2* n = upcast(n_); if(n->parent != head) { passert(n->parent->priority() <= n->priority(), "Parent priority must be less or equal to it's children's"); } else { passert(n == root(), "Only the root node can have the head as parent"); passert(n == head->ch[1], "Both head branches must point to the root"); } } template treap_node_common2* find_(SpecKeyT const& k, treap_node_common2* el) { while(el != head) { if(Compare::operator()(k, *downcast(el))) el = el->child<0>(); else if(Compare::operator()(*downcast(el), k)) el = el->child<1>(); else return el; } return el; } void delete_node_(treap_node_common2* el) { if(el->has_<0>()) delete_node_(el->child<0>()); if(el->has_<1>()) delete_node_(el->child<1>()); Deleter::operator()(downcast(el)); } template void rotate_with_( treap_node_common2* n, treap_node_common2* parent, treap_node_common2*& child_slot) { treap_node_common2*& nchr = n->child(); treap_node_common2* k1 = nchr; treap_node_common2*& kmchr = k1->mchild(); treap_node_common2* kmch = kmchr; // k1 <-> n connection n->parent = k1; kmchr = n; // n <-> prev k1 child connection nchr = kmch; if(kmch != head) // kmch could be head, and we don't want to mess up parent of head (must be itself) kmch->parent = n; // k1 <-> parent connection k1->parent = parent; child_slot = k1; } #if 0 template void root_unlink_child_( treap_node_common2* n, treap_node_common2* parent, treap_node_common2*& child_slot) { passert(!n->is_leaf(), "Assumed to be a non-leaf"); treap_node_common2* new_parent = n->child(); rotate_with_(n, parent, child_slot); passert(!n->is_leaf(), "Rotation cannot turn a non-leaf into a leaf"); root_unlink_(n, new_parent, new_parent->mchild()); } #endif void root_unlink_(treap_node_common2* n, treap_node_common2* parent, treap_node_common2** child_slot) { treap_node_common2* lhead = head; while(true) { treap_node_common2* ch0 = n->ch[0]; treap_node_common2* ch1 = n->ch[1]; if(ch0 == lhead) { *child_slot = ch1; if(ch1 != lhead) // Do not disturb parent of head ch1->parent = parent; return; } else if(ch1 == lhead) { *child_slot = ch0; ch0->parent = parent; // We know ch0 is not head here return; } else if(ch0->priority() <= ch1->priority()) { treap_node_common2* new_parent = ch0; rotate_with_<0>(n, parent, *child_slot); parent = new_parent; child_slot = &new_parent->ch[1]; } else { treap_node_common2* new_parent = ch1; rotate_with_<1>(n, parent, *child_slot); parent = new_parent; child_slot = &new_parent->ch[0]; } } } #if 0 void root_unlink_( treap_node_common2* n, treap_node_common2* parent, treap_node_common2*& child_slot, int child_slot_mask) { assert(!n->is_leaf()); // Leafs should be handled before calling this function if(n->child<0>() == head) { child_slot = n->child<1>(); } else if(n->child<1>() == head) { child_slot = n->child<0>(); } else if(n->child<0>()->priority < n->child<1>()->priority) { root_unlink_child_<0>(n, parent, child_slot); } else { root_unlink_child_<1>(n, parent, child_slot); } } #endif #if 0 // Only useful without parent pointers void unlink_( treap_node_common2* n, treap_node_common2* el, treap_node_common2* parent, treap_node_common2*& child_slot) { if(Compare::operator()(*downcast(el), *downcast(n))) { if(n->child<0>()) unlink_(n->child<0>(), el, n, n->child<0>()); } else if(Compare::operator()(*downcast(n), *downcast(el))) { if(n->child<1>()) unlink_(n->child<1>(), el, n, n->child<1>()); } else { root_unlink_(n, parent, child_slot); } } #endif void clean_() { n = 0; head->ch[0] = head; head->ch[1] = head; sassert(head->parent == head); } std::size_t n; treap_node_common2* head; }; template struct treap_map_node2 : treap_node2 > { treap_map_node2(KeyT const& first) : first(first) { } KeyT first; ValueT second; }; template struct treap_map_compare2 : Compare { bool operator()( treap_map_node2 const& a, treap_map_node2 const& b) const { return Compare::operator()(a.first, b.first); } bool operator()( KeyT const& a, treap_map_node2 const& b) const { return Compare::operator()(a, b.first); } bool operator()( treap_map_node2 const& a, KeyT const& b) const { return Compare::operator()(a.first, b); } }; template , typename Deleter = default_delete , typename Random = default_random2> struct treap_map2 : treap2< treap_map_node2, treap_map_compare2, Deleter, Random> { typedef treap2< treap_map_node2, treap_map_compare2, Deleter, Random> base; typedef treap_map_node2 value_type; typedef typename base::iterator iterator; ValueT& operator[](KeyT const& k) { iterator el_ = this->find(k); if(el_ != this->end()) return el_->second; value_type* p = new value_type(k); this->insert(p); return p->second; } }; template struct treap_set_node2 : treap_node2 > { treap_set_node2(KeyT const& first) : value(value) { } KeyT value; }; template struct treap_set_compare2 : Compare { bool operator()( treap_set_node2 const& a, treap_set_node2 const& b) const { return Compare::operator()(a.value, b.value); } bool operator()( KeyT const& a, treap_set_node2 const& b) const { return Compare::operator()(a, b.value); } bool operator()( treap_set_node2 const& a, KeyT const& b) const { return Compare::operator()(a.value, b); } }; template , typename Deleter = default_delete , typename Random = default_random2> struct treap_set2 : treap2< treap_set_node2, treap_set_compare2, Deleter, Random> { typedef treap2< treap_set_node2, treap_set_compare2, Deleter, Random> base; typedef treap_set_node2 value_type; typedef typename base::iterator iterator; }; } // namespace gvl #endif // UUID_72728EE0B31F4930782885B97479EAC2 lierolibre-0.5/src/gvl/containers/xlist.hpp000066400000000000000000000074631205125547100211220ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_A426FCF03B0B485CD32991BFACDF17CD #define UUID_A426FCF03B0B485CD32991BFACDF17CD #include #include "../support/functional.hpp" namespace gvl { struct default_xlist_tag {}; struct xlist_node_common { xlist_node_common* mirror(xlist_node_common* other) { return reinterpret_cast(std::ptrdiff_t(other) ^ prevnext); } std::ptrdiff_t prevnext; }; template struct xlist_node : xlist_node_common { template static T* downcast(xlist_node* p) { return static_cast(static_cast*>(p)); } xlist_node() { prevnext = 0; } template static xlist_node* upcast(T* p) { return static_cast*>(p); } }; struct xlist_common { xlist_node_common* first; xlist_node_common* last; }; template< typename T, typename Tag = default_xlist_tag, typename Deleter = default_delete> struct xlist : xlist_common, protected Deleter { template static T* downcast(xlist_node* p) { return static_cast(static_cast*>(p)); } template static xlist_node* upcast(T* p) { return static_cast*>(p); } struct range { }; void push_back(T* x_) { #if 0 xlist_node_common* x = upcast(x_); if(last) { last->prevnext ^= reinterpret_cast(x) ^ 0; x->prevnext = reinterpret_cast(last) ^ 0; } else { x->prevnext = 0 ^ 0; first = x; } last = x; #else xlist_node_common* x = upcast(x_); last->prevnext ^= reinterpret_cast(x) ^ 0; x->prevnext = reinterpret_cast(last) ^ 0; last = x; // We start with: // xlist_node_common sentinel; // xlist_node_common* last = &sentinel; // sentinel.prevnext = &sentinel ^ &sentinel == 0 // last node == last // first node == last ^ sentinel.prevnext // Push back a node (n): // last.prevnext ^= &sentinel ^ n // sentinel.prevnext ^= last ^ n // last is no longer prev, but n is // n.prevnext = last ^ &sentinel // last = n // Result: // sentinel.prevnext = sentinel.prevnext ^ &sentinel ^ n = (&sentinel ^ &sentinel) ^ &sentinel ^ n = &sentinel ^ n // sentinel.prevnext = (&sentinel ^ n) ^ (last ^ n) = (&sentinel ^ n) ^ (&sentinel ^ n) = 0 // last node == last == n // first node == last ^ 0 == n #endif } }; } // namespace gvl #endif // UUID_A426FCF03B0B485CD32991BFACDF17CD lierolibre-0.5/src/gvl/crypt/000077500000000000000000000000001205125547100162305ustar00rootroot00000000000000lierolibre-0.5/src/gvl/crypt/curve25519.cpp000066400000000000000000000706551205125547100205030ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "curve25519.hpp" namespace gvl { namespace { void core(uint8_t const* Px, uint8_t* s, uint8_t const* k, uint8_t const* Gx); int mula_small(uint8_t* p, uint8_t* q, int m, uint8_t* x, int n, int z); int mula32(uint8_t* p, uint8_t* x, uint8_t* y, int t, int z); void divmod(uint8_t* q, uint8_t* r, int n, uint8_t const* d, int t); void x_to_y2(int10& t, int10& y2, int10& x); void sqrt(int10& x, int10& u); int is_negative(int10 const& x); const int KEY_SIZE = 32; /* 0 */ uint8_t const ZERO[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* the prime 2^255-19 */ uint8_t const PRIME[] = { 237, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 127 }; /* group order (a prime near 2^252+2^124) */ uint8_t const ORDER[] = { 237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 }; /* smallest multiple of the order that's >= 2^255 */ uint8_t const ORDER_TIMES_8[] = { 104, 159, 174, 231, 210, 24, 147, 192, 178, 230, 188, 23, 245, 206, 247, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }; /* constants 2Gy and 1/(2Gy) */ int10 BASE_2Y = {{ 39999547, 18689728, 59995525, 1648697, 57546132, 24010086, 19059592, 5425144, 63499247, 16420658 }}; int10 BASE_R2Y = {{ 5744, 8160848, 4790893, 13779497, 35730846, 12541209, 49101323, 30047407, 40071253, 6226132 }}; int64_t const P25 = 33554431; /* (1 << 25) - 1 */ int64_t const P26 = 67108863; /* (1 << 26) - 1 */ void unpack(int10& x, uint8_t const* m) { x[0] = ((m[0] & 0xFF)) | ((m[1] & 0xFF))<<8 | (m[2] & 0xFF)<<16 | ((m[3] & 0xFF)& 3)<<24; x[1] = ((m[3] & 0xFF)&~ 3)>>2 | (m[4] & 0xFF)<<6 | (m[5] & 0xFF)<<14 | ((m[6] & 0xFF)& 7)<<22; x[2] = ((m[6] & 0xFF)&~ 7)>>3 | (m[7] & 0xFF)<<5 | (m[8] & 0xFF)<<13 | ((m[9] & 0xFF)&31)<<21; x[3] = ((m[9] & 0xFF)&~31)>>5 | (m[10] & 0xFF)<<3 | (m[11] & 0xFF)<<11 | ((m[12] & 0xFF)&63)<<19; x[4] = ((m[12] & 0xFF)&~63)>>6 | (m[13] & 0xFF)<<2 | (m[14] & 0xFF)<<10 | (m[15] & 0xFF) <<18; x[5] = (m[16] & 0xFF) | (m[17] & 0xFF)<<8 | (m[18] & 0xFF)<<16 | ((m[19] & 0xFF)& 1)<<24; x[6] = ((m[19] & 0xFF)&~ 1)>>1 | (m[20] & 0xFF)<<7 | (m[21] & 0xFF)<<15 | ((m[22] & 0xFF)& 7)<<23; x[7] = ((m[22] & 0xFF)&~ 7)>>3 | (m[23] & 0xFF)<<5 | (m[24] & 0xFF)<<13 | ((m[25] & 0xFF)&15)<<21; x[8] = ((m[25] & 0xFF)&~15)>>4 | (m[26] & 0xFF)<<4 | (m[27] & 0xFF)<<12 | ((m[28] & 0xFF)&63)<<20; x[9] = ((m[28] & 0xFF)&~63)>>6 | (m[29] & 0xFF)<<2 | (m[30] & 0xFF)<<10 | (m[31] & 0xFF) <<18; } /* Check if reduced-form input >= 2^255-19 */ bool is_overflow(int10 const& x) { return ( ((x[0] > P26-19)) && ((x[1] & x[3] & x[5] & x[7] & x[9]) == P25) && ((x[2] & x[4] & x[6] & x[8]) == P26) ) || (x[9] > P25); } /* Convert from internal format to little-endian uint8_t format. The * number must be in a reduced form which is output by the following ops: * unpack, mul, sqr * set -- if input in range 0 .. P25 * If you're unsure if the number is reduced, first multiply it by 1. */ void pack(int10& x, uint8_t* m) { int ld = 0, ud = 0; int64_t t; ld = (is_overflow(x)?1:0) - ((x[9] < 0)?1:0); ud = ld * -(P25+1); ld *= 19; t = ld + x[0] + (x[1] << 26); m[ 0] = (uint8_t)t; m[ 1] = (uint8_t)(t >> 8); m[ 2] = (uint8_t)(t >> 16); m[ 3] = (uint8_t)(t >> 24); t = (t >> 32) + (x[2] << 19); m[ 4] = (uint8_t)t; m[ 5] = (uint8_t)(t >> 8); m[ 6] = (uint8_t)(t >> 16); m[ 7] = (uint8_t)(t >> 24); t = (t >> 32) + (x[3] << 13); m[ 8] = (uint8_t)t; m[ 9] = (uint8_t)(t >> 8); m[10] = (uint8_t)(t >> 16); m[11] = (uint8_t)(t >> 24); t = (t >> 32) + (x[4] << 6); m[12] = (uint8_t)t; m[13] = (uint8_t)(t >> 8); m[14] = (uint8_t)(t >> 16); m[15] = (uint8_t)(t >> 24); t = (t >> 32) + x[5] + (x[6] << 25); m[16] = (uint8_t)t; m[17] = (uint8_t)(t >> 8); m[18] = (uint8_t)(t >> 16); m[19] = (uint8_t)(t >> 24); t = (t >> 32) + (x[7] << 19); m[20] = (uint8_t)t; m[21] = (uint8_t)(t >> 8); m[22] = (uint8_t)(t >> 16); m[23] = (uint8_t)(t >> 24); t = (t >> 32) + (x[8] << 12); m[24] = (uint8_t)t; m[25] = (uint8_t)(t >> 8); m[26] = (uint8_t)(t >> 16); m[27] = (uint8_t)(t >> 24); t = (t >> 32) + ((x[9] + ud) << 6); m[28] = (uint8_t)t; m[29] = (uint8_t)(t >> 8); m[30] = (uint8_t)(t >> 16); m[31] = (uint8_t)(t >> 24); } void set(int10& o, int i) { o[0]=i; o[1]=0; o[2]=0; o[3]=0; o[4]=0; o[5]=0; o[6]=0; o[7]=0; o[8]=0; o[9]=0; } void add(int10& xy, int10& x, int10& y) { xy[0] = x[0] + y[0]; xy[1] = x[1] + y[1]; xy[2] = x[2] + y[2]; xy[3] = x[3] + y[3]; xy[4] = x[4] + y[4]; xy[5] = x[5] + y[5]; xy[6] = x[6] + y[6]; xy[7] = x[7] + y[7]; xy[8] = x[8] + y[8]; xy[9] = x[9] + y[9]; } void sub(int10& xy, int10& x, int10& y) { xy[0] = x[0] - y[0]; xy[1] = x[1] - y[1]; xy[2] = x[2] - y[2]; xy[3] = x[3] - y[3]; xy[4] = x[4] - y[4]; xy[5] = x[5] - y[5]; xy[6] = x[6] - y[6]; xy[7] = x[7] - y[7]; xy[8] = x[8] - y[8]; xy[9] = x[9] - y[9]; } inline int64_t mul32_to64(int32_t a, int32_t b) { /* #ifdef _MSC_VER return __emul(a, b); #else*/ return a * (int64_t)(b); /*#endif*/ } /********************* radix 2^8 math *********************/ void cpy32(uint8_t* d, uint8_t const* s) { for (int i = 0; i < 32; i++) d[i] = s[i]; } /* p[m..n+m-1] = q[m..n+m-1] + z * x */ /* n is the size of x */ /* n+m is the size of p and q */ int mula_small(uint8_t* p, uint8_t const* q, int m, uint8_t const* x, int n, int z) { int v=0; for (int i=0;i>=8; } return v; } /* p += x * y * z where z is a small integer * x is size 32, y is size t, p is size 32+t * y is allowed to overlap with p+32 if you don't care about the upper half */ int mula32(uint8_t* p, uint8_t const* x, uint8_t const* y, int t, int z) { int n = 31; int w = 0; int i = 0; for (; i < t; i++) { int zy = z * (y[i] & 0xFF); w += mula_small(p, p, i, x, n, zy) + (p[i+n] & 0xFF) + zy * (x[n] & 0xFF); p[i+n] = (uint8_t)w; w >>= 8; } p[i+n] = (uint8_t)(w + (p[i+n] & 0xFF)); return w >> 8; } /* divide r (size n) by d (size t), returning quotient q and remainder r * quotient is size n-t+1, remainder is size t * requires t > 0 && d[t-1] != 0 * requires that r[-1] and d[-1] are valid memory locations * q may overlap with r+t */ void divmod(uint8_t* q, uint8_t* r, int n, uint8_t const* d, int t) { int rn = 0; int dt = ((d[t-1] & 0xFF) << 8); if (t>1) { dt |= (d[t-2] & 0xFF); } while (n-- >= t) { int z = (rn << 16) | ((r[n] & 0xFF) << 8); if (n>0) { z |= (r[n-1] & 0xFF); } z/=dt; rn += mula_small(r,r, n-t+1, d, t, -z); q[n-t+1] = (uint8_t)((z + rn) & 0xFF); /* rn is 0 or -1 (underflow) */ mula_small(r,r, n-t+1, d, t, -rn); rn = (r[n] & 0xFF); r[n] = 0; } r[t-1] = (uint8_t)rn; } int numsize(uint8_t* x,int n) { while (n--!=0 && x[n]==0) ; return n+1; } /* Returns x if a contains the gcd, y if b. * Also, the returned buffer contains the inverse of a mod b, * as 32-uint8_t signed. * x and y must have 64 bytes space for temporary use. * requires that a[-1] and b[-1] are valid memory locations */ uint8_t* egcd32(uint8_t* x, uint8_t* y, uint8_t* a, uint8_t* b) { int an, bn = 32, qn, i; for (i = 0; i < 32; i++) x[i] = y[i] = 0; x[0] = 1; an = numsize(a, 32); if (an==0) return y; /* division by zero */ uint8_t* temp=new uint8_t[32]; while (true) { qn = bn - an + 1; divmod(temp, b, bn, a, an); bn = numsize(b, bn); if (bn==0) return x; mula32(y, x, temp, qn, -1); qn = an - bn + 1; divmod(temp, a, an, b, bn); an = numsize(a, an); if (an==0) return y; mula32(x, y, temp, qn, -1); } delete[] temp; } /* Multiply a number by a small integer i range -185861411 .. 185861411. * The output is i reduced form, the input x need not be. x and xy may point * to the same buffer. */ void mul_small(int10& xy, int10& x, int32_t y) { int64_t t; t = mul32_to64(x[8],y); xy[8] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x[9],y); xy[9] = (t & ((1 << 25) - 1)); t = 19 * (t >> 25) + mul32_to64(x[0],y); xy[0] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x[1],y); xy[1] = (t & ((1 << 25) - 1)); t = (t >> 25) + mul32_to64(x[2],y); xy[2] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x[3],y); xy[3] = (t & ((1 << 25) - 1)); t = (t >> 25) + mul32_to64(x[4],y); xy[4] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x[5],y); xy[5] = (t & ((1 << 25) - 1)); t = (t >> 25) + mul32_to64(x[6],y); xy[6] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x[7],y); xy[7] = (t & ((1 << 25) - 1)); t = (t >> 25) + xy[8]; xy[8] = (t & ((1 << 26) - 1)); xy[9] += int32_t(t >> 26); } void mul(int10& dest, int10& x, int10& y) { int32_t x_0=x[0],x_1=x[1],x_2=x[2],x_3=x[3],x_4=x[4], x_5=x[5],x_6=x[6],x_7=x[7],x_8=x[8],x_9=x[9]; int32_t y_0=y[0],y_1=y[1],y_2=y[2],y_3=y[3],y_4=y[4], y_5=y[5],y_6=y[6],y_7=y[7],y_8=y[8],y_9=y[9]; int64_t t; t = mul32_to64(x_0, y_8) + mul32_to64(x_2, y_6) + mul32_to64(x_4, y_4) + mul32_to64(x_6, y_2) + mul32_to64(x_8, y_0) + 2 * (mul32_to64(x_1, y_7) + mul32_to64(x_3, y_5) + mul32_to64(x_5, y_3) + mul32_to64(x_7, y_1)) + 38 * mul32_to64(x_9, y_9); dest[8] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x_0, y_9) + mul32_to64(x_1, y_8) + mul32_to64(x_2, y_7) + mul32_to64(x_3, y_6) + mul32_to64(x_4, y_5) + mul32_to64(x_5, y_4) + mul32_to64(x_6, y_3) + mul32_to64(x_7, y_2) + mul32_to64(x_8, y_1) + mul32_to64(x_9, y_0); dest[9] = (t & ((1 << 25) - 1)); t = mul32_to64(x_0, y_0) + 19 * ((t >> 25) + mul32_to64(x_2, y_8) + mul32_to64(x_4, y_6) + mul32_to64(x_6, y_4) + mul32_to64(x_8, y_2)) + 38 * (mul32_to64(x_1, y_9) + mul32_to64(x_3, y_7) + mul32_to64(x_5, y_5) + mul32_to64(x_7, y_3) + mul32_to64(x_9, y_1)); dest[0] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x_0, y_1) + mul32_to64(x_1, y_0) + 19 * (mul32_to64(x_2, y_9) + mul32_to64(x_3, y_8) + mul32_to64(x_4, y_7) + mul32_to64(x_5, y_6) + mul32_to64(x_6, y_5) + mul32_to64(x_7, y_4) + mul32_to64(x_8, y_3) + mul32_to64(x_9, y_2)); dest[1] = (t & ((1 << 25) - 1)); t = (t >> 25) + mul32_to64(x_0, y_2) + mul32_to64(x_2, y_0) + 19 * (mul32_to64(x_4, y_8) + mul32_to64(x_6, y_6) + mul32_to64(x_8, y_4)) + 2 * mul32_to64(x_1, y_1) + 38 * (mul32_to64(x_3, y_9) + mul32_to64(x_5, y_7) + mul32_to64(x_7, y_5) + mul32_to64(x_9, y_3)); dest[2] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x_0, y_3) + mul32_to64(x_1, y_2) + mul32_to64(x_2, y_1) + mul32_to64(x_3, y_0) + 19 * (mul32_to64(x_4, y_9) + mul32_to64(x_5, y_8) + mul32_to64(x_6, y_7) + mul32_to64(x_7, y_6) + mul32_to64(x_8, y_5) + mul32_to64(x_9, y_4)); dest[3] = (t & ((1 << 25) - 1)); t = (t >> 25) + mul32_to64(x_0, y_4) + mul32_to64(x_2, y_2) + mul32_to64(x_4, y_0) + 19 * (mul32_to64(x_6, y_8) + mul32_to64(x_8, y_6)) + 2 * (mul32_to64(x_1, y_3) + mul32_to64(x_3, y_1)) + 38 * (mul32_to64(x_5, y_9) + mul32_to64(x_7, y_7) + mul32_to64(x_9, y_5)); dest[4] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x_0, y_5) + mul32_to64(x_1, y_4) + mul32_to64(x_2, y_3) + mul32_to64(x_3, y_2) + mul32_to64(x_4, y_1) + mul32_to64(x_5, y_0) + 19 * (mul32_to64(x_6, y_9) + mul32_to64(x_7, y_8) + mul32_to64(x_8, y_7) + mul32_to64(x_9, y_6)); dest[5] = (t & ((1 << 25) - 1)); t = (t >> 25) + mul32_to64(x_0, y_6) + mul32_to64(x_2, y_4) + mul32_to64(x_4, y_2) + mul32_to64(x_6, y_0) + 19 * mul32_to64(x_8, y_8) + 2 * (mul32_to64(x_1, y_5) + mul32_to64(x_3, y_3) + mul32_to64(x_5, y_1)) + 38 * (mul32_to64(x_7, y_9) + mul32_to64(x_9, y_7)); dest[6] = (t & ((1 << 26) - 1)); t = (t >> 26) + mul32_to64(x_0, y_7) + mul32_to64(x_1, y_6) + mul32_to64(x_2, y_5) + mul32_to64(x_3, y_4) + mul32_to64(x_4, y_3) + mul32_to64(x_5, y_2) + mul32_to64(x_6, y_1) + mul32_to64(x_7, y_0) + 19 * (mul32_to64(x_8, y_9) + mul32_to64(x_9, y_8)); dest[7] = (t & ((1 << 25) - 1)); t = (t >> 25) + dest[8]; dest[8] = (t & ((1 << 26) - 1)); dest[9] += int32_t(t >> 26); } void sqr(int10& y, int10& x) { int32_t x_0=x[0],x_1=x[1],x_2=x[2],x_3=x[3],x_4=x[4], x_5=x[5],x_6=x[6],x_7=x[7],x_8=x[8],x_9=x[9]; int64_t t; t = mul32_to64(x_4, x_4) + 2 * (mul32_to64(x_0, x_8) + mul32_to64(x_2, x_6)) + 38 * mul32_to64(x_9, x_9) + 4 * (mul32_to64(x_1, x_7) + mul32_to64(x_3, x_5)); y[8] = (t & ((1 << 26) - 1)); t = (t >> 26) + 2 * (mul32_to64(x_0, x_9) + mul32_to64(x_1, x_8) + mul32_to64(x_2, x_7) + mul32_to64(x_3, x_6) + mul32_to64(x_4, x_5)); y[9] = (t & ((1 << 25) - 1)); t = 19 * (t >> 25) + mul32_to64(x_0, x_0) + 38 * (mul32_to64(x_2, x_8) + mul32_to64(x_4, x_6) + mul32_to64(x_5, x_5)) + 76 * (mul32_to64(x_1, x_9) + mul32_to64(x_3, x_7)); y[0] = (t & ((1 << 26) - 1)); t = (t >> 26) + 2 * mul32_to64(x_0, x_1) + 38 * (mul32_to64(x_2, x_9) + mul32_to64(x_3, x_8) + mul32_to64(x_4, x_7) + mul32_to64(x_5, x_6)); y[1] = (t & ((1 << 25) - 1)); t = (t >> 25) + 19 * mul32_to64(x_6, x_6) + 2 * (mul32_to64(x_0, x_2) + mul32_to64(x_1, x_1)) + 38 * mul32_to64(x_4, x_8) + 76 * (mul32_to64(x_3, x_9) + mul32_to64(x_5, x_7)); y[2] = (t & ((1 << 26) - 1)); t = (t >> 26) + 2 * (mul32_to64(x_0, x_3) + mul32_to64(x_1, x_2)) + 38 * (mul32_to64(x_4, x_9) + mul32_to64(x_5, x_8) + mul32_to64(x_6, x_7)); y[3] = (t & ((1 << 25) - 1)); t = (t >> 25) + mul32_to64(x_2, x_2) + 2 * mul32_to64(x_0, x_4) + 38 * (mul32_to64(x_6, x_8) + mul32_to64(x_7, x_7)) + 4 * mul32_to64(x_1, x_3) + 76 * mul32_to64(x_5, x_9); y[4] = (t & ((1 << 26) - 1)); t = (t >> 26) + 2 * (mul32_to64(x_0, x_5) + mul32_to64(x_1, x_4) + mul32_to64(x_2, x_3)) + 38 * (mul32_to64(x_6, x_9) + mul32_to64(x_7, x_8)); y[5] = (t & ((1 << 25) - 1)); t = (t >> 25) + 19 * mul32_to64(x_8, x_8) + 2 * (mul32_to64(x_0, x_6) + mul32_to64(x_2, x_4) + mul32_to64(x_3, x_3)) + 4 * mul32_to64(x_1, x_5) + 76 * mul32_to64(x_7, x_9); y[6] = (t & ((1 << 26) - 1)); t = (t >> 26) + 2 * (mul32_to64(x_0, x_7) + mul32_to64(x_1, x_6) + mul32_to64(x_2, x_5) + mul32_to64(x_3, x_4)) + 38 * mul32_to64(x_8, x_9); y[7] = (t & ((1 << 25) - 1)); t = (t >> 25) + y[8]; y[8] = (t & ((1 << 26) - 1)); y[9] += int32_t(t >> 26); } void recip(int10& y, int10& x, int sqrtassist) { int10 t0, t1, t2, t3, t4; /* the chain for x^(2^255-21) is straight from djb's implementation */ sqr(t1, x); /* 2 == 2 * 1 */ sqr(t2, t1); /* 4 == 2 * 2 */ sqr(t0, t2); /* 8 == 2 * 4 */ mul(t2, t0, x); /* 9 == 8 + 1 */ mul(t0, t2, t1); /* 11 == 9 + 2 */ sqr(t1, t0); /* 22 == 2 * 11 */ mul(t3, t1, t2); /* 31 == 22 + 9 == 2^5 - 2^0 */ sqr(t1, t3); /* 2^6 - 2^1 */ sqr(t2, t1); /* 2^7 - 2^2 */ sqr(t1, t2); /* 2^8 - 2^3 */ sqr(t2, t1); /* 2^9 - 2^4 */ sqr(t1, t2); /* 2^10 - 2^5 */ mul(t2, t1, t3); /* 2^10 - 2^0 */ sqr(t1, t2); /* 2^11 - 2^1 */ sqr(t3, t1); /* 2^12 - 2^2 */ for (int i = 1; i < 5; i++) { sqr(t1, t3); sqr(t3, t1); } /* t3 */ /* 2^20 - 2^10 */ mul(t1, t3, t2); /* 2^20 - 2^0 */ sqr(t3, t1); /* 2^21 - 2^1 */ sqr(t4, t3); /* 2^22 - 2^2 */ for (int i = 1; i < 10; i++) { sqr(t3, t4); sqr(t4, t3); } /* t4 */ /* 2^40 - 2^20 */ mul(t3, t4, t1); /* 2^40 - 2^0 */ for (int i = 0; i < 5; i++) { sqr(t1, t3); sqr(t3, t1); } /* t3 */ /* 2^50 - 2^10 */ mul(t1, t3, t2); /* 2^50 - 2^0 */ sqr(t2, t1); /* 2^51 - 2^1 */ sqr(t3, t2); /* 2^52 - 2^2 */ for (int i = 1; i < 25; i++) { sqr(t2, t3); sqr(t3, t2); } /* t3 */ /* 2^100 - 2^50 */ mul(t2, t3, t1); /* 2^100 - 2^0 */ sqr(t3, t2); /* 2^101 - 2^1 */ sqr(t4, t3); /* 2^102 - 2^2 */ for (int i = 1; i < 50; i++) { sqr(t3, t4); sqr(t4, t3); } /* t4 */ /* 2^200 - 2^100 */ mul(t3, t4, t2); /* 2^200 - 2^0 */ for (int i = 0; i < 25; i++) { sqr(t4, t3); sqr(t3, t4); } /* t3 */ /* 2^250 - 2^50 */ mul(t2, t3, t1); /* 2^250 - 2^0 */ sqr(t1, t2); /* 2^251 - 2^1 */ sqr(t2, t1); /* 2^252 - 2^2 */ if (sqrtassist!=0) { mul(y, x, t2); /* 2^252 - 3 */ } else { sqr(t1, t2); /* 2^253 - 2^3 */ sqr(t2, t1); /* 2^254 - 2^4 */ sqr(t1, t2); /* 2^255 - 2^5 */ mul(y, t1, t0); /* 2^255 - 21 */ } } /* checks if x is "negative", requires reduced input */ int is_negative(int10 const& x) { return (int)(((is_overflow(x) || (x[9] < 0))?1:0) ^ (x[0] & 1)); } void sqrt(int10& x, int10& u) { int10 v, t1, t2; add(t1, u, u); /* t1 = 2u */ recip(v, t1, 1); /* v = (2u)^((p-5)/8) */ sqr(x, v); /* x = v^2 */ mul(t2, t1, x); /* t2 = 2uv^2 */ --t2[0]; /* t2 = 2uv^2-1 */ mul(t1, v, t2); /* t1 = v(2uv^2-1) */ mul(x, u, t1); /* x = uv(2uv^2-1) */ } /********************* Elliptic curve *********************/ /* y^2 = x^3 + 486662 x^2 + x over GF(2^255-19) */ /* t1 = ax + az * t2 = ax - az */ void mont_prep(int10& t1, int10& t2, int10& ax, int10& az) { add(t1, ax, az); sub(t2, ax, az); } /* A = P + Q where * X(A) = ax/az * X(P) = (t1+t2)/(t1-t2) * X(Q) = (t3+t4)/(t3-t4) * X(P-Q) = dx * clobbers t1 and t2, preserves t3 and t4 */ void mont_add(int10& t1, int10& t2, int10& t3, int10& t4, int10& ax, int10& az, int10& dx) { mul(ax, t2, t3); mul(az, t1, t4); add(t1, ax, az); sub(t2, ax, az); sqr(ax, t1); sqr(t1, t2); mul(az, t1, dx); } /* B = 2 * Q where * X(B) = bx/bz * X(Q) = (t3+t4)/(t3-t4) * clobbers t1 and t2, preserves t3 and t4 */ void mont_dbl(int10& t1, int10& t2, int10& t3, int10& t4,int10& bx, int10& bz) { sqr(t1, t3); sqr(t2, t4); mul(bx, t1, t2); sub(t2, t1, t2); mul_small(bz, t2, 121665); add(t1, t1, bz); mul(bz, t1, t2); } /* Y^2 = X^3 + 486662 X^2 + X * t is a temporary */ void x_to_y2(int10& t, int10& y2, int10& x) { sqr(t, x); mul_small(y2, x, 486662); add(t, t, y2); ++t[0]; mul(y2, t, x); } /* P = kG and s = sign(P)/k */ void core(uint8_t* Px, uint8_t* s, uint8_t const* k, uint8_t const* Gx) { int10 dx, t1, t2, t3, t4; int10 x[3], z[3]; /* unpack the base */ if (Gx) unpack(dx, Gx); else set(dx, 9); /* 0G = point-at-infinity */ set(x[0], 1); set(z[0], 0); /* 1G = G */ x[1] = dx; set(z[1], 1); for (int i = 32; i-- > 0; ) { for (int j = 8; j--> 0; ) { /* swap arguments depending on bit */ int bit1 = ((k[i] & 0xFF) >> j) & 1; int bit0 = (~(k[i] & 0xFF) >> j) & 1; int10& ax = x[bit0]; int10& az = z[bit0]; int10& bx = x[bit1]; int10& bz = z[bit1]; /* a' = a + b */ /* b' = 2 b */ mont_prep(t1, t2, ax, az); mont_prep(t3, t4, bx, bz); mont_add(t1, t2, t3, t4, ax, az, dx); mont_dbl(t1, t2, t3, t4, bx, bz); } } recip(t1, z[0], 0); mul(dx, x[0], t1); pack(dx, Px); /* calculate s such that s abs(P) = G .. assumes G is std base point */ if (s) { x_to_y2(t2, t1, dx); /* t1 = Py^2 */ recip(t3, z[1], 0); /* where Q=P+G ... */ mul(t2, x[1], t3); /* t2 = Qx */ add(t2, t2, dx); /* t2 = Qx + Px */ t2[0] += 9 + 486662; /* t2 = Qx + Px + Gx + 486662 */ dx[0] -= 9; /* dx = Px - Gx */ sqr(t3, dx); /* t3 = (Px - Gx)^2 */ mul(dx, t2, t3); /* dx = t2 (Px - Gx)^2 */ sub(dx, dx, t1); /* dx = t2 (Px - Gx)^2 - Py^2 */ dx[0] -= 39420360; /* dx = t2 (Px - Gx)^2 - Py^2 - Gy^2 */ mul(t1, dx, BASE_R2Y); /* t1 = -Py */ if (is_negative(t1)!=0) /* sign is 1, so just copy */ cpy32(s, k); else /* sign is -1, so negate */ mula_small(s, ORDER_TIMES_8, 0, k, 32, -1); /* reduce s mod q * (is this needed? do it just in case, it's fast anyway) */ //divmod((dstptr) t1, s, 32, order25519, 32); /* take reciprocal of s mod q */ uint8_t* temp1=new uint8_t[32]; uint8_t* temp2=new uint8_t[64]; uint8_t* temp3=new uint8_t[64]; cpy32(temp1, ORDER); cpy32(s, egcd32(temp2, temp3, s, temp1)); if ((s[31] & 0x80)!=0) mula_small(s, s, 0, ORDER, 32, 1); delete[] temp1; delete[] temp2; delete[] temp3; } } } // namespace /********* DIGITAL SIGNATURES *********/ /* deterministic EC-KCDSA * * s is the private key for signing * P is the corresponding public key * Z is the context data (signer public key or certificate, etc) * * signing: * * m = hash(Z, message) * x = hash(m, s) * keygen25519(Y, NULL, x); * r = hash(Y); * h = m XOR r * sign25519(v, h, x, s); * * output (v,r) as the signature * * verification: * * m = hash(Z, message); * h = m XOR r * verify25519(Y, v, h, P) * * confirm r == hash(Y) * * It would seem to me that it would be simpler to have the signer directly do * h = hash(m, Y) and send that to the recipient instead of r, who can verify * the signature by checking h == hash(m, Y). If there are any problems with * such a scheme, please let me know. * * Also, EC-KCDSA (like most DS algorithms) picks x random, which is a waste of * perfectly good entropy, but does allow Y to be calculated in advance of (or * parallel to) hashing the message. */ /* Signature generation primitive, calculates (x-h)s mod q * v [out] signature value * h [in] signature hash (of message, signature pub key, and context data) * x [in] signature private key * s [in] private key for signing * returns true on success, false on failure (use different x or h) */ bool curve25519::sign(uint8_t* v, uint8_t const* h, uint8_t const* x, uint8_t const* s) { /* v = (x - h) s mod q */ uint8_t tmp1[65]; uint8_t tmp2[33]; int w; int i; for (i = 0; i < 32; i++) v[i] = 0; i = mula_small(v, x, 0, h, 32, -1); mula_small(v, v, 0, ORDER, 32, (15-v[31])/16); mula32(tmp1, v, s, 32, 1); divmod(tmp2, tmp1, 64, ORDER, 32); for (w = 0, i = 0; i < 32; i++) w |= v[i] = tmp1[i]; return w != 0; } /* Signature verification primitive, calculates Y = vP + hG * Y [out] signature public key * v [in] signature value * h [in] signature hash * P [in] public key */ void curve25519::verify(uint8_t* Y, uint8_t const* v, uint8_t const* h, uint8_t const* P) { /* Y = v abs(P) + h G */ uint8_t d[32]; int10 p[2], s[2], yx[3], yz[3], t1[3], t2[3]; int vi = 0, hi = 0, di = 0, nvh=0, i, j, k; /* set p[0] to G and p[1] to P */ set(p[0], 9); unpack(p[1], P); /* set s[0] to P+G and s[1] to P-G */ /* s[0] = (Py^2 + Gy^2 - 2 Py Gy)/(Px - Gx)^2 - Px - Gx - 486662 */ /* s[1] = (Py^2 + Gy^2 + 2 Py Gy)/(Px - Gx)^2 - Px - Gx - 486662 */ x_to_y2(t1[0], t2[0], p[1]); /* t2[0] = Py^2 */ sqrt(t1[0], t2[0]); /* t1[0] = Py or -Py */ j = is_negative(t1[0]); /* ... check which */ t2[0][0] += 39420360; /* t2[0] = Py^2 + Gy^2 */ mul(t2[1], BASE_2Y, t1[0]);/* t2[1] = 2 Py Gy or -2 Py Gy */ sub(t1[j], t2[0], t2[1]); /* t1[0] = Py^2 + Gy^2 - 2 Py Gy */ add(t1[1-j], t2[0], t2[1]);/* t1[1] = Py^2 + Gy^2 + 2 Py Gy */ t2[0] = p[1]; /* t2[0] = Px */ t2[0][0] -= 9; /* t2[0] = Px - Gx */ sqr(t2[1], t2[0]); /* t2[1] = (Px - Gx)^2 */ recip(t2[0], t2[1], 0); /* t2[0] = 1/(Px - Gx)^2 */ mul(s[0], t1[0], t2[0]); /* s[0] = t1[0]/(Px - Gx)^2 */ sub(s[0], s[0], p[1]); /* s[0] = t1[0]/(Px - Gx)^2 - Px */ s[0][0] -= 9 + 486662; /* s[0] = X(P+G) */ mul(s[1], t1[1], t2[0]); /* s[1] = t1[1]/(Px - Gx)^2 */ sub(s[1], s[1], p[1]); /* s[1] = t1[1]/(Px - Gx)^2 - Px */ s[1][0] -= 9 + 486662; /* s[1] = X(P-G) */ mul_small(s[0], s[0], 1); /* reduce s[0] */ mul_small(s[1], s[1], 1); /* reduce s[1] */ /* prepare the chain */ for (i = 0; i < 32; i++) { vi = (vi >> 8) ^ (v[i] & 0xFF) ^ ((v[i] & 0xFF) << 1); hi = (hi >> 8) ^ (h[i] & 0xFF) ^ ((h[i] & 0xFF) << 1); nvh = ~(vi ^ hi); di = (nvh & (di & 0x80) >> 7) ^ vi; di ^= nvh & (di & 0x01) << 1; di ^= nvh & (di & 0x02) << 1; di ^= nvh & (di & 0x04) << 1; di ^= nvh & (di & 0x08) << 1; di ^= nvh & (di & 0x10) << 1; di ^= nvh & (di & 0x20) << 1; di ^= nvh & (di & 0x40) << 1; d[i] = (uint8_t)di; } di = ((nvh & (di & 0x80) << 1) ^ vi) >> 8; /* initialize state */ set(yx[0], 1); yx[1] = p[di]; yx[2] = s[0]; set(yz[0], 0); set(yz[1], 1); set(yz[2], 1); /* y[0] is (even)P + (even)G * y[1] is (even)P + (odd)G if current d-bit is 0 * y[1] is (odd)P + (even)G if current d-bit is 1 * y[2] is (odd)P + (odd)G */ vi = 0; hi = 0; /* and go for it! */ for (i = 32; i-- > 0; ) { vi = (vi << 8) | (v[i] & 0xFF); hi = (hi << 8) | (h[i] & 0xFF); di = (di << 8) | (d[i] & 0xFF); for (j = 8; j-- > 0; ) { mont_prep(t1[0], t2[0], yx[0], yz[0]); mont_prep(t1[1], t2[1], yx[1], yz[1]); mont_prep(t1[2], t2[2], yx[2], yz[2]); k = ((vi ^ vi >> 1) >> j & 1) + ((hi ^ hi >> 1) >> j & 1); mont_dbl(yx[2], yz[2], t1[k], t2[k], yx[0], yz[0]); k = (di >> j & 2) ^ ((di >> j & 1) << 1); mont_add(t1[1], t2[1], t1[k], t2[k], yx[1], yz[1], p[di >> j & 1]); mont_add(t1[2], t2[2], t1[0], t2[0], yx[2], yz[2], s[((vi ^ hi) >> j & 2) >> 1]); } } k = (vi & 1) + (hi & 1); recip(t1[0], yz[k], 0); mul(t1[1], yx[k], t1[0]); pack(t1[1], Y); } void curve25519::clamp(uint8_t* k) { k[31] &= 0x7F; k[31] |= 0x40; k[ 0] &= 0xF8; } /* Key-pair generation * P [out] your public key * s [out] your private key for signing * k [out] your private key for key agreement * k [in] 32 random bytes * s may be NULL if you don't care * * WARNING: if s is not NULL, this function has data-dependent timing */ void curve25519::keygen(uint8_t* P, uint8_t* s, uint8_t* k) { clamp(k); core(P, s, k, 0); } /* Key agreement * Z [out] shared secret (needs hashing before use) * k [in] your private key for key agreement * P [in] peer's public key */ void curve25519::curve(uint8_t* Z, uint8_t* k, uint8_t* P) { core(Z, 0, k, P); } } // namespace gvl lierolibre-0.5/src/gvl/crypt/curve25519.hpp000066400000000000000000000041361205125547100204770ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_A80850D4219545B8CF0EA18AA088876D #define UUID_A80850D4219545B8CF0EA18AA088876D #include #include "../support/cstdint.hpp" namespace gvl { struct int10 { int32_t& operator[](std::size_t i) { return limb[i]; } int32_t operator[](std::size_t i) const { return limb[i]; } int32_t limb[10]; }; struct curve25519 { static bool sign(uint8_t* v, uint8_t const* h, uint8_t const* x, uint8_t const* s); static void verify(uint8_t* Y, uint8_t const* v, uint8_t const* h, uint8_t const* P); static void clamp(uint8_t* k); static void keygen(uint8_t* P, uint8_t* s, uint8_t* k); static void curve(uint8_t* Z, uint8_t* k, uint8_t* P); }; } #endif // UUID_A80850D4219545B8CF0EA18AA088876D lierolibre-0.5/src/gvl/crypt/gash.hpp000066400000000000000000000105651205125547100176720ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_GASH_HPP #define GVL_GASH_HPP #include "../support/cstdint.hpp" #include namespace gvl { inline uint64_t rot(uint64_t v, int c) { return (v << c) | (v >> (64-c)); } template struct hash_value { static int const size = Length; uint64_t value[Length]; hash_value() { for(int i = 0; i < Length; ++i) value[i] = 0; } bool operator!=(hash_value const& b) const { for(int i = 0; i < Length; ++i) { if(value[i] != b.value[i]) return true; } return false; } bool operator==(hash_value const& b) const { return !operator!=(b); } }; struct gash { static int const block_size = 4; typedef hash_value value_type; gash() { uint64_t accum = 1; for(int i = 0; i < 8; ++i) { accum *= 0x579d16a0ull; accum += 1; d[i] = accum; } } void process(uint64_t* n) { d[0] ^= n[0]; d[1] ^= n[1]; d[2] ^= n[2]; d[3] ^= n[3]; for(int i = 0; i < 4; ++i) { round1(); round2(); } d[4] += n[0]; d[5] += n[1]; d[6] += n[2]; d[7] += n[3]; } void round1() { d[0] -= d[5]; d[1] -= d[6]; d[2] -= d[7]; d[3] ^= d[0]; d[4] ^= d[1]; d[5] ^= d[2]; d[6] = rot(d[6], 17); d[7] = rot(d[7], 37); std::swap(d[0], d[4]); std::swap(d[2], d[5]); std::swap(d[3], d[7]); } void round2() { d[7] -= d[2]; d[6] -= d[1]; d[5] -= d[0]; d[4] ^= d[7]; d[3] ^= d[6]; d[2] ^= d[5]; d[0] = rot(d[0], 13); d[1] = rot(d[1], 23); std::swap(d[1], d[2]); std::swap(d[3], d[5]); std::swap(d[7], d[0]); } value_type final() const { value_type ret; for(int i = 0; i < block_size; ++i) { ret.value[i] = d[i]; } return ret; } uint64_t d[8]; }; template struct hash_accumulator { void put(uint8_t v) { bit_n -= 8; cur |= (uint64_t(v) << bit_n); if(bit_n == 0) { dump_cur(); } } void put(uint8_t const* p, std::size_t len) { for(std::size_t i = 0; i < len; ++i) put(p[i]); } void dump_cur() { bit_n = 64; buf[word_n++] = cur; cur = 0; if(word_n == Hash::block_size) { hash_.process(buf); word_n = 0; } } #if 0 // Untested void ui32(uint32_t v) { if(bit_n >= 32) { bit_n -= 32; cur |= (uint64_t(v) << bit_n); if(bit_n == 0) dump_cur(); } else { int left = bit_n; cur |= v >> (32 - left); dump_cur(); bit_n = 64 - (32 - left); cur = uint64_t(v) << bit_n; } } #endif void flush() { // Pad with one followed by zeroes put(0x80); // Flush cur if(bit_n < 64) { buf[word_n++] = cur; } // Flush buf if(word_n > 0) { // Pad with 0 for(int i = word_n; i < Hash::block_size; ++i) { buf[i] = 0; } hash_.process(buf); } bit_n = 64; word_n = 0; cur = 0; } typename Hash::value_type final() const { return hash_.final(); } hash_accumulator() : bit_n(64) , word_n(0) , cur(0) { } Hash& hash() { return hash_; } Hash hash_; uint64_t buf[Hash::block_size]; int bit_n; int word_n; uint64_t cur; }; } #endif // GVL_GASH_HPP lierolibre-0.5/src/gvl/crypt/gciph.hpp000066400000000000000000000044661205125547100200450ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_EF37EB8B8BAB4601A60DCDBA8B3B9F33 #define UUID_EF37EB8B8BAB4601A60DCDBA8B3B9F33 #include "../math/cmwc.hpp" // NOTE: Highly experimental namespace gvl { struct gciph { cmwc131086 base_gen; static inline uint32_t rot(uint32_t x, int count) { return (x << count) | (x >> (32-count)); } static inline void mix(uint32_t& a, uint32_t& b, uint32_t& c, uint32_t& d) { a = rot(a + d, 17); b = rot(b + a, 16); c = rot(c + b, 8); d = rot(d + c, 7); a ^= d; b ^= a; c ^= b; d ^= c; } void gen() { uint32_t k[8], o[8]; for(int i = 0; i < 8; ++i) o[i] = k[i] = base_gen(); // 0 1 _ _ 4 5 _ _ // _ 1 2 _ _ 5 6 _ // _ _ 2 3 _ _ 6 7 // 0 _ _ 3 4 _ _ 7 mix(k[0], k[1], k[4], k[5]); mix(k[1], k[2], k[5], k[6]); mix(k[2], k[3], k[6], k[7]); mix(k[3], k[4], k[7], k[0]); for(int i = 0; i < 8; ++i) k[i] += o[i]; } }; } #endif // UUID_EF37EB8B8BAB4601A60DCDBA8B3B9F33 lierolibre-0.5/src/gvl/cstdint.hpp000066400000000000000000000026611205125547100172550ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "support/cstdint.hpp"lierolibre-0.5/src/gvl/debug.hpp000066400000000000000000000026611205125547100166730ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "support/debug.hpp" lierolibre-0.5/src/gvl/dense_int_set.hpp000066400000000000000000000154701205125547100204320ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_C3EF93888B9C481B892430BE338FAC14 #define UUID_C3EF93888B9C481B892430BE338FAC14 #include "support/cstdint.hpp" #include "support/debug.hpp" #include "support/opt.hpp" #include "meta/static_log2.hpp" namespace gvl { template struct dense_int_set { static int const branch_shift = static_log2::value; static int const branch_factor = 1 << branch_shift; static T const branch_mask = ~(T(branch_factor) - 1); struct node { node( MapT map_init, node* parent_init, T begin_init, int level_shift_init) : map(map_init) , parent(parent_init) , begin(begin_init) , end(begin + (T(1) << (level_shift_init + branch_shift)) - 1) , level_mask(~((T(1) << level_shift_init) - 1)) , level_shift(level_shift_init) { } MapT map; node* parent; T begin, end; T level_mask; // ~((1 << level_shift) - 1) int level_shift; union child { node* n; MapT map; }; bool is_bottom() { return level_shift == branch_shift; } child children[branch_factor]; }; dense_int_set() : root(0) { } void expand_to_fit_(T v, node*& n) { if(v < n->begin || v > n->end) { int level_shift_new = n->level_shift; int sh; T begin_new = n->begin; do { level_shift_new = level_shift_new + branch_shift; sh = level_shift_new + branch_shift; begin_new = (begin_new >> sh) << sh; } while(v < begin_new || v > begin_new + (T(1) << sh) - 1) int idx = ((n->begin - begin_new) >> level_shift_new); node* n_new = new node(MapT(1) << idx, 0, begin_new, level_shift_new); GVL_SASSERT(false == n_new->is_bottom()); n_new->children[idx].n = root; n->parent = n_new; n = n_new; } } void insert(T v) { if(!root) return insert_root_(v); insert_(v, root); } int count(T v) { if(!root) return 0; return count_(v, root_begin, root_width, root_level, root); } private: int count_(T v, node* n) { do { if(v < begin || v >= begin + width) return 0; if(level == 0) return (n->map >> (v - begin)) & 1; inner_node* in = static_cast(n); int idx = ((v - begin) >> level_shift); sassert(idx >= 0 && idx < branch_factor); // Descend begin += idx << level_shift; width >>= branch_shift; level_shift -= branch_shift; --level; n = in->children[idx]; } while(true); } void erase_(T v, T begin, T width, int level, int level_shift, node* n) { do { if(v < begin || v >= begin + width) return; if(level == 0) { n->map &= ~(MapT(1) << (v - begin)); // Remove nodes as long as they're empty while(!n->map) { // Ascend level_shift += branch_shift; int sh = level_shift + branch_shift; begin = (begin >> sh) << sh; width <<= branch_shift; ++level; n = n->parent; int idx = ((v - begin) >> level_shift) << level_shift; sassert(idx >= 0 && idx < branch_factor); inner_node* in = static_cast(n); n->map &= ~(MapT(1) << idx); sassert(in->children[idx]); delete in->children[idx]; in->children[idx] = 0; } return; } inner_node* in = static_cast(n); int idx = ((v - begin) >> level_shift); sassert(idx >= 0 && idx < branch_factor); // Descend begin += idx << level_shift; width >>= branch_shift; level_shift -= branch_shift; --level; n = in->children[idx]; } while(true); } // Insert into or under a node. // Assumes the node covers v. void insert_(T v, T begin, T width, int level, int level_shift, node** np) { do { expand_to_fit_(v, *np); node* n = *np; sassert(v >= n->begin && v < n->end); sassert(n->end - n->begin == 1 << (n->level_shift + branch_shift)); if(n->is_bottom()) { // Reached bottom, set the bit in the map T offset = (v - begin); int child_n = (offset >> branch_shift); n->map |= MapT(1) << child_n; n->children[child_n].map |= (MapT(1) << (offset & branch_mask)); return; } int idx = (v - begin) >> n->level_shift; sassert(idx >= 0 && idx < branch_factor); // width is always branch_factor^(level + 2) // See sassert at the top. node*& child = n->children[idx].n; if(((n->map >> idx) & 1) == 0) { // Have to create child int level_shift_new = n->level_shift + branch_shift; int sh = level_shift_new + branch_shift; T begin_new = n->begin + (idx << n->level_shift); child = new node(0, n, begin_new, n->level_shift - branch_shift); // Set occupied bit. // NOTE: This is done after creating the node, // so that if that fails, the bit is not set. n->map |= MapT(1) << idx; } // Go to the new node and repeat n = child; } while(true); } // Insert as root. // Assumes there's no root. void insert_root_(T v) { GVL_ASSUME(!root); root_level = 0; root_level_shift = 0; root_begin = (v >> branch_shift) << branch_shift; root_width = branch_factor; root = construct_bottom_node_(v, root_begin); } node* construct_bottom_node_(T v, T begin) { MapT map = MapT(1) << (v - begin); return new node(map); } /* inner_node* construct_inner_node_(int occupied_idx) { MapT map = MapT(1) << occupied_idx; return new inner_node(map); }*/ node* root; // These are only defined when root != 0 T root_begin, root_width; // Range of root int root_level, root_level_shift; }; } #endif // UUID_C3EF93888B9C481B892430BE338FAC14 lierolibre-0.5/src/gvl/gvl_test/000077500000000000000000000000001205125547100167165ustar00rootroot00000000000000lierolibre-0.5/src/gvl/gvl_test/_build/000077500000000000000000000000001205125547100201545ustar00rootroot00000000000000lierolibre-0.5/src/gvl/gvl_test/_build/deque.cpp000066400000000000000000000063041205125547100217660ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include namespace tut { struct track_obj; std::set track_obj_live; int track_obj_copies = 0; #define MOVABLE CPP0X struct track_obj { track_obj(int v) : v(v) { track_obj_live.insert(this); } #if !MOVABLE track_obj(track_obj const& other) : v(other.v) { ++track_obj_copies; track_obj_live.insert(this); } track_obj& operator=(track_obj const& other) { ++track_obj_copies; v = other.v; return *this; } #endif ~track_obj() { if(track_obj_live.count(this) > 0) track_obj_live.erase(this); } int v; #if MOVABLE track_obj(track_obj&& other) : v(other.v) { track_obj_live.insert(this); } track_obj& operator=(track_obj&& other) { v = other.v; return *this; } private: track_obj(track_obj const& other); track_obj& operator=(track_obj const& other); #endif }; struct deque_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::deque"); } // namespace namespace tut { template<> template<> void object::test<1>() { typedef gvl::deque l_t; l_t l; gvl::tt800 r(1234); int const iter = 1000; int const limit = iter; for(int i = 0; i < iter; ++i) { l.push_back(track_obj(i)); } for(int i = 0; i < iter; ++i) { track_obj& v = l.front(); ensure("popped in the right order", v.v == i); l.pop_front(); } ensure(l.empty()); ensure("all track_obj were destroyed", track_obj_live.empty()); #if MOVABLE ensure("no copied were made in C++0x", track_obj_copies == 0); #endif } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/containers/000077500000000000000000000000001205125547100210635ustar00rootroot00000000000000lierolibre-0.5/src/gvl/gvl_test/containers/accurate_rectangle_packing.cpp000066400000000000000000000053221205125547100271000ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include namespace tut { struct arp_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::accurate_rectangle_packing"); } // namespace namespace tut { template<> template<> void object::test<1>() { typedef gvl::accurate_rectangle_packing packer_t; packer_t packing(70, 70); gvl::mwc rand(1); std::vector > rects; for(int i = 200; i >= 1; --i) { int w = rand(4, 10); int h = rand(4, 10); rects.push_back(std::make_pair(w, h)); } int box_count = 0; int area = 0; std::vector packed_rects; for(std::size_t i = 0; i < rects.size(); ++i) { std::pair& r = rects[i]; packer_t::rect_handle h = packing.try_fit(r.first, r.second, true); if(packing.is_valid(h)) { ++box_count; area += r.first * r.second; packed_rects.push_back(packing.get_rect(h)); } } #if 0 int cur_free = packing.free_rects.size(); std::cout << cur_free << " free rectangles\n"; std::cout << box_count << " boxes, area: " << area << ", " << (area * 100.0 / (double(packing.width) * double(packing.height))) << "%" << std::endl; #endif } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/containers/bounded_rectangle_packing.cpp000066400000000000000000000122061205125547100267300ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #define GVL_PROFILE 1 #if GVL_PROFILE #include #endif namespace tut { struct brp_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::recursive_bounded_rectangle_packing"); } // namespace namespace tut { template struct packing_trial { typedef Packer packer_t; typedef typename packer_t::rect_handle rect_handle; packing_trial(std::string const& name, int width, int height) : name(name) , width(width), height(height) , packing(width, height) , trials(0) , packed_count(0) , area(0) { } void try_fit(std::vector const& boxes, bool abort_on_first_fail = false) { for(std::size_t i = 0; i < boxes.size(); ++i) { ++trials; int w = boxes[i].x; int h = boxes[i].y; rect_handle n = packing.try_fit(w, h, true); if(packing.is_valid(n)) { packed_rects.push_back(n); area += w*h; ++packed_count; } else if(abort_on_first_fail) { break; } } } std::string get_stats() { std::stringstream ss; ss << name << ": " << (100.0 * area / (width*height)) << "%, " << packed_count << " boxes out of " << trials << " trials"; return ss.str(); } void render(double x, double y, double scale = 4.0) { using namespace qv; for(std::size_t i = 0; i < packed_rects.size(); ++i) { gvl::rect const& r = packing.get_rect(packed_rects[i]); drawBox(x + r.x1 * scale, y + r.y1 * scale, r.width() * scale, r.height() * scale, colorize(&r)); } } std::string name; int width, height; packer_t packing; int trials; int packed_count; int area; std::vector packed_rects; }; struct by_area { bool operator()(gvl::ivec2 const& a, gvl::ivec2 const& b) const { return a.x*a.y > b.x*b.y; } }; template<> template<> void object::test<1>() { gvl::mwc rand(1); std::cout << "Packing rectangles..." << std::endl; packing_trial rtrial("recursive", 256, 256); packing_trial gtrial("maximal space", 256, 256); std::vector rects; for(int i = 0; i < 1500; ++i) { #if 0 int w = 3 + (1 << rand(0, 5)); //5 + int(std::pow(rand.get_double() * 10.0, 2)); int h = 3 + (1 << rand(0, 5)); //5 + int(std::pow(rand.get_double() * 10.0, 2)); #else //int w = 5 + int(std::pow(rand.get_double() * 3.0, 3)); //int h = 5 + int(std::pow(rand.get_double() * 3.0, 3)); int r = rand(1, 4); int w = 3 + r*r, h = w; #endif rects.push_back(gvl::ivec2(w, h)); } //std::sort(rects.begin(), rects.end(), by_area()); { GVL_PROF_TIMER("recursive"); rtrial.try_fit(rects, false); } { GVL_PROF_TIMER("maximal space"); gtrial.try_fit(rects, false); } std::cout << "Done." << std::endl; std::stringstream ss; gvl::present_profile(ss); std::vector lines; std::string line; while(std::getline(ss, line)) { lines.push_back(line); } int cur_free = gtrial.packing.free_rects.size(); std::cout << cur_free << " free rectangles\n"; do { double scale = 1.5; rtrial.render(0, 0, scale); gtrial.render(800.0 - 256.0 * scale, 0, scale); qv::drawText(rtrial.get_stats(), 20.0, 256.0 * scale + 40.0); qv::drawText(gtrial.get_stats(), 20.0, 256.0 * scale + 60.0); for(std::size_t i = 0; i < lines.size(); ++i) { qv::drawText(lines[i], 20.0, 256.0 * scale + 90.0 + i*20.0, qv::Color(255, 255, 128, 255)); } } while(qv::show()); #if GVL_PROFILE gvl::present_profile(std::cout); #endif } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/containers/compact_interval_set.cpp000066400000000000000000000054751205125547100260070ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include // For bounded_rectangle_packer #include #include #include namespace tut { struct cis_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::compact_interval_set"); } // namespace namespace tut { template<> template<> void object::test<1>() { gvl::compact_interval_set s; s.insert_no_overlap(0, 100); // [0, 100) s.insert_no_overlap(150, 200); // [0, 100) [150, 200) s.insert_no_overlap(100, 150); // [0, 200) ensure("ranges merged after insert", s.end() - s.begin() == 1); s.erase_no_overlap(50, 150); // [0, 50) [150, 200) ensure("range split in two", s.end() - s.begin() == 2); s.erase_no_overlap(0, 50); // [150, 200) ensure("range erased", s.end() - s.begin() == 1); s.erase_no_overlap(150, 175); // [175, 200) ensure("range cut at front", (s.end() - s.begin() == 1) && s.begin()->begin == 175); s.erase_no_overlap(190, 200); // [175, 190) ensure("range cut at back", (s.end() - s.begin() == 1) && s.begin()->end == 190); s.insert_no_overlap(0, 100); // [0, 100) [175, 190) s.insert_no_overlap(100, 175); // [0, 190) ensure("three ranges merged", (s.end() - s.begin() == 1) && s.begin()->begin == 0); } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/containers/dense_int_set.cpp000066400000000000000000000035331205125547100244160ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include namespace tut { struct dense_int_set_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::dense_int_set"); } // namespace namespace tut { template<> template<> void object::test<1>() { gvl::dense_int_set<> s; s.insert(200); s.insert(1000); s.insert(500); s.insert(10); s.insert(100000); } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/containers/hash_set.cpp000066400000000000000000000074151205125547100233740ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include namespace tut { typedef gvl::hash_set integer_hash_set; #define TANDEM(x, op) do { (x)->first.op; (x)->second.op; } while(0) template struct hash_model { typedef typename std::set::iterator iterator; void insert(T const& v) { s.insert(v); } void erase(T const& v) { s.erase(v); } iterator begin() { return s.begin(); } iterator end() { return s.end(); } std::set s; }; typedef std::pair > test_type; QC_BEGIN_GEN(empty_hash_gen, test_type) return ptr_t(new t); QC_END_GEN() QC_BEGIN_GEN(singleton_hash_gen, test_type) ptr_t ret(new t); uint32_t v = ctx.rand(0xffffff); TANDEM(ret, insert(v)); return ret; QC_END_GEN() QC_BEGIN_GEN(insert_hash_gen, test_type) ptr_t ret(ctx.generate_any()); uint32_t v = ctx.rand(0xffffff); TANDEM(ret, insert(v)); return ret; QC_END_GEN() QC_BEGIN_GEN(erase_hash_gen, test_type) ptr_t ret(ctx.generate_any()); uint32_t v = ctx.rand(0xffffff); TANDEM(ret, erase(v)); return ret; QC_END_GEN() QC_BEGIN_PROP(hash_integrity_property, test_type) chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, obj)) { std::vector first_cont, second_cont; GVL_FOREACH(int i, gvl::iter_range(obj->first)) { first_cont.push_back(i); } GVL_FOREACH(int i, gvl::iter_range(obj->second)) { second_cont.push_back(i); } std::sort(first_cont.begin(), first_cont.end()); std::sort(second_cont.begin(), second_cont.end()); QC_ASSERT("same number of elements", first_cont.size() == second_cont.size()); for(std::size_t i = 0; i < first_cont.size(); ++i) { QC_ASSERT("elements match", first_cont[i] == second_cont[i]); } return chk_ok_reuse; } QC_END_PROP() struct hash_set_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::hash_set"); } // namespace namespace tut { template<> template<> void object::test<1>() { gvl::qc::context ctx; ctx.add("singleton", new singleton_hash_gen, 2.0); ctx.add("empty", new empty_hash_gen); ctx.add("insert", new insert_hash_gen, 100.0); ctx.add("erase", new erase_hash_gen, 100.0); gvl::qc::test_property(ctx); } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/containers/list.cpp000066400000000000000000000126021205125547100225430ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include namespace tut { struct tag1; struct tag2; struct integer : gvl::list_node , gvl::list_node { integer(int v) : v(v) { } bool operator<(integer const& b) const { return v < b.v; } int v; }; typedef gvl::list integer_list; QC_BEGIN_GEN(empty_list_gen, integer_list) return ptr_t(new t); QC_END_GEN() QC_BEGIN_GEN(singleton_list_gen, integer_list) ptr_t ret(new t); ret->push_back(new integer(ctx.rand(10000))); return ret; QC_END_GEN() QC_BEGIN_GEN(concat_list_gen, integer_list) if(ctx.generator_depth() > 10) { return ctx.generate("singleton"); } ptr_t a(ctx.generate_any()); ptr_t b(ctx.generate_any()); a->splice(*b); return a; QC_END_GEN() QC_BEGIN_GEN(erase_list_gen, integer_list) ptr_t a(ctx.generate_any()); if(!a->empty()) a->pop_front(); return a; QC_END_GEN() QC_BEGIN_GEN(sorted_list_gen, integer_list) ptr_t a(ctx.generate_any()); a->sort(std::less()); return a; QC_END_GEN() QC_BEGIN_PROP(list_integrity_property, integer_list) gvl::qc::chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, obj)) { obj->integrity_check(); return gvl::qc::chk_ok_reuse; } QC_END_PROP() QC_BEGIN_GENERIC_PROP(list_pop_front_property) gvl::qc::chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, obj)) { if(obj->empty()) return gvl::qc::chk_not_applicable; std::size_t before_count = obj->size(); obj->pop_front(); std::size_t after_count = obj->size(); QC_ASSERT("pop_front decrease count with 1", after_count + 1 == before_count); return gvl::qc::chk_ok_reuse; } QC_END_PROP() struct list_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::list"); } // namespace namespace tut { template struct greater : std::binary_function { bool operator()(T const& a, T const& b) const { return b < a; } }; template<> template<> void object::test<1>() { typedef gvl::list l1_t; typedef gvl::list l2_t; l1_t l1; l2_t l2; gvl::mwc r(1234); for(int repeat = 0; repeat < 100; ++repeat) { std::size_t l1_count = 0; std::size_t l2_count = 0; int count = r(0, 200); for(int i = 0; i < count; ++i) { integer* o = new integer(r(0, 10000)); l1.push_back(o); l2.push_back(o); ++l1_count; ++l2_count; } ensure("l1 size after inserting", l1.size() == l1_count); ensure("l2 size after inserting", l2.size() == l2_count); l1.integrity_check(); l2.integrity_check(); FOREACH_DELETE(l2_t, i, l2) { if((r() & 1) == 0) { l2.unlink(i); --l2_count; } } ensure("l2 size after erasing", l2.size() == l2_count); l1.sort(std::less()); l2.sort(greater()); ensure("l1 size after sorting", l1.size() == l1_count); ensure("l2 size after sorting", l2.size() == l2_count); ensure("l1 sorted", gvl::is_sorted(l1.begin(), l1.end())); ensure("l2 sorted", gvl::is_sorted(l2.begin(), l2.end(), greater())); l1.integrity_check(); l2.integrity_check(); l2.unlink_all(); if(r() & 1) { FOREACH_DELETE(l1_t, i, l1) { l1.erase(i); } } else { l1.clear(); } ensure("l1 empty", l1.empty()); ensure("l2 empty", l2.empty()); } } template<> template<> void object::test<2>() { gvl::qc::context ctx; ctx.add("singleton", new singleton_list_gen, 1.5); ctx.add("concat", new concat_list_gen, 1.5); ctx.add("sorted", new sorted_list_gen); ctx.add("empty", new empty_list_gen); ctx.add("erase", new erase_list_gen); gvl::qc::test_property(ctx); gvl::qc::test_property >(ctx); } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/containers/pairing_heap.cpp000066400000000000000000000153041205125547100242200ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace tut { struct pairing_heap_integer : gvl::pairing_node<> { pairing_heap_integer(int v) : v(v) { } bool operator<(pairing_heap_integer const& b) const { return v < b.v; } int v; }; typedef gvl::pairing_heap h_t; #define TANDEM(x, op) do { (x)->first.op; (x)->second.op; } while(0) template struct heap_model { struct ptr_comp { bool operator()(T* a, T* b) const { return *a < *b; } }; void insert(T* x) { elements.insert(x); } void meld(heap_model& b) { elements.insert(b.elements.begin(), b.elements.end()); b.elements.clear(); } void erase_min() { delete *elements.begin(); unlink_min(); } void unlink_min() { elements.erase(elements.begin()); } void unlink_all() { elements.clear(); } T& min() { return **elements.begin(); } std::size_t size() const { return elements.size(); } bool empty() const { return elements.empty(); } std::multiset elements; }; typedef std::pair > test_type; QC_BEGIN_GEN(empty_heap_gen, test_type) TLOG("Empty"); return ptr_t(new t); QC_END_GEN() QC_BEGIN_GEN(singleton_heap_gen, test_type) ptr_t ret(new t); int v = ctx.rand(10000); TANDEM(ret, insert(new pairing_heap_integer(v))); TLOG("Singleton(" << v << ")"); return ret; QC_END_GEN() QC_BEGIN_GEN(merge_heap_gen, test_type) if(ctx.generator_depth() > 10) { return ctx.generate("singleton"); } TLOG("Meld("); ptr_t a(ctx.generate_any()); TLOG(", "); ptr_t b(ctx.generate_any()); TLOG(")"); /* std::cout << "\n\n"; a->first.print_tree(); std::cout << "U\n"; b->first.print_tree(); std::cout << "=\n"; */ a->first.meld(b->first); a->second.meld(b->second); /* a->first.print_tree(); std::cout << "\n\n"; */ return a; QC_END_GEN() QC_BEGIN_GEN(erase_min_heap_gen, test_type) TLOG("EraseMin("); ptr_t a(ctx.generate_any()); TLOG(")"); if(!a->first.empty()) a->first.erase_min(); if(!a->second.empty()) a->second.erase_min(); return a; QC_END_GEN() QC_BEGIN_GEN(insert_heap_gen, test_type) TLOG("Insert("); ptr_t a(ctx.generate_any()); int v = ctx.rand(10000); TLOG(", " << v << ")"); TANDEM(a, insert(new pairing_heap_integer(v))); return a; QC_END_GEN() QC_BEGIN_PROP(heap_integrity_property, test_type) gvl::qc::chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, obj)) { TLOG(std::endl << "=== heap_integrity_property ==="); while(!obj->first.empty() && !obj->second.empty()) { int a = obj->first.min().v; int b = obj->second.min().v; QC_ASSERT("elements are the same", a == b); obj->first.erase_min(); obj->second.erase_min(); } QC_ASSERT("both empty", obj->first.empty() && obj->second.empty()); return gvl::qc::chk_ok; } QC_END_PROP() struct pairing_heap_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::pairing_heap"); } // namespace namespace tut { /* template struct greater : std::binary_function { bool operator()(T const& a, T const& b) const { return b < a; } };*/ template<> template<> void object::test<1>() { h_t heap; int const count = 1000; std::vector added; gvl::tt800 rand(1); for(int i = 0; i < count; ++i) { int v = rand.range(0, 10000); added.push_back(v); heap.insert(new pairing_heap_integer(v)); } std::sort(added.begin(), added.end()); for(int i = 0; i < count; ++i) { ensure("not empty", !heap.empty()); ensure("all items are present and popped in the right order", added[i] == heap.min().v); heap.erase_min(); } } template<> template<> void object::test<2>() { gvl::qc::context ctx; ctx.add("singleton", new singleton_heap_gen, 0.5); ctx.add("merge", new merge_heap_gen); ctx.add("insert", new insert_heap_gen, 1.5); ctx.add("empty", new empty_heap_gen, 0.2); ctx.add("erase_min", new erase_min_heap_gen, 0.4); gvl::qc::test_property(ctx, 1000, 500); } template<> template<> void object::test<3>() { #if GVL_PROFILE std::vector added; gvl::mwc rand; rand.seed(1); int const count = 500000; for(int i = 0; i < count; ++i) { int v = rand(0, 10000); added.push_back(pairing_heap_integer(v)); } { h_t heap; GVL_PROF_TIMER("pairing heap"); for(int i = 0; i < 20; ++i) { for(std::size_t i = 0; i < added.size(); ++i) { heap.insert(&added[i]); } for(int i = 0; i < 200; ++i) //while(!heap.empty()) { heap.unlink_min(); //heap.erase_min(); } heap.unlink_all(); } } { std::priority_queue heap; GVL_PROF_TIMER("binary heap"); for(int i = 0; i < 20; ++i) { for(std::size_t i = 0; i < added.size(); ++i) { heap.push(added[i].v); } for(int i = 0; i < 200; ++i) //while(!heap.empty()) { heap.pop(); } } } #endif } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/containers/string.cpp000066400000000000000000000120231205125547100230730ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include namespace tut { QC_BEGIN_GEN(empty_string_gen, gvl::string) return ptr_t(new t); QC_END_GEN() QC_BEGIN_GEN(char_string_gen, gvl::string) ptr_t ret(new t); ret->push_back((uint8_t)ctx.rand('a', 'z'+1)); return ret; QC_END_GEN() QC_BEGIN_GEN(concat_string_gen, gvl::string) if(ctx.generator_depth() > 10) { return ctx.generate("char"); } ptr_t a(ctx.generate_any()); ptr_t b(ctx.generate_any()); a->append(*b); return a; QC_END_GEN() QC_BEGIN_GEN(change_char_gen, gvl::string) ptr_t a(ctx.generate_any()); if(!a->empty()) { uint8_t new_c = ctx.rand(256); a->set(ctx.rand(a->size()), new_c); } return a; QC_END_GEN() QC_BEGIN_GEN(assign_swap_gen, gvl::string) ptr_t a(ctx.generate_any()); gvl::string x; x = *a; x.swap(*a); return a; QC_END_GEN() QC_BEGIN_PROP(concat_property, gvl::string) chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, a), QC_GEN_ANY(t, b)) { std::size_t a_size = a->size(); std::size_t b_size = b->size(); ptr_t ret(new t(*a)); ret->append(*b); QC_ASSERT("concatentated size is correct", ret->size() == a_size + b_size); for(std::size_t i = 0; i < a_size; ++i) QC_ASSERT("char match", (*ret)[i] == (*a)[i]); for(std::size_t i = 0; i < b_size; ++i) QC_ASSERT("char match", (*ret)[a_size + i] == (*b)[i]); return chk_ok_reuse; } QC_END_PROP() QC_BEGIN_PROP(string_cstr_property, gvl::string) chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, a)) { // c_str() will not return the whole string if it contains zeroes for(std::size_t i = 0; i < a->size(); ++i) { if((*a)[i] == 0) return chk_not_applicable; } QC_ASSERT("c_str terminates correctly", a->size() == std::strlen(a->c_str())); return chk_ok_reuse; } QC_END_PROP() QC_BEGIN_PROP(string_set_property, gvl::string) chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, a)) { if(a->empty()) return chk_not_applicable; gvl::string x = *a; std::size_t idx = ctx.rand(a->size()); uint8_t new_c = ctx.rand(256); uint8_t old_c = (*a)[idx]; a->set(idx, new_c); QC_ASSERT("copy was not affected", x[idx] == old_c); QC_ASSERT("original was affected", (*a)[idx] == new_c); return chk_ok_reuse; } QC_END_PROP() QC_BEGIN_PROP(string_clear_property, gvl::string) chk_result check(gvl::qc::context& ctx, QC_GEN_ANY(t, a)) { if(a->empty()) return chk_not_applicable; gvl::string x = *a; a->clear(); QC_ASSERT("copy was not affected", !x.empty()); QC_ASSERT("original was affected", a->empty()); return chk_ok_reuse; } QC_END_PROP() struct string_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::string"); } // namespace namespace tut { template<> template<> void object::test<1>() { gvl::qc::context ctx; ctx.add("char", new char_string_gen, 0.5); ctx.add("concat", new concat_string_gen); ctx.add("empty", new empty_string_gen, 0.5); ctx.add("change char", new change_char_gen); ctx.add("assign_swap_gen", new change_char_gen); gvl::qc::test_property(ctx); gvl::qc::test_property(ctx); gvl::qc::test_property(ctx); gvl::qc::test_property(ctx); } template<> template<> void object::test<2>() { gvl::string x("hello, "), y("world"); gvl::swap(x, y); ensure("swapped", y[6] == ' '); ensure("swapped", x[0] == 'w'); uint32_t sum = 0; GVL_FOREACH(uint8_t i, x.all()) { sum += i; } ensure("sum is right", sum == 552); } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/containers/treap.cpp000066400000000000000000000070261205125547100227070ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include namespace tut { struct treap_integer2 : gvl::treap_node2<> { treap_integer2(int v) : v(v) { } bool operator<(treap_integer2 const& b) const { return v < b.v; } int v; }; struct treap_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::treap"); } // namespace namespace tut { template struct greater : std::binary_function { bool operator()(T const& a, T const& b) const { return b < a; } }; double log2(double x) { return std::log(x) / std::log(2.0); } struct timer { timer() : start(std::clock()) { } ~timer() { std::clock_t stop = std::clock(); std::printf("Time: %f\n", (stop - start) / (double)(CLOCKS_PER_SEC)); } std::clock_t start; }; template<> template<> void object::test<1>() { //typedef gvl::treap l1_t; typedef std::set l2_t; typedef gvl::treap2 l3_t; //l1_t l1; /*l2_t l2;*/ l3_t l3; gvl::tt800 r(1234); int const iter = 1000; int const limit = iter; { for(int repeat = 0; repeat < iter; ++repeat) { l3.insert(new treap_integer2(/*repeat*/r.range(0, limit))); } } int sum = 0; { for(int repeat = 0; repeat < 30; ++repeat) { int v = r.range(0, limit); for(l3_t::range iter = l3.all(); !iter.empty(); iter.pop_front()) { sum += iter.front().v; } } } { for(int repeat = 0; repeat < iter; ++repeat) { int v = r.range(0, limit); l3_t::range iter = l3.find(v); if(!iter.empty()) l3.erase_front(iter); //l3.integrity_check(); } } { for(int repeat = 0; repeat < iter; ++repeat) { int v = r.range(0, limit); l3.find(v); } } } template<> template<> void object::test<2>() { typedef gvl::treap2 l1_t; l1_t l1; gvl::tt800 r(1234); int const iter = 1500000; } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/io/000077500000000000000000000000001205125547100173255ustar00rootroot00000000000000lierolibre-0.5/src/gvl/gvl_test/io/bitstream.cpp000066400000000000000000000066341205125547100220340ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include namespace tut { struct bitstream_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::bitstream"); } // namespace namespace tut { template std::size_t array_size(T(&)[N]) { return N; } template<> template<> void object::test<1>() { typedef std::vector > SampleVec; SampleVec samples; gvl::tt800 rand(0); for(int i = 0; i < 1000; ++i) { uint32_t bits = rand.range(1, 33); uint32_t v; if(bits == 32) v = rand(); else v = rand.range(0u, 1u<second, i->first); } bs.finish(); FOREACH(SampleVec, i, samples) { uint32_t v = bs.get_uint(i->first); ensure("integers encoded right", v == i->second); } bs.rewindg(); // Get with interjected ignores int ignoreLen = 0; FOREACH(SampleVec, i, samples) { if(rand() & 1) ignoreLen += i->first; else { if(ignoreLen > 0) { bs.ignore(ignoreLen); ignoreLen = 0; } uint32_t v = bs.get_uint(i->first); ensure("integers encoded right", v == i->second); } } bs.clear(); FOREACH(SampleVec, i, samples) { bs.put(i->second & 1); } bs.finish(); FOREACH(SampleVec, i, samples) { uint32_t v = bs.get(); ensure("bits encoded right", v == (i->second & 1)); } } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/io/formatter.cpp000066400000000000000000000123261205125547100220400ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #undef GVL_PROFILE #define GVL_PROFILE 1 #include #include namespace tut { struct formatter_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::formatter"); } // namespace namespace tut { template<> template<> void object::test<1>() { #if GVL_PROFILE using namespace gvl; typedef unsafe_delimited_iterator_range buffer_writer; uint8_t buffer[32]; buffer_writer orig_writer(buffer, buffer + 32); #ifdef NDEBUG uint32_t const limit = 1000000; #else uint32_t const limit = 10000; #endif uint32_t const base = 10; uint32_t volatile vbase_ = base; uint32_t vbase = vbase_; gvl::sleep(1000); { GVL_PROF_TIMER("static uint -> ascii"); for(uint32_t i = 0; i < limit; ++i) { buffer_writer writer = orig_writer; uint_to_ascii_base(writer, i); } } { GVL_PROF_TIMER("dynamic base uint -> ascii"); for(uint32_t i = 0; i < limit; ++i) { buffer_writer writer = orig_writer; uint_to_ascii(writer, i, vbase); } } { GVL_PROF_TIMER("itoa"); for(uint32_t i = 0; i < limit; ++i) { _itoa(i, (char*)buffer, vbase); } } #endif } struct string_writer : gvl::basic_text_writer { string_writer(std::string& str_init) : str(str_init) { } void put(uint8_t const* p_, std::size_t count) { char const* p = reinterpret_cast(p_); str.insert(str.end(), p, p + count); } void put(uint8_t x) { str.push_back(static_cast(x)); } void flush() { // Nothing } std::string& str; }; template<> template<> void object::test<2>() { #if GVL_PROFILE using namespace gvl; #ifdef NDEBUG uint32_t limit = 2000000; #else uint32_t limit = 20000; #endif std::string a, b, c, d; { std::stringstream ss; GVL_PROF_TIMER("stringstream"); for(uint32_t i = 0; i < limit; ++i) { ss << "Hello " << i << '\n'; } b = ss.str(); } { c.reserve(26888890); GVL_PROF_TIMER("direct"); char const* const hello = "Hello "; uint8_t buf[32+6]; std::memset(buf, 0, sizeof(buf)); std::memcpy(buf, hello, 6); for(uint32_t i = 0; i < limit; ++i) { unsafe_delimited_iterator_range buf_range(buf + 6, buf + 32 + 6); uint_to_ascii_base<10>(buf_range, i); *buf_range.i++ = '\n'; c.append((char const*)buf); } } { uint8_t* data = new uint8_t[26888890]; GVL_PROF_TIMER("c str"); char const* const hello = "Hello "; uint8_t* p = data; for(uint32_t i = 0; i < limit; ++i) { *reinterpret_cast(p) = 'lleH'; p += 4; *reinterpret_cast(p) = ' o'; p += 2; unsafe_delimited_iterator_range buf_range(p, p + 32); uint_to_ascii_base<10>(buf_range, i); p = buf_range.i; *p++ = '\n'; } } { shared_ptr dest(new memory_stream); octet_stream_writer writer(dest); GVL_PROF_TIMER("octet_stream_writer + memory_stream"); for(uint32_t i = 0; i < limit; ++i) { writer << "Hello " << i << '\n'; } writer.flush(); dest->to_str(a); } { shared_ptr dest(new memory_stream); octet_stream_writer writer(dest); GVL_PROF_TIMER("octet_stream_writer + memory_stream + unlimited bucket growth"); writer.set_unlimited_bucket(); for(uint32_t i = 0; i < limit; ++i) { writer << "Hello " << i << '\n'; } writer.flush(); gvl::string str; dest->release_as_str(str); } { GVL_PROF_TIMER("string_writer"); std::string str; string_writer swriter(str); for(uint32_t i = 0; i < limit; ++i) { swriter << "Hello " << i << '\n'; } swriter.flush(); } ensure("strings are equal", a == b && b == c); #endif } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/io/stream.cpp000066400000000000000000000065201205125547100213270ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include //#include //#include #include #include #include #include //#include #include namespace tut { struct stream_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::stream"); } // namespace namespace tut { template std::size_t array_size(T(&)[N]) { return N; } #if 0 // TODO: Return value is inaccurate of apply struct inc_filter : gvl::filter { read_status apply(apply_mode mode, size_type amount = 0) { if(out_buffer.empty() && mode == am_pulling) { read_status res = try_pull(amount); if(res != read_ok) return res; } while(!out_buffer.empty()) { gvl::bucket* b = out_buffer.unlink_first(); std::size_t s = b->size(); gvl::bucket_data_mem* dest = gvl::bucket_data_mem::create(s, s); uint8_t const* p = b->get_ptr(); for(std::size_t i = 0; i < s; ++i) { dest->data[i] = p[i] + 1; } in_buffer.append(new gvl::bucket(dest)); } return read_ok; } }; #endif template<> template<> void object::test<1>() { using namespace gvl; stream_ptr sink(new memory_stream()); shared_ptr filter(new deflate_filter(true)); filter->attach_sink(sink); octet_stream_writer writer(filter); uint8_t seq[] = {1, 2, 3, 4}; for(int i = 0; i < 1000; ++i) { writer.put(13); writer.put(seq, 4); } writer.flush(); writer.detach(); shared_ptr filter2(new deflate_filter(false)); filter2->attach_source(sink); octet_stream_reader reader(filter2); for(int i = 0; i < 1000; ++i) { int v = reader.get(); ensure(v == 13); ensure(reader.get() == seq[0]); ensure(reader.get() == seq[1]); ensure(reader.get() == seq[2]); ensure(reader.get() == seq[3]); } } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/math/000077500000000000000000000000001205125547100176475ustar00rootroot00000000000000lierolibre-0.5/src/gvl/gvl_test/math/deterministic_float.cpp000066400000000000000000000217051205125547100244100ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include namespace tut { struct deterministic_float_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("deterministic floats"); } // namespace namespace tut { bool equivalent(double x, double y) { return (x == y) || (std::isnan(x) && std::isnan(y)); } template<> template<> void object::test<1>() { #if 0 gvl::tt800 rnd(1); for(int i = 0; i < 1000000000; ++i) { double x = 0.0; FD_LO(x) = rnd(); FD_HI(x) = rnd(); double rn = std::sqrt(x); double rfd = fd_sqrt(x); if(!equivalent(rn, rfd)) { printf("std::sqrt(%f) != fd_sqrt(%f)\n", x, x); } } #endif } template<> template<> void object::test<2>() { #if 0 gvl::tt800 rnd(1); long trials = 0; long failures = 0; long incorrect_overflows = 0; unsigned char scaleup[10], scaledown[10]; int correction_exponent = (32766 - 16383) - (2046 - 1023); *((unsigned short*)&scaleup[8]) = correction_exponent + 16383; *((unsigned long long*)&scaleup[0]) = 0x8000000000000000ull; *((unsigned short*)&scaledown[8]) = 16383 - correction_exponent; *((unsigned long long*)&scaledown[0]) = 0x8000000000000000ull; /* double scaledown = -correction_exponent; double scaleup = correction_exponent; */ double testd = 3.0; unsigned char test[10]; for(int i = 0; i < 2000000000; ++i) { double x = 0.0, y = 0.0; FD_LO(x) = rnd(); FD_HI(x) = rnd(); FD_LO(y) = rnd(); FD_HI(y) = rnd(); double r1, r2; #if 0 __asm { fld TBYTE PTR scaleup fld TBYTE PTR scaledown fmul x // ST(0) = x*scaledown, ST(1) = scaleup fmul y // ST(0) = x*scaledown*y, ... fmul ST(0),ST(1) // ST(0) = x*scaledown*y*scaleup fstp r1 fstp ST movsd xmm0, x mulsd xmm0, y movsd r2, xmm0 } #elif 0 __asm { fld TBYTE PTR scaleup fld TBYTE PTR scaledown fmul x // ST(0) = x*scaledown, ST(1) = scaleup fdiv y // ST(0) = x*scaledown/y, ... fmul ST(0),ST(1) // ST(0) = x*scaledown/y*scaleup fstp r1 fstp ST movsd xmm0, x divsd xmm0, y movsd r2, xmm0 } #elif 0 __asm { fld x fadd y fstp r1 /* movsd xmm0, x addsd xmm0, y movsd r2, xmm0*/ } #endif r1 = D(M(x, x) + y, y); //r1 = ((x * x) + y) / y; if(!equivalent(r1, r2)) { ++failures; if(!std::isfinite(r1) && std::isfinite(r2)) ++incorrect_overflows; if(failures == 1) { printf("First failure after %d trials. %f * %f\n", trials, x, y); } } ++trials; } printf("Total failures: %d out of %d, %d incorrect overflows\n", failures, trials, incorrect_overflows); #endif } template<> template<> void object::test<3>() { gvl_init_ieee(); double computedNaN = gSqrt(-1.0); double negZero = -10.0 * 0.0; double zero = 0.0; ensure(std::isnan(computedNaN) != 0); ensure("x-x is not optimized", std::isnan(gS(computedNaN, computedNaN)) != 0); ensure("x*0.0 is not optimized", std::isnan(gM(computedNaN, 0.0)) != 0); ensure("x/x is not optimized", std::isnan(gD(computedNaN, computedNaN)) != 0); ensure("dividing by -0 yields -infinity", gD(1.0, negZero) == -std::numeric_limits::infinity()); ensure("dividing by 0 yields infinity", gD(1.0, zero) == std::numeric_limits::infinity()); ensure("dividing 0 by 0 yields NaN", std::isnan(gD(zero, zero)) != 0); // Fails with round-double-53(round-extended-64(x * 2) / 2) ensure("double overflow with multiply", gD(gM(1.7e308, 2.0), 2.0) == std::numeric_limits::infinity()); // Fails with round-double-53(round-extended-64(x + x) / 2) ensure("double overflow with add", gD(gA(1.7e308, 1.7e308), 2.0) == std::numeric_limits::infinity()); // Fails with round-double-53(round-extended-64(x / 2) * 2) ensure("double underflow with divide", gM(gD(4.940656458412e-324, 2.0), 2.0) == 0.0); // These fail with round-double-53(round-extended-64(x / y)) ensure("division is done with double precision #4", gD(1.0800166971961008e+0238, 5.1489795549339881e-0054) == 2.0975354158498831e+0291); ensure("division is done with double precision #5", gD(7.3289450094340694e+0083, 1.9115748309497579e-0128) == 3.8339827930213510e+0211); ensure("division is done with double precision #6", gD(1.9544203331713143e-0205, 3.5068757973112538e-0184) == 5.5731096455420005e-0022); // These fail with round-double-53(round-extended-53(x * y)) ensure("multiplication is done with double precision #1", gM(8.5782035936114600e-0256, 9.6044770612653327e-0055) == 8.2389159641705354e-0310); ensure("multiplication is done with double precision #2", gM(1.5033255271664106e-0171, 7.6121384488969229e-0138) == 1.1443522046551671e-0308); ensure("multiplication is done with double precision #3", gM(1.7912119214492215e-0236, 1.0043439961829961e-0072) == 1.7989929391989340e-0308); // These fail with round-double-53(round-extended-53(x / y)) ensure("division is done with double precision #1", gD(9.9174847050126468e-0179, 6.5505123943214619e+0129) == 1.5140013647802517e-0308); ensure("division is done with double precision #2", gD(6.0531002917684863e-0252, 6.8672903290096396e-0306) == 8.8143940357352393e+0053); ensure("division is done with double precision #3", gD(3.5215930923124385e+0097, 2.6716890617707574e+0068) == 1.3181148744825781e+0029); // These fail with round-double-53(round-extended-64(sqrt(x)) ensure("sqrt is done with double precision #1", gSqrt(7.9975425458479251e-0252) == 2.8279926707556945e-0126); ensure("sqrt is done with double precision #2", gSqrt(9.1244941815835015e+0183) == 9.5522218261425980e+0091); ensure("sqrt is done with double precision #3", gSqrt(1.2549478092296626e-0152) == 1.1202445309974347e-0076); // These fail with round-double-53(round-extended-64(round-extended-64(1 + x) - y)) ensure("intermediates are double precision #1", gS(gA(1.0, -11562242321027462.), 1642019876357220.2) == -13204262197384680.); ensure("intermediates are double precision #2", gS(gA(1.0, -6.4758762313609902e-006), 4.6367248808744297e-005) == 0.99994715687495983); ensure("intermediates are double precision #3", gS(gA(1.0, -0.025106293868442715), -5.4931982728117911e-015) == 0.97489370613156268); } template<> template<> void object::test<4>() { #if 0 unsigned int const flags = _RC_NEAR | _PC_64 /* | _PC_53*/ | _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_UNDERFLOW | _EM_INEXACT; _control87(flags, _MCW_EM | _MCW_PC | _MCW_RC); gvl::tt800 rnd(2); double one = 1.0; for(unsigned long long i = 0; i < 400000000000ull; ++i) { double r1, r2; double x, y; FD_LO(x) = rnd(); FD_HI(x) = rnd(); FD_LO(y) = rnd(); FD_HI(y) = rnd(); __asm { fld1 fadd x fsub y fstp r1 } __asm { movsd xmm1, one addsd xmm1, x subsd xmm1, y movsd r2, xmm1 } if(!equivalent(r1, r2)) { printf("FAIL! %.20f\n", x, y); } #if 0 if(r2 < 1.7e308) { double ratio = fd_nextafter(std::numeric_limits::max() / r2, 0.0); x *= ratio; } else if(r2 == std::numeric_limits::infinity()) { if((x * 0.5) * y > 0.9e308) { double ratio = fd_nextafter((0.9e308) / ((x * 0.5) * y), std::numeric_limits::max()); y *= ratio; } else y = fd_nextafter(y, 0.0); } else { x = fd_nextafter(x, std::numeric_limits::max()); } #endif if((i & 0xffffff) == 0) { std::cout << "\nTested " << i; } } #endif } /* var p1 = { x = 0, y = 0 } var p2 = { p1 & z = 0 } x & y */ } // namespace tut lierolibre-0.5/src/gvl/gvl_test/math/random.cpp000066400000000000000000000037031205125547100216360ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include namespace tut { struct random_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("random"); } // namespace namespace tut { template<> template<> void object::test<1>() { gvl::normal_distribution<> dist; gvl::normal_distribution rdist; gvl::mwc rand; double x = dist.normal_variate(rand, 0.0, 1.0); x = rdist.normal_variate(rand, 0.0, 1.0).value; } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/support/000077500000000000000000000000001205125547100204325ustar00rootroot00000000000000lierolibre-0.5/src/gvl/gvl_test/support/bits.cpp000066400000000000000000000060361205125547100221040ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include namespace tut { struct bits_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("bit operations"); } // namespace namespace tut { int reference_trailing_zeroes(uint32_t v) { int c = 0; if(!v) return 0; while(!((v >> c) & 1)) { ++c; } return c; } int reference_bottom_bit(uint32_t v) { if(!v) return -1; return reference_trailing_zeroes(v); } int reference_log2(uint32_t v) { int c = 0; while((v >>= 1)) ++c; return c; } int reference_top_bit(uint32_t v) { if(!v) return -1; return reference_log2(v); } int32_t reference_saturate0(int32_t x) { return x < 0 ? 0 : x; } uint32_t reference_bswap(uint32_t x) { return (x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | ((x << 24) & 0xff000000); } uint64_t reference_bswap(uint64_t x) { return reference_bswap(uint32_t(x >> 32)) | (uint64_t(reference_bswap(uint32_t(x))) << 32); } template<> template<> void object::test<1>() { gvl::mwc rand; for(int i = 0; i < 1000000; ++i) { uint32_t x = rand(); uint32_t x64 = (uint64_t(rand()) << 32) | x; ensure("trailing_zeroes", reference_trailing_zeroes(x) == gvl::trailing_zeroes(x)); ensure("bottom_bit", reference_bottom_bit(x) == gvl::bottom_bit(x)); ensure("log2", reference_log2(x) == gvl::log2(x)); ensure("top_bit", reference_top_bit(x) == gvl::top_bit(x)); ensure("saturate0", reference_saturate0(int32_t(x)) == gvl::saturate0(int32_t(x))); ensure("bswap", reference_bswap(x) == gvl::bswap(x)); ensure("bswap 64-bit", reference_bswap(x64) == gvl::bswap(x64)); } } } lierolibre-0.5/src/gvl/gvl_test/support/opt.cpp000066400000000000000000000071161205125547100217450ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include namespace tut { struct opt_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("opt.hpp"); } // namespace namespace tut { template<> template<> void object::test<1>() { #if !GVL_PROFILE gvl::mwc rand; for(int i = 0; i < 1000; ++i) { uint32_t y = rand(2, 0xffffffff); gvl::prepared_division d(y); for(uint32_t x = 3; x < 10000000; x += 1327) { uint32_t expected = x / y; uint32_t actual = d.quot(x); ensure("division was correct", expected == actual); } //std::cout << y << ','; } #endif } template<> template<> void object::test<2>() { #if GVL_PROFILE uint32_t divisors[512]; gvl::mwc rand(1); for(int i = 0; i < 512; ++i) { divisors[i] = rand(3, 1337); } { uint32_t sum = 0; GVL_PROF_TIMER("prepared_division"); for(int i = 0; i < 512; ++i) { gvl::prepared_division d(divisors[i]); uint32_t x = 0x13371337; for(int j = 0; j < 65536/4; ++j) { std::pair p; #define DO \ p = d.quot_rem(x); \ x = p.first + p.second; \ sum += p.second DO; DO; DO; DO; #undef DO } } ensure("sum is correct", sum == 2405768521); } { uint32_t sum = 0; GVL_PROF_TIMER("normal division"); for(int i = 0; i < 512; ++i) { uint32_t d = divisors[i]; uint32_t x = 0x13371337; for(int j = 0; j < 65536/4; ++j) { uint32_t rem; #define DO \ rem = (x % d); \ x = x / d + rem; \ sum += rem DO; DO; DO; DO; #undef DO } } ensure("sum is correct", sum == 2405768521); } { uint32_t sum = 0; GVL_PROF_TIMER("static division"); for(int i = 0; i < 512; ++i) { uint32_t x = 0x13371337; for(int j = 0; j < 65536/4; ++j) { uint32_t rem; #define DO \ rem = (x % 1337); \ x = x / 1337 + rem; \ sum += rem DO; DO; DO; DO; #undef DO } } ensure("sum is correct", sum == 502897152); } #endif } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/template.hpp000066400000000000000000000033131205125547100212420ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include // Template for tut boilerplate namespace tut { struct X_data { }; typedef test_group factory; typedef factory::object object; } namespace { tut::factory tf("gvl::X"); } // namespace namespace tut { template<> template<> void object::test<1>() { } } // namespace tut lierolibre-0.5/src/gvl/gvl_test/test.cpp000066400000000000000000000040351205125547100204030ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include namespace tut { test_runner_singleton runner; } int main() { tut::reporter visi; tut::runner.get().set_callback(&visi); #if 0 tut::runner.get().run_tests("gvl::bitstream"); //tut::runner.get().run_tests("gvl::string"); //tut::runner.get().run_tests("gvl::formatter"); //tut::runner.get().run_test("gvl::recursive_bounded_rectangle_packing", 1); //tut::runner.get().run_test("gvl::accurate_rectangle_packing", 1); #else tut::runner.get().run_tests(); #endif gvl::present_profile(std::cout); std::getchar(); }lierolibre-0.5/src/gvl/hash_set/000077500000000000000000000000001205125547100166655ustar00rootroot00000000000000lierolibre-0.5/src/gvl/hash_set/generic_hash_set.hpp000066400000000000000000000155131205125547100226750ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_115639EF65E5430E91CFED97BFA7B850 #define UUID_115639EF65E5430E91CFED97BFA7B850 #include #include #include #include #include "../support/debug.hpp" #include "../support/hash.hpp" #include "../support/platform.hpp" #include "../resman/scoped_array.hpp" namespace gvl { struct equal_to { template bool operator()(A const& a, B const& b) { return a == b; } }; template< typename T, typename KeyT, typename ValueT, typename Hash = hash_functor, typename Compare = equal_to, bool SafeEmptyKey = false> struct generic_hash_set_new : Hash, Compare { typedef Compare compare_type; struct empty_tag_ {}; struct range { range(T* begin_init, T* end_init) : cur(begin_init) , end(end_init) { while(cur != end && cur->is_empty()) ++cur; } bool empty() { return cur == end; } void pop_front() { do ++cur; while(cur != end && cur->is_empty()); } ValueT& front() { return cur->value(); } T* cur; T* end; }; generic_hash_set_new( Hash const& hash = Hash(), Compare const& compare = Compare()) : Hash(hash), Compare(compare) , table_(0) , second_(0) , h1p(0x883C1BEE) , h2p(0x672833C6) , owning_elements_(true) { reallocate_table_(4); } ~generic_hash_set_new() { if(owning_elements_) { int size = table_size_(); for(int i = 0; i < size; ++i) table_[i].make_empty(); } delete[] table_; } // NOTE: This does not touch the elements currently in the table. // They are assumed to not be owned by this instance anymore. void reallocate_table_(int h1log2_new) { int new_size = (1< new_table(new T[new_size]); delete[] table_; table_ = new_table.release(); second_ = table_ + unsigned(1< T* lookup(SpecKeyT const& k) { hash_t h1v = h1(k) & h1mask; hash_t h2v = h2(k) & h2mask; T& slot1 = table_[h1v]; T& slot2 = second_[h2v]; if(!slot1.is_empty() && Compare::operator()(slot1.key(), k)) return &slot1; if(!slot2.is_empty() && Compare::operator()(slot2.key(), k)) return &slot2; return 0; } void insert(T const& v) { KeyT const& k = v.key(); if(T* existing_slot = lookup(k)) { existing_slot->assign_value(v); return; } hash_t h1v = h1(k) & h1mask; T& slot = table_[h1v]; if(slot.is_empty()) slot = v; else cuckoo_(v, &slot); } bool try_insert(T& v) { KeyT const& k = v.key(); hash_t h1v = h1(k) & h1mask; T& slot = table_[h1v]; if(slot.is_empty()) slot = v; else return try_cuckoo_(v, &slot); return true; } void cuckoo_(T old1, T* slot) { if(!try_cuckoo_(old1, slot)) { resize_(); insert(old1); } } bool try_cuckoo_(T& old1, T* slot) { for(int i = 0; i < 16; ++i) { T old2 = GVL_MOVE(*slot); *slot = GVL_MOVE(old1); hash_t h2v = h2(old2.key()) & h2mask; slot = &second_[h2v]; if(slot->is_empty()) { *slot = GVL_MOVE(old2); return true; } old1 = GVL_MOVE(*slot); *slot = GVL_MOVE(old2); hash_t h1v = h1(old1.key()) & h1mask; slot = &table_[h1v]; if(slot->is_empty()) { *slot = GVL_MOVE(old1); return true; } } return false; } void resize_() { int old_size = table_size_(); generic_hash_set_new new_set((empty_tag_())); new_set.owning_elements_ = false; // new_set does not own the elements until it's final new_set.new_hashes_(h1p, h2p); int new_h1log2 = h1log2; retry: ++new_h1log2; new_set.new_hashes_(new_set.h1p, new_set.h2p); new_set.reallocate_table_(new_h1log2); for(int i = 0; i < old_size; ++i) { T& slot = table_[i]; if(!slot.is_empty()) { // try_insert may change the parameter passed to it if it fails, so we // copy the slot to a temporary variable. T temp_slot(slot); if(!new_set.try_insert(temp_slot)) goto retry; } } // new_set owns the elements now new_set.owning_elements_ = true; owning_elements_ = false; swap(new_set); } void new_hashes_(unsigned h1p_old, unsigned h2p_old) { h1p = (h1p_old + 1) * 2654435761; h2p = (h2p_old - 1) * 2654435761; } template hash_t h1(SpecKeyT const& k) { hash_t h = Hash::operator()(k, h1p); h ^= h >> h1shift; return h; } template hash_t h2(SpecKeyT const& k) { hash_t h = Hash::operator()(k, h2p); h ^= h >> h2shift; return h; } int table_size_() { return (1< * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_E98E1BBBCFA240F5603AFC8F48E7B59F #define UUID_E98E1BBBCFA240F5603AFC8F48E7B59F #include "generic_hash_set.hpp" #include "../support/debug.hpp" #include namespace gvl { template struct hash_set_index_new { hash_set_index_new(KeyT* ptr = 0) : ptr(ptr) { } KeyT& key() const { return *ptr; } KeyT& value() const { return *ptr; } bool is_empty() const { return !ptr; } void make_empty() { if(!is_empty()) delete ptr; ptr = 0; } void assign_value(hash_set_index_new v) { delete ptr; ptr = v.ptr; } // hash_set specific KeyT* release() { KeyT* ret = ptr; ptr = dummy_ptr(); return ptr; } KeyT* ptr; }; template struct hash_set_new : generic_hash_set_new, KeyT, KeyT, Hash, Compare> { typedef generic_hash_set_new, KeyT, KeyT, Hash, Compare> base; hash_set_new(Hash const& hash = Hash(), Compare const& compare = Compare()) : base(hash, compare) { } void insert(KeyT const& v) { base::insert(hash_set_index_new(new KeyT(v))); } void insert(KeyT* v) { base::insert(hash_set_index_new(v)); } template bool has(SpecKeyT const& v) { return base::lookup(v) != 0; } template KeyT* get(SpecKeyT const& v) { hash_set_index_new* index = base::lookup(v); return index ? index->ptr : 0; } template KeyT& operator[](SpecKeyT const& v) { hash_set_index_new* index = base::lookup(v); if(index) return *index->ptr; KeyT* k = new KeyT(v); // !exp insert(k); return *k; } template KeyT* release(SpecKeyT const& v) { hash_set_index_new* index = base::lookup(v); return index ? index->release() : 0; } template void erase(SpecKeyT const& v) { if(KeyT* k = release(v)) delete k; } }; template struct hash_set_index_unboxed { hash_set_index_unboxed() : k() { } hash_set_index_unboxed(KeyT const& k_init) : k(k_init) { } #if GVL_CPP0X hash_set_index_unboxed(KeyT&& k_init) : k(k_init) { } #endif KeyT const& key() const { return k; } KeyT const& value() const { return k; } bool is_empty() const { return !k; } void make_empty() { k = KeyT(); } void assign_value(hash_set_index_unboxed const& v) { k = v.k; } #if GVL_CPP0X void assign_value(hash_set_index_unboxed&& v) { k = GVL_MOVE(v.k); } #endif KeyT k; }; template struct hash_set_unboxed : generic_hash_set_new, KeyT, KeyT, Hash, Compare> { typedef generic_hash_set_new, KeyT, KeyT, Hash, Compare> base; hash_set_unboxed(Hash const& hash = Hash(), Compare const& compare = Compare()) : base(hash, compare) { } #if GVL_CPP0X void insert(KeyT&& v) { base::insert(hash_set_index_unboxed(v)); } #endif void insert(KeyT const& v) { base::insert(hash_set_index_unboxed(v)); } template bool has(SpecKeyT const& v) { return base::lookup(v) != 0; } template KeyT* get(SpecKeyT const& v) { hash_set_index_unboxed* index = base::lookup(v); return index ? &index->k : 0; } template KeyT& operator[](SpecKeyT const& v) { hash_set_index_unboxed* index = base::lookup(v); if(index) return index->k; insert(KeyT(v)); return *k; } template KeyT release(SpecKeyT const& v) { hash_set_index_unboxed* index = base::lookup(v); if(index) { KeyT k(GVL_MOVE(index->k)); index->k = KeyT(); return GVL_MOVE(k); } return index ? index->release() : 0; } template void erase(SpecKeyT const& v) { if(hash_set_index_unboxed* index = base::lookup(v)) index->k = KeyT(); } }; } #endif // UUID_E98E1BBBCFA240F5603AFC8F48E7B59F lierolibre-0.5/src/gvl/io/000077500000000000000000000000001205125547100154765ustar00rootroot00000000000000lierolibre-0.5/src/gvl/io/bitstream.hpp000066400000000000000000000150461205125547100202070ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_4C44D1D95C5C40B194BE5294E8B984DE #define UUID_4C44D1D95C5C40B194BE5294E8B984DE #include "../support/cstdint.hpp" #include "../support/bits.hpp" #include #include #include #include namespace gvl { #define GVL_BITMASK(b) (~(unsigned int)0) >> (32-(b)) template struct basic_ibitstream { typedef uint8_t byte; typedef unsigned int bitbuf_t; // We hope unsigned int is the fastest type to deal with static int const in_buf_bits = BufBytes * 8; static unsigned int const in_buf_mask = GVL_BITMASK(in_buf_bits); basic_ibitstream() : in_bits(0) , in_bit_count(in_buf_bits) { } template basic_ibitstream(basic_ibitstream const& b) : in_bits(b.in_bits) , in_bit_count(b.in_bit_count) { } DerivedT& derived() { return *static_cast(this); } // Number of calls to get_byte that will be done // if 'bits' bits are read from the stream after this // point. std::size_t in_bytes_required(std::size_t bits) const { return in_chunks_required(bits) * BufBytes; } std::size_t in_chunks_required(std::size_t bits) const { return ((bits + in_bit_count - 1) / in_buf_bits); } uint32_t in_bits_in_buffer() const { return in_buf_bits - in_bit_count; } unsigned int in_bits_as_uint() const { return gvl::shr_1_32(in_bits, in_bit_count); } template bitbuf_t get_chunk(); template void ignore_chunks(int c); bitbuf_t get_buf() { return derived().get_chunk(); } void ignore_bufs(int c) { derived().ignore_chunks(c); } void swap(basic_ibitstream& b) { std::swap(in_bit_count, b.in_bit_count); std::swap(in_bits, b.in_bits); } void ignore(uint32_t bits); uint32_t get(); uint32_t get_uint(uint32_t bits); void get_block(void* ptr_, size_t len); uint32_t get_lim(uint32_t low, uint32_t high); void resetg(); void get_debug_mark(); bitbuf_t in_bits; uint32_t in_bit_count; }; template struct basic_obitstream { typedef uint8_t byte; typedef unsigned int bitbuf_t; // We hope unsigned int is the fastest type to deal with static int const out_buf_bits = BufBytes * 8; static unsigned int const out_buf_mask = GVL_BITMASK(out_buf_bits); basic_obitstream() : out_bits(0) , out_bit_count(0) { } template basic_obitstream(basic_obitstream const& b) : out_bits(b.out_bits) , out_bit_count(b.out_bit_count) { } DerivedT& derived() { return *static_cast(this); } // Bits written if 'bytes' calls to put_byte were made // after an initial state of out_bit_count == 0. uint32_t out_bits_written(uint32_t bytes) const { return bytes * 8 + out_bit_count; } // Bits that can be written before 'bytes' calls to // put_byte is issued. uint32_t out_bits_writable(uint32_t bytes) const { return bytes * 8 - out_bit_count; } template void put_chunk(bitbuf_t); void put_buf(bitbuf_t v) { return derived().put_chunk(v); } uint32_t out_bits_in_buffer() const { return out_bit_count; } uint32_t out_bits_bufferable() const { return out_buf_bits - out_bit_count; } unsigned int out_bits_as_uint() const { return out_bits; } void swap(basic_obitstream& b) { std::swap(out_bit_count, b.out_bit_count); std::swap(out_bits, b.out_bits); } void put(uint32_t bit); void put_uint(uint32_t i, uint32_t bits); void put_block(void const* ptr_, std::size_t len); template void put(basic_ibitstream& src, int bits); void resetp(); // Finish and align to the buffer size. This will // call put_chunk at most once. void finish(); // Finish with a different byte alignment. This // will call put_chunk at most [32/(8*C)] times. template void finish_aligned(); void put_debug_mark(); bitbuf_t out_bits; uint32_t out_bit_count; }; // Dummy obitstream to allow normalization of interface of bitstreams. // Throws on all output operations. struct dummy_obitstream { void not_supported() const { throw std::runtime_error("Not supported"); } void put(uint32_t) { not_supported(); } void put_uint(uint32_t, uint32_t) { not_supported(); } void put_block(void const*, std::size_t) { not_supported(); } void resetp() { not_supported(); } void finish() { not_supported(); } void clear() { not_supported(); } template void finish_aligned() { not_supported(); } void put_debug_mark() { not_supported(); } }; // Dummy ibitstream to allow normalization of interface of bitstreams. // Throws on all input operations. struct dummy_ibitstream { void not_supported() const { throw std::runtime_error("Not supported"); } std::size_t in_bytes_required(std::size_t bits) const { not_supported(); return 0; } void ignore(uint32_t bits) { not_supported(); } uint32_t get() { not_supported(); return 0; } uint32_t get_uint(uint32_t bits) { not_supported(); return 0; } void get_block(void* ptr_, size_t len) { not_supported(); } void resetg() { not_supported(); } void get_debug_mark() { not_supported(); } }; } // namespace gvl #include "bitstream_templ.hpp" #endif // UUID_4C44D1D95C5C40B194BE5294E8B984DE lierolibre-0.5/src/gvl/io/bitstream_old.hpp000066400000000000000000000152661205125547100210510ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_C3FD1AEF51C649B23B829FB145771D9C #define UUID_C3FD1AEF51C649B23B829FB145771D9C #include "../support/cstdint.hpp" #include #include #include #include namespace gvl { struct common_ibitstream { }; struct common_obitstream { }; template struct basic_ibitstream // : common_ibitstream { //typedef WordT word; typedef uint8_t byte; //static std::size_t const word_bits = sizeof(word) * CHAR_BIT; typedef unsigned int bitbuf_t; // We hope unsigned int is the fastest type to deal with basic_ibitstream() : in_bits(0) , in_bits_left(0) { } template basic_ibitstream(basic_ibitstream const& b) : in_bits(b.in_bits) , in_bits_left(b.in_bits_left) { } DerivedT& derived() { return *static_cast(this); } // Number of calls to get_byte that will be done // if 'bits' bits are read from the stream after this // point. std::size_t in_bytes_required(std::size_t bits) const { return (bits + 8 - 1 - in_bits_left) / 8; } void swap(basic_ibitstream& b) { std::swap(in_bits_left, b.in_bits_left); std::swap(in_bits, b.in_bits); } void ignore(uint32_t bits); uint32_t get(); uint32_t get_uint(uint32_t bits); void get_block(void* ptr_, size_t len); uint32_t get_lim(uint32_t low, uint32_t high); void resetg(); // NOTE: Assumes that the stream has been read up to a byte boundary. // Stream contents becomes undefined if this isn't true. inline uint8_t unsafe_aligned_get_byte(); inline bool is_aligned(); void get_debug_mark(); uint32_t get_trunc(uint32_t count); uint32_t get_unary(); uint32_t get_golomb(uint32_t m); uint32_t get_rice(uint32_t shift); bitbuf_t in_bits; uint32_t in_bits_left; }; template struct basic_obitstream : common_obitstream { //typedef WordT word; //static std::size_t const word_bits = sizeof(word) * CHAR_BIT; typedef uint8_t byte; typedef unsigned int bitbuf_t; // We hope unsigned int is the fastest type to deal with basic_obitstream() : out_bits(0) , out_bits_left(8) { } template basic_obitstream(basic_obitstream const& b) : out_bits(b.out_bits) , out_bits_left(b.out_bits_left) { } DerivedT& derived() { return *static_cast(this); } // Bits written if 'bytes' calls to put_byte were made // after an initial state of out_bits_left == 8. std::size_t out_bits_written(std::size_t bytes) const { return bytes * 8 + (8 - out_bits_left); } void swap(basic_obitstream& b) { std::swap(out_bits_left, b.out_bits_left); std::swap(out_bits, b.out_bits); } void put(uint32_t bit); void put_uint(uint32_t i, uint32_t bits); void put_block(void const* ptr_, std::size_t len); void put_lim(uint32_t v, uint32_t low, uint32_t high); // Called to allocate a byte just before it's begun. // put_byte() should then write the data to that byte. // By default we don't preallocate bytes. void allocate_out_byte() { } void resetp(); void finish(); // NOTE: Assumes that the stream has been written up to a byte boundary. // Stream contents becomes undefined if this isn't true. inline void unsafe_aligned_put_byte(uint8_t w); inline bool is_aligned(); void put_debug_mark(); void put_trunc(uint32_t v, uint32_t count); void put_unary(uint32_t v); void put_golomb(uint32_t v, uint32_t m); void put_rice(uint32_t v, uint32_t shift); bitbuf_t out_bits; uint32_t out_bits_left; }; // Dummy obitstream to allow normalization of interface of bitstreams. // Throws on all output operations. struct dummy_obitstream { void not_supported() const { throw std::runtime_error("Not supported"); } void put(uint32_t) { not_supported(); } void put_uint(uint32_t, uint32_t) { not_supported(); } void put_block(void const*, std::size_t) { not_supported(); } void put_lim(uint32_t, uint32_t, uint32_t) { not_supported(); } /* template void put(Source&, std::size_t) { not_supported(); } */ void resetp() { not_supported(); } void finish() { not_supported(); } void clear() { not_supported(); } void put_trunc(uint32_t, uint32_t) { not_supported(); } void put_unary(uint32_t) { not_supported(); } void put_golomb(uint32_t, uint32_t) { not_supported(); } void put_rice(uint32_t, uint32_t) { not_supported(); } void put_debug_mark() { not_supported(); } }; // Dummy ibitstream to allow normalization of interface of bitstreams. // Throws on all input operations. struct dummy_ibitstream { void not_supported() const { throw std::runtime_error("Not supported"); } std::size_t in_bytes_required(std::size_t bits) const { not_supported(); return 0; } void ignore(uint32_t bits) { not_supported(); } uint32_t get() { not_supported(); return 0; } uint32_t get_uint(uint32_t bits) { not_supported(); return 0; } void get_block(void* ptr_, size_t len) { not_supported(); } uint32_t get_lim(uint32_t low, uint32_t high) { not_supported(); return 0; } void resetg() { not_supported(); } uint32_t get_trunc(uint32_t count) { not_supported(); return 0; } uint32_t get_unary() { not_supported(); return 0; } uint32_t get_golomb(uint32_t m) { not_supported(); return 0; } uint32_t get_rice(uint32_t shift) { not_supported(); return 0; } void get_debug_mark() { not_supported(); } }; } // namespace gvl #include "bitstream_templ.hpp" #endif // UUID_C3FD1AEF51C649B23B829FB145771D9C lierolibre-0.5/src/gvl/io/bitstream_templ.hpp000066400000000000000000000226541205125547100214130ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "bitstream.hpp" #include "../support/debug.hpp" #include "../support/platform.hpp" #include #if GVL_MSVCPP // Disable "shift count negative or too big, undefined behavior". // We make sure such cases are never reached. #pragma warning(push) #pragma warning(disable: 4293) #endif namespace gvl { template void basic_obitstream::put(uint32_t bit) { uint32_t count = out_bit_count; unsigned int bits = out_bits | (bit << count); ++count; if(count == out_buf_bits) { put_buf(bits); out_bits = 0; out_bit_count = 0; } else { out_bits = bits; out_bit_count = count; } } template void basic_obitstream::put_uint(uint32_t i, uint32_t bits) { // Bits must be at most 32 sassert(bits <= 32); sassert(bits > 0); passert((i & gvl::lsb_mask(bits)) == i, "unwritten bits must be 0"); uint32_t written = out_bit_count; uint32_t buf = out_bits | (i << written); written += bits; if(written >= out_buf_bits) { put_buf(buf & out_buf_mask); written -= out_buf_bits; int consumed_bits = (bits - written); // [1, 32] buf = gvl::shr_1_32(i, consumed_bits); while(out_buf_bits < 32 && written >= out_buf_bits) { put_buf(i & out_buf_mask); written -= out_buf_bits; buf = (buf >> out_buf_bits); } } out_bits = buf; out_bit_count = written; } template void basic_obitstream::put_block(void const* ptr_, size_t len) { uint8_t const* ptr = static_cast(ptr_); uint8_t const* end; if(len == 0) return; end = ptr + len; for(; ptr != end; ++ptr) { put_uint(*ptr, 8); } } template template void basic_obitstream::put(basic_ibitstream& src_, int bits) { T& src = src_.derived(); // TODO: Faster case when both streams are aligned to eachother, i.e. // (BufBytes == BufBytes2 && out_bit_count == src.in_bit_count). while(bits > 32) { put_uint(src.get_uint(32), 32); bits -= 32; } if(bits > 0) put_uint(src.get_uint(bits), bits); } // NOTE: Untested // Integer in [0, count) template void put_trunc(BitWriter& writer, uint32_t v, uint32_t count) { uint32_t bits = gvl::ceil_log2(count); uint32_t p2 = (1 << bits); uint32_t b = count - p2; if(v < p2 - b) writer.put_uint(v, bits); else writer.put_uint(v + b, bits + 1); } // NOTE: Untested template void put_unary(BitWriter& writer, uint32_t v) { for(; v >= 32; v -= 32) writer.put_uint(0, 32); writer.put_uint(1 << v, v + 1); } // NOTE: Untested template void put_golomb(BitWriter& writer, uint32_t v, uint32_t m) { uint32_t quot = v / m; uint32_t rem = v % m; put_unary(writer, quot); put_trunc(writer, rem, m); } // NOTE: Untested template void put_rice(BitWriter& writer, uint32_t v, uint32_t shift) { sassert(shift > 0); uint32_t quot = v >> shift; uint32_t rem = v & gvl::lsb_mask(shift); put_unary(writer, quot); writer.put_uint(rem, shift); } template void put_exprice(BitWriter& writer, uint32_t v, uint32_t shift) { sassert(shift > 0); uint32_t quot = v >> shift; uint32_t rem = v & gvl::lsb_mask(shift); uint32_t prefix = quot + 1; int prefix_bits = gvl::log2(prefix) + 1; put_unary(writer, prefix_bits); if(prefix_bits > 0) writer.put_uint(prefix - (1<> shift) + shift; } template void basic_obitstream::put_debug_mark() { put_uint((1<<15)|1, 16); } template void basic_ibitstream::ignore(uint32_t bits) { uint32_t cursor = in_bit_count; cursor += bits; uint32_t bufs_to_read = cursor / in_buf_bits; if(bufs_to_read >= 1) { derived().ignore_bufs(bufs_to_read - 1); in_bits = get_buf(); } in_bit_count = (cursor % in_buf_bits); } template uint32_t basic_ibitstream::get() { if(in_bit_count == in_buf_bits) { in_bits = get_buf(); in_bit_count = 0; } return (in_bits >> in_bit_count++) & 1; } template uint32_t basic_ibitstream::get_uint(uint32_t bits) { // Bits must be at most 32 sassert(bits <= 32); sassert(bits > 0); uint32_t read = in_bit_count; bitbuf_t buf = in_bits; uint32_t v; uint32_t new_read = read + bits; if(new_read <= in_buf_bits) { // read in [2, 31] in_bit_count = new_read; v = buf >> read; } else { // read in [1, 32] v = gvl::shr_1_32(buf, read); buf = get_buf(); uint32_t written = in_buf_bits - read; // Bits written to v v |= buf << written; written += in_buf_bits; while(in_buf_bits < 32 && written < bits) { buf = get_buf(); written += in_buf_bits; v |= buf << written; } in_bit_count = in_buf_bits - (written - bits); // Didn't use any surplus bits in_bits = buf; } return v & gvl::lsb_mask(bits); } template void basic_ibitstream::get_block(void* ptr_, size_t len) { if(len == 0) return; uint8_t* ptr = static_cast(ptr_); uint8_t* end = ptr + len; for(; ptr != end; ++ptr) *ptr = get_uint(8); } template uint32_t get_trunc(BitReader& reader, uint32_t count) { uint32_t bits = gvl::ceil_log2(count); uint32_t p2 = (1 << bits); uint32_t b = count - p2; uint32_t v = reader.get_uint(bits); if(v < p2 - b) return v; else return ((v << 1) + reader.get()) - b; } // NOTE: Untested template uint32_t get_unary(BitReader& reader) { uint32_t v = 0; for(; !reader.get(); ++v) /* Nothing */; return v; } // NOTE: Untested template uint32_t get_golomb(BitReader& reader, uint32_t m) { uint32_t quot = get_unary(reader); uint32_t rem = get_trunc(reader, m); return quot * m + rem; } // NOTE: Untested template uint32_t get_rice(BitReader& reader, uint32_t shift) { sassert(shift > 0); uint32_t quot = reader.get_unary(); uint32_t rem = reader.get_uint(shift); return (quot << shift) + rem; } template void basic_ibitstream::get_debug_mark() { uint32_t m = get_uint(16); passert(m == ((1<<15)|1), "Debug mark not found"); } template void basic_ibitstream::resetg() { in_bit_count = in_buf_bits; in_bits = 0; } template void basic_obitstream::resetp() { out_bit_count = 0; out_bits = 0; } template void basic_obitstream::finish() { if(out_bit_count > 0) { put_buf(out_bits); out_bits = 0; out_bit_count = 0; } } template template void basic_obitstream::finish_aligned() { int const bit_alignment = ByteAlignment * 8; if(out_bit_count > 0) { while(true) { put_chunk(out_bits & GVL_BITMASK(bit_alignment)); if(out_bit_count <= bit_alignment) break; out_bit_count -= bit_alignment; out_bits >>= bit_alignment; } out_bits = 0; out_bit_count = 0; } } template template unsigned int basic_ibitstream::get_chunk() { bitbuf_t v = derived().get_byte(); for(int i = 1; i < C; ++i) v = (v << 8) | derived().get_byte(); return v; } template template void basic_ibitstream::ignore_chunks(int c) { derived().ignore_bytes(c * C); } template template void basic_obitstream::put_chunk(bitbuf_t v) { for(int i = C - 1; i >= 0; --i) derived().put_byte(v >> (i*8)); } } // namespace gvl #if GVL_MSCVPP #pragma warning(pop) #endif lierolibre-0.5/src/gvl/io/bitstream_templ_old.hpp000066400000000000000000000277751205125547100222620ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "bitstream.hpp" #include "../support/bits.hpp" #include "../support/debug.hpp" #include namespace gvl { template void basic_obitstream::put(uint32_t bit) { uint32_t left = out_bits_left - 1; unsigned int bits = out_bits | (bit << left); if(left == 0) { derived().put_byte(byte(bits)); out_bits = 0; out_bits_left = 8; } else { if(out_bits_left == 8) allocate_out_byte(); // Just began on this byte, allocate it out_bits_left = left; out_bits = bits; } } template void basic_obitstream::put_uint2(uint32_t i, uint32_t bits) { // Bits must be at most 32 sassert(bits <= 32); if(bits == 0) // Need this special case, as lsb_mask is not defined for 0 return; i &= gvl::lsb_mask(bits); /* Clear bits that won't get written */ uint32_t local_out_bits_left = out_bits_left; bitbuf_t local_out_bits = out_bits; if(local_out_bits_left > bits) { /* We can fit it in */ out_bits = (local_out_bits << bits) | i; out_bits_left = local_out_bits_left - bits; } else { // local_out_bits_left <= bits // local_out_bits_left >= 1 int left_over = bits - local_out_bits_left; // local_out_bits_left may be 32 here, but in those cases local_out_bits == 0. local_out_bits = (local_out_bits << local_out_bits_left) | (i >> left_over); while(true) { derived().put_byte(byte(local_out_bits >> 24)); derived().put_byte(byte(local_out_bits >> 16)); derived().put_byte(byte(local_out_bits >> 8)); derived().put_byte(byte(local_out_bits)); int const bufbits = 32; if(bufbits >= 32 || left_over < bufbits) break; left_over -= bufbits; local_out_bits = (i >> left_over) & ((1 << bufbits) - 1); // Mask away all but the first bufbits bits. TODO: Fix this mask } out_bits_left = bufbits - left_over; // left_over <= bufbits - 1, therefore out_bits_left >= 1 out_bits = (i & ((~uint32_t(0) >> 1) >> (out_bits_left - 1))); // This shift works for out_bits_left == [1, 32] } } template void basic_obitstream::put_uint(uint32_t i, uint32_t bits) { // Bits must be at most 32 sassert(bits <= 32); if(bits == 0) // Need this special case, as lsb_mask is not defined for 0 return; /* TODO: Reserve memory first and use unchecked put byte */ i &= gvl::lsb_mask(bits); /* Clear bits that won't get written */ if(out_bits_left > bits) { /* We can fit it in */ out_bits_left -= bits; /* out_bits_left is now the amount to left shift */ /* out_bits_left is the number of zeroes ** after the last written bit. */ out_bits |= i << out_bits_left; } else if(bits > out_bits_left) { bits -= out_bits_left; /* bits is now the amount to right shift (bits left to write afterwards) */ /* bits will be in [1, 31] as out_bits_left is at least 1 */ out_bits |= i >> bits; derived().put_byte(byte(out_bits)); if(bits > 0) derived().allocate_out_byte(); for(; bits >= 8; ) { bits -= 8; /* bits is now the amount to right shift (bits left to write afterwards) */ derived().put_byte(byte(i >> bits)); if(bits > 0) derived().allocate_out_byte(); } /* We know bits < 8, so we can just write in the rest into out_bits */ out_bits = (i << (8 - bits)); out_bits_left = 8 - bits; } else if(bits == out_bits_left) { /* Fitting exactly */ out_bits |= i; /* No need to shift in place because it is already */ derived().put_byte(byte(out_bits)); out_bits = 0; out_bits_left = 8; } } template void basic_obitstream::put_block(void const* ptr_, size_t len) { uint8_t const* ptr = static_cast(ptr_); uint8_t const* end; if(len == 0) return; end = ptr + len; /* TODO: Reserve memory first and use unchecked put byte */ if(out_bits_left == 8) { /* Just write ** TODO: memcpy */ do { derived().allocate_out_byte(); derived().put_byte(*ptr); } while(++ptr != end); /* out_bits should be 0 already, since out_bits_left was 8 */ } else { /* We need to shift */ unsigned int v = out_bits; unsigned int left = out_bits_left; unsigned int right = 8 - left; do { unsigned int b = *ptr++; v += (b >> right); derived().put_byte(byte(v)); derived().allocate_out_byte(); v = (b << left); } while(ptr != end); out_bits = v; /* out_bits_left is correct since we've only written whole bytes */ } } /* Obsoleted in favour of put_trunc void bitstream::put_lim(uint32_t v, uint32_t low, uint32_t high) { passert(v >= low && v <= high, "v is out of range"); while(low != high) { unsigned long mid = low + (high - low)/2; if(v > mid) { put(1); low = mid+1; } else { put(0); high = mid; } } } */ #if 1 // NOTE: Untested // Integer in [0, count) template void basic_obitstream::put_trunc(uint32_t v, uint32_t count) { uint32_t bits = gvl::ceil_log2(count); uint32_t p2 = (1 << bits); uint32_t b = count - p2; if(v < p2 - b) put_uint(v, bits); else put_uint(v + b, bits + 1); } // NOTE: Untested template void basic_obitstream::put_unary(uint32_t v) { for(; v >= 32; v -= 32) put_uint(0, 32); put_uint(1, v+1); } // NOTE: Untested template void basic_obitstream::put_golomb(uint32_t v, uint32_t m) { uint32_t quot = v / m; uint32_t rem = v % m; put_unary(quot); put_trunc(rem, m); } // NOTE: Untested template void basic_obitstream::put_rice(uint32_t v, uint32_t shift) { sassert(shift > 0); uint32_t quot = v >> shift; uint32_t rem = v & gvl::lsb_mask(shift); put_unary(quot); put_uint(rem, shift); } #endif template void basic_obitstream::put_debug_mark() { put_uint((1<<15)|1, 16); } template void basic_ibitstream::ignore(uint32_t bits) { uint32_t cursor = 8 - in_bits_left; cursor += bits; uint32_t bytes_to_read = cursor / 8; if(bytes_to_read >= 1) { derived().ignore_bytes(bytes_to_read - 1); in_bits = derived().get_byte(); } in_bits_left = 8 - (cursor % 8); } template uint32_t basic_ibitstream::get() { if(in_bits_left == 0) { in_bits = derived().get_byte(); in_bits_left = 8; } return (in_bits >> --in_bits_left) & 1; } template uint32_t basic_ibitstream::get_uint(uint32_t bits) { // Bits must be at most 32 sassert(bits <= 32); if(bits == 0) // Need this special case, as lsb_mask and shl_1_32 are not defined for 0 return 0; uint32_t orig_bits = bits; uint32_t v; /* NOTE: in_bits_left can be 0 */ if(bits > in_bits_left) { bits -= in_bits_left; /* bits is now the amount to left shift (bits left to read afterwards) */ /* If in_bits_left is 0 and orig_bits is 32, then bits ** will be 32 at this point. The normal << is not guaranteed to work as intended. */ //v = gvl::shl_1_32(in_bits, bits); v = in_bits; for(; bits >= 8; ) { bits -= 8; /* bits is now the amount to left shift (bits left to read afterwards) */ v = (v << 8) | derived().get_byte(); } if(bits > 0) { in_bits_left = 8 - bits; in_bits = derived().get_byte(); v = (v << bits) | (in_bits >> in_bits_left); } else in_bits_left = 0; } else { /* There's enough */ in_bits_left -= bits; /* in_bits_left is the number of uninteresting bits ** after the last wanted. */ v = (in_bits >> in_bits_left); } return v & gvl::lsb_mask(orig_bits); } template void basic_ibitstream::get_block(void* ptr_, size_t len) { if(len == 0) return; uint8_t* ptr = static_cast(ptr_); uint8_t* end = ptr + len; if(in_bits_left == 0) { /* Just write ** TODO: Check that there is enough to read and memcpy */ do *ptr = derived().get_byte(); while(++ptr != end); /* in_bits will be overwritten later */ } else { /* We need to shift */ unsigned int right = in_bits_left; unsigned int left = 8 - right; unsigned int v = in_bits << left; unsigned int b; do { b = derived().get_byte(); v += (b >> right); *ptr++ = byte(v); v = (b << left); } while(ptr != end); in_bits = byte(b); /* in_bits_left is correct since we've only written whole bytes */ } } // NOTE: TODO: These functions can't handle empty ranges. /* Obsoleted in favour of get_trunc uint32_t bitstream::get_lim(uint32_t low, uint32_t high) { while(low != high) { uint32_t mid = low + (high - low)/2; if(get()) low = mid+1; else high = mid; } return low; } */ #if 1 template uint32_t basic_ibitstream::get_trunc(uint32_t count) { uint32_t bits = gvl::ceil_log2(count); uint32_t p2 = (1 << bits); uint32_t b = count - p2; uint32_t v = get_uint(bits); if(v < p2 - b) return v; else return ((v << 1) + get()) - b; } // NOTE: Untested template uint32_t basic_ibitstream::get_unary() { uint32_t v = 0; for(; !get(); ++v) /* Nothing */; return v; } // NOTE: Untested template uint32_t basic_ibitstream::get_golomb(uint32_t m) { uint32_t quot = get_unary(); uint32_t rem = get_trunc(m); return quot * m + rem; } // NOTE: Untested template uint32_t basic_ibitstream::get_rice(uint32_t shift) { sassert(shift > 0); uint32_t quot = get_unary(); uint32_t rem = get_uint(shift); return (quot << shift) + rem; } #endif template void basic_ibitstream::get_debug_mark() { uint32_t m = get_uint(16); passert(m == ((1<<15)|1), "Debug mark not found"); } template void basic_ibitstream::resetg() { in_bits_left = 0; in_bits = 0; } template void basic_obitstream::resetp() { out_bits_left = 8; out_bits = 0; } template inline bool basic_ibitstream::is_aligned() { return in_bits_left == 0; } template inline bool basic_obitstream::is_aligned() { return out_bits_left == 8; } template inline uint8_t basic_ibitstream::unsafe_aligned_get_byte() { sassert(is_aligned()); // Must be aligned return derived().get_byte(); } template inline void basic_obitstream::unsafe_aligned_put_byte(byte w) { sassert(is_aligned()); // Must be aligned derived().put_byte(w); } /* template void basic_obitstream::clear() { resetp(); derived().clear(); } template void basic_ibitstream::clear() { resetg(); derived().clear(); }*/ template void basic_obitstream::finish() { if(out_bits_left < 32) { derived().put_byte(byte(out_bits)); out_bits = 0; out_bits_left = 32; } } } // namespace gvl lierolibre-0.5/src/gvl/io/brigade2.h000066400000000000000000000314061205125547100173320ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_0C9C2A832513404AD6879FA554E66DA6 #define UUID_0C9C2A832513404AD6879FA554E66DA6 #include #include "../containers/list.h" #ifdef __cplusplus extern "C" { #endif typedef size_t gvl_bucket_size; typedef unsigned char byte; typedef void (*gvl_bucket_destroy)(struct gvl_bucket_data_*); typedef struct gvl_bucket_ gvl_bucket; typedef struct gvl_bucket_data_ gvl_bucket_data; /* typedef struct gvl_object_type_ { } gvl_object_type;*/ typedef struct gvl_bucket_source_type_ { gvl_bucket* (*read) (void*, size_t hint_amount); } gvl_bucket_source_type; typedef struct gvl_bucket_type_ { gvl_bucket_source_type base; void (*destroy)(gvl_bucket_data*); } gvl_bucket_type; /* Bucket data base */ struct gvl_bucket_data_ { int ref_count; }; struct gvl_object_ { void* type; } gvl_object; struct gvl_bucket_source_ { gvl_object base; } gvl_bucket_source; struct gvl_bucket_ { gvl_bucket_source base; gvl_list_node list_node; gvl_bucket_data* data; long begin; long end; }; #define DOWNCAST(to, member_in_to, ptr) ((to*)((char*)(ptr) - offsetof(to, member_in_to))) #define UPCAST(member_in_ptr, ptr) (&(ptr)->member_in_ptr) #define GVL_LIST_NODE_FROM_BUCKET(self) UPCAST(list_node, self) #define GVL_BUCKET_FROM_LIST_NODE(self) DOWNCAST(gvl_bucket, list_node, self) INLINE void gvl_bucket_init( gvl_bucket* self, gvl_bucket_type* type, gvl_bucket_data* data, long begin, long end) { self->type = type; self->data = data; self->begin = begin; self->end = end; } INLINE void gvl_bucket_init_copy( gvl_bucket* self, gvl_bucket* from, long begin, long end) { gvl_bucket_data* data = from->data; self->type = from->type; self->data = data; ++data->ref_count; self->begin = begin; self->end = end; } INLINE void gvl_bucket_new_copy(gvl_bucket_data* from, long begin, long end) { gvl_bucket* self = malloc(sizeof(gvl_bucket)); gvl_bucket_init_copy(self, from, begin, end); } INLINE void gvl_bucket_destroy(gvl_bucket* self) { gvl_bucket_data* data = self->data; if (--self->ref_count == 0) self->type->destroy(data); } #define BLOCK(x) do x; while(0) #define gvl_bucket_destroy(self) BLOCK({ gvl_bucket_data* self_ = (self); self_->type->destroy(self_); }) INLINE size_t gvl_bucket_size(gvl_bucket* self) { return self->end - self->begin; } struct gvl_bucket_data_mem_ { gvl_bucket_data base; byte* end; byte* limit; byte data[1]; // Actually arbitrary size } gvl_bucket_data_mem; gvl_bucket_data_mem* gvl_bucket_data_mem_new(size_t capacity) { gvl_bucket_data_mem* self = malloc(sizeof(gvl_bucket_data_mem) - sizeof(byte) + capacity); gvl_bucket_data_init(&self->base); self->limit = &self->data[capacity]; self->end = &self->data[0]; } #define gvl_bucket_data_mem_ptr(self) ((byte const*)((self)->data)) INLINE gvl_bucket_data_mem_push_back_unsafe_unique(gvl_bucket_data_mem* self, byte b) { *self->end++ = b; } #define gvl_bucket_cut_front(self, amount) BLOCK((self)->begin += (amount)) #define gvl_bucket_cut_back(self, amount) BLOCK((self)->end -= (amount)) void gvl_bucket_split(gvl_bucket* self, size_t point) { size_t self_size = gvl_bucket_size(self); if (point == 0 || point == self_size) return; gvl_list_link_after(&self->list_node, gvl_bucket_new_copy(self, self->begin + point, self->end)); gvl_bucket_cut_back(self, self_size - point); } typedef struct gvl_bucket_reader_ { char* begin; char* end; gvl_list buffer; gvl_bucket_source source; char begin_initialized; void (*on_error)(); } gvl_bucket_reader; INLINE byte gvl_bucket_reader_underflow_get_(gvl_bucket_reader* self) { if(gvl_bucket_reader_next_bucket_(self) != gvl_bucket_ok) { self->on_error(); return 0; } return *self->cur++; } INLINE byte gvl_bucket_reader_get(gvl_bucket_reader* self) { return (self->cur != self->end ? *self->cur++ : gvl_bucket_reader_underflow_get_(self)); } gvl_bucket_status gvl_bucket_reader_next_bucket_(gvl_bucket_reader* self) { if (begin_initialized) { gvl_bucket_destroy( } } // Provides functions for extracting data // from a brigade in a convenient and // efficient manner. // NOTE: You are not allowed to modify buckets // that are buffered. template struct bucket_reader { typedef bucket::size_type size_type; bucket_reader(bucket_source* source) : bucket_list_size_(0) , cur_(0) , end_(0) , source_(source) { } DerivedT* derived() { return static_cast(this); } /* // Different naming to avoid infinite recursion if // not defined in DerivedT. bucket_source* get_source() { return derived()->source(); } */ bucket_source* get_source() { return source_; } size_type read_size() { return bucket_list_size_ + (end_ - cur_); } uint8_t get() { // We keep this function small to encourage // inlining return (cur_ != end_) ? (*cur_++) : underflow_get_(); } // TODO: A get that returns a special value for EOF bucket::status buffer(size_type amount) { size_type cur_read = read_size(); while(cur_read < amount) { bucket::status s = read_bucket_(amount - cur_read); if(s != bucket::ok) return s; cur_read = read_size(); } return bucket::ok; } bucket::status buffer_sequenced(size_type amount, linked_vector& res) { bucket::status s = buffer(amount); if(s != bucket::ok) return s; reinsert_first_bucket(); sequence(mem_buckets_, amount, res); return bucket::ok; } bucket::auto_read_result get_bucket(size_type amount = 0) { if(first_.get()) { correct_first_bucket_(); return bucket::read_result(bucket::ok, first_.release()); } else if(!mem_buckets_.empty()) { return bucket::read_result(bucket::ok, pop_bucket_()); } else return read_bucket_and_return_(amount); } // Non-blocking bucket::auto_read_result try_get_bucket(size_type amount = 0) { if(first_.get()) { correct_first_bucket_(); return bucket::read_result(bucket::ok, first_.release()); } else if(!mem_buckets_.empty()) { return bucket::read_result(bucket::ok, pop_bucket_()); } else return try_read_bucket_and_return_(amount); } /// Amount of data left in the first bucket std::size_t first_left() const { return end_ - cur_; } private: uint8_t underflow_get_() { if(next_bucket_() != bucket::ok) throw "ffs! unexpected error in underflow_get_"; return *cur_++; } /// Discards the current first bucket (if any) and tries to read /// a bucket if necessary. /// Precondition: cur_ == end_ bucket::status next_bucket_() { passert(cur_ == end_, "Still data in the first bucket"); if(!mem_buckets_.empty()) { //first_.reset(pop_bucket_()); set_first_bucket_(pop_bucket_()); return bucket::ok; } // Need to read a bucket // Reset first // No need to do this: cur_ = end_ = 0; first_.reset(); while(true) { bucket::read_result r(get_source()->read()); if(r.s == bucket::ok) { // Callers of next_bucket_ expect the result // in first_ set_first_bucket_(r.b); return bucket::ok; } else if(r.s == bucket::eos) { return bucket::eos; } derived()->block(); } } bucket::status read_bucket_(size_type amount) { while(true) { bucket::read_result r(get_source()->read(amount)); if(r.s == bucket::ok) { add_bucket_(r.b); return bucket::ok; } else if(r.s == bucket::eos) { return bucket::eos; } derived()->flush(); derived()->block(); } } bucket::status try_read_bucket_(size_type amount) { bucket::read_result r(get_source()->read(amount)); if(r.s == bucket::ok) { add_bucket_(r.b); return bucket::ok; } return r.s; } bucket::read_result read_bucket_and_return_(size_type amount) { while(true) { bucket::read_result r(get_source()->read(amount)); if(r.s != bucket::blocking) return r; derived()->flush(); derived()->block(); } } bucket::read_result try_read_bucket_and_return_(size_type amount) { return get_source()->read(amount); } bucket* pop_bucket_() { // Let caller take care of this: passert(!first_.get(), "Still a bucket in first_"); passert(!mem_buckets_.empty(), "mem_buckets_ is empty"); bucket* b = mem_buckets_.first(); mem_buckets_.unlink_front(); size_type s = b->size(); bucket_list_size_ -= s; return b; } /// Apply changes to first bucket void correct_first_bucket_() { if(first_.get()) { bucket* b = first_.release(); std::size_t old_size = b->size(); b->cut_front(old_size - first_left()); //mem_buckets_.relink_front(b); } } /// Apply changes to first bucket and put it back into mem_buckets_ void reinsert_first_bucket() { if(first_.get()) { bucket* b = first_.release(); size_type old_size = b->size(); b->cut_front(old_size - first_left()); cur_ = end_ = 0; mem_buckets_.relink_front(b); } } void set_first_bucket_(bucket* b) { //passert(!first_.get(), "Still a bucket in first_"); passert(mem_buckets_.empty(), "Still buckets in mem_buckets_"); size_type s = b->size(); first_.reset(b); // New first bucket, update cur_ and end_ cur_ = b->get_ptr(); end_ = cur_ + s; passert(bucket_list_size_ == 0, "Incorrect bucket_list_size_"); } void add_bucket_(bucket* b) { size_type s = b->size(); mem_buckets_.relink_back(b); bucket_list_size_ += s; } #if 0 // Not needed (yet) /// To be used when there are no buckets left void add_bucket_empty_(bucket* b) { passert(!first_.get(), "Still a bucket in first_"); passert(mem_buckets_.empty(), "Still buckets in mem_buckets_"); size_type s = b->size(); // TODO: Which to prefer here? Insertion into first or the beginning // of mem_buckets_? #if 0 first_.reset(b); // New first bucket, update cur_ and end_ cur_ = b->get_ptr(); end_ = cur_ + s; passert(bucket_list_size_ == 0, "Incorrect bucket_list_size_"); #else mem_buckets_.relink_back(b); bucket_list_size_ += s; // Buffered bucket #endif } #endif // Total size of buckets in mem_buckets_ size_type bucket_list_size_; uint8_t const* cur_; // Pointer into first_ uint8_t const* end_; // End of data in first_ std::auto_ptr first_; list mem_buckets_; bucket_source* source_; }; struct brigade; struct bucket_writer { bucket_writer(brigade* sink) : sink_(sink) { } /* brigade* sink_brigade() { return static_cast(this)->sink_brigade(); } */ void flush(); void put(uint8_t b) { if(buffer_.full()) overflow_put_(b); else buffer_.unsafe_unique_push_back(b); } void put(bucket* buf); private: void overflow_put_(uint8_t b) { if(buffer_.size() >= 1024) flush(); buffer_.push_back(b); } linked_vector buffer_; brigade* sink_; }; /// A sink that forwards to a brigade template struct basic_brigade_sink : bucket_sink { brigade& get() { return (static_cast(this)->*Get)(); } bucket_sink::status write(bucket* b) { b->unlink(); get().append(b); return bucket_sink::ok; } }; struct brigade : bucket_source { typedef bucket_size size_type; read_result read(size_type amount = 0, bucket* dest = 0) { list::iterator i = buckets.begin(); if(i == buckets.end()) return read_result(eos); read_result r(i->read(amount, 0)); if(r.s == bucket_source::ok) buckets.unlink(r.b); // Success, we may unlink the bucket return r; } void prepend(bucket* b) { buckets.relink_front(b); } void append(bucket* b) { buckets.relink_back(b); } list buckets; }; #ifdef __cplusplus } #endif #endif // UUID_0C9C2A832513404AD6879FA554E66DA6 lierolibre-0.5/src/gvl/io/brigade2.hpp000066400000000000000000000327021205125547100176720ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_0C9C2A832513404AD6879FA554E66DA6 #define UUID_0C9C2A832513404AD6879FA554E66DA6 #include "../containers/list.hpp" #include "../containers/pod_vector.hpp" #include "../containers/linked_vector.hpp" #include "../support/debug.hpp" #include "../support/cstdint.hpp" #include "../resman/shared_ptr.hpp" #include namespace gvl { struct bucket_mem; struct bucket; struct brigade; typedef std::size_t bucket_size; struct bucket_source { typedef bucket_size size_type; enum status { ok, blocking, eos, error }; struct read_result { explicit read_result(status s) : s(s) , b(0) { } read_result(status s, bucket* b) : s(s) , b(b) { } status s; bucket* b; }; // IMPORTANT: TODO: std::auto_ptr isn't necessarily safe // to have in a struct that is meant to be copied. How // do we fix this? Temporarily, we have a copy ctor that // does const_cast. struct auto_read_result { auto_read_result(auto_read_result const& other) : s(other.s) , b(const_cast&>(other.b)) { } explicit auto_read_result(status s) : s(s) { } auto_read_result(status status, bucket* b) : s(s) , b(b) { } /// IMPORTANT: Don't use the read_result passed /// after constructing this. auto_read_result(read_result const& other) : s(other.s) , b(other.b) { } status s; std::auto_ptr b; }; virtual read_result read(size_type amount = 0, bucket* dest = 0) = 0; virtual ~bucket_source() { } }; struct bucket_sink { typedef bucket_size size_type; enum status { ok, part, would_block, error }; /// Writes a bucket to a sink. If bucket_sink::ok is returned, /// takes ownership of 'b' and unlinks it from it's list. /// NOTE: 'b' must be inserted into a list virtual status write(bucket* b) = 0; virtual ~bucket_sink() { } }; struct bucket_data : bucket_source { bucket_data() : ref_count_(1) { } void add_ref() { ++ref_count_; } void release() { if (--ref_count_ <= 0) delete this; } int ref_count_; }; /// Abstract bucket base struct bucket : bucket_source, list_node { bucket() : begin_(0) , end_(-1) { } bucket(bucket const& b, long begin, long end) : begin_(begin) , end_(end) { } bucket(size_type size) : size_(size) , size_known_(true) { } bool size_known() const { return begin_ <= end_; } size_type begin() const { passert(size_known(), "Size is unknown"); return begin_; } size_type end() const { passert(size_known(), "Size is unknown"); return end_; } size_type size() const { passert(size_known(), "Size is unknown"); return static_cast(end_ - begin_); } void split(std::size_t point) { passert(size_known(), "Size is unknown"); passert(0 <= point && point <= size(), "Split point is out of bounds"); if(point == 0 || point == size()) return; // No need to do anything // Insert before // TODO: We should actually let the bucket split itself. // It should at least know when it's being copied. relink_after(new bucket(*this, begin_ + point, end_)); end_ -= (size() - point); } /* /// Returns a pointer to memory for the data of the bucket. /// This function may convert the bucket uint8_t const* get_ptr() { // Default definition throws an error passert(size_known_, "Size is unknown"); passert(!size_known_, "Buckets with known size must define get_ptr()"); throw "TODO: get_ptr() not implemented"; }*/ void cut_front(size_type amount) { passert(size_known(), "Size is unknown"); begin_ += amount; } void cut_back(size_type amount) { passert(size_known(), "Size is unknown"); end_ += amount; passert(begin_ <= end_, ""); } bucket* clone() const { return new bucket(*this, begin_, end_); } ~bucket() { } protected: std::auto_ptr data_; long begin_; long end_; }; struct bucket_data_mem : bucket_data { bucket_data_mem(bucket_mem const& other) : bucket(other) , vec(other.vec) { } bucket_data_mem(linked_vector const& other) : bucket(other.size()) , vec(other) { } bucket_data_mem(move_holder > other) : bucket(other->size()) , vec(other) { } bucket_data_mem(std::size_t s) : bucket(s) , vec(s) { } bucket_data_mem(char const* p, std::size_t s) : bucket(s) , vec(reinterpret_cast(p), s) { } uint8_t const* get_ptr(); void get_vector(linked_vector& dest); read_result read(size_type amount = 0, bucket* dest = 0); void cut_front(size_type amount); bucket* clone(); //pod_vector vec; linked_vector vec; }; void sequence(list& l, std::size_t amount, linked_vector& res); // Provides functions for extracting data // from a brigade in a convenient and // efficient manner. // NOTE: You are not allowed to modify buckets // that are buffered. template struct bucket_reader { typedef bucket::size_type size_type; bucket_reader(bucket_source* source) : bucket_list_size_(0) , cur_(0) , end_(0) , source_(source) { } DerivedT* derived() { return static_cast(this); } /* // Different naming to avoid infinite recursion if // not defined in DerivedT. bucket_source* get_source() { return derived()->source(); } */ bucket_source* get_source() { return source_; } size_type read_size() { return bucket_list_size_ + (end_ - cur_); } uint8_t get() { // We keep this function small to encourage // inlining return (cur_ != end_) ? (*cur_++) : underflow_get_(); } // TODO: A get that returns a special value for EOF bucket::status buffer(size_type amount) { size_type cur_read = read_size(); while(cur_read < amount) { bucket::status s = read_bucket_(amount - cur_read); if(s != bucket::ok) return s; cur_read = read_size(); } return bucket::ok; } bucket::status buffer_sequenced(size_type amount, linked_vector& res) { bucket::status s = buffer(amount); if(s != bucket::ok) return s; reinsert_first_bucket(); sequence(mem_buckets_, amount, res); return bucket::ok; } bucket::auto_read_result get_bucket(size_type amount = 0) { if(first_.get()) { correct_first_bucket_(); return bucket::read_result(bucket::ok, first_.release()); } else if(!mem_buckets_.empty()) { return bucket::read_result(bucket::ok, pop_bucket_()); } else return read_bucket_and_return_(amount); } // Non-blocking bucket::auto_read_result try_get_bucket(size_type amount = 0) { if(first_.get()) { correct_first_bucket_(); return bucket::read_result(bucket::ok, first_.release()); } else if(!mem_buckets_.empty()) { return bucket::read_result(bucket::ok, pop_bucket_()); } else return try_read_bucket_and_return_(amount); } /// Amount of data left in the first bucket std::size_t first_left() const { return end_ - cur_; } private: uint8_t underflow_get_() { if(next_bucket_() != bucket::ok) throw "ffs! unexpected error in underflow_get_"; return *cur_++; } /// Discards the current first bucket (if any) and tries to read /// a bucket if necessary. /// Precondition: cur_ == end_ bucket::status next_bucket_() { passert(cur_ == end_, "Still data in the first bucket"); if(!mem_buckets_.empty()) { //first_.reset(pop_bucket_()); set_first_bucket_(pop_bucket_()); return bucket::ok; } // Need to read a bucket // Reset first // No need to do this: cur_ = end_ = 0; first_.reset(); while(true) { bucket::read_result r(get_source()->read()); if(r.s == bucket::ok) { // Callers of next_bucket_ expect the result // in first_ set_first_bucket_(r.b); return bucket::ok; } else if(r.s == bucket::eos) { return bucket::eos; } derived()->block(); } } bucket::status read_bucket_(size_type amount) { while(true) { bucket::read_result r(get_source()->read(amount)); if(r.s == bucket::ok) { add_bucket_(r.b); return bucket::ok; } else if(r.s == bucket::eos) { return bucket::eos; } derived()->flush(); derived()->block(); } } bucket::status try_read_bucket_(size_type amount) { bucket::read_result r(get_source()->read(amount)); if(r.s == bucket::ok) { add_bucket_(r.b); return bucket::ok; } return r.s; } bucket::read_result read_bucket_and_return_(size_type amount) { while(true) { bucket::read_result r(get_source()->read(amount)); if(r.s != bucket::blocking) return r; derived()->flush(); derived()->block(); } } bucket::read_result try_read_bucket_and_return_(size_type amount) { return get_source()->read(amount); } bucket* pop_bucket_() { // Let caller take care of this: passert(!first_.get(), "Still a bucket in first_"); passert(!mem_buckets_.empty(), "mem_buckets_ is empty"); bucket* b = mem_buckets_.first(); mem_buckets_.unlink_front(); size_type s = b->size(); bucket_list_size_ -= s; return b; } /// Apply changes to first bucket void correct_first_bucket_() { if(first_.get()) { bucket* b = first_.release(); std::size_t old_size = b->size(); b->cut_front(old_size - first_left()); //mem_buckets_.relink_front(b); } } /// Apply changes to first bucket and put it back into mem_buckets_ void reinsert_first_bucket() { if(first_.get()) { bucket* b = first_.release(); size_type old_size = b->size(); b->cut_front(old_size - first_left()); cur_ = end_ = 0; mem_buckets_.relink_front(b); } } void set_first_bucket_(bucket* b) { //passert(!first_.get(), "Still a bucket in first_"); passert(mem_buckets_.empty(), "Still buckets in mem_buckets_"); size_type s = b->size(); first_.reset(b); // New first bucket, update cur_ and end_ cur_ = b->get_ptr(); end_ = cur_ + s; passert(bucket_list_size_ == 0, "Incorrect bucket_list_size_"); } void add_bucket_(bucket* b) { size_type s = b->size(); mem_buckets_.relink_back(b); bucket_list_size_ += s; } #if 0 // Not needed (yet) /// To be used when there are no buckets left void add_bucket_empty_(bucket* b) { passert(!first_.get(), "Still a bucket in first_"); passert(mem_buckets_.empty(), "Still buckets in mem_buckets_"); size_type s = b->size(); // TODO: Which to prefer here? Insertion into first or the beginning // of mem_buckets_? #if 0 first_.reset(b); // New first bucket, update cur_ and end_ cur_ = b->get_ptr(); end_ = cur_ + s; passert(bucket_list_size_ == 0, "Incorrect bucket_list_size_"); #else mem_buckets_.relink_back(b); bucket_list_size_ += s; // Buffered bucket #endif } #endif // Total size of buckets in mem_buckets_ size_type bucket_list_size_; uint8_t const* cur_; // Pointer into first_ uint8_t const* end_; // End of data in first_ std::auto_ptr first_; list mem_buckets_; bucket_source* source_; }; struct brigade; struct bucket_writer { bucket_writer(brigade* sink) : sink_(sink) { } /* brigade* sink_brigade() { return static_cast(this)->sink_brigade(); } */ void flush(); void put(uint8_t b) { if(buffer_.full()) overflow_put_(b); else buffer_.unsafe_unique_push_back(b); } void put(bucket* buf); private: void overflow_put_(uint8_t b) { if(buffer_.size() >= 1024) flush(); buffer_.push_back(b); } linked_vector buffer_; brigade* sink_; }; /// A sink that forwards to a brigade template struct basic_brigade_sink : bucket_sink { brigade& get() { return (static_cast(this)->*Get)(); } bucket_sink::status write(bucket* b) { b->unlink(); get().append(b); return bucket_sink::ok; } }; struct brigade : bucket_source { typedef bucket_size size_type; read_result read(size_type amount = 0, bucket* dest = 0) { list::iterator i = buckets.begin(); if(i == buckets.end()) return read_result(eos); read_result r(i->read(amount, 0)); if(r.s == bucket_source::ok) buckets.unlink(r.b); // Success, we may unlink the bucket return r; } void prepend(bucket* b) { buckets.relink_front(b); } void append(bucket* b) { buckets.relink_back(b); } list buckets; }; } #endif // UUID_0C9C2A832513404AD6879FA554E66DA6 lierolibre-0.5/src/gvl/io/common_bitstream.hpp000066400000000000000000000203561205125547100215570ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_706A361125654B859FE4FABB7193DE74 #define UUID_706A361125654B859FE4FABB7193DE74 #include "bitstream.hpp" #include "../support/cstdint.hpp" #include "../containers/deque.hpp" #include #include namespace gvl { struct vector_bitstream; template struct range_ibitstream : gvl::basic_ibitstream, BufBytes> // obitstream that throws on output operations. // Needed to normalize interface for templates (notably uevent<>) , gvl::dummy_obitstream { typedef gvl::basic_ibitstream, BufBytes> ibase; range_ibitstream( RandomAccessIterator cur, RandomAccessIterator end) : cur(cur) , end(end) { } range_ibitstream(vector_bitstream const&); // Default copy ctor and op= are fine template unsigned int get_chunk() { sassert(C == BufBytes); if(cur == end) throw std::runtime_error("Bitstream exhausted"); return *cur++; } template void ignore_chunks(int c) { sassert(C == BufBytes); if(end - cur < c) throw std::runtime_error("Bitstream exhausted"); cur += c; } std::size_t bits_left() const { return (end - cur) * 8 + (ibase::in_buf_bits - this->in_bit_count); } RandomAccessIterator cur; RandomAccessIterator end; }; typedef range_ibitstream array_ibitstream; template struct range_obitstream : gvl::basic_obitstream, BufBytes> , gvl::dummy_ibitstream { typedef gvl::basic_obitstream, BufBytes> obase; range_obitstream() { } range_obitstream(OutputRange r) : range(r) { } // Default copy ctor and op= are fine template inline void put_chunk(unsigned int chunk) { sassert(C == BufBytes); range.put(chunk); } OutputRange range; }; struct vector_bitstream : gvl::basic_ibitstream , gvl::basic_obitstream { typedef gvl::basic_ibitstream ibase; typedef gvl::basic_obitstream obase; vector_bitstream() : in_pos(0) { } #if GVL_CPP0X vector_bitstream(vector_bitstream&& other) : ibase(std::move(other)) , obase(std::move(other)) , in_pos(other.in_pos) , data(std::move(other.data)) { // Destruction is safe already } vector_bitstream& operator=(vector_bitstream&& other) { ibase::operator=(std::move(other)); obase::operator=(std::move(other)); in_pos = other.in_pos; data = std::move(other.data); return *this; } #endif // NOTE: Caller is expected to verify that the number of bits // left in (bs) is at least (size_init). vector_bitstream(array_ibitstream& bs, std::size_t size_init) : gvl::basic_ibitstream(bs) , in_pos(0) , data(bs.cur, bs.cur + bs.in_chunks_required(size_init)) { } template inline unsigned int get_chunk(); template inline void put_chunk(unsigned int chunk); template inline void ignore_chunks(int c); uint32_t size() const { return out_bits_written(uint32_t(data.size())); } void swap(vector_bitstream& b) { gvl::basic_ibitstream::swap(b); gvl::basic_obitstream::swap(b); std::swap(in_pos, b.in_pos); data.swap(b.data); } // To be able to overload put using gvl::basic_obitstream::put; // NOTE: Does not consume anything from bs void put(vector_bitstream& bs) { put_uint(bs.in_bits_as_uint(), bs.in_bits_in_buffer()); for(std::size_t i = bs.in_pos; i < bs.data.size(); ++i) put_uint(bs.data[i], 32); put_uint(bs.out_bits_as_uint(), bs.out_bits_in_buffer()); } void rewindg() { resetg(); in_pos = 0; } void clear() { resetp(); resetg(); data.clear(); rewindg(); } std::size_t in_pos; std::vector data; private: // Non-copyable vector_bitstream(vector_bitstream const&); vector_bitstream& operator=(vector_bitstream const&); }; template<> inline unsigned int vector_bitstream::get_chunk<4>() { if(in_pos == data.size()) throw std::runtime_error("Bitstream exhausted"); return gvl::bswap_le(data[in_pos++]); } template<> inline void vector_bitstream::put_chunk<4>(unsigned int chunk) { data.push_back(gvl::bswap_le(chunk)); } template<> inline void vector_bitstream::ignore_chunks<4>(int c) { if(data.size() - in_pos < c) throw std::runtime_error("Bitstream exhausted"); in_pos += c; } template inline range_ibitstream::range_ibitstream(vector_bitstream const& bs) : gvl::basic_ibitstream >(bs) , cur(bs.data.empty() ? 0 : (&bs.data[0] + bs.in_pos)) , end(cur + bs.in_chunks_required(bs.size())) { } struct deque_bitstream : gvl::basic_ibitstream, gvl::basic_obitstream { typedef gvl::basic_ibitstream ibase; typedef gvl::basic_obitstream obase; deque_bitstream() { } #if GVL_CPP0X deque_bitstream(deque_bitstream&& other) : ibase(std::move(other)) , obase(std::move(other)) , data(std::move(other.data)) { // Destruction is safe already } deque_bitstream& operator=(deque_bitstream&& other) { ibase::operator=(std::move(other)); obase::operator=(std::move(other)); data = std::move(other.data); return *this; } #endif template inline void put_chunk(unsigned int v); template inline unsigned int get_chunk(); template inline void ignore_chunks(std::size_t c); uint32_t size() const { return out_bits_written(uint32_t(data.size())); } #if 0 void swap(deque_bitstream& b) { gvl::basic_obitstream::swap(b); data.swap(b.data); } #endif // To be able to overload put using gvl::basic_obitstream::put; // NOTE: Does not consume anything from bs void put(vector_bitstream const& bs) { put_uint(bs.in_bits_as_uint(), bs.in_bits_in_buffer()); for(std::size_t i = bs.in_pos; i < bs.data.size(); ++i) put_uint(bs.data[i], 32); put_uint(bs.out_bits_as_uint(), bs.out_bits_in_buffer()); } void clear() { resetp(); data.clear(); } gvl::deque data; private: // Non-copyable deque_bitstream(deque_bitstream const&); deque_bitstream& operator=(deque_bitstream const&); }; template<> inline void deque_bitstream::put_chunk<4>(unsigned int v) { data.push_back(gvl::bswap_le(v)); } template<> inline unsigned int deque_bitstream::get_chunk<4>() { if(data.empty()) throw std::runtime_error("Bitstream exhausted"); unsigned int v = gvl::bswap_le(data.front()); data.pop_front(); } template<> inline void deque_bitstream::ignore_chunks<4>(std::size_t c) { if(data.size() < c) throw std::runtime_error("Bitstream exhausted"); data.pop_front_n(c); } } // namespace gvl #endif // UUID_706A361125654B859FE4FABB7193DE74 lierolibre-0.5/src/gvl/io/convert.cpp000066400000000000000000000031031205125547100176570ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "convert.hpp" namespace gvl { uint8_t const no_caps[] = "0123456789abcdefghijklmnopqrstuvwxyz"; uint8_t const caps[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } lierolibre-0.5/src/gvl/io/convert.hpp000066400000000000000000000107611205125547100176740ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_EA9A2A74DD9448CF4ABAC285FDC42F3A #define UUID_EA9A2A74DD9448CF4ABAC285FDC42F3A #include "../support/debug.hpp" #include "../support/opt.hpp" #include "../meta/as_unsigned.hpp" namespace gvl { inline prepared_division const& get_base_divider(int base) { static prepared_division const base_dividers[36-1] = { prepared_division(2), prepared_division(3), prepared_division(4), prepared_division(5), prepared_division(6), prepared_division(7), prepared_division(8), prepared_division(9), prepared_division(10), prepared_division(11), prepared_division(12), prepared_division(13), prepared_division(14), prepared_division(15), prepared_division(16), prepared_division(17), prepared_division(18), prepared_division(19), prepared_division(20), prepared_division(21), prepared_division(22), prepared_division(23), prepared_division(24), prepared_division(25), prepared_division(26), prepared_division(27), prepared_division(28), prepared_division(29), prepared_division(30), prepared_division(31), prepared_division(32), prepared_division(33), prepared_division(34), prepared_division(35), prepared_division(36) }; sassert(base >= 2 && base <= 36); return base_dividers[base-2]; } extern uint8_t const no_caps[]; extern uint8_t const caps[]; template int uint_to_ascii(Writer& writer, T x, int base = 10, int min_digits = 1, bool uppercase = false) { if(base < 2 || base > 36) return -1; prepared_division div = get_base_divider(base); std::size_t const buf_size = sizeof(T) * CHAR_BIT; uint8_t digits[buf_size]; uint8_t* e = digits + buf_size; uint8_t* p = e; uint8_t const* names = uppercase ? caps : no_caps; while(min_digits-- > 0 || x > 0) { std::pair res(div.quot_rem(x)); *--p = names[res.second]; x = res.first; } writer.put(p, e - p); return 0; } template int uint_to_ascii_base(Writer& writer, T x, int min_digits = 1, bool uppercase = false) { std::size_t const buf_size = sizeof(T) * CHAR_BIT; uint8_t digits[buf_size]; uint8_t* e = digits + buf_size; uint8_t* p = e; uint8_t const* names = uppercase ? caps : no_caps; while(min_digits-- > 0 || x > 0) { int n = x % Base; *--p = names[n]; x /= Base; } writer.put(p, e - p); return 0; } template void int_to_ascii_base(Writer& writer, T x, int min_digits = 1, bool uppercase = false) { typedef typename as_unsigned::type unsigned_t; if(x < 0) { writer.put('-'); uint_to_ascii_base(writer, unsigned_t(-x), min_digits, uppercase); } else { uint_to_ascii_base(writer, unsigned_t(x), min_digits, uppercase); } } template void int_to_ascii(Writer& writer, T x, int base = 10, int min_digits = 1, bool uppercase = false) { typedef typename as_unsigned::type unsigned_t; if(x < 0) { writer.put('-'); uint_to_ascii(writer, unsigned_t(-x), base, min_digits, uppercase); } else { uint_to_ascii(writer, unsigned_t(x), base, min_digits, uppercase); } } } #endif // UUID_EA9A2A74DD9448CF4ABAC285FDC42F3A lierolibre-0.5/src/gvl/io/deflate_filter.hpp000066400000000000000000000120551205125547100211630ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_1EB2DB01C1DC4C74569FE0B1E099291B #define UUID_1EB2DB01C1DC4C74569FE0B1E099291B #include "stream.hpp" #include namespace gvl { // TODO: IMPORTANT: apply should return read_ok if it appends a bucket to in_buffer, // otherwise it should return something else. Make sure this happens everywhere. struct deflate_filter : filter { deflate_filter(bool compress) : compress(compress) , ended(false) { str.zalloc = 0; str.zfree = 0; str.opaque = 0; if(compress) deflateInit(&str, Z_DEFAULT_COMPRESSION); else inflateInit(&str); str.avail_in = 0; prepare_out_bucket(); } ~deflate_filter() { close(); if(compress) deflateEnd(&str); else inflateEnd(&str); } read_status apply(apply_mode mode, size_type amount = 0) { if(ended) return read_blocking; bool written = false; int deflate_flags = Z_NO_FLUSH; if(mode == am_flushing) deflate_flags = Z_SYNC_FLUSH; else if(mode == am_closing) { if(compress) deflate_flags = Z_FINISH; else deflate_flags = Z_SYNC_FLUSH; } /* if((rand() % 110) == 0) throw gvl::stream_error("Random error"); */ while(true) { if(str.avail_in == 0) { if(filter_buffer.empty()) { if(mode == am_non_pulling) { break; // Done } else if(mode == am_pulling) { read_result res = source->read(amount); if(res.s != read_ok) { if(str.next_out != &buffer->data[0]) { // We have a bucket, fine break; } else { return res.s; } } else { prepare_in_bucket(res.b); } } } else { prepare_in_bucket(filter_buffer.unlink_first()); } } if(str.avail_out == 0) { written = true; prepare_out_bucket(); if(mode == am_pulling) break; } /* am_non_pulling: Just run deflate until there is no more buffered input. am_pulling: Run deflate until we cannot pull anything more OR we have written one bucket. am_flushing: Run deflate until there is no more buffered input am_closing Run deflate until Z_STREAM_END is returned */ int ret; if(compress) ret = deflate(&str, deflate_flags); else ret = inflate(&str, deflate_flags); if(ret == Z_STREAM_END) { ended = true; break; } else if(ret != Z_OK) { printf("avail_in = %d, avail_out = %d\n", str.avail_in, str.avail_out); throw stream_error("Error while deflating"); } if((deflate_flags == Z_SYNC_FLUSH) && str.avail_in == 0) break; } // Force away any out_bucket when flushing or closing if((mode == am_flushing || mode == am_closing || mode == am_pulling) && str.next_out != &buffer->data[0]) { // We have a bucket, fine, pass it through and make a new. written = true; prepare_out_bucket(); } return written ? read_ok : read_blocking; } void prepare_in_bucket(bucket* in_bucket_new) { in_bucket.reset(in_bucket_new); str.next_in = reinterpret_cast(const_cast(in_bucket->get_ptr())); str.avail_in = uInt(in_bucket->size()); } void prepare_out_bucket() { if(buffer.get()) { buffer->size_ = str.next_out - &buffer->data[0]; in_buffer.append(new gvl::bucket(buffer.release())); } std::size_t const buf_size = 1024; buffer.reset(gvl::bucket_data_mem::create(buf_size, 0)); str.avail_out = buf_size; str.next_out = reinterpret_cast(&buffer->data[0]); } z_stream str; std::auto_ptr buffer; std::auto_ptr in_bucket; bool compress; bool ended; // TODO: The stream should have some state for closed }; } #endif // UUID_1EB2DB01C1DC4C74569FE0B1E099291B lierolibre-0.5/src/gvl/io/device_buf.cpp000066400000000000000000000121001205125547100202670ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "device_buf.hpp" #include #include #include #include "../support/debug.hpp" #include "../support/log.hpp" namespace gvl { byte* device_buf::out_reserve(std::size_t size) { return out_buf.insert_uninitialized(size); } // Writes the bytes in [p, p + size) to the stream void device_buf::out(byte const* p, std::size_t size) { if(out_buf.empty() && size > out_buffer_size) { // Try to bypass buffering to avoid unnecessary copying of larger blocks try { std::size_t written = write(p, size); sassert(written <= size); size -= written; if(size == 0) return; // We wrote all of it successfully, nothing to buffer so return p += written; } catch(stream_error&) { state.set(error_bit); throw; } } // Insert into stream out_buf.insert(p, size); if(out_buf.size() > out_buffer_size) flush(); // Time to flush } // Tries to write the buffered data to the stream bool device_buf::flush() { if(out_buf.empty()) return true; try { std::size_t written = write(&out_buf[0], out_buf.size()); sassert(written <= out_buf.size()); out_buf.consume(written); out_buffer_size = std::max(std::size_t(1024ul), out_buf.size() * std::size_t(2ul)); // TODO: What factor should be used here? } catch(stream_error&) { state.set(error_bit); throw; } return out_buf.empty(); } void device_buf::do_close() { } void device_buf::close() { flush(); do_close(); } ///// device_buf::device_buf() : out_buffer_size(1024), in_blocking(0) , state(0) , throw_on(0) { } device_buf::device_buf(byte const* p, std::size_t s) : in_buf(p, s), in_blocking(0) , state(0) , throw_on(0) { } device_buf::~device_buf() { //close(); // We can't close here because it might make us call a pure-virtual function } // Tries to buffer //size// bytes. Returns true if successful, false otherwise. // This function may block until the request is fulfilled if a blocking policy is specified. bool device_buf::in(std::size_t size) { if(in_available() >= size) return true; try { while(true) { try_read_amount_(size); if(in_available() >= size) return true; if(in_blocking) { flush(); // Perhaps we don't get any data because some request is still in the pipeline, flush in_blocking(this); continue; } return false; } } // TODO: Optional throw on eof catch(stream_eof&) { if(throw_on.any(eof_bit)) throw stream_error(0); return false; } catch(stream_error&) { state.set(error_bit); throw; } } bool device_buf::eof() const { return state.any(eof_bit); } // Tries to buffer //size// bytes. Returns true if any bytes were buffered. bool device_buf::try_read_amount_(std::size_t size) { passert(size >= in_buf.size(), "Request met already"); std::size_t old_size = in_buf.size(); std::size_t add = size - old_size; if(add < in_buffer_size) { add = in_buffer_size; // We try to read at least buffer_size bytes size = old_size + add; } in_buf.resize(size); sassert(size == in_buf.size()); sassert(size == old_size + add); try { std::size_t amount_read = read(&in_buf[old_size], add); in_buf.resize(old_size + amount_read); return amount_read > 0; } catch(stream_eof&) { in_buf.resize(old_size); state.set(eof_bit); throw; } return false; } void device_buf::in_pad(std::size_t size) { in_buf.insert(byte(0), size); } void device_buf::in_direct_fill(byte const* p, std::size_t size) { in_buf.insert(p, size); } // Returns a pointer to a buffer in_available() long byte const* device_buf::in_buffer() const { return in_buf.data(); } // Consumes the first //size// bytes in the buffer void device_buf::in_consume(std::size_t size) { in_buf.consume(size); } } // namespace gvl lierolibre-0.5/src/gvl/io/device_buf.hpp000066400000000000000000000075761205125547100203210ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_64B0E52C08964372A4C2ED8157FCEE5F #define UUID_64B0E52C08964372A4C2ED8157FCEE5F #include #include #include #include "../containers/buffer.hpp" //#include "common.hpp" #include "../support/debug.hpp" #include "../support/flags.hpp" #include "../support/cstdint.hpp" namespace gvl { typedef uint8_t byte; struct stream_error : std::exception { stream_error(int e) { } virtual char const* what() const throw() { return "Stream error"; } int e; }; struct stream_eof : stream_error { stream_eof() : stream_error(-1) { } virtual char const* what() const throw() { return "EOF"; } }; struct device_buf { enum { eof_bit = (1<<0), error_bit = (1<<1) }; static std::size_t const in_buffer_size = 1024; static std::size_t const eof_value = std::size_t(-1); device_buf(); device_buf(byte const* p, std::size_t s); virtual ~device_buf(); byte* out_reserve(std::size_t size); void out(byte const* p, std::size_t size); inline void out(byte p); bool flush(); void close(); inline std::size_t in_available() const; bool in(std::size_t size); byte const* in_buffer() const; void in_consume(std::size_t size); void in_pad(std::size_t size); void in_direct_fill(byte const* p, std::size_t size); bool eof() const; void exceptions(unsigned char f) { throw_on = basic_flags(f); } void blocking(void (*in_blocking_new)(device_buf*)) { in_blocking = in_blocking_new; } bool good() const { return state.no(eof_bit | error_bit); } protected: void check_throw() { if(state.any(throw_on.as_integer())) throw stream_error(0); } virtual void do_close(); virtual std::size_t write(byte const* p, std::size_t size) = 0; virtual std::size_t read(byte* p, std::size_t size) = 0; bool try_read_amount_(std::size_t size); buffer out_buf; buffer in_buf; std::size_t out_buffer_size; void (*in_blocking)(device_buf*); // Function to be called when a read request fails because of underflow basic_flags state; basic_flags throw_on; }; inline void device_buf::out(byte p) { // TODO: If out_buf was resized so that it would be full at the next flush moment, // we only need to do one check here. out_buf.put(p); if(out_buf.size() > out_buffer_size) flush(); // Time to flush } inline std::size_t device_buf::in_available() const { return in_buf.size(); } } // namespace gvl #endif // UUID_64B0E52C08964372A4C2ED8157FCEE5F lierolibre-0.5/src/gvl/io/devnull.hpp000066400000000000000000000034571205125547100176710ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_1C533FF78AD74C33BFB68ABED75A692E #define UUID_1C533FF78AD74C33BFB68ABED75A692E #include "stream.hpp" namespace gvl { struct devnull : stream { read_result read(size_type amount = 0, bucket* dest = 0) { return read_result(read_eos); } write_result write(bucket* b) { unlink(b); delete b; return write_result(write_ok, true); } }; } #endif // UUID_1C533FF78AD74C33BFB68ABED75A692E lierolibre-0.5/src/gvl/io/encoding.cpp000066400000000000000000000151721205125547100177760ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "encoding.hpp" namespace gvl { stream::read_result octet_stream_reader::get_bucket(size_type amount) { if(first_.get()) { correct_first_bucket_(); return stream::read_result(stream::read_ok, first_.release()); } else return read_bucket_and_return_(amount); } // Non-blocking stream::read_result octet_stream_reader::try_get_bucket(size_type amount) { if(first_.get()) { correct_first_bucket_(); return stream::read_result(stream::read_ok, first_.release()); } else return try_read_bucket_and_return_(amount); } shared_ptr octet_stream_reader::detach() { if(has_source()) { correct_first_bucket_(); shared_ptr ret = source_.release(); if(first_.get()) ret->unread(first_.release()); cur_ = end_ = 0; sassert(cur_ == end_); sassert(!first_.get()); return ret; } else return source_.release(); } uint8_t octet_stream_reader::underflow_get_() { stream::read_status status = next_bucket_(); if(status != stream::read_ok) throw stream_read_error(status, "Read error in get()"); return *cur_++; } stream::read_status octet_stream_reader::underflow_get_(uint8_t& ret) { if(!source_) return stream::read_error; stream::read_status s = next_bucket_(); if(s != stream::read_ok) return s; ret = *cur_++; return stream::read_ok; } stream::read_status octet_stream_reader::next_bucket_(uint32_t amount) { passert(cur_ == end_, "Still data in the first bucket"); check_source(); // Need to read a bucket // Reset first // No need to do this: cur_ = end_ = 0; first_.reset(); //while(true) { stream::read_result r(source_->read(amount)); if(r.s == stream::read_ok) { // Callers of next_bucket_ expect the result // in first_ set_first_bucket_(r.b); return stream::read_ok; } else if(r.s == stream::read_eos) { return stream::read_eos; } // TODO: derived()->block(); } return stream::read_blocking; } stream::read_result octet_stream_reader::read_bucket_and_return_(size_type amount) { check_source(); //while(true) { stream::read_result r(source_->read(amount)); if(r.s != stream::read_blocking) return r; /* TODO: derived()->flush(); derived()->block(); */ } return stream::read_result(stream::read_blocking); } stream::write_status octet_stream_writer::flush_buffer(bucket_size new_buffer_size) { std::size_t size = buffer_size_(); if(size > 0) { sassert((cap_ & (cap_ - 1)) == 0); correct_buffer_(); gvl::list b; b.push_back(new bucket(buffer_.release(), 0, size)); stream::write_result res = sink_->write_or_buffer(b.first()); // TODO: Improve if(size > estimated_needed_buffer_size_) estimated_needed_buffer_size_ <<= 1; else if(size + 256 < estimated_needed_buffer_size_) estimated_needed_buffer_size_ >>= 1; estimated_needed_buffer_size_ = std::max(estimated_needed_buffer_size_, bucket_size(default_initial_bucket_size)); if(new_buffer_size == 0) cap_ = estimated_needed_buffer_size_; else { cap_ = 1; while(cap_ < new_buffer_size) cap_ *= 2; } cap_ = std::min(cap_, max_bucket_size); buffer_.reset(bucket_data_mem::create(cap_, 0)); cur_ = buffer_->data; end_ = buffer_->data + cap_; return res.s; } return stream::write_ok; } stream::write_status octet_stream_writer::weak_flush(bucket_size new_buffer_size) { return flush_buffer(new_buffer_size); } stream::write_status octet_stream_writer::flush(bucket_size new_buffer_size) { stream::write_status res = flush_buffer(new_buffer_size); if(res != stream::write_ok) return res; return sink_->flush(); } stream::write_status octet_stream_writer::put_bucket(bucket* buf) { stream::write_status res = flush_buffer(); stream::write_result res2 = sink_->write_or_buffer(buf); return res != stream::write_ok ? res : res2.s; } stream::write_status octet_stream_writer::overflow_put_(uint8_t b) { check_sink(); if(buffer_size_() >= max_bucket_size) { stream::write_status ret = weak_flush(); sassert(cur_ != end_); *cur_++ = b; return ret; } else { correct_buffer_(); cap_ *= 2; buffer_.reset(buffer_->enlarge(cap_)); buffer_->unsafe_push_back(b); read_in_buffer_(); return stream::write_ok; } } stream::write_status octet_stream_writer::overflow_put_(uint8_t const* p, std::size_t len) { check_sink(); // As long as fitting in the current buffer would make it // too large, write as much as possible and flush. while((cur_ - buffer_->data) + len >= max_bucket_size) { std::size_t left = end_ - cur_; // Copy as much as we can std::memcpy(cur_, p, left); cur_ += left; p += left; len -= left; // Flush and try to allocate a buffer large enough for the rest of the data stream::write_status ret = weak_flush(len); if(ret != stream::write_ok) return ret; } // Write the rest ensure_cap_((cur_ - buffer_->data) + len); std::memcpy(cur_, p, len); cur_ += len; return stream::write_ok; } void octet_stream_writer::ensure_cap_(std::size_t s) { if(cap_ < s) { correct_buffer_(); while(cap_ < s) cap_ *= 2; buffer_.reset(buffer_->enlarge(cap_)); //sassert(size_ == buffer_->size_); cur_ = buffer_->data + buffer_->size_; end_ = buffer_->data + cap_; sassert(std::size_t(cur_ - buffer_->data) == buffer_->size_); } } } lierolibre-0.5/src/gvl/io/encoding.hpp000066400000000000000000000332331205125547100200010ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_ADEA58A2C81F42C25E8CAFA32ED72A18 #define UUID_ADEA58A2C81F42C25E8CAFA32ED72A18 #include "stream.hpp" #include "convert.hpp" #include "../resman/shared.hpp" #include "../support/algorithm.hpp" #include "../support/platform.hpp" #include "../containers/string.hpp" #include #include // TEMP (maybe) namespace gvl { template struct basic_text_writer { DerivedT& derived() { return *static_cast(this); } DerivedT const& derived() const { return *static_cast(this); } }; //void sequence(list& l, std::size_t amount, linked_vector& res); // Provides functions for extracting data // from a stream in a convenient and // efficient manner. // NOTE: You are not allowed to modify buckets // that are buffered. struct octet_stream_reader : gvl::shared { typedef bucket::size_type size_type; octet_stream_reader(shared_ptr source_init) : cur_(0) , end_(0) , source_(source_init) { } octet_stream_reader() : cur_(0) , end_(0) , source_() { } /* // Different naming to avoid infinite recursion if // not defined in DerivedT. bucket_source* get_source() { return derived()->source(); } */ /* shared_ptr get_source() { return source_; }*/ uint8_t get() { // We keep this function small to encourage // inlining return (cur_ != end_) ? (*cur_++) : underflow_get_(); } void get(uint8_t* dest, std::size_t len) { while(true) { std::size_t piece = std::min(std::size_t(end_ - cur_), len); memcpy(dest, cur_, piece); dest += piece; cur_ += piece; len -= piece; if(len == 0) break; stream::read_status status = next_bucket_(uint32_t(len)); if(status != stream::read_ok) throw stream_read_error(status, "Read error in get()"); } } stream::read_status try_skip() { if(cur_ != end_) { ++cur_; return stream::read_ok; } else { uint8_t dummy; return underflow_get_(dummy); } } stream::read_status try_get(uint8_t& ret) { if(cur_ != end_) { ret = *cur_++; return stream::read_ok; } else { return underflow_get_(ret); } } std::size_t try_get(uint8_t* dest, std::size_t len) { // TODO: Can optimize this for(std::size_t i = 0; i < len; ++i) { stream::read_status s = try_get(dest[i]); if(s != stream::read_ok) { return i; } } return len; } std::size_t try_skip(std::size_t len) { // TODO: Can optimize this for(std::size_t i = 0; i < len; ++i) { stream::read_status s = try_skip(); if(s != stream::read_ok) { return i; } } return len; } // Try to buffer //len// bytes. stream::read_status try_buffer(std::size_t len) { if(first_left() >= len) return stream::read_ok; // Already buffered else return underflow_try_buffer_(len); } stream::read_status underflow_try_buffer_(std::size_t len) { // TODO: This is quite crude, but it's not expected to be used a lot. // TODO: Exception safety std::size_t found_amount = first_left(); std::vector stack; stream::read_status s = stream::read_ok; while(found_amount < len) { stream::read_result r = read_bucket_and_return_(len - found_amount); if(r.s != stream::read_ok) { s = r.s; break; } found_amount += r.b->size(); stack.push_back(r.b); } // Put back in reverse order while(!stack.empty()) { source_->unread(stack.back()); stack.pop_back(); } return s; } bool at_eos() { if(cur_ != end_) return false; stream::read_status status = next_bucket_(); if(status == stream::read_eos) return true; return false; // TODO: Does erroring count as eos? } // TODO: A get that returns a special value for EOF // TODO: This returned an auto_read_result before stream::read_result get_bucket(size_type amount = 0); // Non-blocking stream::read_result try_get_bucket(size_type amount = 0); shared_ptr detach(); stream& source() { return *source_; } bool has_source() const { return source_.get() != 0; } void attach(shared_ptr source_new) { if(source_) throw stream_error("A source is already attached to this octet_stream_reader"); source_ = source_new; } void seekg(uint64_t pos) { shared_ptr str(detach()); str->seekg(pos); attach(str); } /// Amount of data left in the first bucket std::size_t first_left() const { return end_ - cur_; } private: uint8_t underflow_get_(); stream::read_status underflow_get_(uint8_t& ret); /// Discards the current first bucket (if any) and tries to read /// a bucket if necessary. /// May throw. /// Precondition: cur_ == end_ stream::read_status next_bucket_(uint32_t amount = 0); void check_source() { if(!source_) throw stream_read_error(stream::read_error, "No source assigned to octet_stream_reader"); } // May throw stream::read_result read_bucket_and_return_(size_type amount); // May throw stream::read_result try_read_bucket_and_return_(size_type amount) { check_source(); return source_->read(amount); } /// Apply changes to first bucket void correct_first_bucket_() { if(first_.get()) { std::size_t old_size = first_->size(); first_->cut_front(old_size - first_left()); } } void set_first_bucket_(bucket* b) { //passert(!first_.get(), "Still a bucket in first_"); size_type s = b->size(); first_.reset(b); // New first bucket, update cur_ and end_ cur_ = b->get_ptr(); end_ = cur_ + s; } uint8_t const* cur_; // Pointer into first_ uint8_t const* end_; // End of data in first_ std::auto_ptr first_; shared_ptr source_; }; struct brigade; struct octet_stream_writer : basic_text_writer , gvl::shared { enum { default_initial_bucket_size = 512, default_max_bucket_size = 32768 }; octet_stream_writer(shared_ptr sink) : sink_() , cur_(0) , end_(0) , cap_(0) , buffer_() , estimated_needed_buffer_size_(default_initial_bucket_size) , max_bucket_size(default_max_bucket_size) { attach(sink); } octet_stream_writer() : sink_() , cur_(0) , end_(0) , cap_(0) , buffer_() , estimated_needed_buffer_size_(default_initial_bucket_size) , max_bucket_size(default_max_bucket_size) { } ~octet_stream_writer() { if(sink_) flush(); } stream::write_status flush(bucket_size new_buffer_size = 0); stream::write_status weak_flush(bucket_size new_buffer_size = 0); //stream::write_status partial_flush(); stream::write_status put(uint8_t b) { // We keep this function small to encourage // inlining of the common case return (cur_ != end_) ? (*cur_++ = b, stream::write_ok) : overflow_put_(b); } stream::write_status put(uint8_t const* p, std::size_t len) { // We keep this function small to encourage // inlining of the common case if(std::size_t(end_ - cur_) >= len) { #if GVL_X86 || GVL_X86_64 // TODO: A define that says whether unaligned access is allowed if(len < 64) // TODO: Tweak this limit { while(len > 4) { *reinterpret_cast(cur_) = *reinterpret_cast(p); len -= 4; cur_ += 4; p += 4; } while(len--) *cur_++ = *p++; return stream::write_ok; } #endif std::memcpy(cur_, p, len); cur_ += len; return stream::write_ok; } else { return overflow_put_(p, len); } } stream::write_status put(uint32_t const* p, std::size_t len) { stream::write_status res = stream::write_ok; for(std::size_t i = 0; i < len; ++i) { res = stream::combine_write_status(res, put(*p++)); } return res; } stream::write_status put_bucket(bucket* buf); shared_ptr detach() { if(has_sink()) { flush_buffer(); // Buffer any remaining buckets // partial_flush already does this: sink_->write_buffered(mem_buckets_); } return sink_.release(); } stream& sink() { return *sink_; } bool has_sink() const { return sink_.get() != 0; } void attach(shared_ptr new_sink) { if(sink_) throw stream_error("A sink is already attached to the octet_stream_writer"); sink_ = new_sink; cap_ = default_initial_bucket_size; buffer_.reset(bucket_data_mem::create(cap_, 0)); read_in_buffer_(); } void check_sink() { if(!sink_) throw stream_write_error(stream::write_error, "No sink assigned to octet_stream_writer"); } void swap(octet_stream_writer& b) { gvl::shared::swap(b); sink_.swap(b.sink_); std::swap(cur_, b.cur_); std::swap(end_, b.end_); std::swap(cap_, b.cap_); { // auto_ptr doesn't have swap, so we need to do this std::auto_ptr tmp = buffer_; buffer_ = b.buffer_; b.buffer_ = tmp; } std::swap(estimated_needed_buffer_size_, b.estimated_needed_buffer_size_); } void reserve(std::size_t size) { ensure_cap_(size); } // Make the growth of the current bucket unlimited void set_unlimited_bucket() { max_bucket_size = std::size_t(0) - 1; } private: stream::write_status flush_buffer(bucket_size new_buffer_size = 0); std::size_t buffer_size_() { return (cur_ - buffer_->data); } void correct_buffer_() { buffer_->size_ = buffer_size_(); } void read_in_buffer_() { cur_ = buffer_->data + buffer_->size_; end_ = buffer_->data + cap_; } stream::write_status overflow_put_(uint8_t b); stream::write_status overflow_put_(uint8_t const* p, std::size_t len); void ensure_cap_(std::size_t s); //bucket_size size_; shared_ptr sink_; uint8_t* cur_; // Pointer into buffer_ uint8_t* end_; // End of capacity in buffer_ bucket_size cap_; //list mem_buckets_; std::auto_ptr buffer_; bucket_size estimated_needed_buffer_size_; bucket_size max_bucket_size; }; /* template struct raw_ansi_format_writer : basic_text_writer > { raw_ansi_format_writer(Writer& w_init) : w(w_init) { } void flush() { w.flush(); } void put(uint32_t c) { w.put((uint8_t)c); } void put(uint8_t const* b, std::size_t length) { w.put(b, length); } Writer& w; };*/ template inline D& operator<<(basic_text_writer& self_, uint32_t x) { D& self = self_.derived(); uint_to_ascii_base<10>(self, x); return self; } template inline D& operator<<(basic_text_writer& self_, int32_t x) { D& self = self_.derived(); int_to_ascii_base<10>(self, x); return self; } template inline D& operator<<(basic_text_writer& self_, char const* str) { D& self = self_.derived(); self.put(reinterpret_cast(str), std::strlen(str)); return self; } template inline D& operator<<(basic_text_writer& self_, char ch) { D& self = self_.derived(); self.put(static_cast(ch)); return self; } template inline D& operator<<(basic_text_writer& self_, std::string const& str) { D& self = self_.derived(); self.put(reinterpret_cast(str.data()), str.size()); return self; } template inline D& operator<<(basic_text_writer& self_, gvl::string const& str) { D& self = self_.derived(); self.put(reinterpret_cast(str.data()), str.size()); return self; } template inline D& operator<<(basic_text_writer& self_, void const* ptr) { // TODO: Very TEMP return (self_ << uint32_t(ptr)); } struct endl_tag_ {}; inline void endl(endl_tag_) {} template inline D& operator<<(basic_text_writer& self_, void (*)(endl_tag_)) { D& self = self_.derived(); self.put('\n'); self.flush(); return self; } struct cell : basic_text_writer { enum placement { left, center, right }; cell(int width_init, placement text_placement_init) : text_placement(text_placement_init) , width(width_init) { } void put(uint32_t x) { buffer.push_back(x); } void put(uint8_t const* p, std::size_t len) { for(std::size_t i = 0; i < len; ++i) { buffer.push_back(p[i]); } } void put(uint32_t const* p, std::size_t len) { for(std::size_t i = 0; i < len; ++i) { buffer.push_back(p[i]); } } std::vector buffer; placement text_placement; int width; }; template inline D& operator<<(basic_text_writer& self_, cell& c) { D& self = self_.derived(); if(c.buffer.size() > c.width) { int allowed = std::max(int(c.buffer.size()) - 2, 0); self.put(&c.buffer[0], &c.buffer[0] + allowed); if(allowed != int(c.buffer.size())) self << ".."; } return self; } } #endif // UUID_ADEA58A2C81F42C25E8CAFA32ED72A18 lierolibre-0.5/src/gvl/io/encoding_compat.hpp000066400000000000000000000034121205125547100213400ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_AEC40E08A7DF4C00C0570A8BE95879BD #define UUID_AEC40E08A7DF4C00C0570A8BE95879BD #include #include "encoding.hpp" namespace gvl { template inline D& operator<<(basic_text_writer& self_, T const& other) { std::stringstream ss; ss << other; return (self_ << ss.str()); } } #endif // UUID_AEC40E08A7DF4C00C0570A8BE95879BD lierolibre-0.5/src/gvl/io/fstream.hpp000066400000000000000000000062731205125547100176600ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_D366D77D33CE4989790A2D947781E6E3 #define UUID_D366D77D33CE4989790A2D947781E6E3 #include "stream.hpp" #include //#include "../support/log.hpp" namespace gvl { struct fstream : stream { fstream(char const* path, char const* mode) { FILE* f_init = std::fopen(path, mode); init(f_init); } fstream(FILE* f_init) { init(f_init); } void init(FILE* f_init) { f = f_init; if(!f) throw stream_error("Couldn't open file"); } ~fstream() { if(f) { std::fclose(f); } } read_result read_bucket(size_type amount = 0, bucket* dest = 0) { if(!f) return read_result(read_error); char buf[4096]; if(amount > 4096 || amount == 0) amount = 4096; std::size_t read_bytes = std::fread(buf, 1, amount, f); if(read_bytes == 0) return read_result(read_eos); bucket_data_mem* mem = bucket_data_mem::create(read_bytes, read_bytes); std::memcpy(mem->data, buf, read_bytes); return read_result(read_ok, new bucket(mem, 0, read_bytes)); } write_result write_bucket(bucket* b) { if(!f) return write_result(write_error, false); std::size_t len = b->size(); std::size_t written = std::fwrite(b->get_ptr(), 1, len, f); if(written == len) { unlink(b); delete b; return write_result(write_ok, true); } else { b->cut_front(written); return write_result(write_part, false); } } write_status propagate_flush() { if(!f) return write_error; std::fflush(f); return write_ok; } write_status propagate_close() { if(f) { std::fclose(f); f = 0; } return write_ok; } read_status seekg(uint64_t pos) { if(!f) return read_error; in_buffer.buckets.clear(); // Discard buffered input std::fseek(f, (long)pos, SEEK_SET); return read_ok; } FILE* f; }; } #endif // UUID_D366D77D33CE4989790A2D947781E6E3 lierolibre-0.5/src/gvl/io/iostream.hpp000066400000000000000000000034371205125547100200410ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_IOSTREAM_HPP #define GVL_IOSTREAM_HPP #include "encoding.hpp" #include "fstream.hpp" namespace gvl { inline octet_stream_writer& cout() { static octet_stream_writer sr(shared_ptr(new fstream(stdout))); return sr; } inline octet_stream_writer& cerr() { static octet_stream_writer sr(shared_ptr(new fstream(stderr))); return sr; } } #endif // GVL_IOSTREAM_HPP lierolibre-0.5/src/gvl/io/range_coder.hpp000066400000000000000000000277031205125547100204700ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_A26A0B9FB41F438809FE82A839907D66 #define UUID_A26A0B9FB41F438809FE82A839907D66 #include #include #include #include "../support/debug.hpp" #include "../support/cstdint.hpp" #ifdef _MSCVER #define HAS_ULONGLONG #define HAS_X86IASM #endif namespace gvl { struct range_coder_defs { typedef uint32_t range_value; static range_value const ValueBits = 32; static range_value const TopValue = (1u << (ValueBits - 1)); static range_value const MaxFreq = (1u << (ValueBits - 13)); static int const ShiftBits = ValueBits - 9; static int const ExtraBits = (ValueBits - 2) % 8 + 1; static range_value const BottomValue = (TopValue >> 8); inline range_value muldiv32(range_value v, range_value s) { return (uint64_t(v) * s) >> 32; } }; template struct range_coder : range_coder_defs { range_coder(uint8_t header = 0) : low(0), range(TopValue) , follow_bytes(0), byte_count(0) , entropy(0.0), buffer(header), first(true) , debug(false) { } DerivedT& derived() { return *static_cast(this); } void renormalize() { while(range <= BottomValue) { if (low < (0xff << ShiftBits)) { if(!first) derived().put_byte(buffer); for(; follow_bytes; follow_bytes--) derived().put_byte(0xff); buffer = static_cast(low >> ShiftBits); first = false; } else if (low & TopValue) { if(!first) derived().put_byte(buffer + 1); for(; follow_bytes; follow_bytes--) derived().put_byte(0); buffer = static_cast(low >> ShiftBits); first = false; } else ++follow_bytes; range <<= 8; low = (low << 8) & (TopValue - 1); ++byte_count; } } void encode_range(range_value sym_low, range_value sym_range, range_value max) { assert(sym_range > 0); assert(max > sym_low); #ifdef GVL_TRACK_ENTROPY entropy -= log(double(sym_range) / max); #endif uint32_t r = range / max; uint32_t tmp = r * sym_low; low += tmp; if (sym_low + sym_range < max) range = r * sym_range; else range -= tmp; renormalize(); } // max = 1 << shift void encode_range_shift(range_value sym_low, range_value sym_range, int shift, bool noID = false) { assert(sym_range > 0); assert(shift <= 16); assert((1 << shift) > sym_low); assert((1 << shift) >= sym_low + sym_range); #ifdef TRACK_ENTROPY entropy -= log(double(sym_range) / double(1 << shift)); #endif uint32_t r = range >> shift; uint32_t tmp = r * sym_low; low += tmp; if ((sym_low + sym_range) >> shift) range -= tmp; else range = r * sym_range; renormalize(); } void encode_marker(int value) { encode_range_shift(value, 1, 8, true); } void encode_raw_bit(int value) { assert(value == 0 || value == 1); uint32_t r = range >> 1; if(value > 0) { range -= r; low += r; } else range = r; renormalize(); } // NOT WORKING void encode_bit(int value, int range0, int shift) { assert(value == 0 || value == 1); range_value r = range >> shift; range_value tmp = r * range0; if(value > 0) { range -= tmp; low += tmp; } else range = tmp; renormalize(); } void encode_uint(unsigned int range_value) { unsigned int l = range_value & 0xFFFF; unsigned int h = (range_value >> 16) & 0xFFFF; encode_range_shift(l, 1, 16); encode_range_shift(h, 1, 16); } void encode_uint(unsigned int range_value, unsigned int max) { assert(range_value < max); if(max >= (1 << 16)) { // TODO: Fix decoding of uint as well encode_range_shift(range_value & 0xFFFF, 1, 16); encode_range(range_value >> 16, 1, max >> 16); } else encode_range(range_value, 1, max); } void encode_byte(uint8_t range_value) { encode_range_shift(range_value, 1, 8); } double get_entropy() { return entropy / log(256); } void finish() { uint32_t tmp = (low >> ShiftBits) + 1; if (tmp > 0xff) { if(first) derived().put_byte(buffer); else derived().put_byte(buffer + 1); for(; follow_bytes; follow_bytes--) derived().put_byte(0); } else { derived().put_byte(buffer); for(; follow_bytes; follow_bytes--) derived().put_byte(0xff); } derived().put_byte(tmp & 0xff); } range_value low; range_value range; uint8_t buffer; std::size_t follow_bytes; std::size_t byte_count; double entropy; bool first; bool debug; }; #if 0 #define self (static_cast(this)) template struct bit_range_coder_impl { typedef uint32_t range_value; static range_value const ValueBits = 32; static range_value const TopValue = (1u << (ValueBits - 1)); bit_range_coder_impl() : low(0), range(TopValue) , byte_count(0) #ifdef VL_TRACK_ENTROPY , entropy(0.0) #endif { } void renormalize() { while(((low ^ high) & 0xff000000) == 0) { put_byte(low >> 24); low = low << 8; high = (high << 8) + 0xff; } } void encode_raw_bit(int value) { sassert(value == 0 || value == 1); range_value middle = low + ((high - low) >> 2); sassert(middle >= low && middle < high); if(value) high = middle; else low = middle + 1; renormalize(); } void encode_bit(int value, range_value prob1) { #ifdef VL_TRACK_ENTROPY entropy -= std::log(prob1 / 4294967296.0); #endif sassert(value == 0 || value == 1); range_value middle = low + muldiv32(high - low, prob1); sassert(middle >= low && middle < high); if(value) high = middle; else low = middle + 1; renormalize(); } double get_entropy() { return entropy / log(256); } void finish() { renormalize(); put_byte(high >> 24); } void put_byte(uint8_t b) { self->put_byte(b); } range_value low; range_value high; #ifdef VL_TRACK_ENTROPY double entropy; #endif }; template struct bit_range_decoder_impl { typedef uint32_t range_value; static range_value const ValueBits = 32; static range_value const TopValue = (1u << (ValueBits - 1)); bit_range_decoder_impl() : low(0), range(TopValue) , byte_count(0) #ifdef VL_TRACK_ENTROPY , entropy(0.0) #endif { } void renormalize() { while(((low ^ high) & 0xff000000) == 0) { put_byte(low >> 24); low = low << 8; high = (high << 8) + 0xff; x = (x << 8) + derived().get_byte(); } } void start() { x = 0; for(int i = 0; i < 4; ++i) { x = (x << 8) + derived().get_byte(); } } int decode_raw_bit() { sassert(value == 0 || value == 1); range_value middle = low + ((high - low) >> 2); sassert(middle >= low && middle < high); int value = 0; if(x <= middle) { high = middle; value = 1; } else low = middle + 1; renormalize(); return value; } int decode_bit(range_value prob1) { #ifdef VL_TRACK_ENTROPY entropy -= std::log(prob1 / 4294967296.0); #endif sassert(value == 0 || value == 1); range_value middle = low + scale(high - low, prob1); sassert(middle >= low && middle < high); int value = 0; if(x <= middle) { if(x + uncertainty > middle) uncertain(); high = middle; value = 1; } else if(x + uncertainty <= middle) { uncertain(); } else { low = middle + 1; } renormalize(); return value; } double get_entropy() { return entropy / log(256); } void finish() { } uint8_t derived().get_byte() { return self->derived().get_byte(); } range_value low; range_value high; range_value x; #ifdef VL_TRACK_ENTROPY double entropy; #endif }; #undef self #endif template struct range_decoder : range_coder_defs { range_decoder() : buffer(0) { header = derived().get_byte(); buffer = derived().get_byte(); low = buffer >> (8 - ExtraBits); range = 1 << ExtraBits; } DerivedT& derived() { return *static_cast(this); } void renormalize() { while(range <= BottomValue) { low = (low << 8) | ((buffer << ExtraBits) & 0xff); buffer = derived().get_byte(); low |= buffer >> (8 - ExtraBits); range <<= 8; } } range_value decode(range_value max) { renormalize(); help = range / max; range_value tmp = low / help; return (tmp >= max ? max - 1 : tmp); } range_value decode_shift(int shift) { renormalize(); help = range >> shift; range_value tmp = low / help; return (tmp >> shift ? (1 << shift) - 1 : tmp); } int decode_raw_bit() { renormalize(); range_value r = range >> 1; range_value sublow = low - r; range_value subrange = range - r; bool v = low >= r; if(!v) { range = r; } else { range = subrange; low = sublow; } return v; /* if(low < r) { range = r; return 0; } else { range -= r; low -= r; return 1; }*/ } // TODO: NOT WORKING, even though every time I derive this I get the same result. int decode_bit(int range0, int shift) { passert(false, "Not working"); renormalize(); range_value r = range >> shift; range_value tmp = r * range0; if(low < r) { range = tmp; return 0; } else { range -= tmp; low -= tmp; return 1; } } unsigned int decode_marker() { unsigned int t = decode_shift(8, true); range_decoded(t, 1, 1<<8); return t; } unsigned int decode_uint() { unsigned int l = decode_shift(16); range_decoded(l, 1, 1<<16); unsigned int h = decode_shift(16); range_decoded(h, 1, 1<<16); return l | (h << 16); } unsigned int decode_uint(unsigned int max) { unsigned int v = decode(max); range_decoded(v, 1, max); return v; } void range_decoded(range_value sym_low, range_value sym_range, range_value max) { range_value tmp = help * sym_low; low -= tmp; if (sym_low + sym_range < max) range = help * sym_range; else range -= tmp; } void finish() { } // Model tools std::size_t find_sym_by_cfreq(unsigned int c, unsigned int* cfreq, std::size_t len) { assert(c >= 0); std::size_t i = 1; for(; cfreq[i] > c; ++i) ; return i - 1; /* std::size_t low = 1; std::size_t high = len; std::size_t last = 0; do { std::size_t mid = (low + high) / 2; if(cfreq[mid] < c) { high = mid - 1; last = mid; } else if(cfreq[mid] > c) { low = mid + 1; } else return mid - 1; } while(high >= low); assert(last != 0); assert(cfreq[last] <= c); assert(cfreq[last - 1] > c); return last - 1;*/ } std::size_t decode_by_cfreq(unsigned int* freq, unsigned int* cfreq, std::size_t len) { if(cfreq[0] == 0) return '?'; unsigned int v = decode(cfreq[0]); std::size_t sym = find_sym_by_cfreq(v, cfreq, len); sassert(freq[sym] > 0); range_decoded(cfreq[sym + 1], freq[sym], cfreq[0]); return sym; } range_value low; range_value range; range_value help; uint8_t buffer; uint8_t header; }; } #endif // UUID_A26A0B9FB41F438809FE82A839907D66 lierolibre-0.5/src/gvl/io/stream.cpp000066400000000000000000000042511205125547100174770ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "stream.hpp" #include "../support/log.hpp" #include namespace gvl { bucket::bucket(void const* ptr, size_type len) { bucket_data_mem* data_init = bucket_data_mem::create(len, len); std::memcpy(data_init->data, ptr, len); data_.reset(data_init); begin_ = 0; end_ = len; } #if 0 stream::write_status octet_stream_writer::partial_flush() { if(!sink_) throw stream_write_error(stream::write_error, "No sink assigned to octet_stream_writer"); stream::write_status stat = stream::write_ok; while(!mem_buckets_.empty()) { stream::write_result res = sink_->write(mem_buckets_.first()); stat = res.s; if(!res.consumed) break; } // Buffered remaining if(!mem_buckets_.empty()) { sink_->write_buffered(mem_buckets_); } return stat; } #endif } lierolibre-0.5/src/gvl/io/stream.hpp000066400000000000000000000414261205125547100175110ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_957E3642BB06466DB21A21AFD72FAFAF #define UUID_957E3642BB06466DB21A21AFD72FAFAF #include "../containers/list.hpp" #include "../containers/bucket.hpp" #include "../containers/string.hpp" #include "../support/debug.hpp" #include "../support/cstdint.hpp" #include "../support/platform.hpp" #include "../resman/shared_ptr.hpp" #include #include #include #include #include #include #include // TEMP namespace gvl { struct bucket; struct brigade; struct stream_error : std::runtime_error { stream_error(std::string const& msg) : std::runtime_error(msg) { } }; struct brigade { typedef bucket_size size_type; /* read_result read(size_type amount = 0, bucket* dest = 0) { list::iterator i = buckets.begin(); if(i == buckets.end()) return read_result(eos); read_result r(i->read(amount, 0)); if(r.s == bucket_source::ok) buckets.unlink(r.b); // Success, we may unlink the bucket return r; }*/ void prepend(bucket* b) { buckets.relink_front(b); } void append(bucket* b) { buckets.relink_back(b); } bool empty() const { return buckets.empty(); } bucket* first() { return buckets.first(); } bucket* unlink_first() { bucket* ret = buckets.first(); buckets.unlink_front(); return ret; } bucket* unlink_last() { bucket* ret = buckets.last(); buckets.unlink_back(); return ret; } list buckets; }; struct stream : shared { typedef bucket_size size_type; enum read_status { read_ok = 0, read_blocking, read_eos, read_error, read_none_done // Special for filters }; enum write_status { write_ok = 0, write_part, write_would_block, write_error }; enum state { state_open, state_closed }; struct read_result { explicit read_result(read_status s) : s(s) , b(0) { } read_result(read_status s, bucket* b) : s(s) , b(b) { } read_status s; bucket* b; }; struct write_result { explicit write_result(write_status s, bool consumed) : s(s) , consumed(consumed) { } write_status s; bool consumed; }; static write_status combine_write_status(write_status a, write_status b) { if(a == b) return a; else if(a == write_ok) return b; else if(b == write_ok) return a; else return write_error; } stream() : cur_state(state_open) { } ~stream() { // We don't close here, because derived objects are already destroyed } virtual read_result read_bucket(size_type amount = 0, bucket* dest = 0) = 0; /* { return read_result(read_blocking); }*/ read_result read(size_type amount = 0) { if(!in_buffer.empty()) return read_result(read_ok, in_buffer.unlink_first()); return read_bucket(amount); } // Unread buckets so that subsequent calls to read will // return them. void unread(list& buckets) { in_buffer.buckets.splice_front(buckets); } void unread(bucket* b) { in_buffer.buckets.relink_front(b); } /// Writes a bucket to a sink. If bucket_sink::ok is returned, /// takes ownership of 'b' and unlinks it from it's list. /// NOTE: 'b' must be inserted into a list or be a singleton. virtual write_result write_bucket(bucket* b) = 0; /* { return write_result(write_would_block, false); }*/ write_result write(bucket* b) { write_result res = flush_out_buffer(); if(!res.consumed) return res; return write_bucket(b); } /// NOTE: 'b' must be inserted into a list or be a singleton. write_result write_or_buffer(bucket* b) { write_result res = write_bucket(b); if(!res.consumed) write_buffered(b); res.consumed = true; return res; } // Buffer a list of buckets. void write_buffered(list& buckets) { out_buffer.buckets.splice(buckets); } /// NOTE: 'b' must be inserted into a list or be a singleton. void write_buffered(bucket* b) { gvl::unlink(b); out_buffer.buckets.relink_front(b); } write_status flush() { write_result res = flush_out_buffer(); if(!res.consumed) return res.s; return propagate_flush(); } write_result flush_out_buffer() { while(!out_buffer.empty()) { bucket* buffered = out_buffer.first(); write_result res = write_bucket(buffered); if(!res.consumed) return res; } return write_result(write_ok, true); } // NOTE! This may NEVER throw! write_status close() { if(cur_state != state_open) return write_ok; cur_state = state_closed; write_result res = flush_out_buffer(); if(!res.consumed) return res.s; return propagate_close(); } /// This is supposed to propagate a flush to /// the underlying sink. E.g. in a filter, it would /// propagate the flush to the connected sink. virtual write_status propagate_flush() { return write_ok; } virtual write_status propagate_close() { return write_ok; } virtual read_status seekg(uint64_t pos) { // Not supported by default return read_error; } brigade in_buffer; brigade out_buffer; state cur_state; }; struct stream_read_error : stream_error { stream_read_error(stream::read_status s, std::string const& msg) : stream_error(msg), s(s) { } stream::read_status s; }; struct stream_write_error : stream_error { stream_write_error(stream::write_status s, std::string const& msg) : stream_error(msg), s(s) { } stream::write_status s; }; typedef shared_ptr stream_ptr; /* inline octet_stream_writer& operator<<(octet_stream_writer& writer, char const* str) { std::size_t len = std::strlen(str); writer.put(reinterpret_cast(str), len); return writer; } inline octet_stream_writer& operator<<(octet_stream_writer& writer, std::string const& str) { writer.put(reinterpret_cast(str.data()), str.size()); return writer; }*/ /* /// A sink that forwards to a brigade template struct basic_brigade_sink : bucket_sink { brigade& get() { return (static_cast(this)->*Get)(); } bucket_sink::status write(bucket* b) { b->unlink(); get().append(b); return bucket_sink::ok; } }; */ struct filter : stream { struct pump_result { pump_result(read_status r, write_status w) : r(r), w(w) { } read_status r; write_status w; }; enum apply_mode { am_non_pulling, am_pulling, am_flushing, am_closing }; filter() { } filter(shared_ptr source_init, shared_ptr sink_init) : source(source_init) , sink(sink_init) { } read_result read_bucket(size_type amount = 0, bucket* dest = 0) { if(!source) return read_result(read_error); read_status status = apply(am_pulling, amount); if(status != read_ok) return read_result(status); read_result res(read_ok, in_buffer.unlink_first()); return res; } write_result write_bucket(bucket* b) { if(!sink) return write_result(write_error, false); unlink(b); filter_buffer.append(b); apply(am_non_pulling); write_status rstatus = flush_filtered(); if(rstatus != write_ok) { return write_result(rstatus, true); } return write_result(write_ok, true); } write_status propagate_flush() { sassert(out_buffer.empty()); // stream should have taken care of this // We don't check sink here so that // we only error on missing sink if there's actually anything // left to write. if(!sink) { if(!out_buffer.empty() || !filter_buffer.empty()) return write_error; // Still data to filter or not written } else { apply(am_flushing); write_status res = flush_filtered(); if(res != write_ok) return res; if(!filter_buffer.empty()) return write_would_block; // Still data that has not been filtered } return write_ok; } write_status propagate_close() { sassert(out_buffer.empty()); if(!sink) { if(!out_buffer.empty() || !filter_buffer.empty()) return write_error; // Still data to filter or not written } else { apply(am_closing); write_status res = flush_filtered(); if(res != write_ok) return res; if(!filter_buffer.empty()) return write_would_block; // Still data that has not been filtered } return write_ok; } pump_result pump() { if(!source) return pump_result(read_error, write_error); if(!sink) return pump_result(read_error, write_error); if(in_buffer.empty()) { read_status rstatus = apply(am_pulling); if(rstatus != read_ok) return pump_result(rstatus, write_ok); } write_status wstatus = flush_filtered(); return pump_result(read_ok, wstatus); } void attach_source(shared_ptr source_new) { source = source_new; } void attach_sink(shared_ptr sink_new) { sink = sink_new; } protected: // Preconditions: sink write_status flush_filtered() { sassert(sink); // Precondition while(!in_buffer.empty()) { write_result res = sink->write(in_buffer.first()); if(res.s != write_ok) { return res.s; } } return write_ok; } // Filter buckets in filter_buffer and append the result to in_buffer. // If mode is flushing or closing, the filter should make every effort to // filter all buckets in filter_buffer. // // If mode is pulling, the filter should make some effort to produce // at least one filtered bucket. // // TODO: Return value of this function is quite useless at the moment. virtual read_status apply(apply_mode mode, size_type amount = 0) { // We bypass filter_buffer if(!out_buffer.empty()) { in_buffer.buckets.splice(out_buffer.buckets); return read_ok; } else if(mode == am_pulling) { read_result res = source->read(amount); if(res.s == read_ok) in_buffer.append(res.b); return res.s; } else return read_blocking; } read_status try_pull(size_type amount = 0) { read_result res = source->read(amount); if(res.s == read_ok) filter_buffer.append(res.b); return res.s; } shared_ptr source; shared_ptr sink; brigade filter_buffer; }; typedef shared_ptr filter_ptr; struct memory_stream : stream { read_result read_bucket(size_type amount = 0, bucket* dest = 0) { /* stream::read already checked in_buffer if(!buffer.empty()) { read_result res(read_ok, buffer.first()); unlink(res.b); return res; } */ return read_result(read_blocking); } write_result write_bucket(bucket* b) { unlink(b); in_buffer.append(b); return write_result(write_ok, true); } void clear() { in_buffer.buckets.clear(); } void to_str(std::string& ret) { ret.clear(); for(list::iterator i = in_buffer.buckets.begin(); i != in_buffer.buckets.end(); ++i) { char const* p = reinterpret_cast(i->get_ptr()); ret.insert(ret.end(), p, p + i->size()); } } template void release_as_str(gvl::basic_string& ret) { if(in_buffer.buckets.empty()) { ret.clear(); return; } list::iterator i = in_buffer.buckets.begin(); // TODO: The data usually has more capacity than 'size', // but this information is lost. std::size_t size = i->size(); if(i->bucket_begins_at_zero()) ret.assign(i->release_data(), size, size); else ret.assign(i->get_ptr(), size); while(++i != in_buffer.buckets.end()) { std::size_t size = i->size(); ret.append(i->get_ptr(), size); } in_buffer.buckets.clear(); } }; template inline void write_uint16(Writer& writer, unsigned int v) { sassert(v < 0x10000); writer.put(uint8_t((v >> 8) & 0xff)); writer.put(uint8_t(v & 0xff)); } template inline void write_sint16(Writer& writer, unsigned int v) { write_uint16(writer, v + 0x8000); } template inline void write_uint16_le(Writer& writer, unsigned int v) { sassert(v < 0x10000); writer.put(uint8_t(v & 0xff)); writer.put(uint8_t((v >> 8) & 0xff)); } template inline void write_uint24(Writer& writer, unsigned int v) { sassert(v < 0x1000000); writer.put(uint8_t((v >> 16) & 0xff)); writer.put(uint8_t((v >> 8) & 0xff)); writer.put(uint8_t(v & 0xff)); } template inline void write_uint24_le(Writer& writer, unsigned int v) { sassert(v < 0x1000000); writer.put(uint8_t(v & 0xff)); writer.put(uint8_t((v >> 8) & 0xff)); writer.put(uint8_t((v >> 16) & 0xff)); } template inline void write_uint32(Writer& writer, uint32_t v) { writer.put(uint8_t((v >> 24) & 0xff)); writer.put(uint8_t((v >> 16) & 0xff)); writer.put(uint8_t((v >> 8) & 0xff)); writer.put(uint8_t(v & 0xff)); } template inline void write_uint32_le(Writer& writer, uint32_t v) { writer.put(uint8_t(v & 0xff)); writer.put(uint8_t((v >> 8) & 0xff)); writer.put(uint8_t((v >> 16) & 0xff)); writer.put(uint8_t((v >> 24) & 0xff)); } template inline void write_sint32(Writer& writer, int v) { write_uint32(writer, v + 0x80000000); } template void write_string16(Writer& writer, std::string const& src) { int len = src.size(); if(len > 65535) len = 65535; write_uint16(writer, len); writer.put(reinterpret_cast(src.data()), len); } template void write_aint(Writer& writer, unsigned int v) { while(true) { int b = v & 0x7f; v >>= 7; if(v != 0) writer.put(b | 0x80); else { writer.put(b); break; } } } template unsigned int read_aint(Reader& reader) { int v = 0; for(int i = 0; i < 5; ++i) { uint8_t b = reader.get(); if((b & 0x80) == 0) { v |= b; return v; // Ok } else { v = (v << 7) | (b & 0x7f); } } throw gvl::stream_error("Malformed aint in read_aint"); } template inline unsigned int read_uint24(Reader& reader) { unsigned int ret = reader.get() << 16; ret |= reader.get() << 8; ret |= reader.get(); return ret; } template inline unsigned int read_uint24_le(Reader& reader) { unsigned int ret = reader.get(); ret |= reader.get() << 8; ret |= reader.get() << 16; return ret; } template inline unsigned int read_uint16(Reader& reader) { unsigned int ret = reader.get() << 8; ret |= reader.get(); return ret; } template inline unsigned int read_uint16_le(Reader& reader) { unsigned int ret = reader.get(); ret |= reader.get() << 8; return ret; } template inline uint32_t read_uint32(Reader& reader) { unsigned int ret = reader.get() << 24; ret |= reader.get() << 16; ret |= reader.get() << 8; ret |= reader.get(); return ret; } template inline uint32_t read_uint32_le(Reader& reader) { unsigned int ret = reader.get(); ret |= reader.get() << 8; ret |= reader.get() << 16; ret |= reader.get() << 24; return ret; } template inline uint64_t read_uint64_le(Reader& reader) { uint64_t ret = reader.get(); ret |= uint64_t(reader.get()) << 8; ret |= uint64_t(reader.get()) << 16; ret |= uint64_t(reader.get()) << 24; ret |= uint64_t(reader.get()) << 32; ret |= uint64_t(reader.get()) << 40; ret |= uint64_t(reader.get()) << 48; ret |= uint64_t(reader.get()) << 56; return ret; } template inline int read_sint16(Reader& reader) { return read_uint16(reader) - 0x8000; } template inline int read_sint32(Reader& reader) { return read_uint32(reader) - 0x80000000; } template void read_string16(Reader& reader, std::string& dest) { unsigned int len = read_uint16(reader); std::vector buf(len + 1); // + 1 to avoid zero-length buf that would make buf[0] undefined reader.get(reinterpret_cast(&buf[0]), len); dest.assign(&buf[0], len); } } #endif // UUID_957E3642BB06466DB21A21AFD72FAFAF lierolibre-0.5/src/gvl/io/tests/000077500000000000000000000000001205125547100166405ustar00rootroot00000000000000lierolibre-0.5/src/gvl/io/tests/bitstream.cpp000066400000000000000000000063031205125547100213400ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../../test/test.hpp" #include "../common_bitstream.hpp" #include "../../math/tt800.hpp" #include "../../support/cstdint.hpp" #include "../../support/macros.hpp" #include #include #include template std::size_t array_size(T(&)[N]) { return N; } GVLTEST_SUITE(gvl, bitstream) GVLTEST(gvl, bitstream, put_get_ignore) { typedef std::vector > SampleVec; SampleVec samples; gvl::tt800 rand(0); for(int i = 0; i < 1000; ++i) { uint32_t bits = rand.range(1, 33); uint32_t v; if(bits == 32) v = rand(); else v = rand.range(0u, 1u<second, i->first); } bs.finish(); FOREACH(SampleVec, i, samples) { uint32_t v = bs.get_uint(i->first); ASSERTEQM("integers encoded right", v, i->second); } bs.rewindg(); // Get with interjected ignores int ignoreLen = 0; FOREACH(SampleVec, i, samples) { if(rand() & 1) ignoreLen += i->first; else { if(ignoreLen > 0) { bs.ignore(ignoreLen); ignoreLen = 0; } uint32_t v = bs.get_uint(i->first); ASSERTEQM("integers encoded right", v, i->second); } } bs.clear(); FOREACH(SampleVec, i, samples) { bs.put(i->second & 1); } bs.finish(); FOREACH(SampleVec, i, samples) { uint32_t v = bs.get(); ASSERTEQM("bits encoded right", v, (i->second & 1)); } } lierolibre-0.5/src/gvl/io/tests/stream.cpp000066400000000000000000000071661205125547100206510ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../../test/test.hpp" #include "../stream.hpp" #include "../encoding.hpp" #include "../deflate_filter.hpp" #include "../../math/tt800.hpp" #include "../../math/cmwc.hpp" #include template std::size_t array_size(T(&)[N]) { return N; } #if 0 // TODO: Return value is inaccurate of apply struct inc_filter : gvl::filter { read_status apply(apply_mode mode, size_type amount = 0) { if(out_buffer.empty() && mode == am_pulling) { read_status res = try_pull(amount); if(res != read_ok) return res; } while(!out_buffer.empty()) { gvl::bucket* b = out_buffer.unlink_first(); std::size_t s = b->size(); gvl::bucket_data_mem* dest = gvl::bucket_data_mem::create(s, s); uint8_t const* p = b->get_ptr(); for(std::size_t i = 0; i < s; ++i) { dest->data[i] = p[i] + 1; } in_buffer.append(new gvl::bucket(dest)); } return read_ok; } }; #endif GVLTEST_SUITE(gvl, stream) GVLTEST(gvl, stream, deflate_filter) { using namespace gvl; stream_ptr sink(new memory_stream()); shared_ptr filter(new deflate_filter(true)); filter->attach_sink(sink); octet_stream_writer writer(filter); uint8_t seq[] = {1, 2, 3, 4}; for(int i = 0; i < 1000; ++i) { writer.put(13); writer.put(seq, 4); } writer.flush(); writer.detach(); shared_ptr filter2(new deflate_filter(false)); filter2->attach_source(sink); octet_stream_reader reader(filter2); for(int i = 0; i < 1000; ++i) { int v = reader.get(); ASSERTEQ(v, 13); ASSERTEQ(reader.get(), seq[0]); ASSERTEQ(reader.get(), seq[1]); ASSERTEQ(reader.get(), seq[2]); ASSERTEQ(reader.get(), seq[3]); } } GVLTEST(gvl, stream, octet_stream_reader_get) { gvl::stream_ptr str(new gvl::memory_stream()); gvl::octet_stream_writer writer(str); gvl::mwc r; int const count = 4096; for(int i = 0; i < count; ++i) { writer.put(uint8_t(i & 0xff)); } writer.flush(); gvl::octet_stream_reader reader(str); for(int i = 0; i < count;) { int size = std::min(int(r(10) + 3), (count - i)); uint8_t buf[64]; reader.get(buf, size); int start = i; for(int off = 0; off < size; ++off) { ASSERTEQ((int)buf[off], (i & 0xff)); ++i; } } }lierolibre-0.5/src/gvl/io/unicode.hpp000066400000000000000000000041601205125547100176360ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_0DA946DFD27148AC249303959F48AA8C #define UUID_0DA946DFD27148AC249303959F48AA8C #include "encoding.hpp" namespace gvl { // NOTE: This does not yet handle surrogate pairs, so it only works with characters in BMP. struct utf16_be_stream_reader : protected octet_stream_reader { typedef octet_stream_reader base; utf16_be_stream_reader(stream_ptr str) : base(str) { } uint32_t get() { uint8_t h = base::get(); uint8_t l = base::get(); // TODO: Handle surrogate pairs return (h << 8) | l; } void get(uint32_t* dest, std::size_t len) { // TODO: Can optimize this for(std::size_t i = 0; i < len; ++i) dest[i] = get(); } }; } // namespace gvl #endif // UUID_0DA946DFD27148AC249303959F48AA8C lierolibre-0.5/src/gvl/linked_hash_set.hpp000066400000000000000000000115141205125547100207260ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_LINKED_HASH_SET_HPP #define GVL_LINKED_HASH_SET_HPP #include "../list.hpp" #include "../support/functional.hpp" #include "../support/hash.hpp" namespace gvl { template struct hash_head { hash_head() : next(0) { } hash_head* next; } template struct hash_node : hash_head { hash_head* prev; hash_head* next; }; template struct linked_hash_list_tag; template struct linked_hash_insert_order_tag; template struct linked_hash_set_node { }; template struct linked_hash_set_node : hash_node > , list_node > { }; template struct linked_hash_set_node : hash_node > { }; template struct linked_hash_set_common { }; template struct linked_hash_set_common { void common_unlink(T* x) { insert_order_list.unlink(x); } void common_insert(T* x) { insert_order_list.push_back(x); } list insert_order_list; }; template struct linked_hash_set_common { void common_unlink(T*) { } void common_insert(T*) { } }; template struct linked_hash_set : linked_hash_set_common, Hash { linked_hash_set() : tshift(3) , tsize(1 << tshift) , tmask(tsize - 1) , table(tsize) { } static std::size_t index_from_hash_(std::size_t h, std::size_t tshift, std::size_t tmask) { return (h ^ (h >> (32-tshift))) & tmask; } void insert(T* x) { std::size_t idx = index_from_hash_(Hash::operator()(*x), tshift, tmask); hash_head& head = table[tmask]; insert_into_bucket_(head, x); this->common_insert(x); } void unlink(T* x) { hash_node* node = upcast_(x); node->prev->next = node->next; hash_head* next = node->next; if(next) downcast_(next)->prev = node->prev; } static T* next_of_(hash_head x) { return static_cast(x.next); } static T* next_of_(T* x) { return static_cast(x->template hash_node::next); } static T* prev_of_(T* x) { return static_cast(x->template hash_node::prev); } static hash_node* upcast_(T* x) { return static_cast*>(x); } static hash_node* downcast_(hash_head* x) { return static_cast(x); } void rehash_(std::size_t tshift_new) { std::vector > table_new(tsize_new); std::size_t tsize_new = (1 << tshift_new); std::size_t tmask_new = tsize_new - 1; for(std::size_t i = 0; i < tsize; ++i) { T* cur = next_of_(table[i]); while(cur) { T* next = next_of_(cur); std::size_t idx = index_from_hash_(Hash::operator()(*cur), tshift_new, tmask_new); insert_into_bucket_(table_new[idx], cur); cur = next; } } table.swap(table_new); tshift = tshift_new; tsize = tsize_new; tmask = tmask_new; } void insert_into_bucket_(hash_head& bucket, T* x) { hash_node* node = upcast_(x); node->next = bucket.next; node->prev = &bucket; bucket.next = node; } std::size_t tshift; std::size_t tsize; std::size_t tmask; std::vector > table; }; } #endif // GVL_LINKED_HASH_SET_HPP lierolibre-0.5/src/gvl/list.hpp000066400000000000000000000031001205125547100165450ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_9D22E07D379E448A2481CAA24EF73B8A #define UUID_9D22E07D379E448A2481CAA24EF73B8A #include "containers/list.hpp" #endif // UUID_9D22E07D379E448A2481CAA24EF73B8A lierolibre-0.5/src/gvl/math/000077500000000000000000000000001205125547100160205ustar00rootroot00000000000000lierolibre-0.5/src/gvl/math/cmwc.hpp000066400000000000000000000112131205125547100174600ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_BBDA02831ADD413B1A3552A8997B8324 #define UUID_BBDA02831ADD413B1A3552A8997B8324 #include "../support/cstdint.hpp" #include "random.hpp" #include namespace gvl { // NOTE: This generator only generates // numbers in [0, 2^32-1) template struct cmwc // : prng_common, uint32_t> { //using prng_common, uint32_t>::operator(); template friend void archive(Archive ar, cmwc& x); cmwc() : p(R - 1) , c(0x1337) { } void seed(uint32_t v) { seed(&v, 1); } void seed(uint32_t const* v, std::size_t count) { // Seeding based on Mersenne twister's c = 0x1337; if(count > R) count = R; std::size_t i = 0; for(; i < count; ++i) Q[i] = v[i]; for(; i < R; ++i) { uint32_t prev = Q[i - count]; Q[i] = (1812433253UL * (prev ^ (prev >> 30)) + i); } } #if 0 void fill() { uint32_t local_c = c; for(std::size_t i = 0; i < R; ++i) { uint64_t t = uint64_t(Q[i])*A + local_c; local_c = uint32_t(t >> 32); uint64_t x = (t & 0xffffffff) + local_c; uint32_t overflow = uint32_t(x >> 32); local_c += overflow; Q[i] = 0xfffffffe - uint32_t(x & 0xffffffff) - overflow; } #if 0 uint64_t t1 = uint64_t(Q[i])*A + local_c1; uint64_t t2 = uint64_t(Q[i+1])*A; uint32_t local_c2 = uint32_t(t >> 32); uint64_t x1 = (t1 & 0xffffffff) + local_c2; uint32_t overflow1 = uint32_t(x1 >> 32); local_c2 += overflow1; t2 += local_c2; local_c2 = uint32_t(t2 >> 32); uint64_t x2 = (t2 & 0xffffffff) + local_c2; uint32_t overflow2 = uint32_t(x2 >> 32); local_c2 += overflow2; Q[i] = 0xfffffffe - uint32_t(x1 & 0xffffffff) - overflow1; Q[i+1] = 0xfffffffe - uint32_t(x2 & 0xffffffff) - overflow2; #endif c = local_c; } #endif uint32_t operator()() { p = (p+1) & (R - 1); uint64_t t = uint64_t(Q[p])*A + c; c = uint32_t(t >> 32); uint64_t x = (t & 0xffffffff) + c; uint32_t overflow = uint32_t(x >> 32); c += overflow; return (Q[p] = 0xfffffffe - uint32_t(x & 0xffffffff) - overflow); } private: uint32_t Q[R]; uint32_t c; uint32_t p; }; template void archive(Archive ar, cmwc& x) { ar.ui32(x.c); for(int i = 0; i < R; ++i) ar.ui32(x.Q[i]); } struct mwc : prng_common { using prng_common::operator(); mwc(uint32_t seed_new = 0x1337) { seed(seed_new); } uint32_t x, c; bool operator==(mwc const& b) { return x == b.x && c == b.c; } bool operator!=(mwc const& b) { return !operator==(b); } void seed(uint32_t seed_new) { x = seed_new; c = 9413207; } uint32_t operator()() { uint64_t t = uint64_t(2083801278)*x + c; c = uint32_t(t>>32); x = uint32_t(t&0xffffffff); return x; } }; template void archive(Archive ar, mwc& x) { ar.ui32(x.c); ar.ui32(x.x); } template struct xorshift { uint32_t x; xorshift(uint32_t seed) : x(seed) { } uint32_t operator()() { uint32_t v = x; v ^= v << A; v ^= v >> B; v ^= v << C; return (x = v); } }; typedef cmwc<4096, 18782> cmwc18782; typedef cmwc<4, 987654978> cmwc987654978; typedef xorshift<2, 9, 15> default_xorshift; } // namespace gvl #endif // UUID_BBDA02831ADD413B1A3552A8997B8324 lierolibre-0.5/src/gvl/math/float.hpp000066400000000000000000000040661205125547100176440ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_9A3CA425DFA94C58CFBDEB99F70179F2 #define UUID_9A3CA425DFA94C58CFBDEB99F70179F2 #include #include "../support/platform.hpp" namespace gvl { #if GVL_MSVCPP && !GVL_X86_64 inline long lrint(double x) { long r; __asm { fld x fistp r } return r; } #elif GVL_GCC && GVL_X86 // TODO: Not tested at all inline long lrint(double x) { long ret; __asm__ __volatile__ ( "fldq %0;" "fistpl %1;" : "m" (x), "=m" (ret) : : "st") ; return ret; } #endif inline long round_floor(double x) { return lrint(x - 0.5); } inline long round_ceil(double x) { return lrint(x + 0.5); } } // namespace gvl #endif // UUID_9A3CA425DFA94C58CFBDEB99F70179F2 lierolibre-0.5/src/gvl/math/ieee.cpp000066400000000000000000000062261205125547100174410ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "ieee.hpp" #if GVL_MSVCPP #include #include #endif #if GVL_GCC && GVL_LINUX #include #endif #include #include #include #include #if GVL_X87 // Exact 80-bit floating point little endian representation of 2^(16383 - 1023) extern unsigned char const scaleup[10] = {0,0,0,0,0,0,0,128,255,123}; // Exact 80-bit floating point little endian representation of 1 / 2^(16383 - 1023) extern unsigned char const scaledown[10] = {0,0,0,0,0,0,0,128,255,3}; #endif void gvl_init_ieee() { #if GVL_MSVCPP // Nothing needs to be done, TODO: we should however check that the x87 state is right #elif GVL_GCC && GVL_WIN32 unsigned int const flags = _RC_NEAR | _PC_53 | _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_UNDERFLOW | _EM_INEXACT; _control87(flags, _MCW_EM | _MCW_PC | _MCW_RC); #elif GVL_GCC && GVL_LINUX fpu_control_t v = _FPU_DOUBLE | _FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM | _FPU_MASK_UM | _FPU_MASK_PM | _FPU_RC_NEAREST; _FPU_SETCW(v); #else # error "Don't know what to do on this platform" #endif } #if GVL_MSVCPP int fpieee_handler( _FPIEEE_RECORD *pieee ) { pieee->Result.Value.Fp64Value = 0.0; // Flush to zero return EXCEPTION_CONTINUE_EXECUTION; } #endif void gvl_flush_to_zero_context(void(*func)()) { #if GVL_MSVCPP __try { unsigned int const flags = _EM_INVALID | /*_EM_DENORMAL |*/ _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_UNDERFLOW | _EM_INEXACT; unsigned int old; _controlfp_s(&old, flags, _MCW_EM); func(); _controlfp_s(0, old, _MCW_EM); } __except(_fpieee_flt( GetExceptionCode(), GetExceptionInformation(), fpieee_handler)) { } #else fprintf(stderr, "gvl_flush_to_zero_context is unsupported"); exit(1); #endif } lierolibre-0.5/src/gvl/math/ieee.hpp000066400000000000000000000347211205125547100174470ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_FDA91F49FD8F423968AA34AD0C51384B #define UUID_FDA91F49FD8F423968AA34AD0C51384B /* NOTE: Keep this usable from C */ #include "../support/platform.hpp" #include #if !defined(GVL_FORCE_SSE_FPU) && GVL_FORCE_SSE2_FPU #define GVL_FORCE_SSE_FPU 1 #endif #if GVL_MSVCPP /* We may want to use intrinsics */ #include //#pragma intrinsic(_mm_mul_sd, _mm_div_sd, _mm_mul_ss, _mm_div_ss) #endif #ifdef __cplusplus #include extern "C" { #endif #if GVL_MSVCPP #pragma fp_contract(off) #pragma fenv_access(on) #pragma float_control(except, off) #pragma float_control(precise, on) /* NOTE: For VC++, use these flags: ** For CPUs supporting SSE2: /arch:SSE2 /D "GVL_X87=0" /D "GVL_FORCE_SSE2=1" ** For compatibility: /D "GVL_X87=1" ** ** The "GVL_FORCE_SSE2=1" define may be omitted if you're absolutely sure ** that no multiplications or divisions are done in x87. It may worsen some ** optimizations if enabled. ** With the above pragmas and operations wrapped in functions, VC++ has a ** strong aversion towards generating x87 instructions for any floating point ** operation, but one can never be sure. The easiest way to verify is ** searching assembler output for "fi?mulp?" and "fi?divp?" (regex) and make ** sure nothing is found. */ #elif GVL_GCC /* NOTE: For gcc on x86, use these flags: ** For CPUs supporting SSE2: -frounding-math -msse2 -mfpmath=sse -DGVL_X87=0 ** For compatibility: -frounding-math -DGVL_X87=1 ** ** Flags that are recommended: ** -fno-math-errno ** ** Some platforms do not set errno anyway, so it's best if it's not set anywhere. ** This can also increase performance. */ #endif /* Setup FPU for IEEE compliant operation. Allows ** the g* functions to produce reproducible results. NOTE: If this ** function is used, optimizations that assume that certain FPU flags are ** set need to be disabled. */ void gvl_init_ieee(); /* NOTE: Not tested! */ void gvl_flush_to_zero_context(void(*func)()); #if GVL_X87 extern unsigned char const scaleup[10]; extern unsigned char const scaledown[10]; GVL_INLINE double gM(double x, double y) { #if GVL_MSVCPP /* To avoid incorrectly rounded subnormals due to ** double rounding, we must force double precision ** subnormals to also be extended precision ** subnormals after the multiply. We do that by ** multiplying one of the operands with 1 / 2^(16383 - 1023) ** before the multiply and multiply the result ** with 2^(16383 - 1023) afterwards. */ double r; __asm { #if 0 fld TBYTE PTR scaleup fld TBYTE PTR scaledown fmul x /* ST(0) = x*scaledown, ST(1) = scaleup */ fmul y /* ST(0) = x*scaledown*y, ... */ fmul ST(0),ST(1) /* ST(0) = x*scaledown*y*scaleup */ fstp r fstp ST #endif /* This was generated by gcc, probably better: */ fld y /* y = ST(0) */ fld x /* x = ST(0), y = ST(1) */ fld TBYTE PTR scaledown /* scaledown = ST(0), x = ST(1), y = ST(2) */ fmulp ST(1), ST(0) /* x*scaledown = ST(0), y = ST(1) */ fmulp ST(1), ST(0) /* (x*scaledown)*y = ST(0) */ fld TBYTE PTR scaleup /* scaleup = ST(0), (x*scaledown)*y = ST(1) */ fmulp ST(1), ST(0) /* ((x*scaledown)*y)*scaleup = ST(0) */ fstp r /* r = R(((x*scaledown)*y)*scaleup) */ /* One could think this was better, TODO: investigate */ #if 0 fld TBYTE PTR scaledown /* scaledown = ST(0) */ fmul x /* x*scaledown = ST(0) */ fmul y /* (x*scaledown)*y = ST(0) */ fld TBYTE PTR scaleup /* scaleup = ST(0), (x*scaledown)*y = ST(1) */ fmulp ST(1), ST(0) /* ((x*scaledown)*y)*scaleup = ST(0) */ fstp r /* r = R(((x*scaledown)*y)*scaleup) */ #endif } return r; #elif GVL_GCC /* GCC supports 80-bit floats, so we can use them instead of ** inline asm to hopefully get a bit better code generation. */ long double xe, ye; #if !GVL_GCC_FLOAT_STORE && !GVL_TRUST_GCC_ROUND_FROM_LONG_DOUBLE /* We can skip volatile if we can trust that GCC rounds the long double to double assignment */ volatile /* volatile to force store and load */ #endif double res; xe = x; ye = y; res = ((xe * *((long double*)scaledown)) * ye) * (*(long double*)scaleup); return res; #else #error "Not implemented" #endif } GVL_INLINE double gD(double x, double y) { #if GVL_MSVCPP /* Similarily to the case with gM, we do this ** to avoid incorrectly rounded subnormals. */ double r; __asm { #if 0 fld TBYTE PTR scaleup fld TBYTE PTR scaledown fmul x /* ST(0) = x*scaledown, ST(1) = scaleup */ fdiv y /* ST(0) = x*scaledown/y, ... */ fmul ST(0),ST(1) /* ST(0) = x*scaledown/y*scaleup */ fstp r fstp ST #endif /* This was generated by gcc, probably better: */ fld TBYTE PTR scaledown /* scaledown = ST(0) */ fmul x /* x*scaledown = ST(0) */ fdiv y /* (x*scaledown)/y = ST(0) */ fld TBYTE PTR scaleup /* scaleup = ST(0), (x*scaledown)/y = ST(1) */ fmulp ST(1), ST(0) /* ((x*scaledown)/y)*scaleup = ST(0) */ fstp r /* r = R(((x*scaledown)/y)*scaleup) */ } return r; #elif GVL_GCC /* GCC supports 80-bit floats, so we can use them instead of ** inline asm to hopefully get a bit better code generation. */ long double xe, ye; #if !GVL_GCC_FLOAT_STORE && !GVL_TRUST_GCC_ROUND_FROM_LONG_DOUBLE /* We can skip volatile if we can trust that GCC rounds the long double to double assignment */ volatile /* volatile to force store and load */ #endif double res; /* volatile to force store and load */ xe = x; ye = y; res = ((xe * *((long double*)scaledown)) / ye) * (*(long double*)scaleup); return res; #else #error "Not implemented" #endif } /* Addition and subtraction do not suffer from incorrectly rounded ** subnormals. */ GVL_INLINE double gA(double x, double y) { #if GVL_GCC #if !GVL_GCC_FLOAT_STORE volatile /* volatile to force store and load */ #endif double res; res = x + y; return res; #else return x + y; #endif } GVL_INLINE double gS(double x, double y) { #if GVL_GCC #if !GVL_GCC_FLOAT_STORE volatile /* volatile to force store and load */ #endif double res; res = x - y; return res; #else return x - y; #endif } GVL_INLINE double gSqrt(double x) { #if GVL_GCC #if !GVL_GCC_FLOAT_STORE volatile /* volatile to force store and load */ #endif double res; res = sqrt(x); return res; #else return sqrt(x); #endif } #else /* if !GVL_X87 */ GVL_INLINE double gM(double x, double y) { #if GVL_MSVCPP && GVL_FORCE_SSE2_FPU && !GVL_X86_64 /* Use SSE2 intrinsics to make sure VC++ doesn't cause ** incorrect subnormal rounding here. NOTE: This might worsen optimization ** somewhat. */ double r; _mm_store_sd(&r, _mm_mul_sd(_mm_load_sd(&x), _mm_load_sd(&y))); return r; #else return x * y; #endif } GVL_INLINE double gD(double x, double y) { #if GVL_MSVCPP && GVL_FORCE_SSE2_FPU && !GVL_X86_64 /* Use SSE2 intrinsics to make sure VC++ doesn't cause ** incorrect subnormal rounding here. NOTE: This might worsen optimization ** somewhat. */ double r; _mm_store_sd(&r, _mm_div_sd(_mm_load_sd(&x), _mm_load_sd(&y))); return r; #else return x / y; #endif } GVL_INLINE double gA(double x, double y) { /* We don't force SSE2 for VC++ here even with GVL_FORCE_SSE2_FPU, because ** addition doesn't suffer from incorrect subnormal rounding. */ double res; res = x + y; return res; } GVL_INLINE double gS(double x, double y) { /* We don't force SSE2 for VC++ here, because addition doesn't suffer from ** incorrect subnormal rounding. */ double res; res = x - y; return res; } GVL_INLINE double gSqrt(double x) { double res; res = sqrt(x); return res; } // NOTE: g*f variants are currently only available with SSE or SSE2 enabled and // not with x87. GVL_INLINE float gMf(float x, float y) { #if GVL_MSVCPP && GVL_FORCE_SSE2_FPU && !GVL_X86_64 /* Use SSE intrinsics to make sure VC++ doesn't cause ** incorrect subnormal rounding here. NOTE: This might worsen optimization ** somewhat. */ float r; _mm_store_ss(&r, _mm_mul_ss(_mm_load_ss(&x), _mm_load_ss(&y))); return r; #else return x * y; #endif } GVL_INLINE float gDf(float x, float y) { #if GVL_MSVCPP && GVL_FORCE_SSE_FPU && !GVL_X86_64 /* Use SSE intrinsics to make sure VC++ doesn't cause ** incorrect subnormal rounding here. NOTE: This might worsen optimization ** somewhat. */ float r; _mm_store_ss(&r, _mm_div_ss(_mm_load_ss(&x), _mm_load_ss(&y))); return r; #else return x / y; #endif } GVL_INLINE float gAf(float x, float y) { #if GVL_MSVCPP && GVL_FORCE_SSE_FPU && !GVL_X86_64 // VC++ generates stupid code for just (x+y) in x86. Intrinsics are actually faster! float r; _mm_store_ss(&r, _mm_add_ss(_mm_load_ss(&x), _mm_load_ss(&y))); return r; #else return x + y; #endif } GVL_INLINE float gSf(float x, float y) { #if GVL_MSVCPP && GVL_FORCE_SSE_FPU && !GVL_X86_64 // VC++ generates stupid code for just (x-y) in x86. Intrinsics are actually faster! float r; _mm_store_ss(&r, _mm_sub_ss(_mm_load_ss(&x), _mm_load_ss(&y))); return r; #else return x - y; #endif } GVL_INLINE float gSqrtf(float x) { #if GVL_MSVCPP float r; _mm_store_ss(&r, _mm_sqrt_ss(_mm_load_ss(&x))); return r; #else return sqrtf(x); #endif } #endif GVL_INLINE float gdtof(double x) { return (float)x; } #ifdef __cplusplus } namespace gvl { // C++ specific features struct rdouble { rdouble() : value(0.0) { } rdouble(double value) : value(value) { } rdouble& operator+=(rdouble b) { value = gA(value, b.value); return *this; } rdouble& operator-=(rdouble b) { value = gS(value, b.value); return *this; } rdouble& operator*=(rdouble b) { value = gM(value, b.value); return *this; } rdouble& operator/=(rdouble b) { value = gD(value, b.value); return *this; } rdouble operator-() const { return -value; } double value; }; inline rdouble operator+(rdouble a, rdouble b) { return gA(a.value, b.value); } inline rdouble operator-(rdouble a, rdouble b) { return gS(a.value, b.value); } inline rdouble operator*(rdouble a, rdouble b) { return gM(a.value, b.value); } inline rdouble operator/(rdouble a, rdouble b) { return gD(a.value, b.value); } inline bool operator<(rdouble a, rdouble b) { return a.value < b.value; } inline bool operator<=(rdouble a, rdouble b) { return a.value <= b.value; } inline bool operator>(rdouble a, rdouble b) { return a.value > b.value; } inline bool operator>=(rdouble a, rdouble b) { return a.value >= b.value; } inline bool operator!=(rdouble a, rdouble b) { return a.value != b.value; } inline bool operator==(rdouble a, rdouble b) { return a.value == b.value; } inline rdouble sqrt(rdouble x) { return gSqrt(x.value); } inline rdouble log(rdouble x) { return std::log(x.value); } inline rdouble cos(rdouble x) { return std::cos(x.value); } inline rdouble sin(rdouble x) { return std::sin(x.value); } inline rdouble atan2(rdouble a, rdouble b) { return std::atan2(a.value, b.value); } inline rdouble floor(rdouble x) { return std::floor(x.value); } #if !GVL_X87 struct rfloat { rfloat() //: value(0.f) { } rfloat(float value) : value(value) { } explicit rfloat(double value_d) : value(gdtof(value_d)) { } float value; }; GVL_FORCE_INLINE rfloat& operator+=(rfloat& a, rfloat const& b) { a.value = gAf(a.value, b.value); return a; } GVL_FORCE_INLINE rfloat& operator-=(rfloat& a, rfloat const& b) { a.value = gSf(a.value, b.value); return a; } GVL_FORCE_INLINE rfloat& operator*=(rfloat& a, rfloat const& b) { a.value = gMf(a.value, b.value); return a; } GVL_FORCE_INLINE rfloat& operator/=(rfloat& a, rfloat const& b) { a.value = gDf(a.value, b.value); return a; } GVL_FORCE_INLINE rfloat operator-(rfloat const& a) { return -a.value; } GVL_FORCE_INLINE rfloat operator+(rfloat const& a, rfloat const& b) { return gAf(a.value, b.value); } GVL_FORCE_INLINE rfloat operator-(rfloat const& a, rfloat const& b) { return gSf(a.value, b.value); } GVL_FORCE_INLINE rfloat operator*(rfloat const& a, rfloat const& b) { return gMf(a.value, b.value); } GVL_FORCE_INLINE rfloat operator/(rfloat const& a, rfloat const& b) { return gDf(a.value, b.value); } GVL_FORCE_INLINE bool operator<(rfloat const& a, rfloat const& b) { return a.value < b.value; } GVL_FORCE_INLINE bool operator<=(rfloat const& a, rfloat const& b) { return a.value <= b.value; } GVL_FORCE_INLINE bool operator>(rfloat const& a, rfloat const& b) { return a.value > b.value; } GVL_FORCE_INLINE bool operator>=(rfloat const& a, rfloat const& b) { return a.value >= b.value; } GVL_FORCE_INLINE bool operator!=(rfloat const& a, rfloat const& b) { return a.value != b.value; } GVL_FORCE_INLINE bool operator==(rfloat const& a, rfloat const& b) { return a.value == b.value; } GVL_FORCE_INLINE rfloat sqrt(rfloat x) { return gSqrtf(x.value); } GVL_FORCE_INLINE rfloat log(rfloat x) { return gdtof(std::log(x.value)); } GVL_FORCE_INLINE rfloat cos(rfloat x) { return gdtof(std::cos(x.value)); } GVL_FORCE_INLINE rfloat sin(rfloat x) { return gdtof(std::sin(x.value)); } GVL_FORCE_INLINE rfloat atan2(rfloat a, rfloat b) { return gdtof(std::atan2(a.value, b.value)); } GVL_FORCE_INLINE rfloat floor(rfloat x) { return gdtof(std::floor(x.value)); } #endif } #if !GVL_X87 inline float to_float(gvl::rfloat v) { return v.value; } inline float to_float(float v) { return v; } #endif #endif #endif /* UUID_FDA91F49FD8F423968AA34AD0C51384B */ lierolibre-0.5/src/gvl/math/math.hpp000066400000000000000000000033151205125547100174640ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_C4C5ABCE77EF40A7F785AFB143D018B0 #define UUID_C4C5ABCE77EF40A7F785AFB143D018B0 namespace gvl { template inline T clamp(T value, T min, T max) { if(value < min) return min; else if(value > max) return max; else return value; } } #endif // UUID_C4C5ABCE77EF40A7F785AFB143D018B0 lierolibre-0.5/src/gvl/math/matrix.hpp000066400000000000000000000075171205125547100200470ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_157EE60961484EB2118DE2BF33EAF464 #define UUID_157EE60961484EB2118DE2BF33EAF464 #include #include "../support/debug.hpp" #include "vec.hpp" namespace gvl { // Only N == M == 2 supported at the moment // N = columns // M = rows template struct basic_matrix_common { T v[N * M]; T& operator()(int row, int column) { return v[row*N + column]; } D& operator+=(D const& rhs) { for(std::size_t i = 0; i < N * M; ++i) v[i] += rhs.v[i]; return static_cast(*this); } D& operator*=(T rhs) { for(std::size_t i = 0; i < N * M; ++i) v[i] *= rhs; return static_cast(*this); } static D identity() { D ret; for(std::size_t i = 0; i < N * M; ++i) ret.v[i] = T(0); for(std::size_t i = 0; i < (N < M ? N : M); ++i) ret.v[i + i*N] = T(1); return ret; } }; template struct basic_matrix : basic_matrix_common > { }; template struct basic_matrix : basic_matrix_common > { T det() const { return (this->v[0] * this->v[3] - this->v[1] * this->v[2]); } basic_matrix invert() const { T determinant = det(); sassert(determinant != T(0)); T idet = T(1) / determinant; T a = this->v[0], b = this->v[1], c = this->v[2], d = this->v[3]; basic_matrix ret; ret.v[0] = d * idet; ret.v[1] = b * -idet; ret.v[2] = c * -idet; ret.v[3] = a * idet; return ret; } // Solve A * x = b basic_vec solve(basic_vec b) const { T determinant = inv_det(); sassert(determinant != T(0)); T idet = T(1) / determinant; basic_vec ret( idet * (this->v[3] * b.x - this->v[1] * b.y), idet * (this->v[0] * b.y - this->v[2] * b.x)); return ret; } /// Initialize this matrix using an angle. This matrix becomes /// an orthonormal rotation matrix. void assign_rotation(T angle) { // To enable overloading using std::cos; using std::sin; T c = cos(angle), s = sin(angle); ret.v[0] = c; ret.v[1] = -s; ret.v[2] = s; ret.v[3] = c; /* col1.x = c; col2.x = -s; col1.y = s; col2.y = c; */ } basic_vec operator*(basic_vec const& rhs) const { basic_vec ret; ret.x = this->v[0] * rhs.x + this->v[1] * rhs.y; ret.y = this->v[2] * rhs.x + this->v[3] * rhs.y; return ret; } }; typedef basic_matrix fmat2x2; } // namespace gvl #endif // UUID_157EE60961484EB2118DE2BF33EAF464 lierolibre-0.5/src/gvl/math/normal_distribution.hpp000066400000000000000000000046361205125547100226310ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_786BDFAEC45D4C3F36D47BB76ABCE5DE #define UUID_786BDFAEC45D4C3F36D47BB76ABCE5DE #include "ieee.hpp" #include namespace gvl { template struct normal_distribution { typedef T value_type; template value_type normal_variate(Random rand, value_type mean = value_type(0), value_type sigma = value_type(1)) { using std::sqrt; using std::log; using std::sin; using std::cos; if(!valid) { r1 = value_type(rand.get_double()); value_type r2 = value_type(rand.get_double()); cached_rho = sqrt(value_type(-2) * log(value_type(1) - r2)); } else { valid = false; } value_type const pi = value_type(3.14159265358979323846); return cached_rho * (valid ? cos(value_type(2) * pi * r1) : sin(value_type(2) * pi * r1)) * sigma + mean; } normal_distribution() : valid(false) { } value_type r1, cached_rho; bool valid; }; } // namespace gvl #endif // UUID_786BDFAEC45D4C3F36D47BB76ABCE5DE lierolibre-0.5/src/gvl/math/random.hpp000066400000000000000000000050631205125547100200150ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_F29926F3240844A09DCFB9B1828C7DC8 #define UUID_F29926F3240844A09DCFB9B1828C7DC8 #ifndef NDEBUG #include "ieee.hpp" #endif #include "../support/debug.hpp" namespace gvl { template struct prng_common { typedef ValueT value_type; DerivedT& derived() { return *static_cast(this); } // Number in [0.0, 1.0) double get_double() { uint32_t v = derived()(); // This result should be exact if at least double-precision is used. Therefore // there shouldn't be any reason to use gD. double ret = v / 4294967296.0; sassert(ret == gD(v, 4294967296.0)); return ret; } // NOTE! Not reproducible right now. We don't want // to take the (potential) hit if it's not necessary. // Number in [0.0, max) double get_double(double max) { return get_double() * max; } // Number in [0, max) uint32_t operator()(uint32_t max) { uint64_t v = derived()(); v *= max; return uint32_t(v >> 32); } // Number in [min, max) uint32_t operator()(uint32_t min, uint32_t max) { sassert(min < max); return operator()(max - min) + min; } }; } // namespace gvl #endif // UUID_F29926F3240844A09DCFB9B1828C7DC8 lierolibre-0.5/src/gvl/math/rect.hpp000066400000000000000000000167001205125547100174720ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_63536246013C464DDB1F129027E54907 #define UUID_63536246013C464DDB1F129027E54907 #include "vec.hpp" #include // For std::min, std::max namespace gvl { template class basic_rect { public: basic_rect() : x1(0), y1(0), x2(0), y2(0) { } basic_rect(T x1_, T y1_, T x2_, T y2_) : x1(x1_), y1(y1_), x2(x2_), y2(y2_) { } basic_rect(basic_vec const& pixel) : x1(pixel.x), y1(pixel.y) , x2(pixel.x + T(1)), y2(pixel.y + T(1)) { } basic_rect(basic_vec const& center, T size) : x1(center.x - size), y1(center.y - size) , x2(center.x + size), y2(center.y + size) { } basic_rect(basic_vec const& center, T w, T h) : x1(center.x - w/2), y1(center.y - h/2) , x2(center.x + w/2), y2(center.y + h/2) { } basic_rect(basic_vec const& corner1, basic_vec const& corner2) { if(corner1.x < corner2.x) { x1 = corner1.x; x2 = corner2.x + 1; } else { x1 = corner2.x; x2 = corner1.x + 1; } if(corner1.y < corner2.y) { y1 = corner1.y; y2 = corner2.y + 1; } else { y1 = corner2.y; y2 = corner1.y + 1; } } T x1; T y1; T x2; T y2; T center_x() const { return (x1 + x2) / T(2); } T center_y() const { return (y1 + y2) / T(2); } basic_vec center() const { return basic_vec(center_x(), center_y()); } T width() const { return x2 - x1; } T height() const { return y2 - y1; } basic_rect flip() const { return basic_rect(y1, x1, y2, x2); } bool valid() { return x1 <= x2 && y1 <= y2; } void join(basic_rect const& b) { x1 = std::min(b.x1, x1); y1 = std::min(b.y1, y1); x2 = std::max(b.x2, x2); y2 = std::max(b.y2, y2); } bool precise_join(basic_rect const& b) { bool ok = false; if(x1 == b.x1 && x2 == b.x2) { if(b.y2 >= y1 && b.y1 <= y2) ok = true; } else if(y1 == b.y1 && y2 == b.y2) { if(b.x2 >= x1 && b.x1 <= x2) ok = true; } else { ok = inside(b) || b.inside(*this); } if(ok) join(b); return ok; } bool inside(basic_rect const& b) const { return x1 <= b.x1 && x2 >= b.x2 && y1 <= b.y1 && y2 >= b.y2; } bool join_h(basic_rect const& b) { T new_x1 = std::min(b.x1, x1); T new_x2 = std::max(b.x2, x2); bool changed = new_x1 != x1 || new_x2 != x2; x1 = new_x1; x2 = new_x2; return changed; } bool join_v(basic_rect const& b) { T new_y1 = std::min(b.y1, y1); T new_y2 = std::max(b.y2, y2); bool changed = new_y1 != y1 || new_y2 != y2; y1 = new_y1; y2 = new_y2; return changed; } // Extend *this and b to their maximal size without // changing their joint coverage. int maximal_extend(basic_rect& b) { int change_mask = 0; if(intersecting_v(b)) { if(encloses_h(b)) { // Extend b vertically into *this if(b.join_v(*this)) change_mask |= 2; } if(b.encloses_h(*this)) { // Extend *this vertically into b if(join_v(b)) change_mask |= 1; } } if(intersecting_h(b)) { if(encloses_v(b)) { // Extend b horizontally into *this if(b.join_h(*this)) change_mask |= 2; } if(b.encloses_v(*this)) { // Extend *this horizontally into b if(join_h(b)) change_mask |= 1; } } return change_mask; } // Is b inside *this? bool encloses(basic_rect const& b) const { return encloses_h(b) && encloses_v(b); } // Is the horizontal span of b inside *this? bool encloses_h(basic_rect const& b) const { return x1 <= b.x1 && x2 >= b.x2; } // Is the vertical span of b inside *this? bool encloses_v(basic_rect const& b) const { return y1 <= b.y1 && y2 >= b.y2; } bool proper_intersecting(basic_rect const& b) const { return (b.y2 > y1 && b.y1 < y2 && b.x2 > x1 && b.x1 < x2); } bool intersecting_h(basic_rect const& b) const { return (b.x2 >= x1 && b.x1 <= x2); } bool intersecting_v(basic_rect const& b) const { return (b.y2 >= y1 && b.y1 <= y2); } // TODO: This isn't really intersecting! // Also returns true when the rectangles are merely touching. // What to do about that? Added proper_intersecting above for now. bool intersecting(basic_rect const& b) const { return intersecting_h(b) && intersecting_v(b); } bool intersect(basic_rect const& b) { x1 = std::max(b.x1, x1); y1 = std::max(b.y1, y1); x2 = std::min(b.x2, x2); y2 = std::min(b.y2, y2); return valid(); } bool encloses(basic_vec v) const { return encloses(v.x, v.y); } bool encloses(T x, T y) const { T diffX = x - x1; T diffY = y - y1; return diffX < width() && diffX >= T(0) && diffY < height() && diffY >= T(0); } basic_rect operator&(basic_rect const& b) const { basic_rect ret(*this); ret &= b; return ret; } basic_rect& operator&=(basic_rect const& b) { intersect(b); return *this; } basic_rect operator|(basic_rect const& b) const { basic_rect ret(*this); ret |= b; return ret; } basic_rect& operator|=(basic_rect const& b) { join(b); return *this; } basic_rect operator+(basic_vec const& b) { basic_rect ret(*this); ret += b; return ret; } basic_rect& operator+=(basic_vec const& b) { x1 += b.x; x2 += b.x; y1 += b.y; y2 += b.y; return *this; } basic_rect operator-(basic_vec const& b) { basic_rect ret(*this); ret -= b; return ret; } basic_rect& operator-=(basic_vec const& b) { x1 -= b.x; x2 -= b.x; y1 -= b.y; y2 -= b.y; return *this; } basic_rect translated(T x, T y) { return *this + basic_vec(x, y); } void translate_v(T y) { y1 += y; y2 += y; } void translate_h(T x) { x1 += x; x2 += x; } basic_vec ul() { return basic_vec(x1, y1); } basic_vec ur() { return basic_vec(x2, y1); } basic_vec ll() { return basic_vec(x1, y2); } basic_vec lr() { return basic_vec(x2, y2); } bool operator==(basic_rect const& b) const { return x1 == b.x1 && y1 == b.y1 && x2 == b.x2 && y2 == b.y2; } bool operator!=(basic_rect const& b) const { return !operator==(b); } }; typedef basic_rect rect; typedef basic_rect frect; } // namespace gvl #endif // UUID_63536246013C464DDB1F129027E54907 lierolibre-0.5/src/gvl/math/tests/000077500000000000000000000000001205125547100171625ustar00rootroot00000000000000lierolibre-0.5/src/gvl/math/tests/reproducible_floats.cpp000066400000000000000000000122461205125547100237220ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../../test/test.hpp" #include "../tt800.hpp" #include "../../support/algorithm.hpp" #include "../ieee.hpp" #include #include #include bool equivalent(double x, double y) { return (x == y) || (fd_isnan(x) && fd_isnan(y)); } GVLTEST_SUITE(gvl, reproducible_floats) GVLTEST(gvl, reproducible_floats, corner_cases) { gvl_init_ieee(); double computedNaN = gSqrt(-1.0); double negZero = -10.0 * 0.0; double zero = 0.0; ASSERT("isnan(computedNaN)", fd_isnan(computedNaN) != 0); ASSERT("x-x is not optimized", fd_isnan(gS(computedNaN, computedNaN)) != 0); ASSERT("x*0.0 is not optimized", fd_isnan(gM(computedNaN, 0.0)) != 0); ASSERT("x/x is not optimized", fd_isnan(gD(computedNaN, computedNaN)) != 0); ASSERT("dividing by -0 yields -infinity", gD(1.0, negZero) == -std::numeric_limits::infinity()); ASSERT("dividing by 0 yields infinity", gD(1.0, zero) == std::numeric_limits::infinity()); ASSERT("dividing 0 by 0 yields NaN", fd_isnan(gD(zero, zero)) != 0); // Fails with round-double-53(round-extended-64(x * 2) / 2) ASSERT("double overflow with multiply", gD(gM(1.7e308, 2.0), 2.0) == std::numeric_limits::infinity()); // Fails with round-double-53(round-extended-64(x + x) / 2) ASSERT("double overflow with add", gD(gA(1.7e308, 1.7e308), 2.0) == std::numeric_limits::infinity()); // Fails with round-double-53(round-extended-64(x / 2) * 2) ASSERT("double underflow with divide", gM(gD(4.940656458412e-324, 2.0), 2.0) == 0.0); // These fail with round-double-53(round-extended-64(x / y)) ASSERT("division is done with double precision #4", gD(1.0800166971961008e+0238, 5.1489795549339881e-0054) == 2.0975354158498831e+0291); ASSERT("division is done with double precision #5", gD(7.3289450094340694e+0083, 1.9115748309497579e-0128) == 3.8339827930213510e+0211); ASSERT("division is done with double precision #6", gD(1.9544203331713143e-0205, 3.5068757973112538e-0184) == 5.5731096455420005e-0022); // These fail with round-double-53(round-extended-53(x * y)) ASSERT("multiplication is done with double precision #1", gM(8.5782035936114600e-0256, 9.6044770612653327e-0055) == 8.2389159641705354e-0310); ASSERT("multiplication is done with double precision #2", gM(1.5033255271664106e-0171, 7.6121384488969229e-0138) == 1.1443522046551671e-0308); ASSERT("multiplication is done with double precision #3", gM(1.7912119214492215e-0236, 1.0043439961829961e-0072) == 1.7989929391989340e-0308); // These fail with round-double-53(round-extended-53(x / y)) ASSERT("division is done with double precision #1", gD(9.9174847050126468e-0179, 6.5505123943214619e+0129) == 1.5140013647802517e-0308); ASSERT("division is done with double precision #2", gD(6.0531002917684863e-0252, 6.8672903290096396e-0306) == 8.8143940357352393e+0053); ASSERT("division is done with double precision #3", gD(3.5215930923124385e+0097, 2.6716890617707574e+0068) == 1.3181148744825781e+0029); // These fail with round-double-53(round-extended-64(sqrt(x)) ASSERT("sqrt is done with double precision #1", gSqrt(7.9975425458479251e-0252) == 2.8279926707556945e-0126); ASSERT("sqrt is done with double precision #2", gSqrt(9.1244941815835015e+0183) == 9.5522218261425980e+0091); ASSERT("sqrt is done with double precision #3", gSqrt(1.2549478092296626e-0152) == 1.1202445309974347e-0076); // These fail with round-double-53(round-extended-64(round-extended-64(1 + x) - y)) ASSERT("intermediates are double precision #1", gS(gA(1.0, -11562242321027462.), 1642019876357220.2) == -13204262197384680.); ASSERT("intermediates are double precision #2", gS(gA(1.0, -6.4758762313609902e-006), 4.6367248808744297e-005) == 0.99994715687495983); ASSERT("intermediates are double precision #3", gS(gA(1.0, -0.025106293868442715), -5.4931982728117911e-015) == 0.97489370613156268); } lierolibre-0.5/src/gvl/math/tt800.cpp000066400000000000000000000044741205125547100174140ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "tt800.hpp" #include "../system/system.hpp" namespace gvl { void tt800::seed(uint32_t new_seed) { // Initialization taken from mt19937ar.c x[0] = new_seed; for(unsigned int i = 1; i < N; ++i) { x[i] = (1812433253UL * (x[i - 1] ^ (x[i - 1] >> 30)) + i); /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ /* In the previous versions, MSBs of the seed affect */ /* only MSBs of the array mt[]. */ /* 2002/01/09 modified by Makoto Matsumoto */ } k = N; } void tt800::update() { static uint32_t mag01[2] = { 0x0, 0x8ebfd028 /* this is magic vector `a', don't change */ }; unsigned int kk = 0; for(; kk < N - M; ++kk) { x[kk] = x[kk + M] ^ (x[kk] >> 1) ^ mag01[x[kk] & 1]; } for(; kk < N; ++kk) { x[kk] = x[kk + (M - N)] ^ (x[kk] >> 1) ^ mag01[x[kk] & 1]; } k = 0; } tt800& global_rand() { static tt800 inst(get_ticks()); return inst; } } lierolibre-0.5/src/gvl/math/tt800.hpp000066400000000000000000000050251205125547100174120ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_6D485E50691B483866E152A1029D5226 #define UUID_6D485E50691B483866E152A1029D5226 #include "../support/cstdint.hpp" namespace gvl { struct tt800 { static unsigned int const N = 25; static unsigned int const M = 7; typedef uint32_t value_type; tt800(uint32_t new_seed) : k(0) { seed(new_seed); } void seed(uint32_t new_seed); uint32_t operator()() { if(k == N) update(); uint32_t y = x[k++]; y ^= (y << 7) & 0x2b5b2500; /* s and b, magic vectors */ y ^= (y << 15) & 0xdb8b0000; /* t and c, magic vectors */ return y; } /* int32_t range(int32_t a, int32_t b) { return a + int32_t((b - a) * uint64_t(operator()()) >> 32); }*/ uint32_t range(uint32_t a, uint32_t b) { return a + uint32_t((b - a) * uint64_t(operator()()) >> 32); } template void serialize(Archive& arch); private: void update(); uint32_t x[N]; uint32_t k; uint32_t front_; }; template void tt800::serialize(Archive& arch) { for(int i = 0; i < N; ++i) arch.uint(32, x[i]); arch.uint(32, k); } tt800& global_rand(); } // namespace gvl #endif // UUID_6D485E50691B483866E152A1029D5226 lierolibre-0.5/src/gvl/math/vec.hpp000066400000000000000000000141141205125547100173070ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_604BD56BB2F2436A4CC319ACA78603F3 #define UUID_604BD56BB2F2436A4CC319ACA78603F3 #include namespace gvl { // Only N == 2 supported at the moment template struct basic_vec { }; template struct basic_vec { typedef T manip_t; typedef T coord_type; basic_vec() : x(T(0)), y(T(0)) { } template explicit basic_vec(basic_vec const& b) : x(static_cast(b.x)), y(static_cast(b.y)) { } /// Vector from a to b. /// basic_vec(basic_vec const& a, basic_vec const& b) : x(b.x - a.x), y(b.y - a.y) { } basic_vec(T const& x_, T const& y_) : x(x_) , y(y_) { } template basic_vec(T2 const& x, T2 const& y) : x(static_cast(x)), y(static_cast(y)) { } void zero() { x = T(0); y = T(0); } basic_vec& operator += (basic_vec const& rhs) { x += rhs.x; y += rhs.y; return *this; } basic_vec& operator -= (basic_vec const& rhs) { x -= rhs.x; y -= rhs.y; return *this; } basic_vec& operator *= (T rhs) { x *= rhs; y *= rhs; return *this; } basic_vec& operator /= (T rhs) { x /= rhs; y /= rhs; return *this; } friend basic_vec operator - (basic_vec const& self) { return basic_vec(-self.x, -self.y); } basic_vec half() const { return basic_vec(x / T(2), y / T(2)); } T x; T y; }; // Operations template inline basic_vec operator - (basic_vec const& lhs, basic_vec const& rhs) { basic_vec ret(lhs); ret -= rhs; return ret; } template inline basic_vec operator + (basic_vec const& lhs, basic_vec const& rhs) { basic_vec ret(lhs); ret += rhs; return ret; } template inline basic_vec operator * (basic_vec const& lhs, basic_vec const& rhs) { basic_vec ret(lhs); ret *= rhs; return ret; } template inline basic_vec operator * (basic_vec const& lhs, T rhs) { basic_vec ret(lhs); ret *= rhs; return ret; } template inline basic_vec operator * (T lhs, basic_vec const& rhs) { basic_vec ret(rhs); ret *= lhs; return ret; } template inline basic_vec operator / (basic_vec const& lhs, T rhs) { basic_vec ret(lhs); ret /= rhs; return ret; } template inline bool operator==(basic_vec a, basic_vec b) { return a.x == b.x && a.y == b.y; } template inline bool operator!=(basic_vec a, basic_vec b) { return !(a == b); } template inline basic_vec cross(T a, basic_vec b) { basic_vec ret(-a * b.y, a * b.x); return ret; } template inline basic_vec cross(basic_vec a, T b) { basic_vec ret(b * a.y, -b * a.x); return ret; } template inline T cross(basic_vec a, basic_vec b) { return a.x * b.y - a.y * b.x; } template inline T dot(basic_vec a, basic_vec b) { return a.x * b.x + a.y * b.y; } template inline basic_vec perp(basic_vec self) { basic_vec ret(-self.y, self.x); return ret; } // Rotate a using b template inline basic_vec rotate(basic_vec a, basic_vec b) { basic_vec ret(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x); return ret; } // Unrotate a using b template inline basic_vec unrotate(basic_vec a, basic_vec b) { basic_vec ret(a.x * b.x + a.y * b.y, a.y * b.x - a.x * b.y); return ret; } template inline T length_sqr(basic_vec self) { return self.x*self.x + self.y*self.y; } template inline T length(basic_vec self) { using std::sqrt; // To allow overloading return sqrt(length_sqr(self)); } template inline T2 length_convert(basic_vec self) { using std::sqrt; // To allow overloading return sqrt(T2(length_sqr(self))); } template inline basic_vec normal(basic_vec self) { T invLength = T(1) / length(self); basic_vec ret(self.x*invLength, self.y*invLength); return ret; } // Uses reciprocal to avoid one division, thus not as accurate as it // could be. Use normal_accurate to get a more accurate result. template inline basic_vec normal_convert(basic_vec self) { T2 invLength = T2(1) / length_convert(self); basic_vec ret(T2(self.x)*invLength, T2(self.y)*invLength); return ret; } template inline basic_vec normal_accurate(basic_vec self) { T len = length(self); basic_vec ret(self.x / len, self.y / len); return ret; } // Common aliases typedef basic_vec fvec2; typedef basic_vec ivec2; } // namespace gvl #endif // UUID_604BD56BB2F2436A4CC319ACA78603F3 lierolibre-0.5/src/gvl/meta/000077500000000000000000000000001205125547100160155ustar00rootroot00000000000000lierolibre-0.5/src/gvl/meta/as_unsigned.hpp000066400000000000000000000036211205125547100210270ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_AS_UNSIGNED_HPP #define GVL_AS_UNSIGNED_HPP namespace gvl { template struct as_unsigned { }; #define AS_UNSIGNED_MAP(FROM, TO) \ template<> \ struct as_unsigned \ { typedef TO type; }; \ template<> \ struct as_unsigned \ { typedef TO type; }; AS_UNSIGNED_MAP(char, unsigned char) AS_UNSIGNED_MAP(short, unsigned short) AS_UNSIGNED_MAP(int, unsigned int) AS_UNSIGNED_MAP(long, unsigned long) AS_UNSIGNED_MAP(long long, unsigned long long) } #endif // GVL_AS_UNSIGNED_HPP lierolibre-0.5/src/gvl/meta/is_ptr_convertible.hpp000066400000000000000000000040161205125547100224230ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_META_IS_PTR_CONVERTIBLE_HPP #define GVL_META_IS_PTR_CONVERTIBLE_HPP #include "meta.hpp" namespace gvl { template struct is_ptr_convertible_impl { template struct checker { static no_type _m_check(...); static yes_type _m_check(T); }; static From _m_from; static bool const value = sizeof( checker::_m_check(_m_from) ) == sizeof(yes_type); }; template struct is_ptr_convertible { static bool const value = is_ptr_convertible_impl::value; }; }; #endif // GVL_META_IS_PTR_CONVERTIBLE_HPP lierolibre-0.5/src/gvl/meta/meta.hpp000066400000000000000000000030521205125547100174540ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_META_HPP #define GVL_META_HPP namespace gvl { typedef char yes_type; struct no_type { char padding[8]; }; } #endif // GVL_META_HPP lierolibre-0.5/src/gvl/meta/static_log2.hpp000066400000000000000000000037711205125547100207500ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_B1A45C6C76DE4AE4E7817095BE18B516 #define UUID_B1A45C6C76DE4AE4E7817095BE18B516 #include "../support/cstdint.hpp" namespace gvl { template struct static_log2_impl { static int const c = (X >> M) > 0; static uint64_t const value = c*M + static_log2_impl<(X >> (c*M)), M/2>::value; }; template<> struct static_log2_impl<1,0> { enum { value = 0 }; }; template struct static_log2 { static uint64_t const value = static_log2_impl::value; }; template<> struct static_log2<0> {}; } #endif // UUID_B1A45C6C76DE4AE4E7817095BE18B516 lierolibre-0.5/src/gvl/resman/000077500000000000000000000000001205125547100163545ustar00rootroot00000000000000lierolibre-0.5/src/gvl/resman/allocator.hpp000066400000000000000000000055121205125547100210500ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_ALLOCATOR_HPP #define GVL_ALLOCATOR_HPP #include #include namespace gvl { template struct malloc_allocator { typedef T value_type; typedef value_type* pointer; typedef value_type const* const_pointer; typedef value_type& reference; typedef value_type const& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; malloc_allocator() {} malloc_allocator(malloc_allocator const&) {} ~malloc_allocator() {} pointer address(reference x) const { return &x; } const_pointer address(const_reference x) const { return &x; } pointer allocate(size_type n, const_pointer = 0) { void* p = std::malloc(n * sizeof(T)); if (!p) throw std::bad_alloc(); return static_cast(p); } void deallocate(pointer p, size_type) { std::free(p); } size_type max_size() const { return static_cast(-1) / sizeof(value_type); } void construct(pointer p, value_type const& x) { new(p) value_type(x); } void destroy(pointer p) { p->~value_type(); } private: void operator=(malloc_allocator const&); }; template inline bool operator==(malloc_allocator const&, malloc_allocator const&) { return true; } template inline bool operator!=(malloc_allocator const&, malloc_allocator const&) { return false; } } #endif // GVL_ALLOCATOR_HPP lierolibre-0.5/src/gvl/resman/linked_object.hpp000066400000000000000000000110331205125547100216570ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_E2DA39C2967941F4DE389AB24A11196D #define UUID_E2DA39C2967941F4DE389AB24A11196D #include "../support/move.hpp" #include "../support/debug.hpp" namespace gvl { struct linked_object_common { linked_object_common() { // Assigned in body to avoid warnings prev = this; next = this; } linked_object_common(linked_object_common const& other) : prev(&other) , next(other.next) { other.next = this; next->prev = this; } linked_object_common(move_holder other) { // Correct neighbours first, otherwise we get the incorrect prev/next in case other->next == &*other other->prev->next = this; other->next->prev = this; // NOTE: prev/next of other may have changed! prev = other->prev; next = other->next; // Make unique other->prev = &*other; other->next = &*other; } linked_object_common& operator=(linked_object_common const& other) { unlink(); link(other); return *this; } bool unique() { return next == this; } void make_unique() { unlink(); next = this; prev = this; } virtual ~linked_object_common() { next->prev = prev; prev->next = next; } // TODO: Make these protected by making linked_iterator // a friend (in some way) mutable linked_object_common const* prev; mutable linked_object_common const* next; protected: void link(linked_object_common const& other) { prev = &other; next = other.next; other.next = this; next->prev = this; } void unlink() { next->prev = prev; prev->next = next; } }; template struct linked_object : protected linked_object_common { struct linked_iterator : std::iterator { friend struct linked_object; linked_iterator() { } DerivedT& operator*() { return *static_cast(p); } DerivedT* operator->() { return static_cast(p); } linked_iterator& operator++() { p = const_cast(p->next); return *this; } linked_iterator operator++(int) { linked_iterator ret(*this); ++ret; return ret; } linked_iterator& operator--() { p = const_cast(p->prev); return *this; } linked_iterator operator--(int) { linked_iterator ret(*this); --ret; return ret; } bool operator==(linked_iterator rhs) const { return p == rhs.p; } bool operator!=(linked_iterator rhs) const { return p != rhs.p; } private: linked_iterator(linked_object_common* p) : p(p) { } linked_object_common* p; }; linked_object() { } // protected inheritance to make sure only the correct type is copied linked_object(linked_object const& other) : linked_object_common(other) { } linked_object(move_holder other) : linked_object_common(move(other)) { } linked_object& operator=(linked_object const& other) { linked_object_common::operator=(other); return *this; } linked_iterator linked_begin() { return linked_iterator(const_cast(next)); } linked_iterator linked_end() { return linked_iterator(this); } }; } // namespace gvl #endif // UUID_E2DA39C2967941F4DE389AB24A11196D lierolibre-0.5/src/gvl/resman/scoped_array.hpp000066400000000000000000000040071205125547100215410ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_168AFD3798A24A328C6FD4A998C80B4A #define UUID_168AFD3798A24A328C6FD4A998C80B4A #include namespace gvl { template struct scoped_array { scoped_array(T* init_arr) : arr(init_arr) { } ~scoped_array() { delete[] arr; } T& operator[](std::size_t idx) { return arr[idx]; } T const& operator[](std::size_t idx) const { return arr[idx]; } T* release() { T* ret = arr; arr = 0; return ret; } private: // Non-copyable scoped_array(scoped_array const&); scoped_array& operator=(scoped_array const&); T* arr; }; } #endif // UUID_168AFD3798A24A328C6FD4A998C80B4A lierolibre-0.5/src/gvl/resman/shared.cpp000066400000000000000000000032451205125547100203320ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "shared.hpp" namespace gvl { #if 0 // TODO void shared::_clear_weak_ptrs() const { #if 0 // TODO for(weak_ptr_common* p = _first; p; ) { weak_ptr_common* n = p->next; //p->v = 0; p->_clear(); p->next = 0; p = n; } #endif } #endif } // namespace gvl lierolibre-0.5/src/gvl/resman/shared.h000066400000000000000000000042641205125547100200010ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_C2F0561FF8D54EC1F56F98B82F02D1C0 #define UUID_C2F0561FF8D54EC1F56F98B82F02D1C0 struct gvl_weak_ptr; struct gvl_shared { shared() : _ref_count(0), _first(0) { } void add_ref() { #if GVL_THREADSAFE #error "Not finished" // TODO: Interlocked add ++_ref_count; #else ++_ref_count; #endif } void release() { #if GVL_THREADSAFE #error "Not finished" if(_ref_count == 1) // 1 means it has to become 0, nobody can increment it after this read _delete(); else { // TODO: CAS decrement the counter and check cas( } #else --_ref_count; if(_ref_count == 0) { _delete(); } #endif } int ref_count() const { return _ref_count; } virtual ~shared() { } int _ref_count; gvl_weak_ptr* first; }; #endif // UUID_C2F0561FF8D54EC1F56F98B82F02D1C0 lierolibre-0.5/src/gvl/resman/shared.hpp000066400000000000000000000054561205125547100203450ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_5F7548A068F9485B6759368B5BAE8157 #define UUID_5F7548A068F9485B6759368B5BAE8157 #include namespace gvl { struct weak_ptr_common; struct shared { friend struct weak_ptr_common; shared() : _ref_count(1), _first(0) { } // const to allow shared_ptr void add_ref() const { #if GVL_THREADSAFE #error "Not finished" // TODO: Interlocked increment #else ++_ref_count; #endif } // const to allow shared_ptr void release() const { #if GVL_THREADSAFE #error "Not finished" if(_ref_count == 1) // 1 means it has to become 0, nobody can increment it after this read _delete(); else { // TODO: Implement CAS int read_ref_count; do { read_ref_count = _ref_count; } while(!cas(&_ref_count, read_ref_count, read_ref_count - 1)); if(read_ref_count - 1 == 0) { _clear_weak_ptrs(); _delete(); } } #else --_ref_count; if(_ref_count == 0) { _clear_weak_ptrs(); _delete(); } #endif } void swap(shared& b) { std::swap(_ref_count, b._ref_count); std::swap(_first, b._first); } int ref_count() const { return _ref_count; } virtual ~shared() { } private: void _delete() const { delete this; } void _clear_weak_ptrs() const { } mutable int _ref_count; // You should be able to have shared_ptr weak_ptr_common* _first; }; } // namespace gvl #endif // UUID_5F7548A068F9485B6759368B5BAE8157 lierolibre-0.5/src/gvl/resman/shared_count.hpp000066400000000000000000000047351205125547100215540ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_731CFA4A66D3444BB8D7D6BF25814DEE #define UUID_731CFA4A66D3444BB8D7D6BF25814DEE namespace gvl { // TODO: This is not thread-safe at all. If GVL_THREADSAFE is defined // it should be thread-safe. /// Shared reference counter optimized for /// 1 reference. struct shared_count { shared_count() : p(0) { } shared_count(shared_count const& b) : p(b.inc()) { } shared_count& operator=(shared_count const& b) { shared_count n(b); swap(n); return *this; } ~shared_count() { dec(); } void dec() { if(!p) { delete p; } else if(--(*p) == 0) { delete p; } } void swap(shared_count& b) { std::swap(p, b.p); } // release the current count and make a new one set to 1 void reset() { dec(); p = 0; } int ref_count() const { return !p ? 1 : *p; } bool unique() const { return !p || *p == 1; } private: int* inc() const { if(!p) { p = new int(2); return p; } else { ++(*p); return p; } } mutable int* p; // 0 means ref count of 1 }; } // namespace gvl #endif // UUID_731CFA4A66D3444BB8D7D6BF25814DEE lierolibre-0.5/src/gvl/resman/shared_list.hpp000066400000000000000000000036211205125547100213700ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_2780CFD020A54BE4F3120E87E0415D3D #define UUID_2780CFD020A54BE4F3120E87E0415D3D #include "shared.hpp" namespace gvl { struct shared_releaser { void operator()(shared* p) { p->release(); } }; struct shared_ownership { static shared* take(shared* p) { return p; } }; template struct shared_list : list { shared_list() { } }; } // namespace gvl #endif // UUID_2780CFD020A54BE4F3120E87E0415D3D lierolibre-0.5/src/gvl/resman/shared_ptr.hpp000066400000000000000000000256711205125547100212330ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_038DE51568F04236FF21B1A4AFF43D3C #define UUID_038DE51568F04236FF21B1A4AFF43D3C #include #include //#include "../containerslist.hpp" #include "shared.hpp" #include "../support/debug.hpp" #include "../support/functional.hpp" #include "shared_count.hpp" namespace gvl { struct weak_ptr_common; struct shared_ownership {}; template struct deferred_ptr; /* template struct unsafe_weak_ptr;*/ template struct shared_ptr // : shared_ptr_common { shared_ptr() : v(0) { } // Takes ownership, v_init assumed fresh (no add_ref!) explicit shared_ptr(T* v_init) : v(v_init) { } // Shares ownership explicit shared_ptr(T* v_init, shared_ownership) { _set(v_init); } ~shared_ptr() { _release(); } shared_ptr(shared_ptr const& b) { _set(b.get()); } template shared_ptr(shared_ptr const& b) { T* p = b.get(); _set(p); } #if GVL_CPP0X shared_ptr(shared_ptr&& b) { v = b.get(); b.v = 0; } template friend struct shared_ptr; template shared_ptr(shared_ptr&& b) { T* p = b.get(); v = p; b.v = 0; } #endif // These two take over reference from b shared_ptr(deferred_ptr const& b); shared_ptr& operator=(deferred_ptr const& b); shared_ptr& operator=(shared_ptr const& b) { _reset_shared(b.get()); return *this; } template shared_ptr& operator=(shared_ptr const& b) { T* p = b.get(); _reset_shared(p); return *this; } #if GVL_CPP0X shared_ptr& operator=(shared_ptr&& b) { _reset_shared(b.get()); b.v = 0; return *this; } template shared_ptr& operator=(shared_ptr&& b) { T* p = b.get(); _reset_shared(p); b.v = 0; return *this; } #endif operator void const*() const { return v; } T* operator->() const { sassert(v); return static_cast(v); } T& operator*() const { sassert(v); return *static_cast(v); } // Takes ownership, v_new assumed fresh (no add_ref!) void reset(T* v_new) { _reset(v_new); } void reset(T* v_new, shared_ownership) { _reset_shared(v_new); } void reset() { _release(); v = 0; } shared_ptr release() { shared_ptr ret; ret.v = v; v = 0; return ret; } void swap(shared_ptr& b) { std::swap(v, b.v); } template shared_ptr cast() { return shared_ptr(dynamic_cast(get()), shared_ownership()); } template shared_ptr static_cast_() { return shared_ptr(static_cast(get()), shared_ownership()); } T& cow() { sassert(v); if(v->ref_count() > 1) reset(get()->clone()); return *get(); } T* get() const { return static_cast(v); } private: // Takes ownership (no add_ref!) void _reset(T* v_new) { sassert(v_new != v); // self-reset is invalid _release(); v = v_new; } // Shares ownership void _reset_shared(T* v_new) { T* old = v; _set(v_new); if(old) old->release(); } void _release() { if(v) v->release(); } void _set(T* v_new) { v = v_new; if(v) v->add_ref(); } void _set_non_zero(T* v_new) { v = v_new; sassert(v); v->add_ref(); } T* v; }; struct deferred_ptr_raw_ptr_ {}; // Cheaper, ownership-passing version of shared_ptr template struct deferred_ptr // : shared_ptr_common { private: public: template friend struct shared_ptr; deferred_ptr() : v(0) { } // Takes ownership, v_init assumed fresh (no add_ref!) explicit deferred_ptr(T* v_init) : v(v_init) { } // Shares ownership explicit deferred_ptr(T* v_init, shared_ownership) { _set(v_init); } ~deferred_ptr() { _release(); } template deferred_ptr(shared_ptr const& b) { T* p = b.get(); _set(p); } // Takes over reference from b template deferred_ptr(deferred_ptr const& b) { v = b.get(); b.v = 0; } // Takes over reference from b deferred_ptr(deferred_ptr const& b) { v = b.get(); b.v = 0; } template deferred_ptr& operator=(shared_ptr const& b) { T* p = b.get(); _reset_shared(p); return *this; } // Takes over reference from b template deferred_ptr& operator=(deferred_ptr const& b) { v = b.get(); b.v = 0; return *this; } // Takes over reference from b deferred_ptr& operator=(deferred_ptr const& b) { v = b.get(); b.v = 0; return *this; } operator void const*() const { return v; } T* operator->() const { sassert(v); return v; } T& operator*() const { assert(v); return *v; } // Takes ownership, v_new assumed fresh (no add_ref!) void reset(T* v_new) { _reset(v_new); } void reset() { _release(); v = 0; } void swap(deferred_ptr& b) { std::swap(v, b.v); } template deferred_ptr cast() { deferred_ptr ret(dynamic_cast(get())); v = 0; return ret; } template deferred_ptr static_cast_() { deferred_ptr ret(static_cast(get())); v = 0; return ret; } T* get() const { return static_cast(v); } private: void _reset(T* v_new) { sassert(v_new != v); // self-reset is invalid _release(); v = v_new; } void _reset_shared(T* v_new) { T* old = v; // Handles self-reset. _set(v_new); if(old) old->release(); } void _release() { if(v) v->release(); } void _set(T* v_new) { v = v_new; if(v) v->add_ref(); } void _set_non_zero(T* v_new) { v = v_new; sassert(v); v->add_ref(); } mutable T* v; }; template deferred_ptr share_ownership(T* ptr) { return deferred_ptr(ptr, shared_ownership()); } /* // Like a normal pointer, but ownership is assumed to belong // to something else. template struct unsafe_weak_ptr : shared_ptr_common { unsafe_weak_ptr() { } // Does not take ownership explicit unsafe_weak_ptr(T* v) : shared_ptr_common(v) { } template unsafe_weak_ptr(shared_ptr const& b) : shared_ptr_common(b.get()) { } template unsafe_weak_ptr(unsafe_weak_ptr const& b) : shared_ptr_common(b.get()) { } unsafe_weak_ptr(unsafe_weak_ptr const& b) { v = b.get(); } template unsafe_weak_ptr& operator=(shared_ptr const& b) { v = b.get(); return *this; } template unsafe_weak_ptr& operator=(unsafe_weak_ptr const& b) { v = b.get(); return *this; } unsafe_weak_ptr& operator=(unsafe_weak_ptr const& b) { v = b.get(); return *this; } operator void*() const { return v; } T* operator->() const { sassert(v); return v; } T& operator*() const { assert(v); return *v; } void reset() { v = 0; } void swap(unsafe_weak_ptr& b) { std::swap(v, b.v); } template unsafe_weak_ptr cast() { return dynamic_cast(get()); } T* get() const { return static_cast(v); } };*/ template shared_ptr::shared_ptr(deferred_ptr const& b) { v = b.v; b.v = 0; } template shared_ptr& shared_ptr::operator=(deferred_ptr const& b) { _release(); v = b.v; b.v = 0; return *this; } template struct value_ptr { value_ptr() { } explicit value_ptr(T* v) : base(v) { } value_ptr(value_ptr const& b) : base(b.base) { } template value_ptr(value_ptr const& b) : base(b.base) { } value_ptr& operator=(value_ptr const& b) { base = b.base; return *this; } template value_ptr& operator=(value_ptr const& b) { base = b.base; return *this; } operator void const*() const { return base.v; } T const* operator->() const { return base.operator->(); } T const& operator*() const { return base.operator*(); } void reset(T* b) { base.reset(b); } void reset() { base.reset(); } value_ptr release() { value_ptr ret; ret.base.v = base.v; base.v = 0; return ret; } void swap(value_ptr& b) { base.swap(b.base); } template shared_ptr cast() { return deferred_ptr(dynamic_cast(get()), shared_ownership()); } T& cow() { return base.cow(); } T const* get() const { return base.get(); } shared_ptr base; }; template struct shared_ptr_any { struct dynamic_cast_tag_ {}; struct static_cast_tag_ {}; template friend struct shared_ptr_any; shared_ptr_any() : v(0) { } explicit shared_ptr_any(T* v_init) : v(v_init) { } template explicit shared_ptr_any(shared_ptr_any const& b, dynamic_cast_tag_) : v(dynamic_cast(b.v)) , count(b.count) { } template explicit shared_ptr_any(shared_ptr_any const& b, static_cast_tag_) : v(static_cast(b.v)) , count(b.count) { } ~shared_ptr_any() { if(v && count.unique()) delete v; } // Copy-ctor, op= are fine. T* operator->() const { sassert(v); return v; } T& operator*() const { sassert(v); return *v; } void reset(T* b = 0) { shared_ptr_any n(b); swap(n); } shared_ptr_any release() { shared_ptr_any ret(*this); reset(); return ret; } template shared_ptr_any dynamic_cast_() { shared_ptr_any ret(*this, dynamic_cast_tag_()); return ret; } template shared_ptr_any static_cast_() { shared_ptr_any ret(*this, static_cast_tag_()); return ret; } void swap(shared_ptr_any& b) { count.swap(b.count); std::swap(v, b.v); } // TODO: cow T* get() const { return v; } int ref_count() const { return count.ref_count(); } private: T* v; shared_count count; }; } // namespace gvl #endif // UUID_038DE51568F04236FF21B1A4AFF43D3C lierolibre-0.5/src/gvl/serialization/000077500000000000000000000000001205125547100177445ustar00rootroot00000000000000lierolibre-0.5/src/gvl/serialization/archive.hpp000066400000000000000000000242451205125547100221050ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_8FD050E2BE0F4345A60D1A8646927047 #define UUID_8FD050E2BE0F4345A60D1A8646927047 #include #include #include #include #include #include #include "except.hpp" namespace gvl { template struct in_archive { static bool const in = true; static bool const out = false; static bool const reread = false; in_archive(gvl::octet_stream_reader& reader, Context& context) : reader(reader), context(context) { } template in_archive& i32(T& v) { v = uint32_as_int32(gvl::read_uint32(reader)); return *this; } template in_archive& i32_le(T& v) { v = uint32_as_int32(gvl::read_uint32_le(reader)); return *this; } template in_archive& ui16(T& v) { v = gvl::read_uint16(reader); return *this; } template in_archive& ui16_le(T& v) { v = gvl::read_uint16_le(reader); return *this; } template in_archive& ui32(T& v) { v = gvl::read_uint32(reader); return *this; } template in_archive& ui32_le(T& v) { v = gvl::read_uint32_le(reader); return *this; } template in_archive& ui8(T& v) { v = reader.get(); return *this; } template in_archive& b(T& v) { v = !!reader.get(); return *this; } template in_archive& str(T& v) { uint32_t len = gvl::read_uint32(reader); v.clear(); for(uint32_t i = 0; i < len; ++i) { v.push_back((char)reader.get()); } return *this; } template in_archive& pascal_str(T& v, std::size_t field_len) { std::size_t len = reader.get(); len = std::min(len, field_len - 1); std::size_t zeroes = field_len - 1 - len; v.clear(); // TODO: Faster way for(std::size_t i = 0; i < len; ++i) v.push_back((char)reader.get()); for(std::size_t i = 0; i < zeroes; ++i) reader.get(); // Ignore return *this; } template in_archive& obj(T*& v, Creator creator) { uint32_t id = gvl::read_uint32(reader); if(context.read(v, id, creator)) archive(*this, *v); return *this; } template in_archive& obj(T*& v) { return obj(v, gvl::new_creator()); } template in_archive& obj(gvl::shared_ptr& v, Creator creator) { T* p; obj(p, creator); v.reset(p); return *this; } template in_archive& obj(gvl::shared_ptr& v) { return obj(v, gvl::new_creator()); } template in_archive& fobj(T*& v, Creator creator) { v = creator(context); archive(*this, *v); return *this; } template in_archive& fobj(T*& v) { return fobj(v, gvl::new_creator()); } template in_archive& fobj(gvl::shared_ptr& v, Creator creator) { T* p; fobj(p, creator); v.reset(p); return *this; } template in_archive& fobj(gvl::shared_ptr& v) { return fobj(v, gvl::new_creator()); } in_archive& check() { uint32_t v = gvl::read_uint32(reader); if(v != 0x12345678) throw archive_check_error("Expected checkpoint here"); return *this; } gvl::octet_stream_reader& reader; Context& context; }; template< typename Context = default_serialization_context, typename Writer = gvl::octet_stream_writer, bool Reread = true> struct out_archive { static bool const in = false; static bool const out = true; static bool const reread = Reread; out_archive(Writer& writer, Context& context) : writer(writer), context(context) { } out_archive& i32(int32_t v) { gvl::write_uint32(writer, int32_as_uint32(v)); return *this; } out_archive& i32_le(int32_t v) { gvl::write_uint32_le(writer, int32_as_uint32(v)); return *this; } out_archive& ui16(uint32_t v) { gvl::write_uint16(writer, v); return *this; } out_archive& ui16_le(uint32_t v) { gvl::write_uint16_le(writer, v); return *this; } out_archive& ui32(uint32_t v) { gvl::write_uint32(writer, v); return *this; } out_archive& ui32_le(uint32_t v) { gvl::write_uint32_le(writer, v); return *this; } out_archive& ui8(uint32_t v) { sassert(v < 0x100); writer.put(v); return *this; } out_archive& b(bool v) { writer.put(v ? 1 : 0); return *this; } template out_archive& str(T const& v) { gvl::write_uint32(writer, v.size()); for(uint32_t i = 0; i < v.size(); ++i) { writer.put((uint8_t)v[i]); } return *this; } template out_archive& pascal_str(T const& v, std::size_t field_len) { std::size_t len = std::min(v.size(), field_len - 1); std::size_t zeroes = field_len - 1 - len; writer.put((uint8_t)len); writer.put(reinterpret_cast(v.data()), len); for(std::size_t i = 0; i < zeroes; ++i) writer.put(0); return *this; } template out_archive& obj(T*& v, Creator creator) { std::pair res = context.write(v); gvl::write_uint32(writer, res.second); if(res.first) archive(*this, *v); return *this; } template out_archive& obj(T*& v) { return obj(v, 0); } template out_archive& obj(gvl::shared_ptr& v, Creator creator) { T* p = v.get(); return obj(p); } template out_archive& obj(gvl::shared_ptr& v) { return obj(v, 0); } template out_archive& fobj(T*& v, Creator creator) { archive(*this, *v); return *this; } template out_archive& fobj(T*& v) { return fobj(v, 0); } template out_archive& fobj(gvl::shared_ptr& v, Creator creator) { T* p = v.get(); return fobj(p); } template out_archive& fobj(gvl::shared_ptr& v) { return fobj(v, 0); } out_archive& check() { gvl::write_uint32(writer, 0x12345678); return *this; } Writer& writer; Context& context; }; template struct versioned_archive { versioned_archive(Archive const& base, int version_at_least) : base(base), enable(base.context.version() >= version_at_least) { } versioned_archive(Archive const& base, bool enable) : base(base), enable(enable) { } #define FUNC(name) template \ versioned_archive& name(T& v, T const& def) { \ if(enable) base.name(v); \ else if(base.in || base.reread) v = def; \ return *this; \ } FUNC(ui32) FUNC(ui16) FUNC(ui8) FUNC(i32) FUNC(i16) FUNC(i8) FUNC(str) FUNC(b) #undef FUNC Archive base; bool enable; }; template versioned_archive enable_with_version(Archive const& ar, int version_at_least) { return versioned_archive(ar, version_at_least); } template versioned_archive enable_when(Archive const& ar, bool enable) { return versioned_archive(ar, enable); } /* template struct hash_archive { static bool const in = false; static bool const out = true; hash_archive(HashAccum& writer, Context& context) : writer(writer), context(context) { } hash_archive& i32(int32_t v) { writer.ui32(writer, int32_as_uint32(v)); return *this; } hash_archive& ui16(uint32_t v) { writer.ui16(writer, v); return *this; } hash_archive& ui32(uint32_t v) { writer.ui32(writer, v); return *this; } hash_archive& ui8(uint32_t v) { writer.ui8(v); return *this; } hash_archive& b(bool v) { writer.ui8(v ? 1 : 0); return *this; } template hash_archive& str(T const& v) { writer.ui32(v.size()); for(uint32_t i = 0; i < v.size(); ++i) { writer.ui8((uint8_t)v[i]); } return *this; } template hash_archive& obj(T*& v, Creator creator) { std::pair res = context.write(v); writer.ui32(res.second); if(res.first) archive(*this, *v); return *this; } template hash_archive& obj(T*& v) { return obj(v, 0); } template hash_archive& obj(gvl::shared_ptr& v, Creator creator) { T* p = v.get(); return obj(p); } template hash_archive& obj(gvl::shared_ptr& v) { return obj(v, 0); } template hash_archive& fobj(T*& v, Creator creator) { archive(*this, *v); return *this; } template hash_archive& fobj(T*& v) { return fobj(v, 0); } template hash_archive& fobj(gvl::shared_ptr& v, Creator creator) { T* p = v.get(); return fobj(p); } template hash_archive& fobj(gvl::shared_ptr& v) { return fobj(v, 0); } hash_archive& check() { writer.ui32(0x12345678); return *this; } HashAccum& writer; Context& context; };*/ } // namespace gvl #endif // UUID_8FD050E2BE0F4345A60D1A8646927047 lierolibre-0.5/src/gvl/serialization/context.hpp000066400000000000000000000110111205125547100221330ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_SERIALIZATION_CONTEXT_HPP #define GVL_SERIALIZATION_CONTEXT_HPP #include #include "../support/type_info.hpp" namespace gvl { template struct new_creator { template T* operator()(Context&) { return new T; } }; template struct serialization_context { struct type { type() : next_id(1) { } void add(uint32_t id, void* ptr) { id2ptr.insert(std::make_pair(id, ptr)); ptr2id.insert(std::make_pair(ptr, id)); } void remove(void* ptr) { std::map::iterator i1 = ptr2id.find(ptr); if(i1 != ptr2id.end()) { std::map::iterator i2 = id2ptr.find(i1->second); ptr2id.erase(i1); if(i2 != id2ptr.end()) id2ptr.erase(i2); } } bool try_get(uint32_t id, void*& ptr) { std::map::iterator i = id2ptr.find(id); if(i == id2ptr.end()) return false; ptr = i->second; return true; } bool try_get(void* ptr, uint32_t& id) { std::map::iterator i = ptr2id.find(ptr); if(i == ptr2id.end()) return false; id = i->second; return true; } int pop_id() { return next_id++; } std::map id2ptr; std::map ptr2id; uint32_t next_id; }; serialization_context() { } DerivedT& derived() { return *static_cast(this); } type& get_type(gvl::type_info ti) { typename std::map::iterator i = types.find(ti); if(i == types.end()) { i = types.insert(std::make_pair(ti, new type)).first; } return *i->second; } template std::pair write(T*& v) { if(v == 0) return std::make_pair(false, 0); type& t = get_type(gvl::type_id()); uint32_t id; void* ptr = v; if(!t.try_get(ptr, id)) { id = t.pop_id(); t.add(id, ptr); return std::make_pair(true, id); } else { return std::make_pair(false, id); } } template bool read(T*& v, uint32_t id) { return read(v, id, new_creator()); } template bool read(T*& v, uint32_t id, Creator creator) { if(id == 0) { v = 0; return false; } type& t = get_type(gvl::type_id()); void* ptr; if(t.try_get(id, ptr)) { v = static_cast(ptr); return false; } else { v = creator(derived()); ptr = v; t.add(id, ptr); return true; } } // Forget about object v. // NOTE: This must be called in the same place for the same object when serializing and deserializing! template void unregister(T* v) { type& t = get_type(gvl::type_id()); t.remove(v); } ~serialization_context() { for(typename std::map::iterator i = types.begin(); i != types.end(); ++i) { delete i->second; } } private: // Non-copyable serialization_context(serialization_context const&); serialization_context& operator=(serialization_context const&); std::map types; }; struct default_serialization_context : serialization_context { }; } // namespace gvl #endif // GVL_SERIALIZATION_CONTEXT_HPP lierolibre-0.5/src/gvl/serialization/except.hpp000066400000000000000000000033121205125547100217440ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_380EA8845AF747FA66DCB5B9DA57C409 #define UUID_380EA8845AF747FA66DCB5B9DA57C409 namespace gvl { struct archive_check_error : std::runtime_error { archive_check_error(std::string const& msg) : std::runtime_error(msg) { } }; } // namespace gvl #endif // UUID_380EA8845AF747FA66DCB5B9DA57C409 lierolibre-0.5/src/gvl/sockets/000077500000000000000000000000001205125547100165425ustar00rootroot00000000000000lierolibre-0.5/src/gvl/sockets/fd_set.cpp000066400000000000000000000046261205125547100205220ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "fd_set.hpp" #include "sockets_sys_impl.hpp" namespace gvl { #define SELF (static_cast(*this)) struct select_fd_set_impl : select_fd_set { select_fd_set_impl() { zero(); } ::fd_set impl; }; select_fd_set* new_select_fd_set() { return new select_fd_set_impl; } void select_fd_set::zero() { FD_ZERO(&SELF.impl); } void select_fd_set::set(socket s) { FD_SET(native_socket(s), &SELF.impl); } bool select_fd_set::is_set(socket s) { return FD_ISSET(native_socket(s), &SELF.impl) != 0; } #undef SELF inline fd_set* to_impl(select_fd_set* p) { return !p ? 0 : &static_cast(p)->impl; } int select(select_fd_set* readfds, select_fd_set* writefds, select_fd_set* errorfds) { timeval tv; tv.tv_sec = 0; tv.tv_usec = 0; #if GVL_WIN32==1 return ::select(0, to_impl(readfds), to_impl(writefds), to_impl(errorfds), &tv); #else return ::select(FD_SETSIZE, to_impl(readfds), to_impl(writefds), to_impl(errorfds), &tv); #endif } } // namespace gvl lierolibre-0.5/src/gvl/sockets/fd_set.hpp000066400000000000000000000036641205125547100205300ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_52AE273D77754004EBD1CFA67FE06693 #define UUID_52AE273D77754004EBD1CFA67FE06693 #include "sockets.hpp" namespace gvl { struct select_fd_set { void zero(); bool is_set(socket s); void set(socket s); virtual ~select_fd_set() {} protected: select_fd_set() {} select_fd_set(select_fd_set const&); select_fd_set& operator=(select_fd_set const&); }; select_fd_set* new_select_fd_set(); int select(select_fd_set* readfds, select_fd_set* writefds, select_fd_set* errorfds); } #endif // UUID_52AE273D77754004EBD1CFA67FE06693 lierolibre-0.5/src/gvl/sockets/socket_listener.cpp000066400000000000000000000047471205125547100224570ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "socket_listener.hpp" #include "socketstream.hpp" namespace gvl { socket_listener::socket_listener() : sock() { init_sockets(); } socket_listener::socket_listener(int port) : sock() { init_sockets(); listen(port); } socket_listener::~socket_listener() { sock.close(); deinit_sockets(); } bool socket_listener::listen(int port) { sock.close(); socket s; s = tcp_socket(); if(!s.is_valid()) return false; s.set_nonblocking(); s.bind(port); s.listen(); sock = s; return true; } gvl::shared_ptr socket_listener::accept() { if(!sock.is_valid()) return gvl::shared_ptr(); while(true) { internet_addr addr; socket news = sock.accept(addr); if(news.is_valid()) return gvl::shared_ptr(new socketstream(news)); /* if(sock_error() != sockerr_would_block) // Error { ELOG("Error accepting on " << native_socket(sock)); sock.close(); return 0; }*/ return gvl::shared_ptr(); } } void socket_listener::close() { if(sock.is_valid()) sock.close(); sock = socket(); } } lierolibre-0.5/src/gvl/sockets/socket_listener.hpp000066400000000000000000000034521205125547100224540ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_5EA45A24CF29403A5EA528B39D964A3A #define UUID_5EA45A24CF29403A5EA528B39D964A3A #include "sockets.hpp" namespace gvl { struct socketstream; struct socket_listener { socket_listener(); socket_listener(int port); ~socket_listener(); bool listen(int port); gvl::shared_ptr accept(); void close(); socket sock; }; } #endif // UUID_5EA45A24CF29403A5EA528B39D964A3A lierolibre-0.5/src/gvl/sockets/sockets.cpp000066400000000000000000000241101205125547100207170ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "sockets.hpp" #include "sockets_sys_impl.hpp" #include #include #include namespace gvl { socket socket::invalid() { return socket(); } sockaddr_in* get_sockaddr_in(internet_addr& self) { return reinterpret_cast(&self.storage_); } sockaddr_in const* get_sockaddr_in(internet_addr const& self) { return reinterpret_cast(&self.storage_); } sockaddr* get_sockaddr(internet_addr& self) { return reinterpret_cast(&self.storage_); } sockaddr const* get_sockaddr(internet_addr const& self) { return reinterpret_cast(&self.storage_); } void clear_initialized(internet_addr& self) { memset(&self.storage_, 0, sizeof(self.storage_)); } #if GVL_WIN32 || GVL_WIN64 inline int error() { return WSAGetLastError(); } int const sckerr_in_progress = WSAEINPROGRESS; int const sckerr_would_block = WSAEWOULDBLOCK; int const sckerr_conn_reset = WSAECONNRESET; socket::socket() : _voidp((void*)INVALID_SOCKET) { } bool socket::is_valid() { return native_socket(*this) != INVALID_SOCKET; } void socket::close() { if(is_valid()) { closesocket(native_socket(*this)); } } int const error_ret = SOCKET_ERROR; #else inline int error() { return errno; } int const sckerr_in_progress = EINPROGRESS; int const sckerr_would_block = EWOULDBLOCK; int const sckerr_conn_reset = ECONNRESET; socket invalid_socket() { socket s; s._int = -1; return s; } socket::socket() : _int(-1) { } bool socket::is_valid() { return native_socket(*this) != -1; } void socket::close() { if(is_valid()) { ::close(native_socket(*this)); } } int const error_ret = -1; #endif #if 0 static char* copy_string(char const* p) { size_t len = std::strlen(p) + 1; char* s = new char[len]; std::memcpy(s, p, len); return s; } static char** copy_list(char** p) { int i; int l = 0; char** n; for(; p[l]; ++l) /* nothing */; n = new char*[l + 1]; for(i = 0; i < l; ++i) { n[i] = copy_string(p[i]); } n[l] = 0; return n; } static char** copy_list_l(char** p, size_t len) { int i; int l = 0; char** n; for(; p[l]; ++l) /* nothing */; n = new char*[l + 1]; for(i = 0; i < l; ++i) { n[i] = new char[len]; std::memcpy(n[i], p[i], len); } n[l] = 0; return n; } static void free_list(char** p) { int i; for(i = 0; p[i] != NULL; ++i) delete [] p[i]; delete [] p; } struct host_entry_storage : host_entry_impl { hostent v; ~host_entry_storage(); void* storage() { return &v; } }; static host_entry_storage* create_host_entry(hostent const* p) { host_entry_storage* self = new host_entry_storage; self->v.h_name = copy_string(p->h_name); self->v.h_aliases = copy_list(p->h_aliases); self->v.h_addrtype = p->h_addrtype; self->v.h_length = p->h_length; self->v.h_addr_list = copy_list_l(p->h_addr_list, p->h_length); return self; } host_entry_storage::~host_entry_storage() { delete [] v.h_name; free_list(v.h_aliases); free_list(v.h_addr_list); } host_entry* resolve_host(char const* name) { hostent* p = gethostbyname( name ); // TODO: This is deprecated IIRC if(!p) return 0; // ERROR return create_host_entry(p); } host_entry::host_entry(char const* name) : ptr(resolve_host(name)) { } #endif socket tcp_socket() { socket s = make_socket(::socket(PF_INET, SOCK_STREAM, 0)); if(!s.is_valid()) return s; s.set_nonblocking(); return s; } socket udp_socket() { socket s = make_socket(::socket(PF_INET, SOCK_DGRAM, 0)); if(!s.is_valid()) return s; s.set_nonblocking(); return s; } void socket::set_nonblocking(bool no_blocking) { #if GVL_WIN32==1 unsigned long no_blocking_int = 1; ioctlsocket(native_socket(*this), FIONBIO, &no_blocking_int); #else fcntl(native_socket(*this), F_SETFL, no_blocking ? O_NONBLOCK : 0); #endif } int socket::set_nodelay(bool no_delay) { char no_delay_int = no_delay; #if !defined(BEOS_NET_SERVER) return setsockopt( native_socket(*this), IPPROTO_TCP, TCP_NODELAY, reinterpret_cast(&no_delay_int), sizeof(no_delay_int)) == 0; #else return 1; #endif } int socket::bind(int port) { sockaddr_in addr; int ret; addr.sin_family = AF_INET; addr.sin_port = htons((u_short)port); addr.sin_addr.s_addr = INADDR_ANY; std::memset(&(addr.sin_zero), '\0', 8); ret = ::bind(native_socket(*this), reinterpret_cast(&addr), sizeof(sockaddr_in)); // TODO: Some way to get size from addr return (ret != error_ret); } int socket::listen() { int ret = ::listen(native_socket(*this), 5); return (ret != error_ret); } socket socket::accept(internet_addr& addr) { socklen_t sin_size = sizeof(sockaddr_in); // TODO: Check for errors return make_socket(::accept(native_socket(*this), get_sockaddr(addr), &sin_size)); } int socket::connect(internet_addr& addr) { int r = ::connect(native_socket(*this), get_sockaddr(addr), sizeof(sockaddr_in)); // TODO: Some way to get size from addr if(r == error_ret) { int err = error(); #if GVL_WIN32==1 if(err != sckerr_would_block) #else if(err != sckerr_in_progress) #endif return 0; // ERROR } return 1; } int translate_comm_ret(int ret) { if(ret == 0) { return socket::disconnected; } else if(ret == error_ret || ret < 0) { int err = error(); #if 0 if(err != sckerr_would_block) printf("Sockerr: %d\n", err); #endif switch(err) { case sckerr_conn_reset: return socket::conn_reset; case sckerr_would_block: return socket::would_block; default: return socket::failure; } } return ret; } int socket::send(void const* msg, size_t len) { int ret = ::send(native_socket(*this), reinterpret_cast(msg), (int)len, 0); return translate_comm_ret(ret); } int socket::recv(void* msg, size_t len) { int ret = ::recv(native_socket(*this), reinterpret_cast(msg), (int)len, 0); return translate_comm_ret(ret); } int socket::sendto(void const* msg, size_t len, internet_addr const& dest) { int ret = ::sendto( native_socket(*this), reinterpret_cast(msg), (int)len, 0, get_sockaddr(dest), sizeof(sockaddr)); return translate_comm_ret(ret); } int socket::recvfrom(void* msg, size_t len, internet_addr& src) { socklen_t fromlen = sizeof(sockaddr); int ret = ::recvfrom( native_socket(*this), reinterpret_cast(msg), (int)len, 0, get_sockaddr(src), &fromlen); return translate_comm_ret(ret); } int socket::opt_error() { int status; socklen_t len = sizeof(status); getsockopt(native_socket(*this), SOL_SOCKET, SO_ERROR, reinterpret_cast(&status), &len); return status; } /* typedef uint64_t sckimpl_sa_align_t; std::size_t const sckimpl_sa_maxsize = 32; // IPv6 needs 28 bytes */ int internet_addr::port() const { sockaddr_in const* s = get_sockaddr_in(*this); return ntohs(s->sin_port); } uint32_t internet_addr::ip() const { sockaddr_in const* s = get_sockaddr_in(*this); #if GVL_WIN32 || GVL_WIN64 return ntohl(s->sin_addr.S_un.S_addr); #else return ntohl(s->sin_addr.s_addr); #endif } internet_addr::internet_addr(uint32_t addr, int port) { clear_initialized(*this); sockaddr_in* s = get_sockaddr_in(*this); s->sin_family = AF_INET; s->sin_port = htons( (u_short)port ); s->sin_addr.s_addr = htonl( addr ); } internet_addr::internet_addr(char const* name, int port) { clear_initialized(*this); hostent* p = gethostbyname(name); if(p) { sockaddr_in* s = get_sockaddr_in(*this); memmove(&s->sin_addr, p->h_addr_list[0], p->h_length); s->sin_family = p->h_addrtype; s->sin_port = htons( (u_short)port ); } } internet_addr::internet_addr(socket s) { clear_initialized(*this); sockaddr_in addr; socklen_t t = sizeof(sockaddr_in); if(getsockname(native_socket(s), reinterpret_cast(&addr), &t) != error_ret) { *get_sockaddr_in(*this) = addr; } } internet_addr::internet_addr() { clear_initialized(*this); sockaddr_in* s = get_sockaddr_in(*this); s->sin_family = AF_INET; s->sin_port = htons( 0 ); s->sin_addr.s_addr = htonl( INADDR_ANY ); } void internet_addr::reset() { clear_initialized(*this); } bool internet_addr::valid() { return get_sockaddr(*this)->sa_family != 0; } bool operator==(internet_addr const& a, internet_addr const& b) { return 0 == std::memcmp(&a.storage_, &b.storage_, sizeof(a.storage_)); } void internet_addr::port(int port) { sockaddr_in* s = get_sockaddr_in(*this); s->sin_port = htons( (u_short)port ); } void internet_addr::ip(uint32_t addr) { sockaddr_in* s = get_sockaddr_in(*this); s->sin_addr.s_addr = htonl( addr ); } #if GVL_WIN32==1 static int winsock_ref = 0; // TODO: NOTE: Not thread-safe void init_sockets() { if(++winsock_ref == 1) { WSADATA wsaData; int res; res = WSAStartup(MAKEWORD(2,2), &wsaData); if (res != 0) { return; } } } void deinit_sockets() { if(--winsock_ref == 0) { WSACleanup(); } } #endif } // namespace gvl lierolibre-0.5/src/gvl/sockets/sockets.hpp000066400000000000000000000111761205125547100207340ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_2E6087A4B6164BFF4F47018450AFE807 #define UUID_2E6087A4B6164BFF4F47018450AFE807 #include #include "../support/cstdint.hpp" #include "../support/platform.hpp" #include "../resman/shared_ptr.hpp" namespace gvl { //std::size_t const sockaddr_in_size = 16; struct internet_addr; struct host_entry; struct socket { static int const failure = -1; static int const would_block = -2; static int const conn_reset = -3; static int const disconnected = -4; union { int _int; void* _voidp; }; static socket invalid(); socket(); bool is_valid(); void close(); void set_nonblocking(bool no_blocking = true); int set_nodelay(bool no_delay = true); int bind(int port); int listen(); socket accept(internet_addr& addr); int connect(internet_addr& addr); /* Communication */ int send(void const* msg, std::size_t len); int recv(void* msg, std::size_t len); int sendto(void const* msg, std::size_t len, internet_addr const& dest); int recvfrom(void* msg, std::size_t len, internet_addr& src); int opt_error(); void bind_any() { bind(0); } }; int const SS_MAXSIZE = 128; // Maximum size int const SS_ALIGNSIZE = (sizeof(int64_t)); // Desired alignment int const SS_PAD1SIZE = (SS_ALIGNSIZE - sizeof(short)); int const SS_PAD2SIZE = (SS_MAXSIZE - (sizeof(short) + SS_PAD1SIZE + SS_ALIGNSIZE)); struct sockaddr_storage { short ss_family; // Address family. char _ss_pad1[SS_PAD1SIZE]; // 6 byte pad, this is to make // implementation specific pad up to // alignment field that follows explicit // in the data structure int64_t _ss_align; // Field to force desired structure char _ss_pad2[SS_PAD2SIZE]; // 112 byte pad to achieve desired size; // _SS_MAXSIZE value minus size of // ss_family, __ss_pad1, and // __ss_align fields is 112 }; struct internet_addr { internet_addr(); // any internet_addr(char const* name, int port = 0); // NOTE: This may not get the address unless I/O has occured // on the socket or (if applicable) a connect or accept has // been done. internet_addr(socket s); internet_addr(uint32_t ip, int port); bool valid(); int port() const; void port(int port_new); uint32_t ip() const; void ip(uint32_t ip_new); void reset(); friend bool operator==(internet_addr const&, internet_addr const&); bool operator!=(internet_addr const& other) const { return !(*this == other); } sockaddr_storage storage_; }; /* struct host_entry_impl : gvl::shared { virtual ~host_entry_impl() { } virtual void* storage() = 0; }; struct host_entry { host_entry(char const* name); void* storage() { return ptr->storage(); } gvl::shared_ptr ptr; };*/ //host_entry* resolve_host(char const* name); socket tcp_socket(); socket udp_socket(); #ifdef GVL_WIN32 void init_sockets(); void deinit_sockets(); #else inline void init_sockets() {} inline void deinit_sockets() {} #endif } // namespace gvl #endif // UUID_2E6087A4B6164BFF4F47018450AFE807 lierolibre-0.5/src/gvl/sockets/sockets_sys_impl.hpp000066400000000000000000000053721205125547100226540ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_79D7290192F84DAEF23EECAB7295F249 #define UUID_79D7290192F84DAEF23EECAB7295F249 #include "sockets.hpp" #if GVL_WIN32 || GVL_WIN64 #undef NOGDI #define NOGDI #undef NOMINMAX #define NOMINMAX #undef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #undef NONAMELESSUNION #define NONAMELESSUNION #undef NOKERNEL #define NOKERNEL #undef NONLS #define NONLS /* #ifndef POINTER_64 #define POINTER_64 // Needed for bugged headers #endif*/ #if GVL_WIN32 #define _WIN32_WINDOWS 0x0410 #endif #define WINVER 0x0410 #include #include #ifdef _MSC_VER #pragma comment(lib, "ws2_32.lib") #endif namespace gvl { inline SOCKET native_socket(socket s) { return (SOCKET)s._voidp; } inline socket make_socket(SOCKET native) { socket s; s._voidp = (void*)native; return s; } typedef int socklen_t; } // namespace gvl #else //if !defined(OSK) #include #include #include #include #include #include #include #include #include namespace gvl { inline int native_socket(socket s) { return s._int; } inline socket make_socket(int native) { socket s; s._int = native; return s; } } // namespace gvl #endif /* namespace gvl { struct host_entry : hostent { }; } // namespace gvl */ #endif // UUID_79D7290192F84DAEF23EECAB7295F249 lierolibre-0.5/src/gvl/sockets/socketstream.cpp000066400000000000000000000036261205125547100217610ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "socketstream.hpp" namespace gvl { stream::read_result socketstream::read_bucket(size_type amount, bucket* dest) { process(); if(flags::no(socketstream::connected)) return read_result(read_blocking); char buffer[1024]; int r = sock.recv(buffer, 1024); if(r > 0) return read_result(read_ok, new bucket(buffer, r)); else if(r == 0) return read_result(read_eos); else if(r == socket::would_block) return read_result(read_blocking); return read_result(read_error); } } // namespace gvl lierolibre-0.5/src/gvl/sockets/socketstream.hpp000066400000000000000000000103051205125547100217560ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_A55DFD76DE724F2E2A89CE91B9EDB4DA #define UUID_A55DFD76DE724F2E2A89CE91B9EDB4DA #include "sockets.hpp" #include "fd_set.hpp" #include "../io/stream.hpp" #include "../support/flags.hpp" #include //#include namespace gvl { /* struct socket_state : bucket_sink, flags { };*/ /* struct socketstream; struct socket_bucket : bucket { socket_bucket(socketstream* state) : state(state) { } socketstream* state; };*/ struct socketstream : stream, flags { friend struct socket_bucket; socketstream(char const* addr, int port) : flags(0) { //open(new socket_bucket(this)); connect(addr, port); } // sock_init must be connected socketstream(socket sock_init) : flags(connected) , sock(sock_init) { } /* socketstream(socket sck) : stream(new socket_bucket(sck), new socket_sink(sck)) , sck(sck) { } */ enum socket_flags { connected = (1 << 0), connecting = (1 << 1), error_occured = (1 << 2) }; void process() { if(flags::all(connecting) && flags::no(error_occured)) { std::auto_ptr fdset(new_select_fd_set()); fdset->set(sock); select(0, fdset.get(), 0); if(fdset->is_set(sock)) { int status = sock.opt_error(); if(status != 0) { flags::set(error_occured); return; } flags::replace(connected, connected | connecting); } } } void connect(char const* addr, int port) { init_sockets(); /* std::auto_ptr hp(resolve_host( addr )); if(!hp.get()) return; */ internet_addr server(addr, port); if(!server.valid()) return; socket s = tcp_socket(); if(!s.is_valid()) return; s.set_nonblocking(); if(!s.connect(server)) return; sock = s; flags::replace(connecting); } socket underlying_socket() { return sock; } protected: /*override*/ read_result read_bucket(size_type amount = 0, bucket* dest = 0); /*override*/ write_result write_bucket(bucket* b) { process(); if(flags::no(connected)) return write_result(write_would_block, false); size_type size = b->size(); int r = sock.send(b->get_ptr(), size); if(r == (int)size) { //std::cout << "Full write: " << size << "b" << std::endl; gvl::unlink(b); delete b; return write_result(write_ok, true); } else { if(r > 0) { //std::cout << "Partial write: " << r << "b" << std::endl; b->cut_front(r); return write_result(write_part, false); } else if(r == socket::would_block) return write_result(write_would_block, false); } return write_result(write_error, false); } /*override*/ write_status propagate_close() { if(flags::any(connected | connecting)) { sock.close(); flags::reset(connected | connecting | error_occured); } return write_ok; } socket sock; }; } // namespace gvl #endif // UUID_A55DFD76DE724F2E2A89CE91B9EDB4DA lierolibre-0.5/src/gvl/support.hpp000066400000000000000000000031671205125547100173230ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_B8D25798B8444289CAEBD8A642997F49 #define UUID_B8D25798B8444289CAEBD8A642997F49 #include "support/log.hpp" #include "support/debug.hpp" #include "support/macros.hpp" #endif // UUID_B8D25798B8444289CAEBD8A642997F49 lierolibre-0.5/src/gvl/support/000077500000000000000000000000001205125547100166035ustar00rootroot00000000000000lierolibre-0.5/src/gvl/support/algorithm.hpp000066400000000000000000000053201205125547100213020ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_6DD5291E8D2F459FA7A8469E4A95E300 #define UUID_6DD5291E8D2F459FA7A8469E4A95E300 #include namespace gvl { #if 0 template struct check_swap { typedef T type; }; template void swap(typename check_swap::type& x, T& y) { x.swap(y); } template struct ref_wrapper { ref_wrapper(T& v) : v(v) { } T& v; }; template void swap(ref_wrapper x, T& y) { T temp(x.v); x.v = y; y = temp; } #endif template bool is_sorted(InputIterator b, InputIterator e, StrictWeakOrdering comp) { typedef std::iterator_traits traits; typedef typename traits::value_type value_type; typedef typename traits::pointer pointer; pointer prev = &*b; for(++b; b != e; ++b) { pointer cur = &*b; if(comp(*cur, *prev)) return false; } return true; } template bool is_sorted(InputIterator b, InputIterator e) { return gvl::is_sorted(b, e, std::less< typename std::iterator_traits::value_type>()); } template Range drop_while(Range r, Pred pred) { while(!r.empty()) { if(!pred(r.front())) break; r.pop_front(); } return r; } } // namespace gvl #endif // UUID_6DD5291E8D2F459FA7A8469E4A95E300 lierolibre-0.5/src/gvl/support/align.hpp000066400000000000000000000056201205125547100204110ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_2B6D8149059740980E707BA5CBAC8E41 #define UUID_2B6D8149059740980E707BA5CBAC8E41 #include #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4121) // alignment is sensitive to packing #endif #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) #pragma option push -Vx- -Ve- #endif // Adapted from boost namespace gvl { namespace detail { template struct alignment_of_hack { char c; T t; alignment_of_hack(); }; template // Why does boost use unsigned here? struct alignment_logic { static std::size_t const value = A < S ? A : S; }; class alignment_dummy; typedef void (*function_ptr)(); typedef int (alignment_dummy::*member_ptr); typedef int (alignment_dummy::*member_function_ptr)(); } // namespace detail template struct alignment_of { static std::size_t const value = detail::alignment_logic< sizeof(detail::alignment_of_hack) - sizeof(T), sizeof(T) >::value; }; template struct alignment_of : alignment_of { }; // Use: union foo { max_align bar; ... } union max_align { char dummy0; short dummy1; int dummy2; long dummy3; float dummy4; double dummy5; long double dummy6; void* dummy7; detail::function_ptr dummy8; detail::member_ptr dummy9; detail::member_function_ptr dummy10; }; } // namespace gvl #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) #pragma option pop #endif #ifdef BOOST_MSVC # pragma warning(pop) #endif #endif // UUID_2B6D8149059740980E707BA5CBAC8E41 lierolibre-0.5/src/gvl/support/bits.c000066400000000000000000000116001205125547100177060ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "bits.hpp" #if !defined(_MSC_VER) /* Taken mostly from http://graphics.stanford.edu/~seander/bithacks.html */ int gvl_trailing_zeroes(uint32_t v) { static const int MultiplyDeBruijnBitPosition[32] = { 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 }; return MultiplyDeBruijnBitPosition[((uint32_t)((v & -v) * 0x077CB531UL)) >> 27]; } int gvl_log2(uint32_t v) { static const char LogTable256[] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }; unsigned int t, tt; if((tt = v >> 16)) return (t = tt >> 8) ? 24 + LogTable256[t] : 16 + LogTable256[tt]; else return (t = v >> 8) ? 8 + LogTable256[t] : LogTable256[v]; } int gvl_top_bit(uint32_t v) { static const char LogTable256[] = { -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }; unsigned int t, tt; if((tt = v >> 16)) return (t = tt >> 8) ? 24 + LogTable256[t] : 16 + LogTable256[tt]; else return (t = v >> 8) ? 8 + LogTable256[t] : LogTable256[v]; } int gvl_log2_64(uint64_t v) { // TODO: For 64-bit archs, use intrinsics unsigned int ttt; if((ttt = (uint32_t)(v >> 32))) return 32 + gvl_log2(ttt); else return gvl_log2((uint32_t)v); } int gvl_bottom_bit(uint32_t v) { if(!v) return -1; static const int MultiplyDeBruijnBitPosition[32] = { 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 }; return MultiplyDeBruijnBitPosition[((uint32_t)((v & -v) * 0x077CB531UL)) >> 27]; } #endif #if 0 void write_uint32(uint8_t* ptr, uint32_t v) { ptr[0] = (uint8_t)(v >> 24); ptr[1] = (uint8_t)(v >> 16); ptr[2] = (uint8_t)(v >> 8); ptr[3] = (uint8_t)(v); } uint32_t read_uint32(uint8_t const* ptr) { return (ptr[0] << 24) + (ptr[1] << 16) + (ptr[2] << 8) + ptr[3]; } void write_uint16(uint8_t* ptr, uint32_t v) { ptr[0] = (uint8_t)(v >> 8); ptr[1] = (uint8_t)(v); } uint32_t read_uint16(uint8_t const* ptr) { return (ptr[0] << 8) + ptr[1]; } #endif lierolibre-0.5/src/gvl/support/bits.hpp000066400000000000000000000177221205125547100202660ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_D006EF6EB7A24020D1926ABC53D805D6 #define UUID_D006EF6EB7A24020D1926ABC53D805D6 #include "cstdint.hpp" #include "platform.hpp" #if GVL_MSVCPP # include # include # include # pragma intrinsic(_BitScanReverse) # pragma intrinsic(_BitScanForward) # if GVL_X86_64 # pragma intrinsic(_BitScanReverse64) # endif #endif #ifdef __cplusplus extern "C" { #endif #if GVL_MSVCPP GVL_INLINE int gvl_log2(uint32_t v) { unsigned long r; if(!_BitScanReverse(&r, v)) r = 0; return r; } GVL_INLINE int gvl_top_bit(uint32_t v) { unsigned long r; if(!_BitScanReverse(&r, v)) return -1; return r; } GVL_INLINE int gvl_bottom_bit(uint32_t v) { unsigned long r; if(!_BitScanForward(&r, v)) return -1; return r; } GVL_INLINE int gvl_log2_64(uint64_t v) { unsigned long r = 0; #if GVL_X86_64 if(!_BitScanReverse64(&r, v)) r = 0; #else if(_BitScanReverse(&r, (uint32_t)(v >> 32))) return 32 + r; if(!_BitScanReverse(&r, (uint32_t)v)) return 0; #endif return r; } GVL_INLINE int gvl_trailing_zeroes(uint32_t v) { unsigned long r; if(!_BitScanForward(&r, v)) return 0; return r; } GVL_INLINE uint32_t gvl_bswap(uint32_t v) { int const ulong_shift = (sizeof(unsigned long) - sizeof(uint32_t)) * CHAR_BIT; return (uint32_t)(_byteswap_ulong((unsigned long)v << ulong_shift)); } GVL_INLINE uint64_t gvl_bswap_64(uint64_t v) { return _byteswap_uint64(v); } #else int gvl_log2(uint32_t v); int gvl_log2_64(uint64_t v); int gvl_top_bit(uint32_t v); int gvl_bottom_bit(uint32_t v); int gvl_trailing_zeroes(uint32_t v); GVL_INLINE uint32_t gvl_bswap(uint32_t v) { return (v >> 24) | ((v >> 8) & 0xff00) | ((v << 8) & 0xff0000) | ((v << 24) & 0xff000000); } GVL_INLINE uint64_t gvl_bswap_64(uint64_t v) { return gvl_bswap((uint32_t)(v >> 32)) | ((uint64_t)gvl_bswap((uint32_t)v) << 32); } #endif GVL_INLINE uint32_t gvl_bswap_le(uint32_t v) { #if GVL_LITTLE_ENDIAN return v; #else return gvl_bswap(v); #endif } GVL_INLINE uint32_t gvl_bswap_be(uint32_t v) { #if GVL_LITTLE_ENDIAN return gvl_bswap(v); #else return v; #endif } GVL_INLINE uint32_t gvl_rot(uint32_t v, int c) { return (v << c) | (v >> (32-c)); } GVL_INLINE uint64_t gvl_rot_64(uint64_t v, int c) { return (v << c) | (v >> (64-c)); } GVL_INLINE int gvl_popcount(uint32_t v) { v = v - ((v >> 1) & 0x55555555); /* reuse input as temporary */ v = (v & 0x33333333) + ((v >> 2) & 0x33333333); /* temp */ return (((v + (v >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24; /* count */ } GVL_INLINE int gvl_ceil_log2(uint32_t v) { return v == 0 ? 0 : gvl_log2(v - 1) + 1; } GVL_INLINE int gvl_even_log2(uint32_t v) { /* TODO: Special look-up table for this */ return ((gvl_log2(v) + 1) & ~1); } GVL_INLINE int gvl_odd_log2(uint32_t v) { return (gvl_log2(v) | 1); } GVL_INLINE int gvl_odd_log2_64(uint64_t v) { return (gvl_log2_64(v) | 1); } #if GVL_SIGN_EXTENDING_RIGHT_SHIFT && GVL_TWOS_COMPLEMENT /* Returns v if v >= 0, otherwise 0 */ GVL_INLINE int32_t gvl_saturate0(int32_t v) { return (v & ~(v >> 31)); } #else /* Returns v if v >= 0, otherwise 0 */ GVL_INLINE int32_t gvl_saturate0(int32_t v) { return v < 0 ? 0 : v; } #endif GVL_INLINE int32_t gvl_udiff(uint32_t x, uint32_t y) { x -= y; return x < 0x80000000ul ? (int32_t)(x) : (int32_t)(x - 0x80000000ul) - 0x80000000; } /* Whether x is in the modulo 2^32 interval [b, e) */ GVL_INLINE int gvl_cyclic_between(uint32_t b, uint32_t e, uint32_t x) { return (x - b) < (e - b); } GVL_INLINE int gvl_cyclic_between_mask(uint32_t b, uint32_t e, uint32_t x, uint32_t mask) { return ((x - b) & mask) < ((e - b) & mask); } GVL_INLINE int32_t gvl_uint32_as_int32(uint32_t x) { if(x >= 0x80000000) return (int32_t)(x - 0x80000000u) - 0x80000000; else return (int32_t)(x); } GVL_INLINE uint32_t gvl_int32_as_uint32(int32_t x) { if(x < 0) return (uint32_t)(x + 0x80000000) + 0x80000000u; else return (uint32_t)(x); } /* lsb_mask(x) works for x in [1, 32] */ GVL_INLINE uint32_t gvl_lsb_mask(int x) { return (~(uint32_t)(0)) >> (uint32_t)(32-x); } /* Left shift that works for o in [1, 32] */ GVL_INLINE uint32_t gvl_shl_1_32(uint32_t v, uint32_t o) { return (v << (o - 1)) << 1; } /* Right shift that works for o in [1, 32] */ GVL_INLINE uint32_t gvl_shr_1_32(uint32_t v, uint32_t o) { return (v >> (o - 1)) >> 1; } GVL_INLINE int gvl_all_set(uint32_t v, uint32_t f) { return (v & f) == f; } GVL_INLINE int gvl_is_power_of_two(uint32_t x) { return (x & (x-1)) == 0 && x != 0; } /* void write_uint32(uint8_t* ptr, uint32_t v); uint32_t read_uint32(uint8_t const* ptr); void write_uint16(uint8_t* ptr, uint32_t v); uint32_t read_uint16(uint8_t const* ptr);*/ #ifdef __cplusplus } // extern "C" #endif #if defined(__cplusplus) namespace gvl { GVL_INLINE int log2(uint32_t v) { return gvl_log2(v); } GVL_INLINE int top_bit(uint32_t v) { return gvl_top_bit(v); } GVL_INLINE int bottom_bit(uint32_t v) { return gvl_bottom_bit(v); } GVL_INLINE int log2(uint64_t v) { return gvl_log2_64(v); } GVL_INLINE int trailing_zeroes(uint32_t v) { return gvl_trailing_zeroes(v); } GVL_INLINE uint32_t bswap(uint32_t v) { return gvl_bswap(v); } GVL_INLINE uint64_t bswap(uint64_t v) { return gvl_bswap_64(v); } GVL_INLINE uint32_t bswap_le(uint32_t v) { return gvl_bswap_le(v); } GVL_INLINE uint32_t bswap_be(uint32_t v) { return gvl_bswap_be(v); } GVL_INLINE int popcount(uint32_t v) { return gvl_popcount(v); } GVL_INLINE int ceil_log2(uint32_t v) { return gvl_ceil_log2(v); } GVL_INLINE int even_log2(uint32_t v) { return gvl_even_log2(v); } GVL_INLINE int odd_log2(uint32_t v) { return gvl_odd_log2(v); } GVL_INLINE int odd_log2(uint64_t v) { return gvl_odd_log2_64(v); } GVL_INLINE int32_t saturate0(int32_t v) { return gvl_saturate0(v); } GVL_INLINE int32_t udiff(uint32_t x, uint32_t y) { return gvl_udiff(x, y); } GVL_INLINE bool cyclic_between(uint32_t b, uint32_t e, uint32_t x) { return gvl_cyclic_between(b, e, x) != 0; } GVL_INLINE bool cyclic_between(uint32_t b, uint32_t e, uint32_t x, uint32_t mask) { return gvl_cyclic_between_mask(b, e, x, mask) != 0; } GVL_INLINE int32_t uint32_as_int32(uint32_t x) { return gvl_uint32_as_int32(x); } GVL_INLINE uint32_t int32_as_uint32(int32_t x) { return gvl_int32_as_uint32(x); } GVL_INLINE uint32_t lsb_mask(int x) { return gvl_lsb_mask(x); } GVL_INLINE uint32_t shl_1_32(uint32_t v, uint32_t o) { return gvl_shl_1_32(v, o); } GVL_INLINE uint32_t shr_1_32(uint32_t v, uint32_t o) { return gvl_shr_1_32(v, o); } GVL_INLINE bool all_set(uint32_t v, uint32_t f) { return gvl_all_set(v, f) != 0; } GVL_INLINE bool is_power_of_two(uint32_t x) { return gvl_is_power_of_two(x) != 0; } } #endif #endif /* UUID_D006EF6EB7A24020D1926ABC53D805D6 */ lierolibre-0.5/src/gvl/support/borrow.hpp000066400000000000000000000056251205125547100206360ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_6071590BDDFE4E7683887E92F8CDD4FA #define UUID_6071590BDDFE4E7683887E92F8CDD4FA #include "debug.hpp" namespace gvl { struct borrow_tag {}; struct lendable { #ifndef NDEBUG lendable() : borrow_count(0) { } lendable(lendable const& b, borrow_tag) : borrow_count(-1) // Not lendable { } ~lendable() { passert(borrow_count == 0, "Object still borrowed"); } mutable int borrow_count; // Need to be able to modify via pointers to const #endif }; template struct borrowed : T { borrowed(T const& b) : T(b, borrow_tag()) #ifndef NDEBUG , source(&b) , old_borrow_count(b.lendable::borrow_count) #endif { #ifndef NDEBUG passert(b.lendable::borrow_count != -1, "Object is a borrowed instance and cannot be borrowed"); passert(b.lendable::borrow_count == 0, "Object borrowed already"); ++b.lendable::borrow_count; #endif } borrowed(borrowed const& b) : T(b, borrow_tag()) #ifndef NDEBUG , source(b.source) , old_borrow_count(b.lendable::borrow_count) #endif { #ifndef NDEBUG ++b.lendable::borrow_count; #endif } ~borrowed() { #ifndef NDEBUG --source->lendable::borrow_count; if(source->lendable::borrow_count > old_borrow_count) passert(false, "Borrowed object not returned"); else if(source->lendable::borrow_count < old_borrow_count) passert(false, "Borrowed object returned too late"); // This should never be reached #endif } #ifndef NDEBUG T const* source; int old_borrow_count; #endif }; } // namespace gvl #endif // UUID_6071590BDDFE4E7683887E92F8CDD4FA lierolibre-0.5/src/gvl/support/cheap_flags.hpp000066400000000000000000000046621205125547100215600ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_E882406B58BE4B04808FB79776E9882A #define UUID_E882406B58BE4B04808FB79776E9882A #include "debug.hpp" namespace gvl { // Bit set with very cheap clearing template struct cheap_flags_item { cheap_flags_item() : last_iter_set(-1) { } int last_iter_set; }; template struct cheap_flags { cheap_flags() : iter_count(0) { } bool operator[](cheap_flags_item const& item) { return item.last_iter_set >= iter_count; } void set(cheap_flags_item& item) { item.last_iter_set = iter_count; } void reset(cheap_flags_item& item) { item.last_iter_set = -1; } void clear() { passert((iter_count + 1) > iter_count, "Clear limit reached"); ++iter_count; } int iter_count; }; struct cheap_flags_dummy_tag; struct cheap_flags_vector_item : cheap_flags_item { }; struct cheap_flags_vector : cheap_flags { // TODO std::vector items; }; } // namespace gvl #endif // UUID_E882406B58BE4B04808FB79776E9882A lierolibre-0.5/src/gvl/support/config.h000066400000000000000000000030731205125547100202240ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_192A557270964917B0263E8050C2E433 #define UUID_192A557270964917B0263E8050C2E433 #include "platform.hpp" #endif // UUID_192A557270964917B0263E8050C2E433 lierolibre-0.5/src/gvl/support/cstdint.hpp000066400000000000000000000076031205125547100207720ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_EA12C28D969947BF0340D69440AE5D30 #define UUID_EA12C28D969947BF0340D69440AE5D30 // NOTE: Keep this useable from C #include #include "platform.hpp" #if GVL_GCC || _MSC_VER >= 1600 #include #else /* !GVL_GCC */ #if !GVL_EXCLUDE_STDINT #if CHAR_BIT == 8 && UCHAR_MAX == 0xff typedef unsigned char uint8_t; typedef signed char int8_t; #else #error "Only 8-bit chars supported" #endif typedef unsigned int uint_fast8_t; typedef int int_fast8_t; #if USHRT_MAX == 0xffff typedef unsigned short uint16_t; typedef short int16_t; #elif UINT_MAX == 0xffff typedef unsigned int uint16_t; typedef int int16_t; #else #error "No suitable 16-bit type" #endif #if USHRT_MAX == 0xffffffff typedef unsigned short uint32_t; typedef short int32_t; #elif UINT_MAX == 0xffffffff typedef unsigned int uint32_t; typedef int int32_t; #elif ULONG_MAX == 0xffffffff typedef unsigned long uint32_t; typedef long int32_t; #else #error "No suitable 32-bit type" #endif /* We found a 32-bit type above, int should do */ #if GVL_X86 || GVL_X86_64 /* long should match the register size */ typedef unsigned long uint_fast16_t; typedef long int_fast16_t; typedef unsigned long uint_fast32_t; typedef long int_fast32_t; #elif UINT_MAX < 0xffffffff /* Have to use long for 32-bit */ typedef unsigned int uint_fast16_t; typedef int int_fast16_t; typedef unsigned long uint_fast32_t; typedef long int_fast32_t; #else /* Be conservative with space */ typedef unsigned int uint_fast16_t; typedef int int_fast16_t; typedef unsigned int uint_fast32_t; typedef int int_fast32_t; #endif #define IS_64(x) ((x) > 0xffffffff && (x) == 0xffffffffffffffff) #if IS_64(ULONG_MAX) typedef unsigned long uint64_t; typedef long int64_t; #elif defined(ULLONG_MAX) && IS_64(ULLONG_MAX) typedef unsigned long long uint64_t; typedef long long int64_t; #else #error "No suitable 64-bit type" #endif #if defined(ULLONG_MAX) typedef unsigned long long uintmax_t; typedef long long intmax_t; #else typedef unsigned long uintmax_t; typedef long intmax_t; #endif typedef uint64_t uint_fast64_t; typedef int64_t int_fast64_t; typedef ptrdiff_t intptr_t; #endif #define GVL_BITS_IN(t) (sizeof(t)*CHAR_BIT) #endif /* !GVL_GCC */ #endif /* UUID_EA12C28D969947BF0340D69440AE5D30 */ lierolibre-0.5/src/gvl/support/debug.cpp000066400000000000000000000033451205125547100204020ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "debug.hpp" #include #include void gvl::passert_fail(char const* cond, char const* file, int line, char const* msg) { std::string s; s += "ASSERT FAILED: "; s += file; s += ":"; s += line; s += ": !("; s += cond; s += "), "; s += msg; #if 0 throw gvl::assert_failure(s); #else abort(); #endif } lierolibre-0.5/src/gvl/support/debug.hpp000066400000000000000000000052401205125547100204030ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_B28D1ACCA789486008A1FF8B92CF00C5 #define UUID_B28D1ACCA789486008A1FF8B92CF00C5 #include namespace gvl { struct assert_failure : std::runtime_error { assert_failure(std::string const& str) : std::runtime_error(str) { } }; void passert_fail(char const* cond, char const* file, int line, char const* msg); #ifndef NDEBUG #define GVL_PASSERT(cond, msg) \ if(!(cond)) gvl::passert_fail(#cond, __FILE__, __LINE__, msg) #define GVL_SASSERT(cond) \ if(!(cond)) gvl::passert_fail(#cond, __FILE__, __LINE__, "") #else #define GVL_PASSERT(cond, msg) ((void)0) #define GVL_SASSERT(cond) ((void)0) #endif #if !GVL_NO_BS // GVL_NO_BS == 1 is currently not supported by gvl headers #define passert(cond, msg) GVL_PASSERT(cond, msg) #define sassert(cond) GVL_SASSERT(cond) #endif #define GVL_STATIC_ASSERT(cond) typedef char static_assert_[(cond) ? 1 : 0] #if GVL_MSVCPP # if _MSC_FULL_VER >= 140050320 # define GVL_DEPRECATED(TEXT) __declspec(deprecated(TEXT)) # else # define GVL_DEPRECATED(TEXT) __declspec(deprecated) # endif #elif GVL_GCC # define GVL_DEPRECATED(TEXT) __attribute__ ((deprecated(TEXT))); #endif #ifndef GVL_DEPRECATED # define GVL_DEPRECATED(TEXT) #endif #define GVL_UNUSED(var) ((void)var) } #endif // UUID_B28D1ACCA789486008A1FF8B92CF00C5 lierolibre-0.5/src/gvl/support/disjoint_set.hpp000066400000000000000000000060631205125547100220170ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_91DED073ABD04CDA1FAAC9AC7CF9BAAD #define UUID_91DED073ABD04CDA1FAAC9AC7CF9BAAD namespace gvl { template struct disjoint_set_member { disjoint_set_member() : parent(0), rank(0) { } // Define this in T for unification logic. // 'this' will be the new representative of the set. template void on_union(T const&) { // Do nothing by default } // Define this in T for reset logic. // This will be called when 'this' is made into a singleton // set. template void on_reset() { // Do nothing by default } bool same_set(T& b) { return &find() == &b.find(); } T& find() { // Path compression if(!parent) return *static_cast(this); parent = &parent->find(); return *parent; } // Unify this and b and return the representative of the union T& union_(T& b) { // Union by rank T& rootA = find(); T& rootB = b.find(); sassert(!rootA.parent && !rootB.parent); if(&rootA == &rootB) return rootA; int rankA = rootA.rank; int rankB = rootB.rank; if(rankA < rankB) { rootA.parent = &rootB; rootB.on_union(rootA); return rootB; } else { rootB.parent = &rootA; rootA.on_union(rootB); if(rankA == rankB) rootA.rank = rankA + 1; return rootA; } } // Make this member into a singleton set. // This only has defined behaviour if all elements of the set are reset() // before any element in the set is used again. void reset() { parent = 0; rank = 0; derived().on_reset(); } T& derived() { return *static_cast(this); } T* parent; int rank; }; } #endif // UUID_91DED073ABD04CDA1FAAC9AC7CF9BAAD lierolibre-0.5/src/gvl/support/flags.hpp000066400000000000000000000042101205125547100204050ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_9F0036A7B22E453BA9D2A6810D1B70DD #define UUID_9F0036A7B22E453BA9D2A6810D1B70DD namespace gvl { template struct basic_flags { basic_flags(T f) : flags_(f) { } void replace(T f, T mask) { flags_ ^= ((flags_ ^ f) & mask); } void set(T f) { flags_ |= f; } void reset(T f) { flags_ &= ~f; } void replace(T f) { flags_ = f; } bool any(T f) const { return (flags_ & f) != 0; } bool all(T f) const { return (flags_ & f) == f; } bool no(T f) const { return (flags_ & f) == 0; } void toggle(T f) { flags_ ^= f; } T as_integer() { return flags_; } private: T flags_; }; typedef basic_flags flags; } // namespace gvl #endif // UUID_9F0036A7B22E453BA9D2A6810D1B70DD lierolibre-0.5/src/gvl/support/foreach.hpp000066400000000000000000000061501205125547100207250ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_FOREACH_HPP #define GVL_FOREACH_HPP namespace gvl { namespace foreach_detail_ { struct auto_any_base { operator bool() const { return false; } }; template struct auto_any : auto_any_base { auto_any(T const& v) : value(v) { } mutable T value; }; typedef auto_any_base const& auto_any_t; template inline auto_any wrap(T const& t) { return t; } inline bool set_false(bool& x) { x = false; return false; } template inline T* encode_type(T const& x) { return 0; } template inline T& cast(auto_any_t x, T*) { return static_cast const&>(x).value; } } #define GVL_FOREACH_WRAP(x) gvl::foreach_detail_::wrap(x) #define GVL_FOREACH_TYPEOF(x) (true ? 0 : gvl::foreach_detail_::encode_type(x)) #define GVL_FOREACH_CAST(x, type_expr) gvl::foreach_detail_::cast((x), GVL_FOREACH_TYPEOF(type_expr)) #define GVL_FOREACH_DONE(VAR, r) (GVL_FOREACH_CAST(VAR, (r)).empty()) #define GVL_FOREACH_NEXT(VAR, r) (GVL_FOREACH_CAST(VAR, (r)).pop_front()) #define GVL_FOREACH_DEREF(VAR, r) (GVL_FOREACH_CAST(VAR, (r)).front()) #define GVL_FOREACH(VAR, RANGE) \ if (gvl::foreach_detail_::auto_any_t _foreach_range = GVL_FOREACH_WRAP(RANGE)) {} else \ for (bool _foreach_continue = true; \ _foreach_continue && !GVL_FOREACH_DONE(_foreach_range, RANGE); \ _foreach_continue ? GVL_FOREACH_NEXT(_foreach_range, RANGE) : (void)0) \ if (gvl::foreach_detail_::set_false(_foreach_continue)) {} else \ for (VAR = GVL_FOREACH_DEREF(_foreach_range, RANGE); !_foreach_continue; _foreach_continue = true) } #endif // GVL_FOREACH_HPP lierolibre-0.5/src/gvl/support/functional.hpp000066400000000000000000000043041205125547100214570ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_64B1EAC4E4F545FA3B131FA346621126 #define UUID_64B1EAC4E4F545FA3B131FA346621126 namespace gvl { struct default_delete { template void operator()(T* p) const { delete p; } }; struct dummy_delete { template void operator()(T const&) const { // Do nothing } }; struct default_compare { template int operator()(T const& a, T const& b) const { if(a < b) return -1; else if(b < a) return 1; else return 0; } }; #if 0 template void caller(void* p) { static_cast(p)->operator()(); } struct functor_wrapper { template functor_wrapper(T& t) : f(&caller) , p(&t) { } void call() { f(p); } void(*f)(void* p); void* p; }; #endif } // namespace gvl #endif // UUID_64B1EAC4E4F545FA3B131FA346621126 lierolibre-0.5/src/gvl/support/hash.cpp000066400000000000000000000047541205125547100202440ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "hash.hpp" #include "debug.hpp" namespace gvl { std::size_t primes[] = { //5, //2^2 + 1 11, //2^3 + 3 17, //2^4 + 1 37, //2^5 + 5 67, //2^6 + 3 131, //2^7 + 3 257, //2^8 + 1 521, //2^9 + 9 1031, //2^10 + 7 2053, //2^11 + 5 4099, //2^12 + 3 8209, //2^13 + 17 16411, //2^14 + 27 32771, //2^15 + 3 65537, //2^16 + 1 131101, //2^17 + 29 262147, //2^18 + 3 524309, //2^19 + 21 1048583, //2^20 + 7 2097169, //2^21 + 17 4194319, //2^22 + 15 8388617, //2^23 + 9 16777259, //2^24 + 43 33554467, //2^25 + 35 67108879, //2^26 + 15 134217757, //2^27 + 29 268435459, //2^28 + 3 536870923, //2^29 + 11 1073741827, //2^30 + 3 0 }; std::size_t next_prime(std::size_t n) { std::size_t i = 0; for(; n > primes[i]; ++i) { sassert(primes[i]); } return primes[i]; } std::size_t prev_prime(std::size_t n) { std::size_t i = 1; for(; n > primes[i] && primes[i]; ++i) { sassert(primes[i]); } return primes[i-1]; } } // namespace gvl lierolibre-0.5/src/gvl/support/hash.hpp000066400000000000000000000052631205125547100202450ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_5849ECCC7F1142CA9E5E9CA33B298A6D #define UUID_5849ECCC7F1142CA9E5E9CA33B298A6D #include #include #include #include "cstdint.hpp" namespace gvl { typedef uint32_t hash_t; int const hash_bits = 32; inline hash_t hash(uint32_t v, uint32_t p = 0x3C618459) { v ^= p; v *= v * 2 + 1; return p - v; } inline hash_t hash(int v, uint32_t p = 0x3C618459) { return hash(uint32_t(v), p); } inline hash_t hash(void const* v, uint32_t p = 0x3C618459) { return hash(hash_t(std::size_t(v)), p); } template inline hash_t hash(std::pair const& v) { return (hash(v.first) * 2654435761ul) ^ hash(v.second); } inline hash_t hash(std::string const& v, unsigned p = 0x3C618459) { std::size_t amount = 512; if(amount > v.size()) amount = v.size(); hash_t h = p; for(std::size_t i = 0; i < amount; ++i) { h = h*33 ^ (unsigned char)v[i]; } return h; } template inline hash_t hash(T const& v, unsigned p = 0x3C618459) { return v.hash(p); } struct hash_functor { template hash_t operator()(T const& v, unsigned p = 0x3C618459) const { return hash(v, p); } }; std::size_t next_prime(std::size_t n); std::size_t prev_prime(std::size_t n); } // namespace vl #endif // UUID_5849ECCC7F1142CA9E5E9CA33B298A6D lierolibre-0.5/src/gvl/support/log.cpp000066400000000000000000000051531205125547100200740ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "log.hpp" #include #include namespace { struct cstr_comp { bool operator()(char const* a, char const* b) const { return strcmp(a, b) < 0; } }; struct log_streams { typedef std::map stream_map; log_streams() { } ~log_streams() { FOREACH(stream_map, i, streams) { delete i->second; } } gvl::octet_stream_writer& get(char const* name, char const* path) { stream_map::iterator i = streams.find(name); if(i == streams.end()) { gvl::octet_stream_writer* str = new gvl::octet_stream_writer( gvl::stream_ptr(new gvl::fstream(path, "wb"))); streams[name] = str; return *str; } else return *i->second; } static log_streams& instance() { static log_streams inst; return inst; } stream_map streams; }; } // namespace namespace gvl { log_options global_log_options; log_options::log_options() : debug(true), level(LOG_WARNINGS) { } void location::print(std::string const& msg) const { if(file) gvl::cerr() << *file << ':' << line << ": " << msg << gvl::endl; } gvl::octet_stream_writer& get_named_stream(char const* name, char const* path) { return log_streams::instance().get(name, path); } } lierolibre-0.5/src/gvl/support/log.hpp000066400000000000000000000101671205125547100201020ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_D58C3D2694ED41DD5D5AEA8CEECD46B2 #define UUID_D58C3D2694ED41DD5D5AEA8CEECD46B2 //#include //#include #include "../io/iostream.hpp" #include #include #include "macros.hpp" namespace gvl { struct location { location() : file(0) { } location(std::string const& file_, int line_) : file(&file_), line(line_) { } // Compiler generated op= and copy ctor void print(std::string const& msg) const; private: std::string const* file; int line; }; struct log_options { log_options(); bool debug; int level; }; extern log_options global_log_options; gvl::octet_stream_writer& get_named_stream(char const* name, char const* path); #define LOG_NONE -1 #define LOG_ERRORS 0 #define LOG_INFO 1 #define LOG_WARNINGS 2 #define LOG_TRACE 3 #define LOG(x_) (gvl::cout() << x_ << gvl::endl) #define FLOG(f_, x_) (gvl::get_named_stream(#f_, #f_ ".log") << x_ << std::endl) #define WLOG_ONCE(x_) do { static bool warned = false; if(!warned) { WLOG(x_); warned = true; } } while(0) #ifdef LOG_RUNTIME # define DLOG(x_) if(global_log_options.debug) { (gvl::cout() << __FILE__ ":" << __LINE__ << ": " << x_ << gvl::endl); } else (void)0 # define DLOGL(l_, x_) if(global_log_options.debug) { l_.print(x_); } else (void)0 # define TLOG(x_) if(global_log_options.level >= LOG_TRACE) { (gvl::cout() << __FILE__ ":" << __LINE__ << ": " << x_ << gvl::endl); } else (void)0 # define WLOG(x_) if(global_log_options.level >= LOG_WARNINGS) { (gvl::cerr() << __FILE__ ":" << __LINE__ << ": " << x_ << gvl::endl); } else (void)0 # define ILOG(x_) if(global_log_options.level >= LOG_INFO) { (gvl::cerr() << x_ << gvl::endl); } else (void)0 # define ELOG(x_) if(global_log_options.level >= LOG_ERRORS) { (gvl::cerr() << __FILE__ ":" << __LINE__ << ": " << x_ << gvl::endl); } else (void)0 #else # ifndef LOG_LEVEL # define LOG_LEVEL LOG_WARNINGS # endif # ifdef LOG_DEBUG # define DLOG(x_) (gvl::cout() << __FILE__ ":" << __LINE__ << ": " << x_ << gvl::endl) # define DLOGL(l_, x_) l_.print(x_) # else # define DLOG(x_) (void)0 # define DLOGL(l_, x_) (void)0 # endif # if LOG_LEVEL >= LOG_TRACE # define TLOG(x_) (gvl::cout() << __FILE__ ":" << __LINE__ << ": " << x_ << gvl::endl) # else # define TLOG(x_) (void)0 # endif # if LOG_LEVEL >= LOG_INFO # define ILOG(x_) (gvl::cout() << x_ << gvl::endl) # else # define ILOG(x_) (void)0 # endif # if LOG_LEVEL >= LOG_WARNINGS # define WLOG(x_) (gvl::cerr() << __FILE__ ":" << __LINE__ << ": " << x_ << gvl::endl) # else # define WLOG(x_) (void)0 # endif # if LOG_LEVEL >= LOG_ERRORS # define ELOG(x_) (gvl::cerr() << __FILE__ ":" << __LINE__ << ": " << x_ << gvl::endl) # else # define ELOG(x_) (void)0 # endif #endif } // namespace gvl #endif // UUID_D58C3D2694ED41DD5D5AEA8CEECD46B2 lierolibre-0.5/src/gvl/support/macros.hpp000066400000000000000000000041321205125547100206000ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_DFBC6E7713BD45652D22AB8D4A57781B #define UUID_DFBC6E7713BD45652D22AB8D4A57781B #define FOREACH(t_, i_, c_) for(t_::iterator i_ = (c_).begin(); i_ != (c_).end(); ++i_) #define CONST_FOREACH(t_, i_, c_) for(t_::const_iterator i_ = (c_).begin(); i_ != (c_).end(); ++i_) #define REVERSE_FOREACH(t_, i_, c_) for(t_::reverse_iterator i_ = (c_).rbegin(); i_ != (c_).rend(); ++i_) #define FOREACH_DELETE(t_, v_, c_) for(t_::iterator v_ = (c_).begin(), n_; v_ != (c_).end() && (n_ = v_, ++n_, true); v_ = n_) // Borrowed from boost #define GVL_CONCAT(a, b) GVL_CONCAT_I(a, b) #define GVL_CONCAT_I(a, b) GVL_CONCAT_II(a ## b) #define GVL_CONCAT_II(res) res #endif // UUID_DFBC6E7713BD45652D22AB8D4A57781B lierolibre-0.5/src/gvl/support/move.hpp000066400000000000000000000041261205125547100202650ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_3EEC2EFDDD1945483B3E30B8FE895AA9 #define UUID_3EEC2EFDDD1945483B3E30B8FE895AA9 namespace gvl { // NOTE: One can't bind rvalues to move_holder. Instead // one has to explicitly use rvalue() and make sure it's only // used for rvalues. template struct move_holder { move_holder(T& v) : v(v) { } operator T&() { return v; } T& operator*() { return v; } T* operator->() { return &v; } private: T& v; }; template inline move_holder move(T& v) { return move_holder(v); } template inline move_holder rvalue(T const& v) { return move_holder(const_cast(v)); } } // namespace gvl #endif // UUID_3EEC2EFDDD1945483B3E30B8FE895AA9 lierolibre-0.5/src/gvl/support/object_model.h000066400000000000000000000051451205125547100214070ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_D13E73786A7C4F75E2481BB7E79A5B37 #define UUID_D13E73786A7C4F75E2481BB7E79A5B37 #define GVL_INTERFACE(name, members) \ typedef struct name##_vtable_ members name##_vtable; \ typedef struct name##_ { void* ptr; name##_vtable* vtable; }; \ INLINE name make_##name(void* ptr, name##_vtable* vtable) { \ name ret; \ ret.ptr = ptr; \ ret.vtable = vtable; \ return ret; } #define GVL_INTERFACE1(name, member) \ typedef struct name##_ { void* ptr; member; }; #define GVL_DECL_INTERFACE(interf, vtable_name) \ extern interf##_table vtable_name; #define GVL_DEF_INTERFACE(interf, vtable_name, vtable_funcs) \ interf##_table vtable_name = vtable_funcs; #define GVL_REF_INTERFACE(self, member) ((self)->vtable.member) #define GVL_REF_INTERFACE1(self, member) ((self)->member) GVL_INTERFACE(printable, { void (*print)(void*); }) GVL_DECL_INTERFACE(printable, printable_int) void print_int(void* self) { printf("%d", (int)self); } GVL_DEF_INTERFACE(printable, printable_int, { print_int }) #define PRINTABLE_FROM_INT(i) make_printable((void*)(i), printable_int) void test() { int i = 10; printable ip = PRINTABLE_FROM_INT(i); GVL_REF_INTERFACE(ip, print)(ip.ptr); } #endif // UUID_D13E73786A7C4F75E2481BB7E79A5B37 lierolibre-0.5/src/gvl/support/opt.hpp000066400000000000000000000103171205125547100201200ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_0B359775B44F45D98A1A938A7401BAD6 #define UUID_0B359775B44F45D98A1A938A7401BAD6 #include "bits.hpp" #include "cstdint.hpp" #include "platform.hpp" #include "debug.hpp" #include #include #if GVL_MSVCPP #include #pragma intrinsic(__emul) #pragma intrinsic(__emulu) #pragma intrinsic(_mm_prefetch) #endif namespace gvl { inline uint64_t emulu(uint32_t x, uint32_t y) { #if GVL_MSVCPP return __emulu(x, y); #else return uint64_t(x) * y; #endif } #define CHECK_FF 1 struct prepared_division { prepared_division(uint32_t divisor_init) : divisor(divisor_init) { if(divisor == 0) throw std::domain_error("Prepared division by zero"); else if(divisor == 1) throw std::invalid_argument("prepared_division cannot divide by 1"); int b = top_bit(divisor); rshift = b; if(is_power_of_two(divisor)) { offset = 0; multiplier = 0x80000000; // The multiplier will cause a right-shift by 1, so decrease rshift --rshift; return; } uint64_t dividend = (0x100000000ull << rshift); uint32_t f = uint32_t(dividend / divisor); uint64_t remainder = dividend - uint64_t(f) * divisor; if(remainder * 2 < divisor) // remainder * 2 < divisor <=> remainder / divisor < 1/2 { multiplier = f; #if !CHECK_FF offset = multiplier; #else offset = 1; #endif } else { multiplier = f + 1; // Round up offset = 0; } } uint32_t multiplier; uint32_t offset; uint32_t divisor; int rshift; uint32_t quot(uint32_t dividend) { #if !CHECK_FF return uint32_t((emulu(dividend, multiplier) + offset) >> 32) >> rshift; #else dividend += offset; if(!dividend) return multiplier >> rshift; else return uint32_t(emulu(dividend, multiplier) >> 32) >> rshift; #endif } std::pair quot_rem(uint32_t dividend) { uint32_t quotient = quot(dividend); uint32_t remainder = dividend - quotient * divisor; return std::make_pair(quotient, remainder); } }; #ifdef NDEBUG # if GVL_MSVCPP # define GVL_ASSUME(x) __assume(x) # define GVL_UNREACHABLE() GVL_ASSUME(0) # if GVL_SSE # define GVL_PREFETCH_READ(addr) _mm_prefetch((char*)(addr), _MM_HINT_T2) # define GVL_PREFETCH_WRITE(addr) _mm_prefetch((char*)(addr), _MM_HINT_T2) # endif # elif GVL_GCC # define GVL_ASSUME(x) __builtin_expect((x), 1) # define GVL_UNREACHABLE() __builtin_unreachable() # define GVL_PREFETCH_READ(addr) __builtin_prefetch((addr), 0) # define GVL_PREFETCH_WRITE(addr) __builtin_prefetch((addr), 1) # endif #endif #if !defined(GVL_ASSUME) # define GVL_ASSUME(x) sassert(x) #endif #ifndef GVL_UNREACHABLE # define GVL_UNREACHABLE() sassert(false) #endif #ifndef GVL_PREFETCH_READ # define GVL_PREFETCH_READ(addr) ((void)(addr)) #endif #ifndef GVL_PREFETCH_WRITE # define GVL_PREFETCH_WRITE(addr) ((void)(addr)) #endif } #endif // UUID_0B359775B44F45D98A1A938A7401BAD6 lierolibre-0.5/src/gvl/support/platform.cpp000066400000000000000000000051451205125547100211400ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "platform.hpp" #include "cstdint.hpp" #include "debug.hpp" void gvl_test_platform() { GVL_STATIC_ASSERT(sizeof(uint64_t)*CHAR_BIT == 64); GVL_STATIC_ASSERT(sizeof(uint32_t)*CHAR_BIT == 32); GVL_STATIC_ASSERT(sizeof(uint16_t)*CHAR_BIT == 16); GVL_STATIC_ASSERT(sizeof(uint8_t)*CHAR_BIT == 8); GVL_STATIC_ASSERT(sizeof(int64_t)*CHAR_BIT == 64); GVL_STATIC_ASSERT(sizeof(int32_t)*CHAR_BIT == 32); GVL_STATIC_ASSERT(sizeof(int16_t)*CHAR_BIT == 16); GVL_STATIC_ASSERT(sizeof(int8_t)*CHAR_BIT == 8); // Test endianness uint32_t v = 0xAABBCCDD; uint8_t first = reinterpret_cast(&v)[0]; uint8_t second = reinterpret_cast(&v)[1]; #if GVL_BIG_ENDIAN sassert(first == 0xAA && second == 0xBB); #else sassert(first == 0xDD && second == 0xCC); #endif // Test integer assumptions GVL_STATIC_ASSERT((-1>>31) == -1); // Signed right-shift must duplicate sign bit GVL_STATIC_ASSERT((-1/2) == 0); // Division must round towards 0 // Do this last since it may crash the process #if GVL_UNALIGNED_ACCESS uint8_t volatile x[150] = {}; for(int i = 0; i < 100; ++i) *(uint32_t volatile*)(x + i) = 1; uint32_t sum = 0; for(int i = 0; i < 100; ++i) sum += *(uint32_t volatile*)(x + i); #endif } lierolibre-0.5/src/gvl/support/platform.h000066400000000000000000000120471205125547100206040ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_7D332649F1E24EAC587F0386AD08B2CC #define UUID_7D332649F1E24EAC587F0386AD08B2CC /* NOTE: Keep this usable from C */ #include #if !defined(GVL_CPP) #if defined(__cplusplus) #define GVL_CPP 1 #else #define GVL_CPP 0 #endif #endif #if !defined(GVL_WIN64) # if defined(WIN64) || defined(_WIN64) /* TODO: Check for Cygwin */ # define GVL_WIN64 1 # else # define GVL_WIN64 0 # endif #endif #if !defined(GVL_WIN32) # if defined(WIN32) || defined(_WIN32) /* TODO: Check for Cygwin */ # define GVL_WIN32 1 # else # define GVL_WIN32 0 # endif #endif #if !defined(GVL_WINDOWS) # define GVL_WINDOWS (GVL_WIN32 || GVL_WIN64) #endif #if !defined(GVL_MSVCPP) # if defined(_MSC_VER) # define GVL_MSVCPP _MSC_VER # else # define GVL_MSVCPP 0 # endif #endif #if !defined(GVL_GCC) # if defined(__GNUC__) # define GVL_GCC 1 # else # define GVL_GCC 0 # endif #endif #if !defined(GVL_LINUX) # if defined(__linux__) || defined(linux) # define GVL_LINUX 1 # else # define GVL_LINUX 0 # endif #endif #if !GVL_X86 && !GVL_X86_64 # if defined(_M_X64) || defined(__x86_64__) || GVL_WIN64 # define GVL_X86_64 1 # elif defined(__i386__) || defined(_M_IX86) || defined(i386) || defined(i486) || defined(intel) || defined(x86) || defined(i86pc) # define GVL_X86 1 # else # error "Unknown architecture, please add it" # endif #endif #if !GVL_LITTLE_ENDIAN && !GVL_BIG_ENDIAN # if GVL_X86 || GVL_X86_64 # define GVL_LITTLE_ENDIAN 1 # else # define GVL_BIG_ENDIAN 1 # endif #endif #if defined(__cplusplus) // We don't test GVL_CPP here, because we assume we can always use C++ inline in C++ # define GVL_INLINE inline # if defined(GVL_GCC) # define GVL_FORCE_INLINE inline # elif defined(GVL_MSVCPP) # define GVL_FORCE_INLINE __forceinline # else # define GVL_FORCE_INLINE inline # endif #elif GVL_GCC # define GVL_INLINE static inline # define GVL_FORCE_INLINE static inline #elif GVL_MSVCPP # define GVL_INLINE __inline # define GVL_FORCE_INLINE __inline #else # define GVL_INLINE static # define GVL_FORCE_INLINE static #endif #if !defined(GVL_CPP0X) # if GVL_MSVCPP >= 1600 # define GVL_CPP0X 1 // C++0x level 1 # else # define GVL_CPP0X 0 # endif #endif /* Whether or not the compiler may generate x87 code for floating point calculations. ** GVL_X87 == 1 means the gvl IEEE support functions will take measures to work-around ** x87 issues that make results non-reproducible. */ #if !defined(GVL_X87) # if GVL_X86 # define GVL_X87 1 // Assume the compiler generates x87 code on x86 unless otherwise stated # elif GVL_X86_64 # define GVL_X87 0 // SSE2 is typically used on GVL_X86_64 # endif #endif /* Whether or not types can be read from unaligned addresses */ #if !defined(GVL_UNALIGNED_ACCESS) # if GVL_X86 || GVL_X86_64 # define GVL_UNALIGNED_ACCESS 1 # else # define GVL_UNALIGNED_ACCESS 0 # endif #endif /* At least x86 and x86_64 provide efficient masked shift counts in shifts */ #if !defined(GVL_MASKED_SHIFT_COUNT) # if GVL_X86 || GVL_X86_64 # define GVL_MASKED_SHIFT_COUNT 1 # else # define GVL_MASKED_SHIFT_COUNT 0 # endif #endif #ifndef GVL_DIV_ROUNDS_TOWARD_ZERO #define GVL_DIV_ROUNDS_TOWARD_ZERO ((-1/2)==0) #endif #ifndef GVL_SIGN_EXTENDING_RIGHT_SHIFT #define GVL_SIGN_EXTENDING_RIGHT_SHIFT (((-1)>>15)==-1) #endif #ifndef GVL_TWOS_COMPLEMENT #define GVL_TWOS_COMPLEMENT (~(-1)==0) #endif #if !defined(GVL_WINDOWS) #define GVL_WINDOWS (GVL_WIN64 || GVL_WIN32) #endif #if !defined(GVL_PTR64) #if GVL_WIN64 #define GVL_PTR64 1 #else #define GVL_PTR64 0 #endif #endif /* This function checks whether the above inferred ** characteristics are correct. It will throw gvl::assert_failure if not. */ void gvl_test_platform(); #endif // UUID_7D332649F1E24EAC587F0386AD08B2CC lierolibre-0.5/src/gvl/support/platform.hpp000066400000000000000000000032561205125547100211460ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_E256FC00B8C44EBE85C8738284C064F6 #define UUID_E256FC00B8C44EBE85C8738284C064F6 #include "platform.h" #if GVL_CPP0X && GVL_CPP #include #define GVL_MOVE(x) (::std::move(x)) #else #define GVL_MOVE(x) (x) #endif #endif // UUID_E256FC00B8C44EBE85C8738284C064F6 lierolibre-0.5/src/gvl/support/profile.cpp000066400000000000000000000102041205125547100207440ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "profile.hpp" #include #include #include #include #include #include #include #include "macros.hpp" namespace gvl { struct profile_manager { typedef std::map counter_line_map_t; typedef std::map timer_line_map_t; struct function_def { counter_line_map_t counters; timer_line_map_t timers; }; static profile_manager& instance() { static profile_manager instance_; return instance_; } void register_counter(profile_counter* c) { function_map[c->func].counters[c->line] = c; } void register_timer(profile_timer* c) { function_map[c->func].timers[c->line] = c; } void present(std::ostream& str); typedef std::map function_map_t; std::vector counters; function_map_t function_map; }; void present_profile(std::ostream& str) { profile_manager::instance().present(str); } profile_counter::profile_counter(char const* desc, char const* func, int line) : count(0), desc(desc), func(func), line(line) { profile_manager::instance().register_counter(this); } profile_timer::profile_timer(char const* desc, char const* func, int line) : total_time(0), desc(desc), func(func), line(line), count(0) { profile_manager::instance().register_timer(this); } void format_time(std::ostream& out, double seconds) { std::ostringstream ss; if(seconds < 1.0) ss << (1000.0 * seconds) << "ms"; else if(seconds < 60.0) ss << int(seconds) << "s " << int(std::fmod(seconds, 1)*1000.0) << "ms"; else if(seconds < 60.0*60.0) ss << int(seconds / 60.0) << "m " << int(std::fmod(seconds, 60)) << "s"; else ss << int(seconds / 3600.0) << "h " << int(std::fmod(seconds, 3600.0) / 60.0) << "m " << int(std::fmod(seconds, 60)) << "s"; out << ss.str(); } void profile_manager::present(std::ostream& str) { FOREACH(function_map_t, f, function_map) { str << "== Function " << f->first << "\n"; if(!f->second.counters.empty()) { str << "Count Description\n"; FOREACH(counter_line_map_t, l, f->second.counters) { str << std::setw(5) << l->second->count << " " << l->second->desc << ", line " << l->first << "\n"; } } str << " Time Description\n"; FOREACH(timer_line_map_t, l, f->second.timers) { if(l->second->count > 0) { double time = l->second->total_time / 1000.0; str << std::setw(10); format_time(str, time); str << " " << l->second->desc; // << ":" << l->first; if(l->second->count > 1) { str << " (average time: "; format_time(str, (time / l->second->count)); str << ")"; } str << "\n"; } else { str << l->second->desc << " not hit\n"; } } str << "=======\n\n"; } } } // namespace gvl lierolibre-0.5/src/gvl/support/profile.hpp000066400000000000000000000067431205125547100207660ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_8F2AAEBF84EF4C73603D7DA6D0FD36F1 #define UUID_8F2AAEBF84EF4C73603D7DA6D0FD36F1 #include #include #include #include "../system/system.hpp" #include "../support/macros.hpp" namespace gvl { struct profile_counter { profile_counter(char const* desc, char const* func, int line); void operator++() { ++count; } void operator+=(std::size_t n) { count += n; } std::size_t count; char const* desc; char const* func; int line; }; struct profile_timer { profile_timer(char const* desc, char const* func, int line); uint32_t total_time; char const* desc; char const* func; int line; std::size_t count; }; struct profile_accum_timer { profile_accum_timer(profile_timer& timer_init) : timer(timer_init) { start_time = get_ticks(); } ~profile_accum_timer() { uint32_t end_time = get_ticks(); ++timer.count; timer.total_time += (end_time - start_time); } uint32_t start_time; profile_timer& timer; }; void present_profile(std::ostream& str); #if GVL_PROFILE #define GVL_PROF_COUNT(desc) static gvl::profile_counter GVL_CONCAT(_vl_profcount, __LINE__) ((desc), __FUNCTION__, __LINE__); ++ GVL_CONCAT(_vl_profcount, __LINE__) #define GVL_PROF_SUM(desc, num) static gvl::profile_counter GVL_CONCAT(_vl_profcount, __LINE__) ((desc), __FUNCTION__, __LINE__); GVL_CONCAT(_vl_profcount, __LINE__) += std::size_t(num); #define GVL_PROF_TIMER(desc) static gvl::profile_timer GVL_CONCAT(_vl_prof_timer, __LINE__) ((desc), __FUNCTION__, __LINE__); gvl::profile_accum_timer GVL_CONCAT(_vl_prof_accum_timer, __LINE__) (GVL_CONCAT(_vl_prof_timer, __LINE__)) #define GVL_PROF_DECLCOUNT(name, desc) static gvl::profile_counter name((desc), __FUNCTION__, __LINE__) #define GVL_PROF_DECLTIMER(name, desc) static gvl::profile_timer name((desc), __FUNCTION__, __LINE__) #else #define GVL_PROF_COUNT(desc) ((void)0) #define GVL_PROF_SUM(desc, num) ((void)0) #define GVL_PROF_TIMER(desc) ((void)0) #define GVL_PROF_DECLCOUNT(name, desc) ((void)0) #define GVL_PROF_DECLTIMER(name, desc) ((void)0) #endif } // namespace gvl #endif // UUID_8F2AAEBF84EF4C73603D7DA6D0FD36F1 lierolibre-0.5/src/gvl/support/string_pool.cpp000066400000000000000000000027011205125547100216460ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "string_pool.hpp" namespace gvl { }lierolibre-0.5/src/gvl/support/string_pool.hpp000066400000000000000000000064151205125547100216610ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_1F5ADE6AD4944C662DFB9D86C2563186 #define UUID_1F5ADE6AD4944C662DFB9D86C2563186 #include #include #include "debug.hpp" namespace gvl { struct string_pool_state { string_pool_state() : string_pool_next_id(0) { } std::map string_pool_id_to_str; std::map string_pool_str_to_id; std::map string_pool_strconst_to_id; int string_pool_next_id; static string_pool_state& instance() { static string_pool_state self; return self; } }; struct pooled_string { // NOTE! Assumes str is alive throughout the whole program pooled_string(char const* str) { string_pool_state& state = string_pool_state::instance(); std::map::iterator i = state.string_pool_strconst_to_id.find(str); if(i != state.string_pool_strconst_to_id.end()) { id = i->second; } else { init(str); state.string_pool_strconst_to_id[str] = id; } } pooled_string(std::string const& str) { init(str); } void init(std::string const& str) { string_pool_state& state = string_pool_state::instance(); std::map::iterator i = state.string_pool_str_to_id.find(str); if(i != state.string_pool_str_to_id.end()) { id = i->second; } else { id = state.string_pool_next_id++; state.string_pool_id_to_str[id] = str; state.string_pool_str_to_id[str] = id; } } std::string const& get() { string_pool_state& state = string_pool_state::instance(); std::map::iterator i = state.string_pool_id_to_str.find(id); sassert(i != state.string_pool_id_to_str.end()); return i->second; } bool operator==(pooled_string b) const { return id == b.id; } bool operator!=(pooled_string b) const { return id != b.id; } bool operator<(pooled_string b) const { return id < b.id; } private: int id; }; } #endif // UUID_1F5ADE6AD4944C662DFB9D86C2563186 lierolibre-0.5/src/gvl/support/tests/000077500000000000000000000000001205125547100177455ustar00rootroot00000000000000lierolibre-0.5/src/gvl/support/tests/bits.cpp000066400000000000000000000055701205125547100214210ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "../../test/test.hpp" #include "../../math/cmwc.hpp" #include "../bits.hpp" int reference_trailing_zeroes(uint32_t v) { int c = 0; if(!v) return 0; while(!((v >> c) & 1)) { ++c; } return c; } int reference_bottom_bit(uint32_t v) { if(!v) return -1; return reference_trailing_zeroes(v); } int reference_log2(uint32_t v) { int c = 0; while((v >>= 1)) ++c; return c; } int reference_top_bit(uint32_t v) { if(!v) return -1; return reference_log2(v); } int32_t reference_saturate0(int32_t x) { return x < 0 ? 0 : x; } uint32_t reference_bswap(uint32_t x) { return (x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | ((x << 24) & 0xff000000); } uint64_t reference_bswap(uint64_t x) { return reference_bswap(uint32_t(x >> 32)) | (uint64_t(reference_bswap(uint32_t(x))) << 32); } GVLTEST_SUITE(gvl, bits) GVLTEST(gvl, bits, compare_against_reference) { gvl::mwc rand; for(int i = 0; i < 1000000; ++i) { uint32_t x = rand(); uint64_t x64 = (uint64_t(rand()) << 32) | x; ASSERTEQM("trailing_zeroes", reference_trailing_zeroes(x), gvl::trailing_zeroes(x)); ASSERTEQM("bottom_bit", reference_bottom_bit(x), gvl::bottom_bit(x)); ASSERTEQM("log2", reference_log2(x), gvl::log2(x)); ASSERTEQM("top_bit", reference_top_bit(x), gvl::top_bit(x)); ASSERTEQM("saturate0", reference_saturate0(int32_t(x)), gvl::saturate0(int32_t(x))); ASSERTEQM("bswap", reference_bswap(x), gvl::bswap(x)); ASSERTEQM("bswap 64-bit", reference_bswap(x64), gvl::bswap(x64)); } } lierolibre-0.5/src/gvl/support/type_info.hpp000066400000000000000000000047571205125547100213250ustar00rootroot00000000000000// Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_6513633745E64712FFA04FBF1EB80401 #define UUID_6513633745E64712FFA04FBF1EB80401 # include # include # if defined(__GNUC__) \ && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) \ && !defined(__EDG_VERSION__) # define BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE # endif namespace gvl { // for this compiler at least, cross-shared-library type_info // comparisons don't work, so use typeid(x).name() instead. It's not // yet clear what the best default strategy is. # if (defined(__GNUC__) && __GNUC__ >= 3) \ || defined(_AIX) \ || ( defined(__sgi) && defined(__host_mips)) \ || (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) # define BOOST_PYTHON_TYPE_ID_NAME # endif // type ids which represent the same information as std::type_info // (i.e. the top-level reference and cv-qualifiers are stripped), but // which works across shared libraries. struct type_info { inline type_info(std::type_info const& = typeid(void)); inline bool operator<(type_info const& rhs) const; inline bool operator==(type_info const& rhs) const; char const* name() const; private: // data members # ifdef BOOST_PYTHON_TYPE_ID_NAME typedef char const* base_id_t; # else typedef std::type_info const* base_id_t; # endif base_id_t m_base_type; }; template inline type_info type_id() { return type_info(typeid(T)); } // inline type_info::type_info(std::type_info const& id) : m_base_type( # ifdef BOOST_PYTHON_TYPE_ID_NAME id.name() # else &id # endif ) { } inline bool type_info::operator<(type_info const& rhs) const { # ifdef BOOST_PYTHON_TYPE_ID_NAME return std::strcmp(m_base_type, rhs.m_base_type) < 0; # else return m_base_type->before(*rhs.m_base_type) != 0; # endif } inline bool type_info::operator==(type_info const& rhs) const { # ifdef BOOST_PYTHON_TYPE_ID_NAME return !std::strcmp(m_base_type, rhs.m_base_type); # else return *m_base_type == *rhs.m_base_type; # endif } inline char const* type_info::name() const { char const* raw_name = m_base_type # ifndef BOOST_PYTHON_TYPE_ID_NAME ->name() # endif ; return raw_name; } } // namespace gvl #endif // UUID_6513633745E64712FFA04FBF1EB80401 lierolibre-0.5/src/gvl/system/000077500000000000000000000000001205125547100164135ustar00rootroot00000000000000lierolibre-0.5/src/gvl/system/memory.hpp000066400000000000000000000111261205125547100204350ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_54B4E13DC6CC41B073E60A941244DFBB #define UUID_54B4E13DC6CC41B073E60A941244DFBB // Adapted from PortAudio #if defined(__APPLE__) # include /* Here are the memory barrier functions. Mac OS X only provides full memory barriers, so the three types of barriers are the same, however, these barriers are superior to compiler-based ones. */ # define GVL_FULL_SYNC() OSMemoryBarrier() # define GVL_READ_SYNC() OSMemoryBarrier() # define GVL_WRITE_SYNC() OSMemoryBarrier() #elif defined(__GNUC__) /* GCC >= 4.1 has built-in intrinsics. We'll use those */ # if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) # define GVL_FULL_SYNC() __sync_synchronize() # define GVL_READ_SYNC() __sync_synchronize() # define GVL_WRITE_SYNC() __sync_synchronize() /* as a fallback, GCC understands volatile asm and "memory" to mean it * should not reorder memory read/writes */ /* Note that it is not clear that any compiler actually defines __PPC__, * it can probably be safely removed. */ # elif defined( __ppc__ ) || defined( __powerpc__) || defined( __PPC__ ) # define GVL_FULL_SYNC() asm volatile("sync":::"memory") # define GVL_READ_SYNC() asm volatile("sync":::"memory") # define GVL_WRITE_SYNC() asm volatile("sync":::"memory") # elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || \ defined( __i686__ ) || defined( __x86_64__ ) # define GVL_FULL_SYNC() asm volatile("mfence":::"memory") # define GVL_READ_SYNC() asm volatile("lfence":::"memory") # define GVL_WRITE_SYNC() asm volatile("sfence":::"memory") # else # ifdef ALLOW_SMP_DANGERS # warning Memory barriers not defined on this system or system unknown # warning For SMP safety, you should fix this. # define GVL_FULL_SYNC() # define GVL_READ_SYNC() # define GVL_WRITE_SYNC() # else # error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed. # endif # endif #elif (_MSC_VER >= 1400) && !defined(_WIN32_WCE) # include # pragma intrinsic(_ReadWriteBarrier) # pragma intrinsic(_ReadBarrier) # pragma intrinsic(_WriteBarrier) # define GVL_FULL_SYNC() _ReadWriteBarrier() # define GVL_READ_SYNC() _ReadBarrier() # define GVL_WRITE_SYNC() _WriteBarrier() #elif defined(_WIN32_WCE) # define GVL_FULL_SYNC() # define GVL_READ_SYNC() # define GVL_WRITE_SYNC() #elif defined(_MSC_VER) || defined(__BORLANDC__) # define GVL_FULL_SYNC() _asm { lock add [esp], 0 } # define GVL_READ_SYNC() _asm { lock add [esp], 0 } # define GVL_WRITE_SYNC() _asm { lock add [esp], 0 } #else # ifdef ALLOW_SMP_DANGERS # warning Memory barriers not defined on this system or system unknown # warning For SMP safety, you should fix this. # define GVL_FULL_SYNC() # define GVL_READ_SYNC() # define GVL_WRITE_SYNC() # else # error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed. # endif #endif #endif // UUID_54B4E13DC6CC41B073E60A941244DFBB lierolibre-0.5/src/gvl/system/mutex.c000066400000000000000000000036241205125547100177260ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "mutex.hpp" #include "windows.hpp" void gvl_mutex_init(gvl_mutex* self) { #if GVL_WINDOWS self->handle = CreateEvent(NULL, FALSE, TRUE, NULL); #endif } void gvl_mutex_lock(gvl_mutex* self) { #if GVL_WINDOWS while(WaitForSingleObjectEx(self->handle, INFINITE, TRUE) != WAIT_OBJECT_0) /* Nothing */; #endif } void gvl_mutex_unlock(gvl_mutex* self) { #if GVL_WINDOWS SetEvent(self->handle); #endif } void gvl_mutex_destroy(gvl_mutex* self) { #if GVL_WINDOWS CloseHandle(self->handle); #endif } lierolibre-0.5/src/gvl/system/mutex.hpp000066400000000000000000000035751205125547100203000ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_84A118B9780C45F80DE92E8BEE587EA6 #define UUID_84A118B9780C45F80DE92E8BEE587EA6 #include "../support/platform.hpp" #ifdef __cplusplus extern "C" { #endif typedef struct gvl_mutex_ { #if GVL_WINDOWS void* handle; #else #endif } gvl_mutex; void gvl_mutex_init(gvl_mutex* self); void gvl_mutex_lock(gvl_mutex* self); void gvl_mutex_unlock(gvl_mutex* self); void gvl_mutex_destroy(gvl_mutex* self); #ifdef __cplusplus } #endif #endif // UUID_84A118B9780C45F80DE92E8BEE587EA6 lierolibre-0.5/src/gvl/system/system.c000066400000000000000000000066051205125547100201120ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "system.hpp" #include "../support/platform.hpp" //#include #include "stdio.h" #include "stdlib.h" #if GVL_WIN32 || GVL_WIN64 #include #include #ifdef _MSC_VER #pragma comment(lib, "winmm.lib") #pragma comment(lib, "kernel32.lib") #endif uint32_t gvl_get_ticks() { static int setup = 0; if(!setup) { TIMECAPS caps; setup = 1; if(timeGetDevCaps(&caps, sizeof(caps)) == TIMERR_NOERROR) { timeBeginPeriod(min(max(caps.wPeriodMin, 1), caps.wPeriodMax)); } } return (uint32_t)(timeGetTime()); } uint64_t gvl_get_hires_ticks() { LARGE_INTEGER res; QueryPerformanceCounter(&res); return (uint64_t)res.QuadPart; } uint64_t gvl_hires_ticks_per_sec() { LARGE_INTEGER res; QueryPerformanceFrequency(&res); return (uint64_t)res.QuadPart; } void gvl_sleep(uint32_t ms) { Sleep((DWORD)ms); } #else // !(GVL_WIN32 || GVL_WIN64) #include #if defined(_POSIX_MONOTONIC_CLOCK) #include uint32_t gvl_get_ticks() { struct timespec t; int ret = clock_gettime(CLOCK_MONOTONIC, &t); if(ret < 0) { fprintf(stderr, "clock_gettime failed"); exit(1); } return t.tv_sec * 1000 + t.tv_nsec / 1000000; } uint64_t gvl_get_hires_ticks() { struct timespec t; int ret = clock_gettime(CLOCK_MONOTONIC, &t); if(ret < 0) { fprintf(stderr, "clock_gettime failed"); exit(1); } return t.tv_sec * (uint64_t)(1000000000ull) + t.tv_nsec; } uint64_t gvl_hires_ticks_per_sec() { return (uint64_t)(1000000000ull); } #else // !defined(_POSIX_MONOTONIC_CLOCK) uint32_t gvl_get_ticks() { //passert(false, "STUB"); return 0; } #endif // !defined(_POSIX_MONOTONIC_CLOCK) #if GVL_LINUX #include #include void gvl_sleep(uint32_t ms) { struct timespec t, left; t.tv_sec = ms / 1000; t.tv_nsec = (ms % 1000) * 1000000; while(nanosleep(&t, &left) == -1 && errno == EINTR) { t = left; } } #else // !GVL_LINUX void gvl_sleep(uint32_t) { //passert(false, "STUB"); } #endif // !GVL_LINUX #endif // !(GVL_WIN32 || GVL_WIN64) lierolibre-0.5/src/gvl/system/system.hpp000066400000000000000000000050461205125547100204550ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_A0E64B040F4F41B4EC933B89A48C42C7 #define UUID_A0E64B040F4F41B4EC933B89A48C42C7 #include "../support/cstdint.hpp" /* NOTE: Keep this usable from C */ #ifdef __cplusplus extern "C" { #endif // A timer incrementing once per millisecond uint32_t gvl_get_ticks(); // A timer with higher precision, incrementing hires_ticks_per_sec() ticks // per second. // NOTE: The precision isn't necessarily hires_ticks_per_sec() // per second. uint64_t gvl_get_hires_ticks(); uint64_t gvl_hires_ticks_per_sec(); void gvl_sleep(uint32_t ms); #ifdef __cplusplus } // extern "C" #endif #ifdef __cplusplus namespace gvl { // A timer incrementing once per millisecond GVL_INLINE uint32_t get_ticks() { return gvl_get_ticks(); } // A timer with higher precision, incrementing hires_ticks_per_sec() ticks // per second. // NOTE: The precision isn't necessarily hires_ticks_per_sec() // per second. GVL_INLINE uint64_t get_hires_ticks() { return gvl_get_hires_ticks(); } GVL_INLINE uint64_t hires_ticks_per_sec() { return gvl_hires_ticks_per_sec(); } GVL_INLINE void sleep(uint32_t ms) { return gvl_sleep(ms); } } #endif #endif // UUID_A0E64B040F4F41B4EC933B89A48C42C7 lierolibre-0.5/src/gvl/system/windows.hpp000066400000000000000000000036731205125547100206270ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_DD46BBAEDAEE4CE00CF509AB923A7B46 #define UUID_DD46BBAEDAEE4CE00CF509AB923A7B46 #include "../support/platform.hpp" #if GVL_WINDOWS #undef NOMINMAX #define NOMINMAX #undef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #undef NONAMELESSUNION #define NONAMELESSUNION #undef NOKERNEL #define NOKERNEL #undef NONLS #define NONLS #ifndef _WIN32_WINDOWS #if GVL_WIN32 #define _WIN32_WINDOWS 0x0410 #endif #endif #ifndef WINVER #define WINVER 0x0410 #endif #include #endif #endif // UUID_DD46BBAEDAEE4CE00CF509AB923A7B46 lierolibre-0.5/src/gvl/test/000077500000000000000000000000001205125547100160465ustar00rootroot00000000000000lierolibre-0.5/src/gvl/test/gvl_tests.cpp000066400000000000000000000027001205125547100205630ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "test.hpp" GVLTEST_DEF_CONTEXT(gvl)lierolibre-0.5/src/gvl/test/gvl_tests.hpp000066400000000000000000000036011205125547100205710ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_A6DF7CEFC1114240766A11A03D4158A6 #define UUID_A6DF7CEFC1114240766A11A03D4158A6 #include "test.hpp" GVLTEST_DECL_CONTEXT(gvl) GVLTEST_REG_SUITE(gvl, deque) GVLTEST_REG_SUITE(gvl, list) GVLTEST_REG_SUITE(gvl, pairing_heap) GVLTEST_REG_SUITE(gvl, treap) GVLTEST_REG_SUITE(gvl, hash_set_new) GVLTEST_REG_SUITE(gvl, bitstream) GVLTEST_REG_SUITE(gvl, stream) GVLTEST_REG_SUITE(gvl, reproducible_floats) GVLTEST_REG_SUITE(gvl, bits) #endif // UUID_A6DF7CEFC1114240766A11A03D4158A6 lierolibre-0.5/src/gvl/test/test.hpp000066400000000000000000000163461205125547100175500ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_A034FAE8950C4164C75E3B8BEDA507CC #define UUID_A034FAE8950C4164C75E3B8BEDA507CC #include "../list.hpp" #include "../io/iostream.hpp" #include "../io/encoding_compat.hpp" #include #include namespace gvl { struct test_case_instance; struct test_context; //test_context& test_context_singleton(); struct test_case : gvl::list_node<> { test_case(std::string const& suite_name, test_context& (*get_context_init)()) : get_context(get_context_init) { register_(suite_name); } inline void register_(std::string const& suite_name); virtual void run(test_case_instance& _test_case_instance) = 0; test_context& (*get_context)(); }; struct test_case_instance { enum { failed = (1<<0), warning = (1<<1) }; test_case_instance(test_case* tc_init) : flags(0) , tc(tc_init) , failures_until_mute(30) { } bool should_report() const { return failures_until_mute > 0; } void mark_failed() { flags |= failed; --failures_until_mute; } void mark_warning() { flags |= warning; } int flags; test_case* tc; int failures_until_mute; }; struct test_suite_instance { test_suite_instance() : flags(0) , failures(0) , successes(0) { } int total() const { return failures + successes; } int flags; int failures; int successes; }; struct test_run_instance { test_run_instance() : failures(0) { } int failures; }; struct test_suite { test_suite(std::string const& name) : name(name) { } void register_(test_case* test) { tests.push_back(test); } void run_all(test_suite_instance& suite_instance); std::size_t size() const { return tests.size(); } std::string name; gvl::weak_list tests; }; struct test_context { typedef std::map test_suite_map_t; test_suite_map_t suites; test_context() : dout(cout()) { } std::size_t test_case_count() const { std::size_t count = 0; for(auto it = suites.begin(); it != suites.end(); ++it) { count += it->second->size(); } return count; } inline test_suite& test_context::get_test_suite(std::string const& name); inline void run_all_suites(); octet_stream_writer& dout; }; inline void test_suite::run_all(test_suite_instance& suite_instance) { weak_list::iterator i = tests.begin(); for(; i != tests.end(); ++i) { gvl::test_case_instance instance(&*i); i->run(instance); suite_instance.flags |= instance.flags; if(instance.flags & test_case_instance::failed) ++suite_instance.failures; else ++suite_instance.successes; } } inline test_suite& test_context::get_test_suite(std::string const& name) { test_suite*& s = suites[name]; if(!s) s = new test_suite(name); return *s; } inline void test_context::run_all_suites() { test_context::test_suite_map_t::iterator i = this->suites.begin(); octet_stream_writer& dout = this->dout; test_run_instance run_instance; dout << "@(TESTS " << this->test_case_count() << ")\n"; dout.flush(); for(; i != this->suites.end(); ++i) { test_suite_instance instance; i->second->run_all(instance); dout << "@(SUITE " << i->second->name << "): "; dout << instance.successes << "/" << instance.total() << "\n"; dout.flush(); if(instance.failures > 0) ++run_instance.failures; } } inline void test_case::register_(std::string const& suite_name) { get_context().get_test_suite(suite_name).register_(this); } #define GVLTEST_DEF_CONTEXT(context) \ namespace gvl { ::gvl::test_context& test_context_##context() { \ static test_context x; \ return x; \ } } #define GVLTEST_DECL_CONTEXT(context) \ namespace gvl { ::gvl::test_context& test_context_##context(); } #define GVLTEST_CONTEXT(context) (::gvl::test_context_##context()) #define GVLTEST_SUITE(context, suite) \ GVLTEST_DECL_CONTEXT(context) \ namespace gvl { \ int _test_suite_reg##context##suite() { return 0; } } #define GVLTEST_REG_SUITE(context, suite) \ GVLTEST_DECL_CONTEXT(context) \ namespace gvl { int _test_suite_reg##context##suite(); } \ static int _dummy_##context##suite = ::gvl::_test_suite_reg##context##suite(); #define GVLTEST(context, suite, name) \ struct test_##context##suite##_##name : ::gvl::test_case { \ test_##context##suite##_##name( \ std::string const& suite_name, \ ::gvl::test_context& (*get_context)()) : ::gvl::test_case(suite_name, get_context) \ { } \ void run(::gvl::test_case_instance&); \ } instance_##context##suite##_##name(#suite, \ ::gvl::test_context_##context); \ void test_##context##suite##_##name::run(::gvl::test_case_instance& _test_case_instance) template void test_assert_equal( test_case_instance& self, char const* msg, TA const& a, TB const& b, char const* astr, char const* bstr, char const* file, int line) { if(a != b) { if(self.should_report()) { gvl::octet_stream_writer& dout = self.tc->get_context().dout; dout << file << '(' << line << "): (" << astr << ") != (" << bstr << "), " << msg << '\n'; dout << "\t" << astr << " == " << a << "\n"; dout << "\t" << bstr << " == " << b << "\n"; } self.mark_failed(); } } inline void test_assert_failed( test_case_instance& self, char const* msg, char const* condstr, char const* file, int line) { if(self.should_report()) { gvl::octet_stream_writer& dout = self.tc->get_context().dout; dout << file << '(' << line << "): !(" << condstr << "), " << msg << '\n'; } self.mark_failed(); } #define GVLTEST_EQUAL(a, b) ::gvl::test_assert_equal(_test_case_instance, "assert failed", (a), (b), #a, #b, __FILE__, __LINE__) #define GVLTEST_EQUALM(m, a, b) ::gvl::test_assert_equal(_test_case_instance, (m), (a), (b), #a, #b, __FILE__, __LINE__) #define GVLTEST_ASSERT(m, cond) if(!(cond)) ::gvl::test_assert_failed(_test_case_instance, (m), #cond, __FILE__, __LINE__); else (void)0 #if !GVLTEST_NOABBREV #define ASSERT GVLTEST_ASSERT #define ASSERTEQ GVLTEST_EQUAL #define ASSERTEQM GVLTEST_EQUALM #endif } #endif // UUID_A034FAE8950C4164C75E3B8BEDA507CC lierolibre-0.5/src/gvl/text/000077500000000000000000000000001205125547100160535ustar00rootroot00000000000000lierolibre-0.5/src/gvl/text/utf8.hpp000066400000000000000000000134251205125547100174570ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_A91D620921B84FAFD328BABED6AA9CF2 #define UUID_A91D620921B84FAFD328BABED6AA9CF2 #include "../support/cstdint.hpp" #include "../support/debug.hpp" namespace gvl { namespace utf8 { uint32_t const invalid_codepoint = uint32_t(-1); // Length of a character starting with byte 'start'. // NOTE: This assumes the byte is a valid first byte of // a character in UTF8. Return value is undefined in // all other cases. inline int unsafe_char_length(uint8_t start) { int high_nibble_2x = (start >> 4) << 1; // nibble 0x0-0x7 -> 1 // nibble 0xc-0xd -> 2 // nibble 0xe -> 3 // nibble 0xf -> 4 return ((0xe5550000 >> high_nibble_2x) & 3) + 1; } inline bool is_middle_byte(uint8_t b) { return (b & 0xc0) == 0x80; } template inline uint32_t unsafe_decode(Range& range) { uint32_t A = range.front(); range.pop_front(); if(A < 0x80) { return A; // ASCII } #ifndef NDEBUG else if(A < 0xc2) { // Middle bytes or overlong 2-byte sequences passert(false, "Invalid sequence"); } #endif else if(A < 0xe0) { // 2-byte sequence uint32_t B = range.front(); range.pop_front(); passert(is_middle_byte(B), "Expected middle byte"); return ((A & 0x1f) << 6) | (B & 0x3f); } else if(A < 0xf0) { // 3-byte sequence uint32_t B = range.front(); range.pop_front(); uint32_t C = range.front(); range.pop_front(); passert(is_middle_byte(B), "Expected middle byte"); passert(is_middle_byte(C), "Expected middle byte"); return ((A & 0xf) << 12) | ((B & 0x3f) << 6) | (C & 0x3f); } else if(A < 0xf5) { // 4-byte sequence uint32_t B = range.front(); range.pop_front(); uint32_t C = range.front(); range.pop_front(); uint32_t D = range.front(); range.pop_front(); passert(is_middle_byte(B), "Expected middle byte"); passert(is_middle_byte(C), "Expected middle byte"); passert(is_middle_byte(D), "Expected middle byte"); return ((A & 0x7) << 18) | ((B & 0x3f) << 12) | ((C & 0x3f) << 6) | (C & 0x3f); } else passert(false, "Invalid sequence"); return '?'; } inline uint32_t is_illegal_codepoint(uint32_t v) { if((v > 0xD7FF && v < 0xE000) || v > 0x10FFFF) return true; return false; } template uint32_t decode(Range& range, uint32_t illegal_replacement = invalid_codepoint) { uint32_t A = range.front(); range.pop_front(); Range invalid_range = range; // Invalid characters consume one byte if(A < 0x80) { return A; } else if(A < 0xc2) { goto invalid; } else if(A < 0xe0) { // 2-byte sequence if(range.empty()) goto invalid; uint32_t B = range.front(); range.pop_front(); if(!is_middle_byte(B)) goto invalid; uint32_t v = ((A & 0x1f) << 6) | (B & 0x3f); if(v < 0x80 || is_illegal_codepoint(v)) goto invalid; // Overlong form or illegal return v; } else if(A < 0xf0) { // 3-byte sequence if(range.empty()) goto invalid; uint32_t B = range.front(); range.pop_front(); if(!is_middle_byte(B) || range.empty()) goto invalid; uint32_t C = range.front(); range.pop_front(); if(!is_middle_byte(C)) goto invalid; uint32_t v = ((A & 0xf) << 12) | ((B & 0x3f) << 6) | (C & 0x3f); if(v < 0x800 || is_illegal_codepoint(v)) goto invalid; // Overlong form or illegal return v; } else if(A < 0xf5) { // 4-byte sequence if(range.empty()) goto invalid; uint32_t B = range.front(); range.pop_front(); if(!is_middle_byte(B) || range.empty()) goto invalid; uint32_t C = range.front(); range.pop_front(); if(!is_middle_byte(C) || range.empty()) goto invalid; uint32_t D = range.front(); range.pop_front(); if(!is_middle_byte(D)) goto invalid; uint32_t v = ((A & 0x7) << 18) | ((B & 0x3f) << 12) | ((C & 0x3f) << 6) | (C & 0x3f); if(v < 0x10000 || is_illegal_codepoint(v)) goto invalid; // Overlong form or illegal return v; } invalid: range = invalid_range; return invalid_codepoint; } template void encode(Range& range, uint32_t cp) { if(cp < 0x80) range.put(cp); else if(cp < 0x800) { range.put(0xc0 | (cp >> 6)); range.put(0x80 | (cp & 0x3f)); } else if(cp < 0x10000) { range.put(0xe0 | (cp >> 12)); range.put(0x80 | ((cp >> 6) & 0x3f)); range.put(0x80 | (cp & 0x3f)); } else { range.put(0xf0 | (cp >> 18)); range.put(0x80 | ((cp >> 12) & 0x3f)); range.put(0x80 | ((cp >> 6) & 0x3f)); range.put(0x80 | (cp & 0x3f)); } } void normalize(std::string& str) { } } // namespace utf8 } // namespace gvl #endif // UUID_A91D620921B84FAFD328BABED6AA9CF2 lierolibre-0.5/src/gvl/text/util.cpp000066400000000000000000000033061205125547100175360ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "util.hpp" #include namespace gvl { void trim(std::string& str) { std::size_t b = 0; while(b < str.size() && std::isspace((unsigned char)str[b])) ++b; std::size_t e = str.size(); while(b < e && std::isspace((unsigned char)str[e - 1])) --e; str = str.substr(b, e - b); } } lierolibre-0.5/src/gvl/text/util.hpp000066400000000000000000000031451205125547100175440ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_82FEB5F5FFC64C227EFC26BEE5A61CB7 #define UUID_82FEB5F5FFC64C227EFC26BEE5A61CB7 #include namespace gvl { void trim(std::string& str); } #endif // UUID_82FEB5F5FFC64C227EFC26BEE5A61CB7 lierolibre-0.5/src/gvl/trees/000077500000000000000000000000001205125547100162115ustar00rootroot00000000000000lierolibre-0.5/src/gvl/trees/node_base.hpp000066400000000000000000000125751205125547100206530ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_B9454E4FCDB24701FB429EA10A6553B5 #define UUID_B9454E4FCDB24701FB429EA10A6553B5 #include "../support/debug.hpp" namespace gvl { struct tree_node_multiway_common { private: typedef tree_node_multiway_common this_t; public: tree_node_multiway_common() : prev(0) , first_child(0) , next_sibling(0) { } this_t* prev; this_t* first_child; this_t* next_sibling; bool is_first_child() { return prev->first_child == this; } bool is_root() { return !prev; } void unlink() { if(prev) update_prev(next_sibling); if(next_sibling) next_sibling->prev = prev; } void unlink_nonroot() { sassert(prev); update_prev(next_sibling); if(next_sibling) next_sibling->prev = prev; } void insert_before(this_t* n) { next_sibling = n; prev = n->prev; if(prev) n->update_prev(this); n->prev = this; } void insert_before_nonroot(this_t* n) { next_sibling = n; prev = n->prev; sassert(prev); n->update_prev(this); n->prev = this; } void insert_after(this_t* n) { next_sibling = n->next_sibling; prev = n; n->next_sibling->prev = this; n->next_sibling = this; } void insert_as_child(this_t* n) { prev = n; this_t* ch = n->first_child; next_sibling = ch; if(ch) ch->prev = this; n->first_child = this; } private: void update_prev(this_t* n) { sassert(prev); if(is_first_child()) prev->first_child = n; else prev->next_sibling = n; } }; template struct tree_node_multiway : tree_node_multiway_common { private: typedef tree_node_multiway_common base_t; typedef DerivedT this_t; public: void insert_before(this_t* n) { base_t::insert_before(n); } void insert_before_nonroot(this_t* n) { base_t::insert_before(n); } void insert_after(this_t* n) { base_t::insert_after(n); } void insert_as_child(this_t* n) { base_t::insert_as_child(n); } DerivedT* child() { return static_cast(first_child); } DerivedT* next() { return static_cast(next_sibling); } }; // Same as tree_node_multiway_common, but without ability // to iterate backwards (to previous siblings or parent). // Should be slightly faster. struct tree_node_multiway_forward_common { private: typedef tree_node_multiway_forward_common this_t; public: this_t** prev_next; this_t* first_child; this_t* next_sibling; bool is_root() { return !prev_next; } void unlink() { if(next_sibling) next_sibling->prev_next = prev_next; if(prev_next) *prev_next = next_sibling; } void unlink_nonroot() { sassert(prev_next); if(next_sibling) next_sibling->prev_next = prev_next; *prev_next = next_sibling; } void insert_before(this_t* n) { next_sibling = n; prev_next = n->prev_next; if(prev_next) *prev_next = this; n->prev_next = &next_sibling; } void insert_before_nonroot(this_t* n) { next_sibling = n; prev_next = n->prev_next; sassert(prev_next); *prev_next = this; n->prev_next = &next_sibling; } void insert_after(this_t* n) { next_sibling = n->next_sibling; prev_next = &n->next_sibling; if(n->next_sibling) n->next_sibling->prev_next = &next_sibling; n->next_sibling = this; } void insert_as_child(this_t* n) { prev_next = &n->first_child; this_t* ch = n->first_child; next_sibling = ch; if(ch) ch->prev_next = &next_sibling; n->first_child = this; } }; template struct tree_node_multiway_forward : tree_node_multiway_forward_common { private: typedef tree_node_multiway_forward_common base_t; typedef DerivedT this_t; public: void insert_before(this_t* n) { base_t::insert_before(n); } void insert_before_nonroot(this_t* n) { base_t::insert_before_nonroot(n); } void insert_after(this_t* n) { base_t::insert_after(n); } void insert_as_child(this_t* n) { base_t::insert_as_child(n); } }; template struct tree_node_binary { private: typedef tree_node_binary this_t; public: DerivedT* left; DerivedT* right; }; } // namespace gvl #endif // UUID_B9454E4FCDB24701FB429EA10A6553B5 lierolibre-0.5/src/gvl/tut/000077500000000000000000000000001205125547100157035ustar00rootroot00000000000000lierolibre-0.5/src/gvl/tut/quickcheck/000077500000000000000000000000001205125547100200155ustar00rootroot00000000000000lierolibre-0.5/src/gvl/tut/quickcheck/context.cpp000066400000000000000000000030201205125547100222000ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "context.hpp" namespace gvl { namespace qc { context* context::current = 0; } // namespace qc } // namespace gvl lierolibre-0.5/src/gvl/tut/quickcheck/context.hpp000066400000000000000000000115411205125547100222140ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_TUT_QUICKCHECK_CONTEXT_HPP #define GVL_TUT_QUICKCHECK_CONTEXT_HPP #include "../../support/type_info.hpp" #include "../../resman/shared_ptr.hpp" #include "../../math/cmwc.hpp" #include "generator.hpp" #include #include #include namespace gvl { namespace qc { struct generator_set { generator_set() : total_weight(0.0) { } typedef std::map generator_map; base_generator* operator[](std::string const& name) { return m[name]; } template void add(std::string const& name, generator* g, double set_weight = 1.0) { g->weight = set_weight; if(!m.insert(std::make_pair(name, g)).second) throw std::runtime_error("A generator with this name is already present"); total_weight += g->weight; } template void add_reusable(shared_ptr_any obj) { // TODO: Need static_cast for shared_ptr_any to // do this (maybe). We could make type-specific // generator_sets too. } generator_map& all() { return m; } generator_map m; double total_weight; }; struct context { static context* current; context() : generator_depth_(0) , assert_fails_(0) { } template void add(std::string const& name, generator* g, double set_weight = 1.0) { generator_set& m = generators[gvl::type_id()]; m.add(name, g, set_weight); } template generator& get_generator(std::string const& name) { generator_set& m = generators[gvl::type_id()]; generator_set::generator_map::iterator i = m.all().find(name); if(i == m.all().end()) throw std::runtime_error("A generator with this name does not exist"); generator& p = *static_cast*>(i->second); return p; } template shared_ptr_any generate_any() { generator_set& m = generators[gvl::type_id()]; if(m.all().empty()) throw std::runtime_error("There are no generators for this type"); double n = rand.get_double(m.total_weight); generator_set::generator_map::iterator i = m.all().begin(); for(; i != m.all().end(); ++i) { double weight = i->second->weight; if(n < weight) break; n -= weight; } if(i == m.all().end()) throw std::runtime_error("Failed roulette-wheel selection"); ++generator_depth_; shared_ptr_any p(static_cast*>(i->second)->gen_t(*this)); --generator_depth_; return p; } template shared_ptr_any generate(std::string const& name) { ++generator_depth_; shared_ptr_any p(get_generator(name).gen_t(*this)); --generator_depth_; return p; } template void add_reusable(shared_ptr_any obj) { generator_set& m = generators[gvl::type_id()]; m.add_reusable(obj); } int generator_depth() const { return generator_depth_; } bool assert_fail(char const* cond, char const* file, int line, char const* desc) { ++assert_fails_; return false; } void reset_assert_fails() { assert_fails_ = 0;} int get_assert_fails() const { return assert_fails_; } std::map generators; gvl::mwc rand; int generator_depth_; int assert_fails_; }; #define QC_ASSERT(desc, cond) if(!(cond)) \ { if(!ctx.assert_fail(#cond, __FILE__, __LINE__, desc)) return ::gvl::qc::chk_fail; } else (void)0 #define QC_FATAL_ASSERT(desc, cond) if(!(cond)) \ { ctx.assert_fail(#cond, __FILE__, __LINE__, desc); return ::gvl::qc::chk_fail; } else (void)0 } // namespace qc } // namespace gvl #endif // GVL_TUT_QUICKCHECK_CONTEXT_HPP lierolibre-0.5/src/gvl/tut/quickcheck/generator.hpp000066400000000000000000000044071205125547100225210ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_TUT_QUICKCHECK_GENERATOR_HPP #define GVL_TUT_QUICKCHECK_GENERATOR_HPP #include #include namespace gvl { namespace qc { struct context; struct base_generator { base_generator(double weight = 1.0) : weight(weight) { } //virtual void* gen(context& ctx) = 0; double weight; }; template struct generator : base_generator { generator(double weight = 1.0) : base_generator(weight) { } //void* gen(context& ctx) { return gen_t(ctx); } virtual shared_ptr_any gen_t(context& ctx) = 0; }; #define QC_GEN_COMMON(type) \ typedef type t; \ typedef gvl::shared_ptr_any ptr_t; \ #define QC_BEGIN_GEN(name, type) \ struct name : gvl::qc::generator { \ QC_GEN_COMMON(type) \ ptr_t gen_t(gvl::qc::context& ctx) { #define QC_END_GEN() } }; } // namespace qc } // namespace gvl #endif // GVL_TUT_QUICKCHECK_GENERATOR_HPP lierolibre-0.5/src/gvl/tut/quickcheck/property.hpp000066400000000000000000000105761205125547100224230ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef GVL_TUT_QUICKCHECK_PROPERTY_HPP #define GVL_TUT_QUICKCHECK_PROPERTY_HPP #include "generator.hpp" #include "context.hpp" #include #include #include "../../io/iostream.hpp" namespace gvl { namespace qc { enum chk_result { chk_ok, // Checked out chk_ok_reuse, // Checked out, and passed object can be reused chk_fail, // Check failed chk_not_applicable // Check is not applicable to the generated objects }; template struct property { virtual shared_ptr_any generate(context& ctx) { return ctx.generate_any(); } virtual chk_result do_check(context&) = 0; bool run(context& ctx, int max_generated, int max_tested) { int tests_ran = 0; int generated = 0; context::current = &ctx; for(generated = 0; generated < max_generated; ) { ++generated; ctx.reset_assert_fails(); chk_result res = do_check(ctx); if(res != chk_not_applicable) { ++tests_ran; if(res == chk_fail || ctx.get_assert_fails() > 0) { gvl::cout() << "Property failed on test " << tests_ran << gvl::endl; return false; } if(res == chk_ok_reuse) { } if(tests_ran >= max_tested) break; } } context::current = 0; return true; } }; template bool test_property(context& ctx, int max_generated = 200, int max_tested = 100) { Prop prop; return prop.run(ctx, max_generated, max_tested); } // VC++ 2008 has a bug where default values that call a template // function in a different namespace with explicit template parameters // are rejected. We pass a cast zero-pointer instead of explicit template // parameters. template static gvl::shared_ptr_any cur_generate_any(T* = 0) { return gvl::qc::context::current->generate_any(); } template static gvl::shared_ptr_any cur_generate(std::string const& name, T* = 0) { return gvl::qc::context::current->generate(name); } #define QC_BEGIN_PROP(name, type) \ struct name : gvl::qc::property { \ typedef type t; \ typedef gvl::shared_ptr_any ptr_t; \ virtual gvl::qc::chk_result do_check(gvl::qc::context& ctx) \ { return check(ctx); } #define QC_END_PROP() }; #define QC_BEGIN_GENERIC_PROP(name) \ template \ struct name : gvl::qc::property { \ typedef T_ t; \ typedef gvl::shared_ptr_any ptr_t; \ virtual gvl::qc::chk_result do_check(gvl::qc::context& ctx) \ { return check(ctx); } #define QC_CUR_CTX (*gvl::qc::context::current) #if 0 #define QC_GEN(type, name, g) gvl::shared_ptr_any name = gvl::qc::cur_generate(g, (type*)0) #define QC_GEN_ANY(type, name) gvl::shared_ptr_any name = gvl::qc::cur_generate_any((type*)0) #else #define QC_GEN(type, name, g) gvl::shared_ptr_any name = QC_CUR_CTX.generate(g) #define QC_GEN_ANY(type, name) gvl::shared_ptr_any name = QC_CUR_CTX.generate_any() #endif } // namespace qc } // namespace gvl #endif // GVL_TUT_QUICKCHECK_PROPERTY_HPP lierolibre-0.5/src/gvl/tut/quickcheck/quickcheck.hpp000066400000000000000000000031511205125547100226400ustar00rootroot00000000000000/* * Copyright (c) 2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_DA2F4D54C6844F7CA40FDE8C930F2DFB #define UUID_DA2F4D54C6844F7CA40FDE8C930F2DFB #include "context.hpp" #include "generator.hpp" #include "property.hpp" #endif // UUID_DA2F4D54C6844F7CA40FDE8C930F2DFB lierolibre-0.5/src/keys.cpp000066400000000000000000000113061205125547100157570ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #if SDL13 #include #define SDLK_EQUALS '=' #define SDLK_LEFTBRACKET '[' #define SDLK_RIGHTBRACKET ']' #define SDLK_SEMICOLON ';' #define SDLK_BACKSLASH '\\' #define SDLK_COMMA ',' #define SDLK_PERIOD '.' #define SDLK_SLASH '/' #endif #include #include #include //int SDLToDOSScanCodes[SDLK_LAST] = {}; std::map SDLToDOSScanCodes; SDLKey const Z = SDLK_UNKNOWN; SDLKey lieroToSDLKeys[] = { SDLK_UNKNOWN,SDLK_ESCAPE, SDLK_1,SDLK_2,SDLK_3,SDLK_4,SDLK_5,SDLK_6,SDLK_7,SDLK_8,SDLK_9,SDLK_0, /* 0x0c: */ SDLK_MINUS,SDLK_EQUALS,SDLK_BACKSPACE,SDLK_TAB, SDLK_q,SDLK_w,SDLK_e,SDLK_r,SDLK_t,SDLK_y,SDLK_u,SDLK_i,SDLK_o,SDLK_p, SDLK_LEFTBRACKET,SDLK_RIGHTBRACKET,SDLK_RETURN,SDLK_LCTRL, SDLK_a,SDLK_s,SDLK_d,SDLK_f,SDLK_g,SDLK_h,SDLK_j,SDLK_k,SDLK_l, SDLK_SEMICOLON,SDLK_QUOTE,SDLK_BACKQUOTE,SDLK_LSHIFT,SDLK_BACKSLASH, SDLK_z,SDLK_x,SDLK_c,SDLK_v,SDLK_b,SDLK_n,SDLK_m, /* 0x33: */ SDLK_COMMA,SDLK_PERIOD,SDLK_SLASH,SDLK_RSHIFT,SDLK_KP_MULTIPLY, SDLK_LALT,SDLK_SPACE,SDLK_CAPSLOCK, SDLK_F1,SDLK_F2,SDLK_F3,SDLK_F4,SDLK_F5,SDLK_F6,SDLK_F7,SDLK_F8,SDLK_F9,SDLK_F10, /* 0x45: */ SDLK_NUMLOCK,SDLK_SCROLLOCK, SDLK_KP7,SDLK_KP8,SDLK_KP9,SDLK_KP_MINUS,SDLK_KP4,SDLK_KP5,SDLK_KP6,SDLK_KP_PLUS, SDLK_KP1,SDLK_KP2,SDLK_KP3,SDLK_KP0,SDLK_KP_PERIOD, SDLK_UNKNOWN,SDLK_UNKNOWN, SDLK_LESS,SDLK_F11,SDLK_F12, /* Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z, Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z, Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z, Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z*/ Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z, // 27 zeroes SDLK_KP_ENTER, // Enter (Pad) SDLK_RCTRL, // Right Ctrl Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, // 12 zeroes Z, // Print Screen TODO: Where is print screen? Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, // 10 zeroes SDLK_KP_DIVIDE, // / (Pad) Z, Z, // Print Screen TODO: Where is print screen? SDLK_RALT, // Right Alt Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, // 14 zeroes SDLK_HOME, // Home SDLK_UP, // Up SDLK_PAGEUP, // Page Up Z, SDLK_LEFT, // Left Z, SDLK_RIGHT, // Right Z, SDLK_END, // End SDLK_DOWN, // Down SDLK_PAGEDOWN, // Page Down SDLK_INSERT, // Insert SDLK_DELETE, // Delete Z, Z, Z, Z, Z // 5 zeroes }; Uint32 const maxScanCodes = sizeof(lieroToSDLKeys) / sizeof(*lieroToSDLKeys); void initKeys() { /* for(std::size_t i = 0; i < sizeof(SDLToDOSScanCodes) / sizeof(*SDLToDOSScanCodes); ++i) { SDLToDOSScanCodes[i] = 89; }*/ for(std::size_t i = 0; i < maxScanCodes; ++i) { if(lieroToSDLKeys[i] != SDLK_UNKNOWN) { SDLToDOSScanCodes[lieroToSDLKeys[i]] = int(i); } } } // Adapted from DOSBOX #if 0 SDLKey DOSToSDLKey(Uint32 scan) { if(scan < maxScanCodes) return lieroToSDLKeys[scan]; else return SDLK_UNKNOWN; } #endif Uint32 SDLToDOSKey(SDLKey key) { std::map::iterator i = SDLToDOSScanCodes.find(Uint32(key)); if(i != SDLToDOSScanCodes.end()) return i->second; if(key == 313) return 144; // RALT falls outside of map on *nix, special-cased for now return 89; } Uint32 SDLToDOSKey(SDL_keysym const& keysym) { Uint32 key = SDLToDOSKey(keysym.sym); if(key >= 177) // Liero doesn't have keys >= 177 return 89; // Arbitrarily translate it to 89 return key; } lierolibre-0.5/src/keys.hpp000066400000000000000000000042141205125547100157640ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_96141CB1E20547016970B28195515A14 #define UUID_96141CB1E20547016970B28195515A14 #include //extern int SDLToLieroKeys[SDLK_LAST]; //extern int lieroToSDLKeys[177]; void initKeys(); Uint32 SDLToDOSKey(SDL_keysym const& keysym); Uint32 SDLToDOSKey(SDLKey key); SDLKey DOSToSDLKey(Uint32 scan); int const DkEscape = 1; int const MaxJoyButtons = 32; uint32_t const MaxDOSKey = 177; uint32_t const JoyKeysStart = 512; inline uint32_t joyButtonToExKey( int joyNum, int joyButton ) { return JoyKeysStart + MaxJoyButtons * joyNum + joyButton; } inline bool isExtendedKey( uint32_t k ) { return k >= MaxDOSKey; } const int JoyAxisThreshold = 10000; #endif // UUID_96141CB1E20547016970B28195515A14 lierolibre-0.5/src/level.cpp000066400000000000000000000166541205125547100161260ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "level.hpp" #include "game.hpp" #include "gfx.hpp" #include "gfx/color.hpp" #include "filesystem.hpp" #include "reader.hpp" // TODO: For lieroEXERoot. We should move that into Common. #include void Level::generateDirtPattern(Common& common, Rand& rand) { width = 504; height = 350; data.resize(width * height); pixel(0, 0) = rand(7) + 12; for(int y = 1; y < height; ++y) pixel(0, y) = ((rand(7) + 12) + pixel(0, y - 1)) >> 1; for(int x = 1; x < width; ++x) pixel(x, 0) = ((rand(7) + 12) + pixel(x - 1, 0)) >> 1; for(int y = 1; y < height; ++y) for(int x = 1; x < width; ++x) { pixel(x, y) = (pixel(x - 1, y) + pixel(x, y - 1) + rand(8) + 12) / 3; } // TODO: Optimize the following int count = rand(100); for(int i = 0; i < count; ++i) { int x = rand(width) - 8; int y = rand(height) - 8; int temp = rand(4) + 69; PalIdx* image = common.largeSprites.spritePtr(temp); for(int cy = 0; cy < 16; ++cy) { int my = cy + y; if(my >= height) break; if(my < 0) continue; for(int cx = 0; cx < 16; ++cx) { int mx = cx + x; if(mx >= width) break; if(mx < 0) continue; PalIdx srcPix = image[(cy << 4) + cx]; if(srcPix > 0) { PalIdx& pix = pixel(mx, my); if(pix > 176 && pix < 180) pix = (srcPix + pix) / 2; else pix = srcPix; } } } } count = rand(15); for(int i = 0; i < count; ++i) { int x = rand(width) - 8; int y = rand(height) - 8; int which = rand(4) + 56; blitStone(common, *this, false, common.largeSprites.spritePtr(which), x, y); } } bool isNoRock(Common& common, Level& level, int size, int x, int y) { Rect rect(x, y, x + size + 1, y + size + 1); rect.intersect(Rect(0, 0, level.width, level.height)); for(int y = rect.y1; y < rect.y2; ++y) for(int x = rect.x1; x < rect.x2; ++x) { if(common.materials[level.pixel(x, y)].rock()) return false; } return true; } void Level::generateRandom(Common& common, Settings const& settings, Rand& rand) { // TODO: Skipping this is a minor deviation of liero behavior /* gfx.settings.levelFile.clear(); gfx.settings.randomLevel = true;*/ //gfx.resetPalette(common.exepal); // TODO: Palette should be in Game (or Level?) and Game should transfer it to Gfx when needed origpal.resetPalette(common.exepal, settings); generateDirtPattern(common, rand); int count = rand(50) + 5; for(int i = 0; i < count; ++i) { int cx = rand(width) - 8; int cy = rand(height) - 8; int dx = rand(11) - 5; int dy = rand(5) - 2; int count2 = rand(12); for(int j = 0; j < count2; ++j) { int count3 = rand(5); for(int k = 0; k < count3; ++k) { cx += dx; cy += dy; drawDirtEffect(common, rand, *this, 1, cx, cy); // TODO: Check if it really should be dirt effect 1 } cx -= (count3 + 1) * dx; // TODO: Check if it really should be (count3 + 1) cy -= (count3 + 1) * dy; // TODO: Check if it really should be (count3 + 1) cx += rand(7) - 3; cy += rand(15) - 7; } } count = rand(15) + 5; for(int i = 0; i < count; ++i) { int cx, cy; do { cx = rand(width) - 16; if(rand(4) == 0) cy = height - 1 - rand(20); else cy = rand(height) - 16; } while(!isNoRock(common, *this, 32, cx, cy)); int rock = rand(3); blitStone(common, *this, false, common.largeSprites.spritePtr(stoneTab[rock][0]), cx, cy); blitStone(common, *this, false, common.largeSprites.spritePtr(stoneTab[rock][1]), cx + 16, cy); blitStone(common, *this, false, common.largeSprites.spritePtr(stoneTab[rock][2]), cx, cy + 16); blitStone(common, *this, false, common.largeSprites.spritePtr(stoneTab[rock][3]), cx + 16, cy + 16); } count = rand(25) + 5; for(int i = 0; i < count; ++i) { int cx, cy; do { cx = rand(width) - 8; if(rand(5) == 0) cy = height - 1 - rand(13); else cy = rand(height) - 8; } while(!isNoRock(common, *this, 15, cx, cy)); blitStone(common, *this, false, common.largeSprites.spritePtr(rand(6) + 3), cx, cy); } } void Level::makeShadow(Common& common) { for(int x = 0; x < width - 3; ++x) for(int y = 3; y < height; ++y) { if(common.materials[pixel(x, y)].seeShadow() && common.materials[pixel(x + 3, y - 3)].dirtRock()) { pixel(x, y) += 4; } if(pixel(x, y) >= 12 && pixel(x, y) <= 18 && common.materials[pixel(x + 3, y - 3)].rock()) { pixel(x, y) -= 2; if(pixel(x, y) < 12) pixel(x, y) = 12; } } for(int x = 0; x < width; ++x) { if(common.materials[pixel(x, height - 1)].background()) { pixel(x, height - 1) = 13; } } } void Level::resize(int width_new, int height_new) { width = width_new; height = height_new; data.resize(width * height); } bool Level::load(Common& common, Settings const& settings, std::string const& path) { resize(504, 350); ScopedFile f(tolerantFOpen(path.c_str(), "rb")); if(!f) return false; std::size_t len = fileLength(f); if(len >= 504*350 + 10 + 256*3 && (settings.extensions && settings.loadPowerlevelPalette)) { std::fseek(f, 504*350, SEEK_SET); char buf[10]; checkedFread(buf, 1, 10, f); if(!std::memcmp("POWERLEVEL", buf, 10)) { Palette pal; pal.read(f); origpal.resetPalette(pal, settings); std::fseek(f, 0, SEEK_SET); checkedFread(&data[0], 1, width * height, f); return true; } } std::fseek(f, 0, SEEK_SET); checkedFread(&data[0], 1, width * height, f); origpal.resetPalette(common.exepal, settings); return true; } void Level::generateFromSettings(Common& common, Settings const& settings, Rand& rand) { if(settings.randomLevel) { generateRandom(common, settings, rand); } else { // TODO: Check .LEV as well as .lev if(!load(common, settings, joinPath(data_path->configdir(), settings.levelFile + ".lev"))) generateRandom(common, settings, rand); } oldRandomLevel = settings.randomLevel; oldLevelFile = settings.levelFile; if(settings.shadow) { makeShadow(common); } } lierolibre-0.5/src/level.hpp000066400000000000000000000057401205125547100161250ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_LEVEL_HPP #define LIERO_LEVEL_HPP #include #include #include #include #include "rect.hpp" #include "gfx/palette.hpp" #include struct Game; struct Settings; struct Rand; struct Common; struct Level { Level() : width(0) , height(0) { } bool load(Common& common, Settings const& settings, std::string const& path); void generateDirtPattern(Common& common, Rand& rand); void generateRandom(Common& common, Settings const& settings, Rand& rand); void makeShadow(Common& common); void generateFromSettings(Common& common, Settings const& settings, Rand& rand); unsigned char& pixel(int x, int y) { return data[x + y*width]; } unsigned char checkedPixelWrap(int x, int y) { unsigned int idx = static_cast(x + y*width); if(idx < data.size()) return data[idx]; return 0; } bool inside(int x, int y) { return static_cast(x) < static_cast(width) && static_cast(y) < static_cast(height); } void swap(Level& other) { data.swap(other.data); std::swap(width, other.width); std::swap(height, other.height); std::swap(origpal, other.origpal); std::swap(oldRandomLevel, other.oldRandomLevel); std::swap(oldLevelFile, other.oldLevelFile); } Rect rect() { return Rect(0, 0, width, height); } void resize(int width_new, int height_new); std::vector data; bool oldRandomLevel; std::string oldLevelFile; int width; int height; Palette origpal; }; #endif // LIERO_LEVEL_HPP lierolibre-0.5/src/lfs.hpp000066400000000000000000000113071205125547100155760ustar00rootroot00000000000000/* * Copyright (c) 2002, Jens Maurer under the Boost Software License, Version 1.0 * Copyright (c) 2007-2010, Erik Lindroos under the * BSD-2-Clause License * * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any person or organization * obtaining a copy of the software and accompanying documentation covered by * this license (the "Software") to use, reproduce, display, distribute, * execute, and transmit the Software, and to prepare derivative works of the * Software, and to permit third-parties to whom the Software is furnished to * do so, all subject to the following: * * The copyright notices in the Software and this entire statement, including * the above license grant, this restriction and the following disclaimer, * must be included in all copies of the Software, in whole or in part, and * all derivative works of the Software, unless such copies or derivative * works are solely in the form of machine-executable object code generated by * a source language processor. * * 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * * BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_LFS_HPP #define LIERO_LFS_HPP // Tausworte 1965 template struct LFS { typedef unsigned int UIntType; typedef UIntType result_type; /* // avoid the warning trouble when using (1< 0); // BOOST_STATIC_ASSERT(q > 0); // BOOST_STATIC_ASSERT(k < w); // BOOST_STATIC_ASSERT(0 < 2*q && 2*q < k); // BOOST_STATIC_ASSERT(0 < s && s <= k-q); explicit LFS(UIntType s0 = 341) : wordmask(0) { for(int i = 0; i < w; ++i) wordmask |= (1u << i); seed(s0); } /* template LFS(It& first, It last) : wordmask(0) { // avoid "left shift count >= with of type" warning for(int i = 0; i < w; ++i) wordmask |= (1u << i); seed(first, last); } */ void seed(UIntType s0) { assert(s0 >= (1 << (w-k))); value = s0; } /* template void seed(It& first, It last) { if(first == last) throw std::invalid_argument("linear_feedback_shift::seed"); value = *first++; assert(value >= (1 << (w-k))); }*/ result_type operator()() { UIntType const b = (((value << q) ^ value) & wordmask) >> (k-s); UIntType const mask = ( (~static_cast(0)) << (w-k) ) & wordmask; value = ((value & mask) << s) ^ b; return value; } UIntType wordmask; // avoid "left shift count >= width of type" warnings UIntType value; }; #endif // BOOST_RANDOM_LINEAR_FEEDBACK_SHIFT_HPP lierolibre-0.5/src/m4/000077500000000000000000000000001205125547100146175ustar00rootroot00000000000000lierolibre-0.5/src/m4/libtool.m4000066400000000000000000010575421205125547100165430ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl 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 # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # 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. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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 "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*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*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. 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 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $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:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # 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 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # 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; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; 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 dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. 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 # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # 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' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; 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[[23]].*) 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" 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=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 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' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) 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])(-bit)?( [LM]SB)? 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, 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 install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS 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++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-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_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -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 -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${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 fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS lierolibre-0.5/src/m4/ltoptions.m4000066400000000000000000000300731205125547100171170ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) lierolibre-0.5/src/m4/ltsugar.m4000066400000000000000000000104241205125547100165430ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) lierolibre-0.5/src/m4/ltversion.m4000066400000000000000000000012621205125547100171070ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) lierolibre-0.5/src/m4/lt~obsolete.m4000066400000000000000000000137561205125547100174470ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) lierolibre-0.5/src/main.cpp000066400000000000000000000133511205125547100157320ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_DC1D9513CDD34960AB8A648004DA149D #define UUID_DC1D9513CDD34960AB8A648004DA149D #include #if !SDL13 #include #endif #include "gfx.hpp" #include "sfx.hpp" #include "sys.hpp" #include "game.hpp" #include "viewport.hpp" #include "worm.hpp" #include "reader.hpp" #include "filesystem.hpp" #include "text.hpp" #include "keys.hpp" #include "constants.hpp" #include "math.hpp" #include "console.hpp" #include #include #include #include #include #include //#include // TEMP #include // TEMP #include "configInit.hpp" #include "argParse.hpp" //#undef main int gameEntry(int argc, char* argv[]) try { gvl_init_ieee(); // TODO: Better PRNG seeding Console::init(); gfx.rand.seed(Uint32(std::time(0))); std::string inputFile = "data"; std::string inputDir; std::string outputFile; gvl::shared_ptr common(new Common); gfx.common = common; ArgParse argParse(argc, argv); if (argParse.vm.count("help")) { std::cout << argParse.desc << std::endl; return 0; } if (argParse.vm.count("sdlvideo")) { // SDL_putenv seems to take char* in linux, STOOPID std::string s = "SDL_VIDEODRIVER=" + argParse.vm["sdlvideo"].as(); char * sdlvd = new char[s.length()+1]; strcpy(sdlvd, s.c_str()); SDL_putenv(sdlvd); } if (argParse.vm.count("file")) inputFile = argParse.vm["file"].as(); if (argParse.vm.count("dir")) inputDir = argParse.vm["dir"].as(); SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK); /* char buf[256]; std::cout << SDL_VideoDriverName(buf, 256) << std::endl; */ if (argParse.vm.count("file") && argParse.vm.count("dir")) { ConfigInit cfgInit(inputFile, inputDir, common); if (argParse.vm.count("write")) cfgInit.write(argParse.vm["write"].as()); } else if (argParse.vm.count("dir")) { ConfigInit cfgInit(inputFile, inputDir, common); if (argParse.vm.count("write")) cfgInit.write(argParse.vm["write"].as()); } else { ConfigInit cfgInit(inputFile, common); if (argParse.vm.count("write")) cfgInit.write(argParse.vm["write"].as()); } Console::writeLine(common->S[OK]); Console::writeLine(common->S[InitSound]); Console::write(common->S[Init_BaseIO]); Console::write("0220"); Console::write(common->S[Init_IRQ]); Console::write("7"); Console::write(common->S[Init_DMA8]); Console::write("1"); Console::write(common->S[Init_DMA16]); Console::writeLine("5"); #if !DISABLE_SOUND Console::write(common->S[Init_DSPVersion]); SDL_version const* mixerVer = Mix_Linked_Version(); Console::write(toString(mixerVer->major) + "." + toString(mixerVer->minor)); Console::write(common->S[Init_Colon]); Console::write(common->S[Init_16bit]); Console::writeLine(common->S[Init_Autoinit]); #endif Console::writeLine(common->S[Init_XMSSucc]); Console::write(common->S[Init_FreeXMS]); #if GVL_WIN32 Console::write(toString(Win32::getFreeMemory())); #else Console::write("OVER 9000 "); #endif Console::write(common->S[Init_k]); Console::write(common->S[LoadingSounds]); sfx.loadFromSND(); Console::writeLine(common->S[OK2]); Console::writeLine(""); #if GVL_WINDOWS Console::write(common->S[PressAnyKey]); Console::waitForAnyKey(); #endif Console::clear(); gfx.init(); gfx.settingsFile = "LIERO"; // NOTE: Liero uses LIERO.OPT to store the name of the currently active settings file if (!fileExists(lieroOPT)) { gfx.settings.reset(new Settings); gfx.saveSettings(); } else { gfx.loadOPT(lieroOPT); // Assigns gfx.settingsFile if (!gfx.loadSettings()) { gfx.settingsFile = "LIERO"; gfx.settings.reset(new Settings); gfx.saveSettings(); } } gfx.setMaxVideoMode(); sfx.init(); //game.initGame(); gfx.mainLoop(); gfx.saveSettings(); gfx.saveOPT(lieroOPT); closeAllCachedFiles(); sfx.deinit(); SDL_Quit(); //gvl::present_profile(std::cout); return 0; } catch(std::exception& ex) { closeAllCachedFiles(); SDL_Quit(); Console::setAttributes(0x2f); Console::writeLine(std::string("EXCEPTION: ") + ex.what()); #if GVL_WINDOWS Console::writeLine("Press any key to quit"); Console::waitForAnyKey(); #endif return 1; } #endif // UUID_DC1D9513CDD34960AB8A648004DA149D lierolibre-0.5/src/math.cpp000066400000000000000000000057101205125547100157370ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "math.hpp" #include "reader.hpp" #include #include #include "configHelper.hpp" // TODO: Move to Common or hardcode, I don't think any TC is or would like to change these tables fixed sinTable[128]; fixed cosTable[128]; int vectorLength(int x, int y) { // x*x + y*y fits exactly in a double, so we don't need // to use gA. return int(gSqrt(double(x*x) + double(y*y))); } void loadTablesFromEXE() { FILE* exe = openLieroEXE(); fseek(exe, 0x1C41E, SEEK_SET); for(int i = 0; i < 128; ++i) { cosTable[i] = readSint32(exe); sinTable[i] = readSint32(exe); } } void loadTablesFromCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); const libconfig::Setting &tables = cfg.lookup("Tables"); for(int i = 0; i < 128; ++i) { sinTable[i] = tables["sinTable"][i]; cosTable[i] = tables["cosTable"][i]; } } void writeTablesToCFG(std::string cfgFilePath) { libconfig::Config cfg; cfg.readFile(cfgFilePath.c_str()); ConfigHelper cfgHelp; libconfig::Setting &root = cfg.getRoot(); libconfig::Setting &tables = cfgHelp.getSubgroup(root, "Tables"); libconfig::Setting &sintables = cfgHelp.mkArray(tables, "sinTable"); for(int i = 0; i < 128; ++i) { sintables.add(libconfig::Setting::TypeInt) = sinTable[i]; } libconfig::Setting &costables = cfgHelp.mkArray(tables, "cosTable"); for(int i = 0; i < 128; ++i) { costables.add(libconfig::Setting::TypeInt) = cosTable[i]; } cfg.writeFile(cfgFilePath.c_str()); } lierolibre-0.5/src/math.hpp000066400000000000000000000037521205125547100157500ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2011-2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_MATH_HPP #define LIERO_MATH_HPP #include typedef int fixed; inline fixed itof(int v) { return v << 16; } inline int ftoi(fixed v) { return v >> 16; } extern fixed sinTable[128]; extern fixed cosTable[128]; int vectorLength(int x, int y); inline int distanceTo(int x1, int y1, int x2, int y2) { return vectorLength(x1 - x2, y1 - y2); } void loadTablesFromEXE(); void loadTablesFromCFG(std::string cfgFilePath); void writeTablesToCFG(std::string cfgFilePath); #endif // LIERO_MATH_HPP lierolibre-0.5/src/menu/000077500000000000000000000000001205125547100152435ustar00rootroot00000000000000lierolibre-0.5/src/menu/arrayEnumBehavior.hpp000066400000000000000000000040121205125547100213740ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_CCCDF474CB704A62DC6F0AB0CBBD2EFD #define UUID_CCCDF474CB704A62DC6F0AB0CBBD2EFD #include "enumBehavior.hpp" #include struct Common; struct Menu; struct ArrayEnumBehavior : EnumBehavior { template ArrayEnumBehavior(Common& common, uint32_t& v, std::string const (&arr)[N], bool brokenEnter = false) : EnumBehavior(common, v, 0, N-1, brokenEnter) , arr(arr) { } void onUpdate(Menu& menu, int item) { MenuItem& i = menu.items[item]; i.value = arr[v]; i.hasValue = true; } std::string const* arr; }; #endif // UUID_CCCDF474CB704A62DC6F0AB0CBBD2EFD lierolibre-0.5/src/menu/booleanSwitchBehavior.cpp000066400000000000000000000037701205125547100222370ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "booleanSwitchBehavior.hpp" #include "menu.hpp" #include "menuItem.hpp" #include "../sfx.hpp" #include "../common.hpp" bool BooleanSwitchBehavior::onLeftRight(Menu& menu, int item, int dir) { if(dir > 0) sfx.play(25); else sfx.play(26); v = !v; onUpdate(menu, item); return false; } int BooleanSwitchBehavior::onEnter(Menu& menu, int item) { sfx.play(27); v = !v; onUpdate(menu, item); return -1; } void BooleanSwitchBehavior::onUpdate(Menu& menu, int item) { MenuItem& i = menu.items[item]; i.value = common.texts.onoff[v]; i.hasValue = true; } lierolibre-0.5/src/menu/booleanSwitchBehavior.hpp000066400000000000000000000036271205125547100222450ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_0F083A4D564C4D79CA6387B1D0F1901E #define UUID_0F083A4D564C4D79CA6387B1D0F1901E #include "itemBehavior.hpp" struct Common; struct Menu; struct BooleanSwitchBehavior : ItemBehavior { BooleanSwitchBehavior(Common& common, bool& v) : common(common), v(v) { } bool onLeftRight(Menu& menu, int item, int dir); int onEnter(Menu& menu, int item); void onUpdate(Menu& menu, int item); Common& common; bool& v; }; #endif // UUID_0F083A4D564C4D79CA6387B1D0F1901E lierolibre-0.5/src/menu/enumBehavior.cpp000066400000000000000000000043741205125547100204030ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "enumBehavior.hpp" #include "menu.hpp" #include "menuItem.hpp" #include "../common.hpp" #include "../text.hpp" #include "../sfx.hpp" bool EnumBehavior::onLeftRight(Menu& menu, int item, int dir) { if(brokenLeftRight) return false; // Left/right doesn't work for this item if(dir > 0) sfx.play(25); else sfx.play(26); change(menu, item, dir); return false; } int EnumBehavior::onEnter(Menu& menu, int item) { sfx.play(27); change(menu, item, 1); return -1; } void EnumBehavior::change(Menu& menu, int item, int dir) { uint32_t range = max - min + 1; uint32_t newV = ((v + dir + range - min) % range) + min; if(newV != v) { v = newV; onUpdate(menu, item); } } void EnumBehavior::onUpdate(Menu& menu, int item) { MenuItem& i = menu.items[item]; i.value = toString(v); i.hasValue = true; } lierolibre-0.5/src/menu/enumBehavior.hpp000066400000000000000000000041761205125547100204100ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_171F520E38DF4A036E1AA3901EEA4801 #define UUID_171F520E38DF4A036E1AA3901EEA4801 #include "itemBehavior.hpp" #include struct Common; struct Menu; struct EnumBehavior : ItemBehavior { EnumBehavior(Common& common, uint32_t& v, uint32_t min, uint32_t max, bool brokenLeftRight = false) : common(common), v(v) , min(min), max(max) , brokenLeftRight(brokenLeftRight) { } bool onLeftRight(Menu& menu, int item, int dir); int onEnter(Menu& menu, int item); void onUpdate(Menu& menu, int item); void change(Menu& menu, int item, int dir); Common& common; uint32_t& v; uint32_t min, max; bool brokenLeftRight; }; #endif // UUID_171F520E38DF4A036E1AA3901EEA4801 lierolibre-0.5/src/menu/hiddenMenu.cpp000066400000000000000000000062001205125547100200250ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "hiddenMenu.hpp" #include "arrayEnumBehavior.hpp" #include "../gfx.hpp" #include "../sfx.hpp" struct ExtensionsSwitchBehavior : BooleanSwitchBehavior { ExtensionsSwitchBehavior(Common& common, bool& v) : BooleanSwitchBehavior(common, v) { } void onUpdate(Menu& menu, int item) { BooleanSwitchBehavior::onUpdate(menu, item); gfx.updateExtensions(v); } }; struct Depth32Behavior : BooleanSwitchBehavior { Depth32Behavior(Common& common, bool& v) : BooleanSwitchBehavior(common, v) { } int onEnter(Menu& menu, int item) { BooleanSwitchBehavior::onEnter(menu, item); gfx.setVideoMode(); return -1; } bool onLeftRight(Menu& menu, int item, int dir) { BooleanSwitchBehavior::onLeftRight(menu, item, dir); gfx.setVideoMode(); return true; } }; struct ReplaySelectBehavior : ItemBehavior { int onEnter(Menu& menu, int item) { sfx.play(27); int ret = gfx.selectReplay(); sfx.play(27); return ret; } }; static std::string const scaleFilterNames[Settings::SfMax] = { "Nearest", "Scale2X" }; ItemBehavior* HiddenMenu::getItemBehavior(Common& common, int item) { switch(item) { case Extensions: return new ExtensionsSwitchBehavior(common, gfx.settings->extensions); case RecordReplays: return new BooleanSwitchBehavior(common, gfx.settings->recordReplays); case Replays: return new ReplaySelectBehavior(); case LoadPowerLevels: return new BooleanSwitchBehavior(common, gfx.settings->loadPowerlevelPalette); case ScalingFilter: return new ArrayEnumBehavior(common, gfx.settings->scaleFilter, scaleFilterNames); case Depth32: return new Depth32Behavior(common, gfx.settings->depth32); default: return Menu::getItemBehavior(common, item); } } lierolibre-0.5/src/menu/hiddenMenu.hpp000066400000000000000000000035641205125547100200440ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_C2D646F783444E7630AA27BB8F6C0B15 #define UUID_C2D646F783444E7630AA27BB8F6C0B15 #include "menu.hpp" struct Common; struct ItemBehavior; struct HiddenMenu : Menu { enum { Extensions, RecordReplays, Replays, LoadPowerLevels, ScalingFilter, Depth32 }; HiddenMenu(int x, int y) : Menu(x, y) { } virtual ItemBehavior* getItemBehavior(Common& common, int item); }; #endif // UUID_C2D646F783444E7630AA27BB8F6C0B15 lierolibre-0.5/src/menu/integerBehavior.cpp000066400000000000000000000046051205125547100210710ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "integerBehavior.hpp" #include "menu.hpp" #include "menuItem.hpp" #include "../sfx.hpp" #include "../gfx.hpp" #include "../common.hpp" #include "../text.hpp" bool IntegerBehavior::onLeftRight(Menu& menu, int item, int dir) { if(gfx.menuCyclic != 0) return true; int newV = v; if((dir < 0 && newV > min) || (dir > 0 && newV < max)) { newV += dir * step; } if(newV != v) { v = newV; onUpdate(menu, item); } return true; } int IntegerBehavior::onEnter(Menu& menu, int item) { sfx.play(27); if(!allowEntry) return -1; // Not allowed int x, y; if(menu.itemPosition(item, x, y)) { x += menu.valueOffsetX; int digits = 1 + int(std::floor(std::log10(double(max)))); gfx.inputInteger(v, min, max, digits, x + 2, y); onUpdate(menu, item); } return -1; } void IntegerBehavior::onUpdate(Menu& menu, int item) { MenuItem& i = menu.items[item]; i.value = toString(v); i.hasValue = true; if(percentage) i.value += "%"; } lierolibre-0.5/src/menu/integerBehavior.hpp000066400000000000000000000041151205125547100210720ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_C5F17B0F3E6B43526CD95D90435B7596 #define UUID_C5F17B0F3E6B43526CD95D90435B7596 #include "itemBehavior.hpp" struct Common; struct Menu; struct IntegerBehavior : ItemBehavior { IntegerBehavior(Common& common, int& v, int min, int max, int step = 1, bool percentage = false) : common(common), v(v) , min(min), max(max), step(step) , percentage(percentage) , allowEntry(true) { } bool onLeftRight(Menu& menu, int item, int dir); int onEnter(Menu& menu, int item); void onUpdate(Menu& menu, int item); Common& common; int& v; int min, max, step; bool percentage; bool allowEntry; }; #endif // UUID_C5F17B0F3E6B43526CD95D90435B7596 lierolibre-0.5/src/menu/itemBehavior.cpp000066400000000000000000000027251205125547100203730ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "itemBehavior.hpp" lierolibre-0.5/src/menu/itemBehavior.hpp000066400000000000000000000034551205125547100204010ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_8BF7504F0306489E5EA42995B2020DD2 #define UUID_8BF7504F0306489E5EA42995B2020DD2 struct Menu; struct ItemBehavior { virtual bool onLeftRight(Menu& menu, int item, int dir) { return true; } virtual int onEnter(Menu& menu, int item) { return -1; } virtual void onUpdate(Menu& menu, int item) { } }; #endif // UUID_8BF7504F0306489E5EA42995B2020DD2 lierolibre-0.5/src/menu/menu.cpp000066400000000000000000000157711205125547100167260ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "menu.hpp" #include "../gfx.hpp" #include "../sfx.hpp" #include "../reader.hpp" #include "../text.hpp" #include #include "../common.hpp" void Menu::draw(Common& common/*, int x, int y*/, bool disabled) { int itemsLeft = height; int curY = y; for(int c = itemFromVisibleIndex(topItem); itemsLeft > 0 && c < (int)items.size(); ++c) { MenuItem& item = items[c]; if(!item.visible) continue; --itemsLeft; bool selected = (c == selection_) && !disabled; item.draw(common, x, curY, selected, disabled, centered, valueOffsetX); drawItemOverlay(common, c, x, curY, selected, disabled); curY += itemHeight; } if(visibleItemCount > height) { int menuHeight = height * itemHeight + 1; common.font.drawChar(22, x - 6, y + 2, 0); common.font.drawChar(22, x - 7, y + 1, 50); common.font.drawChar(23, x - 6, y + menuHeight - 7, 0); common.font.drawChar(23, x - 7, y + menuHeight - 8, 50); int scrollBarHeight = menuHeight - 17; int scrollTabHeight = int(height*scrollBarHeight / visibleItemCount); scrollTabHeight = std::min(scrollTabHeight, scrollBarHeight); scrollTabHeight = std::max(scrollTabHeight, 0); int scrollTabY = y + int(topItem * scrollBarHeight / visibleItemCount); fillRect(x - 7, scrollTabY + 9, 7, scrollTabHeight, 0); fillRect(x - 8, scrollTabY + 8, 7, scrollTabHeight, 7); } } void Menu::moveTo(int newSelection) { newSelection = std::max(newSelection, 0); newSelection = std::min(newSelection, (int)items.size()-1); selection_ = newSelection; ensureInView(selection_); } void Menu::moveToFirstVisible() { moveTo(firstVisibleFrom(0)); } bool Menu::isInView(int item) { int visibleIndex = visibleItemIndex(item); return visibleIndex >= topItem && visibleIndex < bottomItem; } bool Menu::itemPosition(int item, int& x, int& y) { if(!isInView(item)) return false; int visIdx = visibleItemIndex(item); x = this->x; y = this->y + (visIdx - topItem) * itemHeight; return true; } void Menu::ensureInView(int item) { if(item < 0 || item >= (int)items.size() || !items[item].visible) return; // Can't show items outside the menu or invisible items int visibleIndex = visibleItemIndex(item); if(visibleIndex < topItem) setTop(visibleIndex); else if(visibleIndex >= bottomItem) setBottom(visibleIndex + 1); } int Menu::firstVisibleFrom(int item) { for(std::size_t i = item; i < items.size(); ++i) { if(items[i].visible) { return i; } } return items.size(); } int Menu::lastVisibleFrom(int item) { for(std::size_t i = item; i-- > 0;) { if(items[i].visible) { return i + 1; } } return 0; } int Menu::visibleItemIndex(int item) { int idx = 0; for(int i = 0; i < (int)items.size(); ++i) { if(!items[i].visible) continue; if(i >= item) break; ++idx; } return idx; } int Menu::itemFromVisibleIndex(int idx) { for(int i = 0; i < (int)items.size(); ++i) { if(!items[i].visible) continue; if(idx == 0) return i; --idx; } return items.size(); } void Menu::setBottom(int newBottomVisIdx) { setTop(newBottomVisIdx - height); } void Menu::setTop(int newTopVisIdx) { newTopVisIdx = std::min(newTopVisIdx, visibleItemCount - height); newTopVisIdx = std::max(newTopVisIdx, 0); topItem = newTopVisIdx; bottomItem = std::min(topItem + height, visibleItemCount); } void Menu::setVisibility(int item, bool state) { if(items[item].visible && !state) --visibleItemCount; else if(!items[item].visible && state) ++visibleItemCount; int realTopItem = itemFromVisibleIndex(topItem); items[item].visible = state; #if 0 // We can't do this at every change, because it can unselect items that are hidden and then shown again if(!items[selection()].visible) movement(1); #endif setTop(visibleItemIndex(realTopItem)); ensureInView(selection()); } void Menu::scroll(int dir) { setTop(topItem + dir); } void Menu::movementPage(int direction) { int sel = visibleItemIndex(selection_); int offset = direction * (height/2); sel += offset; setTop(topItem + offset); sel = std::max(sel, 0); sel = std::min(sel, visibleItemCount-1); moveTo(itemFromVisibleIndex(sel)); } void Menu::movement(int direction) { if(direction < 0) { for(int i = selection_ - 1; i >= 0; --i) { if(items[i].visible) { moveTo(i); return; } } for(int i = (int)items.size() - 1; i > selection_; --i) { if(items[i].visible) { moveTo(i); return; } } } else if(direction > 0) { for(int i = selection_ + 1; i < (int)items.size(); ++i) { if(items[i].visible) { moveTo(i); return; } } for(int i = 0; i < selection_; ++i) { if(items[i].visible) { moveTo(i); return; } } } } void Menu::readItems(FILE* f, int length, int count, bool colorPrefix, PalIdx color, PalIdx disColour) { char temp[256]; for(int i = 0; i < count; ++i) { checkedFread(&temp[0], 1, length, f); int offset = 1; int length = static_cast(temp[0]); if(colorPrefix) { color = disColour = temp[2]; length -= 2; offset += 2; } addItem(MenuItem(color, disColour, std::string(&temp[offset], length))); } setTop(0); } void Menu::readItem(FILE* f, int offset, PalIdx color, PalIdx disColour) { addItem(MenuItem(color, disColour, readPascalStringAt(f, offset))); } int Menu::addItem(MenuItem item) { int idx = (int)items.size(); items.push_back(item); if(item.visible) ++visibleItemCount; return idx; } int Menu::addItem(MenuItem item, int pos) { int idx = (int)items.size(); items.insert(items.begin() + pos, item); if(item.visible) ++visibleItemCount; return idx; } lierolibre-0.5/src/menu/menu.hpp000066400000000000000000000107731205125547100167300ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_3DC24B15AD67494EEAB541B4AE253D0F #define UUID_3DC24B15AD67494EEAB541B4AE253D0F #include #include #include #include #include #include "../gfx/color.hpp" #include #include #include "menuItem.hpp" #include "itemBehavior.hpp" #include "integerBehavior.hpp" #include "booleanSwitchBehavior.hpp" #include "timeBehavior.hpp" #include "enumBehavior.hpp" struct Common; struct Gfx; struct Menu { void readItems(FILE* f, int length, int count, bool colorPrefix, PalIdx color = 0, PalIdx disColour = 0); void readItem(FILE* f, int offset, PalIdx color = 0, PalIdx disColour = 0); Menu(bool centered = false) { init(centered); } Menu(int x, int y, bool centered = false) { init(centered); place(x, y); } void init(bool centeredInit = false) { itemHeight = 8; centered = centeredInit; selection_ = 0; valueOffsetX = 0; x = 0; y = 0; height = 15; topItem = 0; bottomItem = 0; //showScroll = false; visibleItemCount = 0; } void draw(Common& common/*, int x, int y*/, bool disabled); virtual void drawItemOverlay(Common& common, int item, int x, int y, bool selected, bool disabled) { // Nothing by default } virtual ItemBehavior* getItemBehavior(Common& common, int item) { // Dummy item behavior by default return new ItemBehavior; } bool onLeftRight(Common& common, int dir) { std::auto_ptr b(getItemBehavior(common, selection())); return b->onLeftRight(*this, selection(), dir); } int onEnter(Common& common) { std::auto_ptr b(getItemBehavior(common, selection())); return b->onEnter(*this, selection()); } void updateItems(Common& common) { for(std::size_t i = 0; i < items.size(); ++i) { std::auto_ptr b(getItemBehavior(common, i)); b->onUpdate(*this, i); } } void place(int newX, int newY) { x = newX; y = newY; } bool isSelectionValid() { return selection_ >= 0 && selection_ < (int)items.size(); } void moveToFirstVisible(); void movement(int direction); void movementPage(int direction); int addItem(MenuItem item); int addItem(MenuItem item, int pos); bool itemPosition(int item, int& x, int& y); int visibleItemIndex(int item); int itemFromVisibleIndex(int idx); void setHeight(int newHeight) { height = newHeight; setTop(topItem); } int selection() { return selection_; } void setVisibility(int item, bool state); int firstVisibleFrom(int item); int lastVisibleFrom(int item); void moveTo(int newSelection); bool isInView(int item); void ensureInView(int item); void setBottom(int newBottomVisIdx); void setTop(int newTopVisIdx); void scroll(int amount); std::vector items; int itemHeight; int valueOffsetX; int x, y; int height; int topItem; // Visible index int bottomItem; // Visible index //bool showScroll; int visibleItemCount; bool centered; private: int selection_; // Global index }; #endif // UUID_3DC24B15AD67494EEAB541B4AE253D0F lierolibre-0.5/src/menu/menuItem.cpp000066400000000000000000000044141205125547100175350ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "menuItem.hpp" #include "../common.hpp" #include "../gfx.hpp" void MenuItem::draw(Common& common, int x, int y, bool selected, bool disabled, bool centered, int valueOffsetX) { int wid = common.font.getDims(string); int valueWid = common.font.getDims(value); if(centered) x -= (wid >> 1); if(selected) { drawRoundedBox(x, y, 0, 7, wid); if(hasValue) drawRoundedBox(x + valueOffsetX - (valueWid >> 1), y, 0, 7, valueWid); } else { common.font.drawText(string, x + 3, y + 2, 0); if(hasValue) common.font.drawText(value, x + valueOffsetX - (valueWid >> 1) + 3, y + 2, 0); } PalIdx c; if(disabled) c = disColour; else if(selected) c = 168; else c = color; common.font.drawText(string, x + 2, y + 1, c); if(hasValue) common.font.drawText(value, x + valueOffsetX - (valueWid >> 1) + 2, y + 1, c); } lierolibre-0.5/src/menu/menuItem.hpp000066400000000000000000000040311205125547100175350ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_68BF27AE54944A5A75C91BBAD19D89F9 #define UUID_68BF27AE54944A5A75C91BBAD19D89F9 #include #include "../gfx/color.hpp" struct Common; struct MenuItem { MenuItem( PalIdx color, PalIdx disColour, std::string string) : color(color) , disColour(disColour) , string(string) , hasValue(false) , visible(true) { } void draw(Common& common, int x, int y, bool selected, bool disabled, bool centered, int valueOffsetX); PalIdx color; PalIdx disColour; std::string string; bool hasValue; std::string value; bool visible; }; #endif // UUID_68BF27AE54944A5A75C91BBAD19D89F9 lierolibre-0.5/src/menu/timeBehavior.cpp000066400000000000000000000032711205125547100203700ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "timeBehavior.hpp" #include "menu.hpp" #include "menuItem.hpp" #include "../common.hpp" #include "../text.hpp" void TimeBehavior::onUpdate(Menu& menu, int item) { MenuItem& i = menu.items[item]; i.value = timeToString(v); i.hasValue = true; } lierolibre-0.5/src/menu/timeBehavior.hpp000066400000000000000000000035641205125547100204020ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_3B614A27F8FE4D5D7E0254BE877C9E5F #define UUID_3B614A27F8FE4D5D7E0254BE877C9E5F #include "integerBehavior.hpp" struct Common; struct Menu; struct TimeBehavior : IntegerBehavior { TimeBehavior(Common& common, int& v, int min, int max, int step = 1, bool percentage = false) : IntegerBehavior(common, v, min, max, step, percentage) { } void onUpdate(Menu& menu, int item); }; #endif // UUID_3B614A27F8FE4D5D7E0254BE877C9E5F lierolibre-0.5/src/ninjarope.cpp000066400000000000000000000071311205125547100167720ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "worm.hpp" #include "constants.hpp" #include "game.hpp" #include "gfx/color.hpp" #include "math.hpp" //#include void Ninjarope::process(Worm& owner) { Game& game = owner.game; Common& common = *game.common; if(out) { x += velX; y += velY; int ix = ftoi(x), iy = ftoi(y); anchor = 0; for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& w = *game.worms[i]; if(&w != &owner && checkForSpecWormHit(ix, iy, 1, w)) { anchor = &w; break; } } fixed forceX, forceY; fixed diffX = x - owner.x; fixed diffY = y - owner.y; forceX = (diffX << common.C[NRForceShlX]) / common.C[NRForceDivX]; forceY = (diffY << common.C[NRForceShlY]) / common.C[NRForceDivY]; curLen = (vectorLength(ftoi(diffX), ftoi(diffY)) + 1) << common.C[NRForceLenShl]; if(ix <= 0 || ix >= game.level.width - 1 || iy <= 0 || iy >= game.level.height - 1 || common.materials[game.level.pixel(ix, iy)].dirtRock()) { if(!attached) { length = common.C[NRAttachLength]; attached = true; if(game.level.inside(ix, iy)) { PalIdx pix = game.level.pixel(ix, iy); if(common.materials[pix].anyDirt()) { for(int i = 0; i < 11; ++i) // TODO: Check 11 and read from exe { common.nobjectTypes[2].create2( game, game.rand(128), 0, 0, x, y, pix, &owner); } } } } velX = 0; velY = 0; } else if(anchor) { if(!attached) { length = common.C[NRAttachLength]; // TODO: Should this value be separate from the non-worm attaching? attached = true; } if(curLen > length) { anchor->velX -= forceX / curLen; anchor->velY -= forceY / curLen; } velX = anchor->velX; velY = anchor->velY; x = anchor->x; y = anchor->y; } else { attached = false; } if(attached) { // curLen can't be 0 if(curLen > length) { owner.velX += forceX / curLen; owner.velY += forceY / curLen; } } else { velY += common.C[NinjaropeGravity]; if(curLen > length) { velX -= forceX / curLen; velY -= forceY / curLen; } } } } lierolibre-0.5/src/nobject.cpp000066400000000000000000000210121205125547100164230ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "nobject.hpp" #include "game.hpp" #include "gfx.hpp" #include "sfx.hpp" #include "bobject.hpp" #include void NObjectType::create1(Game& game, fixed velX, fixed velY, int x, int y, int color, Worm* owner) { NObject& obj = *game.nobjects.newObjectReuse(); obj.id = id; obj.owner = owner; obj.x = x; obj.y = y; obj.velX = velX; obj.velY = velY; if(distribution) { obj.velX += distribution - game.rand(distribution * 2); obj.velY += distribution - game.rand(distribution * 2); } if(startFrame > 0) { obj.curFrame = game.rand(numFrames + 1); } else if(color != 0) { obj.curFrame = color; } else { obj.curFrame = colorBullets; } obj.timeLeft = timeToExplo; if(timeToExploV) obj.timeLeft -= game.rand(timeToExploV); } void NObjectType::create2(Game& game, int angle, fixed velX, fixed velY, fixed x, fixed y, int color, Worm* owner) { NObject& obj = *game.nobjects.newObjectReuse(); obj.id = id; obj.owner = owner; obj.x = x; obj.y = y; int realSpeed = speed - game.rand(speedV); obj.velX = (cosTable[angle] * realSpeed) / 100 + velX; obj.velY = (sinTable[angle] * realSpeed) / 100 + velY; if(distribution) { obj.velX += game.rand(distribution * 2) - distribution; obj.velY += game.rand(distribution * 2) - distribution; } obj.x += obj.velX; obj.y += obj.velY; if(startFrame > 0) { obj.curFrame = game.rand(numFrames + 1); } else if(color != 0) { obj.curFrame = color; } else { obj.curFrame = colorBullets; } obj.timeLeft = timeToExplo; if(timeToExploV) obj.timeLeft -= game.rand(timeToExploV); } void NObject::process(Game& game) { Common& common = *game.common; bool bounced = false; bool doExplode = false; x += velX; y += velY; int inewX = ftoi(x + velX); int inewY = ftoi(y + velY); int ix = ftoi(x); int iy = ftoi(y); if(id >= 20 && id <= 21) inewY += 2; // Special flag exception, TODO: Check indexes of flags NObjectType& t = common.nobjectTypes[id]; if(t.bounce > 0) { if(!game.level.inside(inewX, iy) || game.pixelMat(inewX, iy).dirtRock()) { velX = -velX * t.bounce / 100; velY = (velY * 4) / 5; // TODO: Read from EXE bounced = true; } if(!game.level.inside(ix, inewY) || game.pixelMat(ix, inewY).dirtRock()) { velY = -velY * t.bounce / 100; velX = (velX * 4) / 5; // TODO: Read from EXE bounced = true; } } if(t.bloodTrail && t.bloodTrailDelay > 0 && (game.cycles % t.bloodTrailDelay) == 0) { game.createBObject(x, y, velX / 4, velY / 4); // TODO: Read from EXE } // Original didn't have this. Essential fix! inewX = ftoi(x + velX); inewY = ftoi(y + velY); if(id >= 20 && id <= 21) inewY += 2; // Special flag exception, TODO: Check indexes of flags if(inewX < 0) x = 0; if(inewY < 0) y = 0; if(inewX >= game.level.width) x = itof(game.level.width); if(inewY >= game.level.height) y = itof(game.level.height); if(!game.level.inside(inewX, inewY) || game.pixelMat(inewX, inewY).dirtRock()) { velX = 0; velY = 0; if(t.explGround) { if(t.startFrame > 0 && t.drawOnMap) { blitImageOnMap( common, game.level, common.smallSprites.spritePtr(t.startFrame + curFrame), ix - 3, iy - 3, 7, 7); if(game.settings->shadow) correctShadow(common, game.level, Rect(ix - 8, iy - 8, ix + 9, iy + 9)); // This seems like an overly large rectangle } doExplode = true; } } else { if(!bounced && t.leaveObjDelay != 0 && t.leaveObj >= 0 // NOTE: AFAIK, this doesn't exist in Liero, but some TCs seem to forget to set leaveObjDelay to 0 when not using this trail && (game.cycles % t.leaveObjDelay) == 0) { common.sobjectTypes[t.leaveObj].create(game, ftoi(x), ftoi(y), owner); } velY += t.gravity; } if(t.numFrames > 0) { if((game.cycles & 7) == 0) // TODO: Read from EXE { if(velX > 0) { ++curFrame; if(curFrame > t.numFrames) curFrame = 0; } else if(velX < 0) { --curFrame; if(curFrame < 0) curFrame = t.numFrames; } } } if(t.timeToExplo > 0) { if(--timeLeft <= 0) doExplode = true; } if(!doExplode) { if(t.hitDamage > 0 || (id >= 20 && id <= 21)) // Flags { for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& w = *game.worms[i]; if(checkForSpecWormHit(ftoi(x), ftoi(y), t.detectDistance, w)) { w.velX += t.blowAway * velX / 100; w.velY += t.blowAway * velY / 100; w.health -= t.hitDamage; if(game.settings->gameMode == Settings::GMCtF) { /* TODO if(objnum == 21) { if(o == 1) { if(lastkilled == 0) { if(cGame::cWorm[1].flag == false) { cGame::cObject[w].m_iObjectNum = -1; cGame::cWorm[1].flag = true; } // 5BEC } } } else if(objnum == 22) { if(o == 0) { if(lastkilled == 1) { if(cGame::cWorm[0].flag == false) { cGame::cObject[w].m_iObjectNum = -1; cGame::cWorm[0].flag = true; } // 5C1D } } } */ } else if(game.settings->gameMode == Settings::GMSimpleCtF) { /* if(objnum == 21) { if(o == 1) { if(cGame::cWorm[1].flag == 0) { cGame::cObject[w].m_iObjectNum = -1; cGame::cWorm[1].flag = 1; } // 5C4E } } else if(objnum == 22) { if(o == 0) { if(cGame::cWorm[0].flag == 0) { cGame::cObject[w].m_iObjectNum = -1; cGame::cWorm[0].flag = 1; } // 5C78 } } */ } if(w.health <= 0) w.lastKilledBy = owner; if(t.hitDamage > 0) { if(w.health > 0 && game.rand(3) == 0) { int snd = 18 + game.rand(3); // NOTE: MUST be outside the unpredictable branch below if(!game.soundPlayer->isPlaying(&w)) { game.soundPlayer->play(snd, &w); } } } int blood = t.bloodOnHit * game.settings->blood / 100; for(int i = 0; i < blood; ++i) { int angle = game.rand(128); common.nobjectTypes[6].create2( game, angle, velX / 3, velY / 3, x, y, 0, owner); } if(t.wormExplode) doExplode = true; if(t.wormDestroy && !doExplode) { if(used) // Temp game.nobjects.free(this); } } } } } if(doExplode) { if(t.createOnExp >= 0) { common.sobjectTypes[t.createOnExp].create(game, ftoi(x), ftoi(y), owner); } if(t.dirtEffect >= 0) { drawDirtEffect(common, game.rand, game.level, t.dirtEffect, ftoi(x) - 7, ftoi(y) - 7); if(game.settings->shadow) correctShadow(common, game.level, Rect(ftoi(x) - 10, ftoi(y) - 10, ftoi(x) + 11, ftoi(y) + 11)); } if(t.splinterAmount > 0) { for(int i = 0; i < t.splinterAmount; ++i) { int angle = game.rand(128); int colorSub = game.rand(2); common.nobjectTypes[t.splinterType].create2( game, angle, 0, 0, x, y, t.splinterColour - colorSub, owner); } } if(used) // Temp game.nobjects.free(this); } } /* */ lierolibre-0.5/src/nobject.hpp000066400000000000000000000047471205125547100164500ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_NOBJECT_HPP #define LIERO_NOBJECT_HPP #include "math.hpp" #include "objectList.hpp" #include "exactObjectList.hpp" struct Worm; struct Game; struct NObjectType { void create1(Game& game, fixed velX, fixed velY, int x, int y, int color, Worm* owner); void create2(Game& game, int angle, fixed velX, fixed velY, fixed x, fixed y, int color, Worm* owner); int detectDistance; fixed gravity; int speed; int speedV; int distribution; int blowAway; int bounce; int hitDamage; bool wormExplode; bool explGround; bool wormDestroy; int bloodOnHit; int startFrame; int numFrames; bool drawOnMap; int colorBullets; int createOnExp; bool affectByExplosions; int dirtEffect; int splinterAmount; int splinterColour; int splinterType; bool bloodTrail; int bloodTrailDelay; int leaveObj; int leaveObjDelay; int timeToExplo; int timeToExploV; int id; }; struct NObject : ExactObjectListBase { void process(Game& game); fixed x, y; fixed velX, velY; int timeLeft; int id; Worm* owner; int curFrame; }; #endif // LIERO_NOBJECT_HPP lierolibre-0.5/src/objectList.hpp000066400000000000000000000067331205125547100171230ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_OBJECTLIST_HPP #define LIERO_OBJECTLIST_HPP #include #include struct ObjectListBase { ObjectListBase* nextFree; bool used; /* ObjectListBase* prev; ObjectListBase* next;*/ }; template struct ObjectList { struct iterator { iterator(T* cur_) : cur(cur_) { while(!cur->used) ++cur; } iterator& operator++() { do { ++cur; } while(!cur->used); return *this; } T& operator*() { assert(cur->used); return *cur; } T* operator->() { assert(cur->used); return cur; } bool operator!=(iterator b) { return cur != b.cur; } T* cur; }; ObjectList() { clear(); } T* getFreeObject() { T* ptr = static_cast(nextFree); nextFree = ptr->nextFree; ptr->used = true; /* sentinel.prev->next = ptr; ptr->prev = sentinel.prev; ptr->next = &sentinel; sentinel.prev = ptr; */ ++count; return ptr; } T* newObjectReuse() { T* ret; if(!nextFree) ret = &arr[Limit - 1]; else ret = getFreeObject(); assert(ret->used); return ret; } T* newObject() { if(!nextFree) return 0; T* ret = getFreeObject(); assert(ret->used); return ret; } iterator begin() { return iterator(&arr[0]); } iterator end() { return iterator(&arr[Limit]); } void free(T* ptr) { assert(ptr->used); if(ptr->used) { ptr->nextFree = nextFree; nextFree = ptr; ptr->used = false; assert(count > 0); --count; } } void free(iterator i) { free(&*i); } void clear() { count = 0; /* sentinel.prev = &sentinel; sentinel.next = &sentinel;*/ arr[Limit].used = true; // Sentinel for(std::size_t i = 0; i < Limit - 1; ++i) { arr[i].nextFree = &arr[i + 1]; arr[i].used = false; } arr[Limit - 1].nextFree = 0; arr[Limit - 1].used = false; nextFree = &arr[0]; } std::size_t size() const { return count; } T arr[Limit + 1]; // One sentinel ObjectListBase* nextFree; //ObjectListBase sentinel; std::size_t count; }; #endif // LIERO_OBJECTLIST_HPP lierolibre-0.5/src/rand.cpp000066400000000000000000000026301205125547100157300ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ lierolibre-0.5/src/rand.hpp000066400000000000000000000031401205125547100157320ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_C1DCDBE1BD8541A14AEC91A1BDF3B9F4 #define UUID_C1DCDBE1BD8541A14AEC91A1BDF3B9F4 #include struct Rand : gvl::mwc { }; #endif // UUID_C1DCDBE1BD8541A14AEC91A1BDF3B9F4 lierolibre-0.5/src/reader.cpp000066400000000000000000000070431205125547100162510ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "reader.hpp" #include #include #include #include // For GVL_WINDOWS #include "filesystem.hpp" std::string lieroOPT; std::string lieroCFG; DataPath* data_path = NULL; namespace { struct ReaderFile { unsigned int lastTouch; FILE* f; }; typedef std::map ReaderFileMap; std::string lieroEXE; std::string lieroCHR; std::string lieroSND; ReaderFileMap readerFiles; void closeReaderFile(ReaderFileMap::iterator i) { fclose(i->second.f); readerFiles.erase(i); } } FILE* openFile(std::string const& name) { ReaderFileMap::iterator i = readerFiles.find(name); if(i != readerFiles.end()) { i->second.lastTouch = SDL_GetTicks(); return i->second.f; } FILE* f = tolerantFOpen(name.c_str(), "rb"); if(!f) throw std::runtime_error("Could not open '" + name + '\''); ReaderFile& rf = readerFiles[name]; rf.f = f; rf.lastTouch = SDL_GetTicks(); return f; } FILE* openLieroEXE() { return openFile(lieroEXE); } FILE* openLieroSND() { return openFile(lieroSND); } FILE* openLieroCHR() { return openFile(lieroCHR); } void processReader() { unsigned int now = SDL_GetTicks(); for(ReaderFileMap::iterator i = readerFiles.begin(); i != readerFiles.end(); ) { ReaderFileMap::iterator cur = i; ++i; if((now - cur->second.lastTouch) > 5000) { closeReaderFile(cur); } } } void closeAllCachedFiles() { for(ReaderFileMap::iterator i = readerFiles.begin(); i != readerFiles.end(); ) { ReaderFileMap::iterator cur = i; ++i; closeReaderFile(cur); } } void setLieroPath(std::string const& path) { delete data_path; data_path = new DataPath(path); lieroCHR = data_path->file("LIERO.CHR"); lieroSND = data_path->file("LIERO.SND"); lieroOPT = data_path->file("LIERO.OPT"); } void setLieroEXE(std::string const& path) { lieroEXE = path; } // $HOME takes priority, copies to $HOME, needs setLieroPath() first void setLieroCFG(std::string const& path) { DataPath dp_tmp(path); #if GVL_WINDOWS lieroCFG = dp_tmp.file("lierocfg.txt"); #else lieroCFG = dp_tmp.file("liero.cfg"); #endif } lierolibre-0.5/src/reader.hpp000066400000000000000000000041731205125547100162570ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2011-2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_READER_HPP #define LIERO_READER_HPP #include #include #include #include #include "dataPath.hpp" #include "binReader.hpp" extern DataPath* data_path; extern std::string lieroEXERoot; extern std::string lieroOPT; extern std::string lieroCFG; // Return an opened file FILE* openFile(std::string const& name); FILE* openLieroEXE(); FILE* openLieroSND(); FILE* openLieroCHR(); void setLieroPath(std::string const& path); void setLieroEXE(std::string const& path); void setLieroCFG(std::string const& path); // Close old files void processReader(); void closeAllCachedFiles(); #endif // LIERO_READER_HPP lierolibre-0.5/src/rect.hpp000066400000000000000000000100101205125547100157350ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_RECT_HPP #define LIERO_RECT_HPP /* #include "vec.hpp" */ template class basic_rect { public: basic_rect() { } basic_rect(T x1_, T y1_, T x2_, T y2_) : x1(x1_), y1(y1_), x2(x2_), y2(y2_) { } /* basic_rect(basic_vec const& center, T size) : x1(center.x - size), y1(center.y - size) , x2(center.x + size), y2(center.y + size) { } */ T x1; T y1; T x2; T y2; T center_x() const { return (x1 + x2) / T(2); } T center_y() const { return (y1 + y2) / T(2); } /* basic_vec center() const { return basic_vec(center_x(), center_y()); }*/ T width() const { return x2 - x1; } T height() const { return y2 - y1; } basic_rect flip() const { return basic_rect(y1, x1, y2, x2); } bool valid() { return x1 <= x2 && y1 <= y2; } void join(basic_rect const& b) { if(b.x1 < x1) x1 = b.x1; if(b.y1 < y1) y1 = b.y1; if(b.x2 > x2) x2 = b.x2; if(b.y2 > y2) y2 = b.y2; } bool intersecting(basic_rect const& b) const { if(b.y2 < y1 || b.y1 > y2 || b.x2 < x1 || b.x1 > x2) { return false; } else { return true; } } void intersect(basic_rect const& b) { /* if(!intersecting(b)) { return false; }*/ if(b.x1 > x1) x1 = b.x1; if(b.y1 > y1) y1 = b.y1; if(b.x2 < x2) x2 = b.x2; if(b.y2 < y2) y2 = b.y2; //return true; } /* bool inside(basic_vec v) const { T diffX = v.x - x1; T diffY = v.y - y1; return diffX < width() && diffX >= T(0) && diffY < height() && diffY >= T(0); }*/ basic_rect operator&(basic_rect const& b) const { return basic_rect(*this) &= b; } basic_rect& operator&=(basic_rect const& b) { if(b.x1 > x1) x1 = b.x1; if(b.y1 > y1) y1 = b.y1; if(b.x2 < x2) x2 = b.x2; if(b.y2 < y2) y2 = b.y2; return *this; } /* basic_rect operator+(basic_vec const& b) { return basic_rect(*this) += b; } basic_rect& operator+=(basic_vec const& b) { x1 += b.x; x2 += b.x; y1 += b.y; y2 += b.y; return *this; } basic_rect operator-(basic_vec const& b) { return basic_rect(*this) -= b; } basic_rect& operator-=(basic_vec const& b) { x1 -= b.x; x2 -= b.x; y1 -= b.y; y2 -= b.y; return *this; } */ basic_rect translate(T x, T y) { return basic_rect(x1 + x, y1 + y, x2 + x, y2 + y); } /* basic_vec ul() { return basic_vec(x1, y1); } basic_vec ur() { return basic_vec(x2, y1); } basic_vec ll() { return basic_vec(x1, y2); } basic_vec lr() { return basic_vec(x2, y2); } */ }; typedef basic_rect Rect; typedef basic_rect FRect; #endif // LIERO_RECT_HPP lierolibre-0.5/src/replay.cpp000066400000000000000000000361151205125547100163050ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "replay.hpp" #include "game.hpp" #include "worm.hpp" #include "viewport.hpp" #include #include #include struct WormCreator { Worm* operator()(GameSerializationContext& context) { return new Worm(*context.game); } }; struct ViewportCreator { Viewport* operator()(GameSerializationContext& context) { return new Viewport(*context.game); } }; /* void read(gvl::stream_reader& reader, Settings& settings) { WormWeapon int id; int ammo; int delayLeft; int loadingLeft; bool available; } */ template void archive(Archive ar, Worm::ControlState& cs) { /* for(int i = 0; i < Worm::MaxControl; ++i) { ar.b(cs.state[i]); }*/ ar.ui8(cs.istate); } template void archive(Archive ar, Worm& worm) { ar .i32(worm.x) .i32(worm.y) .i32(worm.velX) .i32(worm.velY) .i32(worm.logicRespawnX) .i32(worm.logicRespawnY) .i32(worm.hotspotX) .i32(worm.hotspotY) .i32(worm.aimingAngle) .i32(worm.aimingSpeed) .b(worm.ableToJump) .b(worm.ableToDig) .b(worm.keyChangePressed) .b(worm.movable) .b(worm.animate) .b(worm.visible) .b(worm.ready) .b(worm.flag) .b(worm.makeSightGreen) .i32(worm.health) .i32(worm.lives) .i32(worm.kills) .i32(worm.timer) .i32(worm.killedTimer) .i32(worm.currentFrame) .i32(worm.flags) .obj(worm.ninjarope.anchor, WormCreator()) .b(worm.ninjarope.attached) .i32(worm.ninjarope.curLen) .i32(worm.ninjarope.length) .b(worm.ninjarope.out) .i32(worm.ninjarope.velX) .i32(worm.ninjarope.velY) .i32(worm.ninjarope.x) .i32(worm.ninjarope.y) .i32(worm.currentWeapon) .b(worm.fireConeActive) .obj(worm.lastKilledBy, WormCreator()) .i32(worm.fireCone) .i32(worm.leaveShellTimer); ar.fobj(worm.settings) .i32(worm.index) .i32(worm.reacts[0]) .i32(worm.reacts[1]) .i32(worm.reacts[2]) .i32(worm.reacts[3]); for(int i = 0; i < 5; ++i) { ar .i32(worm.weapons[i].ammo) .b(worm.weapons[i].available) .i32(worm.weapons[i].delayLeft) .i32(worm.weapons[i].id) .i32(worm.weapons[i].loadingLeft); } ar.ui8(worm.direction); archive(ar, worm.controlStates); archive(ar, worm.prevControlStates); ar.check(); } template void archive(Archive ar, Viewport& vp) { ar .i32(vp.x) .i32(vp.y) .i32(vp.shake) .i32(vp.maxX) .i32(vp.maxY) .i32(vp.centerX) .i32(vp.centerY) .obj(vp.worm, WormCreator()) .i32(vp.bannerY) .i32(vp.inGameX) .i32(vp.rect.x1) .i32(vp.rect.y1) .i32(vp.rect.x2) .i32(vp.rect.y2) ; archive(ar, vp.rand); } struct mtf { uint8_t order[256]; mtf() { for(int i = 0; i < 256; ++i) order[i] = i; } uint8_t byte_to_rank(uint8_t v) { for(int i = 0; i < 256; ++i) { if(order[i] == v) return i; } return 0; // Will never reach here } uint8_t rank_to_byte(uint8_t v) { return order[v]; } void promote_rank(uint8_t rank) { uint8_t byte = order[rank]; for(uint32_t i = rank; i-- > 0; ) { order[i+1] = order[i]; } order[0] = byte; } }; template void archive(Archive ar, Palette& pal) { for(int i = 0; i < 256; ++i) { ar.ui8(pal.entries[i].r); ar.ui8(pal.entries[i].g); ar.ui8(pal.entries[i].b); } } void archive(gvl::in_archive ar, Level& level) { unsigned int w = gvl::read_uint16(ar.reader); unsigned int h = gvl::read_uint16(ar.reader); level.resize(w, h); if(ar.context.replayVersion > 1) archive(ar, level.origpal); #if 1 for(unsigned int y = 0; y < h; ++y) for(unsigned int x = 0; x < w; ++x) { level.data[y*w + x] = ar.reader.get(); } #else mtf level_mtf; for(unsigned int y = 0; y < h; ++y) for(unsigned int x = 0; x < w; ++x) { uint8_t rank = ar.reader.get(); uint8_t pix = level_mtf.rank_to_byte(rank); level.data[y*w + x] = pix; level_mtf.promote_rank(rank); } #endif for(unsigned int i = 0; i < 256; ++i) { level.origpal.entries[i].r = ar.reader.get(); level.origpal.entries[i].g = ar.reader.get(); level.origpal.entries[i].b = ar.reader.get(); } } template void archive(gvl::out_archive ar, Level& level) { ar.ui16(level.width); ar.ui16(level.height); unsigned int w = level.width; unsigned int h = level.height; if(ar.context.replayVersion > 1) archive(ar, level.origpal); #if 1 ar.writer.put(&level.data[0], w * h); #else mtf level_mtf; for(unsigned int y = 0; y < h; ++y) for(unsigned int x = 0; x < w; ++x) { uint8_t pix = level.data[y*w + x]; uint8_t rank = level_mtf.byte_to_rank(pix); ar.writer.put(rank); level_mtf.promote_rank(rank); } #endif for(unsigned int i = 0; i < 256; ++i) { ar.writer.put(level.origpal.entries[i].r); ar.writer.put(level.origpal.entries[i].g); ar.writer.put(level.origpal.entries[i].b); } } void archive_worms(gvl::in_archive ar, Game& game) { uint8_t cont; while(ar.ui8(cont), cont) { int wormId = ar.context.nextWormId++; Worm* worm; ar.obj(worm, WormCreator()); //printf("Worm ID %d: %s\n", wormId, worm->settings->name.c_str()); //GameSerializationContext::WormData& data = ar.context.wormData[worm]; game.addWorm(worm); ar.context.idToWorm[wormId] = worm; } while(ar.ui8(cont), cont) { Viewport* vp; ar.fobj(vp, ViewportCreator()); game.addViewport(vp); } } template void archive_worms(gvl::out_archive ar, Game& game) { for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& worm = *game.worms[i]; int wormId = ar.context.nextWormId++; //printf("Worm from game, ID %d: %s\n", wormId, worm.settings->name.c_str()); ar.context.idToWorm[wormId] = &worm; } for(GameSerializationContext::IdToWormMap::iterator i = ar.context.idToWorm.begin(); i != ar.context.idToWorm.end(); ++i) { ar.writer.put(1); Worm* worm = i->second; GameSerializationContext::WormData& data = ar.context.wormData[worm]; ar.obj(worm, WormCreator()); //printf("Worm ID %d: %s\n", i->first, worm->settings->name.c_str()); data.settingsExpired = false; // We just serialized them, so they have to be up to date } ar.writer.put(0); for(std::size_t i = 0; i < game.viewports.size(); ++i) { ar.writer.put(1); Viewport* vp = game.viewports[i]; ar.fobj(vp); } ar.writer.put(0); } template void archive(Archive ar, Game& game) { ar.context.game = &game; ar .fobj(game.settings) .i32(game.cycles) .b(game.gotChanged) .obj(game.lastKilled, WormCreator()) .i32(game.screenFlash); archive(ar, game.rand); archive_worms(ar, game); archive(ar, game.level); } template void read(gvl::octet_stream_reader& reader, GameSerializationContext& context, T& x) { archive(gvl::in_archive(reader, context), x); } template void write(gvl::octet_stream_writer& writer, GameSerializationContext& context, T& x) { archive(gvl::out_archive(writer, context), x); } template gvl::gash::value_type hash(T& x) { GameSerializationContext context; gvl::hash_accumulator ha; archive(gvl::out_archive >(ha, context), x); ha.flush(); return ha.final(); } template void archive(Archive ar, gvl::gash::value_type& x) { for(int i = 0; i < gvl::gash::value_type::size; ++i) { uint32_t h = uint32_t(x.value[i] >> 32); uint32_t l = uint32_t(x.value[i] & 0xffffffff); ar.ui32(l); ar.ui32(h); x.value[i] = (uint64_t(h) << 32) | l; } } ReplayWriter::ReplayWriter(gvl::stream_ptr str_init) : settingsExpired(true) { #if 1 str.reset(new gvl::deflate_filter(true)); str->attach_sink(str_init); #else str = str_init; #endif writer.attach(str); } ReplayWriter::~ReplayWriter() { endRecord(); } ReplayReader::ReplayReader(gvl::stream_ptr str_init) { #if 1 str.reset(new gvl::deflate_filter(false)); str->attach_source(str_init); #else str = str_init; #endif reader.attach(str); } //#define DEBUG_REPLAYS uint32_t const replayMagic = ('L' << 24) | ('R' << 16) | ('P' << 8) | 'F'; std::auto_ptr ReplayReader::beginPlayback(gvl::shared_ptr common) { uint32_t readMagic = gvl::read_uint32(reader); if(readMagic != replayMagic) throw gvl::archive_check_error("File does not appear to be a replay"); context.replayVersion = reader.get(); if(context.replayVersion > myGameVersion) throw gvl::archive_check_error("Replay version is too recent"); gvl::shared_ptr settings(new Settings); std::auto_ptr game(new Game(common, settings)); read(reader, context, *game); #ifdef DEBUG_REPLAYS gvl::gash::value_type actualH = hash(*game); gvl::gash::value_type expectedH; read(reader, context, expectedH); if(actualH != expectedH) std::cout << "Differing hashes" << std::endl; #endif return game; } void ReplayWriter::beginRecord(Game& game) { gvl::write_uint32(writer, replayMagic); writer.put(context.replayVersion); write(writer, context, game); settingsExpired = false; // We just serialized them, so they have to be up to date #ifdef DEBUG_REPLAYS gvl::gash::value_type h = hash(game); write(writer, context, h); #endif } void ReplayWriter::endRecord() { writer.put(0x83); } uint32_t fastGameChecksum(Game& game) { // game.rand is like a golden thread uint32_t checksum = game.rand.x; for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& worm = *game.worms[i]; checksum ^= worm.x; checksum += worm.velX; checksum ^= worm.y; checksum += worm.velY; } return checksum; } bool ReplayReader::playbackFrame() { Game& game = *context.game; bool settingsChanged = false; while(true) { uint8_t first = reader.get(); if(first == 0x80) break; else if(first == 0x81) { read(reader, context, *game.settings); settingsChanged = true; } else if(first == 0x82) { uint32_t wormId = gvl::read_uint32(reader); GameSerializationContext::IdToWormMap::iterator i = context.idToWorm.find(wormId); if(i != context.idToWorm.end()) { read(reader, context, *i->second->settings); settingsChanged = true; } } else if(first == 0x83) { // End of replay return false; } else if(first < 0x80) { uint8_t state = first; for(GameSerializationContext::IdToWormMap::iterator i = context.idToWorm.begin(); ;) { Worm* worm = i->second; //GameSerializationContext::WormData& data = context.wormData[worm]; worm->controlStates.unpack(state ^ worm->prevControlStates.pack()); ++i; if(i == context.idToWorm.end()) break; state = reader.get(); } break; // Read frame } else throw gvl::archive_check_error("Unexpected header byte"); } if(settingsChanged) { game.updateSettings(); } if((game.cycles % (70 * 15)) == 0) { uint32_t expected = gvl::read_uint32(reader); uint32_t actual = fastGameChecksum(game); if(actual != expected) throw gvl::archive_check_error("Replay has desynced"); } #ifdef DEBUG_REPLAYS uint32_t expected = gvl::read_uint32(reader); uint32_t expected2 = gvl::read_uint32(reader); gvl::gash::value_type actual = hash(game); if(expected != (uint32_t)actual.value[0]) { std::cout << "Expected: " << expected << ", was: " << (uint32_t)actual.value[0] << std::endl; std::cout << "Frame: " << game.cycles << std::endl; throw gvl::archive_check_error("Desynced state"); } if(expected2 != game.cycles) { throw gvl::archive_check_error("Descyned stream"); } #endif return true; } void ReplayWriter::recordFrame() { Game& game = *context.game; if(settingsExpired) { writer.put(0x81); write(writer, context, *context.game->settings); settingsExpired = false; } bool writeStates = false; if(context.idToWorm.size() <= 3) // TODO: What limit do we want here? None? writeStates = true; else { for(GameSerializationContext::IdToWormMap::iterator i = context.idToWorm.begin(); i != context.idToWorm.end(); ++i) { Worm* worm = i->second; GameSerializationContext::WormData& data = context.wormData[worm]; if(worm->controlStates != worm->prevControlStates) { writeStates = true; } if(data.settingsExpired) { writer.put(0x82); gvl::write_uint32(writer, i->first); write(writer, context, *worm->settings); data.settingsExpired = false; } } } if(writeStates) { for(GameSerializationContext::IdToWormMap::iterator i = context.idToWorm.begin(); i != context.idToWorm.end(); ++i) { Worm* worm = i->second; //GameSerializationContext::WormData& data = context.wormData[worm]; uint8_t state = worm->controlStates.pack() ^ worm->prevControlStates.pack(); sassert(state < 0x80); writer.put(state); } } else { writer.put(0x80); // Bit 7 means empty frame } if((game.cycles % (70 * 15)) == 0) { uint32_t checksum = fastGameChecksum(game); gvl::write_uint32(writer, checksum); } #ifdef DEBUG_REPLAYS gvl::gash::value_type actual = hash(game); gvl::write_uint32(writer, (uint32_t)actual.value[0]); gvl::write_uint32(writer, game.cycles); #endif } void ReplayWriter::unfocus() { for(GameSerializationContext::WormDataMap::iterator i = context.wormData.begin(); i != context.wormData.end(); ++i) { i->second.lastSettingsHash = i->first->settings->updateHash(); } lastSettingsHash = context.game->settings->updateHash(); } void ReplayWriter::focus() { // TODO: Check hash of settings for game and all worms, // mark differing ones for reserialization. for(GameSerializationContext::WormDataMap::iterator i = context.wormData.begin(); i != context.wormData.end(); ++i) { if(i->second.lastSettingsHash != i->first->settings->updateHash()) { i->second.settingsExpired = true; } } if(lastSettingsHash != context.game->settings->updateHash()) settingsExpired = true; } lierolibre-0.5/src/replay.hpp000066400000000000000000000061721205125547100163120ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_4CF92C398C724F883A02E8A68FE1584F #define UUID_4CF92C398C724F883A02E8A68FE1584F #include #include #include #include #include #include #include #include "worm.hpp" #include "common.hpp" #include "version.hpp" struct Game; struct GameSerializationContext : gvl::serialization_context { GameSerializationContext() : game(0) , nextWormId(0) , replayVersion(myGameVersion) { } struct WormData { WormData() : settingsExpired(true) { } gvl::gash::value_type lastSettingsHash; bool settingsExpired; }; int version() { return replayVersion; } typedef std::map IdToWormMap; typedef std::map WormDataMap; Game* game; WormDataMap wormData; IdToWormMap idToWorm; int nextWormId; int replayVersion; }; struct Replay { Replay() { } /* virtual void unfocus() = 0; virtual void focus() = 0; */ GameSerializationContext context; }; struct ReplayWriter : Replay { ReplayWriter(gvl::stream_ptr str_init); ~ReplayWriter(); void unfocus(); void focus(); gvl::filter_ptr str; gvl::octet_stream_writer writer; gvl::gash::value_type lastSettingsHash; bool settingsExpired; void beginRecord(Game& game); void recordFrame(); private: void endRecord(); }; struct ReplayReader : Replay { ReplayReader(gvl::stream_ptr str_init); void unfocus() { // Nothing } void focus() { // Nothing } std::auto_ptr beginPlayback(gvl::shared_ptr common); bool playbackFrame(); gvl::filter_ptr str; gvl::octet_stream_reader reader; }; #endif // UUID_4CF92C398C724F883A02E8A68FE1584F lierolibre-0.5/src/sdlmain.cpp000066400000000000000000000036021205125547100164330ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include int gameEntry(int argc, char *argv[]); #if GVL_WINDOWS && !defined(DISABLE_MAINHACK) // A bit of a hack to avoid DLL dependencies #define _WIN32_WINDOWS 0x0410 #define WINVER 0x0410 #include #include #ifdef main #undef main #endif int main(int argc, char *argv[]) { SDL_SetModuleHandle(GetModuleHandle(NULL)); return gameEntry(argc, argv); } #else int main(int argc, char *argv[]) { return gameEntry(argc, argv); } #endif lierolibre-0.5/src/settings.cpp000066400000000000000000000146771205125547100166620ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "settings.hpp" #include "reader.hpp" #include "keys.hpp" #include "gfx.hpp" #include "filesystem.hpp" #include #include #include #include int const Settings::wormAnimTab[] = { 0, 7, 0, 14 }; Extensions::Extensions() : extensions(false) , recordReplays(true) , loadPowerlevelPalette(true) , scaleFilter(Settings::SfNearest) , depth32(true) , bloodParticleMax(700) { } Settings::Settings() : maxBonuses(4) , blood(100) , timeToLose(600) , flagsToWin(20) , gameMode(0) , shadow(true) , loadChange(false) , namesOnBonuses(false) , regenerateLevel(false) , lives(15) , loadingTime(100) , randomLevel(true) , map(true) , screenSync(true) { std::memset(weapTable, 0, sizeof(weapTable)); wormSettings[0].reset(new WormSettings); wormSettings[1].reset(new WormSettings); wormSettings[0]->color = 32; wormSettings[1]->color = 41; unsigned char defControls[2][7] = { {0x13, 0x21, 0x20, 0x22, 0x1D, 0x2A, 0x38}, {0xA0, 0xA8, 0xA3, 0xA5, 0x75, 0x59, 0x36} }; unsigned char defRGB[2][3] = { {26, 26, 63}, {15, 43, 15} }; for(int i = 0; i < 2; ++i) { for(int j = 0; j < 7; ++j) { wormSettings[i]->controls[j] = defControls[i][j]; } for(int j = 0; j < 3; ++j) { wormSettings[i]->rgb[j] = defRGB[i][j]; } } } bool Settings::load(std::string const& path) { FILE* opt = tolerantFOpen(path.c_str(), "rb"); if(!opt) return false; std::size_t size = fileLength(opt); if(size < 155) return false; // .dat is too short gvl::octet_stream_reader reader(gvl::stream_ptr(new gvl::fstream(opt))); gvl::default_serialization_context context; archive_liero(gvl::in_archive(reader, context), *this); unsigned char defControlsEx[2][8] = { {0x13, 0x21, 0x20, 0x22, 0x1D, 0x2A, 0x38, 0x56}, {0xA0, 0xA8, 0xA3, 0xA5, 0x75, 0x59, 0x36, 0x0C} }; for(int i = 0; i < 2; ++i) { for(int j = 0; j < 7; ++j) { if(!wormSettings[i]->controlsEx[j]) wormSettings[i]->controlsEx[j] = (wormSettings[i]->controls[j] ? wormSettings[i]->controls[j] : defControlsEx[i][j]); } if(!wormSettings[i]->controlsEx[7]) wormSettings[i]->controlsEx[7] = defControlsEx[i][7]; } return true; } gvl::gash::value_type& Settings::updateHash() { gvl::default_serialization_context context; gvl::hash_accumulator ha; archive(gvl::out_archive >(ha, context), *this); ha.flush(); hash = ha.final(); return hash; } void Settings::save(std::string const& path) { FILE* opt = fopen(path.c_str(), "wb"); gvl::octet_stream_writer writer(gvl::stream_ptr(new gvl::fstream(opt))); gvl::default_serialization_context context; archive_liero(gvl::out_archive(writer, context), *this); } void Settings::generateName(WormSettings& ws) { FILE* f = fopen(data_path->file("NAMES.DAT").c_str(), "rb"); if(!f) return; std::vector names; std::size_t len = fileLength(f); std::vector chars(len); checkedFread(&chars[0], 1, len, f); fclose(f); std::size_t begin = 0; for(std::size_t i = 0; i < len; ++i) { if(chars[i] == '\r' || chars[i] == '\n') { if(i > begin) { names.push_back(std::string(chars.begin() + begin, chars.begin() + i)); } begin = i + 1; } } if(!names.empty()) { ws.name = names[gfx.rand(Uint32(names.size()))]; ws.randomName = true; } } lierolibre-0.5/src/settings.hpp000066400000000000000000000164661205125547100166650ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_SETTINGS_HPP #define LIERO_SETTINGS_HPP #include "worm.hpp" #include #include #include #include #include #include // For gvl::enable_when #include "version.hpp" // We isolate extensions for the benefit of the .dat loader. // It can then easily reset the extensions if they fail to load. struct Extensions { static int const myVersion = 2; Extensions(); // Extensions bool extensions; bool recordReplays; bool loadPowerlevelPalette; uint32_t scaleFilter; bool depth32; int bloodParticleMax; }; struct Settings : gvl::shared, Extensions { enum { GMKillEmAll, GMGameOfTag, GMCtF, GMSimpleCtF }; enum { SiGameMode, SiLives, SiTimeToLose, // Extra SiFlagsToWin, // Extra SiLoadingTimes, SiMaxBonuses, SiNamesOnBonuses, SiMap, SiAmountOfBlood, SiLevel, SiRegenerateLevel, SiShadows, SiScreenSync, SiLoadChange, SiPlayer1Options, SiPlayer2Options, SiWeaponOptions }; enum { SfNearest, SfScale2X, SfMax }; static int const selectableWeapons = 5; static int const wormAnimTab[]; Settings(); bool load(std::string const& path); void save(std::string const& path); gvl::gash::value_type& updateHash(); static void generateName(WormSettings& ws); uint32_t weapTable[40]; int maxBonuses; int blood; int timeToLose; int flagsToWin; uint32_t gameMode; bool shadow; bool loadChange; bool namesOnBonuses; bool regenerateLevel; int lives; int loadingTime; bool randomLevel; std::string levelFile; bool map; bool screenSync; gvl::shared_ptr wormSettings[2]; gvl::gash::value_type hash; }; template inline int limit(int v) { if(v >= H) return H - 1; else if(v < L) return L; return v; } template void archive_liero(Archive ar, Settings& settings) { ar .ui8(settings.maxBonuses) .ui16_le(settings.loadingTime) .ui16_le(settings.lives) .ui16_le(settings.timeToLose) .ui16_le(settings.flagsToWin) .b(settings.screenSync) .b(settings.map) .ui8(settings.wormSettings[0]->controller) .ui8(settings.wormSettings[1]->controller) .b(settings.randomLevel) .ui16_le(settings.blood) .ui8(settings.gameMode) .b(settings.namesOnBonuses) .b(settings.regenerateLevel) .b(settings.shadow); if(ar.in) settings.wormSettings[0]->controller &= 1; if(ar.in) settings.wormSettings[1]->controller &= 1; for(int i = 0; i < 40; ++i) { ar.ui8(settings.weapTable[i]); if(ar.in) settings.weapTable[i] = limit<0, 3>(settings.weapTable[i]); } for(int i = 0; i < 2; ++i) for(int j = 0; j < 3; ++j) { ar.ui8(settings.wormSettings[i]->rgb[j]); if(ar.in) settings.wormSettings[i]->rgb[j] &= 63; } for(int i = 0; i < 2; ++i) { for(int j = 0; j < 5; ++j) { ar.ui8(settings.wormSettings[i]->weapons[j]); } } ar.ui16_le(settings.wormSettings[0]->health); ar.ui16_le(settings.wormSettings[1]->health); for(int i = 0; i < 2; ++i) { if(settings.wormSettings[i]->randomName && ar.out) { std::string empty; ar.pascal_str(empty, 21); } else { ar.pascal_str(settings.wormSettings[i]->name, 21); if(ar.in) { if(settings.wormSettings[i]->name.empty()) settings.generateName(*settings.wormSettings[i]); else settings.wormSettings[i]->randomName = false; } } } ar.b(settings.loadChange); char lieroStr[] = "\x05LIERO\0\0"; for(std::size_t i = 0; i < sizeof(lieroStr); ++i) { ar.ui8(lieroStr[i]); } for(int i = 0; i < 2; ++i) { for(int j = 0; j < 7; ++j) { uint32_t v; if(ar.out) { v = settings.wormSettings[i]->controls[j]; v = limit<0, 177>(v); } ar.ui8(v); if(ar.in) { v = limit<0, 177>(v); settings.wormSettings[i]->controls[j] = v; } } } ar.pascal_str(settings.levelFile, 9); // TODO: Slightly bad way to detect whether extensions exist, no? try { // Extensions int fileExtensionVersion = myGameVersion; ar.ui8(fileExtensionVersion); ar.b(settings.extensions); ar.b(settings.recordReplays); ar.b(settings.loadPowerlevelPalette); ar.ui8(settings.scaleFilter); gvl::enable_when(ar, fileExtensionVersion >= 2) .b(settings.depth32, true); for(int i = 0; i < 2; ++i) { for(int c = 0; c < WormSettings::MaxControl; ++c) { int dummy = 0; gvl::enable_when(ar, fileExtensionVersion >= 2) .ui8(dummy, 255) .ui8(dummy, 255); } } for(int i = 0; i < 2; ++i) { WormSettings& ws = *settings.wormSettings[i]; for(int c = 0; c < WormSettings::MaxControlEx; ++c) { gvl::enable_when(ar, fileExtensionVersion >= 3) .ui32(ws.controlsEx[c], ws.controls[c]); } } } catch(gvl::stream_error&) { // Reset to default state settings.Extensions::operator=(Extensions()); for(int i = 0; i < 2; ++i) { WormSettings& ws = *settings.wormSettings[i]; ws.WormSettingsExtensions::operator=(WormSettingsExtensions()); } } } // Settings archiving, not including player (worm) settings template void archive(Archive ar, Settings& settings) { for(int i = 0; i < 40; ++i) { ar.ui8(settings.weapTable[i]); } ar .ui16(settings.maxBonuses) .ui16(settings.blood) .ui16(settings.timeToLose) .ui16(settings.flagsToWin) .ui16(settings.gameMode) .b(settings.shadow) .b(settings.loadChange) .b(settings.namesOnBonuses) .b(settings.regenerateLevel) .ui16(settings.lives) .ui16(settings.loadingTime) .b(settings.randomLevel) .b(settings.map) .b(settings.screenSync) .str(settings.levelFile); // Extensions int fileExtensionVersion = Extensions::myVersion; ar.ui8(fileExtensionVersion); ar .b(settings.extensions) .b(settings.recordReplays) .b(settings.loadPowerlevelPalette) .ui8(settings.scaleFilter); gvl::enable_when(ar, fileExtensionVersion >= 2) .b(settings.depth32, true); ar.check() ; } #endif // LIERO_SETTINGS_HPP lierolibre-0.5/src/sfx.cpp000066400000000000000000000105431205125547100156060ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "sfx.hpp" #include "reader.hpp" #include "console.hpp" #include #include #if !DISABLE_SOUND #include #endif #include #include // TEMP Sfx sfx; #define HQ_SOUND 1 void Sfx::init() { #if !DISABLE_SOUND if(initialized) return; SDL_InitSubSystem(SDL_INIT_AUDIO); #if HQ_SOUND int ret = Mix_OpenAudio(44100, AUDIO_S16SYS, 1, 4*512); #else int ret = Mix_OpenAudio(22050, AUDIO_S16SYS, 1, 512); #endif if(ret == 0) { initialized = true; Mix_AllocateChannels(8); Mix_Volume(-1, 128); } else { Console::writeWarning(std::string("Mix_OpenAudio returned error: ") + Mix_GetError()); } #endif } void Sfx::deinit() { #if !DISABLE_SOUND if(!initialized) return; initialized = false; Mix_CloseAudio(); SDL_QuitSubSystem(SDL_INIT_AUDIO); #endif } void Sfx::loadFromSND() { #if !DISABLE_SOUND FILE* snd = openLieroSND(); int count = readUint16(snd); sounds.resize(count); long oldPos = ftell(snd); for(int i = 0; i < count; ++i) { fseek(snd, oldPos + 8, SEEK_SET); // Skip name int offset = readUint32(snd); int length = readUint32(snd); oldPos = ftell(snd); #if HQ_SOUND int byteLength = length * 4; #else int byteLength = length * 2; #endif Uint8* buf = new Uint8[byteLength]; sounds[i].allocated = 0; sounds[i].abuf = buf; sounds[i].alen = byteLength; sounds[i].volume = 128; Sint16* ptr = reinterpret_cast(buf); std::vector temp(length); if(length > 0) { fseek(snd, offset, SEEK_SET); checkedFread(&temp[0], 1, length, snd); } #if HQ_SOUND int prev = (temp[0]) * 30; *ptr++ = prev; for(int j = 1; j < length; ++j) { int cur = temp[j] * 30; *ptr++ = (prev + cur) / 2; *ptr++ = cur; prev = cur; } *ptr++ = prev; #else for(int j = 0; j < length; ++j) { ptr[j] = int(temp[j]) * 30; } #endif } #endif } void Sfx::play(int sound, void* id, int loops) { #if !DISABLE_SOUND if(!initialized) return; for(int i = 0; i < 8; ++i) { if(!Mix_Playing(i)) { playOn(i, sound, id, loops); return; } } #endif } void Sfx::playOn(int channel, int sound, void* id, int loops) { #if !DISABLE_SOUND if(!initialized) return; if(sound < 0 || sound >= int(sounds.size())) { Console::writeWarning("Attempt to play non-existent sound"); return; } Mix_PlayChannel(channel, &sounds[sound], loops); channelInfo[channel].id = id; #endif } void Sfx::stop(void* id) { #if !DISABLE_SOUND if(!initialized) return; for(int i = 0; i < 8; ++i) { if(Mix_Playing(i) && channelInfo[i].id == id) { Mix_HaltChannel(i); } } #endif } bool Sfx::isPlaying(void* id) { #if !DISABLE_SOUND if(!initialized) return false; for(int i = 0; i < 8; ++i) { if(Mix_Playing(i) && channelInfo[i].id == id) return true; } #endif return false; } Sfx::~Sfx() { #if !DISABLE_SOUND for(std::size_t i = 0; i < sounds.size(); ++i) { delete [] sounds[i].abuf; sounds[i].abuf = 0; } #endif } lierolibre-0.5/src/sfx.hpp000066400000000000000000000056311205125547100156150ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_SFX_HPP #define LIERO_SFX_HPP #if !DISABLE_SOUND #include #endif #include #include struct Sfx { struct ChannelInfo { ChannelInfo() : id(0) { } void* id; // ID of the sound playing on this channel }; Sfx() : initialized(false) { } ~Sfx(); void init(); void deinit(); void loadFromSND(); void play(int sound, void* id = 0, int loops = 0); bool isPlaying(void* id); void playOn(int channel, int sound, void* id, int loops = 0); void stop(void* id); #if !DISABLE_SOUND std::vector sounds; ChannelInfo channelInfo[8]; #endif bool initialized; }; extern Sfx sfx; struct SoundPlayer : gvl::shared { virtual void play(int sound, void* id = 0, int loops = 0) = 0; virtual bool isPlaying(void* id) = 0; virtual void playOn(int channel, int sound, void* id, int loops = 0) = 0; virtual void stop(void* id) = 0; }; struct DefaultSoundPlayer : SoundPlayer { void play(int sound, void* id = 0, int loops = 0) { sfx.play(sound, id, loops); } bool isPlaying(void* id) { return sfx.isPlaying(id); } void playOn(int channel, int sound, void* id, int loops = 0) { return sfx.playOn(channel, sound, id, loops); } void stop(void* id) { sfx.stop(id); } }; struct NullSoundPlayer : SoundPlayer { void play(int sound, void* id, int loops) { } bool isPlaying(void* id) { return false; } void playOn(int channel, int sound, void* id, int loops) { } void stop(void* id) { } }; #endif // LIERO_SFX_HPP lierolibre-0.5/src/sobject.cpp000066400000000000000000000161441205125547100164420ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "sobject.hpp" #include "worm.hpp" #include "game.hpp" #include "viewport.hpp" #include "gfx.hpp" #include "sfx.hpp" #include "console.hpp" #include "text.hpp" #include #include #include #include // TEMP void SObjectType::create(Game& game, int x, int y, Worm* owner) { Common& common = *game.common; SObject& obj = *game.sobjects.newObjectReuse(); assert(numSounds < 10); if(startSound >= 0) game.soundPlayer->play(game.rand(numSounds) + startSound); for(std::size_t i = 0; i < game.viewports.size(); ++i) { Viewport& v = *game.viewports[i]; if(x > v.x && x < v.x + v.rect.width() && y > v.y && y < v.y + v.rect.height()) { if(itof(shake) > v.shake) v.shake = itof(shake); } } obj.id = id; obj.x = x - 8; obj.y = y - 8; obj.curFrame = 0; obj.animDelay = animDelay; if(flash > game.screenFlash) { game.screenFlash = flash; } if(damage > 0) { for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& w = *game.worms[i]; int wix = ftoi(w.x); int wiy = ftoi(w.y); if(wix < x + detectRange && wix > x - detectRange && wiy < y + detectRange && wiy > y - detectRange) { int delta = wix - x; int power = detectRange - std::abs(delta); int powerSum = power; if(std::abs(w.velX) < itof(2)) // TODO: Read from EXE { if(delta > 0) w.velX += blowAway * power; else w.velX -= blowAway * power; } delta = wiy - y; power = detectRange - std::abs(delta); powerSum = (powerSum + power) / 2; if(std::abs(w.velY) < itof(2)) // TODO: Read from EXE { if(delta > 0) w.velY += blowAway * power; else w.velY -= blowAway * power; } int z = damage * powerSum; if(detectRange) z /= detectRange; if(w.health > 0) { w.health -= z; if(w.health <= 0) w.lastKilledBy = owner; int bloodAmount = game.settings->blood * powerSum / 100; if(bloodAmount > 0) { for(int i = 0; i < bloodAmount; ++i) { int angle = game.rand(128); common.nobjectTypes[6].create2( game, angle, w.velX / 3, w.velY / 3, w.x, w.y, 0, &w); } } if(game.rand(3) == 0) { int snd = 18 + game.rand(3); // NOTE: MUST be outside the unpredictable branch below if(!game.soundPlayer->isPlaying(&w)) { game.soundPlayer->play(snd, &w); } } } } } // for( ... worms ... int objBlowAway = blowAway / 3; // TODO: Read from EXE for(Game::WObjectList::iterator i = game.wobjects.begin(); i != game.wobjects.end(); ++i) { Weapon& weapon = common.weapons[i->id]; if(weapon.affectByExplosions) { int ix = ftoi(i->x), iy = ftoi(i->y); if(ix < x + detectRange && ix > x - detectRange && iy < y + detectRange && iy > y - detectRange) { int delta = ix - x; int power = detectRange - std::abs(delta); if(power > 0) { if(delta > 0) i->velX += objBlowAway * power; else if(delta < 0) i->velX -= objBlowAway * power; } delta = iy - y; power = detectRange - std::abs(delta); if(power > 0) { if(delta > 0) i->velY += objBlowAway * power; else if(delta < 0) i->velY -= objBlowAway * power; } // Is it a booby trap? if(i->id == 34) // TODO: Read from EXE { i->blowUpObject(game, owner); } } } // if( ... affectByExplosions ... } // for( ... wobjects ... for(Game::NObjectList::iterator i = game.nobjects.begin(); i != game.nobjects.end(); ++i) { NObjectType& t = common.nobjectTypes[i->id]; if(t.affectByExplosions) { int ix = ftoi(i->x), iy = ftoi(i->y); if(ix < x + detectRange && ix > x - detectRange && iy < y + detectRange && iy > y - detectRange) { int delta = ix - x; int power = detectRange - std::abs(delta); if(power > 0) { if(delta > 0) i->velX += objBlowAway * power; else if(delta < 0) i->velX -= objBlowAway * power; } delta = iy - y; power = detectRange - std::abs(delta); if(power > 0) { if(delta > 0) i->velY += objBlowAway * power; else if(delta < 0) i->velY -= objBlowAway * power; } } } } { int width = detectRange / 2; Rect rect(x - width, y - width, x + width + 1, y + width + 1); rect.intersect(game.level.rect()); for(int y = rect.y1; y < rect.y2; ++y) for(int x = rect.x1; x < rect.x2; ++x) { PalIdx pix = game.level.pixel(x, y); if(common.materials[pix].anyDirt() && game.rand(8) == 0) { int angle = game.rand(128); common.nobjectTypes[2].create2( game, angle, 0, 0, itof(x), itof(y), pix, owner); } } } } // if(damage ... if(dirtEffect >= 0) { drawDirtEffect(common, game.rand, game.level, dirtEffect, x - 7, y - 7); if(game.settings->shadow) correctShadow(common, game.level, Rect(x - 10, y - 10, x + 11, y + 11)); } for(Game::BonusList::iterator i = game.bonuses.begin(); i != game.bonuses.end(); ++i) { int ix = ftoi(i->x), iy = ftoi(i->y); if(ix > x - detectRange && ix < x + detectRange && iy > y - detectRange && iy < y + detectRange) { game.bonuses.free(i); common.sobjectTypes[0].create(game, ix, iy, owner); } } // for( ... bonuses ... } void SObject::process(Game& game) { Common& common = *game.common; SObjectType& t = common.sobjectTypes[id]; if(--animDelay <= 0) { animDelay = t.animDelay; ++curFrame; if(curFrame > t.numFrames) game.sobjects.free(this); } } lierolibre-0.5/src/sobject.hpp000066400000000000000000000037461205125547100164530ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_SOBJECT_HPP #define LIERO_SOBJECT_HPP #include "math.hpp" #include "objectList.hpp" #include "exactObjectList.hpp" struct Worm; struct Game; struct SObjectType { void create(Game& game, int x, int y, Worm* owner); int startSound; int numSounds; int animDelay; int startFrame; int numFrames; int detectRange; int damage; int blowAway; bool shadow; int shake; int flash; int dirtEffect; int id; }; struct SObject : ExactObjectListBase { void process(Game& game); fixed x, y; int id; // type int curFrame; int animDelay; }; #endif // LIERO_SOBJECT_HPP lierolibre-0.5/src/sys.cpp000066400000000000000000000031441205125547100156230ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "sys.hpp" #if GVL_WIN32 #include namespace Win32 { int getFreeMemory() { MEMORYSTATUS status; GlobalMemoryStatus(&status); return int(status.dwAvailPhys / 1024); } } #endif lierolibre-0.5/src/sys.hpp000066400000000000000000000032131205125547100156250ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UUID_88D344A5E8A241202CFCE098C27844EB #define UUID_88D344A5E8A241202CFCE098C27844EB #include #if GVL_WIN32 namespace Win32 { int getFreeMemory(); } #endif #endif // UUID_88D344A5E8A241202CFCE098C27844EB lierolibre-0.5/src/text.cpp000066400000000000000000000057351205125547100160010ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "text.hpp" #include char const* timeToString(int sec) { static char ret[6]; ret[0] = '0' + (sec / 600); ret[1] = '0' + (sec % 600) / 60; ret[2] = ':'; ret[3] = '0' + (sec % 60) / 10; ret[4] = '0' + (sec % 10); ret[5] = 0; return ret; } char const* timeToStringEx(int ms) { static char ret[9]; ret[0] = '0' + (ms / 600000); ret[1] = '0' + (ms % 600000) / 60000; ret[2] = ':'; ret[3] = '0' + (ms % 60000) / 10000; ret[4] = '0' + (ms % 10000) / 1000; ret[5] = '.'; ret[6] = '0' + (ms % 1000) / 100; ret[7] = '0' + (ms % 100) / 10; ret[8] = 0; return ret; } int safeToUpper(char ch) { return std::toupper(static_cast(ch)); } bool ciCompare(std::string const& a, std::string const& b) { if(a.size() != b.size()) return false; for(std::size_t i = 0; i < a.size(); ++i) { if(safeToUpper(a[i]) != safeToUpper(b[i])) return false; } return true; } bool ciLess(std::string const& a, std::string const& b) { for(std::size_t i = 0; i < a.size(); ++i) { if(i >= b.size()) // a is longer, thus a > b return false; int ach = safeToUpper(a[i]); int bch = safeToUpper(b[i]); if(ach < bch) return true; else if(ach > bch) return false; } return b.size() > a.size(); // if b is longer, then a < b, otherwise a == b } int unicodeToDOS(int c) { int table[][2] = { {229, 0x86}, {228, 0x84}, {246, 0x94}, {197, 0x8f}, {196, 0x8e}, {214, 0x99} }; for(std::size_t i = 0; i < sizeof(table) / sizeof(*table); ++i) { if(table[i][0] == c) return table[i][1]; } return c & 0x7f; // Return ASCII } lierolibre-0.5/src/text.hpp000066400000000000000000000042741205125547100160030ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_TEXT_HPP #define LIERO_TEXT_HPP #include #include inline std::string toString(int v) { char buf[20]; std::sprintf(buf, "%d", v); return buf; } char const* timeToString(int sec); char const* timeToStringEx(int ms); inline void rtrim(std::string& str) { std::string::size_type e = str.find_last_not_of(" \t\r\n"); if(e == std::string::npos) str.clear(); else str.erase(e + 1); } inline void findReplace(std::string& str, std::string const& find, std::string const& replace) { std::string::size_type p = str.find(find); if(p != std::string::npos) str.replace(p, find.size(), replace); } bool ciCompare(std::string const& a, std::string const& b); bool ciLess(std::string const& a, std::string const& b); int unicodeToDOS(int c); #endif // LIERO_TEXT_HPP lierolibre-0.5/src/to_string.cpp000066400000000000000000000032161205125547100170150ustar00rootroot00000000000000/* * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "to_string.hpp" #include #include #include std::string to_string(int value) { std::ostringstream result; if (!(result << value)) throw BadConversion("to_string()"); return result.str(); } lierolibre-0.5/src/to_string.hpp000066400000000000000000000034461205125547100170270ustar00rootroot00000000000000/* * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* This function exists in C++11 but is included in a very basic * implementation for compatibility purposes. */ #ifndef TO_STRING_HPP #define TO_STRING_HPP #include #include class BadConversion : public std::runtime_error { public: BadConversion(std::string const& s) : std::runtime_error(s) { } }; std::string to_string(int value); #endif // TO_STRING_HPP lierolibre-0.5/src/version.hpp000066400000000000000000000030551205125547100165000ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_VERSION_HPP #define LIERO_VERSION_HPP static int const myGameVersion = 3; #endif // LIERO_VERSION_HPP lierolibre-0.5/src/viewport.cpp000066400000000000000000000375651205125547100167020ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "viewport.hpp" #include "gfx.hpp" #include "game.hpp" #include "text.hpp" #include "math.hpp" #include "constants.hpp" #include struct PreserveClipRect { PreserveClipRect(SDL_Surface* surf) : surf(surf) { SDL_GetClipRect(surf, &rect); } ~PreserveClipRect() { SDL_SetClipRect(surf, &rect); } SDL_Surface* surf; SDL_Rect rect; }; void Viewport::process() { Common& common = *game.common; if(worm->killedTimer <= 0) { if(worm->visible) { int sumX = 0; int sumY = 0; int objectsFound = 0; WormWeapon const& ww = worm->weapons[worm->currentWeapon]; if(common.weapons[ww.id].shotType == Weapon::STSteerable) { for(Game::WObjectList::iterator i = game.wobjects.begin(); i != game.wobjects.end(); ++i) { if(i->id == ww.id && i->owner == worm) { ++objectsFound; sumX += ftoi(i->x); sumY += ftoi(i->y); } } } if(objectsFound > 0) { setCenter(sumX / objectsFound, sumY / objectsFound); } else { setCenter(ftoi(worm->x), ftoi(worm->y)); } } else { scrollTo(ftoi(worm->x), ftoi(worm->y), 4); } } else if(worm->health < 0) { setCenter(ftoi(worm->x), ftoi(worm->y)); if(worm->killedTimer == 150) // TODO: This depends on what is the starting killedTimer bannerY = -8; } int realShake = ftoi(shake); if(realShake > 0) { x += rand(realShake * 2) - realShake; y += rand(realShake * 2) - realShake; } if(x < 0) x = 0; if(y < 0) y = 0; if(x > maxX) x = maxX; if(y > maxY) y = maxY; /* if(worm->health <= 0) { if((game.cycles & 1) == 0) { if(worm->killedTimer > 16) { if(bannerY < 2) ++bannerY; } else { if(bannerY > -8) --bannerY; } } }*/ } void Viewport::draw(bool isReplay) { Common& common = *game.common; if(worm->visible) { int lifebarWidth = worm->health * 100 / worm->settings->health; drawBar(inGameX, 161, lifebarWidth, lifebarWidth/10 + 234); } else { int lifebarWidth = 100 - (worm->killedTimer * 25) / 37; if(lifebarWidth > 0) { if(lifebarWidth > 100) lifebarWidth = 100; drawBar(inGameX, 161, lifebarWidth, lifebarWidth/10 + 234); } } // Draw kills status WormWeapon const& ww = worm->weapons[worm->currentWeapon]; if(ww.available) { if(ww.ammo > 0) { int ammoBarWidth = ww.ammo * 100 / common.weapons[ww.id].ammo; if(ammoBarWidth > 0) drawBar(inGameX, 166, ammoBarWidth, ammoBarWidth/10 + 245); } } else { int ammoBarWidth = 0; if(common.weapons[ww.id].loadingTime != 0) { int computedLoadingTime = common.weapons[ww.id].computedLoadingTime(*game.settings); ammoBarWidth = 100 - ww.loadingLeft * 100 / computedLoadingTime; } else { ammoBarWidth = 100 - ww.loadingLeft * 100; } if(ammoBarWidth > 0) drawBar(inGameX, 166, ammoBarWidth, ammoBarWidth/10 + 245); if((game.cycles % 20) > 10 && worm->visible) { common.font.drawText(common.texts.reloading, inGameX, 164, 50); } } common.font.drawText((common.texts.kills + toString(worm->kills)), inGameX, 171, 10); if(isReplay) { common.font.drawText(worm->settings->name, inGameX, 192, 4); common.font.drawText(timeToStringEx(game.cycles * 14), 95, 185, 7); } switch(game.settings->gameMode) { case Settings::GMKillEmAll: { common.font.drawText((common.texts.lives + toString(worm->lives)), inGameX, 178, 6); } break; case Settings::GMGameOfTag: { int const stateColours[] = {6, 10, 79, 4}; int state = 0; for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& w = *game.worms[i]; if(&w != worm && w.timer >= worm->timer) state = 1; // We're better or equal off } int color; if(game.lastKilled == worm) color = stateColours[state]; else color = stateColours[state + 2]; common.font.drawText(timeToString(worm->timer), 5, 106 + 84*worm->index, 161, color); } break; } PreserveClipRect pcr(gfx.screen); SDL_Rect viewportClip; viewportClip.x = rect.x1; viewportClip.y = rect.y1; viewportClip.w = rect.width(); viewportClip.h = rect.height(); SDL_SetClipRect(gfx.screen, &viewportClip); int offsX = rect.x1 - x; int offsY = rect.y1 - y; blitImageNoKeyColour(gfx.screen, &game.level.data[0], offsX, offsY, game.level.width, game.level.height); // TODO: Unhardcode if(!worm->visible && worm->killedTimer <= 0 && !worm->ready) { common.font.drawText(common.texts.pressFire, rect.center_x() - 30, 76, 0); common.font.drawText(common.texts.pressFire, rect.center_x() - 31, 75, 50); } if(bannerY > -8 && worm->health <= 0) { if(game.settings->gameMode == Settings::GMGameOfTag && game.gotChanged) { common.font.drawText(common.S[YoureIt], rect.x1 + 3, bannerY + 1, 0); common.font.drawText(common.S[YoureIt], rect.x1 + 2, bannerY, 50); } } for(std::size_t i = 0; i < game.viewports.size(); ++i) { Viewport* v = game.viewports[i]; if(v != this && v->worm->health <= 0 && v->bannerY > -8) { if(v->worm->lastKilledBy == worm) { std::string msg(common.S[KilledMsg] + v->worm->settings->name); common.font.drawText(msg, rect.x1 + 3, v->bannerY + 1, 0); common.font.drawText(msg, rect.x1 + 2, v->bannerY, 50); } else { std::string msg(v->worm->settings->name + common.S[CommittedSuicideMsg]); common.font.drawText(msg, rect.x1 + 3, v->bannerY + 1, 0); common.font.drawText(msg, rect.x1 + 2, v->bannerY, 50); } } } for(Game::BonusList::iterator i = game.bonuses.begin(); i != game.bonuses.end(); ++i) { if(i->timer > common.C[BonusFlickerTime] || (game.cycles & 3) == 0) { int f = common.bonusFrames[i->frame]; blitImage( gfx.screen, common.smallSprites.spritePtr(f), ftoi(i->x) - x - 3 + rect.x1, ftoi(i->y) - y - 3 + rect.y1, 7, 7); if(game.settings->shadow) { blitShadowImage( common, gfx.screen, common.smallSprites.spritePtr(f), ftoi(i->x) - x - 5 + rect.x1, ftoi(i->y) - y - 1 + rect.y1, // This was - 3 in the original, but that seems wrong 7, 7); } if(game.settings->namesOnBonuses && i->frame == 0) { std::string const& name = common.weapons[i->weapon].name; int len = int(name.size()) * 4; common.drawTextSmall( name.c_str(), ftoi(i->x) - x - len/2 + rect.x1, ftoi(i->y) - y - 10 + rect.y1); } } } for(Game::SObjectList::iterator i = game.sobjects.begin(); i != game.sobjects.end(); ++i) { SObjectType const& t = common.sobjectTypes[i->id]; int frame = i->curFrame + t.startFrame; // TODO: Check that blitImageR is the correct one to use (probably) blitImageR( gfx.screen, common.largeSprites.spritePtr(frame), i->x + offsX, i->y + offsY, 16, 16); if(game.settings->shadow) { blitShadowImage( common, gfx.screen, common.largeSprites.spritePtr(frame), i->x + offsX - 3, i->y + offsY + 3, // TODO: Original doesn't offset the shadow, which is clearly wrong. Check that this offset is correct. 16, 16); } } // TODO: Check order of drawing between bonuses, wobjects, etc. for(Game::WObjectList::iterator i = game.wobjects.begin(); i != game.wobjects.end(); ++i) { Weapon const& w = common.weapons[i->id]; if(w.startFrame > -1) { int curFrame = i->curFrame; int shotType = w.shotType; if(shotType == 2) { curFrame += 4; curFrame >>= 3; if(curFrame < 0) curFrame = 16; else if(curFrame > 15) curFrame -= 16; } else if(shotType == 3) { if(curFrame > 64) --curFrame; curFrame -= 12; curFrame >>= 3; if(curFrame < 0) curFrame = 0; else if(curFrame > 12) curFrame = 12; } int posX = ftoi(i->x) - 3; int posY = ftoi(i->y) - 3; if(game.settings->shadow && w.shadow) { blitShadowImage( common, gfx.screen, common.smallSprites.spritePtr(w.startFrame + curFrame), posX - x - 3 + rect.x1, posY - y + 3 + rect.y1, // TODO: Combine rect.x1 - x into one number, same with y 7, 7); } blitImage( gfx.screen, common.smallSprites.spritePtr(w.startFrame + curFrame), posX - x + rect.x1, posY - y + rect.y1, // TODO: Combine rect.x1 - x into one number, same with y 7, 7); } else if(i->curFrame > 0) { int posX = ftoi(i->x) - x + rect.x1; int posY = ftoi(i->y) - y + rect.y1; if(isInside(gfx.screen->clip_rect, posX, posY)) gfx.screenPixels[posY*gfx.screenPitch + posX] = static_cast(i->curFrame); if(game.settings->shadow) { posX -= 3; posY += 3; if(isInside(gfx.screen->clip_rect, posX, posY)) { PalIdx& pix = gfx.screenPixels[posY*gfx.screenPitch + posX]; if(common.materials[pix].seeShadow()) pix += 4; } } } if(!common.H[HRemExp] && i->id == 34 && game.settings->namesOnBonuses) // TODO: Read from EXE { if(i->curFrame == 0) { int nameNum = int(&*i - game.wobjects.arr) % 40; // TODO: Something nicer maybe std::string const& name = common.weapons[nameNum].name; int width = int(name.size()) * 4; common.drawTextSmall( name.c_str(), ftoi(i->x) - x - width/2 + rect.x1, ftoi(i->y) - y - 10 + rect.y1); } } } for(Game::NObjectList::iterator i = game.nobjects.begin(); i != game.nobjects.end(); ++i) { NObjectType const& t = common.nobjectTypes[i->id]; if(t.startFrame > 0) { int posX = ftoi(i->x) - 3; int posY = ftoi(i->y) - 3; if(i->id >= 20 && i->id <= 21) { // Flag special case posY -= 2; posX += 3; } if(game.settings->shadow) { blitShadowImage( common, gfx.screen, common.smallSprites.spritePtr(t.startFrame + i->curFrame), posX - 3 + offsX, posY + 3 + offsY, 7, 7); } blitImage( gfx.screen, common.smallSprites.spritePtr(t.startFrame + i->curFrame), posX + offsX, posY + offsY, 7, 7); } else if(i->curFrame > 1) { int posX = ftoi(i->x) + offsX; int posY = ftoi(i->y) + offsY; if(isInside(gfx.screen->clip_rect, posX, posY)) gfx.getScreenPixel(posX, posY) = PalIdx(i->curFrame); if(game.settings->shadow) { posX -= 3; posY += 3; if(isInside(gfx.screen->clip_rect, posX, posY)) { PalIdx& pix = gfx.getScreenPixel(posX, posY); if(common.materials[pix].seeShadow()) pix += 4; } } } } for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm const& w = *game.worms[i]; if(w.visible) { int tempX = ftoi(w.x) - x - 7 + rect.x1; int tempY = ftoi(w.y) - y - 5 + rect.y1; int angleFrame = w.angleFrame(); if(w.weapons[w.currentWeapon].available) { int hotspotX = w.hotspotX - x + rect.x1; int hotspotY = w.hotspotY - y + rect.y1; WormWeapon const& ww = w.weapons[w.currentWeapon]; Weapon& weapon = common.weapons[ww.id]; if(weapon.laserSight) { drawLaserSight(hotspotX, hotspotY, tempX + 7, tempY + 4); } if(ww.id == common.C[LaserWeapon] - 1 && w.pressed(Worm::Fire)) { drawLine(hotspotX, hotspotY, tempX + 7, tempY + 4, weapon.colorBullets); } } if(w.ninjarope.out) { int ninjaropeX = ftoi(w.ninjarope.x) - x + rect.x1; int ninjaropeY = ftoi(w.ninjarope.y) - y + rect.y1; drawNinjarope(common, ninjaropeX, ninjaropeY, tempX + 7, tempY + 4); blitImage(gfx.screen, common.largeSprites.spritePtr(84), ninjaropeX - 1, ninjaropeY - 1, 16, 16); if(game.settings->shadow) { drawShadowLine(common, ninjaropeX - 3, ninjaropeY + 3, tempX + 7 - 3, tempY + 4 + 3); blitShadowImage(common, gfx.screen, common.largeSprites.spritePtr(84), ninjaropeX - 4, ninjaropeY + 2, 16, 16); } } if(common.weapons[w.weapons[w.currentWeapon].id].fireCone > -1 && w.fireConeActive) { /* TODO //NOTE! Check fctab so it's correct //NOTE! Check function 1071C and see what it actually does*/ blitFireCone( gfx.screen, w.fireCone / 2, common.fireConeSprite(angleFrame, w.direction), common.fireConeOffset[w.direction][angleFrame][0] + tempX, common.fireConeOffset[w.direction][angleFrame][1] + tempY); } blitImage(gfx.screen, common.wormSprite(w.currentFrame, w.direction, w.index), tempX, tempY, 16, 16); if(game.settings->shadow) blitShadowImage(common, gfx.screen, common.wormSprite(w.currentFrame, w.direction, w.index), tempX - 3, tempY + 3, 16, 16); } } if(worm->visible) { int tempX = ftoi(worm->x) - x - 1 + ftoi(cosTable[ftoi(worm->aimingAngle)] * 16) + rect.x1; int tempY = ftoi(worm->y) - y - 2 + ftoi(sinTable[ftoi(worm->aimingAngle)] * 16) + rect.y1; if(worm->makeSightGreen) { blitImage( gfx.screen, common.smallSprites.spritePtr(44), tempX, tempY, 7, 7); } else { blitImage( gfx.screen, common.smallSprites.spritePtr(43), tempX, tempY, 7, 7); } #ifdef TEMP common.font.drawText(toString(worm->reacts[0]), 10 + rect.x1, 10, 10); common.font.drawText(toString(worm->reacts[1]), 20 + rect.x1, 10, 10); common.font.drawText(toString(worm->reacts[2]), 30 + rect.x1, 10, 10); common.font.drawText(toString(worm->reacts[3]), 40 + rect.x1, 10, 10); if(ftoi(worm->x) < 4 && worm->velX < 0 && worm->reacts[Worm::RFRight] < 2) { std::cout << worm->reacts[Worm::RFRight] << ", " << worm->velX << ", " << worm->x << std::endl; common.font.drawText(":O", 50 + rect.x1, 10, 10); } #endif if(worm->pressed(Worm::Change)) { int id = worm->weapons[worm->currentWeapon].id; std::string const& name = common.weapons[id].name; int len = int(name.size()) * 4; // TODO: Read 4 from exe? (SW_CHARWID) common.drawTextSmall( name.c_str(), ftoi(worm->x) - x - len/2 + 1 + rect.x1, ftoi(worm->y) - y - 10 + rect.y1); } } for(Game::BObjectList::iterator i = game.bobjects.begin(); i != game.bobjects.end(); ++i) { int posX = ftoi(i->x) + offsX; int posY = ftoi(i->y) + offsY; if(isInside(gfx.screen->clip_rect, posX, posY)) gfx.getScreenPixel(posX, posY) = PalIdx(i->color); if(game.settings->shadow) { posX -= 3; posY += 3; if(isInside(gfx.screen->clip_rect, posX, posY)) { PalIdx& pix = gfx.getScreenPixel(posX, posY); if(common.materials[pix].seeShadow()) pix += 4; } } } if(game.settings->map) { int my = 5; for(int y = 162; y < 197; ++y) { int mx = 5; for(int x = 134; x < 185; ++x) { gfx.getScreenPixel(x, y) = game.level.checkedPixelWrap(mx, my); mx += 10; } my += 10; } for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm const& w = *game.worms[i]; if(w.visible) { int x = ftoi(w.x) / 10 + 134; int y = ftoi(w.y) / 10 + 162; gfx.getScreenPixel(x, y) = 129 + w.index * 4; } } } } lierolibre-0.5/src/viewport.hpp000066400000000000000000000054641205125547100167000ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_VIEWPORT_HPP #define LIERO_VIEWPORT_HPP #include "rect.hpp" #include "worm.hpp" #include "rand.hpp" #include struct Game; struct Viewport { Viewport(Rect rect, Worm* worm, int inGameX, int levwidth, int levheight, Game& game) : worm(worm) , bannerY(-8) , inGameX(inGameX) , rect(rect) , game(game) { rand.seed((Uint32)std::clock()); maxX = levwidth - rect.width(); maxY = levheight - rect.height(); centerX = rect.width() >> 1; centerY = rect.height() >> 1; x = 0; y = 0; shake = 0; } Viewport(Game& game) : game(game) { } int x, y; int shake; int maxX, maxY; int centerX, centerY; Worm* worm; int bannerY; int inGameX; // 0 for first, 218 for second Rand rand; Rect rect; Game& game; void setCenter(int x, int y) { this->x = x - centerX; this->y = y - centerY; } void scrollTo(int destX, int destY, int iter) { for(int c = 0; c < iter; c++) { if(x < destX - centerX) ++x; else if(x > destX - centerX) --x; if(y < destY - centerY) ++y; else if(y > destY - centerY) --y; } } void draw(bool isReplay); void process(); /* void Init(BLOCK &vp); void Limit(); void SetCenter(long _x, long _y); void ShakeIt(); void Draw(); void ScrollTo(long _x, long _y, long iter); void BlitLarge(IMAGE img, long _x, long _y); void BlitLargeShadow(IMAGE img, long _x, long _y); */ }; #endif // LIERO_VIEWPORT_HPP lierolibre-0.5/src/weapon.cpp000066400000000000000000000244641205125547100163060ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "weapon.hpp" #include "game.hpp" #include "sfx.hpp" #include "math.hpp" #include "gfx.hpp" #include "constants.hpp" #include int Weapon::computedLoadingTime(Settings& settings) { int ret = (settings.loadingTime * loadingTime) / 100; if(ret == 0) ret = 1; return ret; } void Weapon::fire(Game& game, int angle, fixed velX, fixed velY, int speed, fixed x, fixed y, Worm* owner) { WObject* obj = game.wobjects.newObjectReuse(); obj->id = id; obj->x = x; obj->y = y; obj->owner = owner; if(distribution) { obj->velX = cosTable[angle] * speed / 100 + velX + game.rand(distribution * 2) - distribution; obj->velY = sinTable[angle] * speed / 100 + velY + game.rand(distribution * 2) - distribution; } else { obj->velX = cosTable[angle] * speed / 100 + velX; obj->velY = sinTable[angle] * speed / 100 + velY; } if(startFrame >= 0) { if(shotType == STNormal) { if(loopAnim) { if(numFrames) obj->curFrame = game.rand(numFrames + 1); else obj->curFrame = game.rand(2); } else obj->curFrame = 0; } else if(shotType == STDType1) { if(angle > 64) --angle; int curFrame = (angle - 12) >> 3; if(curFrame < 0) curFrame = 0; else if(curFrame > 12) curFrame = 12; obj->curFrame = curFrame; } else if(shotType == STDType2 || shotType == STSteerable) { obj->curFrame = angle; } else obj->curFrame = 0; } else { obj->curFrame = colorBullets - game.rand(2); } obj->timeLeft = timeToExplo; if(timeToExploV) obj->timeLeft -= game.rand(timeToExploV); } void WObject::blowUpObject(Game& game, Worm* cause) { Common& common = *game.common; Weapon& w = common.weapons[id]; fixed x = this->x; fixed y = this->y; fixed velX = this->velX; fixed velY = this->velY; game.wobjects.free(this); if(w.createOnExp >= 0) { common.sobjectTypes[w.createOnExp].create(game, ftoi(x), ftoi(y), cause); } if(w.exploSound >= 0) { game.soundPlayer->play(w.exploSound); } int splinters = w.splinterAmount; if(splinters > 0) { if(w.splinterScatter == 0) { for(int i = 0; i < splinters; ++i) { int angle = game.rand(128); int colorSub = game.rand(2); common.nobjectTypes[w.splinterType].create2( game, angle, 0, 0, x, y, w.splinterColour - colorSub, cause); } } else { for(int i = 0; i < splinters; ++i) { int colorSub = game.rand(2); common.nobjectTypes[w.splinterType].create1( game, velX, velY, x, y, w.splinterColour - colorSub, cause); } } } if(w.dirtEffect >= 0) { int ix = ftoi(x), iy = ftoi(y); drawDirtEffect(common, game.rand, game.level, w.dirtEffect, ftoi(x) - 7, ftoi(y) - 7); if(game.settings->shadow) correctShadow(common, game.level, Rect(ix - 10, iy - 10, ix + 11, iy + 11)); } } void WObject::process(Game& game) { int iter = 0; bool bounced = false; bool doExplode = false; bool doRemove = false; Common& common = *game.common; Weapon& w = common.weapons[id]; // As liero would do this while rendering, we try to do it as early as possible if(common.H[HRemExp] && id == common.C[RemExpObject] - 1) { if(owner->pressed(Worm::Change) && owner->pressed(Worm::Fire)) { timeLeft = 0; } } do { ++iter; x += velX; y += velY; if(w.shotType == 2) { fixed dirX = cosTable[curFrame]; fixed dirY = sinTable[curFrame]; fixed newVelX = dirX * w.speed / 100; fixed newVelY = dirY * w.speed / 100; if(owner->visible && owner->pressed(Worm::Up)) { newVelX += w.addSpeed * dirX / 100; newVelY += w.addSpeed * dirY / 100; } velX = ((velX * 8) + newVelX) / 9; velY = ((velY * 8) + newVelY) / 9; // TODO: Read from EXE } else if(w.shotType == 3) { fixed dirX = cosTable[curFrame]; fixed dirY = sinTable[curFrame]; fixed addVelX = dirX * w.addSpeed / 100; fixed addVelY = dirY * w.addSpeed / 100; velX += addVelX; velY += addVelY; if(w.distribution) { velX += game.rand(w.distribution * 2) - w.distribution; // TODO: We should do game.rand(w.distribution * 2) here, no? Original doesn't velY += game.rand(w.distribution * 2) - w.distribution; } } if(w.bounce > 0) { int ix = ftoi(x); int iy = ftoi(y); int inewX = ftoi(x + velX); int inewY = ftoi(y + velY); if(!game.level.inside(inewX, iy) || game.pixelMat(inewX, iy).dirtRock()) { if(w.bounce != 100) { velX = -velX * w.bounce / 100; velY = (velY * 4) / 5; // TODO: Read from EXE } else velX = -velX; bounced = true; } if(!game.level.inside(ix, inewY) || game.pixelMat(ix, inewY).dirtRock()) { if(w.bounce != 100) { velY = -velY * w.bounce / 100; velX = (velX * 4) / 5; // TODO: Read from EXE } else velY = -velY; bounced = true; } } if(w.multSpeed != 100) { velX = velX * w.multSpeed / 100; velY = velY * w.multSpeed / 100; } if(w.objTrailType >= 0 && (game.cycles % w.objTrailDelay) == 0) { common.sobjectTypes[w.objTrailType].create(game, ftoi(x), ftoi(y), owner); } if(w.partTrailObj >= 0 && (game.cycles % w.partTrailDelay) == 0) { if(w.partTrailType == 1) { common.nobjectTypes[w.partTrailObj].create1( game, velX / common.C[SplinterLarpaVelDiv], velY / common.C[SplinterLarpaVelDiv], x, y, 0, owner); } else { int angle = game.rand(128); common.nobjectTypes[w.partTrailObj].create2( game, angle, velX / common.C[SplinterCracklerVelDiv], velY / common.C[SplinterCracklerVelDiv], x, y, 0, owner); } } if(w.collideWithObjects) { for(Game::WObjectList::iterator i = game.wobjects.begin(); i != game.wobjects.end(); ++i) { if(i->id != id || i->owner != owner) { if(x >= i->x - itof(2) && x <= i->x + itof(2) && y >= i->y - itof(2) && y <= i->y + itof(2)) { i->velX += velX * w.blowAway / 100; i->velY += velY * w.blowAway / 100; } } } for(Game::NObjectList::iterator i = game.nobjects.begin(); i != game.nobjects.end(); ++i) { if(i->id != id || i->owner != owner) { if(x >= i->x - itof(2) && x <= i->x + itof(2) && y >= i->y - itof(2) && y <= i->y + itof(2)) { i->velX += velX * w.blowAway / 100; i->velY += velY * w.blowAway / 100; } } } } int inewX = ftoi(x + velX); int inewY = ftoi(y + velY); if(inewX < 0) x = 0; if(inewY < 0) y = 0; if(inewX >= game.level.width) x = itof(game.level.width - 1); if(inewY >= game.level.height) y = itof(game.level.height - 1); if(!game.level.inside(inewX, inewY) || game.pixelMat(inewX, inewY).dirtRock()) { if(w.bounce == 0) { if(w.explGround) { doExplode = true; } else { velX = 0; velY = 0; } } } else { velY += w.gravity; // The original tested w.gravity first, which doesn't seem like a gain if(w.numFrames > 0) { if((game.cycles & 7) == 0) { if(!w.loopAnim) { if(++curFrame > w.numFrames) curFrame = 0; } else { if(velX < 0) { if(--curFrame < 0) curFrame = w.numFrames; } else if(velX > 0) { if(++curFrame > w.numFrames) curFrame = 0; } } } } } if(w.timeToExplo > 0) { if(--timeLeft < 0) doExplode = true; } for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& worm = *game.worms[i]; // TODO: The original tests wobjblood, which may not be 0 when w.bloodOnHit is. // Change to use that here too. if((w.hitDamage || w.blowAway || w.bloodOnHit || w.wormCollide) && checkForSpecWormHit(ftoi(x), ftoi(y), w.detectDistance, worm)) { worm.velX += (velX * w.blowAway) / 100; worm.velY += (velY * w.blowAway) / 100; worm.health -= w.hitDamage; if(worm.health <= 0) // Original has worm.health < 0 which is wrong { worm.lastKilledBy = owner; } int bloodAmount = w.bloodOnHit * game.settings->blood / 100; for(int i = 0; i < bloodAmount; ++i) { int angle = game.rand(128); common.nobjectTypes[6].create2(game, angle, velX / 3, velY / 3, x, y, 0, &worm); } if(w.hitDamage > 0 && worm.health > 0 && game.rand(3) == 0) { int snd = game.rand(3) + 18; // NOTE: MUST be outside the unpredictable branch below if(!game.soundPlayer->isPlaying(&worm)) { game.soundPlayer->play(snd, &worm); } } if(w.wormCollide) { if(game.rand(w.wormCollide) == 0) { if(w.wormExplode) doExplode = true; doRemove = true; } } } } if(doExplode) blowUpObject(game, owner); else if(doRemove) game.wobjects.free(this); } while(w.shotType == Weapon::STLaser //&& !doExplode && used // TEMP && (iter < 8 || w.id == 28)); } lierolibre-0.5/src/weapon.hpp000066400000000000000000000057361205125547100163140ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_WEAPON_HPP #define LIERO_WEAPON_HPP #include "math.hpp" #include "objectList.hpp" #include "exactObjectList.hpp" #include struct Worm; struct Game; struct Settings; struct Weapon { enum { STNormal, STDType1, STSteerable, STDType2, STLaser }; void fire(Game& game, int angle, fixed velX, fixed velY, int speed, fixed x, fixed y, Worm* owner); int detectDistance; bool affectByWorm; int blowAway; fixed gravity; bool shadow; bool laserSight; int launchSound; int loopSound; int exploSound; int speed; fixed addSpeed; int distribution; int parts; int recoil; int multSpeed; int delay; int loadingTime; int ammo; int createOnExp; int dirtEffect; int leaveShells; int leaveShellDelay; bool playReloadSound; bool wormExplode; bool explGround; bool wormCollide; int fireCone; bool collideWithObjects; bool affectByExplosions; int bounce; int timeToExplo; int timeToExploV; int hitDamage; int bloodOnHit; int startFrame; int numFrames; bool loopAnim; int shotType; int colorBullets; int splinterAmount; int splinterColour; int splinterType; int splinterScatter; int objTrailType; int objTrailDelay; int partTrailType; int partTrailObj; int partTrailDelay; int computedLoadingTime(Settings& settings); int id; //int computedLoadingTime; std::string name; }; struct WObject : ExactObjectListBase { void blowUpObject(Game& game, Worm* cause); void process(Game& game); fixed x, y; fixed velX, velY; int id; Worm* owner; int curFrame; int timeLeft; }; #endif // LIERO_WEAPON_HPP lierolibre-0.5/src/weapsel.cpp000066400000000000000000000336251205125547100164540ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "weapsel.hpp" #include "gfx.hpp" #include "game.hpp" #include "worm.hpp" #include "text.hpp" #include "menu/menu.hpp" #include "sfx.hpp" #include "viewport.hpp" #include WeaponSelection::WeaponSelection(Game& game) : game(game) , enabledWeaps(0) , isReady(game.viewports.size()) , menus(game.viewports.size()) , cachedBackground(false) , focused(true) { Common& common = *game.common; for(int i = 0; i < 40; ++i) { if(game.settings->weapTable[i] == 0) ++enabledWeaps; } for(std::size_t i = 0; i < menus.size(); ++i) { bool weapUsed[256] = {}; Viewport& vp = *game.viewports[i]; Worm& worm = *vp.worm; WormSettings& ws = *worm.settings; menus[i].items.push_back(MenuItem(60, 60, common.texts.randomize)); { int x = vp.rect.center_x() - 31; int y = vp.rect.center_y() - 51; menus[i].place(x, y); } for(int j = 0; j < Settings::selectableWeapons; ++j) { if(ws.weapons[j] == 0) { ws.weapons[j] = gfx.rand(1, 41); } bool enoughWeapons = (enabledWeaps >= Settings::selectableWeapons); while(true) { int w = common.weapOrder[ws.weapons[j]]; if((!enoughWeapons || !weapUsed[w]) && game.settings->weapTable[w] <= 0) break; ws.weapons[j] = gfx.rand(1, 41); } int w = common.weapOrder[ws.weapons[j]]; weapUsed[w] = true; WormWeapon& ww = worm.weapons[j]; ww.ammo = 0; ww.id = w; menus[i].items.push_back(MenuItem(48, 48, common.weapons[w].name)); } menus[i].items.push_back(MenuItem(10, 10, common.texts.done)); worm.currentWeapon = 0; menus[i].moveToFirstVisible(); isReady[i] = (ws.controller != 0); // AIs are ready immediately } } void WeaponSelection::draw() { Common& common = *game.common; if(!cachedBackground) { game.draw(); if(game.settings->levelFile.empty()) { common.font.drawText(common.texts.levelRandom, 0, 162, 50); } else { common.font.drawText((common.texts.levelIs1 + game.settings->levelFile + common.texts.levelIs2), 0, 162, 50); } std::memcpy(&gfx.frozenScreen[0], gfx.screen->pixels, gfx.frozenScreen.size()); cachedBackground = true; } std::memcpy(gfx.screen->pixels, &gfx.frozenScreen[0], gfx.frozenScreen.size()); if(!focused) return; drawRoundedBox(114, 2, 0, 7, common.font.getDims(common.texts.selWeap)); common.font.drawText(common.texts.selWeap, 116, 3, 50); for(std::size_t i = 0; i < menus.size(); ++i) { Menu& weaponMenu = menus[i]; Viewport& vp = *game.viewports[i]; Worm& worm = *vp.worm; WormSettings& ws = *worm.settings; int width = common.font.getDims(ws.name); drawRoundedBox(weaponMenu.x + 29 - width/2, weaponMenu.y - 11, 0, 7, width); common.font.drawText(ws.name, weaponMenu.x + 31 - width/2, weaponMenu.y - 10, ws.color + 1); if(!isReady[i]) { menus[i].draw(common, false); } } // TODO: This just uses the currently activated palette, which might well be wrong. gfx.origpal.rotate(168, 174); gfx.pal = gfx.origpal; gfx.pal.fade(gfx.fadeValue); } bool WeaponSelection::processFrame() { Common& common = *game.common; bool allReady = true; for(std::size_t i = 0; i < menus.size(); ++i) { int weapID = menus[i].selection() - 1; Viewport& vp = *game.viewports[i]; Worm& worm = *vp.worm; WormSettings& ws = *worm.settings; if(!isReady[i]) { //menus[i].draw(common, ws.selWeapX - 2, 28, false, curSel[i]); if(weapID >= 0 && weapID < Settings::selectableWeapons) { if(worm.pressed(Worm::Left)) { worm.release(Worm::Left); game.soundPlayer->play(25); do { --ws.weapons[weapID]; if(ws.weapons[weapID] < 1) ws.weapons[weapID] = 40; // TODO: Unhardcode } while(game.settings->weapTable[common.weapOrder[ws.weapons[weapID]]] != 0); int w = common.weapOrder[ws.weapons[weapID]]; worm.weapons[weapID].id = w; menus[i].items[menus[i].selection()].string = common.weapons[w].name; } if(worm.pressed(Worm::Right)) { worm.release(Worm::Right); game.soundPlayer->play(26); do { ++ws.weapons[weapID]; if(ws.weapons[weapID] > 40) ws.weapons[weapID] = 1; // TODO: Unhardcode } while(game.settings->weapTable[common.weapOrder[ws.weapons[weapID]]] != 0); int w = common.weapOrder[ws.weapons[weapID]]; worm.weapons[weapID].id = w; menus[i].items[menus[i].selection()].string = common.weapons[w].name; } } if(worm.pressedOnce(Worm::Up)) { game.soundPlayer->play(26); /* int s = int(menus[i].items.size()); curSel[i] = (curSel[i] - 1 + s) % s;*/ menus[i].movement(-1); } if(worm.pressedOnce(Worm::Down)) { game.soundPlayer->play(25); /* int s = int(menus[i].items.size()); curSel[i] = (curSel[i] + 1 + s) % s; */ menus[i].movement(1); } if(worm.pressed(Worm::Fire)) { if(menus[i].selection() == 0) { bool weapUsed[256] = {}; bool enoughWeapons = (enabledWeaps >= Settings::selectableWeapons); for(int j = 0; j < Settings::selectableWeapons; ++j) { while(true) { ws.weapons[j] = gfx.rand(1, 41); int w = common.weapOrder[ws.weapons[j]]; if((!enoughWeapons || !weapUsed[w]) && game.settings->weapTable[w] <= 0) break; } int w = common.weapOrder[ws.weapons[j]]; weapUsed[w] = true; //WormWeapon& ww = worm.weapons[j]; menus[i].items[j + 1].string = common.weapons[w].name; } } else if(menus[i].selection() == 6) // TODO: Unhardcode { game.soundPlayer->play(27); isReady[i] = true; } } } allReady = allReady && isReady[i]; } return allReady; } void WeaponSelection::finalize() { for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& worm = *game.worms[i]; worm.initWeapons(); /* for(int j = 0; j < 6; ++j) { gfx.releaseKey(worm.settings->controls[j]); }*/ } game.releaseControls(); // TODO: Make sure the weapon selection is transfered back to Gfx to be saved } void WeaponSelection::focus() { focused = true; } void WeaponSelection::unfocus() { focused = false; } #if 0 void selectWeapons(Game& game) { WeaponSelection ws(game); while(!ws.processFrame()) { ws.draw(); gfx.flip(); gfx.process(&game); } ws.finalize(); // Important that escape isn't released here } #endif /* void SelectWeapons() { //At this point, cEnabledWeaps contains the number of weapons that are selectable from the menu memcpy(cGFX::pScrTemp, cGFX::pScr, cGFX::iScrSize); fadevalue = 0; do { for(w = 0; w <= 1; w++) { if(isready[w] == 0) { BYTE color; for(o = 1; o <= SELECTABLE_WEAPONS; o++) { long weapid = o - 1; long ypos = (o<<3); if(o == cursel[w]) { wid = GetTextWidth(cSettings::sWeapNames.m_bData[cGame::cWorm[w].m_sWeapons[weapid].m_iID]); DrawRoundedBox(cSettings::iSelWeapX[w]-2, ypos+28, 0, 7, wid); } else // AE58 { DrawTextMW(cSettings::sWeapNames.m_bData[cGame::cWorm[w].m_sWeapons[weapid].id], cSettings::iSelWeapX[w]+1, ypos+30, 0); } // AE9D if(o == cursel[w]) { color = 168; } else { color = 48; } DrawTextMW(cSettings::sWeapNames.m_bData[cGame::cWorm[w].m_sWeapons[weapid].m_iID], cSettings::iSelWeapX[w], ypos+29, color); } // AF01 wid = GetTextWidth(txt_done); if(cursel[w] == 6) { DrawRoundedBox(cSettings::iSelWeapX[w]-2, 76, 0, 7, wid); } else // AF3E { DrawTextMW(txt_done, cSettings::iSelWeapX[w]+1, 78, 0); } // AF64 if(cursel[w] == 6) //NOTE! The table is a bit strange here! { color = 168; } else { color = 10; } DrawTextMW(cMenus::bTxtDone, cSettings::iSelWeapX[w], 77, color); wid = GetTextWidth(cMenus::bTxtRandomize); if(cursel[w] == 0) { DrawRoundedBox(cSettings::iSelWeapX[w]-2, 28, 0, 7, wid); } else // AFDB { DrawTextMW(cMenus::bTxtRandomize, cSettings::iSelWeapX[w]+1, 30, 0); } // B001 if(cursel[w] == 0) { color = 168; } else { color = 13; } DrawTextMW(cMenus::bTxtRandomize, cSettings::iSelWeapX[w], 29, color); if(cGame::cWorm[w].m_bKeyleft) { long weapid = cursel[w]-1; if(weapid >= 0 && weapid < SELECTABLE_WEAPONS) { cLOSP::bDisKeyBuffer[cSettings::sSettings.m_iControls[w][KEY_LEFT]] = true; if(cLOSP::bSoundEnabled) { playsound(0, 0, cLOSP::pSoundPointers[26]); } // B07A do { cSettings::sSettings.m_iWeapons[w][weapid]--; if(cSettings::sSettings.m_iWeapons[w][weapid] < 0) { cSettings::sSettings.m_iWeapons[w][weapid] = 39; } // B0C9 } while(cSettings::sSettings.m_iWeapTable[cSettings::sWeap.order[cSettings::sSettings.m_iWeapons[w][weapid]]] != 0); cGame::cWorm[w].m_sWeapons[weapid].m_iID = cSettings::sWeap.order[cSettings::sSettings.m_iWeapons[w][weapid]]; } } // B137 if(cGame::cWorm[w].m_bKeyright) { long weapid = cursel[w]-1; if(weapid >= 0 && weapid < SELECTABLE_WEAPONS) { cLOSP::bDisKeyBuffer[cSettings::sSettings.m_iControls[w][KEY_RIGHT]] = true; if(cLOSP::bSoundEnabled) { playsound(0, 0, cLOSP::pSoundPointers[27]); } // B176 do { cSettings::sSettings.m_iWeapons[w][weapid]++; if(cSettings::sSettings.m_iWeapons[w][weapid] > 39) { cSettings::sSettings.m_iWeapons[w][weapid] = 0; } // B1C5 } while(cSettings::sSettings.m_iWeapTable[cSettings::sWeap.m_iOrder[cSettings::sSettings.m_iWeapons[w][weapid]]] != 0); cGame::cWorm[w].m_iWeapons[weapid].id = cSettings::sWeap.m_iOrder[cSettings::sSettings.m_iWeapons[w][weapid]]; } } // B233 if(cGame::cWorm[w].m_bKeyup) { cLOSP::bDisKeyBuffer[cSettings::sSettings.m_iControls[w][KEY_UP]] = true; if(cLOSP::bSoundEnabled) { playsound(0, 0, cLOSP::pSoundPointers[27]); } // B26F cursel[w]--; if(cursel[w] < 0) { cursel[w] = 6; } } // B28C if(cGame::cWorm[w].m_bKeydown) { cLOSP::bDisKeyBuffer[cSettings::sSettings.m_iControls[w][KEY_DOWN]] = true; if(cLOSP::bSoundEnabled) { playsound(0, 0, cLOSP::pSoundPointers[26]); } // B2C8 cursel[w]++; if(cursel[w] > 6) { cursel[w] = 0; } } // B2E5 if(cGame::cWorm[w].m_bKeyfire) { if(cursel[w] == 0) { memset(bWeapUsed, 0, 256); for(o = 0; o < SELECTABLE_WEAPONS; o++) { cSettings::sSettings.m_iWeapons[w][o] = random(40); if(cEnabledWeaps < SELECTABLE_WEAPONS) { while(1) { if(cSettings::sSettings.m_iWeapTable[cSettings::sWeap.m_iOrder[cSettings::sSettings.m_iWeapons[w][o]]] == 0) break; cSettings::sSettings.m_iWeapons[w][o] = random(40); } } else // B398 { while(1) { if(!bWeapUsed[cSettings::sSettings.m_iWeapons[w][o]]) //Avoid choosing the same weapon twice { if(cSettings::sSettings.weaptable[cSettings::sWeap.m_iOrder[cSettings::sSettings.m_iWeapons[w][o]]] <= 0) break; } // B3E4 cSettings::sSettings.weapons[w][o] = random(40); } } // B404 bWeapUsed[cSettings::sSettings.weapons[w][o]] = true; cGame::cWorm[w].m_sWeapons[o].m_iAmmo = 0; cGame::cWorm[w].m_sWeapons[o].m_iID = cSettings::sWeap.m_iOrder[cSettings::sSettings.m_iWeapons[w][o]]; } // B4A7 } else if(cursel[w] == 6) { //NOTE! Disable the key here. Do we really need to? if(cLOSP::bSoundEnabled) { playsound(0, 0, cLOSP::pSoundPointers[28]); } // B4DB isready[w] = 1; } // B4E2 } } } // B4EB AnimateOrigPal(168, 174); GetOrigPal(); if(fadevalue < 256) { FadePalette(fadevalue); fadevalue += 8; } // B506 Flip(); memcpy(cGFX::pScr, cGFX::pScrTemp, cGFX::pScrSize); //Restore the original screen } while((isready[0] == 0 || isready[1] == 0) && !cLOSP::bKeyBuffer[DIK_ESCAPE]); //l_B53F: for(w = 0; w < 2; w++) { cGame::cWorm[w].m_iCurrentWeapon = 1; for(o = 0; o < SELECTABLE_WEAPONS; o++) //Fill up ammo! { cGame::cWorm[w].m_sWeapons[o].m_iAmmo = cSettings::sWeap.m_iAmmo[cGame::cWorm[w].m_sWeapons[o].m_iID]; } // B5A2 } // B5A8 for(w = 0; w; w++) { for(wid = 0; wid <= 6; wid++) { cLOSP::bDisKeyBuffer[cSettings::sSettings.m_iControls[w][wid]] = true; } } // B5DE } */ lierolibre-0.5/src/weapsel.hpp000066400000000000000000000035651205125547100164610ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_WEAPSEL_HPP #define LIERO_WEAPSEL_HPP #include "menu/menu.hpp" struct Game; struct WeaponSelection { WeaponSelection(Game& game); void draw(); bool processFrame(); void finalize(); void focus(); void unfocus(); Game& game; int enabledWeaps; int fadeValue; std::vector isReady; std::vector menus; bool cachedBackground; bool focused; }; //void selectWeapons(Game& game); #endif // LIERO_WEAPSEL_HPP lierolibre-0.5/src/worm.cpp000066400000000000000000000767261205125547100160110ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "worm.hpp" #include "game.hpp" #include "sfx.hpp" #include "gfx.hpp" //#include "viewport.hpp" #include "constants.hpp" #include "console.hpp" #include "reader.hpp" // TODO: For lieroEXERoot. We should move that into Common. #include "filesystem.hpp" // For joinPath #include #include #include #include #include "replay.hpp" #include #include struct Point { int x, y; }; gvl::gash::value_type& WormSettings::updateHash() { GameSerializationContext context; gvl::hash_accumulator ha; archive(gvl::out_archive >(ha, context), *this); ha.flush(); hash = ha.final(); return hash; } void WormSettings::saveProfile(std::string const& newProfileName) { try { std::string path(joinPath(data_path->configdir(), newProfileName) + ".lpf"); gvl::stream_ptr str(new gvl::fstream(path.c_str(), "wb")); gvl::octet_stream_writer writer(str); profileName = newProfileName; GameSerializationContext context; archive(gvl::out_archive(writer, context), *this); } catch(gvl::stream_error& e) { Console::writeWarning(std::string("Stream error saving profile: ") + e.what()); } } void WormSettings::loadProfile(std::string const& newProfileName) { int oldColor = color; try { std::string path(joinPath(data_path->configdir(), newProfileName) + ".lpf"); gvl::stream_ptr str(new gvl::fstream(path.c_str(), "rb")); gvl::octet_stream_reader reader(str); profileName = newProfileName; GameSerializationContext context; archive(gvl::in_archive(reader, context), *this); } catch(gvl::stream_error& e) { Console::writeWarning(std::string("Stream error loading profile: ") + e.what()); Console::writeWarning("The profile may just be old, in which case there is nothing to worry about"); } color = oldColor; // We preserve the color } void Worm::calculateReactionForce(int newX, int newY, int dir) { Common& common = *game.common; static Point const colPoints[4][7] = { { //DOWN reaction points {-1, -4}, { 0, -4}, { 1, -4}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0} }, { //LEFT reaction points {1, -3}, {1, -2}, {1, -1}, {1, 0}, {1, 1}, {1, 2}, {1, 3} }, { //UP reaction points {-1, 4}, { 0, 4}, { 1, 4}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0} }, { //RIGHT reaction points {-1, -3}, {-1, -2}, {-1, -1}, {-1, 0}, {-1, 1}, {-1, 2}, {-1, 3} } }; static int const colPointCount[4] = { 3, 7, 3, 7 }; reacts[dir] = 0; // newX should be x + velX at the first call for(int i = 0; i < colPointCount[dir]; ++i) { int colX = newX + colPoints[dir][i].x; int colY = newY + colPoints[dir][i].y; #if 0 if(!game.level.inside(colX, colY) // TODO: Liero seems to not make any check here, checking garbage pixels || !common.materials[game.level.pixel(colX, colY)].background()) #else // This should emulate Liero better PalIdx pix = game.level.checkedPixelWrap(colX, colY); if(!common.materials[pix].background()) #endif { ++reacts[dir]; } } } void Worm::processPhysics() { Common& common = *game.common; if(reacts[RFUp] > 0) { velX = (velX * common.C[WormFricMult]) / common.C[WormFricDiv]; } if(velX > 0) { if(reacts[RFLeft] > 0) { if(velX > common.C[MinBounceRight]) { if(common.H[HFallDamage]) health -= common.C[FallDamageRight]; else game.soundPlayer->play(14); velX = -velX / 3; } else velX = 0; } } else if(velX < 0) { if(reacts[RFRight]) { if(velX < common.C[MinBounceLeft]) { if(common.H[HFallDamage]) health -= common.C[FallDamageLeft]; else game.soundPlayer->play(14); velX = -velX / 3; } else velX = 0; } } if(velY > 0) { if(reacts[RFUp] > 0) { if(velY > common.C[MinBounceDown]) { if(common.H[HFallDamage]) health -= common.C[FallDamageDown]; else game.soundPlayer->play(14); velY = -velY / 3; } else velY = 0; } } else if(velY < 0) { if(reacts[RFDown]) { if(velY < common.C[MinBounceUp]) { if(common.H[HFallDamage]) health -= common.C[FallDamageUp]; else game.soundPlayer->play(14); velY = -velY / 3; } else velY = 0; } } if(reacts[RFUp] == 0) { velY += common.C[WormGravity]; } if(velX >= 0) { if(reacts[RFLeft] < 2) x += velX; } else { if(reacts[RFRight] < 2) x += velX; } if(velY >= 0) { if(reacts[RFUp] < 2) y += velY; } else { if(reacts[RFDown] < 2) y += velY; } } void Worm::process() { Common& common = *game.common; if(health > settings->health) health = settings->health; if(game.settings->gameMode != Settings::GMKillEmAll || lives > 0) { if(visible) { // Liero.exe: 291C fixed nextX = x + velX; fixed nextY = y + velY; int iNextX = ftoi(nextX); int iNextY = ftoi(nextY); { // Calculate reaction forces for(int i = 0; i < 4; i++) { calculateReactionForce(iNextX, iNextY, i); // Yes, Liero does this in every iteration. Keep it this way. if(iNextX < 4) { reacts[RFRight] += 5; } else if(iNextX > game.level.width - 5) { reacts[RFLeft] += 5; } if(iNextY < 5) { reacts[RFDown] += 5; } else { if(common.H[HWormFloat]) { if(iNextY > common.C[WormFloatLevel]) velY -= common.C[WormFloatPower]; } else if(iNextY > game.level.height - 6) { reacts[RFUp] += 5; } } } if(reacts[RFDown] < 2) { if(reacts[RFUp] > 0) { if(reacts[RFLeft] > 0 || reacts[RFRight] > 0) { //Low or none push down, //Push up and //Push left or right y -= itof(1); nextY = y + velY; iNextY = ftoi(nextY); calculateReactionForce(iNextX, iNextY, RFLeft); calculateReactionForce(iNextX, iNextY, RFRight); } } } if(reacts[RFUp] < 2) { if(reacts[RFDown] > 0) { if(reacts[RFLeft] > 0 || reacts[RFRight] > 0) { //Low or none push up, //Push down and //Push left or right y += itof(1); nextY = y + velY; iNextY = ftoi(nextY); calculateReactionForce(iNextX, iNextY, RFLeft); calculateReactionForce(iNextX, iNextY, RFRight); } } } } int ix = ftoi(x); int iy = ftoi(y); for(Game::BonusList::iterator i = game.bonuses.begin(); i != game.bonuses.end(); ++i) { if(ix + 5 > ftoi(i->x) && ix - 5 < ftoi(i->x) && iy + 5 > ftoi(i->y) && iy - 5 < ftoi(i->y)) { if(i->frame == 1) { if(health < settings->health) { game.bonuses.free(i); health += (game.rand(common.C[BonusHealthVar]) + common.C[BonusMinHealth]) * settings->health / 100; // TODO: Read from EXE if(health > settings->health) health = settings->health; } } else if(i->frame == 0) { if(game.rand(common.C[BonusExplodeRisk]) > 1) { WormWeapon& ww = weapons[currentWeapon]; if(!common.H[HBonusReloadOnly]) { fireConeActive = false; fireCone = -1; ww.id = i->weapon; ww.ammo = common.weapons[ww.id].ammo; } game.soundPlayer->play(24); game.bonuses.free(i); ww.available = true; ww.loadingLeft = 0; } else { int bix = ftoi(i->x); int biy = ftoi(i->y); game.bonuses.free(i); common.sobjectTypes[0].create(game, bix, biy, this); } } } } processSteerables(); if(!movable && !pressed(Left) && !pressed(Right)) // processSteerables sets movable to false, does this interfer? { movable = true; } // 2FB1 processAiming(); processTasks(); processWeapons(); if(pressed(Fire) && !pressed(Change) && weapons[currentWeapon].available && weapons[currentWeapon].delayLeft <= 0) { fire(); } else { if(common.weapons[weapons[currentWeapon].id].loopSound) game.soundPlayer->stop(&weapons[currentWeapon]); } processPhysics(); processSight(); if(pressed(Change)) { processWeaponChange(); } else { keyChangePressed = false; processMovement(); } if(health < settings->health / 4) { if(game.rand(health + 6) == 0) { if(game.rand(3) == 0) { int snd = 18 + game.rand(3); // NOTE: MUST be outside the unpredictable branch below if(!game.soundPlayer->isPlaying(this)) { game.soundPlayer->play(snd, this); } } common.nobjectTypes[6].create1(game, velX, velY, x, y, 0, this); } } if(health <= 0) { /* TODO //Kill him! if(worm->flag != 0) { //He got the flag! long flag; if(w == 0) flag = 21; else flag = 20; //Create the flag CreateObject1( worm->m_fXVel, worm->m_fYVel, worm->m_fX, worm->m_fY, 0, flag, BYTE(w) ); worm->flag = 0; } // 468D */ leaveShellTimer = 0; makeSightGreen = false; // TODO: cGame::cWorm[w^1].makesightgreen = 0; Weapon& w = common.weapons[weapons[currentWeapon].id]; if(w.loopSound) { game.soundPlayer->stop(&weapons[currentWeapon]); } int deathSnd = 16 + game.rand(3); game.soundPlayer->play(deathSnd, this); fireConeActive = 0; ninjarope.out = false; --lives; Worm* oldLastKilled = game.lastKilled; // For GameOfTag, 'it' doesn't change if the killer // was not 'it', itself, unknown or there were no 'it'. if(game.settings->gameMode != Settings::GMGameOfTag || !game.lastKilled || !lastKilledBy || lastKilledBy == this || lastKilledBy == game.lastKilled) { game.lastKilled = this; } game.gotChanged = (oldLastKilled != game.lastKilled); if(lastKilledBy && lastKilledBy != this) { ++lastKilledBy->kills; } visible = false; killedTimer = 150; int max = 120 * game.settings->blood / 100; if(max > 1) { for(int i = 1; i <= max; ++i) { common.nobjectTypes[6].create2( game, game.rand(128), velX / 3, velY / 3, x, y, 0, this); } } #if 1 for(int i = 7; i <= 105; i += 14) { common.nobjectTypes[index].create2( game, i + game.rand(14), velX / 3, velY / 3, x, y, 0, this); } #endif release(Fire); } // Update frame if(animate) currentFrame = angleFrame() + game.settings->wormAnimTab[(game.cycles & 31) >> 3]; else currentFrame = angleFrame() + game.settings->wormAnimTab[0]; } else { // Worm is dead if(pressedOnce(Fire)) { ready = true; } if(killedTimer > 0) --killedTimer; if(killedTimer == 0) beginRespawn(); if(killedTimer < 0) doRespawning(); } } } int Worm::angleFrame() const { int x = ftoi(aimingAngle) - 12; if(direction != 0) x -= 49; x >>= 3; if(x < 0) x = 0; else if(x > 6) x = 6; if(direction != 0) { x = 6 - x; } // 9581 return x; } int sqrVectorLength(int x, int y) { return x*x + y*y; } void DumbLieroAI::process() { Game& game = worm.game; Common& common = *game.common; #if 0 // TEMP TEST for(int i = 0; i < Worm::MaxControl; ++i) { worm.setControlState((Worm::Control)i, rand(3) == 0); } /* if(!worm.ready) worm.setControlState(Worm::Fire, true); */ return; #endif Worm* target = 0; int minLen = 0; for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm* w = game.worms[i]; if(w != &worm) { int len = sqrVectorLength(ftoi(worm.x) - ftoi(w->x), ftoi(worm.y) - ftoi(w->y)); if(!target || len < minLen) // First or closer worm { target = w; minLen = len; } } } int maxDist; WormWeapon& ww = worm.weapons[worm.currentWeapon]; Weapon& w = common.weapons[ww.id]; if(w.timeToExplo > 0 && w.timeToExplo < 500) { maxDist = (w.timeToExplo - w.timeToExploV / 2) * w.speed / 130; } else { maxDist = w.speed - w.gravity / 10; } // 4D43 if(maxDist < 90) maxDist = 90; fixed deltaX = target->x - worm.x; fixed deltaY = target->y - worm.y; int ideltaX = ftoi(deltaX); int ideltaY = ftoi(deltaY); int realDist = vectorLength(ideltaX, ideltaY); if(realDist < maxDist || !worm.visible) { // The other worm is close enough bool fire = worm.pressed(Worm::Fire); if(rand(common.aiParams.k[fire][WormSettings::Fire]) == 0) { worm.setControlState(Worm::Fire, !fire); } // 4DE7 } else if(worm.visible) { worm.release(Worm::Fire); } // 4DFA // In Liero this is a loop with two iterations, that's better maybe bool jump = worm.pressed(Worm::Jump); if(rand(common.aiParams.k[jump][WormSettings::Jump]) == 0) { worm.toggleControlState(Worm::Jump); } bool change = worm.pressed(Worm::Change); if(rand(common.aiParams.k[change][WormSettings::Change]) == 0) { worm.toggleControlState(Worm::Change); } //l_4E6B: // Moves up // l_4EE5: if(realDist > 0) { deltaX /= realDist; deltaY /= realDist; } else { deltaX = 0; deltaY = 0; } // 4F2F int dir = 1; for(; dir < 128; ++dir) { if(std::abs(cosTable[dir] - deltaX) < 0xC00 && std::abs(sinTable[dir] - deltaY) < 0xC00) // The original had 0xC000, which is wrong break; } // 4F93 fixed adeltaX = std::abs(deltaX); fixed adeltaY = std::abs(deltaY); if(dir >= 128) { if(deltaX > 0) { if(deltaY < 0) { if(adeltaY > adeltaX) dir = 64 + rand(16); else if(adeltaX > adeltaY) dir = 80 + rand(16); else dir = 80; } else // deltaY >= 0 { if(adeltaX > adeltaY) dir = 96 + rand(16); else dir = 116; } } else { if(deltaY < 0) { if(adeltaY > adeltaX) dir = 48 + rand(16); else if(adeltaX > adeltaY) dir = 32 + rand(16); else dir = 48; // This was 56, but that seems wrong } else // deltaX <= 0 && deltaY >= 0 { if(adeltaX > adeltaY) dir = 12 + rand(16); else dir = 12; } } } // 50FD /* TODO (maybe) if(realdist < maxdist) { if(dir < 64) { l_510E: //What the hell is wrong with this code? //It is messed up totaly! Translating the correct code //NOTE! Something has to be done here! dir += ax; //What the hell is AX? if(dir > 64) { dir = 64; } } // 5167 if(dir > 64) { //The same thing with this code! Is it encrypted or what? dir -= ax; //Again if(dir < 64) { dir = 64; } } } // 51C6 */ change = worm.pressed(Worm::Change); if(change) { if(rand(common.aiParams.k[worm.pressed(Worm::Left)][WormSettings::Left]) == 0) { worm.toggleControlState(Worm::Left); } if(rand(common.aiParams.k[worm.pressed(Worm::Right)][WormSettings::Right]) == 0) { worm.toggleControlState(Worm::Right); } if(worm.ninjarope.out && worm.ninjarope.attached) { // l_525F: bool up = worm.pressed(Worm::Up); if(rand(common.aiParams.k[up][WormSettings::Up]) == 0) { worm.toggleControlState(Worm::Up); } bool down = worm.pressed(Worm::Down); if(rand(common.aiParams.k[down][WormSettings::Down]) == 0) { worm.toggleControlState(Worm::Down); } } else { // l_52D2: worm.release(Worm::Up); worm.release(Worm::Down); } // 52F8 } // if(change) else { if(realDist > maxDist) { worm.setControlState(Worm::Right, (deltaX > 0)); worm.setControlState(Worm::Left, (deltaX <= 0)); } // 5347 else { worm.release(Worm::Right); worm.release(Worm::Left); } if(worm.direction != 0) { if(dir < 64) worm.press(Worm::Left); // 5369 worm.setControlState(Worm::Up, (dir + 1 < ftoi(worm.aimingAngle))); // 5379 worm.setControlState(Worm::Down, (dir - 1 > ftoi(worm.aimingAngle))); } else { if(dir > 64) worm.press(Worm::Right); // 53C6 worm.setControlState(Worm::Up, (dir - 1 > ftoi(worm.aimingAngle))); // 53E8 worm.setControlState(Worm::Down, (dir + 1 < ftoi(worm.aimingAngle))); // 540A } if(worm.pressed(Worm::Left) && worm.reacts[Worm::RFRight]) { if(worm.reacts[Worm::RFDown] > 0) worm.press(Worm::Right); else worm.press(Worm::Jump); } // 5454 if(worm.pressed(Worm::Right) && worm.reacts[Worm::RFLeft]) { if(worm.reacts[Worm::RFDown] > 0) worm.press(Worm::Left); else worm.press(Worm::Jump); } // 549E } } void Worm::initWeapons() { Common& common = *game.common; currentWeapon = 0; // It was 1 in OpenLiero A1 for(int j = 0; j < Settings::selectableWeapons; ++j) { WormWeapon& ww = weapons[j]; ww.id = common.weapOrder[settings->weapons[j]]; ww.ammo = common.weapons[weapons[j].id].ammo; ww.delayLeft = 0; ww.loadingLeft = 0; ww.available = true; } } void Worm::beginRespawn() { Common& common = *game.common; int tempX = ftoi(x); int tempY = ftoi(y); logicRespawnX = tempX - 80; logicRespawnY = tempY - 80; int enemyX = tempX; int enemyY = tempY; if(game.worms.size() == 2) { enemyX = ftoi(game.worms[index ^ 1]->x); enemyY = ftoi(game.worms[index ^ 1]->y); } int trials = 0; do { x = itof(common.C[WormSpawnRectX] + game.rand(common.C[WormSpawnRectW])); y = itof(common.C[WormSpawnRectY] + game.rand(common.C[WormSpawnRectH])); // The original didn't have + 4 in both, which seems // to be done in the exe and makes sense. while(ftoi(y) + 4 < game.level.height && common.materials[game.level.pixel(ftoi(x), ftoi(y) + 4)].background()) { y += itof(1); } if(++trials >= 50000) { Console::writeWarning("Couldn't find a suitable spawn position in time"); break; } } while(!checkRespawnPosition(game, enemyX, enemyY, tempX, tempY, ftoi(x), ftoi(y))); killedTimer = -1; } void limitXY(int& x, int& y, int maxX, int maxY) { if(x < 0) x = 0; else if(x > maxX) x = maxX; if(y < 0) y = 0; if(y > maxY) y = maxY; } void Worm::doRespawning() { Common& common = *game.common; for(int c = 0; c < 4; c++) { if(logicRespawnX < ftoi(x) - 80) ++logicRespawnX; else if(logicRespawnX > ftoi(x) - 80) --logicRespawnX; if(logicRespawnY < ftoi(y) - 80) ++logicRespawnY; else if(logicRespawnY > ftoi(y) - 80) --logicRespawnY; } limitXY(logicRespawnX, logicRespawnY, game.level.width - 158, game.level.height - 158); int destX = ftoi(x) - 80; int destY = ftoi(y) - 80; limitXY(destX, destY, game.level.width - 158, game.level.height - 158); if(logicRespawnX < destX + 5 && logicRespawnX > destX - 5 && logicRespawnY < destY + 5 && logicRespawnY > destY - 5 && ready) { int ix = ftoi(x), iy = ftoi(y); drawDirtEffect(common, game.rand, game.level, 0, ix - 7, iy - 7); if(game.settings->shadow) correctShadow(common, game.level, Rect(ix - 10, iy - 10, ix + 11, iy + 11)); ready = false; game.soundPlayer->play(21); visible = true; fireConeActive = 0; velX = 0; velY = 0; health = settings->health; // NOTE: This was done at death before, but doing it here seems to make more sense if(game.rand() & 1) { aimingAngle = itof(32); direction = 0; } else { aimingAngle = itof(96); direction = 1; } } } void Worm::processWeapons() { Common& common = *game.common; for(int i = 0; i < Settings::selectableWeapons; ++i) { if(weapons[i].delayLeft >= 0) --weapons[i].delayLeft; } WormWeapon& ww = weapons[currentWeapon]; Weapon& w = common.weapons[ww.id]; if(ww.ammo <= 0) { ww.available = false; int computedLoadingTime = w.computedLoadingTime(*game.settings); ww.loadingLeft = computedLoadingTime; ww.ammo = w.ammo; } if(ww.loadingLeft > 0) // NOTE: computedLoadingTime is never 0, so this works { --ww.loadingLeft; if(ww.loadingLeft <= 0) { if(w.playReloadSound) game.soundPlayer->play(24); ww.available = true; } } if(fireCone >= 0) { --fireCone; if(fireCone == 0) fireConeActive = false; } if(leaveShellTimer > 0) { if(--leaveShellTimer <= 0) { common.nobjectTypes[7].create1(game, game.rand(16000) - 8000, -int(game.rand(20000)), x, y, 0, this); } } } void Worm::processMovement() { Common& common = *game.common; if(movable) { bool left = pressed(Left); bool right = pressed(Right); if(left && !right) { if(velX > common.C[MaxVelLeft]) velX -= common.C[WalkVelLeft]; if(direction != 0) { aimingSpeed = 0; if(aimingAngle >= itof(64)) aimingAngle = itof(128) - aimingAngle; direction = 0; } animate = true; } if(!left && right) { if(velX < common.C[MaxVelRight]) velX += common.C[WalkVelRight]; if(direction != 1) { aimingSpeed = 0; if(aimingAngle <= itof(64)) aimingAngle = itof(128) - aimingAngle; direction = 1; } animate = true; } if(left && right) { if(ableToDig) { ableToDig = false; fixed dirX = cosTable[ftoi(aimingAngle)]; fixed dirY = sinTable[ftoi(aimingAngle)]; fixed posX = dirX * 2 + x; fixed posY = dirY * 2 + y; /* TODO long iDigx = ftoi(fTempx) - 4; if(iDigx < 0) iDigx = 0; if(iDigx >= levwidth) iDigx = levwidth-1; long iDigenx = ftoi(fTempx) + 4; if(iDigenx < 0) iDigenx = 0; if(iDigenx >= levwidth) iDigenx = levwidth-1; long iDigy; long iDigsty = ftoi(fTempy) - 4; if(iDigsty < 0) iDigsty = 0; if(iDigsty >= levheight) iDigsty = levheight-1; long iDigeny = ftoi(fTempy) + 4; if(iDigeny < 0) iDigeny = 0; if(iDigeny >= levheight) iDigeny = levheight-1; for(; iDigx <= iDigenx; iDigx++) { for(iDigy = iDigsty; iDigy <= iDigeny; iDigy++) { //Throw away every third pixel if(materials.Dirt[lev(iDigx, iDigy)] && random(3) == 0) { CreateObject2(random(128), 0, 0, itof(iDigx), itof(iDigy), lev(iDigx, iDigy), 2, BYTE(w)); } // 419A } // 41A9 } // 41BB */ posX -= itof(7); posY -= itof(7); int ix = ftoi(posX), iy = ftoi(posY); drawDirtEffect(common, game.rand, game.level, 7, ix, iy); if(game.settings->shadow) correctShadow(common, game.level, Rect(ix - 3, iy - 3, ix + 18, iy + 18)); posX += dirX << 1; posY += dirY << 1; //l_43EB: ix = ftoi(posX); iy = ftoi(posY); drawDirtEffect(common, game.rand, game.level, 7, ix, iy); if(game.settings->shadow) correctShadow(common, game.level, Rect(ix - 3, iy - 3, ix + 18, iy + 18)); //NOTE! Maybe the shadow corrections can be joined into one? Mmm? } // 4552 } else { ableToDig = true; } if(!left && !right) { animate = false; //Don't animate the this unless he is moving } // 458C } } void Worm::processTasks() { Common& common = *game.common; if(pressed(Change)) { if(ninjarope.out) { if(pressed(Up)) ninjarope.length -= common.C[NRPullVel]; if(pressed(Down)) ninjarope.length += common.C[NRReleaseVel]; if(ninjarope.length < common.C[NRMinLength]) ninjarope.length = common.C[NRMinLength]; if(ninjarope.length > common.C[NRMaxLength]) ninjarope.length = common.C[NRMaxLength]; } if(pressedOnce(Jump)) { ninjarope.out = true; ninjarope.attached = false; game.soundPlayer->play(5); ninjarope.x = x; ninjarope.y = y; ninjarope.velX = cosTable[ftoi(aimingAngle)] << common.C[NRThrowVelX]; ninjarope.velY = sinTable[ftoi(aimingAngle)] << common.C[NRThrowVelY]; ninjarope.length = common.C[NRInitialLength]; } } else { //Jump = remove ninjarope, jump if(pressed(Jump)) { ninjarope.out = false; ninjarope.attached = false; if((reacts[RFUp] > 0 || common.H[HAirJump]) && (ableToJump || common.H[HMultiJump])) { velY -= common.C[JumpForce]; ableToJump = false; } } else ableToJump = true; } } void Worm::processAiming() { Common& common = *game.common; bool up = pressed(Up); bool down = pressed(Down); if(aimingSpeed != 0) { aimingAngle += aimingSpeed; if(!up && !down) { aimingSpeed = (aimingSpeed * common.C[AimFricMult]) / common.C[AimFricDiv]; } if(direction == 1) { if(ftoi(aimingAngle) > common.C[AimMaxRight]) { aimingSpeed = 0; aimingAngle = itof(common.C[AimMaxRight]); } if(ftoi(aimingAngle) < common.C[AimMinRight]) { aimingSpeed = 0; aimingAngle = itof(common.C[AimMinRight]); } } else { if(ftoi(aimingAngle) < common.C[AimMaxLeft]) { aimingSpeed = 0; aimingAngle = itof(common.C[AimMaxLeft]); } if(ftoi(aimingAngle) > common.C[AimMinLeft]) { aimingSpeed = 0; aimingAngle = itof(common.C[AimMinLeft]); } } } if(movable && (!ninjarope.out || !pressed(Change))) { if(up) { if(direction == 0) { if(aimingSpeed < common.C[MaxAimVelLeft]) aimingSpeed += common.C[AimAccLeft]; } else { if(aimingSpeed > common.C[MaxAimVelRight]) aimingSpeed -= common.C[AimAccRight]; } } if(down) { if(direction == 1) { if(aimingSpeed < common.C[MaxAimVelLeft]) aimingSpeed += common.C[AimAccLeft]; } else { if(aimingSpeed > common.C[MaxAimVelRight]) aimingSpeed -= common.C[AimAccRight]; } } } } void Worm::processWeaponChange() { Common& common = *game.common; if(!keyChangePressed) { release(Left); release(Right); keyChangePressed = true; } fireConeActive = 0; animate = false; if(common.weapons[weapons[currentWeapon].id].loopSound) { game.soundPlayer->stop(&weapons[currentWeapon]); } if(weapons[currentWeapon].available || game.settings->loadChange) { if(pressedOnce(Left)) { if(--currentWeapon < 0) currentWeapon = Settings::selectableWeapons - 1; hotspotX = ftoi(x); hotspotY = ftoi(y); } if(pressedOnce(Right)) { if(++currentWeapon >= Settings::selectableWeapons) currentWeapon = 0; hotspotX = ftoi(x); hotspotY = ftoi(y); } } } void Worm::fire() { Common& common = *game.common; WormWeapon& ww = weapons[currentWeapon]; Weapon& w = common.weapons[ww.id]; --ww.ammo; ww.delayLeft = w.delay; fireCone = w.fireCone; if(fireCone) fireConeActive = true; // TODO: Consider removing fireConeActive since fireCone seems to imply it's state fixed firingX = cosTable[ftoi(aimingAngle)] * (w.detectDistance + 5) + x; fixed firingY = sinTable[ftoi(aimingAngle)] * (w.detectDistance + 5) + y - itof(1); if(w.leaveShells > 0) { if(game.rand(w.leaveShells) == 0) { leaveShellTimer = w.leaveShellDelay; } } if(w.launchSound >= 0) { if(w.loopSound) { if(!game.soundPlayer->isPlaying(&weapons[currentWeapon])) { game.soundPlayer->play(w.launchSound, &weapons[currentWeapon], -1); } /* TODO if(FSOUND_IsPlaying(weapsettings.launchsound[this->weapons[this->currentweapon].id])) { playsound( weapsettings.loopsound[this->weapons[this->currentweapon].id], weapsettings.launchsound[this->weapons[this->currentweapon].id], soundpointers[weapsettings.launchsound[this->weapons[this->currentweapon].id]] ); } */ } else { game.soundPlayer->play(w.launchSound); } } if(w.affectByWorm) { int speed = w.speed; if(speed < 100) speed = 100; int parts = w.parts; if(parts > 0) { fixed firingVelX = velX * 100 / speed; fixed firingVelY = velY * 100 / speed; for(int i = 0; i < parts; ++i) { w.fire( game, ftoi(aimingAngle), firingVelX, firingVelY, speed, firingX, firingY, this); } } } else { int parts = w.parts; if(parts > 0) { for(int i = 0; i < parts; ++i) { w.fire( game, ftoi(aimingAngle), 0, 0, w.speed, firingX, firingY, this); } } } int recoil = w.recoil; if(common.H[HSignedRecoil] && recoil >= 128) recoil -= 256; velX -= (cosTable[ftoi(aimingAngle)] * recoil) / 100; velY -= (sinTable[ftoi(aimingAngle)] * recoil) / 100; } bool checkForWormHit(int x, int y, int dist, Worm* ownWorm) { Game& game = ownWorm->game; for(std::size_t i = 0; i < game.worms.size(); ++i) { Worm& w = *game.worms[i]; if(&w != ownWorm) { return checkForSpecWormHit(x, y, dist, w); } } return false; } bool checkForSpecWormHit(int x, int y, int dist, Worm& w) { Game& game = w.game; Common& common = *game.common; if(!w.visible) return false; PalIdx* wormSprite = common.wormSprite(w.currentFrame, w.direction, 0); int deltaX = x - ftoi(w.x) + 7; int deltaY = y - ftoi(w.y) + 5; Rect r(deltaX - dist, deltaY - dist, deltaX + dist + 1, deltaY + dist + 1); r.intersect(Rect(0, 0, 16, 16)); for(int cy = r.y1; cy < r.y2; ++cy) for(int cx = r.x1; cx < r.x2; ++cx) { if(common.materials[wormSprite[cy*16 + cx]].worm()) return true; } return false; } void Worm::processSight() { Common& common = *game.common; WormWeapon& ww = weapons[currentWeapon]; Weapon& w = common.weapons[ww.id]; if(ww.available && (w.laserSight || ww.id == common.C[LaserWeapon] - 1)) { fixed dirX = cosTable[ftoi(aimingAngle)]; fixed dirY = sinTable[ftoi(aimingAngle)]; fixed tempX = x + dirX * 6; fixed tempY = y + dirY * 6 - itof(1); do { tempX += dirX; tempY += dirY; makeSightGreen = checkForWormHit(ftoi(tempX), ftoi(tempY), 0, this); } while( tempX >= 0 && tempY >= 0 && tempX < itof(game.level.width) && tempY < itof(game.level.height) && common.materials[game.level.pixel(ftoi(tempX), ftoi(tempY))].background() && !makeSightGreen); hotspotX = ftoi(tempX); hotspotY = ftoi(tempY); } else makeSightGreen = false; } void Worm::processSteerables() { Common& common = *game.common; WormWeapon& ww = weapons[currentWeapon]; if(common.weapons[ww.id].shotType == Weapon::STSteerable) { for(Game::WObjectList::iterator i = game.wobjects.begin(); i != game.wobjects.end(); ++i) { if(i->id == ww.id && i->owner == this) { if(pressed(Left)) i->curFrame -= (game.cycles & 1) + 1; if(pressed(Right)) i->curFrame += (game.cycles & 1) + 1; i->curFrame &= 127; // Wrap movable = false; } } } } lierolibre-0.5/src/worm.hpp000066400000000000000000000237041205125547100160020ustar00rootroot00000000000000/* * Copyright (c) 2007-2010, Erik Lindroos * Copyright (c) 2010, "basro" * Copyright (c) 2012, Martin Erik Werner * This software is released under the The BSD-2-Clause License: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef LIERO_WORM_HPP #define LIERO_WORM_HPP #include "math.hpp" #include "rand.hpp" #include #include #include #include #include #include "version.hpp" #include // For gvl::enable_when #include #include // TEMP struct Worm; struct Game; struct Ninjarope { Ninjarope() : out(false) , attached(false) , anchor(0) { } bool out; //Is the ninjarope out? bool attached; Worm* anchor; // If non-zero, the worm the ninjarope is attached to fixed x, y, velX, velY; //Ninjarope props // Not needed as far as I can tell: fixed forceX, forceY; int length, curLen; void process(Worm& owner); }; /* struct Controls { bool up, down, left, right; bool fire, change, jump; };*/ struct WormWeapon { WormWeapon() : id(0) , ammo(0) , delayLeft(0) , loadingLeft(0) , available(true) { } int id; int ammo; int delayLeft; int loadingLeft; bool available; }; struct WormSettingsExtensions { enum Control { Up, Down, Left, Right, Fire, Change, Jump, Dig, MaxControl = Dig, MaxControlEx }; //static const int MaxControl = Dig; uint32_t controlsEx[MaxControlEx]; }; struct WormSettings : gvl::shared, WormSettingsExtensions { WormSettings() : health(100) , controller(0) , randomName(true) , color(0) { rgb[0] = 26; rgb[1] = 26; rgb[2] = 62; std::memset(weapons, 0, sizeof(weapons)); } gvl::gash::value_type& updateHash(); void saveProfile(std::string const& newProfileName); void loadProfile(std::string const& newProfileName); int health; uint32_t controller; // CPU / Human uint32_t controls[MaxControlEx]; int weapons[5]; // TODO: Adjustable std::string name; int rgb[3]; bool randomName; int color; std::string profileName; gvl::gash::value_type hash; }; template void archive(Archive ar, WormSettings& ws) { ar .ui32(ws.color) .ui32(ws.health) .ui16(ws.controller); for(int i = 0; i < WormSettings::MaxControl; ++i) ar.ui16(ws.controls[i]); for(int i = 0; i < 5; ++i) ar.ui16(ws.weapons[i]); for(int i = 0; i < 3; ++i) ar.ui16(ws.rgb[i]); ar.b(ws.randomName); ar.str(ws.name); if(ar.context.replayVersion <= 1) { ws.WormSettingsExtensions::operator=(WormSettingsExtensions()); return; } int wsVersion = myGameVersion; ar.ui8(wsVersion); for(int c = 0; c < WormSettings::MaxControl; ++c) { int dummy = 0; gvl::enable_when(ar, wsVersion >= 2) .ui8(dummy, 255) .ui8(dummy, 255); } for(int c = 0; c < WormSettings::MaxControlEx; ++c) { gvl::enable_when(ar, wsVersion >= 3) .ui32(ws.controlsEx[c], ws.controls[c]); } } /* typedef struct _settings { long m_iHealth[2]; char m_iController[2]; char m_iWeapTable[40]; long m_iMaxBonuses; long m_iBlood; long m_iTimeToLose; long m_iFlagsToWin; char m_iGameMode; bool m_bShadow; bool m_bLoadChange; bool m_bNamesOnBonuses; bool m_bRegenerateLevel; BYTE m_iControls[2][7]; BYTE m_iWeapons[2][5]; long m_iLives; long m_iLoadingTime; bool m_bRandomLevel; char m_bWormName[2][21]; char m_bLevelFile[13]; BYTE m_iWormRGB[2][3]; bool m_bRandomName[2]; bool m_bMap; bool m_bScreenSync; } SETTINGS, *PSETTINGS; */ struct Viewport; struct WormAI { WormAI(Worm& worm) : worm(worm) { } virtual void process() = 0; Worm& worm; }; struct DumbLieroAI : WormAI { DumbLieroAI(Worm& worm) : WormAI(worm) { } void process(); Rand rand; }; struct Worm : gvl::shared { enum { RFDown, RFLeft, RFUp, RFRight }; enum Control { Left = WormSettings::Left, Right = WormSettings::Right, Up = WormSettings::Up, Down = WormSettings::Down, Fire = WormSettings::Fire, Change = WormSettings::Change, Jump = WormSettings::Jump, MaxControl //Dig = WormSettings::Dig }; //static const unsigned int MaxControl = Dig; struct ControlState { ControlState() : istate(0) { } bool operator==(ControlState const& b) const { return istate == b.istate; } uint32_t pack() const { return istate; // & ((1 << MaxControl)-1); } void unpack(uint32_t state) { istate = state & 0x7f; } bool operator!=(ControlState const& b) const { return !operator==(b); } bool operator[](std::size_t n) const { return ((istate >> n) & 1) != 0; } void set(std::size_t n, bool v) { if(v) istate |= 1 << n; else istate &= ~(uint32_t(1u) << n); } uint32_t istate; }; Worm(/*gvl::shared_ptr settings, int index, int wormSoundID, */Game& game) : x(0), y(0), velX(0), velY(0) , hotspotX(0), hotspotY(0) , aimingAngle(0), aimingSpeed(0) , ableToJump(false), ableToDig(false) //The previous state of some keys , keyChangePressed(false) , movable(false) , animate(false) //Should the worm be animated? , visible(false) //Is the worm visible? , ready(false) //Is the worm ready to play? , flag(false) //Has the worm a flag? , makeSightGreen(false) //Changes the sight color , health(0) //Health left , lives(0) //lives left , kills(0) //Kills made , timer(0) //Timer for GOT , killedTimer(0) //Time until worm respawns , currentFrame(0) , flags(0) //How many flags does this worm have? , currentWeapon(0) , fireConeActive(false) , lastKilledBy(0) , fireCone(0) , leaveShellTimer(0) // , viewport(0) , index(index) , direction(0) , game(game) { //std::memset(controlStates, 0, sizeof(controlStates)); makeSightGreen = false; ready = true; movable = true; //health = settings->health; visible = false; killedTimer = 150; //currentWeapon = 1; // This is later changed to 0, why is it here? } bool pressed(Control control) const { return controlStates[control]; } bool pressedOnce(Control control) { bool state = controlStates[control]; controlStates.set(control, false); return state; } void release(Control control) { controlStates.set(control, false); } void press(Control control) { controlStates.set(control, true); } void setControlState(Control control, bool state) { controlStates.set(control, state); } void toggleControlState(Control control) { controlStates.set(control, !controlStates[control]); } void beginRespawn(); void doRespawning(); void process(); void processWeapons(); void processPhysics(); void processMovement(); void processTasks(); void processAiming(); void processWeaponChange(); void processSteerables(); void fire(); void processSight(); void calculateReactionForce(int newX, int newY, int dir); void initWeapons(); int angleFrame() const; fixed x, y; //Worm position fixed velX, velY; //Worm velocity int logicRespawnX, logicRespawnY; int hotspotX, hotspotY; //Hotspots for laser, laser sight, etc. fixed aimingAngle, aimingSpeed; //Controls controls; bool ableToJump, ableToDig; //The previous state of some keys bool keyChangePressed; bool movable; bool animate; //Should the worm be animated? bool visible; //Is the worm visible? bool ready; //Is the worm ready to play? bool flag; //Does the worm have a flag? bool makeSightGreen; //Changes the sight color int health; //Health left int lives; //lives left int kills; //Kills made int timer; //Timer for GOT int killedTimer; //Time until worm respawns int currentFrame; int flags; //How many flags does this worm have? Ninjarope ninjarope; int currentWeapon; //The selected weapon bool fireConeActive; //Is the firecone showing Worm* lastKilledBy; // What worm that last killed this worm int fireCone; //How much is left of the firecone int leaveShellTimer; //Time until next shell drop gvl::shared_ptr settings; // !CLONING //Viewport* viewport; // !CLONING int index; // 0 or 1 std::auto_ptr ai; int reacts[4]; WormWeapon weapons[5]; int direction; ControlState controlStates; ControlState prevControlStates; Game& game; // !CLONING // Data for LocalController ControlState cleanControlStates; // This contains the real state of real and extended controls }; bool checkForWormHit(int x, int y, int dist, Worm* ownWorm); bool checkForSpecWormHit(int x, int y, int dist, Worm& w); #endif // LIERO_WORM_HPP lierolibre-0.5/windows/000077500000000000000000000000001205125547100152025ustar00rootroot00000000000000lierolibre-0.5/windows/visualC/000077500000000000000000000000001205125547100166105ustar00rootroot00000000000000lierolibre-0.5/windows/visualC/liero.vcproj000066400000000000000000000401431205125547100211510ustar00rootroot00000000000000 lierolibre-0.5/windows/visualC/liero.vcxproj000066400000000000000000000342201205125547100213400ustar00rootroot00000000000000 Debug Win32 Debug x64 Release Win32 Release x64 {CDE258F8-90DB-407B-8521-AA531EE4D167} liero Win32Proj lierolibre Application MultiByte Application MultiByte Application Application <_ProjectFileVersion>10.0.40219.1 $(SolutionDir)\..\_bin\$(Configuration)\ _trash\$(Configuration)\ true $(SolutionDir)\..\_bin\$(Configuration)\ _trash\$(Configuration)\ false ..\include;..\..\src;$(IncludePath) ..\include;..\..\src;$(IncludePath) Disabled $(VCInstallDir)\include\SDL;$(SolutionDir)\..;%(AdditionalIncludeDirectories) LIBCONFIGXX_STATIC;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level1 EditAndContinue $(OutDir)lierolibre.exe true $(OutDir)liero.pdb Console false MachineX86 false Full AnySuitable true Speed true $(VCInstallDir)\include\SDL;$(SolutionDir)\..;%(AdditionalIncludeDirectories) LIBCONFIGXX_STATIC;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;DISABLE_MAINHACK;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase /D BOOST_ALL_DYN_LINK %(AdditionalOptions) %(AdditionalDependencies) $(OutDir)lierolibre.exe true Console true true UseLinkTimeCodeGeneration false MachineX86 {a0c36ce7-d908-4573-8b69-249eeeb7d2be} {81ce8daf-ebb2-4761-8e45-b71abcca8c68} {57addf43-2fac-4c85-8d88-72dee580a3c9} {8fd826f8-3739-44e6-8cc8-997122e53b8d} {6088541b-a9e1-461b-b83a-8eb6ec1c274e} lierolibre-0.5/windows/visualC/lierolibre.sln000066400000000000000000000177471205125547100214760ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lierolibre", "liero.vcxproj", "{CDE258F8-90DB-407B-8521-AA531EE4D167}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvl", "..\..\src\gvl\_build\gvl.vcxproj", "{57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libconfig++", "..\libconfig-1.4.8\lib\libconfig++.vcxproj", "{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "..\SDL-1.2.15\VisualC\SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_program_options", "boost.vcxproj", "{6088541B-A9E1-461B-B83A-8EB6EC1C274E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "..\zlib-1.2.7\contrib\vstudio\vc10\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Itanium = Debug|Itanium Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Itanium = Release|Itanium Release|Win32 = Release|Win32 Release|x64 = Release|x64 ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {CDE258F8-90DB-407B-8521-AA531EE4D167}.Debug|Itanium.ActiveCfg = Debug|x64 {CDE258F8-90DB-407B-8521-AA531EE4D167}.Debug|Win32.ActiveCfg = Debug|Win32 {CDE258F8-90DB-407B-8521-AA531EE4D167}.Debug|Win32.Build.0 = Debug|Win32 {CDE258F8-90DB-407B-8521-AA531EE4D167}.Debug|x64.ActiveCfg = Debug|x64 {CDE258F8-90DB-407B-8521-AA531EE4D167}.Debug|x64.Build.0 = Debug|x64 {CDE258F8-90DB-407B-8521-AA531EE4D167}.Release|Itanium.ActiveCfg = Release|x64 {CDE258F8-90DB-407B-8521-AA531EE4D167}.Release|Win32.ActiveCfg = Release|Win32 {CDE258F8-90DB-407B-8521-AA531EE4D167}.Release|Win32.Build.0 = Release|Win32 {CDE258F8-90DB-407B-8521-AA531EE4D167}.Release|x64.ActiveCfg = Release|Win32 {CDE258F8-90DB-407B-8521-AA531EE4D167}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|x64 {CDE258F8-90DB-407B-8521-AA531EE4D167}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {CDE258F8-90DB-407B-8521-AA531EE4D167}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {CDE258F8-90DB-407B-8521-AA531EE4D167}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 {CDE258F8-90DB-407B-8521-AA531EE4D167}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Debug|Itanium.ActiveCfg = Debug|x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Debug|Win32.ActiveCfg = Debug|Win32 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Debug|Win32.Build.0 = Debug|Win32 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Debug|x64.ActiveCfg = Debug|x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Debug|x64.Build.0 = Debug|x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Release|Itanium.ActiveCfg = Release|x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Release|Win32.ActiveCfg = Release|Win32 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Release|Win32.Build.0 = Release|Win32 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Release|x64.ActiveCfg = Release|x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.Release|x64.Build.0 = Release|x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 {57ADDF43-2FAC-4C85-8D88-72DEE580A3C9}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|Itanium.ActiveCfg = Debug|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|Win32.ActiveCfg = Debug|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|Win32.Build.0 = Debug|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|x64.ActiveCfg = Debug|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|Itanium.ActiveCfg = Release|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|Win32.ActiveCfg = Release|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|Win32.Build.0 = Release|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|x64.ActiveCfg = Release|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Itanium.ActiveCfg = Debug|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Itanium.ActiveCfg = Release|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.Debug|Itanium.ActiveCfg = Debug|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.Debug|Win32.ActiveCfg = Debug|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.Debug|Win32.Build.0 = Debug|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.Debug|x64.ActiveCfg = Debug|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.Release|Itanium.ActiveCfg = Release|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.Release|Win32.ActiveCfg = Release|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.Release|Win32.Build.0 = Release|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.Release|x64.ActiveCfg = Release|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 {6088541B-A9E1-461B-B83A-8EB6EC1C274E}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal